// REMEMBER - maybe change file opening mode to a for append, not w for // overwrite for final compilation ???? mmmm - maybe // TOESREQ.SLT - written by Allan Marillier Feb/March/April 1991 // this script file emulates the menus on Golden City OPUS, and allows // the user to simulate what is required. This is then written to file // TOES.REQ and will be automatically sent by the script TOES // This assumes Xpert mode in Silver Express, and Novice mode in OPUS // as well as More set to NO in OPUS to keep scrolling, not pause for // each screen. This could be changed to read from a config file .... but // that's a future exercise, as is adding a read from config facility to TOES // to allow Xpert/novice mode wherever // The relevant prompts, and responses are then written to files TOES.REQ // which is used from within the script TOES.SLT/SLC // Prototypes : (not really, but C style prototyping does clarify matters) // main() COMPLETE // the main function // bulletin_menu() COMPLETE // this function emulates the opening bulletin menu, AFTER logon is complete // main_menu() COMPLETE // this function emulates the main menu // message_menu() COMPLETE // this function emulates the message menu // NOTE - as Xpress itself is a mail package system, // most mail menu facilities are NOT supported here. Only AREA, LIST, // SCAN and INQUIRE will be supported. // file_menu() COMPLETE // this function emulates the file menu // statistics() COMPLETE // this function emulates the statistics option // config_menu() COMPLETE // this function emulates the change setup menu // list_users() COMPLETE // this function emulates the list users facility // version() COMPLETE // this function emulates the OPUS version facility // xpress() COMPLETE // this function emulates the Silver Express opening screen // config_password() COMPLETE // this function emulates the change password facility // config_expert_mode() COMPLETE // this function emulates the config help level / expert mode etc // config_nulls() COMPLETE // this function emulates the null setting facility // config_width() COMPLETE // this function emulates the width setting facility // config_length() COMPLETE // this function emulates the change length facility // config_tabs() COMPLETE // this function emulates the config tabs facility // config_more() COMPLETE // this function emulates the config more facility // config_video COMPLETE // this function emulates the video type change facility // config_screen_clear() COMPLETE // this function emulates the config screen clear facility // config_fs_edit() COMPLETE // this function emulates the config full screen edit facility // config_IBM_graphics() COMPLETE // this function emulates the config IBM graphics facility // config_city() COMPLETE // this function emulates the config city facility // config_user_list() COMPLETE // this function emulates the config user list facility // config_language() COMPLETE // this function emulates the config language facility // bulletin_display() COMPLETE // this function emulates displaying a bulletin // message_area() COMPLETE // this function emulates the message area change facility // message_list() COMPLETE // this function emulates the message list facility // message_scan() COMPLETE // this function emulates the message area scan facility // message_inquire() COMPLETE // this function emulates the message area inquire facility // message_area_show() COMPLETE // this function displays the message areas // file_area() COMPLETE // this function simulates the file area change facility // file_area_show() COMPLETE // this function displays the available file areas // file_locate() COMPLETE // this function simulates the file area locate facility // file_titles() COMPLETE // this function emulates the file titles display facility // file_type() COMPLETE // this function emulates the type a file function // file_upload() COMPLETE // this function emulates the file upload facility // file_download() COMPLETE // this function emulates the file download facility // just one problem - it doesn't recognise Enter, and convert to Q to quit // from selecting the file transfer protocol // file_statistics() COMPLETE // this function emulates the file statistics facility // file_raw() COMPLETE // this function emulates the file raw list facility // file_contents() COMPLETE // this function emulates the file display contents facility // just one problem - the contents door asks "More ? Y/n" The script // only caters for one more screen full of info // xpress_main() COMPLETE // this function emulates the Silver Express main menu // xpress_config() COMPLETE // this function emulates the Silver Express config menu // xpress_statistics() COMPLETE // this function emulates the silver express statistics facility // xpress_upload() NOT USED AT PRESENT // this function indicates non support of xpress upload // xpress_download() NOT USED AT PRESENT // this function indicates non support of xpress download // xpress_config_select() COMPLETE // this function emulates the silver express config message select facility // xpress_c_s_l() COMPLETE // this function emulates the sx function to list all areas // xpress_c_s_d() COMPLETE // this function emulates sx's detailed area list // xpress_c_s_s() COMPLETE // this function emulates sx's list selected areas facility // xpress_c_s_f() COMPLETE // xpress_c_s_c() COMPLETE // this function emulates sx's message area change message pointer facility // xpress_config_keywords() COMPLETE // this function emulates the keyword selection facility // xpress_config_k_l() COMPLETE // this function lists defined keywords // xpress_config_transfer() COMPLETE // this function emulates setting the file transfer protocol // xpress_config_archive() COMPLETE // though Dave only supports ZModem, this function emulates the archive // xpress_config_graphics() COMPLETE // this function emulates toggling graphics mode on /off // xpress_config_menu_hotkey() COMPLETE // this function emulates toggling hotkeys on /off // xpress_config_expert() COMPLETE // this function emulates toggling expert / novice mode // xpress_config_last() COMPLETE // this function emulates sx's last usage date // xpress_config_your() COMPLETE // this function emulates sx's receive own mail facility // wait_for_enter() COMPLETE // this function causes a wait for Enter to be performed // msg_fil_area() COMPLETE // this function is used by both message_area and file_area, to eliminate // duplication of common code used in accepting an area number, or // accepting N, n, P, or p to move the area pointer. It uses the global // variable area_type as either "f" or "m" to determine what it's working on // get_protocol() COMPLETE // this function gets the file transfer protocol - to avoid duplication // of code in both file_upload and file_download // valid_number(int lower, int upper) COMPLETE // function to get a number between the upper and lower limits passed // s_80 and number are global variables, so I don't need to return them // valid_choice(int one, int two, int thr, int fou, int fiv) COMPLETE // function to get a Y or N response. // s_10 is a global variable, so doesn't need to be returned // global variable definitions str s_80[80]; str buffer[80]; str s_10[10]; str prompt[80]; str main_prompt[11] = "Select:^M^J"; str bulletin_prompt[11] = "Select:^M^J"; str file_prompt[11] = "Select:^M^J"; str message_prompt[29] = "Message number or SELECT:^M^J"; str config_prompt[12] = "Select:^M^J"; str xpress_x_prompt[28] = "Enter C, D, U, S, H, Q ?^M^J"; str xpress_n_prompt[20] = "Enter Selection:^M^J"; str xpress_prompt[28] = "Enter C, D, U, S, H, Q ?^M^J"; int char; int kounter; int number; int m_area_number = 1; int f_area_number = 1; int toes_req_file; str area_type[1] = "f"; int ok = 0; int protocol = 0; main() { toes_req_file = fopen("TOES.REQ","w"); // make the w into a for final _scr_chk_key = 0; // make Telix ignore keyboard for Esc to abort script main_menu(); fclose(toes_req_file); _scr_chk_key = 1; // reset Esc checking exittelix(); // return to DOS } bulletin_menu() // this function emulates the opening bulletin menu, AFTER logon is complete // - ie. the one with all the bulletins { do { clear_scr(); prints(" Bulletins -- Bulletin 3 updated 24 December 1990 Please Read."); prints(" ================"); prints("Allan, Please select the bulletin that you wish to read..."); prints(" H)elp on using the Opus Full Screen Editor - OpEd"); prints(" E)quipment used on-line"); prints(" 1) The subscription system"); prints(" 2) Hard drive space and new files! Updated 28 April 1989"); prints(" 3) Sysops' wafflings (or messages from the Sysop!)"); prints(" 4) To new FidoNet Sysops' - How to get a node number"); prints(" 5) Special offer on modems to BBS users."); prints(" "); prints(" You may select this Bulletin Menu from the Main Menu as well."); prints(" "); prints(" Q)uit to BBS"); prints(" "); prints("Select:"); char = 0; char = toupper(inkeyw()); if ( (char >= 49) && (char <= 57) ) // dave only uses 1 - 5, E, H and Q { // selected 1 - 9 fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(bulletin_prompt,toes_req_file); bulletin_display(); continue; } if (char == 69) // Pressed E { fputs("E",toes_req_file); fputs("^M^J",toes_req_file); fputs(bulletin_prompt,toes_req_file); bulletin_display(); continue; } if (char == 72) // Pressed H { clear_scr(); prints("On line help displays are not supported from here."); delay(20); continue; } if (char == 81) // pressed Q { fputs("Q",toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); break; } } while (1); // loop forever, or until Q is entered to exit } // end function bulletin_menu main_menu() // this function emulates the main menu { do { clear_scr(); for (kounter = 0; kounter <= 9; kounter = kounter +1) prints(""); prints("MAIN: "); prints("M)essage section F)ile Section G)oodbye (logoff) S)tatistics"); prints("B)ulletin O)pus Users Guide C)hange setup L)istUsers"); prints("V)ersion E)xpress Reader ?)HELP"); prints("Select: "); char = 0; char = toupper(inkeyw()); if (char == 27) // Pressed Esc to exit { fputs("$FINISHED$^M^J",toes_req_file); break; // return to main(), then end the script } if (char == 77) // Pressed M { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(message_prompt,toes_req_file); message_menu(); continue; } if (char == 70) // Pressed F { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); file_menu(); continue; } if (char == 71) // Pressed G { clear_scr(); prints("The Goodbye facility is not supported in request files, as the"); prints(" TOES script will take care of the goodbye anyway."); delay(20); continue; } if (char == 83) // Pressed S { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); statistics(); delay(20); continue; } if (char == 66) // Pressed B { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(bulletin_prompt,toes_req_file); bulletin_menu(); continue; } if (char == 79) // Pressed O { clear_scr(); prints("OPUS on line help not supported. For online help, "); prints(" connect online and read it or download the relevant doc files."); delay(20); continue; } if (char == 67) // Pressed C { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); config_menu(); continue; } if (char == 76) // Pressed L { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("or type a partial name to match:^M^J",toes_req_file); list_users(); continue; } if (char == 86) // Pressed V { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); version(); delay(20); continue; } if (char == 69) // Pressed E { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(xpress_prompt,toes_req_file); xpress(); continue; } if (char == 63) // Pressed ? { clear_scr(); prints("On line help displays are not supported from here."); delay(20); continue; } } while (1); // loop forever, or until exit (via Esc) } // end function main_menu message_menu() // this function emulates the message menu { do { s_80 = "Area "; itos(m_area_number,s_10); strcat(s_80,s_10); strcat(s_80," ... ************** MESSAGE AREA NAME *****"); clear_scr(); prints("^M^J^M^J"); prints("[161] Highest: 161 "); prints(s_80); prints("A)rea M)AIN MENU N)ext read msg P)rior msg"); prints("C)urrent E)nter message R)eply =)read non-stop"); prints("-)read original +)read reply L)ist (brief S)can"); prints("I)nquire G)oodbye (logoff) K)ill message U)pload"); prints("?)HELP"); prints(""); prints("Message number or SELECT:"); prints(""); prints(""); char = 0; char = toupper(inkeyw()); if (char == 77) // Pressed M { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); break; } if (char == 65) // Pressed A { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Message area [Area #, N)ext, P)rior, ?)list]:^M^J",toes_req_file); message_area(); continue; } if (char == 76) // Pressed L { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Start with which message# ? 1^M^J",toes_req_file); message_list(); continue; } if (char == 83) // Pressed S { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(message_prompt,toes_req_file); message_scan(); continue; } if (char == 73) // Pressed I { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Type what you want to find: ",toes_req_file); message_inquire(); continue; } } while (1); // loop forever, or until exit (via M) } // end function message_menu file_menu() // this function emulates the file menu { do { s_80 = "Area "; itos(f_area_number,s_10); strcat(s_80,s_10); strcat(s_80," ... ************** FILE AREA NAME *****"); clear_scr(); prints("The FILES Section."); prints(s_80); prints("A)rea Change L)ocate File F)ile titles T)ype (show)"); prints("G)oodbye U)pload D)ownload S)tatistics"); prints("M)ain menu R)aw dir display C)ontents ?)HELP"); prints("Select:"); char = 0; char = toupper(inkeyw()); if (char == 77) // Pressed M { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); break; } if (char == 65) // Pressed A { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("File area [Area #, N)ext, P)rior, ?)list]:^M^J",toes_req_file); file_area(); continue; } if (char == 76) // Pressed L { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Locate what file (or description)?^M^J",toes_req_file); file_locate(); continue; } if (char == 70) // Pressed F { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); file_titles(); continue; } if (char == 84) // Pressed T { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Display what file? ^M^J",toes_req_file); file_type(); continue; } if (char == 71) // Pressed G { clear_scr(); prints("The Goodbye facility is not supported in request files, as the"); prints(" TOES script will take care of the goodbye anyway."); delay(20); continue; } if (char == 85) // Pressed U { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Select:^M^J",toes_req_file); file_upload(); continue; } if (char == 68) // Pressed D { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Select:^M^J",toes_req_file); file_download(); continue; } if (char == 83) // Pressed S { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); file_statistics(); continue; } if (char == 82) // Pressed R { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("File name mask:^M^J",toes_req_file); file_raw(); continue; } if (char == 67) // Pressed C { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Type the name of an archive:^M^J",toes_req_file); file_contents(); continue; } if (char == 63) // Pressed ? { clear_scr(); prints("File menu help not supported. For online help, "); prints(" connect online and read it or download the relevant doc files."); delay(20); continue; } } while (1); // loop forever, or until exit (via M) } // end function file_menu statistics() // this function emulates the statistics option { clear_scr(); prints("Your statistics for Wed Feb 27 14:01:51 1991"); prints(" "); prints("Last Time online 27-Feb-91 10:51am"); prints("TIME"); prints(" Time on line, this call................. 2 minutes"); prints(" Time remaining for this call............ 87 minutes"); prints(" Time of previous calls today............ 13 minutes"); prints(" Calls to date........................... 552"); prints("FILES"); prints(" UL (from you)........................... 4253 k-bytes"); prints(" DL (to you)............................. 22333 k-bytes"); prints(" Download available...................... 600 k-bytes"); prints("<*>"); prints("Listed in User list: YES List City: YES Last time on: YES"); prints("Current Language: ENGLISH"); delay(20); } // end function statistics config_menu() // this function emulates the change setup menu { do { clear_scr(); prints("The CHANGE SETUP Section"); prints("^M^J^M^J"); prints("City...............................Johannesburg"); prints(""); prints("Help........NOVICE Nulls.......0"); prints("scrn.Width..79 scrn.Length 24 Exp. Tabs...YES"); prints("More?.......NO Video mode..TTY Scrn. clear YES"); prints("IBM Chars...YES Talker......NO"); prints("Listed in User list: YES List City: YES Last time on: YES"); prints("Current Language: ENGLISH"); prints("^M^J^M^J"); prints("CHANGE :"); prints("P)assword H)elp Level N)ulls W)idth"); prints("L)ength T)abs M)ore V)ideo mode"); prints("S)creen clear F)ull-scrn edit I)BM graphics C)ity"); prints("U)ser List A)lterLanguage Q)uit section ?)HELP"); prints("Select:"); char = 0; char = toupper(inkeyw()); if (char == 81) // Pressed Q { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); break; } if (char == 80) // Pressed P { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Current password: ^M^J",toes_req_file); config_password(); continue; } if (char == 72) // Pressed H { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Help level: ^M^J",toes_req_file); config_expert_mode(); continue; } if (char == 78) // Pressed N { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Nulls (0-200): ^M^J",toes_req_file); config_nulls(); continue; } if (char == 87) // Pressed W { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Monitor width (20-132): ^M^J",toes_req_file); config_width(); continue; } if (char == 76) // Pressed L { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("What number is on the TOP of your display?^M^J",toes_req_file); config_length(); continue; } if (char == 84) // Pressed T { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); clear_scr(); prints(""); delay(10); // config_tabs(); // function call not necessary - simple toggle from opus continue; } if (char == 77) // Pressed M { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); clear_scr(); prints(""); delay(10); // config_more(); // function call not necessary - simple toggle from opus continue; } if (char == 86) // Pressed V { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); config_video(); continue; } if (char == 83) // Pressed S { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); clear_scr(); prints(""); delay(10); // config_screen_clear(); // function call not necessary - simple toggle from opus continue; } if (char == 70) // Pressed F { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); clear_scr(); prints(""); config_fs_edit(); // function call not necessary - simple toggle from opus // PROVIDED that graphics and screen clear are set to YES continue; } if (char == 73) // Pressed I { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); clear_scr(); prints(""); delay(10); // config_IBM_graphics(); // function call not necessary - simple toggle from opus continue; } if (char == 67) // Pressed C { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("City/state:^M^J",toes_req_file); config_city(); continue; } if (char == 85) // Pressed U { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Select:^M^J",toes_req_file); config_user_list(); continue; } if (char == 65) // Pressed A { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Press ENTER to continue^M^J",toes_req_file); config_language(); continue; } if (char == 63) // Pressed ? { clear_scr(); prints("On line help displays are not supported from here."); delay(20); continue; } } while (1); // loop forever, or until exit (via Q) } // end function config_menu list_users() // this function emulates the list users facility { clear_scr(); prints("Press ENTER to list all,"); prints("or type a partial name to match: "); gets(s_80,80); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs("Press ENTER to continue^M^J",toes_req_file); prints(""); prints("Allan Marillier .......... Johannesburg ............. Wed Feb 27 10:51:29 1991"); prints("Allan Wright ............. Johannesburg ............. Mon Feb 25 20:27:45 1991"); prints("Allan Holman ............. Pretoria ................. Mon Feb 04 15:12:24 1991"); prints("Allan Levin .............. Jhb, Tvl ................. Tue Jan 29 17:31:45 1991"); prints("Press ENTER to continue"); fputs("$ENTER$^M^J",toes_req_file); fputs(main_prompt,toes_req_file); wait_for_enter(); } // end function list_users version() // this function emulates the OPUS version facility { clear_scr(); prints("The OPUS Computer-Based Conversation System, v1.14"); prints("Copyright 1986,1989,1990, Wynn Wagner III."); prints("All rights reserved."); prints("A Presentation of The Not Ready For Mainframe Players; Dallas & Elsewhere."); prints("See documentation for license information."); prints(""); prints("Computer: AT-class"); prints("OS: DOS 3.30"); prints(""); prints("FOSSIL: Ray Gwinn's double aught buckshot driver, X00 V1.24"); prints(""); prints("Version by Doug Boone, with Bob Davis, Rick Huebner, Tom Kashuba, "); prints("Vince Perriello and George Stanislav."); // return to re-display main menu } // end function version xpress() // this function emulates the Silver Express opening screen { clear_scr(); prints(""); prints("Please wait......."); prints(""); prints("And please do not drop carrier until you are back in OPUS...."); prints(""); prints("PLEASE RE-SELECT **ALL** your message areas again. I have been rearranging"); prints("the message areas, as well as pruning."); prints(""); prints(" Thanks -=-=- Dave Pedler"); prints("Silver Xpress [Opus110] 2.27F2.08á (c) copyright 1988-90 Santronics Software"); prints(""); prints(""); prints("* Registered Copy of Silver Xpress * 2.27F2.08á"); prints("Last Xpress Mail Usage/Download Date : Feb 27,1991 10:51:18am"); prints(""); delay(20); xpress_main(); } // end function xpress config_password() // this function emulates the change password facility { clear_scr(); printsc("Current password: "); s_80 = ""; do { gets(s_80,80); prints("^M^J"); } while (strlen(s_80) == 0); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs("New password: ^M^J",toes_req_file); printsc("New password: "); do { gets(s_80,80); prints("^M^J"); } while (strlen(s_80) == 0); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs("Press ENTER to continue^M^J",toes_req_file); printsc("Your password is '"); printsc(s_80); prints("'."); // substitute the new password here prints("Press ENTER to continue"); fputs("$ENTER$^M^J",toes_req_file); fputs(config_prompt,toes_req_file); wait_for_enter(); } // end function config_change config_expert_mode() // this function emulates the config help level / expert mode etc. { prints("Set Help Levels"); prints("^M^J^M^J"); prints("N)OVICE ...........................full menus"); prints("R)EGULAR ...........................brief menus"); prints("E)XPERT ...........................no menus"); prints(""); prints("Help level:"); do { char = toupper(inkeyw()); } while (char != 'N' && char != 'R' && char != 'E'); if (char == 'R') config_prompt = "CHANGE : [P H N W L T M V S F I C U A Q ?]:^M^J"; fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_expert_mode config_nulls() // this function emulates the null setting facility { prints("Nulls (0-200): "); valid_number(0,200); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_nulls config_width() // this function emulates the width setting facility { prints("Monitor width (20-132): "); valid_number(20,132); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs("Is the `X' at the far left on a line? [Y,n]? ^M^J",toes_req_file); prints(""); prints("-------------------------------------------------------------------------------X"); prints("---------"); prints("Is the `X' at the far left on a line? [Y,n]? "); valid_choice('Y','N','','',''); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_width config_length() // this function emulates the change length facility { prints("77"); prints("78"); prints("79"); prints("80"); prints("81"); prints("82"); prints("83"); prints("84"); prints("85"); prints("86"); prints("87"); prints("88"); prints("89"); prints("90"); prints("91"); prints("92"); prints("93"); prints("94"); prints("95"); prints("96"); prints("97"); prints("98"); prints("What number is on the TOP of your display? "); do { gets(s_10,3); number = stoi(s_10); } while (number <= 0 && number >= 500); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_length config_tabs() // this function emulates the config tabs facility { // echo nothing - simply toggle } // end functon config_tabs config_more() // this function emulates the config more facility { // echo nothing - simply toggle } // end functon config_more config_video() // this function emulates the video type change facility { prints("VIDEO"); prints(""); prints(""); prints("P)lain..............................TTY"); prints("A)NSI...............................VT100"); prints("O)pus...............................AVATAR"); prints("Select:"); valid_choice('P','A','O','',''); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_video config_screen_clear() // this function emulates the config screen clear facility { // echo nothing - simply toggle } // end function config_screen_clear config_fs_edit() // this function emulates the config full screen edit facility { prints("`G)raphics' & `S)crn.clr' required. Press ENTER to continue"); prints("^M^J^M^J"); prints(""); prints("< Screen clear are active or not. Full screen edit will>"); prints("< automatically be toggled if at all possible, otherwise you>"); prints("< will find the above message.>"); wait_for_enter(); // wait for input. Also check what happens when graphics IS selected } // end function config_fs_edit config_IBM_graphics() // this function emulates the config IBM graphics facility { // echo nothing - simply toggle } // end function config_IBM_graphics config_city() // this function emulates the config city facility { prints("City/state:"); do { gets(s_80,80); } while (strlen(s_80) < 5); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_city config_user_list() // this function emulates the config user list facility { ok = 0; do { prints(""); prints("User List"); prints(""); prints("Listed in User list: YES List City: YES Last time on: YES"); prints(""); prints("I)nclude............................Include me in the list"); prints("C)ity...............................List City"); prints("T)ime...............................List last time online"); prints("Select:"); valid_choice('I','C','T',27,13); // allow Esc if (s_10 == "^^27" || s_10 == "^^13") { ok = 1; fputs("$ENTER$^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } else { clear_scr(); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs("Select:^M^J",toes_req_file); if (s_10 == "^^73") prints(""); else if (s_10 == "^^67") prints(""); else prints(""); } } while (ok == 0); } // end function config_user_list config_language() // this function emulates the config language facility { prints("^M^J^M^J"); prints("User Language:"); prints(""); prints("No other language available"); prints("Press ENTER to continue"); wait_for_enter(); fputs("$ENTER$^M^J",toes_req_file); fputs(config_prompt,toes_req_file); } // end function config_language bulletin_display() // this function emulates displaying a bulletin { prints("^M^J^M^J"); prints("The subscription system"); prints(""); prints(" Sysop's Address, etc."); prints("As of 1st January 1988, this FIDO BBS is a restricted BBS. Please"); prints("Download and read the file 'BULLETIN.4' for more details. This file is foud"); prints("in file area 1."); prints(""); prints("This is a sample bulletin - an extract taken from a real one."); prints("This is NOT what you will see .... simply an example."); prints("Press ENTER to continue"); wait_for_enter(); fputs("$ENTER$^M^J",toes_req_file); fputs(main_prompt,toes_req_file); } // end function bulletin_display message_area() // this function emulates the message area change facility { area_type = "m"; msg_fil_area(); } // end message_area message_list() // this function emulates the message area list facility { prints("Start with which message# ? 1"); number = 0; do { kounter = gets(s_10,3); number = stoi(s_10); if (number == 0) { number = 1; s_10 = "1"; } if (number != 0) { fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs(message_prompt,toes_req_file); break; } } while (number == 0); prints("^M^J^M^J^M^J"); prints(s_80); // this string is made up of the correct area number prints(""); prints("#138 18-Feb-91 10:24am REC'D is from Jose Deavila to Franz Tomasek"); prints("#146 10-Feb-91 04:38pm REC'D is from Russell Wood to Kalle Pihlajasaari"); prints("#152 22-Feb-91 10:48am REC'D is from Ken Ironside to Dave Pedler"); prints("#154 24-Feb-91 09:47am REC'D is from Mark Stayt to Jose Deavila"); prints("#156 25-Feb-91 02:53pm is from Mimi Milstein to Lynn Fletcher"); prints("#158 26-Feb-91 03:32pm PVT REC'D is TO you from Mimi Milstein"); prints("#161 27-Feb-91 07:44am PVT REC'D is FROM you to Mimi Milstein"); prints("^M^J^M^J"); delay(20); } // end message_list message_scan() // this function emulates the message area scan facility { prints("Scanning messages in ALL areas. Control-K aborts."); prints("Use `SV' (scan verbose) for more detail."); prints("^M^J^M^J"); prints("Area 1 ... Replies to log-off messages and more"); prints(""); prints("#74 31-Jan-91 07:56am PVT REC'D is TO you from Dave Pedler"); prints("#158 26-Feb-91 03:32pm PVT REC'D is TO you from Mimi Milstein"); prints("^M^J^M^J"); prints("Area 2 ... The Technical conference"); prints(""); prints("#161 26-Feb-91 03:23pm REC'D is TO you from Mimi Milstein"); prints("#162 26-Feb-91 06:33pm REC'D is TO you from Kevin Ireland"); prints("#164 26-Feb-91 07:18pm REC'D is TO you from Kevin Ireland"); prints("^M^J^M^J"); prints("Area 3 ... FidoNet Mail area"); prints("^M^J^M^J^M^J"); prints("Area 4 ... The general gossip conference"); prints(""); prints("#112 26-Feb-91 07:24pm REC'D is TO you from Kevin Ireland"); prints("#113 26-Feb-91 06:58pm REC'D is TO you from Kevin Ireland"); prints("#121 25-Feb-91 08:51am REC'D is TO you from Sean White"); prints("^M^J^M^J"); prints("Area 5 ... Classifieds - Buy, Sell, and/or Swop"); prints("^M^J^M^J^M^J"); prints("Press ENTER to continue"); wait_for_enter(); fputs("$ENTER$^M^J",toes_req_file); fputs(message_prompt,toes_req_file); } // end message_scan message_inquire() // this function emulates the message area inquire facility { prints("^M^J^M^J"); prints("INQUIRE"); prints(""); prints("Type `?' by itself for help, or"); prints("Type what you want to find: "); gets(s_80,80); prints(""); prints("Searching for s_80"); prints("#125 TO Sample User"); prints(" FROM Another User"); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(message_prompt,toes_req_file); inschrs("Subject ",s_80,0,8); prints(s_80); prints("^M^J^M^J"); delay(20); } // end function message_inquire message_area_show() // this function displays the message areas { prints("The Golden City Opus Areas "); prints(""); prints(" 1 ... Replies to log-off messages and more"); prints(" 2 ... The Technical conference"); prints(" 3 ... FidoNet Mail area"); prints(" 4 ... The general gossip conference"); prints(" 5 ... Classifieds - Buy, Sell, and/or Swop"); prints(" ."); prints(" ."); prints(" ."); prints(" 116 R/O UseNet Science Aeronautics Conference (Read Only)"); prints(" 117 R/O UseNet Science Enviroment Conference (Read Only)"); prints(" 118 R/O UseNet Science Medical Conference (Read Only)"); prints(" 119 R/O UseNet Pascal Conference (Read Only)"); prints(""); prints(" Areas marked PWD are passworded!"); prints(" Areas marked R/O are read only!"); } // end function message_area_show file_area() // this function simulates the file area change facility { area_type = "f"; msg_fil_area(); } // end function file_area file_area_show() // this function displays the available file areas { prints("The Golden City Opus Areas"); prints(""); prints(" 1 ... Ascii and other files"); prints(" 2 ... The latest nodelists and nodediffs"); prints(" 3 ... FidoNet compatible BBS programs"); prints("11 SUB MS-DOS Games Titles N to Z"); prints("12 SUB MS-DOS Utility Files (Titles A to M)"); prints("13 SUB MS-DOS Utility Files (Titles N to Z)"); prints("14 SUB Operating Systems/M'tasking/others"); prints("41 ... FidoNet BBS Utilities"); prints("42 SUB Utilities for your Hard and Floppy Drives"); prints("43 SUB Utilities for your Screen and Monitor"); prints("44 ... The BinkleyTerm mailer program"); prints("45 SUB Miscellaneous Application Programs"); prints("46 SUB The Complete *New* King James Bible"); prints("100 PWD The Turbo C Users Group File area"); prints(""); prints("Areas marked PWD are passworded!"); prints("Areas marked SUB only allow subscribers to Download!"); prints("^M^J^M^J"); } // end function file_area_show file_locate() // this function simulates the file area locate facility { ok = 0; do { prints("^M^J^M^J"); prints("L)OCATE"); prints(""); prints("Type `?' by itself for help."); prints(""); prints("Locate what file (or description)? "); gets(s_80,80); if (strpos(s_80,"*",0) >= 0 || strpos(s_80,"?",0) >= 0) { prints(""); prints("L)OCATE does not use `*' or `?' characters."); prints("Press ENTER to continue"); prints("^M^J^M^J"); continue; // break out of test and loop back to start } ok = 1; fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); prints(""); printsc("Looking for "); prints(s_80); prints("^M^J^M^J"); for (kounter = 0; kounter <= 3; kounter = kounter + 1) prints("File xyz .... area xyz"); prints("Located ***** matches."); prints("^M^J^M^J"); delay(20); } while (ok == 0); } // end function file_locate file_titles() // this function emulates the file titles display facility { prints("-General files for you to T)ype or download"); prints(" =========================================="); prints("OPUSER.ZIP 34265 04-05-89* [385] The users manual for OPU."); prints("OPUSER.TXT 104749 09-23-86* [106] The users manual in ascii forma."); prints("OPEDHELP.TXT 3504 12-22-88* [297] Opus Full scrn mess editor help fil."); prints(" DOWNLOAD!"); prints("FIDONET.TXT 9216 08-16-87* [286] Some explanations about FIDONT"); prints("EDTORIAL.TXT 3655 12-29-87* [166] The explanations why FIDO is nowa"); prints(" subscription BBS"); prints("BULLETIN.4 1665 12-24-90* [ 36] An membership application form for this"); prints(" BBS"); prints("TC.DOC 6144 05-07-89* [287] How to join the Turbo C user group here"); prints("F491-001.NEW 12575 02-26-91* [ 83] new files on this system"); delay(20); } // end function file_titles file_type() // this function emulates the type a file function { prints("Display what file?"); gets(s_80,80); prints(""); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); prints(""); prints("** New files from the 30 day period 01-27-91 15:51:40 - 02-26-91 15:51:40 **"); prints("^M^J^M^J"); prints("ÖÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·"); prints("º File Area #1 º Ascii and other files º"); prints("ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÐÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ"); prints(" (Matrix filerequest possible)"); prints(""); prints("F491-001.TXT 0 02-26-91* [190] Files on this BS"); prints("F491-001.LZH 124955 02-26-91* [ 66] Arc'ed version of above file"); prints("GCBBSDB.TXT 150016 02-26-91* [ 40] comma delimited file of above for dBaseII"); prints(" import"); prints("F491-001.NEW 0 02-26-91* [ 80] new files on this system"); prints("BBSMRT91.ZIP 2303 02-06-91* [ 20] Latest BBS listning (South-Africa)"); prints("BBSFEB91.ZIP 3403 02-09-91* [ 15] BBS numbers in R.S.A for February 1991"); prints("^M^J^M^J"); prints(" ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"); prints(" º This list was created using X_List V.2.12, (C) DUGFRISK & BIFROST UnLtd º"); prints(" º (C) Kristian Ottosen 1987 - 1990, (C) Per Holm 1989 - 1990. º"); prints(" º Look out for quality software from Danish Opus Crew and Denmark on º"); prints(" º Asgaard BBS - FidoNet 2:230/22 +45-86-119043 º"); prints(" ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"); delay(20); } // end function file_type file_upload() // this function emulates the file upload facility { s_80 = 255; get_protocol(); fputs(char,toes_req_file); fputs("^M^J",toes_req_file); if (protocol == 'Q') fputs(file_prompt,toes_req_file); else { // wait for upload - ie. send file from script char = vsavearea(5,5,75,10); if (char != -1) { box(5,5,75,12,2,0,112); scroll(6,6,74,11); gotoxy(7,7); printsc("OPUS does not at this point ask you for the file name to upload"); gotoxy(7,8); printsc(" however, the script needs to know it in order to generate the"); gotoxy(7,9); printsc(" correct file request. Please enter it below, with the FULL path."); gotoxy(7,10); printsc("_"); gotoxy(7,10); gets(s_80,80); prints(""); vrstrarea(char); } prints("Ready to receive Zmodem"); prints("Begin sending now or send CONTROL-X twice to cancel."); fputs("Begin sending now or send CONTROL-X twice to cancel.^M^J",toes_req_file); send(protocol,s_80); // NOTE : Within the TOES script, which will be acting on the instructions // created by this script, in TOES.REQ - I must test for a file transfer // request, and act accordingly. fputs("$FILE_SEND$ ",toes_req_file); // dummy - to make the TOES script // perform a file receive fputs(protocol,toes_req_file); fputs(" ",toes_req_file); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); prints(""); prints("Transfer complete"); prints("^M^J^M^J^M^J"); prints("Thanks for the upload, Allan Marillier."); prints(""); printsc("Please describe "); printsc(s_80); prints(":"); gets(s_80,80); fputs("Please describe ^M^J",toes_req_file); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); } } // end function file_upload file_download() // this function emulates the file download facility { s_80 = 255; get_protocol(); fputs(char,toes_req_file); fputs("^M^J",toes_req_file); if (protocol == 'Q') fputs(file_prompt,toes_req_file); else { fputs("What do you want to receive?^M^J",toes_req_file); prints("What do you want to receive?"); gets(s_80,80); prints(""); if (s_80 == "") { fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); } else { fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs("Begin receiving now or send several CONTROL-X's to cancel.^M^J",toes_req_file); prints("File: Biosinfo.zip"); prints("Size: 4017 bytes (32 x-blks)"); prints("Time: zmodem=0:04 xmodem/telink=0:05 sealink=0:04"); prints(""); prints("Mode: Zmodem"); prints(""); prints("Begin receiving now or send several CONTROL-X's to cancel."); prints("^M^J^M^J"); receive(protocol,s_80); // NOTE : Within the TOES script, which will be acting on the instructions // created by this script, in TOES.REQ - I must test for a file transfer // request, and act accordingly. fputs("$FILE_RECEIVE$ ",toes_req_file); // dummy - to make the TOES script // perform a file receive fputs(protocol,toes_req_file); fputs(" ",toes_req_file); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); } } } // end function file_download file_statistics() // this function emulates the file statistics facility { prints("^M^J^M^J^M^J"); prints("Your statistics for Wed Feb 27 14:28:35 1991"); prints(""); prints("TIME"); prints(" Time on line, this call................. 11 minutes"); prints(" Time remaining for this call............ 61 minutes"); prints(" Time of previous calls today............ 23 minutes"); prints(" Calls to date........................... 552"); prints("FILES"); prints(" UL (from you)........................... 4253 k-bytes"); prints(" DL (to you)............................. 22333 k-bytes"); prints(" Download available...................... 600 k-bytes"); prints("<*>"); prints("Listed in User list: YES List City: YES Last time on: YES"); prints("Current Language: ENGLISH"); prints("^M^J^M^J"); delay(20); } // end function file_statistics file_raw() // this function emulates the file raw list facility { prints("File name mask:"); // wait for input. If just enter, list all. gets(s_80,80); prints(""); if (s_80 == "„") s_80 = "*.*"; fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); prints("8BITSPEC.ZIP 2335 January 7, 1989 08:22"); prints("EXEC-PC.LZH 9600 January 1, 1991 11:28"); prints("BIOSINFO.ZIP 4017 December 25, 1988 04:17"); prints("BULLETIN.4 1665 December 24, 1990 02:30"); prints("DIR.BBS 23 April 17, 1990 00:22"); prints("DRCOMPAT.ZIP 2234 December 25, 1988 04:26"); prints("EDTORIAL.TXT 3655 December 29, 1987 10:24"); prints("F491-001.LZH 125294 February 26, 1991 02:54"); delay(20); } // end function file_raw file_contents() // this function emulates the file display contents facility { prints("^M^J^M^J"); prints("CONTENTS"); prints(""); prints("Type `?' by itself for help,"); prints("Type the name of an archive: "); gets(s_80,80); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs("More [Y,n]?^M^J",toes_req_file); prints(""); prints(""); prints("Contents of: ANTI-ZAP.ZIP"); prints("File name SIZE: now full DATE"); prints(""); prints("README.1ST 623 1029 01-Oct-90 12:50am"); prints("ZAPDOCS.DOC 5616 13418 01-Oct-90 12:37am"); prints("ZAP121.PCB 1141 12899 30-Sep-90 02:27pm"); prints("ZAP221.PCB 2305 48137 30-Sep-90 02:20pm"); prints("ZAPCOMP.PCB 3830 48137 30-Sep-90 03:13pm"); prints("ZAPDIAG.PCB 4669 121567 30-Sep-90 11:53pm"); prints(""); prints(" 6 files 18184 245187"); prints(""); prints("More [Y,n]?"); valid_choice('Y','N','','',''); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs(file_prompt,toes_req_file); } // end function file_contents xpress_main() // this function emulates the Silver Express main menu { do { prints(""); prints("*--------------------------------*"); prints(" Xpress V2.27F2.08á Main Menu"); prints("*--------------------------------*"); prints("[77 mins] Allan, Enter C, D, U, S, H, Q ?"); char = 0; char = toupper(inkeyw()); if (char == 81) // Pressed Q { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(main_prompt,toes_req_file); break; } if (char == 67) // Pressed C { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file); // NOTE - this assumes expert mode on the BBS side of SX xpress_config(); continue; } if (char == 68) // Pressed D { clear_scr(); prints("Silver Express on line Downloads not supported. These will be "); prints(" handled by the script, TOES."); delay(10); continue; } if (char == 85) // Pressed U { clear_scr(); prints("Silver Express on line Uploads not supported. These will be "); prints(" handled by the script, TOES."); delay(10); continue; } if (char == 83) // Pressed S { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("View Log: ist, earch, oday Usage, ill -Exit :^M^J",toes_req_file); xpress_statistics(); continue; } if (char == 72 || char == 63) // Pressed H or ? { clear_scr(); prints("Silver Express on line help not supported. For online help, "); prints(" connect online and read it or download the relevant doc files."); delay(10); continue; } } while (1); // loop forever, or until exit via Q } // end function xpress_main xpress_config() // this function emulates the Silver Express config menu { do { prints("*----------------------*"); prints(" Configuration Menu"); prints("*----------------------*"); prints("[77 mins] Allan, Enter S, K, T, A, G, M, X, L, Y, H, Q ? "); char = 0; char = toupper(inkeyw()); if (char == 81) // Pressed Q { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs(xpress_prompt,toes_req_file); break; } if (char == 83) // Pressed S { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); xpress_config_select(); continue; } if (char == 75) // Pressed K { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, -Menu ]^M^J",toes_req_file); xpress_config_keywords(); continue; } if (char == 84) // Pressed T { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file); xpress_config_transfer(); continue; } if (char == 65) // Pressed A { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file); xpress_config_archive(); continue; } if (char == 71) // Pressed G { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file); xpress_config_graphics(); continue; } if (char == 77) // Pressed M { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file); xpress_config_menu_hotkey(); continue; } if (char == 88) // Pressed X { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[72 mins] Allan, Enter Selection:^M^J",toes_req_file); xpress_config_expert(); continue; } if (char == 76) // Pressed L { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Date (format MM-DD-YY) -today's date :^M^J",toes_req_file); xpress_config_last(); continue; } if (char == 89) // Pressed Y { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("[71 mins] Allan, Enter Selection:^M^J",toes_req_file); xpress_config_your(); continue; } if (char == 72 || char == 63) // Pressed H or ? { clear_scr(); prints("Silver Express Configs on line help not supported. For online help, "); prints(" connect online and read it or download the relevant doc files."); delay(10); continue; } } while (1); // loop forever, or until exit via Q } // end function xpress_config xpress_statistics() // this function emulates the silver express statistics facility { clear_scr(); do { char = 0; do { prints("View Log: ist, earch, oday Usage, ill -Exit :"); char = toupper(inkeyw()); } while (char != 'L' && char != 'S' && char != 'T' && char != 'K' && char != 13); if (char == 13) { fputs("$ENTER$^M^J",toes_req_file); fputs(xpress_prompt,toes_req_file); break; // quick exit after pressing Enter } if (char == 'L') { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("View Log: ist, earch, oday Usage, ill -Exit :^M^J",toes_req_file); prints("18 Feb 06:53:44 USER BEGIN ALLAN MARILLIER @ 9600"); prints("18 Feb 06:54:02 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80 0:38am 1239"); prints("18 Feb 06:54:26 USER Area 1 (Local to This BBS ) - 7 A"); prints("18 Feb 06:54:26 USER Area 2 ( Technical ) - 67 A"); prints("18 Feb 06:54:26 USER Area 3 ( FidoNet ) - 1 A"); prints("18 Feb 06:54:26 USER Area 4 ( Gossip ) - 42 A"); prints("18 Feb 06:54:26 USER Area 210 ( SE Users Local ) - 3 A"); prints("18 Feb 06:54:26 USER Area 211 (SE Users Internat ) - 36 A"); prints("18 Feb 06:56:54 USER DNLD GCOBBS.OPX w/ Z-Modem 02/18/91 6:55am 90222"); prints("18 Feb 06:56:58 USER EXIT ********************************************"); prints("18 Feb 08:57:28 USER BEGIN ALLAN MARILLIER @ 9600"); prints("18 Feb 08:58:02 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80 2:51am 5759"); prints("18 Feb 08:58:04 USER Area # 3 Msg # 38 To: Victor Wilson PVT 491/1 $0.00"); prints("18 Feb 08:58:04 USER Subject: Re: CorelDraw"); prints("18 Feb 08:58:06 USER Area # 210 Msg # 21 To: Jean Mooy"); prints("18 Feb 08:58:06 USER Subject: Re: New SX script"); prints("18 Feb 08:58:12 USER Area # 2 Msg # 214 To: Mimi Milstein"); prints("18 Feb 08:58:12 USER Subject: Re: Reassigning function keys"); prints("18 Feb 09:04:02 USER DNLD GCOBBS.OPX w/ Z-Modem 02/18/91 9:01am 91665"); prints("18 Feb 09:04:48 USER EXIT ********************************************"); prints("19 Feb 07:04:18 USER BEGIN ALLAN MARILLIER @ 9600"); prints("19 Feb 07:04:40 USER Area 1 (Local to This BBS ) - 1 A"); prints("19 Feb 07:04:40 USER Area 2 ( Technical ) - 53 A"); prints("19 Feb 07:04:42 USER Area 4 ( Gossip ) - 31 A"); prints("19 Feb 07:04:42 USER Area 211 (SE Users Internat ) - 35 A"); prints("19 Feb 07:07:42 USER BEGIN ALLAN MARILLIER @ 9600"); prints("19 Feb 07:08:04 USER Area 1 (Local to This BBS ) - 1 A"); prints("19 Feb 07:08:04 USER Area 2 ( Technical ) - 53 A"); prints("19 Feb 07:08:04 USER Area 4 ( Gossip ) - 31 A"); prints("19 Feb 07:08:06 USER Area 211 (SE Users Internat ) - 35 A"); prints("19 Feb 07:10:22 USER DNLD GCOBBS.OPX w/ Z-Modem 02/19/91 7:08am 84528"); prints("19 Feb 07:10:26 USER EXIT ********************************************"); prints("19 Feb 11:36:50 USER BEGIN ALLAN MARILLIER @ 9600"); prints("19 Feb 11:37:38 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80 6:04am 12434"); prints("19 Feb 11:37:40 USER Area # 2 Msg # 221 To: Steve Hayes"); prints("19 Feb 11:37:40 USER Subject: Re: c.itoh Manual"); prints("19 Feb 11:37:42 USER Area # 2 Msg # 222 To: Oliver Steudler"); prints("19 Feb 11:37:42 USER Subject: Re: Controller Standards"); continue; } // end if pressed L if (char == 'S') { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Search String :^M^J",toes_req_file); prints("Enter Search String : "); gets(s_80,80); prints(""); fputs(s_80,toes_req_file); fputs("^M^J",toes_req_file); fputs("View Log: ist, earch, oday Usage, ill -Exit :^M^J",toes_req_file); prints("Searching...."); prints("19 Feb 11:37:40 USER Area # 2 Msg # 221 To: Steve Hayes"); prints("19 Feb 11:37:40 USER Subject: Re: c.itoh Manual"); prints("19 Feb 11:37:42 USER Area # 2 Msg # 222 To: Oliver Steudler"); prints("19 Feb 11:37:42 USER Subject: Re: Controller Standards"); continue; } // end if pressed S if (char == 'T') { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("View Log: ist, earch, oday Usage, ill -Exit :^M^J",toes_req_file); prints("Searching...."); prints("27 Feb 06:52:24 USER BEGIN ALLAN MARILLIER @ 9600"); prints("27 Feb 06:52:48 USER Area 1 (Local to This BBS ) - 1 A"); prints("27 Feb 06:52:48 USER Area 2 ( Technical ) - 12 A"); prints("27 Feb 06:52:48 USER Area 4 ( Gossip ) - 13 A"); prints("27 Feb 06:52:48 USER Area 8 ( Talk about Comms ) - 5 A"); prints("27 Feb 06:52:48 USER Area 11 (Pascal Conference ) - 1 A"); prints("27 Feb 06:52:48 USER Area 41 ( LANS (Worldwide) - 27 A"); prints("27 Feb 06:52:48 USER Area 210 ( SE Users Local ) - 3 A"); prints("27 Feb 06:52:48 USER Area 211 (SE Users Internat ) - 20 A"); prints("27 Feb 06:54:42 USER DNLD GCOBBS.OPX w/ Z-Modem 02/27/91 6:53am 35747"); prints("27 Feb 06:54:46 USER EXIT ********************************************"); prints("27 Feb 07:01:36 USER BEGIN ALLAN MARILLIER @ 9600"); prints("27 Feb 07:01:48 USER EXIT ********************************************"); prints("27 Feb 10:49:26 USER BEGIN ALLAN MARILLIER @ 9600"); prints("27 Feb 10:50:18 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80 6:07am 12513"); prints("27 Feb 10:50:18 USER Area # 1 Msg # 161 To: Mimi Milstein PVT"); prints("27 Feb 10:50:18 USER Subject: Re: Expanded memory card"); prints("27 Feb 10:50:20 USER Area # 210 Msg # 28 To: Hennie Strydom"); prints("27 Feb 10:50:20 USER Subject: Re: SX MESSAGE READ POINTERS"); prints("27 Feb 10:50:20 USER Area # 210 Msg # 29 To: Mimi Milstein"); prints("27 Feb 10:50:20 USER Subject: Re: TSF11xAM Script"); prints("27 Feb 10:51:14 USER DNLD GCOBBS.OPX w/ Z-Modem 02/27/91 10:50am 6309"); prints("27 Feb 10:51:20 USER EXIT ********************************************"); prints("27 Feb 14:03:52 USER BEGIN ALLAN MARILLIER @ 9600"); prints("27 Feb 14:03:56 USER EXIT ********************************************"); prints("27 Feb 14:10:56 USER BEGIN ALLAN MARILLIER @ 9600"); prints("27 Feb 14:12:08 USER UPLD GCOBBS.REP w/ Z-Modem 00/00/80 1:24am 2844"); prints("27 Feb 14:12:10 USER Area # 38 Msg # 36 To: Rowan Hutchinson"); prints("27 Feb 14:12:10 USER Subject: Re: Menu systems"); prints("27 Feb 14:12:12 USER Area # 2 Msg # 176 To: All"); prints("27 Feb 14:12:12 USER Subject: Funny PC"); } // end if pressed T if (char == 'K') { fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Kill Log file?^M^J",toes_req_file); prints(""); prints("Kill Log file?"); valid_choice('Y','N','','',''); fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); fputs("View Log: ist, earch, oday Usage, ill -Exit :^M^J",toes_req_file); // wait here for input } // end if pressed K } while (1); // loop forever, or until Enter is pressed to abort } // end function xpress_statistics xpress_upload() // this function indicates non support of xpress upload { clear_scr(); prints("Silver Express on line upload not supported. This is already "); prints(" catered for by the script TOES."); } // end function xpress_upload xpress_download() // this function indicates non support of xpress download { clear_scr(); prints("Silver Express on line download not supported. This is already "); prints(" catered for by the script TOES."); } // end function xpress_download xpress_config_select() // this function emulates the silver express config message select facility { clear_scr(); xpress_c_s_l(); // call xpress_c_s_l to display areas do { prints("[L]ist Areas [D]etail Listing [S]elected Areas"); prints("[F]ind [C]hange Pointer [Q]uit or "); printsc("Enter Area Number(s) : "); // have to read this as a string, then act on it // eg. f addict // or 1 +3 -5 gets(buffer,80); prints(""); strupper(buffer); if (strlen(buffer) == 0) buffer = "Q"; if (strlen(buffer) == 1 && buffer == "Q") // Q has same effect as Enter { fputs("Q^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file); break; // quick exit after pressing Enter } else if (strlen(buffer) == 1 && (buffer == "L" || buffer == "F")) { // if press l - call xpress_c_s_l to list areas fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); xpress_c_s_l(); continue; } else if (strlen(buffer) == 1 && buffer == "D") { // if press d - call xpress_c_s_d to give detailed area list fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); xpress_c_s_d(); continue; } else if (strlen(buffer) == 1 && buffer == "S") { // if press s - call xpress_c_s_s to give selected area list fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); xpress_c_s_s(); continue; } else if (strlen(buffer) == 1 && buffer == "C") { // if press s - call xpress_c_s_s to give selected area list prints("Enter Areas. ie., 1 3 4 5"); fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); continue; } else if (strpos(buffer,"F ",0) == 0 && strlen(buffer) >= 3) { // if press s - call xpress_c_s_f to give find area facility fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); xpress_c_s_f(); continue; } else if (strpos(buffer,"C ",0) == 0 && strlen(buffer) >= 3) { // if press s - call xpress_c_s_c to give area message number change fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Last Read Msg #. Keep^M^J",toes_req_file); xpress_c_s_c(); continue; } else // some other input, treat it as area changes - possibly test for validity { prints(""); prints("< a request to SE to modify area pointers. This must take the>"); prints("< form shown below : >"); prints("< 1 +5 -10 >"); prints("< which tells SE >"); prints("< toggle area 1, force area 5 ON, and force area 10 OFF >"); prints(""); prints("< Please re-enter to confirm that you understand .... >"); prints("< Press Enter with no input to cancel .... >"); gets(buffer,80); if (strlen(buffer) > 2) { fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) :^M^J",toes_req_file); } continue; } } while (1); // loop forever, or until Enter is pressed to abort } // end function xpress_config_select xpress_c_s_l() // this function emulates the sx function to list all areas { prints("*----------------------------------*"); prints(" Available Message Areas"); prints("*----------------------------------*"); prints(""); prints(" * ( 1) --- (Local to This BBS ) * ( 2) --- ( Technical )"); prints(" * ( 3) --- ( FidoNet ) * ( 4) --- ( Gossip )"); prints(" * ( 5) --- ( Classifieds ) ( 6) --- ( Jokes )"); prints(" * ( 7) --- ( Find a File ) * ( 8) --- ( Talk about Comms )"); prints(" * ( 9) --- ( C Conference ) ( 10) --- ( Science Fiction )"); prints(" * ( 11) --- (Pascal Conference ) ( 12) --- ( Games )"); prints("^M^J^M^J"); } // end function xpress_c_s_l xpress_c_s_d() // this function emulates sx's detailed area list { prints(""); prints("*----------------------------------*"); prints(" Available Message Areas"); prints("*----------------------------------*"); prints(""); prints(" * ( 1) --- (Local to This BBS ) Replies to log-off messages and more"); prints(" * ( 2) --- ( Technical ) The Technical conference"); prints(" * ( 3) --- ( FidoNet ) FidoNet Mail area"); prints(" * ( 4) --- ( Gossip ) The general gossip conference"); prints(" * ( 5) --- ( Classifieds ) Classifieds - Buy, Sell, and/or Swop"); prints(" ( 6) --- ( Jokes ) Joke Time. Amuse us and Yourself"); prints(" * ( 7) --- ( Find a File ) Find a File Somewhere in RSA"); prints(" * ( 8) --- ( Talk about Comms ) Talk about teleCommunicatons"); prints(" * ( 9) --- ( C Conference ) The Conference for 'C' addicts"); prints(" ( 10) --- ( Science Fiction ) Science Fiction and Fantasy conference"); } // end function xpress_c_s_d xpress_c_s_s() // this function emulates sx's list selected areas facility { prints(" *- Selected Message Areas -*"); prints(" ( 1) --- (Local to This BBS ) Replies to log-off messages and more"); prints(" ( 2) --- ( Technical ) The Technical conference"); prints(" ( 3) --- ( FidoNet ) FidoNet Mail area"); prints(" ( 4) --- ( Gossip ) The general gossip conference"); prints(" ( 5) --- ( Classifieds ) Classifieds - Buy, Sell, and/or Swop"); prints(" ( 7) --- ( Find a File ) Find a File Somewhere in RSA"); prints(" ( 8) --- ( Talk about Comms ) Talk about teleCommunicatons"); prints(" ( 9) --- ( C Conference ) The Conference for 'C' addicts"); prints(""); } // end function xpress_c_s_s xpress_c_s_f() // this function emulates sx's find an area facility { prints("f inter"); prints("*----------------------------------*"); prints(" Available Message Areas"); prints("*----------------------------------*"); prints(""); prints(" ( 13) --- ( Genealogy ) The Genealogy Conference (International)"); prints(" ( 14) --- ( Modula 2 ) For MODULA-2 addicts (International)"); prints(" ( 19) --- ( Britain & RSA ) Link-up Between Britain and RSA (International)"); prints(" ( 20) --- ( Virus Info ) Virus Information (International)"); prints(" ( 21) --- ( HAMS ) Amateur Radio Operators (International)"); prints(" ( 26) --- ( CAD and CAM ) About CAD and CAM (International)"); prints(" ( 27) --- ( Electronics ) The Electronics Echo (International)"); prints(" ( 28) --- ( Science ) The Science Conference (International)"); prints(" ( 29) --- ( USA <-> RSA ) USA <-> RSA chat conference (International)"); prints(" ( 31) --- ( CD Roms ) About CD Roms (International)"); prints(" ( 33) --- (Clipper Conference) The Clipper Conference (International)"); prints(" ( 34) --- ( MIDI Programming ) MIDI Programming (International)"); prints(" ( 35) --- ( ACAD conference ) The ACAD conference (International)"); prints(" ( 36) --- ( MIDI Network ) The MIDI Network (International)"); prints(" ( 37) --- (Novell (Worldwide ) The Novell Conference (International)"); prints(" ( 40) --- ( DesqView ) DesqView Conference (International)"); prints(" ( 41) --- ( LANS (Worldwide) ) Local Area Networks (LANS - International)"); prints(" ( 42) --- ( Shortwave Echo ) Shortwave Echo (International)"); prints("* (211) --- (SE Users Internat ) Silver Express conference (International)"); } // end function xpress_c_s_f xpress_c_s_c() // this function emulates sx's message area change message pointer facility { printsc("210 ( SE Users Local ) Enter Last Read Msg #. Keep [ 39] : "); gets(buffer,3); prints(""); kounter = stoi(buffer); if (kounter >= 1) fputs(buffer,toes_req_file); else fputs("$ENTER$",toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Area Number(s) : ^M^J",toes_req_file); } // end function xpress_c_s_c xpress_config_keywords() // this function emulates the keyword selection facility { xpress_config_k_l(); // list all keywords defined do { prints("[ Options : ADD keyword, DEL Keyword, LIST-relist, -Menu ]"); gets(buffer,80); prints(""); strupper(buffer); if (buffer == "") // pressed enter with no input { fputs("$ENTER$^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file); break; } else if (strpos(buffer,"ADD",0) == 0) // wants to add keywords { if (strlen(buffer) >= 5) { fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, -Menu ]^M^J",toes_req_file); } else { prints(" ADD WHAT!!!!"); prints(""); } continue; } else if (strpos(buffer,"DEL",0) == 0) // wants to delete keywords { if (strlen(buffer) >= 5) { fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, -Menu ]^M^J",toes_req_file); } else { prints("Keyword ^"^" Not found"); prints(""); } continue; } else if (strpos(buffer,"LIST",0) == 0) // wants to list keywords { if (strlen(buffer) == 4) { fputs(buffer,toes_req_file); fputs("^M^J",toes_req_file); fputs("[ Options : ADD keyword, DEL Keyword, LIST-relist, -Menu ]^M^J",toes_req_file); xpress_config_k_l(); } else { prints(""); delay(30); } continue; } } while(1); } // end function xpress_config_keywords xpress_config_k_l() // this function lists defined keywords { prints("*----------------------------------*"); prints(" Selection of Key Words"); prints("*----------------------------------*"); prints(""); prints("ALLAN MARILLIER AM BBS"); prints("^M^J^M^J"); } // end function xpress_config_k_l xpress_config_transfer() // this function emulates setting the file transfer protocol { prints(""); prints("*--------------------------*"); prints(" Transfer Protocol Menu"); prints("*--------------------------*"); prints(""); prints("Type"); prints(" [X].........X-Modem"); prints(" [Y].........Y-Modem (Xmodem 1k)"); prints(" [Z].........Z-Modem"); prints(" [Q].........Exit back to Configuration Menu."); prints(""); prints("[72 mins] Allan, Enter Selection:"); char = 0; do { char = toupper(inkeyw()); if (char == 'Q') // Q has same effect as Enter char = 13; } while (char != 'X' && char != 'Y' && char != 'Z' && char != 13); if (char == 13) fputs("$ENTER$",toes_req_file); else fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file); } // end function xpress_config_transfer xpress_config_archive() // though Dave only supports ZModem, this function emulates the archive // facility { prints(""); prints("*--------------------------*"); prints(" Transfer Archiver Menu"); prints("*--------------------------*"); prints(""); prints("Type"); prints(" [Z].........PKZip ver 1.10"); prints(" [Q].........Exit back to Configuration Menu."); prints(""); prints("[72 mins] Allan, Enter Selection:"); char = 0; do { char = toupper(inkeyw()); if (char == 'Q') // Q has same effect as Enter char = 13; } while (char != 'Z' && char != 13); if (char == 13) fputs("$ENTER$",toes_req_file); else fputs(char,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ? ^M^J",toes_req_file); } // end function xpress_config_archive xpress_config_graphics() // this function emulates toggling graphics mode on /off { prints(""); delay(10); // does nothing more - just return to calling function } // end function xpress_config_graphics xpress_config_menu_hotkey() // this function emulates toggling hotkeys on /off { prints(""); delay(10); // does nothing more - just return to calling function } // end function xpress_config_menu_hotkey xpress_config_expert() // this function emulates toggling expert / novice mode { prints(""); delay(10); // does nothing more - just return to calling function } // end function xpress_config_expert xpress_config_last() // this function emulates sx's last usage date { str last_date[10]; str last_time[5]; do { ok = 0; kounter = 0; printsc("Enter Date (format MM-DD-YY) -today's date : "); gets(last_date,10); printsc("^M^JEnter Time (Military format HH:MM) -today's time : "); gets(last_time,5); prints(""); // check for CR, and put in date and time if necessary if (last_date == "") { number = _date_format; _date_format = 0; date(curtime(),last_date); _date_format = number; // substitute "-" for "/" copychrs("-",last_date,2,1); copychrs("-",last_date,5,1); } if (last_time == "") { number = _time_format; _time_format = 1; time(curtime(),last_time); _time_format = number; // what about the seconds ? they're redundant ! } // now validate them // date first - dashes then numbers if (strpos(last_date,"-",2) == 2) // was 0 ??? kounter = kounter + 1; if (strpos(last_date,"-",5) == 5) // was 0 ??? kounter = kounter + 1; // check month subchrs(last_date,0,2,s_10); if (stoi(s_10) >= 1 && stoi(s_10) <= 12) kounter = kounter + 1; // check day subchrs(last_date,3,2,s_10); if (stoi(s_10) >= 1 && stoi(s_10) <= 31) kounter = kounter + 1; // check year subchrs(last_date,6,2,s_10); if (stoi(s_10) >= 81 && stoi(s_10) <= 99) kounter = kounter + 1; // time next - colons then numbers if (strpos(last_time,":",2) == 2) kounter = kounter + 1; // check hours subchrs(last_time,0,2,s_10); if (stoi(s_10) >= 0 && stoi(s_10) <= 23) kounter = kounter + 1; // check minutes subchrs(last_time,3,2,s_10); if (stoi(s_10) >= 0 && stoi(s_10) <= 59) kounter = kounter + 1; if (kounter == 8) ok = 1; if (not ok) { // something wrong - give an error message prints("Error Type in the time form HH:MM ie, 14:52"); prints(""); prints("Error Type in the date form MM-DD-YY ie, 05-26-88"); prints(""); } // end error message if not ok } while(not ok); fputs(last_date,toes_req_file); fputs("^M^J",toes_req_file); fputs("Enter Time (Military format HH:MM) -today's time :^M^J",toes_req_file); fputs(last_time,toes_req_file); fputs("^M^J",toes_req_file); fputs("Reset elected or ll available areas? - Skip^M^J",toes_req_file); prints("Adjusting Last Read Counters since Apr 15,1991 7:30:00am"); prints("Reset elected or ll available areas? - Skip"); prints("^M^J^M^J"); // wait here for input char = 0; do { char = toupper(inkey()); } while (char != 'S' && char != 'A' && char != 13); if (char == 'A') { fputs("A^M^J",toes_req_file); fputs("of a successful download for this session? y/N^M^J",toes_req_file); } else if (char == 'S') { fputs("S^M^J",toes_req_file); fputs("of a successful download for this session? y/N^M^J",toes_req_file); } else { fputs("$ENTER$^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file); return; } prints("Scanning Area 1 (Local to This BBS ) LastRead 87 reset to 87"); prints("Scanning Area 2 ( Technical ) LastRead 127 reset to 119"); prints("Scanning Area 3 ( FidoNet ) LastRead 72 reset to 70"); prints("Scanning Area 4 ( Gossip ) LastRead 184 reset to 182"); prints("Scanning Area 5 ( Classifieds ) LastRead 24 reset to 24"); prints("Scanning Area 7 ( Find a File ) LastRead 3 reset to 3"); prints("Scanning Area 8 ( Talk about Comms ) LastRead 126 reset to 124"); prints("Scanning Area 9 ( C Conference ) LastRead 9 reset to 9"); prints("Scanning Area 11 (Pascal Conference ) LastRead 14 reset to 14"); prints("Scanning Area 15 (DataBase Languages) LastRead 18 reset to 17"); prints("Do you wish to permanently save these number regardless"); prints("of a successful download for this session? y/N "); char = 0; do { char = toupper(inkey()); } while (char != 'Y' && char != 'N'); if (char == 'Y') { fputs("Y^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file); } else { fputs("N^M^J",toes_req_file); fputs("Enter S, K, T, A, G, M, X, L, Y, H, Q ?^M^J",toes_req_file); } } // end function xpress_config_last xpress_config_your() // this function emulates sx's receive own mail facility { prints(""); prints("......Receive Own Mail/Skip Own Mail"); delay(10); // does nothing more - just return to calling function } // end function xpress_config_your wait_for_enter() // this function causes a wait for Enter to be performed { char = 0; do { char = inkeyw(); } while (char != 13); } // end function wait_for_enter msg_fil_area() // this function is used by both message_area and file_area, to eliminate // duplication of common code used in accepting an area number, or // accepting N, n, P, or p to move the area pointer. It uses the global // variable area_type as either "f" or "m" to determine what it's working on { if (area_type == "m") prompt = "Message area [Area #, N)ext, P)rior, ?)list]:^M^J"; else prompt = "File area [Area #, N)ext, P)rior, ?)list]:^M^J"; do { if (area_type == "m") prints("Message area [Area #, N)ext, P)rior, ?)list]:"); else prints("File area [Area #, N)ext, P)rior, ?)list]:"); // wait for input. If Enter, or ?, display the list of areas ... kounter = gets(s_10,3); number = stoi(s_10); if (number != 0) { if (area_type == "m") m_area_number = number; else f_area_number = number; fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); if (area_type == "m") fputs(message_prompt,toes_req_file); else fputs(file_prompt,toes_req_file); break; } if (kounter == 0 || s_10 == "?") // ie also send Enter as ? { fputs("?",toes_req_file); fputs("^M^J",toes_req_file); fputs(prompt,toes_req_file); if (area_type == "m") message_area_show(); else file_area_show(); continue; } if (s_10 == "N" || s_10 == "P" || s_10 == "n" || s_10 == "p") { fputs(s_10,toes_req_file); fputs("^M^J",toes_req_file); if (area_type == "m") { fputs(message_prompt,toes_req_file); if (s_10 == "N" || s_10 == "n") m_area_number = m_area_number + 1; else { m_area_number = m_area_number - 1; if (m_area_number <= 0) m_area_number = 1; } } else { fputs(file_prompt,toes_req_file); if (s_10 == "N" || s_10 == "n") f_area_number = f_area_number + 1; else { f_area_number = f_area_number - 1; if (f_area_number <= 0) f_area_number = 1; } } break; } } while (1); } // end function msg_fil_area get_protocol() // this function gets the file transfer protocol - to avoid duplication // of code in both file_upload and file_download { ok = 0; do { clear_scr(); prints(""); prints(" Z)modem"); prints(" X)modem"); prints(" Y)xmodem/1k"); prints(" M)odem7"); prints(" S)ealink"); prints(" K)ermit"); prints(" Q)QUIT (cancel the transfer)"); prints("^M^J^M^J"); prints("Select:"); char = inkeyw(); if (char == 13) char = "q"; char = toupper(char); if (char=="Z" || char=="X" || char=="Y" || char=="M" || char=="S" || char=="K" || char=="Q") ok = 1; } while (ok == 0); protocol = char; } // end function get_protocol valid_number(int lower, int upper) // function to get a number between the upper and lower limits passed // s_80 and number are global variables, so I don't need to return them { number = lower - 1; do { gets(s_10,3); if (strlen(s_10) == 1 && s_10 == '0') number = 0; else number = stoi(s_10); if (number == 0) s_10 = "0"; if (number < lower || number > upper) printsc(" INVALID ! must be between "); printn(lower); printsc(" and "); printn(upper); prints(""); } while (number < lower || number > upper); } // end function valid_number valid_choice(int one, int two, int thr, int fou, int fiv) // function to get a Y or N response. { int ch; do { ch = toupper(inkeyw()); } while (ch != one && ch != two && ch != thr && ch != fou && ch != fiv); s_10 = "^^"; // must use 2 ^ symbols, as first is seen as control char itos(ch,s_80); strcat(s_10,s_80); // the reply is got via inkeyw, which operates on int only. Telix doesn't // appear to have a means of converting int to character, so rather than // write a function, I let Telix send ^xxx which sends the character // equivalent of ASCII char xxx. } // end function valid_choice