Bumped version number, added support for nodes outbound boxes

This commit is contained in:
Michiel Broek
2002-06-24 20:34:07 +00:00
parent cf432130e8
commit d864d6a2a9
28 changed files with 1503 additions and 921 deletions

View File

@@ -125,7 +125,7 @@ int E_Group(gr_list **fdp, char *title)
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 5, (char *)"%s", title);
mvprintw(5, 6, (char *)"%s", title);
set_color(CYAN, BLACK);
for (tmp = *fdp; tmp; tmp = tmp->next)

View File

@@ -716,7 +716,7 @@ char *edit_str(int y, int x, int l, char *line, char *help)
char *edit_pth(int y, int x, int l, char *line, char *help)
char *edit_pth(int y, int x, int l, char *line, char *help, mode_t mode)
{
static char s[256];
char *temp;
@@ -729,7 +729,7 @@ char *edit_pth(int y, int x, int l, char *line, char *help)
temp = xstrcat(temp, (char *)"/foobar");
if (access(s, R_OK)) {
if (yes_no((char *)"Path doesn't exist, create"))
if (! mkdirs(temp, 0775))
if (! mkdirs(temp, mode))
errmsg((char *)"Can't create path");
}
}
@@ -1723,6 +1723,95 @@ char *getmagictype(int val)
char *get_sessiontype(int val)
{
switch (val) {
case S_DIRECT: return (char *)"Direct ";
case S_DIR: return (char *)"Directory";
case S_FTP: return (char *)"FTP ";
default: return NULL;
}
}
void show_sessiontype(int y, int x, int val)
{
mvprintw(y, x, get_sessiontype(val));
}
int edit_sessiontype(int y, int x, int val)
{
int ch;
showhelp((char *)"Toggle ^Session type^ with spacebar, press <Enter> whene done.");
do {
set_color(YELLOW, BLUE);
show_sessiontype(y, x, val);
ch = readkey(y, x, YELLOW, BLUE);
if (ch == ' ') {
if (val < S_FTP)
val++;
else
val = S_DIRECT;
}
} while (ch != KEY_ENTER && ch != '\012');
set_color(WHITE, BLACK);
show_sessiontype(y, x, val);
return val;
}
char *get_routertype(int val)
{
switch (val) {
case R_ROUTE: return (char *)"Routed ";
case R_NEWDEST: return (char *)"Redirect ";
case R_BOUNCE: return (char *)"Bounce ";
case R_CC: return (char *)"CarbonCopy";
default: return NULL;
}
}
void show_routertype(int y, int x, int val)
{
mvprintw(y, x, get_routertype(val));
}
int edit_routertype(int y, int x, int val)
{
int ch;
showhelp((char *)"Toggle ^Routing mode^ with spacebar, press <Enter> whene done.");
do {
set_color(YELLOW, BLUE);
show_routertype(y, x, val);
ch = readkey(y, x, YELLOW, BLUE);
if (ch == ' ') {
if (val < R_CC)
val++;
else
val = R_ROUTE;
}
} while (ch != KEY_ENTER && ch != '\012');
set_color(WHITE, BLACK);
show_routertype(y, x, val);
return val;
}
void show_aka(int y, int x, fidoaddr aka)
{
char temp[24];

View File

@@ -20,7 +20,7 @@ int select_menu(int);
int select_tag(int);
void show_str(int, int, int, char *);
char *edit_str(int, int, int, char *, char *);
char *edit_pth(int, int, int, char *, char *);
char *edit_pth(int, int, int, char *, char *, mode_t);
void test_jam(char *);
char *edit_jam(int, int, int, char *, char *);
char *edit_ups(int, int, int, char *, char *);
@@ -67,6 +67,12 @@ int edit_linetype(int, int, int);
char *getmagictype(int);
void show_magictype(int, int, int);
int edit_magictype(int, int, int);
char *get_sessiontype(int);
void show_sessiontype(int, int, int);
int edit_sessiontype(int, int, int);
char *get_routetype(int);
void show_routetype(int, int, int);
int edit_routetype(int, int, int);
void show_aka(int, int, fidoaddr);
void edit_color(int *, int *, char *, char *);
char *get_color(int);
@@ -77,7 +83,7 @@ char *getmenutype(int);
* Macro's for the edit functions
*/
#define E_STR(y,x,l,str,help) strcpy(str, edit_str(y,x,l,str,(char *)help)); break;
#define E_PTH(y,x,l,str,help) strcpy(str, edit_pth(y,x,l,str,(char *)help)); break;
#define E_PTH(y,x,l,str,help,mode) strcpy(str, edit_pth(y,x,l,str,(char *)help,mode)); break;
#define E_UPS(y,x,l,str,help) strcpy(str, edit_ups(y,x,l,str,(char *)help)); break;
#define E_JAM(y,x,l,str,help) strcpy(str, edit_jam(y,x,l,str,(char *)help)); break;
#define E_BOOL(y,x,bool,help) bool = edit_bool(y,x,bool,(char *)help); break;

View File

@@ -332,7 +332,7 @@ int EditFileRec(int Area)
return 0;
case 1: E_STR( 6,16,44, area.Name, "The ^name^ for this area")
case 2: strcpy(tpath, area.Path);
strcpy(area.Path, edit_pth(7,16,64, area.Path, (char *)"The ^path^ for the files in this area"));
strcpy(area.Path, edit_pth(7,16,64, area.Path, (char *)"The ^path^ for the files in this area", 0775));
if (strlen(tpath) && strlen(area.Path) && strcmp(tpath, area.Path) && strcmp(tpath, CFG.ftp_base)) {
if ((dp = opendir(tpath)) == NULL) {
WriteError("Can't open directory %s", tpath);

View File

@@ -420,7 +420,7 @@ int EditFGrpRec(int Area)
strcpy(fgroup.BbsGroup, fgroup.Name);
break;
case 2: E_STR( 7,16,55,fgroup.Comment, "The ^description^ of this file group")
case 3: E_PTH( 8,16,64,fgroup.BasePath, "The ^base path^ for new created file areas")
case 3: E_PTH( 8,16,64,fgroup.BasePath, "The ^base path^ for new created file areas", 0775)
case 4: tmp = PickAka((char *)"10.1.4", TRUE);
if (tmp != -1)
fgroup.UseAka = CFG.aka[tmp];

View File

@@ -240,12 +240,12 @@ void e_global2(void)
switch(select_menu(7)) {
case 0: return;
case 1: E_PTH( 6,16,64, CFG.req_magic, "The path to the ^magic filerequest^ files.")
case 1: E_PTH( 6,16,64, CFG.req_magic, "The path to the ^magic filerequest^ files.", 0750)
case 2: E_STR( 7,16,64, CFG.dospath, "The translated ^DOS^ drive and path, empty disables translation")
case 3: E_PTH( 8,16,64, CFG.uxpath, "The translated ^Unix^ path.")
case 3: E_PTH( 8,16,64, CFG.uxpath, "The translated ^Unix^ path.", 0750)
case 4: E_BOOL(9,16, CFG.leavecase, "^Leave^ outbound flo filenames as is, ^No^ forces uppercase.")
case 5: E_PTH(10,16,64, CFG.ftp_base, "The ^FTP home^ directory to strip of the real directory")
case 6: E_PTH(11,16,64, CFG.alists_path, "The path where ^area lists^ and ^filebone lists^ are stored.")
case 5: E_PTH(10,16,64, CFG.ftp_base, "The ^FTP home^ directory to strip of the real directory", 0750)
case 6: E_PTH(11,16,64, CFG.alists_path, "The path where ^area lists^ and ^filebone lists^ are stored.", 0750)
case 7: E_STR(12,16,64, CFG.externaleditor,
"The full path and filename to the ^external message editor^ (blank=disable)")
}
@@ -296,17 +296,17 @@ void e_global(void)
switch(select_menu(12)) {
case 0: return;
case 1: E_PTH( 6,16,64, CFG.bbs_menus, "The path to the ^default menus^.")
case 2: E_PTH( 7,16,64, CFG.bbs_txtfiles, "The path to the ^default textfiles^.")
case 3: E_PTH( 8,16,64, CFG.bbs_macros, "The path to the ^default macro templates^.")
case 4: E_PTH( 9,16,64, CFG.bbs_usersdir, "The path to the ^users home^ directories.")
case 5: E_PTH(10,16,64, CFG.nodelists, "The path to the ^nodelists^.")
case 6: E_PTH(11,16,64, CFG.inbound, "The path to the ^inbound^ for unknown systems.")
case 7: E_PTH(12,16,64, CFG.pinbound, "The path to the ^nodelists^ for protected systems.")
case 8: E_PTH(13,16,64, CFG.outbound, "The path to the base ^outbound^ directory.")
case 9: E_PTH(14,16,64, CFG.msgs_path, "The path to the ^*.msgs^ directory.")
case 10:E_PTH(15,16,64, CFG.badtic, "The path to the ^bad tic files^.")
case 11:E_PTH(16,16,64, CFG.ticout, "The path to the ^outgoing TIC^ files.")
case 1: E_PTH( 6,16,64, CFG.bbs_menus, "The path to the ^default menus^.", 0750)
case 2: E_PTH( 7,16,64, CFG.bbs_txtfiles, "The path to the ^default textfiles^.", 0750)
case 3: E_PTH( 8,16,64, CFG.bbs_macros, "The path to the ^default macro templates^.", 0750)
case 4: E_PTH( 9,16,64, CFG.bbs_usersdir, "The path to the ^users home^ directories.", 0770)
case 5: E_PTH(10,16,64, CFG.nodelists, "The path to the ^nodelists^.", 0750)
case 6: E_PTH(11,16,64, CFG.inbound, "The path to the ^inbound^ for unknown systems.", 0750)
case 7: E_PTH(12,16,64, CFG.pinbound, "The path to the ^nodelists^ for protected systems.", 0750)
case 8: E_PTH(13,16,64, CFG.outbound, "The path to the base ^outbound^ directory.", 0750)
case 9: E_PTH(14,16,64, CFG.msgs_path, "The path to the ^*.msgs^ directory.", 0750)
case 10:E_PTH(15,16,64, CFG.badtic, "The path to the ^bad tic files^.", 0750)
case 11:E_PTH(16,16,64, CFG.ticout, "The path to the ^outgoing TIC^ files.", 0750)
case 12:e_global2();
s_global();
break;
@@ -1066,9 +1066,9 @@ void e_intmailcfg(void)
case 1: E_STR( 7,16,64, CFG.popnode, "The ^FQDN^ of the node where the ^POP3^ server runs.")
case 2: E_STR( 8,16,64, CFG.smtpnode, "The ^FQDN^ of the node where the ^SMTP^ server runs.")
case 3: if (CFG.newsfeed == FEEDRNEWS)
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path and filename to the ^rnews^ command."));
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path and filename to the ^rnews^ command.", 0775));
if (CFG.newsfeed == FEEDUUCP)
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path to the ^uucppublic^ directory."));
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path to the ^uucppublic^ directory.", 0775));
break;
case 4: if (CFG.newsfeed == FEEDINN)
strcpy(CFG.nntpnode, edit_str(10,16,64, CFG.nntpnode, (char *)"The ^FQDN^ of the node where the ^NNTP^ server runs."));

View File

@@ -350,9 +350,9 @@ int EditLangRec(int Area)
return 0;
case 1: E_UPS( 7,16,1, lang.LangKey, "The ^Key^ to select this language")
case 2: E_STR( 8,16,30,lang.Name, "The ^name^ of this language")
case 3: E_PTH( 9,16,64,lang.MenuPath, "The ^Menus Path^ of this language")
case 4: E_PTH( 10,16,64,lang.TextPath, "The ^Textfile path^ of this language")
case 5: E_PTH( 11,16,64,lang.MacroPath,"The ^Macro template path^ if this language")
case 3: E_PTH( 9,16,64,lang.MenuPath, "The ^Menus Path^ of this language", 0755)
case 4: E_PTH( 10,16,64,lang.TextPath, "The ^Textfile path^ of this language", 0755)
case 5: E_PTH( 11,16,64,lang.MacroPath,"The ^Macro template path^ if this language", 0755)
case 6: E_BOOL(12,16, lang.Available,"Is this language ^available^")
case 7: E_STR( 13,16,24,lang.Filename, "The ^Filename^ (without path) of the language datafile")
case 8: E_SEC( 14,16, lang.Security, "8.2. LANGUAGE SECURITY", s_lang)

View File

@@ -364,7 +364,7 @@ int EditMagicRec(int Area)
case MG_COPY:
case MG_UNPACK:
E_PTH(12,16,64, magic.Path, "The ^path^ to use")
E_PTH(12,16,64, magic.Path, "The ^path^ to use", 0750)
case MG_EXEC:
E_STR(12,16,64, magic.Cmd, "The ^command^ to execute")

View File

@@ -381,7 +381,7 @@ int EditMGrpRec(int Area)
}
break;
case 2: E_STR( 8,16,55, mgroup.Comment, "The ^desription^ for this message group")
case 3: E_PTH( 9,16,64, mgroup.BasePath, "The ^Base path^ where new JAM areas are created")
case 3: E_PTH( 9,16,64, mgroup.BasePath, "The ^Base path^ where new JAM areas are created", 0770)
case 4: E_SEC( 10,16, mgroup.RDSec, "9.1.4 MESSAGE GROUP READ SECURITY", MgScreen)
case 5: E_SEC( 11,16, mgroup.WRSec, "9.1.5 MESSAGE GROUP WRITE SECURITY", MgScreen)
case 6: E_SEC( 12,16, mgroup.SYSec, "9.1.6 MESSAGE GROUP SYSOP SECURITY", MgScreen)

File diff suppressed because it is too large Load Diff