diff --git a/config.h.in b/config.h.in index f2e32a2e..3e795144 100644 --- a/config.h.in +++ b/config.h.in @@ -1,33 +1,84 @@ /* config.h.in. Generated automatically from configure.in by autoheader. */ -/* acconfig.h for the MBSE BBS package */ -#define AUTHOR @COPYRIGHT@ +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to `int' if doesn't define. */ +#undef gid_t + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if your system has a working fnmatch function. */ +#undef HAVE_FNMATCH + +/* Define if your struct stat has st_blksize. */ +#undef HAVE_ST_BLKSIZE + +/* Define if you have the strftime function. */ +#undef HAVE_STRFTIME + +/* Define if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define if your struct tm has tm_zone. */ +#undef HAVE_TM_ZONE + +/* Define if you don't have tm_zone but do have the external array + tzname. */ +#undef HAVE_TZNAME + +/* Define if utime(file, NULL) sets file's timestamp to the present. */ +#undef HAVE_UTIME_NULL + +/* Define if you have . */ +#undef HAVE_VFORK_H + +/* Define if you have the vprintf function. */ +#undef HAVE_VPRINTF + +/* Define to `int' if doesn't define. */ +#undef mode_t + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define to `int' if doesn't define. */ +#undef pid_t + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define if the `setpgrp' function takes no argument. */ +#undef SETPGRP_VOID + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* Define if the `S_IS*' macros in do not work properly. */ +#undef STAT_MACROS_BROKEN + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if your declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define to `int' if doesn't define. */ +#undef uid_t + +/* Define vfork as fork if vfork does not work. */ +#undef vfork /* Memory debugging */ #undef MEMWATCH -/* Has strcasestr function */ -#undef HAVE_STRCASESTR - -/* Has mkstemp function */ -#undef HAVE_MKSTEMP - -/* If you have gettimeofday function */ -#undef HAVE_DECLARED_TIMEZONE -#undef HAVE_TM_GMTOFF - /* If you don't have pid_t */ #undef DONT_HAVE_PID_T -/* Believe ZFIN */ -#undef BELEIVE_ZFIN - -/* NOPROTO in lhash.h ??? */ -#undef NOPROTO - -/* No Hash Comp function */ -#undef NO_HASH_COMP - /* News postings */ #undef RESTAMP_FUTURE_POSTINGS #undef RESTAMP_OLD_POSTINGS @@ -56,266 +107,168 @@ #undef PAM #undef SW_CRYPT - -/* That's it */ - -/* Define if you have the `a64l' function. */ +/* Define if you have the a64l function. */ #undef HAVE_A64L -/* Define if you have the `c64i' function. */ +/* Define if you have the c64i function. */ #undef HAVE_C64I -/* Define if you have the header file. */ -#undef HAVE_CRYPT_H - -/* Define if you have the header file, and it defines `DIR'. */ -#undef HAVE_DIRENT_H - -/* Define if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define if you have the `fchmod' function. */ +/* Define if you have the fchmod function. */ #undef HAVE_FCHMOD -/* Define if you have the `fchown' function. */ +/* Define if you have the fchown function. */ #undef HAVE_FCHOWN -/* Define if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define if you have the `fdatasync' function. */ +/* Define if you have the fdatasync function. */ #undef HAVE_FDATASYNC -/* Define if your system has a working `fnmatch' function. */ -#undef HAVE_FNMATCH - -/* Define if you have the `fsync' function. */ +/* Define if you have the fsync function. */ #undef HAVE_FSYNC -/* Define if you have the `getcwd' function. */ +/* Define if you have the getcwd function. */ #undef HAVE_GETCWD -/* Define if you have the `gethostname' function. */ +/* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME -/* Define if you have the `gettimeofday' function. */ +/* Define if you have the gettimeofday function. */ #undef HAVE_GETTIMEOFDAY -/* Define if you have the `getwd' function. */ +/* Define if you have the getwd function. */ #undef HAVE_GETWD -/* Define if you have the header file. */ -#undef HAVE_GSHADOW_H - -/* Define if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if you have the `lckpwdf' function. */ +/* Define if you have the lckpwdf function. */ #undef HAVE_LCKPWDF -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the `mkdir' function. */ +/* Define if you have the mkdir function. */ #undef HAVE_MKDIR -/* Define if you have the `mkstemp' function. */ +/* Define if you have the mkstemp function. */ #undef HAVE_MKSTEMP -/* Define if you have the `mktime' function. */ +/* Define if you have the mktime function. */ #undef HAVE_MKTIME -/* Define if you have the header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define if you have the `putenv' function. */ +/* Define if you have the putenv function. */ #undef HAVE_PUTENV -/* Define if you have the `putpwent' function. */ +/* Define if you have the putpwent function. */ #undef HAVE_PUTPWENT -/* Define if you have the `regcmp' function. */ -#undef HAVE_REGCMP - -/* Define if you have the `regcomp' function. */ -#undef HAVE_REGCOMP - -/* Define if you have the header file. */ -#undef HAVE_REGEX_H - -/* Define if you have the `re_comp' function. */ +/* Define if you have the re_comp function. */ #undef HAVE_RE_COMP -/* Define if you have the `rmdir' function. */ +/* Define if you have the regcmp function. */ +#undef HAVE_REGCMP + +/* Define if you have the regcomp function. */ +#undef HAVE_REGCOMP + +/* Define if you have the rmdir function. */ #undef HAVE_RMDIR -/* Define if you have the `select' function. */ +/* Define if you have the select function. */ #undef HAVE_SELECT -/* Define if you have the header file. */ -#undef HAVE_SHADOW_H - -/* Define if you have the `socket' function. */ +/* Define if you have the socket function. */ #undef HAVE_SOCKET -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the `strcasestr' function. */ +/* Define if you have the strcasestr function. */ #undef HAVE_STRCASESTR -/* Define if you have the `strcspn' function. */ +/* Define if you have the strcspn function. */ #undef HAVE_STRCSPN -/* Define if you have the `strdup' function. */ +/* Define if you have the strdup function. */ #undef HAVE_STRDUP -/* Define if you have the `strerror' function. */ +/* Define if you have the strerror function. */ #undef HAVE_STRERROR -/* Define if you have the `strftime' function. */ -#undef HAVE_STRFTIME - -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define if you have the header file. */ -#undef HAVE_STRING_H - -/* Define if you have the `strspn' function. */ +/* Define if you have the strspn function. */ #undef HAVE_STRSPN -/* Define if you have the `strstr' function. */ +/* Define if you have the strstr function. */ #undef HAVE_STRSTR -/* Define if you have the `strtol' function. */ +/* Define if you have the strtol function. */ #undef HAVE_STRTOL -/* Define if you have the `strtoul' function. */ +/* Define if you have the strtoul function. */ #undef HAVE_STRTOUL -/* Define if `st_blksize' is member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_BLKSIZE - -/* Define if `tm_zone' is member of `struct tm'. */ -#undef HAVE_STRUCT_TM_TM_ZONE - -/* Define if your `struct stat' has `st_blksize'. Deprecated, use - `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ -#undef HAVE_ST_BLKSIZE - -/* Define if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define if you have the header file, and it defines `DIR'. */ -#undef HAVE_SYS_DIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_FILE_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define if you have the header file, and it defines `DIR'. */ -#undef HAVE_SYS_NDIR_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_RESOURCE_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_VFS_H - -/* Define if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define if you have the header file. */ -#undef HAVE_TERMIOS_H - -/* Define if your `struct tm' has `tm_zone'. Deprecated, use - `HAVE_STRUCT_TM_TM_ZONE' instead. */ -#undef HAVE_TM_ZONE - -/* Define if you don't have `tm_zone' but do have the external array `tzname'. - */ -#undef HAVE_TZNAME - -/* Define if you have the header file. */ -#undef HAVE_ULIMIT_H - -/* Define if you have the `uname' function. */ +/* Define if you have the uname function. */ #undef HAVE_UNAME -/* Define if you have the header file. */ +/* Define if you have the header file. */ +#undef HAVE_CRYPT_H + +/* Define if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#undef HAVE_GSHADOW_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define if you have the header file. */ +#undef HAVE_REGEX_H + +/* Define if you have the header file. */ +#undef HAVE_SHADOW_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_VFS_H + +/* Define if you have the header file. */ +#undef HAVE_SYSLOG_H + +/* Define if you have the header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the header file. */ +#undef HAVE_ULIMIT_H + +/* Define if you have the header file. */ #undef HAVE_UNISTD_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_USERSEC_H -/* Define if you have the header file. */ +/* Define if you have the header file. */ #undef HAVE_UTIME_H -/* Define if `utime(file, NULL)' sets file's timestamp to the present. */ -#undef HAVE_UTIME_NULL - -/* Define if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - /* Name of package */ #undef PACKAGE -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* Define if the `setpgrp' function takes no argument. */ -#undef SETPGRP_VOID - -/* Define if the `S_IS*' macros in do not work properly. */ -#undef STAT_MACROS_BROKEN - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define if your declares `struct tm'. */ -#undef TM_IN_SYS_TIME - /* Version number of package */ #undef VERSION -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `int' if doesn't define. */ -#undef gid_t - -/* Define to `int' if does not define. */ -#undef mode_t - -/* Define to `long' if does not define. */ -#undef off_t - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned' if does not define. */ -#undef size_t - -/* Define to `int' if doesn't define. */ -#undef uid_t - -/* Define as `fork' if `vfork' does not work. */ -#undef vfork diff --git a/mbsebbs/menu.c b/mbsebbs/menu.c index afa4f7f2..8a37ab9b 100644 --- a/mbsebbs/menu.c +++ b/mbsebbs/menu.c @@ -133,11 +133,16 @@ void menu() strcpy(Menus[0], CFG.default_menu); } else { /* - * Do all autoexec menus first + * Display Menu Text Fields and Perform all autoexec menus in order of menu file */ while (fread(&menus, sizeof(menus), 1, pMenuFile) == 1) { - if (menus.AutoExec && Access(exitinfo.Security, menus.MenuSecurity) && (UserAge >= menus.Age)) - DoMenu(menus.MenuType); + if ( Access(exitinfo.Security, menus.MenuSecurity) && (UserAge >= menus.Age)){ + if ( menus.AutoExec ) { + DoMenu( menus.MenuType ); + } else { + DisplayMenu( ); + } + } } /* @@ -240,6 +245,9 @@ void DoMenu(int Type) TimeCheck(); switch(Type) { + case 0: /* Display Prompt Line Only */ + break; + case 1: /* Goto another menu */ strncpy(Menus[MenuLevel], menus.OptionalData, 14); @@ -670,3 +678,78 @@ void DoMenu(int Type) free(temp); } +void DisplayMenu ( void ) { + + /* + * Display the Menu Display Text to the User, + * if the sysop puts a ';' (semicolon) at the end of the menu prompt, + * the CR/LR combination will not be sent + */ + + int maxdpos; + int dpos; + int escaped ; + int skipCRLF ; + int highlight ; + + /* Anything to process, if not; save CPU time, return */ + if ( strlen( menus.Display ) == 0 ) { + return; + } + + /* Send Display string, formated with ANSI codes as required */ + /* --- basically this with brains: printf("%s\n", menus.Display); */ + maxdpos = strlen(menus.Display); + escaped = 0; + skipCRLF = 0; + highlight = 0; + + colour( menus.ForeGnd, menus.BackGnd ); + + for ( dpos = 0; dpos < maxdpos ; dpos++ ){ + + switch ( menus.Display[ dpos ] ) { + + case ';': /* Semicolon, if not escaped and last char, not CRLF at end of line */ + if ( ( dpos + 1 ) == maxdpos ) { + skipCRLF=1; + } else { + printf("%c",menus.Display[ dpos ]); + } + break; + + case '\\': if ( !escaped ) { + escaped = 1; + } else { + escaped = 0; + printf("%c",menus.Display[ dpos ]); + } + break; + + case '^': /* Highlight Toggle */ + + if ( !escaped ) { + if ( highlight == 0 ) { + highlight = 1; + colour( CFG.HiliteF, CFG.HiliteB ); + } else { + highlight = 0 ; + colour( menus.ForeGnd, menus.BackGnd ); + } + } else { + escaped=0; + printf("%c",menus.Display[ dpos ]); + } + break; + + default: /* all other characters */ + printf("%c",menus.Display[ dpos ]); + } + + } + + if ( !skipCRLF ) { + printf("\n"); + } + +} diff --git a/mbsebbs/menu.h b/mbsebbs/menu.h index a925d779..2661315f 100644 --- a/mbsebbs/menu.h +++ b/mbsebbs/menu.h @@ -4,6 +4,7 @@ void InitMenu(void); void menu(void); void DoMenu(int); +void DisplayMenu(void); #endif diff --git a/mbsetup/Makefile.in b/mbsetup/Makefile.in index 23fd5b20..377818b9 100644 --- a/mbsetup/Makefile.in +++ b/mbsetup/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -109,7 +109,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best DEP_FILES = .deps/grlist.P .deps/ledit.P .deps/m_archive.P \ .deps/m_bbs.P .deps/m_domain.P .deps/m_farea.P .deps/m_fdb.P \ diff --git a/mbsetup/ledit.c b/mbsetup/ledit.c index 512215e5..5266d66a 100644 --- a/mbsetup/ledit.c +++ b/mbsetup/ledit.c @@ -1590,6 +1590,8 @@ char *getmenutype(int val) case 505: return (char *)"Print a BBS"; case 506: return (char *)"Search for a BBS"; + case 999: return (char *)"Display Text Only"; + default: return (char *)"Unknown menu"; } } diff --git a/mbsetup/m_menu.c b/mbsetup/m_menu.c index db12d4d8..41881592 100644 --- a/mbsetup/m_menu.c +++ b/mbsetup/m_menu.c @@ -199,15 +199,17 @@ int GetMenuType(void) mvprintw(10, 6, "4. User setting menus"); mvprintw(11, 6, "5. Oneliner menus"); mvprintw(12, 6, "6. BBS List menus"); + mvprintw(13, 6, "7. Display Text Only"); - switch (select_menu(6)) { + switch (select_menu(7)) { case 1: return GetSubmenu(1, 25); case 2: return GetSubmenu(101, 19); case 3: return GetSubmenu(201, 20); case 4: return GetSubmenu(301, 16); case 5: return GetSubmenu(401, 5); case 6: return GetSubmenu(501, 6); - default: return 0; + case 7: return 999; + default: return 0; } } @@ -304,7 +306,7 @@ void EditMenu(char *Name) offset = ((o + i) - 1) * sizeof(menus); fseek(tmp, offset, SEEK_SET); fread(&menus, sizeof(menus), 1, tmp); - if ((menus.MenuKey[0]) || menus.AutoExec) { + if (menus.MenuType || menus.AutoExec) { set_color(CYAN, BLACK); mvprintw(y, 5, "%3d. ", o + i); if (menus.AutoExec) { @@ -313,8 +315,12 @@ void EditMenu(char *Name) set_color(CYAN, BLACK); } else mvprintw(y, 10, "%1s", menus.MenuKey); - mvprintw(y, 12, "%-29s %5d %s", menus.TypeDesc, - menus.MenuSecurity.level, menus.OptionalData); + if (menus.MenuType == 999 ){ + mvprintw(y, 12, "%-29s %5d %s", menus.TypeDesc, + menus.MenuSecurity.level, menus.Display); + } else + mvprintw(y, 12, "%-29s %5d %s", menus.TypeDesc, + menus.MenuSecurity.level, menus.OptionalData); } else { set_color(LIGHTBLUE, BLACK); mvprintw(y, 5, "%3d.", o + i); @@ -337,7 +343,7 @@ void EditMenu(char *Name) } else { fseek(tmp, 0, SEEK_SET); while (fread(&menus, sizeof(menus), 1, tmp) == 1) { - if (menus.MenuKey[0] || menus.AutoExec) + if (menus.MenuType || menus.AutoExec) fwrite(&menus, sizeof(menus), 1, fil); } fclose(fil);