diff --git a/ADF.EXE b/ADF.EXE new file mode 100644 index 0000000..ee0a0b5 Binary files /dev/null and b/ADF.EXE differ diff --git a/AKA.CPP b/AKA.CPP new file mode 100644 index 0000000..1a99e0f --- /dev/null +++ b/AKA.CPP @@ -0,0 +1,28 @@ +#include +#include "proboard.hpp" + +int +aka::read(int n) +{ + File f(FileName(syspath,"AKA.PRO")); + + if(!f.opened()) + { + CLEAR_OBJECT(*this); + + return -1; + } + + CLEAR_OBJECT(*this); + + f.seek(long(n)*sizeof(aka)); + + if(f.read(this,sizeof(aka)) != sizeof(aka)) + { + CLEAR_OBJECT(*this); + + return -1; + } + return 0; +} + diff --git a/AKA.OBJ b/AKA.OBJ new file mode 100644 index 0000000..6d9a9ae Binary files /dev/null and b/AKA.OBJ differ diff --git a/BINLOG.CPP b/BINLOG.CPP new file mode 100644 index 0000000..2053b7d --- /dev/null +++ b/BINLOG.CPP @@ -0,0 +1,71 @@ +#include "proboard.hpp" +#include + +const int BINLOG_BUF = 10; + +bool +BinLog::append() +{ + File f(FN_BINLOG_PB,fmode_rw | fmode_copen | fmode_denywr); + + if(!f.opened()) return FALSE; + + if(f.len() >= sizeof(BinLog)) + { + Date today(TODAY); + BinLog *log = new BinLog[ BINLOG_BUF ]; + + f.seek(0); + + f.read(log,sizeof(BinLog)); + + if(cfg.binlogdays && (today - log->date) > cfg.binlogdays) + { + f.seek(0); + for(long rec = 0;;rec++) + { + if(f.read(log,sizeof(BinLog)) != sizeof(BinLog)) break; + + if((today - log->date) <= cfg.binlogdays) + { + long dest_rec = 0; + + for(;;) + { + f.seek(rec * sizeof(BinLog)); + + word n = f.read(log,sizeof(BinLog) * BINLOG_BUF); + + if(n < sizeof(BinLog)) break; + + n /= sizeof(BinLog); + + f.seek(dest_rec * sizeof(BinLog)); + f.write(log,n * sizeof(BinLog)); + + dest_rec += n; + rec += n; + } + + f.seek(dest_rec * sizeof(BinLog)); + f.cut(); + + break; + } + } + } + + delete [] log; + } + + f.seek(f.len() / sizeof(BinLog) * sizeof(BinLog)); + + f.write(this,sizeof(*this)); + + return TRUE; +} + +BinLog::BinLog() +{ + memset(this,0,sizeof(*this)); +} diff --git a/BINLOG.OBJ b/BINLOG.OBJ new file mode 100644 index 0000000..4c0ea28 Binary files /dev/null and b/BINLOG.OBJ differ diff --git a/BULLETIN.CPP b/BULLETIN.CPP new file mode 100644 index 0000000..faf17a9 --- /dev/null +++ b/BULLETIN.CPP @@ -0,0 +1,44 @@ +#include +#include "proboard.hpp" + +void +bulletin(char *data) +{ + char fname[9]; + + for(int i=0;data[i]==' ';i++) {} + + char *s = &data[i]; + for(;data[i] && data[i]!=' ';i++) {} + data[i] = '\0'; + + String prompt; + + for(i++;data[i]==' ';i++) {} + + if(data[i]) + prompt = &data[i]; + else + prompt = S_ENTER_BULLETIN; + + for(;;) + { + strcpy(fname,s); + + io << '\n'; + + showansasc(fname); + + io << "\n\7" << prompt; + + io.read(&fname[strlen(fname)],8-strlen(fname),READMODE_UPALL); + + if(strlen(fname) <= strlen(s)) break; + + if(showansasc(fname,NULL) == ANS_NOFILE) + io << "\n\n" << S_FILE_NOT_FOUND << ' ' << S_PRESS_ENTER_TO_CONTINUE; + else + io << '\n' << S_PRESS_ENTER_TO_CONTINUE; + } +} + diff --git a/BULLETIN.OBJ b/BULLETIN.OBJ new file mode 100644 index 0000000..63eaa2b Binary files /dev/null and b/BULLETIN.OBJ differ diff --git a/CDROM.CPP b/CDROM.CPP new file mode 100644 index 0000000..5596484 --- /dev/null +++ b/CDROM.CPP @@ -0,0 +1,122 @@ +#define Use_LinkedList + +#include +#include +#include +#include +#include "proboard.hpp" + +const word copy_bufsize = 16384; + +bool +copy_file( char *s , char *d ) +{ + File fi,fo; + + if(!fi.open(s , fmode_read)) return FALSE; + + if(dos_getdiskfreespace(toupper(d[0])-'A'+1) < (fi.len() + copy_bufsize)) + return FALSE; + + if(!fo.open(d , fmode_create)) return FALSE; + + byte *buf = new byte[ copy_bufsize ]; + + for(;;) + { + word copied = fi.read( buf, copy_bufsize ); + + if(!copied) break; + + fo.write( buf , copied); + + if(copied != copy_bufsize) break; + } + + delete [] buf; + + return TRUE; +} + +void +copy_cdrom( LinkedList &files , LinkedList &copied) +{ + FileName copydir; + + while(copied.count()) + { + copied.rewind(); + copied.remove(); + } + + if(getenv("CDTEMP") != NULL) + { + copydir = getenv("CDTEMP"); + + if(copydir[1] != ':') + { + LOG("Invalid path specified in CDTEMP!"); + return; + } + + copydir.upperCase(); + } + else + { + copydir = String(mypath) + "CD_TEMP"; + } + + copydir.delLast('\\'); + + if(copydir.len() > 2) + mkdir(copydir); + + copydir.appendBS(); + + for( files.rewind() ; !files.eol() ; files++) + { + if(files.get().copy) + { + FileName source,dest; + + source = files.get().name; + source.stripPath(); + + int len = language_string_length(S_COPYING_FROM_CDROM((char *)source)); + + io << S_COPYING_FROM_CDROM((char *)source) << '\xFF'; + + dest = copydir + source; + source = files.get().name; + + if(!copy_file( source , dest )) + { + LOG( "Error copying %s to %s" , (char *)source , (char *)dest); + io << S_ERROR_COPYING_FROM_CDROM << '\n'; + } + else + { + files.get().name = dest; + copied.add(String(dest)); + + io << String('\b',len) << String(' ',len) << String('\b',len); + } + } + } + +} + +void +delete_copied(LinkedList &copied) +{ + for( copied.rewind() ; !copied.eol() ; copied++) + { + unlink(copied.get()); + } + + while(copied.count()) + { + copied.rewind(); + copied.remove(); + } +} diff --git a/CDROM.OBJ b/CDROM.OBJ new file mode 100644 index 0000000..8cdd712 Binary files /dev/null and b/CDROM.OBJ differ diff --git a/CHANGES.TXT b/CHANGES.TXT new file mode 100644 index 0000000..2eedab3 --- /dev/null +++ b/CHANGES.TXT @@ -0,0 +1,118 @@ +ProBoard v2.20.00 +----------------- + +* ProBoard now has a new registration scheme. It no longer uses the + REGKEY.PB file to store your registration information. Now, your + registration information is burned into the PROBOARD.EXE file itself. + I know there are going to be a lot of people out there who won't like + this change in the slightest, but it's really for new customers of + ProBoard. With ProBoard v2.2, new customers don't automatically get + an unlimited node license when they buy a copy. They purchase the + number of nodes they want to run. The key is the serial number and + the activation code which is used to unlock the software. This + information tells ProBoard how many nodes it will allow. Now, for all + those people who already own existing copies of ProBoard, you will + automatically be upgraded to an unlimited node license as part of your + upgrade. + + How do I upgrade to v2.2, and get it registered? It's a four-step + process. + + Step 1: Download ProBoard v2.2 (which you've already done, or you + wouldn't be seeing this file). + + Step 2: Run the program included with ProBoard 2.2 called REGINFO.EXE. + This will read your REGKEY.PB file, and extract out the old + registration information. It will then display an eight-digit + code on the screen which is your Upgrade-ID code. This code + will be crucial in the next step. + + Step 3: Visit the TeleGrafix Web site at http://www.telegrafix.com, + and purchase your upgrade. While you're filling out the + upgrade form, you'll be asked for your Upgrade-ID code, the + name of the SysOp and the BBS name as they appear in ProCFG. + The Web site will compare this information against the data + encoded in your Upgrade-ID code, and if they match, you'll + automatically be given your new registration information. + + NOTE: A single BBS can only be upgraded once, to prevent pirates + from stealing your registration information! + + Step 4: Run the REGISTER.EXE program, and key-in the newly assigned + serial number and activation code. + + That's all there is to it. You're ready to go online with a fully + functioning ProBoard system. + +* New look and feel for the main console. + +* Fixed a minor centering problem in the "last caller" field. + +* Added a new option to the status bar (ALT-J) to "Jump to DOS". This + option was already available in the software, but it wasn't documented + on the main console screen. + +* Added five new functions to the ProBoard PEX SDK: + + fileno() + getcurdir() + getdisk() + _dos_getftime() + _dos_setftime() + +* Changed message 361 in the language files to make room for the expanded + year string. + +* Updated ProCFG.EXE to properly handle four-byte year data entry. The + expiration date can be set to "00/00/0000" to indicate no expiration + date. + +* The new user signup now allows you to select from the updated date + formats: + + MM/DD/YYYY + YYYY/MM/DD + DD/MM/YYYY + +* The new user signup now forces you to enter four-digit years when asked + to enter your date of birth. + +* The file system now forces you to enter four-digit years when entering a + date to search for files by. + +* Fixed a potentially serious bug with the birthdate asking code. There + were circumstances when it might generate a garbled birthdate. + +* Added a new macro code to ".A?? File Control Codes". The new code is + "^F;" (i.e., 06-59). This code displays the user's password, or if the + "Hide Password" option is enabled in ProCFG, then this option will display + the password hiding character as defined in ProCFG. + +* The default SETUP.* menu files have been changed to use the new "^F;" + macro code instead of "^FC" for the password display to properly support + the Hide Password option. + +* Changed the look and feel of the SysOp functions F1 and Shift-F1 to be + more consistent with the main console appearance. + +* Changed the color of the status line displayed on the main console when + a user is logged in. The new color is more like the main console. + +* Changed the entire look and feel of ProCFG to be more similar to the BBS + main console. + +* Fixed a bug with ProCFG where if you make changes to the system + configuration data, the inappropriate action was taken when you chose to + save or cancel the changes when you exit. I don't know if this was + present in the release version of v2.16, but in the code obtained from + the author, the exact opposite operation was performed. If you decided + to abandon the changes, they got saved instead, and vice-versa. + +* Updated the PB_SDK header, and the library. Several of the data + structures in PB_SDK.H have been updated to be accurate with regard to + ProBoard v2.2 compatibility. The .LIB file has also been rebuilt to + be v2.2 compliant. + +---------------------------------------------------------------------------- + # # # +---------------------------------------------------------------------------- diff --git a/CHAT.CPP b/CHAT.CPP new file mode 100644 index 0000000..a85d42f --- /dev/null +++ b/CHAT.CPP @@ -0,0 +1,204 @@ +#include +#include +#include "proboard.hpp" + +static int near ring_bell(char *); + +static void +ask_leave_message(char *subj) +{ + io << "\n\n" << S_LEAVE_MESSAGE_TO_SYSOP; + + if(io.ask()) + { + io << "\n\xFF"; + + if(cfg.pageArea == 0) + cfg.pageArea = cfg.securityboard; + + writemsg(form("%d /T=Sysop /S=\"%s\"",cfg.pageArea,subj)); + + LOG(1,"Wrote a message to the sysop"); + } +} + +void +pagesysop(char *data) +{ + if(num_yells>=cfg.max_sysop_pages) // Paged too many times? + { + LOG(1,"Trying to page too many times"); + + if(showansascrip("MAXPAGE")==ANS_NOFILE) // Show ANS-file if available + { + io << '\n' << S_PAGED_TOO_MANY_TIMES << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + ask_leave_message(""); + } + return; // You're out of luck mate + } + + if(!cfg.pagingHours.enabled()) // Outside paging hours? + { + LOG(1,"Trying to page outside hours"); + + if(showansascrip("NOTAVAIL")==ANS_NOFILE) + { + io << '\n' + << S_PAGING_NOT_ALLOWED_RIGHT_NOW + << S_PRESS_ENTER_TO_CONTINUE; + + ask_leave_message(""); + } + + return; + } + + char reason[56]; + io << '\n' << S_ASK_CHAT_REASON; + + io.read(reason,55); + + strip_all(reason); + + if(strlen(reason)<5) + { + io << "\n\n" << S_CHAT_REASON_TOO_SHORT("5") + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; // Must be 5 chars! + } + + LOG(1,"Sysop paged: %s",reason); + + num_yells++; // Increment yell-count + io << "\n\n" << data << char(0xFF); // Show "Yelling..." + + if(!ring_bell(reason)) // Did sysop react? + { + io << "\n\n\xFF"; // No, inform user + + if(showansascrip("PAGED")==ANS_NOFILE) + { + io << S_SYSOP_NOT_RESPONDING << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + strcpy(page_reason,reason); + + ask_leave_message(reason); + + return; + } + + LOG(1,"Chat started"); // yell-count + io << "\n\xFF"; + chat(); // Start chat +} + +void +chat() +{ + if(chatflag) return; // Are we chatting already? + + rip_reset(); + + chatflag=1; // We're chatting! + + num_yells=0; // Allow yelling again + + timer.suspend(); // Suspend timer + + user_online uo; + uo.setstatus(UO_CHATTING); // Inform other users + + if(cfg.extChat[0] && (user.uFlags & (UFLAG_ANSI|UFLAG_AVATAR))) + { + if(cfg.extChat[0] == '@') + run_sdkfile(replace_stringvars(&cfg.extChat[1])); + else + shell(replace_stringvars(cfg.extChat)); + } + else + { + io << '\n' << S_SYSOP_CHAT_START << "\n\n\xFF"; + + int last=2; // Force color change! + String s,wrap; + + for(;;) + { + byte k=io.wait(); + if(k==27) + if(io.external) + continue; // Local escape pressed? + else + break; // Yep, exit + + if(k=='\t') k=' '; // I don't like TABS + + if(io.external!=last && (ansi_mode||avatar)) // Change color? + { + if(io.external) + io << (avatar?"\x16\x01\x07\xFF":"\xFF"); + else + io << (avatar?"\x16\x01\x0B\xFF":"\xFF"); + + last = io.external; // Prevent color change + } + + if(k != 8) + io << k << char(0xFF); // Show char + + switch(k) + { + case 8: + if(s.len()>0) // Backspace pressed + { + s[s.len()-1]=0; + io << "\b \b\xFF"; + } + break; + + case 13: + io << "\n\xFF"; + s = ""; // Enter pressed + break; + + default: + s << (char)k; // Any other key + } + + if(s.len()>78) // Wordwrap needed?? + { + int l = wordwrap(s,wrap,78); // Yep, do it! + + for(int i=0;i +#include +#include +#include +#include "proboard.hpp" + +void +exit_proboard(int level) +{ + if(sysop_next) + { + playsong("SYSOPNXT","\x1b",0); + File f; + f.open(FileName(syspath,"SYSOPNXT.SEM"),fmode_write|fmode_create); + f.close(); + } + + tsw_cursoron(); + SCREEN.enableCursor(); + + if(level) + exit(level); + + if( net_entered && echo_entered ) exit(5); + if( net_entered ) exit(3); + if( echo_entered ) exit(4); + + exit(0); +} + +void +nomemory() +{ + fatalerror("OUT OF MEMORY!!"); +} + +extern "C" void +cleanup() +{ + io.hangup(); + + if(!fatal) + { + for( hangup_handlers.rewind() ; !hangup_handlers.eol() ; hangup_handlers++) + { + CallPEX( &hangup_handlers.get() ); + } + } + + SCREEN.clear(); + + tsw_cursoroff(); + + Window w(tsw_hsize/2 - 14 , tsw_vsize/2 - 1 , tsw_hsize/2 + 16 , tsw_vsize/2 + 1 , 0x70 , 0); + w.open(); + + tsw_centerline(tsw_vsize/2,"UPDATING DATA FILES",0x70); + + if(!fatal && user_recnr>=0) + { + timelog tl; + tl.update(); + + user_online uo; + uo.clear(); + + user.lastDate = login_date; + user.lastTime = login_time; + user.timeUsed += timer.used(); + user.totalTimeUsed += timer.online(); + user.timesCalled++; + + if(newFilesChecked) + user.lastNewFilesCheck = user.lastDate; + + user.write(FALSE); + + BinLog bl; + + strcpy( bl.name , user.name ); + strcpy( bl.alias , user.alias ); + strcpy( bl.city , user.city ); + strcpy( bl.country , user.country ); + + bl.timeOut.now(); + + bl.date = login_date; + bl.timeIn = login_time; + bl.baud = io.baud; + bl.node = node_number; + bl.kbDown = 0; + bl.kbUp = 0; + bl.yells = num_yells; + bl.uflags = user.uFlags; + + if(io.baud || cfg.binloglocal) bl.append(); + + write_taglist(); + } + + if(!quiet && io.baud>0 && !fatal) + { + tsw_beep(1500,50); + msleep(50); + tsw_beep(1000,50); + } + + w.close(); + + tsw_cursoron(); + + SCREEN.change(1,1,tsw_hsize,tsw_vsize); + SCREEN.attrib(7); + SCREEN.clear(); + + setvideomode(org_videomode); + + if(org_numlines>=43 && org_videomode==3) set43(); +} diff --git a/CLEANUP.OBJ b/CLEANUP.OBJ new file mode 100644 index 0000000..4c491e2 Binary files /dev/null and b/CLEANUP.OBJ differ diff --git a/CLINES.BTM b/CLINES.BTM new file mode 100644 index 0000000..da4cf48 --- /dev/null +++ b/CLINES.BTM @@ -0,0 +1,92 @@ +setlocal + +set total=0 +set sizetotal=0 + +echo ---------------------------------------------------------------- +echo SOURCE FILE SIZE REPORT FOR %_DATE , %_TIME +echo. +echos PROBOARD.EXE... +cd \cpp\pb\proboard +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp *.asm) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] +echos PROCFG.EXE..... +cd \cpp\pb\procfg +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] +echos PBUTIL.EXE..... +cd \cpp\pb\pbutil +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] +echos PBLIB.LIB...... +cd \cpp\pb\lib +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] +echos CONVERT.EXE.... +cd \cpp\pb\convert +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] +echos TSLIB.LIB...... +cd \cpp\lib\tslib +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp *.asm) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] +echos TSWIN.LIB...... +cd \cpp\lib\tswin +set subtotal=0 +set sizesubtotal=0 +for %a in (*.cpp *.hpp *.asm) do ( + set subtotal=%@eval[%subtotal+%@lines[%a]+1] + set sizesubtotal=%@eval[%sizesubtotal+%@filesize[%a,b]] + ) +echo %@substr[ ,0,%@eval[6-%@len[%subtotal]]] %subtotal (%@substr[ ,0,%@eval[4-%@len[%@int[%@eval[%sizesubtotal/1024]]]]]%@int[%@eval[%sizesubtotal/1024]]k) +set total=%@eval[%total+%subtotal] +set sizetotal=%@eval[%sizetotal+%sizesubtotal] + +echo. +echo TOTAL LINES..... %total +echo TOTAL SIZE...... %@int[%@eval[%sizetotal/1024]] Kb + +endlocal + diff --git a/COMBINED.CPP b/COMBINED.CPP new file mode 100644 index 0000000..ab3f7dc --- /dev/null +++ b/COMBINED.CPP @@ -0,0 +1,138 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +void +combined_select(char *data) +{ + MsgArea ma; + bool mailcheck = FALSE; + + if(String(data) == "/M") mailcheck = TRUE; + + for(;;) + { + io << "\f\n\7"; + + if(mailcheck) + { + io << S_SELECT_AREAS_TO_SCAN_TITLE << "\n\n"; + } + else + { + io << S_SELECT_COMBINED_AREAS_TITLE << "\n\n"; + } + + linecounter(4); + io.enablestop(); + + + for(int i=1,count=0;i<=MsgArea::highAreaNum() && i<=1000;i++) + { + String checked = ' '; + + if(!ma.read(i)) + continue; + + if(!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) && !ma.sysopAccess()) + continue; + + if(mailcheck) + { + if(user.mailCheckBoards.connected(i)) + checked = 'û'; + } + else + { + if(user.combinedBoards.connected(i)) + checked = 'û'; + } + + io << form(" \3%3d. \2%s \6%-30.30s ",i,(char *)checked,ma.name); + + if(stopped) break; + + if(!((++count)%2)) + { + io << '\n'; + if(linecounter()) break; + } + } + + if(count%2) io << '\n'; + + io << '\n' << S_SELECT_AREAS_TO_TOGGLE; + + char s[41]; + + io.read(s,40); + + if(!s[0]) break; + + char *ptr = strtok(s," ,"); + + while(ptr) + { + int area = atoi(ptr); + if(area>=1 && area<=1000) + { + if(mailcheck) + { + user.mailCheckBoards.toggle(area); + LOG(3,"Area #%d toggled for mailcheck",area); + } + else + { + user.combinedBoards.toggle(area); + LOG(3,"Combined area #%d toggled",area); + } + } + + ptr = strtok(NULL," ,"); + } + } +} + +void +combined_clear(char *data) +{ + int i; + bool mailcheck = FALSE; + + if(String(data) == "/M") mailcheck = TRUE; + + io << '\n' << S_ENABLE_OR_DISABLE_ALL_AREAS; + + switch(wait_language_hotkeys(K_ENABLE_OR_DISABLE_ALL_AREAS)) + { + case 1: + { + for(i=1;i<=1000;i++) + { + if(mailcheck) + user.mailCheckBoards.disconnect(i); + else + user.combinedBoards.disconnect(i); + } + + io << S_ALL_AREAS_DISABLED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + break; + case 0: + { + for(i=1;i<=1000;i++) + { + if(mailcheck) + user.mailCheckBoards.connect(i); + else + user.combinedBoards.connect(i); + } + + io << S_ALL_AREAS_ENABLED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + break; + } +} + diff --git a/COMBINED.OBJ b/COMBINED.OBJ new file mode 100644 index 0000000..38e14f6 Binary files /dev/null and b/COMBINED.OBJ differ diff --git a/Copyright Files.doc b/Copyright Files.doc new file mode 100644 index 0000000..b77bc18 Binary files /dev/null and b/Copyright Files.doc differ diff --git a/DECKEY.CPP b/DECKEY.CPP new file mode 100644 index 0000000..b355b02 --- /dev/null +++ b/DECKEY.CPP @@ -0,0 +1,339 @@ +#include +#include +#include +#include +#include + +static byte *inbuf; +static byte *outbuf; +static int inputsize,outputsize; +static int input_ptr; +static int output_ptr; + +#define N 4096 /* buffer size */ +#define F 60 /* lookahead buffer size */ +#define THRESHOLD 2 +#define NIL N /* leaf of tree */ + +static byte *text_buf; + +/* Huffman coding */ + +#define N_CHAR (256 - THRESHOLD + F) + /* kinds of characters (character code = 0..N_CHAR-1) */ +#define T (N_CHAR * 2 - 1) /* size of table */ +#define R (T - 1) /* position of root */ +#define MAX_FREQ 0x8000 /* updates tree when the */ + + +/* table for encoding and decoding the upper 6 bits of position */ + +/* for decoding */ +static byte d_code[256] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, + 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, + 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, + 0x0C, 0x0C, 0x0C, 0x0C, 0x0D, 0x0D, 0x0D, 0x0D, + 0x0E, 0x0E, 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, + 0x10, 0x10, 0x10, 0x10, 0x11, 0x11, 0x11, 0x11, + 0x12, 0x12, 0x12, 0x12, 0x13, 0x13, 0x13, 0x13, + 0x14, 0x14, 0x14, 0x14, 0x15, 0x15, 0x15, 0x15, + 0x16, 0x16, 0x16, 0x16, 0x17, 0x17, 0x17, 0x17, + 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1A, 0x1B, 0x1B, + 0x1C, 0x1C, 0x1D, 0x1D, 0x1E, 0x1E, 0x1F, 0x1F, + 0x20, 0x20, 0x21, 0x21, 0x22, 0x22, 0x23, 0x23, + 0x24, 0x24, 0x25, 0x25, 0x26, 0x26, 0x27, 0x27, + 0x28, 0x28, 0x29, 0x29, 0x2A, 0x2A, 0x2B, 0x2B, + 0x2C, 0x2C, 0x2D, 0x2D, 0x2E, 0x2E, 0x2F, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, +}; + +static byte d_len[256] = { + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, +}; + +static word freq[T + 1]; /* frequency table */ + +static int prnt[T + N_CHAR]; /* pointers to parent nodes, except for the */ + /* elements [T..T + N_CHAR - 1] which are used to get */ + /* the positions of leaves corresponding to the codes. */ + +static int son[T]; /* pointers to child nodes (son[], son[] + 1) */ + +static word getbuf; +static byte getlen; + +static int GetBit(void) /* get one bit */ +{ + word i; + + while (getlen <= 8) { + if(input_ptr >= inputsize) + { + i = 0; + } + else + { + i = inbuf[input_ptr++]; + } + getbuf |= i << (8 - getlen); + getlen += 8; + } + i = getbuf; + getbuf <<= 1; + getlen--; + return (int)((i & 0x8000) >> 15); +} + +static int GetByte(void) /* get one byte */ +{ + word i; + + while (getlen <= 8) { + if(input_ptr >= inputsize) + { + i = 0; + } + else + { + i = inbuf[input_ptr++]; + } + getbuf |= i << (8 - getlen); + getlen += 8; + } + i = getbuf; + getbuf <<= 8; + getlen -= 8; + return (int)((i & 0xff00) >> 8); +} + +/* initialization of tree */ + +static void StartHuff(void) +{ + int i, j; + + for (i = 0; i < N_CHAR; i++) { + freq[i] = 1; + son[i] = i + T; + prnt[i + T] = i; + } + i = 0; j = N_CHAR; + while (j <= R) { + freq[j] = freq[i] + freq[i + 1]; + son[j] = i; + prnt[i] = prnt[i + 1] = j; + i += 2; j++; + } + freq[T] = 0xffff; + prnt[R] = 0; +} + + +/* reconstruction of tree */ + +static void reconst(void) +{ + int i, j, k; + word f, l; + + /* collect leaf nodes in the first half of the table */ + /* and replace the freq by (freq + 1) / 2. */ + j = 0; + for (i = 0; i < T; i++) { + if (son[i] >= T) { + freq[j] = (freq[i] + 1) / 2; + son[j] = son[i]; + j++; + } + } + /* begin constructing tree by connecting sons */ + for (i = 0, j = N_CHAR; j < T; i += 2, j++) { + k = i + 1; + f = freq[j] = freq[i] + freq[k]; + for (k = j - 1; f < freq[k]; k--); + k++; + l = (j - k) * 2; + memmove(&freq[k + 1], &freq[k], l); + freq[k] = f; + memmove(&son[k + 1], &son[k], l); + son[k] = i; + } + /* connect prnt */ + for (i = 0; i < T; i++) { + if ((k = son[i]) >= T) { + prnt[k] = i; + } else { + prnt[k] = prnt[k + 1] = i; + } + } +} + + +/* increment frequency of given code by one, and update tree */ + +static void update(int c) +{ + int i, j, k, l; + + if (freq[R] == MAX_FREQ) { + reconst(); + } + c = prnt[c + T]; + do { + k = ++freq[c]; + + /* if the order is disturbed, exchange nodes */ + if ((word)k > freq[l = c + 1]) { + while ((word)k > freq[++l]); + l--; + freq[c] = freq[l]; + freq[l] = k; + + i = son[c]; + prnt[i] = l; + if (i < T) prnt[i + 1] = l; + + j = son[l]; + son[l] = i; + + prnt[j] = c; + if (j < T) prnt[j + 1] = c; + son[c] = j; + + c = l; + } + } while ((c = prnt[c]) != 0); /* repeat up to root */ +} + +static int DecodeChar(void) +{ + word c; + + c = son[R]; + + /* travel from root to leaf, */ + /* choosing the smaller child node (son[]) if the read bit is 0, */ + /* the bigger (son[]+1} if 1 */ + while (c < T) { + c += GetBit(); + c = son[c]; + } + c -= T; + update(c); + return (int)c; +} + +static int DecodePosition(void) +{ + word i, j, c; + + /* recover upper 6 bits from table */ + i = GetByte(); + c = (word)d_code[i] << 6; + j = d_len[i]; + + /* read lower 6 bits verbatim */ + j -= 2; + while (j--) { + i = (i << 1) + GetBit(); + } + return (int)(c | (i & 0x3f)); +} + +static void Decode(void) /* recover */ +{ + int i, j, k, r, c; + int count; + + StartHuff(); + for (i = 0; i < N - F; i++) + text_buf[i] = 0x20; + r = N - F; + for (count = 0; count < outputsize; ) { + c = DecodeChar(); + if (c < 256) { + outbuf[output_ptr++] = c; + text_buf[r++] = (byte)c; + r &= (N - 1); + count++; + } else { + i = (r - DecodePosition() - 1) & (N - 1); + j = c - 255 + THRESHOLD; + for (k = 0; k < j; k++) { + c = text_buf[(i + k) & (N - 1)]; + outbuf[output_ptr++] = c; + text_buf[r++] = (byte)c; + r &= (N - 1); + count++; + } + } + } +} + +void +decompress_data(byte *input,byte *output,int insize,int outsize) +{ + text_buf = new byte[N + F - 1]; + + inputsize = insize; + outputsize = outsize; + inbuf = input; + outbuf = output; + input_ptr = 0; + output_ptr = 0; + + getbuf = 0; + getlen = 0; + + Decode(); + + delete [] text_buf; +} diff --git a/DECKEY.OBJ b/DECKEY.OBJ new file mode 100644 index 0000000..b07185f Binary files /dev/null and b/DECKEY.OBJ differ diff --git a/DESQVIEW.ASM b/DESQVIEW.ASM new file mode 100644 index 0000000..1f9e306 --- /dev/null +++ b/DESQVIEW.ASM @@ -0,0 +1,50 @@ + +% MODEL MEM_MOD + +public _DV_timeslice +public _DV_start_critical +public _DV_end_critical + +extrn _desqview : WORD + + CODESEG + +PROC API near + push ax + cmp [_desqview],0 + je no + mov ax,101Ah + int 15h + mov ax,bx + int 15h + mov ax,1025h + int 15h + jmp short end_api +no: + mov ax,1680h + int 2fh +end_api: + pop ax + ret +ENDP API + +PROC _DV_timeslice + mov bx,1000h + call API + ret +ENDP _DV_timeslice + +PROC _DV_start_critical + mov bx,101Bh + call API + ret +ENDP _DV_start_critical + +PROC _DV_end_critical + mov bx,101Bh + call API + ret +ENDP _DV_end_critical + + END + diff --git a/DESQVIEW.HPP b/DESQVIEW.HPP new file mode 100644 index 0000000..a2e452e --- /dev/null +++ b/DESQVIEW.HPP @@ -0,0 +1,6 @@ +extern "C" + { + void DV_timeslice(); + void DV_start_critical(); + void DV_end_critical(); + } diff --git a/DESQVIEW.LST b/DESQVIEW.LST new file mode 100644 index 0000000..a1b153c --- /dev/null +++ b/DESQVIEW.LST @@ -0,0 +1,96 @@ +Turbo Assembler Version 3.1 05/19/99 18:58:12 Page 1 +desqview.asm + + + + 1 + 2 % MODEL MEM_MOD +1 3 0000 MODEL LARGE + 4 + 5 public _DV_timeslice + 6 public _DV_start_critical + 7 public _DV_end_critical + 8 + 9 extrn _desqview : WORD + 10 + 11 0000 CODESEG + 12 + 13 0000 PROC API near + 14 0000 50 push ax + 15 0001 83 3E 0000e 00 cmp [_desqview],0 + 16 0006 74 10 je no + 17 0008 B8 101A mov ax,101Ah + 18 000B CD 15 int 15h + 19 000D 8B C3 mov ax,bx + 20 000F CD 15 int 15h + 21 0011 B8 1025 mov ax,1025h + 22 0014 CD 15 int 15h + 23 0016 EB 05 jmp short end_api + 24 0018 no: + 25 0018 B8 1680 mov ax,1680h + 26 001B CD 2F int 2fh + 27 001D end_api: + 28 001D 58 pop ax + 29 001E C3 ret + 30 001F ENDP API + 31 + 32 001F PROC _DV_timeslice + 33 001F BB 1000 mov bx,1000h + 34 0022 E8 FFDB call API + 35 0025 CB ret + 36 0026 ENDP _DV_timeslice + 37 + 38 0026 PROC _DV_start_critical + 39 0026 BB 101B mov bx,101Bh + 40 0029 E8 FFD4 call API + 41 002C CB ret + 42 002D ENDP _DV_start_critical + 43 + 44 002D PROC _DV_end_critical + 45 002D BB 101B mov bx,101Bh + 46 0030 E8 FFCD call API + 47 0033 CB ret + 48 0034 ENDP _DV_end_critical + 49 + 50 END + Turbo Assembler Version 3.1 05/19/99 18:58:12 Page 2 +Symbol Table + + + + +Symbol Name Type Value + +??DATE Text "05/19/99" +??FILENAME Text "desqview" +??TIME Text "18:58:12" +??VERSION Number 030A +@32BIT Text 0 +@CODE Text DESQVIEW_TEXT +@CODESIZE Text 1 +@CPU Text 0101H +@CURSEG Text DESQVIEW_TEXT +@DATA Text DGROUP +@DATASIZE Text 1 +@FILENAME Text DESQVIEW +@INTERFACE Text 00H +@MODEL Text 5 +@STACK Text DGROUP +@WORDSIZE Text 2 +API (API) Near DESQVIEW_TEXT:0000 +END_API Near DESQVIEW_TEXT:001D +MEM_MOD Text LARGE +NO Near DESQVIEW_TEXT:0018 +_DESQVIEW (_desqview) Word ----:---- Extern +_DV_END_CRITICAL + Far DESQVIEW_TEXT:002D +(_DV_end_critical) +_DV_START_CRITICAL + Far DESQVIEW_TEXT:0026 +(_DV_start_critical) +_DV_TIMESLICE (_DV_timeslice) Far DESQVIEW_TEXT:001F + +Groups & Segments Bit Size Align Combine Class + +DESQVIEW_TEXT 16 0034 Word Public CODE +DGROUP Group + _DATA 16 0000 Word Public DATA + \ No newline at end of file diff --git a/DESQVIEW.OBJ b/DESQVIEW.OBJ new file mode 100644 index 0000000..7dc647f Binary files /dev/null and b/DESQVIEW.OBJ differ diff --git a/DL.CPP b/DL.CPP new file mode 100644 index 0000000..6320e54 --- /dev/null +++ b/DL.CPP @@ -0,0 +1,759 @@ +#define Use_TagList +#define Use_LinkedList + +#include +#include +#include +#include +#include +#include "proboard.hpp" + +struct InputFile + { + int area; + String name; + + InputFile(); + InputFile(char *s); + InputFile(char *s , int area); + }; + +const int MAX_DOWNLOADS = 100; + +void create_dirlist(int area,char *firstdir,LinkedList& dirlist); +bool is_freefile(char *fname); +bool send_files( protocol& p , LinkedList& files ,LinkedList& downloads , LinkedList& uploads); +void read_personal_files( LinkedList& files ); +void delete_personal_file( char *name ); +void copy_cdrom( LinkedList &files , LinkedList &copied); +void delete_copied ( LinkedList &copied); + +void process_uploads(protocol& p , char *dir , LinkedList& uploads , bool pvt , bool ask_desc , bool no_log , bool quiet_dl , String extra_log ); + +bool check_dszlog(protocol& p , LinkedList& downloads , LinkedList& uploads); +bool create_dszctl(protocol& p , LinkedList& files); + +static void +read_from_file(LinkedList& input_files , char *fn) +{ + TextFile f(fn); + + if(f.opened()) + { + while(!f.eof()) + { + String s = f.readLine(); + + s.delLast('\n'); + s.trim(); + + if(!s.len()) continue; + + input_files.add(InputFile(s)); + } + } +} + + +void +download(char *data) +{ + bool no_input = FALSE; + bool any_file = FALSE; + bool private_download = FALSE; + bool free_time = FALSE; + char protocol_key = '\0'; + bool quiet_download = FALSE; + bool goodbye = FALSE; + bool ignore_kbytes = FALSE; + bool no_log = FALSE; + bool ask_description = TRUE; + int npara; + int i; + long total_bytes; + long free_bytes; + String param[20]; + BitArray arealist(MAX_FILE_AREAS,1); + LinkedList files; + LinkedList input_files; + LinkedList copied_to_cd; + protocol prot; + FileName extra_log; + + npara = parse_data(data,param); // Parse command line + + create_arealist(param,npara,arealist); // Create list of selected file areas + + adjust_limits(); + + for(i=0 ; i dirlist; + + create_dirlist(idx.area,fa.filepath,dirlist); + + for( dirlist.rewind() ; !dirlist.eol() && files_found < MAX_DOWNLOADS ; dirlist++) + { + String wildcard = dirlist.get(); + + wildcard << idx.name; + + DirScan scan(wildcard); + + while(int(scan) && files_found < MAX_DOWNLOADS) + { + DownloadFile tmpfile; + + tmpfile.area = idx.area; + tmpfile.size = scan.size(); + tmpfile.free = FALSE; + tmpfile.copy = !!fa.cdrom; + tmpfile.name = dirlist.get() + scan.name(); + + files.add(tmpfile); + files_found++; + + scan++; + } + } + } + } + } + else + { + LOG("Error opening FILESIDX.PB"); + } + } + + total_bytes = 0; + free_bytes = 0; + + if(!quiet_download) + { + io << '\n'; + + if(files.count()) + { + io << '\n' << S_DOWNLOAD_FILES_FOUND_HEADER << '\n'; + } + + for(files.rewind() ; !files.eol() ; ) + { + FileArea fa; + FileName fn; + String area_name; + + fn = files.get().name; + fn.stripPath(); + + if(files.get().area) + { + fa.read(files.get().area); + area_name = fa.name; + } + else + { + if(private_download) + area_name = "Personal Files"; + else + area_name = "Global"; + } + + io << S_DOWNLOAD_FILE_FOUND_ENTRY((char *)fn,form("%ld",(files.get().size+512L) / 1024L),(char *)area_name); + + files.get().free = (fa.free || is_freefile((char *)fn)); + + if((total_bytes - free_bytes + files.get().size + user.kbToday*1024L) > (1024L*download_limit) && !files.get().free) + { + io << S_FILE_EXCEEDS_LIMIT(form("%u",download_limit)) << '\n'; + + files.remove(); + } + else + { + if(upload_needed > 0 && !files.get().free) + { + io << S_UPLOAD_REQUIRED(form("%u",upload_needed)) << '\n'; + + files.remove(); + } + else + { + io << S_FILE_FOUND_ACTION_PROMPT; + + char action = wait_language_hotkeys(K_FILE_FOUND_ACTION_PROMPT); + + int prompt_len = language_string_length(S_FILE_FOUND_ACTION_PROMPT); + + io << String('\b',prompt_len) << String(' ',prompt_len) << String('\b',prompt_len); + + switch(action) + { + case '\r': + case 0: + { + io << S_ACTION_DOWNLOAD << ' '; + + if(files.get().free) + { + io << S_FREE_FILE; + + free_bytes += files.get().size; + } + + total_bytes += files.get().size; + + io << '\n'; + files++; + } + break; + case 1 : + { + io << S_ACTION_FILE_SKIPPED << '\n'; + + files.remove(); + } + break; + case 2 : + { + io << S_ACTION_FILE_QUIT << '\n'; + + while(!files.eol()) files.remove(); + } + break; + } + } + } + } + + if(!files.count()) + { + io << '\n' << S_NO_FILES_FOUND << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + word estimated = word(total_bytes / ((io.baud ? io.baud:115200L) * (prot.efficiency?prot.efficiency:100)/1000L)); + + if(prot.flags & PROT_LOCAL) + estimated = 0; + + io << '\n' << S_X_FILES_SELECTED(form("%d",files.count()),form("%d",int(total_bytes/1024)),form("%02u:%02u",estimated/60,estimated%60)) << '\n'; + + if(!free_time && estimated/60>timer.left()) + { + io << '\n' << S_NOT_ENOUGH_TIME_LEFT_FOR_DOWNLOAD << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + io << '\n' << S_START_DOWNLOAD_PROMPT; + + char k = wait_language_hotkeys(K_START_DOWNLOAD_PROMPT); + + if(k==2) + return; + + if(k==1) + { + io << S_DOWNLOAD_ACTION_GOODBYE; + + goodbye = TRUE; + } + + io << "\n\n"; + + copy_cdrom( files , copied_to_cd); + + io << "\n\n" << S_ACTIVATING_PROTOCOL << '\xFF'; + } + + LinkedList downloads,uploads; + + if(free_time) timer.suspend(); + + if(!send_files(prot , files , downloads , uploads)) + { + delete_copied(copied_to_cd); + + return; + } + + delete_copied(copied_to_cd); + + if(free_time) timer.restart(); + + total_bytes = 0; + free_bytes = 0; + files_found = 0; + + for(downloads.rewind() ; !downloads.eol() ; downloads++) + { + for(files.rewind() ; !files.eol() ; ) + { + FileName fn(files.get().name); + + fn.stripPath(); + + if(downloads.get() == fn) + { + total_bytes += files.get().size; + + if(files.get().free) + free_bytes += files.get().size; + + remove_tag(fn,files.get().area); + + if(private_download) + delete_personal_file(files.get().name); + + files_found++; + + File f; + + if(extra_log.len()) + { + f.open(extra_log,fmode_copen | fmode_text | fmode_append | fmode_write); + + f.printf("D %d %s %ld %s\n",files.get().area,(char *)files.get().name,files.get().size,files.get().free ? "YES":"NO"); + f.close(); + } + + if(!no_log) + { + f.open(FileName(syspath,"DOWNLOAD.LOG"),fmode_write | fmode_append | + fmode_copen | fmode_text); + + f.printf("%05d %s\n",files.get().area,(char *)files.get().name); + f.close(); + + LOG(1,"Download-%c %s",prot.key,(char *)fn); + } + + files.remove(); + } + else + { + files++; + } + } + } + + if(!ignore_kbytes) + { + user.numDownloads += files_found; + user.kbDownloaded += int((total_bytes-free_bytes) / 1024L); + user.kbToday += int((total_bytes-free_bytes) / 1024L); + } + + if(!quiet_download) + { + io << "\n\f\n" << S_X_FILES_DOWNLOADED_SUCCESSFULLY(form("%d",files_found),form("%ld",total_bytes/1024L)) << "\n\n"; + + if(files.count()) + io << S_X_FILES_NOT_DOWNLOADED(form("%d",files.count())) << "\n\n"; + + if(goodbye && !files.count() && !uploads.count()) + { + unlink(prot.logfile); + unlink(prot.ctlfile); + + io << "\n\n" << S_HANGUP_AFTER_DOWNLOAD_PROMPT << "10"; + + for(int i=10;i>0;i--) + { + io << form("\b\b%2d\xFF",i); + + char c = toupper(io.readkey()); + + if(c==K_HANGUP_AFTER_DOWNLOAD_PROMPT[0]) return; + if(c==K_HANGUP_AFTER_DOWNLOAD_PROMPT[1]) break; + + sleep(1); + } + + LOG("Hanging up after download."); + + showansascrip("DLHANGUP"); + + exit_proboard(); + } + + if(uploads.count()) + process_uploads(prot,cfg.uploadpath,uploads,private_download , ask_description , no_log , quiet_download , extra_log ); + + io << S_PRESS_ENTER_TO_CONTINUE; + } +} + +void +read_personal_files( LinkedList& files ) +{ + File f(FN_PVTFILES_PB); + + if(!f.opened()) return; + + f.rewind(); + + for(;;) + { + _PrivateFile pvt; + + if(f.read(&pvt,sizeof(pvt)) != sizeof(pvt)) + break; + + if(strcmpl(pvt.to,user.name) || !pvt.fname[0]) continue; + + String fname; + + if(!strchr(pvt.fname,'\\')) + fname = String(cfg.pvtuploadpath) + pvt.fname; + else + fname = pvt.fname; + + DirScan scan(fname); + + if(int(scan)) + files.add( InputFile(fname) ); + } +} + +void +delete_personal_file( char *name ) +{ + File f(FN_PVTFILES_PB,fmode_rw | fmode_excl); + + if(!f.opened()) + return; + + FileName fn; + FileName fn_full( name ); + + _PrivateFile pvt; + + int num_found = 0; + + for(;;) + { + if(f.read(&pvt,sizeof(pvt))!=sizeof(pvt)) break; + + if(!pvt.fname[0]) + continue; + + if(!strchr(pvt.fname,'\\')) + fn = String(cfg.pvtuploadpath) + pvt.fname; + else + fn = pvt.fname; + + if(fn == fn_full) + num_found++; + } + + f.rewind(); + + for(;;) + { + if(f.read(&pvt,sizeof(pvt))!=sizeof(pvt)) break; + + if(!pvt.fname[0] || stricmp(pvt.to,user.name)) + continue; + + if(!strchr(pvt.fname,'\\')) + fn = String(cfg.pvtuploadpath) + pvt.fname; + else + fn = pvt.fname; + + if(fn_full == fn) + { + pvt.fname[0]=0; + + f.seek(-long(sizeof(pvt)),seek_cur); + f.write(&pvt,sizeof(pvt)); + + if(pvt.attr & PVTFILE_KEEP) + continue; + + if(num_found < 2) // Only kill file if not waiting for oher user + unlink(fn_full); + } + } +} + +InputFile::InputFile() +{ + area = 0; +} + +InputFile::InputFile(char *s) +{ + area = 0; + + if(s[0] == '[') + { + area = atoi(&s[1]); + + for(int i=0; s[i] ; i++) + { + if(s[i] == ']') + { + name = &s[i+1]; + return; + } + } + } + + name = s; +} + +InputFile::InputFile(char *s,int a) +{ + name = s; + area = a; +} diff --git a/DL.OBJ b/DL.OBJ new file mode 100644 index 0000000..fecf8c6 Binary files /dev/null and b/DL.OBJ differ diff --git a/DSZCTL.TXT b/DSZCTL.TXT new file mode 100644 index 0000000..88702dc --- /dev/null +++ b/DSZCTL.TXT @@ -0,0 +1,10 @@ +P:\BBS\FILES\PROBOARD\PB_201.ZIP +P:\BBS\FILES\PROBOARD\GSZ0203.ZIP +P:\BBS\FILES\PROBOARD\HCOM_108.ZIP +P:\BBS\FILES\PROBOARD\HS121.ZIP +P:\BBS\FILES\PROBOARD\IZMBETA1.ZIP +P:\BBS\FILES\PROBOARD\MPMOD160.ZIP +P:\BBS\FILES\PROBOARD\MPT110.ZIP +P:\BBS\FILES\PROBOARD\SDP101G.ZIP +P:\BBS\FILES\PROBOARD\SDPF101G.ZIP +P:\BBS\FILES\PROBOARD\SZMOD160.ZIP diff --git a/DSZLOG.TXT b/DSZLOG.TXT new file mode 100644 index 0000000..e69de29 diff --git a/EGA.ASM b/EGA.ASM new file mode 100644 index 0000000..020e8a9 --- /dev/null +++ b/EGA.ASM @@ -0,0 +1,68 @@ +% MODEL MEM_MOD + +public _set43,_set25,_setvideomode,_getvideomode + + CODESEG + +PROC _set43 + push bp + push si + push di + + mov ax,1112h + xor bx,bx + int 10h + + pop di + pop si + pop bp + ret +ENDP _set43 + +PROC _set25 + push bp + push si + push di + + mov ax,3 + int 10h + + pop di + pop si + pop bp + ret +ENDP _set25 + +PROC _getvideomode + push bp + push si + push di + + mov ax,0f00h + int 10h + xor ah,ah + + pop di + pop si + pop bp + ret +ENDP _getvideomode + +PROC _setvideomode + ARG mode:WORD + push bp + mov bp,sp + push si + push di + + mov ax,[mode] + int 10h + + pop di + pop si + pop bp + ret +ENDP _setvideomode + +END + diff --git a/EGA.OBJ b/EGA.OBJ new file mode 100644 index 0000000..836d106 Binary files /dev/null and b/EGA.OBJ differ diff --git a/EVENT.CPP b/EVENT.CPP new file mode 100644 index 0000000..3d0ab17 --- /dev/null +++ b/EVENT.CPP @@ -0,0 +1,73 @@ +#include "proboard.hpp" + +int +event::minutesleft() +{ + Date today(TODAY); + Time now(NOW); + + int nowminutes=now[0]*60+now[1]; + + int min=10080; + + if(enabled) + for(int i=0;i<7;i++) + { + int day = today.weekDay()+i; + + if(day>6) day-=7; + + if(!(days&(1<6) day -= 7; + + if(!(days&(1< #words + shl cx,1 + shl cx,1 + + cld + xor si,si + xor di,di + rep movsw ; transfer data to page frame + + mov ah,45h + int 67h ; Free EMS + + + jmp short @@quit + +@@use_file: + push ds + + mov ax,cs + mov ds,ax + assume ds:@Code + + mov ax,3D00h + mov dx,offset swapname + int 21h ; open swap-file + mov bx,ax + + pop ds + +@@loopke: + cmp cx,0F00h + jb @@remainder + + push cx + + mov cx,0F000h + xor dx,dx + mov ax,3F00h + int 21h + + pop cx + sub cx,0F00h + mov ax,ds + add ax,0F00h + mov ds,ax + jmp short @@loopke + +@@remainder: + shl cx,1 + shl cx,1 + shl cx,1 + shl cx,1 + xor dx,dx + mov ax,3F00h + int 21h + + mov ax,3E00h + int 21h ; close file + + mov ax,cs + mov ds,ax + mov dx,offset swapname + mov ax,4100h + int 21h + +@@quit: + pop es + pop di + pop si + pop dx + pop cx + pop bx + pop ax + pop ds + ret +ENDP read_para + +PROC disp NEAR + push cx + push si + push di + push bp + + cmp al,0ah + jne no_lf + + mov cx,[cs:num_lines] + dec cx + + inc [cs:cur_y] + cmp [cs:cur_y],cx ; At bottom of screen? + jne upd_cursor + dec [cs:cur_y] ; Yep, scroll up + jmp short scroll_up + +no_lf: + cmp al,0dh + jne no_cr + + mov [cs:cur_x],0 + jmp short upd_cursor + +no_cr: + cmp al,8 + jne no_bs + + cmp [cs:cur_x],0 + je @@ok + dec [cs:cur_x] + jmp short upd_cursor + +no_bs: + mov ah,0eh + xor bx,bx + int 10h + + mov cx,[cs:num_cols] + + inc [cs:cur_x] + cmp [cs:cur_x],cx ; At right of window? + jne @@ok + mov [cs:cur_x],0 ; Yep, linefeed + inc [cs:cur_y] + + mov cx,[cs:num_lines] + dec cx + + cmp [cs:cur_y],cx ; At bottom of screen + jne upd_cursor + dec [cs:cur_y] + +scroll_up: + mov ax,0601h + mov cx,0000h + mov dl,4Fh + mov dh,[byte cs:num_lines] + dec dh + dec dh + mov bh,7 + int 10h + +upd_cursor: + mov ah,2 + mov bh,0 + mov dh,[byte cs:cur_y] + mov dl,[byte cs:cur_x] + int 10h +@@ok: + pop bp + pop di + pop si + pop cx + ret +ENDP disp + + +PROC new21 + cmp ah,2 + je catch + cmp ah,6 + jne test_9 + cmp dl,0ffh + jne catch +test_9: + cmp ah,9 + je catch + cmp ah,40h + jne nocatch + cmp bx,1 + je catch + cmp bx,2 + je catch + +nocatch: + jmp [cs:old21] + +catch: + push ax + push bx + push cx + push dx + push si + push di + push bp + push ds + push es + + cmp ah,2 + jne no_2 + + mov al,dl + call disp + jmp short done_catch + +no_2: + cmp ah,6 + jne no_6 + mov al,dl + call disp + jmp short done_catch + +no_6: + cmp ah,9 + jne no_9 + + mov si,dx + +@@l: mov al,[ds:si] + cmp al,'$' + je done_catch + call disp + inc si + jmp short @@l + +no_9: + mov si,dx + +@@l2: + or cx,cx + jz ret_40 + + mov al,[ds:si] + call disp + inc si + dec cx + jmp short @@l2 + +ret_40: + pop es + pop ds + pop bp + pop di + pop si + pop dx + pop cx + pop bx + pop ax + mov ax,cx + clc + iret + +done_catch: + pop es + pop ds + pop bp + pop di + pop si + pop dx + pop cx + pop bx + pop ax + iret +ENDP new21 + +timer_val dw 0 + +PROC new1c + push ax + inc [cs:timer_val] + mov ax,[cs:timer_val] + and ax,7 + jnz @@nodisp + + push cx + push si + push di + push bp + push ds + push es + + push cs + pop ds + assume ds:@Code + + les di,[videoptr] + mov si,offset displayline + cld + mov cx,80 + rep movsw + + pop es + pop ds + pop bp + pop di + pop si + pop cx + +@@nodisp: + pop ax + + jmp [cs:old1c] +ENDP new1c + +startswap: ; all data/code past this point can be + ; swapped (who cares!) + +PROC _swapshell + ARG command:PTR + push bp + mov bp,sp + push ds + push si + push di + + mov ax,ds + mov [cs:data_seg],ax + + mov ax,[_tsw_vsize] + mov [cs:num_lines],ax + + mov ax,[_tsw_hsize] + mov [cs:num_cols],ax + + mov ax,[_shell_swap] + mov [cs:swapmode],ax + + mov al,[_use_ems] + mov [cs:use_ems],al + + call near install_isr + + mov ax,[__psp] ; store psp for future use + mov [cs:saved_psp],ax + + mov si,offset _shell_swapname + push cs + pop es + mov di,offset swapname + mov cx,13 + cld + rep movsb + + lds si,[command] + mov di,offset prgname +@@lp: + mov al,[si] + cmp al,' ' + je @@qt + or al,al + je @@qt + mov [cs:di],al + inc si + inc di + jmp short @@lp +@@qt: + mov [byte cs:di],0 + mov al,[si] + inc si + cmp al,' ' + je @@qt + + dec si + + mov cx,0 + mov di,offset comline +@@lp2: + mov al,[si] + or al,al + je @@qt2 + mov [cs:di],al + inc si + inc di + inc cx + jmp short @@lp2 +@@qt2: + mov [byte cs:di],13 + mov di,offset comlen + mov [cs:di],cl + + mov ax,@Code ; ds = code segment + mov ds,ax + assume ds:@Code ; tell Tasm where ds points to + + mov [main_ss],ss ; save compiler stack + mov [main_sp],sp + + mov ax,cs + cli + mov ss,ax ; set my own stack + mov sp,offset newstackptr + sti + + mov ax,[saved_psp] ; get psp address + dec ax ; get address of MCB + mov es,ax + mov ax,[es:3] ; get number of paragraphs reserved + mov [numpara],ax ; and store it + + mov bx,offset startswap ; we can swap from this point + mov cl,4 + shr bx,cl ; convert to # paragraphs + add bx,@Code + mov ax,[saved_psp] ; how many paragraphs + sub bx,ax ; must remain? + add bx,2 ; 2 extra paragraphs (safe!) + mov es,ax ; es <- psp + + mov [savedpara],bx ; store it + push bx ; push number of paragraphs + push es ; push psp address + + mov cx,[numpara] ; get number of paragraphs reserved + sub cx,bx ; calculate # paragraphs to save + + mov [swapsize],cx ; store for later use + mov ax,es ; get psp + add ax,bx ; calculate address for swap-start + mov [swapseg],ax ; store for later use + + push ds ; save data segment + + cmp [swapmode],0 + je @@nowrite + + mov ds,ax ; set ds to region to save + call near write_para ; save file + +@@nowrite: + pop ds + + mov ah,19h ; + int 21h ; Save current disk + mov [byte old_disk],al ; + + mov si,offset old_dir+1 ; + mov dl,0 ; Save current directory + mov ah,47h ; + int 21h ; + + pop es + pop bx + + call near shrink_exec + + cli + mov ss,[main_ss] ; restore compiler stack + mov sp,[main_sp] + sti + + call near remove_isr + + pop di + pop si + pop ds + pop bp + mov ax,[cs:retval] ; set return value + ret +ENDP _swapshell + +PROC write_para NEAR ; write cx paragraphs from ds:0 + push ds + push ax + push bx + push cx + push dx + push si + push di + push es + + cmp [cs:use_ems],0 + je @@use_file + + mov ah,40h + int 67h + or ah,ah + jnz @@use_file + + push cx + mov bx,cx + mov cl,10 + shr bx,cl + inc bx + pop cx + + mov ah,43h + int 67h + or ah,ah + jnz @@use_file + mov [cs:ems_handle],dx + + mov ah,41h + int 67h + mov es,bx ; es = page frame + xor bx,bx ; bx = logical page index + +@@ems_loop: + cmp cx,0400h + jb @@ems_remainder + + push cx + + mov ax,4400h + int 67h ; map page bx to phys.page 0 + + mov cx,02000h + cld + xor si,si + xor di,di + rep movsw ; transfer data to page frame + inc bx + + pop cx + sub cx,0400h + mov ax,ds + add ax,0400h + mov ds,ax + jmp short @@ems_loop + +@@ems_remainder: + mov ax,4400h + int 67h ; map page bx to phys.page 0 + + shl cx,1 ; Convert # paragraphs -> #words + shl cx,1 + shl cx,1 + + cld + xor si,si + xor di,di + rep movsw ; transfer data to page frame + + jmp short @@quit + + +@@use_file: + mov [cs:use_ems],0 + + push ds + push cx + + push cs + pop ds + + mov dx,offset swapname + mov ax,3c00h ; Create + xor cx,cx ; swap-file + int 21h + + pop cx + pop ds + mov bx,ax + +@@loopke: + cmp cx,0F00h + jb @@remainder + + push cx + + mov cx,0F000h + xor dx,dx + mov ax,4000h + int 21h + + pop cx + sub cx,0F00h + mov ax,ds + add ax,0F00h + mov ds,ax + jmp short @@loopke + +@@remainder: + shl cx,1 + shl cx,1 + shl cx,1 + shl cx,1 + xor dx,dx + mov ax,4000h + int 21h + + mov ax,3E00h + int 21h + +@@quit: + pop es + pop di + pop si + pop dx + pop cx + pop bx + pop ax + pop ds + ret +ENDP write_para + + +PROC install_isr NEAR + push ax + push bx + push cx + push dx + push ds + push es + push si + push di + push bp + + mov ax,[cs:data_seg] + mov ds,ax + + cmp [_shell_windowed],0 + je @@nowindow + + mov ax,3521h + int 21h + mov ax,es + mov [cs:old21_seg],ax + mov [cs:old21_off],bx + mov ax,2521h + mov dx,offset new21 + push ds + push cs + pop ds + int 21h + pop ds + + mov [cs:cur_x],0 + mov [cs:cur_y],0 + + mov ax,0600h + mov cx,0 + mov dl,4Fh + mov dh,[byte cs:num_lines] + dec dh + dec dh + mov bh,7 + int 10h + mov dx,0 + mov bh,0 + mov ah,2 + int 10h + +@@nowindow: + cmp [_shell_updateline],0 + je @@notupdated + + mov ax,351Ch + int 21h + mov ax,es + mov [cs:old1c_seg],ax + mov [cs:old1c_off],bx + mov ax,251Ch + mov dx,offset new1c + push ds + push cs + pop ds + int 21h + pop ds + + push ds + mov ax,[_shell_updateline] + dec ax + mov cx,[cs:num_cols] + shl cx,1 + mul cx + + lds si,[_tsw_videobase] + add si,ax + + mov ax,ds + mov [cs:video_seg],ax + mov [cs:video_off],si + + mov ax,[cs:num_lines] + dec ax + mov cx,[cs:num_cols] + shl cx,1 + mul cx + mov si,ax ; SI = (num_lines-1) * num_cols * 2 + + push cs + pop es + mov di,offset displayline + mov cx,[cs:num_cols] + cld + rep movsw + + pop ds + +@@notupdated: + cmp [_shell_windowed],0 + jne @@done + + mov ax,0600h + mov cx,0 + mov dl,[byte cs:num_cols] + dec dl + mov dh,[byte cs:num_lines] + dec dh + mov bh,7 + int 10h + mov dx,0 + mov bh,0 + mov ah,2 + int 10h + +@@done: + pop bp + pop di + pop si + pop es + pop ds + pop dx + pop cx + pop bx + pop ax + ret +ENDP install_isr + +PROC remove_isr NEAR + push ds + mov ax,[cs:data_seg] + mov ds,ax + + cmp [_shell_windowed],0 + je @@nowindowrestore + + push ds + mov ax,2521h + lds dx,[cs:old21] + int 21h + pop ds + +@@nowindowrestore: + cmp [_shell_updateline],0 + je @@noupdaterestore + + mov ax,251Ch + lds dx,[cs:old1c] + int 21h + +@@noupdaterestore: + pop ds + ret +ENDP remove_isr + +ENDS + +END + diff --git a/EXEC.OBJ b/EXEC.OBJ new file mode 100644 index 0000000..e862da3 Binary files /dev/null and b/EXEC.OBJ differ diff --git a/EXECHECK.CPP b/EXECHECK.CPP new file mode 100644 index 0000000..0650dae --- /dev/null +++ b/EXECHECK.CPP @@ -0,0 +1,97 @@ +#include +#include +#include +#include "proboard.hpp" + +#pragma warn -rch + +const long CHECKFREQ = 50; + +struct + { + char string[15]; + dword checksum; + } execheck = { "#`&$%#$%@%&^%E",0L }; + +void +check_exe(char */*fname*/) +{ +/* + File f; + bool first_time = FALSE; + dword checksum = 0L; + long offset; + +// #ifndef RELEASE + return; +// #endif + +#if __OVERLAY__ + return; +#endif + + if(!execheck.checksum) + { + int c; + + if(!f.open(fname,fmode_rw,512)) exit(ERRLVL_FATALERR); + + first_time = TRUE; + + for(;;) + { + c = f.readByte(); + if(c<0) exit(ERRLVL_FATALERR); + if(char(c) == execheck.string[0]) + { + char buf[14]; + f.read(buf,13); + buf[13] = '\0'; + if(!strcmp(buf,&execheck.string[1])) + { + offset = f.pos() + 1; + break; + } + f.seek(-12,seek_cur); + } + } + } + +SCRAMBLE(); + +if(clockticks()%CHECKFREQ && !first_time) return; + +if(!first_time) if(!f.open(fname,fmode_read,1024)) exit(ERRLVL_FATALERR); + +f.rewind(); + +for(;;) + { + int c = f.readByte(); + if(c<0) break; + checksum += byte(c); + + SCRAMBLE(); + } + +if(first_time) + { + f.seek(offset); + f.write(&checksum,4); + } + else + { + byte *p = (byte *)&execheck.checksum; + + for(int i=0;i +#include +#include +#include "proboard.hpp" + +File FileArea::f; +int FileArea::lastAreaNum = -1; +int FileArea::numAreas = -1; + +FileArea *FileArea::lastArea = NULL; + +void +FileArea::open() +{ + if(!f.opened()) + { + if(!f.open(FileName(syspath,"FILECFG.PRO"),fmode_read,cfg.fastmode ? BUFSIZE_FAST:BUFSIZE_SLOW)) + file_error("FILECFG.PRO"); + + numAreas = int(f.len() / sizeof(_FileArea)); + } +} + +bool +FileArea::read(int a) +{ + open(); + + if(a<1 || a>numAreas) return FALSE; + + if(lastArea == NULL) + { + lastArea = new FileArea; + lastAreaNum = -1; + } + + if(a != lastAreaNum) + { + f.seek(long(a-1) * sizeof(_FileArea)); + + if( f.read(lastArea,sizeof(_FileArea)) != sizeof(_FileArea) + || lastArea->name[0] == '\0' ) + { + lastAreaNum = -1; + + return FALSE; + } + } + + (*this) = (*lastArea); + + + append_backspace(filepath); + + strip_trailing( listpath ); + strip_leading( listpath ); + + if(listpath[0] == '\0') + { + strcpy(listpath , filepath); + strcat(listpath , "FILES.BBS"); + } + + lastAreaNum = a; + + areaNum = a; + + strip_trailing( name ); + strip_leading( name ); + + return (name[0]) ? TRUE:FALSE; +} + +void +FileArea::close() +{ + f.close(); + + if(lastArea != NULL) delete lastArea; + + lastAreaNum = -1; + numAreas = -1; + lastArea = NULL; +} + +int +FileArea::highAreaNum() +{ + open(); + + return numAreas; +} + +void +create_arealist(String param[],int numpara,BitArray& arealist,bool msgareas) +{ + FileArea fa; + MsgArea ma; + int MAX; + + if(msgareas) + MAX = MsgArea::highAreaNum(); + else + MAX = FileArea::highAreaNum(); + + for(int i=0;i +#include "proboard.hpp" + +void +Message::forward() +{ + int areanum = 0; + MsgArea ma; + char newto[ 36 ]; + + + if ( msgArea->msgKind == MSG_LOCAL ) + { + io << "\n\n" + << S_FORWARD_IN_SAME_AREA; + } + + + if ( msgArea->msgKind != MSG_LOCAL || + ! io.ask( TRUE ) ) + { + io << "\n\f\n"; + + linecounter( 0 ); + + set_msgarea( "* -N /L" ); + + io << '\n' + << S_SELECT_MSG_AREA_TO_FORWARD_MESSAGE_IN; + + io.read( areanum, 5 ); + + + if ( areanum < 1 ) + { + return; + } + } + else + { + areanum = areaNum(); + } + + + if ( ! ma.read( areanum ) ) + { + io << "\n\n" + << S_UNKNOWN_MESSAGE_AREA + << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + + for ( ; ; ) + { + User tuser; + + + io << "\n\n" + << S_FORWARD_MESSAGE_TO; + + io.read( newto, + 35, + READMODE_UPFIRST ); + + + if ( ! newto[ 0 ] ) + { + return; + } + + + if ( ! strcmpl( newto, "Sysop" ) ) + { + strcpy( newto, msgArea->sysop ); + } + + + if ( ma.msgKind != MSG_LOCAL || + tuser.search( newto ) ) + { + break; + } + + + io << "\n\n" + << S_USER_NOT_LOCATED + << '\n'; + } + + + io << "\n\n" + << S_FORWARDING_MESSAGE; + + + File tmpf; + + + if ( ! tmpf.open( "MSGTMP", fmode_create ) ) + { + return; + } + + + tmpf << "----------------------------------------------------------------------\r\n"; + + tmpf << form( " ** Original message to : %s\r\n\r\n", + to ); + + tmpf << form( " ** Original post date/time : %d-%s-%02d %02d:%02d\r\n\r\n", + postDate[ 0 ], + months_short[ postDate[ 1 ] ], + postDate[ 2 ] % 100, // Y2K FIX: JDR + // postDate[ 2 ], // Y2K BUG! FIXED + postTime[ 0 ], + postTime[ 1 ] ); + + tmpf << form( " ** Forwarded by %s using ProBoard v" VERSION "\r\n", + user.name); + + tmpf << "----------------------------------------------------------------------\r\n\r\n"; + + + tmpf.close(); + + createMsgTextFile( "MSGTMP", TRUE ); + + + if ( post_message( from, + newto, + subj, + areanum, + ( attr & MSGATTR_PRIVATE ) + ? TRUE + : FALSE ) < 0 ) + { + io << S_SAVING_MESSAGE_ERROR; + } + + + io << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; +} + diff --git a/FORWARD.OBJ b/FORWARD.OBJ new file mode 100644 index 0000000..6a30784 Binary files /dev/null and b/FORWARD.OBJ differ diff --git a/FOSSIL.ASM b/FOSSIL.ASM new file mode 100644 index 0000000..e8f8d33 --- /dev/null +++ b/FOSSIL.ASM @@ -0,0 +1,241 @@ +% MODEL MEM_MOD + +PUBLIC _fos_setbps +PUBLIC _fos_init +PUBLIC _fos_deinit +PUBLIC _fos_purgeoutput +PUBLIC _fos_purgeinput +PUBLIC _fos_status +PUBLIC _fos_setdtr +PUBLIC _fos_send +PUBLIC _fos_sendnw +PUBLIC _fos_flowctl +PUBLIC _fos_getch +PUBLIC _fos_getchnw +PUBLIC _fos_break +PUBLIC _fos_sendblock +PUBLIC _fos_readblock + + CODESEG + +nofossil_err DB 'FOSSIL driver not installed!',13,10,'$' + +EVEN + +PROC _fos_setbps + arg port:WORD,baud:BYTE + push bp + mov bp,sp + mov ah,0 + mov al,[baud] + mov dx,[port] + int 14h + pop bp + ret +ENDP _fos_setbps + +PROC _fos_status + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ah,3 + int 14h + pop bp + ret +ENDP _fos_status + +PROC _fos_init + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ah,4 + int 14h + cmp ax,1954h + je foss_ok + push cs + pop ds + mov dx,offset nofossil_err + mov ah,9 + int 21h + mov ax,4cffh + int 21h +foss_ok: pop bp + ret +ENDP _fos_init + +PROC _fos_deinit + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ah,5 + int 14h + pop bp + ret +ENDP _fos_deinit + +PROC _fos_setdtr + arg port:WORD,state:BYTE + push bp + mov bp,sp + mov dx,[port] + mov al,[state] + mov ah,6 + int 14h + pop bp + ret +ENDP _fos_setdtr + +PROC _fos_purgeoutput + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ah,9 + int 14h + pop bp + ret +ENDP _fos_purgeoutput + +PROC _fos_purgeinput + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ah,0Ah + int 14h + pop bp + ret +ENDP _fos_purgeinput + +PROC _fos_sendnw + arg port:WORD,char:BYTE + push bp + mov bp,sp + mov dx,[port] + mov al,[char] + mov ah,0Bh + int 14h + pop bp + ret +ENDP _fos_sendnw + +PROC _fos_send + arg port:WORD,char:BYTE + push bp + mov bp,sp + mov dx,[port] + mov al,[char] + mov ah,1 + int 14h + pop bp + ret +ENDP _fos_send + + +PROC _fos_flowctl + arg port:WORD,ctl:BYTE + push bp + mov bp,sp + mov dx,[port] + mov al,[ctl] + mov ah,0Fh + int 14h + pop bp + ret +ENDP _fos_flowctl + +PROC _fos_getchnw + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ax,0c00h + int 14h + cmp ax,0FFFFh + je @@exit + mov dx,[port] + mov ax,200h + int 14h + xor ah,ah +@@exit: pop bp + ret +ENDP _fos_getchnw + +PROC _fos_getch + arg port:WORD + push bp + mov bp,sp + mov dx,[port] + mov ax,200h + int 14h + xor ah,ah + pop bp + ret +ENDP _fos_getch + +PROC _fos_sendblock + arg port:WORD,block:PTR,numbytes:WORD + push bp + mov bp,sp + push di + mov dx,[port] + mov cx,[numbytes] +if @DataSize + les di,[block] +else + push ds + pop es + mov di,[block] +endif + mov ah,19h + int 14h + pop di + pop bp + ret +ENDP _fos_sendblock + +PROC _fos_readblock + arg port:WORD,block:PTR,numbytes:WORD + push bp + mov bp,sp + push di + mov dx,[port] + mov cx,[numbytes] +if @DataSize + les di,[block] +else + push ds + pop es + mov di,[block] +endif + mov ah,18h + int 14h + pop di + pop bp + ret +ENDP _fos_readblock + +PROC _fos_break + arg port:WORD, mode:BYTE + push bp + mov bp,sp + mov dx,[port] + mov ah,1ah + cmp [mode],0 + je @@stop + mov al,1 + jmp @@exit +@@stop: xor al,al +@@exit: int 14h + pop bp + ret +ENDP _fos_break + + +ENDS + +END + diff --git a/FOSSIL.CHT b/FOSSIL.CHT new file mode 100644 index 0000000..e90e989 --- /dev/null +++ b/FOSSIL.CHT @@ -0,0 +1,338 @@ +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ ³ ³ ³ ³ ³ +³ 00h ³ Set BaudRate ³ AL = Baud/Parity/SB ³ AX = Status bits ³ BaudRate code in AL: ³ +³ ³ ³ DX = Port number ³ (See function 03h) ³ Bits [7:5] 000 = 19200, 001 = 38400, ³ +³ ³ ³ (NOP if DX=00FFh) ³ ³ 010 = 300, 011 = 600, 100 = 1200, ³ +³ ³ ³ ³ ³ 101 = 2400, 110 = 4800, 111 = 9600. ³ +³ ³ ³ ³ ³ Parity: [4:3] 00 or 10 = none, ³ +³ ³ ³ ³ ³ 01 = odd, 11 = even. ³ +³ ³ ³ ³ ³ StopBits: [2:2] 0 = 1, 1 = 2 ³ +³ ³ ³ ³ ³ CharLength: 5 bits plus value [1:0] ³ +³ ³ ³ ³ ³ Support for [4:0] = 00011 required of ³ +³ ³ ³ ³ ³ driver, others optional ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 01h ³ Transmit ³ AL = Character ³ AX = Status bits ³ Character is queued for transmission. ³ +³ ³ character ³ DX = Port number ³ (See function 03h) ³ If there is room in the transmitter ³ +³ ³ (wait for ³ (NOP if DX=00FFh) ³ ³ buffer when this call is made, the ³ +³ ³ room in the ³ ³ ³ character will be stored and control ³ +³ ³ buffer) ³ ³ ³ returned to caller. If the buffer is ³ +³ ³ ³ ³ ³ full, the driver will wait for room. ³ +³ ³ ³ ³ ³ This can be dangerous when used in ³ +³ ³ ³ ³ ³ combination with flow control (see ³ +³ ³ ³ ³ ³ Function 0Fh) ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 02h ³ Receive ³ DX = Port number ³ AH = 00h ³ The next character in the input ring ³ +³ ³ character ³ (NOP if DX=00FFh) ³ AL = Input character ³ buffer is returned to the caller. If ³ +³ ³ (wait for ³ ³ ³ none available, the driver will wait ³ +³ ³ available) ³ ³ ³ for input. ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 03h ³ StatusRequest ³ DX = Port number ³ AX = Status bits ³ Bits are: ³ +³ ³ ³ (NOP if DX=00FFh) ³ ³ AH[6:6] 1 = Output buffer empty ³ +³ ³ ³ ³ ³ AH[5:5] 1 = Output buffer not full ³ +³ ³ ³ ³ ³ AH[1:1] 1 = Input buffer overrun ³ +³ ³ ³ ³ ³ AH[0:0] 1 = Characters in input buffer³ +³ ³ ³ ³ ³ AL[7:7] 1 = Carrier Detect signal ³ +³ ³ ³ ³ ³ AL[3:3] 1 = Always (never 0) ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 04h ³ Initialize ³ DX = Port number ³ AX = 1954h (success) ³ Required before I/O can take place on ³ +³ ³ driver (port) ³ (DX=00FFh special) ³ BL = Max function ³ comm port. When DX = 00FFh, then ³ +³ ³ ³ ³ supported, not ³ any initialization needed to make the ³ +³ ³ ³ ³ incl. 7Eh - BFh ³ keyboard/display available for FOSSIL ³ +³ ³ ³ {BX = 4F50H ³ BH = FOSSIL revision ³ use should be performed. BX = 4F50h ³ +³ ³ ³ ES:CX = ^C flag byte}³ level of driver ³ signals that ES:CX points to a flag ³ +³ ³ ³ (Optional) ³ ³ byte in the application that the ³ +³ ³ ³ ³ DTR raised on port ³ driver should increment when its ³ +³ ³ ³ ³ BaudRate preserved ³ keyboard routines detect a Ctl-C. ³ +³ ³ ³ ³ ³ ³ +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ ³ ³ ³ ³ ³ +³ 05h ³ Deinitialize ³ DX = Port number ³ None ³ Disengages driver from comm port. ³ +³ ³ driver (port) ³ (DX=00FFh special) ³ ³ Should be done when operations on the ³ +³ ³ ³ ³ DTR not changed ³ port are complete. IF DX = 00FFh, ³ +³ ³ ³ ³ ³ then the initialization that was ³ +³ ³ ³ ³ ³ performed when FOSSIL function 04h ³ +³ ³ ³ ³ ³ with DX = 00FFh should be undone. ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 06h ³ Raise/lower ³ AL = 01h - Raise DTR ³ None ³ Used to control Data Terminal Ready ³ +³ ³ DTR ³ = 00h - Lower DTR ³ ³ signal line on com port. This line ³ +³ ³ ³ DX = Port number ³ DTR TRUE if AL = 01h ³ usually has some effect on modem ³ +³ ³ ³ (NOP if DX=00FFh) ³ FALSE if AL = 00h ³ operation (most modems will drop ³ +³ ³ ³ ³ ³ carrier if DTR is lowered, for ³ +³ ³ ³ ³ ³ example). ³ +³ ³ ³ ³ ³ ³ +³ ³ ³ ³ ³ ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 07h ³ Return system ³ None ³ AL = timer tick ³ Returns statistics needed to do some ³ +³ ³ timer params ³ ³ interrupt number ³ critical timing in any MS-DOS system. ³ +³ ³ ³ ³ (NOT vector) ³ The interrupt number in AL can be ³ +³ ³ ³ ³ AH = number of ticks ³ used to intercept a timer interrupt ³ +³ ³ ³ ³ per second ³ that happens (AH) times per second. ³ +³ ³ ³ ³ DX = (apx.) number ³ DX is essentially 1000/AH. Function ³ +³ ³ ³ ³ of mS / tick ³ 16h is the preferred way to install ³ +³ ³ ³ ³ ³ timer tick code. AH and DX should ³ +³ ³ ³ ³ ³ be accurate for the 16h timer tick. ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 08h ³ Flush output ³ DX = Port number ³ None ³ This is used to wait for all output ³ +³ ³ buffer ³ (NOP if DX=00FFh) ³ ³ to complete. If flow control is active³ +³ ³ ³ ³ ³ it is possible for this code never to ³ +³ ³ (wait for all ³ ³ ³ return control to the caller. (See ³ +³ ³ output to end)³ ³ ³ function 0Fh) ³ +³ ³ ³ ³ ³ ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 09h ³ Purge output ³ DX = Port number ³ None ³ Zero the output buffer. Returns to ³ +³ ³ buffer ³ (NOP if DX=00FFh) ³ ³ the caller immediately. Characters ³ +³ ³ ³ ³ ³ that have not been transmitted yet ³ +³ ³ (immediately ³ ³ ³ are lost. ³ +³ ³ zero buffer) ³ ³ ³ ³ +³ ³ ³ ³ ³ ³ +³ ³ ³ ³ ³ ³ +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ ³ ³ ³ ³ ³ +³ 0Ah ³ Purge input ³ DX = Port number ³ None ³ Zeroes the input buffer. If any flow ³ +³ ³ buffer ³ (NOP of DX=00FFh) ³ ³ control restraint has been employed ³ +³ ³ ³ ³ ³ (dropping RTS or transmitting XOFF) ³ +³ ³ ³ ³ ³ the port will be "released" (by doing ³ +³ ³ ³ ³ ³ the reverse, raising RTS or sending ³ +³ ³ ³ ³ ³ XON). Returns to caller immediately. ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 0Bh ³ Transmit ³ AL = Character ³ AX = 0001h if sent ³ Character is queued for transmission. ³ +³ ³ character ³ DX = Port number ³ = 0000h if not ³ If there is room in the transmitter ³ +³ ³ ("no wait") ³ (NOP if DX=00FFh) ³ sent ³ buffer when this call is made, the ³ +³ ³ ³ ³ ³ character will be stored and control ³ +³ ³ ³ ³ ³ returned to caller with AX=1. If the ³ +³ ³ ³ ³ ³ buffer is full, control is returned ³ +³ ³ ³ ³ ³ to caller with AX=0. This allows the ³ +³ ³ ³ ³ ³ application to make its own decisions ³ +³ ³ ³ ³ ³ on how to deal with "buffer full". ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 0Ch ³ "Peek ahead" ³ DX = Port number ³ AH = 00h ³ The next character in the input ring ³ +³ ³ input buffer ³ (NOP if DX=00FFh) ³ AL = input character ³ buffer is returned to the caller. If ³ +³ ³ (non-dest ³ ³ (if available) ³ none available, the driver returns a ³ +³ ³ read-ahead) ³ ³ AX = FFFFh (if none ³ value of FFFFH. This "read" does not ³ +³ ³ ³ ³ (available) ³ actually remove a character from the ³ +³ ³ ³ ³ ³ input buffer! ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 0Dh ³ "Peek ahead" ³ None ³ AX = keyboard char ³ The next character in the keyboard ³ +³ ³ KB buffer ³ ³ (if available) ³ buffer is returned to the caller. If ³ +³ ³ (non-dest ³ ³ AX = FFFFh (if none ³ none available, the driver returns a ³ +³ ³ read-ahead) ³ ³ available) ³ value of FFFFH. This "read" does not ³ +³ ³ ³ ³ ³ actually remove a character from the ³ +³ ³ ³ ³ ³ input buffer! For function keys, IBM ³ +³ ³ ³ ³ ³ PC scan codes must be returned. ³ +³ ³ ³ ³ ³ ³ +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ ³ +³ 0Eh ³ Read Keyboard ³ None ³ AX = keyboard char ³ Return the next character from the ³ +³ ³ (wait if no ³ ³ ³ keyboard buffer. Wait for a keystroke ³ +³ ³ char avail) ³ ³ ³ if the buffer is empty. For function ³ +³ ³ ³ ³ ³ keys, IBM PC scan codes are required. ³ +³ ³ ³ ³ ³ ³ +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +³ ³ ³ ³ ³ | +³ 0Fh ³ Enable/Disable³ AL = Flow control ³ None ³ AL[0:0] 1= enables remote to restrain | +³ ³ com port flow ³ bit mask ³ ³ FOSSIL transmitter using XON/XOFF; | +³ ³ control ³ DX = Port number ³ ³ AL[1:1] 1= enables modem restraint of | +³ ³ ³ (NOP if DX=00FFh) ³ ³ FOSSIL transmitter using CTS and | +³ ³ ³ ³ ³ FOSSIL restraint of modem using RTS | +³ ³ ³ ³ ³ AL[3:3] 1= enables FOSSIL to restrain | +³ ³ ³ ³ ³ remote using XON/XOFF. | +³ ³ ³ ³ ³ | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 10h ³ Enable/disable³ AL = Flags byte ³ AX = 0001h - CtlC/K ³ AL[0:0] 1 = enable/disable CtlC/CtlK | +³ ³ Ctl-C/Ctl-K ³ DX = Port number ³ detected since ³ check (driver will set internal flag| +³ ³ check, ³ (NOP if DX=00FFh) ³ last call ³ which is returned by this function | +³ ³ Enable/disable³ ³ = 0000h - CtlC/K ³ when it detects a CtlC/CtlK). | +³ ³ transmitter ³ ³ not detected ³ AL[1:1] 1 = stop transmitter | +³ ³ ³ ³ since last ³ 0 = release previous stop | +³ ³ ³ ³ call ³ This is used primarily for programs | +³ ³ ³ ³ ³ that can't trust XON/XOFF at FOSSIL | +³ ³ ³ ³ ³ level (such as BBS software). | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 11h ³ Set cursor ³ DH = Row (0-based) ³ None ³ Identical to IBM PC BIOS INT 10h, | +³ ³ location ³ DL = Col (0-based) ³ ³ subfunction 02h. FOSSIL should do | +³ ³ ³ ³ ³ sanity checks but software should not | +³ ³ ³ ³ ³ assume that that is the case. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 12h ³ Read Cursor ³ None ³ DH = Row (0-based) ³ Identical to IBM PC BIOS INT 10h, | +³ ³ Location ³ ³ DL = Col (0-based) ³ subfunction 03h. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 13h ³ Write char ³ AL = Character ³ None ³ ANSI processing is a requirement of | +³ ³ (ANSI support)³ ³ ³ this call. It therefore should not be | +³ ³ ³ ³ ³ considered re-entrant, since DOS | +³ ³ ³ ³ ³ might be used (via ANSI.SYS) | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 14h ³ Enable/disable³ AL = 01h - Enable ³ None ³ FOSSIL will force the system to reboot³ +³ ³ "watchdog" ³ watchdog ³ ³ if Carrier Detect on the specified ³ +³ ³ ³ = 00h - Disable ³ ³ port drops while "watchdog" is ON. ³ +³ ³ ³ watchdog ³ ³ ³ +³ ³ ³ DX = Port number ³ ³ It is not necessary for the port to ³ +³ ³ ³ (NOP if DX=00FFh) ³ ³ be "active" (Function 04h) for this ³ +³ ³ ³ ³ ³ function to be used. ³ +³ ³ ³ ³ ³ ³ +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +³ ³ ³ ³ ³ | +³ 15h ³ Write char ³ AL = Character ³ None ³ Write character to screen using | +³ ³ (re-entrant) ³ ³ ³ re-entrant code. ANSI processing may | +³ ³ ³ ³ ³ not be assumed. This call may be used | +³ ³ ³ ³ ³ by DOS device drivers. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 16h ³ Insert/delete ³ AL = 01h - Insert ³ AX = 0000h - operation³ Allows FOSSIL to manage timer tick | +³ ³ function from ³ = 00h - Delete ³ was successful ³ chain, which provides some measure of | +³ ³ timer tick ³ ES = Function segment ³ = FFFFh - operation³ security over just snagging the | +³ ³ ³ DX = Function offset ³ was unsuccessful ³ interrupt. Use "insert" instead of | +³ ³ ³ ³ ³ grabbing the vector and "remove" in | +³ ³ ³ ³ ³ place of restoring it. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 17h ³ Reboot system ³ AL = 00h - Cold boot ³ None (hopefully!) ³ Provides a machine-independent way | +³ ³ ³ = 01h - Warm boot ³ ³ for a "troubled" application to reset | +³ ³ ³ ³ ³ the system. Some machines may not | +³ ³ ³ ³ ³ support both "flavors" of bootstrap, | +³ ³ ³ ³ ³ in which case the setting of AL will | +³ ³ ³ ³ ³ not have any effect. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 18h ³ Read block ³ CX = Count ³ AX = Number of chars ³ Transfer as many characters as are | +³ ³ ³ ES = Segment of ³ actually moved ³ available into the specified user | +³ ³ ³ user buffer ³ ³ buffer, up to the maximum specified | +³ ³ ³ DI = Offset of ³ ³ in CX. ES and DI will not be modified | +³ ³ ³ user buffer ³ ³ by this call. The actual number of | +³ ³ ³ DX = Port number ³ ³ characters transferred will be in AX. | +³ ³ ³ (NOP if DX=00FFh) ³ ³ This function does not wait for more | +³ ³ ³ ³ ³ characters to become available if the | +³ ³ ³ ³ ³ number in CX exceeds the number of | +³ ³ ³ ³ ³ characters currently stored. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 19h ³ Write block ³ CX = Count ³ AX = number of chars ³ Transfer as many characters as will | +³ ³ ³ ES = Segment of ³ actually moved ³ fit, from the specified user buffer ³ +³ ³ ³ user buffer ³ ³ into the output buffer, up to the ³ +³ ³ ³ DI = Offset of ³ ³ maximum specified in CX. ES and DI ³ +³ ³ ³ user buffer ³ ³ will not be modified by this call. ³ +³ ³ ³ DX = Port number ³ ³ The actual number of characters ³ +³ ³ ³ (NOP if DX=00FFh) ³ ³ transferred will be in AX. ³ +³ ³ ³ ³ ³ ³ +³ ³ ³ ³ ³ ³ +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +³ ³ ³ ³ ³ | +³ 1Ah ³ Start/stop ³ AL = 01h - Start break³ None ³ Used for special applications such as | +³ ³ sending break ³ 001 - Stop break ³ ³ certain high speed modems. Resets | +³ ³ ³ DX = Port number ³ ³ all transmit flow control restraints | +³ ³ ³ (NOP if DX=00FFh) ³ ³ (such as an XOFF received from remote)| +³ ³ ³ ³ ³ Init (Function 4) or UnInit (Function | +³ ³ ³ ³ ³ 5) will stop an in-progress Break. | +³ ³ ³ ³ ³ Note: the application must determine | +³ ³ ³ ³ ³ the "length" of the BREAK. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 1Bh ³ GetDriverInfo ³ CX = Size of buffer ³ AX = Number of bytes ³ Offset 0 (word) = Structure size | +³ ³ ³ ES = Segment of ³ transferred ³ 2 (byte) = FOSSIL spec version | +³ ³ ³ user buffer ³ ³ 3 (byte) = Driver rev level | +³ ³ ³ DI = Offset of ³ User buffer contains ³ 4 (dwrd) = Pointer to ASCII ID | +³ ³ ³ user buffer ³ info structure (used ³ 8 (word) = Input buffer size | +³ ³ ³ DX = Port number ³ to get special data ³ 0A (word) = Bytes avail (input) | +³ ³ ³ (If DX=00FF, ³ from the driver) ³ 0C (word) = Output buffer size | +³ ³ ³ port data will ³ ³ 0E (word) = Bytes avail (output)³ +³ ³ ³ not be valid). ³ ³ 10 (byte) = Screen width, chars ³ +³ ³ ³ For port data to be ³ ³ 11 (byte) = Screen height, chars³ +³ ³ ³ accurate, port must ³ ³ 12 (byte) = Baud rate mask ³ +³ ³ ³ be active. ³ ³ (See call 00h) ³ +³ ³ ³ ³ ³ ³ +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ Code ³ Function ³ Function Parameters ³ Returned by Function ³ Explanation ³ +ÃÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +³ ³ ³ ³ ³ | +³ 7Eh ³ Install user ³ AL = Appendage code ³ AX = 1954h - FOSSIL ³ Used to install user appendages into | +³ ³ appendage ³ ES = Segment of user ³ driver present ³ the INT 14h dispatcher. Appendage | +³ ³ ³ appendage entry ³ = Anything but ³ codes 80h - BF are supported. Codes | +³ ³ ³ point ³ 1954h - FOSSIL ³ 80h - 83h are reserved. The error | +³ ³ ³ DX = Offset of user ³ driver not ³ return, BH = 00h and AX = 1954h, | +³ ³ ³ appendage entry ³ present ³ should mean that another appendage | +³ ³ ³ point ³ BL = Code assigned to ³ has already been installed with the | +³ ³ ³ ³ appendage (same ³ code specified in AL. The appendage | +³ ³ ³ ³ as AL at entry) ³ will be entered via a far call when- | +³ ³ ³ ³ BH = 01h - Operation ³ ever INT 14h call is made with AL | +³ ³ ³ ³ successful ³ equal to the appendage code. The | +³ ³ ³ ³ = 00h - Operation ³ appendage should return to the INT | +³ ³ ³ ³ unsuccessful ³ 14h dispatcher via a far return. The | +³ ³ ³ ³ ³ INT 14h dispatcher should not modify | +³ ³ ³ ³ ³ any registers prior to making the far | +³ ³ ³ ³ ³ call to the appendage and after the | +³ ³ ³ ³ ³ appendage returns control to the | +³ ³ ³ ³ ³ dispatcher. | +³ ³ ³ ³ ³ | +ÆÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵ +³ ³ ³ ³ ³ | +³ 7Fh ³ Remove user ³ AL = Appendage code ³ AX = 1954h ³ Used to remove a user appendage that | +³ ³ appendage ³ ES = Segment of user ³ BL = Code assigned to ³ was installed using function 7Fh. An | +³ ³ ³ appendage entry ³ appendage (same ³ error return means that either the | +³ ³ ³ point ³ as AL at entry) ³ entry point specified in ES:DX did | +³ ³ ³ DX = Offset of user ³ BH = 01h - Operation ³ not match the entry point currently | +³ ³ ³ appendage entry ³ successful ³ in the dispatcher table for the code | +³ ³ ³ point ³ = 00h - Operation ³ given in AL, or that no entry for | +³ ³ ³ ³ unsuccessful ³ the code given in AL currently exits. | +³ ³ ³ ³ ³ | +ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + diff --git a/FOSSIL.DOC b/FOSSIL.DOC new file mode 100644 index 0000000..c53b9fc --- /dev/null +++ b/FOSSIL.DOC @@ -0,0 +1,831 @@ + + + + + + + + + + + + + + Fundamentals of FOSSIL implementation and use + + Version 5, February 11, 1988 + + Rick Moore, Solar Wind Computing + FidoNet Address: 1:115/333 + + + + + + FidoNet Standards Committee index: FSC-0015 + + This document supersedes/obsoletes: FSC-0008 + + + + + + + + + + + + + + + + + + + + Copyright (C) 1987, VEP Software, Naugatuck, CT 06770. All rights reserved. + Copyright (C) 1988, Rick Moore, Homewood, IL, 60430. All rights reserved. + + This document may be freely used or copied by anyone interested in the data + contained herein. No fees may be charged for distribution of this document. + You will be held accountable for all such charges, and expected to either + reimburse those persons or organizations so charged, or to make a donation + in the exact amount of those fees to the International FidoNet Association, + to assist them in their efforts to advance the technology of personal + computer telecommunications. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Introduction Page 2 + + + + A. Objectives of this document + + This document is directed at implementors or intellectuals. It is meant + for use in implementing applications that can use FOSSIL drivers, or for + details needed to implement a new FOSSIL. As such it won't always go out + of its way to explain itself to the neophyte. + + This document will have served its purpose to you if you are able to use + the data contained within to perform either of the above tasks. If you + feel that necessary data has been omitted please contact Rick Moore + at the above listed address so that the appropriate changes can be made. + Any lines changed in the current version are marked with "|" in the left + margin. + + + B. Historical perspective + + For those people who were not lucky enough to have an IBM PC or a system + nearly completely compatible, the world has not been very friendly. With + his implementation of the Generic Fido(tm) driver, Tom Jennings made it + possible for systems that had nothing in common with an IBM PC except an + 808x-class processor, and the ability to run MS-DOS Version 2 and above, + to run his Fido(tm) software. That was a lot to ask, and a lot of people + thought it was enough. + + But not everyone. While Thom Henderson was debugging Version 4.0 of his + SEAdog(tm) mail package, an "extended" Generic driver was designed (in + cooperation with Bob Hartman) as a quick kludge to help him get past a + problem with certain UART chips.The new hook was quickly pounced upon by + Vince Perriello, who, with almost DAILY prodding (ouch! it still hurts) + by Ken Kaplan,had been working with Henderson to get DEC Rainbow support + into SEAdog. Vince then coded a driver to use this hook and - Voila! - + SEAdog 4.0 started working like a champ on the Rainbow. + + At the same time something was rotten in the state of Texas. Wynn Wagner + started encountering some serious difficulties in his Opus development + effort. Specifically, he couldn't force the Greenleaf(tm) Communications + Libraries to behave in exactly the way he felt Opus required. Enter Bob + Hartman.Having already enjoyed success in the effort with Thom Henderson, + he suggested to Wynn that with very few extensions, any driver that was + already SEAdog(tm) 4.0 compatible could drive Opus as well. About that + time, Vince called Wynn to discuss porting Opus to the DEC Rainbow. Wynn + called Bob, Bob called Vince, and the FOSSIL driver came into existence. + + FOSSIL is an acronym for "Fido/Opus/SEAdog Standard Interface Layer". To + say that the concept has gained wide acceptance in the FidoNet community + would be an understatement. Henk Wevers' DUTCHIE package uses the FOSSIL + communications services. Ron Bemis' OUTER package uses FOSSIL services + for everything it does and as a result it is completely generic. There + are already FOSSIL implementations for the Tandy 2000, Heath/Zenith 100, + Sanyo 555 and other "non-IBM" architectures. With each new 'port' of the + spec, the potential of a properly coded FOSSIL application grows! + +Fundamentals of FOSSIL implementation and use FSC-0015 +Basic conventions and calling method Page 3 + + + + C. Basic principles of a FOSSIL driver + + 1) Interrupt 14h. + + The one basic rule that the driver depends upon, is the ability for ANY + target machine to allow the vector for INT 14h (usually pointing to BIOS + comm functions) to be "stolen" by the driver. In a system where the INT + 14h vector is used already, it must be possible to replace the "builtin" + functionality with that of a FOSSIL, when an application that wants the + use of a FOSSIL is to be run on the target machine. + + + 2) How to install a FOSSIL driver in a system + + There's no hard and fast way to do this. The FOSSIL might be implemented + as part of a device driver (like Ray Gwinn's X00.SYS) and therefore gets + loaded using a line in CONFIG.SYS at bootup time. It might be done as a + TSR (terminate and stay resident) program, in which event you install it + by running the program (DECcomm by Vince Perriello and Opus!Comm by Bob + Hartman work this way, for example). + + + 3) How an application can detect the presence of a FOSSIL + + The driver has a "signature" that can be used to determine whether it is + present in memory. At offset 6 in the INT 14h service routine is a word, + 1954h, followed by a byte that specifies the maximum function number + supported by the driver. This is to make it possible to determine when a + driver is present and what level of functionality it provides. Also, the + Init call (see below) returns a 1954h in AX. SEAdog(tm) looks at the + signature and Opus just goes for the Init. Fido doesn't do either. + + + 4) How to call a FOSSIL function + + The FOSSIL driver is entered by issuing a software Interrupt 14h from + the application program. The code corresponding to the desired function + should be in 8-bit register AH. For calls that relate to communications, + the port number will be passed from the application in register DX. When + DX contains a zero (0) it signifies use of COM1, or whatever the "first" + serial port on your machine is called. A one (1) in DX points the driver + at COM2, and so on. A value of 00FFh in DX is considered a special case + where the driver should do no actual processing but return SUCCESS. In + the specific case of Init/Uninit with DX=00FFh,the FOSSIL should perform + all non-communications processing necessary with such calls. In some + machines (H/Z-100 for example), the FOSSIL must assume control of the + keyboard in order to service the keyboard functions. + + FOR ALL FUNCTIONS, ALL REGISTERS NOT SPECIFICALLY CONTAINING A FUNCTION + RETURN VALUE MUST BE PRESERVED ACROSS THE CALL. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 4 + + +D. Functions currently defined for FOSSILs + + + AH = 00h Set baud rate + + Parameters: + Entry: AL = Baud rate code + DX = Port number +| Exit: AX = Port status (see function 03h) + + This works the same as the equivalent IBM PC BIOS call, except that it + ONLY selects a baud rate. This is passed in the high order 3 bits of AL + as follows: + + 010 = 300 baud + 011 = 600 '' + 100 = 1200 '' + 101 = 2400 '' + 110 = 4800 '' + 111 = 9600 '' + 000 = 19200 '' (Replaces old 110 baud mask) + 001 = 38400 '' (Replaces old 150 baud mask) + + The low order 5 bits can be implemented or not by the FOSSIL, but in all + cases, if the low order bits of AL are 00011, the result should be that + the communications device should be set to eight data bits, one stop bit + and no parity. This setting is a MINIMUM REQUIREMENT of Fido, Opus and + SEAdog. For purposes of completeness, here are the IBM PC "compatible" + bit settings: + + Bits 4-3 define parity: 0 0 no parity + 1 0 no parity + 0 1 odd parity + 1 1 even parity + + Bit 2 defines stop bits: 0 1 stop bit; + 1 1.5 bits for 5-bit char; + 2 for others + + Bits 1-0 character length: 0 0 5 bits + 0 1 6 bits + 1 0 7 bits + 1 1 8 bits + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 5 + + + AH = 01h Transmit character with wait + + Parameters: + Entry: AL = Character + DX = Port number + Exit: AX = Port status (see function 03h) + + AL contains the character to be sent. If there is room in the transmit + buffer the return will be immediate, otherwise it will wait until there + is room to store the character in the transmit buffer. On return, AX is + set as in a status request (see function 03h). + + + AH = 02h Receive character with wait + + Parameters: + Entry: DX = Port number + Exit: AH = 00h + AL = Input character + + If there is a character available in the receive buffer, returns with + the next character in AL. It will wait until a character is received if + none is available. + + + AH = 03h Request status + + Parameters: + Entry: DX = Port number + Exit: AX = Status bit mask (see below) + + Returns with the line and modem status in AX. Status bits returned are: + + In AH: + Bit 0 = RDA - input data is available in buffer +| Bit 1 = OVRN - the input buffer has been overrun. All +| characters received after the buffer is +| full should be discarded. + Bit 5 = THRE - room is available in output buffer + Bit 6 = TSRE - output buffer is empty + + In AL: +| Bit 3 = Always 1 (always return with this bit set to 1) + Bit 7 = DCD - carrier detect + + This can be used by the application to determine whether carrier detect + (CD) is set, signifying the presence/absence of a remote connection, as + well as monitoring both the input and output buffer status. Bit 3 of AL + is always returned set to enable programs to use it as a carrier detect + bit on hardwired (null modem) links. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 6 + + + AH = 04h Initialize driver + + Parameters: + Entry: DX = port number + ( BX = 4F50h +| ES:CX = ^C flag address --- optional ) + Exit: AX = 1954h if successful +| BL = maximum function number supported +| (not counting functions 7Eh and above) +| BH = rev of FOSSIL doc supported + + This is used to tell the driver to begin operations, and to check that + the driver is installed. This function should be called before any other + communications calls are made. At this point all interrupts involved in + supporting the comm port (specified in DX) should be set up for handling + by the FOSSIL, then enabled. If BX contains 4F50h, then the address + specified in ES:CX is that of a ^C flag byte in the application program, + to be incremented when ^C is detected in the keyboard service routines. + This is an optional service and only need be supported on machines where + the keyboard service can't (or won't) perform an INT 1Bh or INT 23h when +| a Control-C is entered. DTR is raised by this call. The baud rate must +| NOT be changed by this call. + + NOTE: Should an additional call to this service occur (2 Inits or Init, + Read,Init, etc.) the driver should reset all buffers, flow control, etc. + to the INIT state and return SUCCESS. + + + AH = 05h Deinitialize driver + + Parameters: + Entry: DX = Port number + Exit: None + + This is used to tell the driver that comm port operations are ended. The + function should be called when no more comm port functions will be used + on the port specified in DX. DTR is NOT affected by this call. + + + AH = 06h Raise/lower DTR + + Parameters: + Entry: DX = Port number + AL = DTR state to be set (01h = Raise, 00h = Lower) + Exit: None + + This function is used to control the DTR line to the modem. AL = 00h means + lower DTR (disable the modem), and AL = 01h means to raise DTR (enable the + modem). No other function (except Init) should alter DTR. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 7 + + + AH = 07h Return timer tick parameters + + Parameters: + Entry: None + Exit: AL = Timer tick interrupt number + AH = Ticks per second on interrupt number in AL + DX = Approximate number of milliseconds per tick + + This is used to determine the parameters of the timer tick on any given + machine. Three numbers are returned: + + AL = Timer tick interrupt number + AH = Ticks per second on interrupt number shown in AL + DX = Milliseconds per tick (approximate) + + Applications can use this for critical timing (granularity of less than + one second) or to set up code (such as a watchdog) that is executed on + every timer tick. See function 16h (add/delete function from timer tick) + for the preferred way of actually installing such code. + + + AH = 08h Flush output buffer + + Parameters: + Entry: DX = Port number + Exit: None + + This is used to force any pending output. It does not return until all + pending output has been sent. You should use this call with care. Flow + control (documented below) can make your system hang on this call in a + tight uninterruptible loop under the right circumstances. + + + AH = 09h Purge output buffer + + Parameters: + Entry: DX = Port number + Exit: None + + This is used to purge any pending output. Any output data remaining in + the output buffer (not transmitted yet) is discarded. + + + AH = 0Ah Purge input buffer + + Parameters: + Entry: DX = Port number + Exit: None + + This is used to purge any pending input. Any input data which is still + in the buffer is discarded. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 8 + + + AH = 0Bh Transmit no wait + + Parameters: + Entry: DX = Port number + Exit: AX = 0001h - Character was accepted + = 0000h - Character was not accepted + + This is exactly the same as the "regular" transmit call, except that if + the driver is unable to buffer the character (the buffer is full), a + value of 0000h is returned in AX. If the driver accepts the character + (room is available), 0001h is returned in AX. + + + AH = 0Ch Non-destructive read-ahead + + Parameters: + Entry: DX = Port number + Exit: AH = 00h - Character is + AL = Next character available + AX = FFFFh - Character is not available + + Return in AL the next character in the receive buffer. If the receive + buffer is empty, return FFFFh. The character returned remains in + the receive buffer. Some applications call this "peek". + + + AH = 0Dh Keyboard read without wait + + Parameters: + Entry: None + Exit: AX = IBM-style scan code (Character available) + = FFFFh (Character not available) + + Return in AX the next character (non-destructive read ahead) from the + keyboard; if nothing is currently in the keyboard buffer, return FFFFh in + AX. Use IBM-style function key mapping in the high order byte. Scan + codes for non-"function" keys are not specifically required, but may be + included. Function keys return 00h in AL and the "scan code" in AH. + + + AH = 0Eh Keyboard read with wait + + Parameters: + Entry: None + Exit: AX = IBM-style scan code + + Return in AX the next character from the keyboard; wait if no character + is available. Keyboard mapping should be the same as function 0Dh. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 9 + + + AH = 0Fh Enable or disable flow control + + Parameters: + Entry: AL = Bit mask describing requested flow control + DX = Port number + Exit: None + + TRANSMIT flow control allows the "other end" to restrain the transmitter + when you are over-running it. RECEIVE flow control tells the FOSSIL to + attempt to do just that if it is being overwhelmed. + + Two kinds of basic flow control are supported: + + Bit 0 = 1 Xon/Xoff on transmit + Bit 1 = 1 CTS/RTS (CTS on transmit, RTS on receive) + Bit 2 Reserved +| Bit 3 = 1 Xon/Xoff on Receive + + Flow control is enabled, or disabled, by setting the appropriate bits in + AL for the types of flow control we want to ENABLE (value = 1), and/or + DISABLE (value = 0), and calling this function. Bit 2 is reserved for + DSR/DTR, but is not currently supported in any implementation. + + Enabling transmit Xon/Xoff will cause the FOSSIL to stop transmitting + upon receiving an Xoff. The FOSSIL will resume transmitting when an Xon + is received. + + Enabling CTS/RTS will cause the FOSSIL to cease transmitting when CTS is + lowered. Transmission will resume when CTS is raised. The FOSSIL will + drop RTS when the receive buffer reaches a predetermined percentage full + The FOSSIL will raise RTS when the receive buffer empties below the + predetermined percentage full. The point(s) at which this occurs is + left to the individual FOSSIL implementor. + +| Enabling receive Xon/Xoff will cause the FOSSIL to send a Xoff when the +| receive buffer reaches a pre-determined percentage full. An Xon will be +| sent when the receive buffer empties below the pre-determined percentage +| full. The point(s) at which this occurs is left to the individual FOSSIL +| implementor. + + Applications using this function should set all bits ON in the high + nibble of AL as well. There is a compatible (but not identical) FOSSIL + driver implementation that uses the high nibble as a control mask. If + your application sets the high nibble to all ones, it will always work, + regardless of the method used by any given driver. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 10 + + + AH = 10h Extended Control-C / Control-K checking and transmit on/off + + Parameters: + Entry: AL = Bit mask (see below) + DX = Port number + Exit: AX = 0001h - Control-C/K has been received + = 0000h - Control-C/K has not been received + + This is used for BBS operation, primarily. A bit mask is passed in AL + with the following flags: + + Bit 0 Enable/disable Control-C / Control-K checking + Bit 1 Disable/enable the transmitter + + The Enable (bit 0 = 1) and Disable (Bit 0 = 0) Control-C/Control-K check + function is meant primarily for BBS use. When the checking is enabled, a + Control-C or Control-K received from the communications port will set a + flag internal to the FOSSIL driver, but will not be stored in the input + buffer. The next use of this function will return the value of this flag + in register AX then clear the flag for the next occurrence. The returned + value is used by the BBS software to determine whether output should be + halted or not. + + The Disable (Bit 1 = 1) and Enable (Bit 1 = 0) Transmitter function lets + the application restrain the asynchronous driver from output in much the + same way as XON/XOFF would. + + + AH = 11h Set current cursor location. + + Parameters: + Entry: DH = Row (line) + DL = Column + Exit: None + + This function looks exactly like like INT 10h, subfunction 2, on the IBM + PC. The cursor location is passed in DX: row in DH and column in DL. The + function treats the screen as a coordinate system whose origin (0,0) is + the upper left hand corner of the screen. + + + AH = 12h Read current cursor location. + + Parameters: + Entry: None + Exit: DH = Row (line) + DL = Column + + Looks exactly like INT 10h, subfunction 3, on the IBM PC. The current + cursor location (using the same coordinate system as function 16h) is + passed back in DX. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 11 + + + AH = 13h Single character ANSI write to screen. + + Parameters: + Entry: AL = Character to display + Exit: None + + The character in AL is sent to the screen by the fastest method possible + that allows ANSI processing to occur (if available). This routine should + not be used in such a way that DOS output (which is not re-entrant) can + not be employed by some FOSSIL driver to perform the function (in fact, + on the IBM PC that is likely to be how it's done). On some systems such + as the DEC Rainbow this will be a very fast method of screen writing. + + + AH = 14h Enable or disable watchdog processing + + Parameters: + Entry: AL = 01h - Enable watchdog + = 00h - Disable watchdog + DX = Port number + Exit: None + + When watchdog is enabled, the state of the carrier detect (CD) line on + the comm port specified in DX should be constantly monitored. Should the + state of that line become FALSE (carrier lost), the system should be re- + booted, to enable the BBS (or other application) to start up again. This + monitor is not affected by Init/Uninit etc. + + + AH = 15h Write character to screen using BIOS support routines + + Parameters: + Entry: AL = Character to display + Exit: None + + The character in AL is sent to the screen using BIOS-level Input/Output + routines. This differs from function 13h in that DOS I/O CAN NOT be used, + as this function might be called from driver level. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 12 + + + AH = 16h Insert or delete a function from the timer tick chain + + Parameter: + Entry: AL = 01h - Add a function + = 00h - Delete a function +| ES = Segment of function + DX = Offset of function + Exit: AX = 0000h - Operation successful + = FFFFh - Operation unsuccessful + + This function is used to allow a central authority to manage the timer + interrupts, so that as code is loaded and unloaded, the integrity of the + "chain" is not compromised. Rather than using the traditional method of + saving the old contents of the timer vector, storing the address of your + routine there, and executing a far call to the "old" routine when yours + is done, instead you call this function. It manages a list of such entry + points and calls them on a timer tick (interrupt) using a FAR call. All + the usual cautions about making DOS calls apply (that is, DON'T!). + + This makes it possible for a program to get in and out of the tick chain + without having to know whether another program has also done so since it + first insinuated itself. At least 4 entries should be available in the + driver's table (including one to be used by Watchdog if implemented that + way). + + + AH = 17h Reboot system + + Parameters: + Entry: AL = 00h - "Cold boot" + = 01h - "Warm boot" + + Perform the old 3-finger salute. Used in extreme emergency by code that + can't seem to find a "clean" way out of the trouble it has gotten itself + into. Hopefully it won't happen while you're computing something in the + other half of a DoubleDOS system. If your machine can make a distinction + between a "cold" (power-up, self-test and boot) and a "warm" (just boot) + bootstrap, your FOSSIL should support the flag in AL. Otherwise just do + whatever bootstrap is possible. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 13 + + +| AH = 18h Read block (transfer from FOSSIL to user buffer) + +| Parameters: +| Entry: CX = Maximum number of characters to transfer +| DX = Port number +| ES = Segment of user buffer +| DI = Offset into ES of user buffer +| Exit: AX = Number of characters actually transferred + +| A "no-wait" block read of 0 to FFFFh characters from the FOSSIL inbound +| ring buffer to the calling routine's buffer. ES:DI are left unchanged by +| the call; the count of bytes actually transferred will be returned in AX. + + +| AH = 19h Write block (transfer from user buffer to FOSSIL) + +| Parameters: +| Entry: CX = Maximum number of characters to transfer +| DX = Port number +| ES = Segment of user buffer +| DI = Offset into ES of user buffer +| Exit: AX = Number of characters actually transferred + + +| A "no-wait" block move of 0 to FFFFh characters from the calling +| program's buffer into the FOSSIL outbound ring buffer. ES:DI are left +| unchanged by the call; the count of bytes actually transferred will be +| returned in AX. + + +| AH = 1Ah Break begin or end + +| Parameters: +| Entry: AL = 01h - Start sending 'break' + = 00h - Stop sending 'break' +| DX = port number +| Exit: None + +| Send a break signal to the modem. If AL=01h the driver will commence the +| transmission of a break. If AL=00h the driver will end the break. This +| is useful for communications with devices that can only go into 'command +| mode' when a BREAK is received. Note: the application is responsible for +| the timing of the BREAK. Also, if the FOSSIL has been restrained by an +| Xoff received from the modem, the flag will be cleared. An Init or Un- +| Init will stop an in-progress BREAK. + +Fundamentals of FOSSIL implementation and use FSC-0015 +Communications functions Page 14 + + +| AH = 1Bh Return information about the driver + +| Parameters: +| Entry: CX = Size of user info buffer in bytes +| DX = Port number +| ES = Segment of user info buffer +| DI = Offset into ES of user info buffer +| Exit: AX = Number of bytes actually transferred + +| Transfer information about the driver and its current status to the user +| for use in determining, at the application level, limits of the driver. +| Designed to assist "generic" applications to adjust to "foreign" gear. + +| The data structure currently returned by the driver is as follows (sorry +| but you'll have to live with assembly syntax): + +| info equ $ ; define begin of structure +| strsiz dw info_size ; size of the structure in bytes +| majver db curr_fossil ; FOSSIL spec driver conforms to +| minver db curr_rev ; rev level of this specific driver +| ident dd id_string ; "FAR" pointer to ASCII ID string +| ibufr dw ibsize ; size of the input buffer (bytes) +| ifree dw ? ; number of bytes left in buffer +| obufr dw obsize ; size of the output buffer (bytes) +| ofree dw ? ; number of bytes left in the buffer +| swidth db screen_width ; width of screen on this adapter +| sheight db screen_height ; height of screen " " +| baud db ? ; ACTUAL baud rate, computer to modem +| info_size equ $-info + +| The ident string should be null-terminated, and NOT contain a newline. +| The baud rate byte contains the bits that Function 00h would use to set +| the port to that speed. + +| The fields related to a particular port (buffer size, space left in the +| buffer, baud rate) will be undefined if port FFh or an invalid port is +| contained in DX. + +| Additional information will always be passed after these, so that, for +| example, offset "sheight" will never change with FOSSIL revision changes. + +Fundamentals of FOSSIL implementation and use FSC-0015 +"Layered Application" services Page 15 + + + +| The functions below are not necessarily FOSSIL related. However, because +| dispatchers that support them are hooked on Interrupt 14H, it behooves +| the FOSSIL developer to support them as well to avoid fragmenting memory +| with several dispatchers. + + + +| AH = 7Eh Install an "external application" function + +| Parameters: +| Entry: AL = Code assigned to external application +| DX = Offset of application entry point +| ES = Segment of application entry point +| Exit: AX = 1954h +| BL = Code assigned to application (same as input AL) +| BH = 01h - Installation was successful +| = 00h - Installation failed + +| This call is used by external application code (special screen drivers, +| modem code, database code, etc) to link into the INT 14h service for use +| by multiple applications. The "error return" (BH=0 with AX=1954h) should +| mean that another application layer has already been installed at that +| particular code. Codes 80h through BFh should be supported. + +| External application codes 80h-83h are reserved by FOSSIL developers for +| re-organizing FOSSIL services by type (comm, screen, keyboard, system). + +| Installed application code will be entered, via a FAR call, from the INT +| 14H dispatcher whenever it is entered with AH=(application code). + +| If the value returned in AX from this function is not 1954h, the service +| code that is trying to be installed should bring up its own INT 14h code +| that can service INT 14h functions 7h-BFh (80h-BFh are "applications"). + + +| AH = 7Fh Remove an "external application" function + +| Parameters: +| Entry: AL = Code assigned to external application +| DX = Offset of application entry point +| ES = Segment of application entry point +| Exit: AX = 1954h +| BL = Code assigned to application (same as input AL) +| BH = 01h - Removal was successful +| = 00h - Removal failed + +| Removes an application's entry into the table. Usually so it can remove +| itself from memory. Error return means ES:DX did not match or that there +| is no entry at the slot described by AL. + +| An application that wants to remove itself from memory can issue the 7F +| function to remove itself from the table, then, if it is successful, get +| out of memory. If it had to install itself with an INT 14h dispatcher it +| may back itself out, provided no other applications have been installed +| on top of it (using its dispatcher). + + +Fundamentals of FOSSIL implementation and use FSC-0015 + Page 16 + + + +E. Validation Suite. + + Well, there is one, but it's involved. Here is a list of software that + is known to use FOSSIL calls, and the range of calls used by that + software: + + Software package Fossil calls used + + Fido, V11w, generic version 00h - 07h + SEAdog, V4.1b 00h - 0Eh + Opus, V1.03a 00h - 17h + BinkleyTerm, V1.30 00h - 1Bh + + While there is certainly no guarantee that your FOSSIL is bug-free if + all the above software runs with it, you have probably done as much + as you can in a test environment if your FOSSIL is tested with each of + these packages. + + + + F. Technical Discussion. + + A FOSSIL echomail conference exists, for the purpose of exchanging info + and implementation details for FOSSIL drivers. It is coordinated by Ray + Gwinn at FidoNet node 1:109/639. Contact him for details on how to join. + Keep in mind though, that this conference is intended SPECIFICALLY for + implementors of FOSSIL software and not as a general Q&A conference for + people who think FOSSILs have something to do with paleontology. + + + +G. Distribution Of This Document. + + This document may be distribute freely as long as it is not modified in + any way. Please list all changes and deviations in a given FOSSIL + implementation in an addendum contained in a separate file added to the + FOSSIL archive. Also, please do not distribute this document without + the accompanying version of FOSSIL.CHT. This will help avoid confusion, + among both FOSSIL implementors and application developers. diff --git a/FOSSIL.HPP b/FOSSIL.HPP new file mode 100644 index 0000000..1c6eb92 --- /dev/null +++ b/FOSSIL.HPP @@ -0,0 +1,47 @@ +typedef unsigned FOS_STATUS; + +#define FSTAT_BUFEMPTY 0x4000 // output buffer empty +#define FSTAT_NOTFULL 0x2000 // output buffer NOT full +#define FSTAT_OVERRUN 0x0200 // input buffer overrun +#define FSTAT_AVAIL 0x0100 // input available +#define FSTAT_CARRIER 0x0080 // carrier detected + +extern "C" + { + FOS_STATUS fos_setbps (int port,byte baudcode); // set baudrate + FOS_STATUS fos_status (int port); // get fossil-status + void fos_init (int port); // initialize fossil + void fos_deinit (int port); // deinitialize fossil + void fos_setdtr (int port,char dtr); // set DTR on(1)/off(0) + void fos_purgeoutput (int port); // purge output buffer + void fos_purgeinput (int port); // purge input buffer + void fos_flowctl (int port,byte ctl); // set flow control (CTS/RTS) + bool fos_sendnw (int port,byte ch); // send char without wait (1=sent,0=not sent) + FOS_STATUS fos_send (int port,byte ch); // send char with wait + int fos_getchnw (int port); // get char without wait (-1 when none available) + byte fos_getch (int port); // get char with wait + byte fos_break (int port,bool mode); // Start/Stop sending break + word fos_sendblock (int port,byte *buf,word size); + word fos_readblock (int port,byte *buf,word size); + } + +#define fos_byteready(port) (fos_status(port) & FSTAT_AVAIL) +#define fos_outputempty(port) (fos_status(port) & FSTAT_BUFEMPTY) +#define fos_carrier(port) (fos_status(port) & FSTAT_CARRIER) + +#define status_byteready(stat) ((stat) & FSTAT_AVAIL) +#define status_outputempty(stat) ((stat) & FSTAT_BUFEMPTY) +#define status_carrier(stat) ((stat) & FSTAT_CARRIER) + +/* +static void +fos_sendbreak(int port) +{ + fos_break(port,TRUE); + + unsigned long ticks = clockticks(); + while(clockdiff(ticks)<2) {} + + fos_break(port,FALSE); +} +*/ diff --git a/FOSSIL.OBJ b/FOSSIL.OBJ new file mode 100644 index 0000000..de7351a Binary files /dev/null and b/FOSSIL.OBJ differ diff --git a/FUZZY.CPP b/FUZZY.CPP new file mode 100644 index 0000000..7965e89 --- /dev/null +++ b/FUZZY.CPP @@ -0,0 +1,135 @@ +#include +#include +#include +#include + +/* local, static data */ + +static char *Text, *Pattern; /* pointers to search strings */ +static int Textloc; /* current search position in Text */ +static int Plen; /* length of Pattern */ +static int Degree; /* max degree of allowed mismatch */ +static int *Ldiff, *Rdiff; /* dynamic difference arrays */ +static int *Loff, *Roff; /* used to calculate start of match */ + +static int *allocated; + +static void near +App_init(char *pattern, char *text, int degree) +{ + int i; + + /* save parameters */ + Text = text; + Pattern = pattern; + Degree = degree; + + /* initialize */ + Plen = strlen(pattern); + Ldiff = allocated = (int *) malloc(sizeof(int) * (Plen + 1) * 4); + Rdiff = Ldiff + Plen + 1; + Loff = Rdiff + Plen + 1; + Roff = Loff + Plen + 1; + + for(i = 0; i <= Plen; i++) + { + Rdiff[i] = i; /* initial values for right-hand column */ + Roff[i] = 1; + } + + Textloc = -1; /* current offset into Text */ +} + +static void near +App_next(char **start, char **end, int *howclose) +{ + int *temp, a, b, c, i; + + *start = NULL; + while (*start == NULL) { /* start computing columns */ + if (Text[++Textloc] == '\0') /* out of text to search! */ + break; + + temp = Rdiff; /* move right-hand column to left ... */ + Rdiff = Ldiff; /* ... so that we can compute new ... */ + Ldiff = temp; /* ... right-hand column */ + Rdiff[0] = 0; /* top (boundary) row */ + + temp = Roff; /* and swap offset arrays, too */ + Roff = Loff; + Loff = temp; + Roff[1] = 0; + + for (i = 0; i < Plen; i++) { /* run through pattern */ + /* compute a, b, & c as the three adjacent cells ... */ + if (toupper(Pattern[i]) == toupper(Text[Textloc])) + a = Ldiff[i]; + else + a = Ldiff[i] + 1; + b = Ldiff[i+1] + 1; + c = Rdiff[i] + 1; + + /* ... now pick minimum ... */ + if (b < a) + a = b; + if (c < a) + a = c; + + /* ... and store */ + Rdiff[i+1] = a; + } + + /* now update offset array */ + /* the values in the offset arrays are added to the + current location to determine the beginning of the + mismatched substring. (see text for details) */ + if (Plen > 1) for (i=2; i<=Plen; i++) { + if (Ldiff[i-1] < Rdiff[i]) + Roff[i] = Loff[i-1] - 1; + else if (Rdiff[i-1] < Rdiff[i]) + Roff[i] = Roff[i-1]; + else if (Ldiff[i] < Rdiff[i]) + Roff[i] = Loff[i] - 1; + else /* Ldiff[i-1] == Rdiff[i] */ + Roff[i] = Loff[i-1] - 1; + } + + /* now, do we have an approximate match? */ + if (Rdiff[Plen] <= Degree) { /* indeed so! */ + *end = Text + Textloc; + *start = *end + Roff[Plen]; + *howclose = Rdiff[Plen]; + } + } + +} + +void +App_End() +{ + free(allocated); +} + + +int +fuzzy_search(char *pattern,char *text,int degree) +{ + int min = 0x7FFF; + int howclose; + char *begin,*end; + + degree = strlen(pattern)*(100-degree)/100; + + App_init(pattern , text , degree); + App_next(&begin, &end, &howclose); + while(begin) + { + if(howclose +#include "proboard.hpp" + +struct gif_header + { + char sign[6]; + word xres; + word yres; + word colorbits : 3; + sword dummy : 5; + }; + +void +view_gif(char *data) +{ + char gifname[13]; + + io << "\f\n" << S_SHOW_GIF_INFO_TITLE_AND_PROMPT; + + io.read(gifname,12,READMODE_UPALL); + if(!gifname[0]) return; + + String param[40]; + BitArray arealist(MAX_FILE_AREAS,1); + + int npara = parse_data(data,param); + + create_arealist(param,npara,arealist); + + FileArea fa; + + io << form("\n\n\7 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄ¿\n" + " ³\3 %-13.13s\7³\3 %-11.11s\7³\3 %-7.7s\7³\n" + " ÆÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍ͵\n", + S_SHOW_GIF_FILENAME , + S_SHOW_GIF_RESOLUTION , + S_SHOW_GIF_COLORS ); + + linecounter(2); + stopped=0; + io.enablestop(); + + for(int i=1;i<=FileArea::highAreaNum();i++) + { + if(!arealist[i] || !fa.read(i) || !check_access(fa.level,fa.flags,fa.flagsNot)) continue; + + String fname(fa.filepath); + fname << gifname; + + DirScan f(fname); + + while(int(f)) + { + File fil; + + if(fil.open(FileName(fa.filepath,f.name()))) + { + gif_header gif; + fil.read(&gif,sizeof(gif)); + + if(!strncmp(gif.sign,"GIF",3)) + { + io << form(" ³ \3%-12s\7 ³",f.name()); + io << form("\6 %4d x %3d \7³\2 %3d \7³\n",gif.xres,gif.yres,1 << (gif.colorbits+1)); + + if(stopped || linecounter()) + { + i = FileArea::highAreaNum(); + + break; + } + } + } + + ++f; + } + } + + if(!stopped) + io << " ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍ;\n\n" + << S_PRESS_ENTER_TO_CONTINUE; +} + diff --git a/GIF.OBJ b/GIF.OBJ new file mode 100644 index 0000000..a28ee11 Binary files /dev/null and b/GIF.OBJ differ diff --git a/HANDLER.CPP b/HANDLER.CPP new file mode 100644 index 0000000..8c64858 --- /dev/null +++ b/HANDLER.CPP @@ -0,0 +1,7 @@ +#define Use_Handlers +#define Use_LinkedList + +#include "proboard.hpp" + +LinkedList sysopkey_handlers; +LinkedList hangup_handlers; diff --git a/HANDLER.OBJ b/HANDLER.OBJ new file mode 100644 index 0000000..d3e7ca3 Binary files /dev/null and b/HANDLER.OBJ differ diff --git a/HELP.CPP b/HELP.CPP new file mode 100644 index 0000000..cd165dd --- /dev/null +++ b/HELP.CPP @@ -0,0 +1,354 @@ +#include +#include "proboard.hpp" + + + +#define HELP 1 +#define USER 2 +#define MACRO 3 + + +static int status = 0; +static Window win; +static int WINSIZE; + +static +void near show() +{ + int maxx = SCREEN.maxX; + word *buf = new word[ tsw_vsize * maxx ]; + int x = SCREEN.getX(); + int cursorline = SCREEN.getY(); + int caplines = ( cursorline > tsw_vsize - ( WINSIZE + 2 ) ) + ? tsw_vsize - ( WINSIZE + 2 ) + : cursorline; + + + tsw_gettext( buf, + 1, + cursorline - caplines + 1, + maxx, + cursorline + 1 ); + + + if ( cursorline > tsw_vsize - ( WINSIZE + 2 ) ) + { + cursorline = tsw_vsize - ( WINSIZE + 2 ); + } + + + byte att = SCREEN.attrib(); + + + SCREEN.attrib( 7 ); + SCREEN.clear(); + SCREEN.change( 1, + 1, + maxx, + tsw_vsize - ( WINSIZE + 1 ) ); + + + tsw_puttext( buf, + 1, + 1, + maxx, + caplines ); + +// win.open( 1, +// tsw_vsize - WINSIZE, +// maxx, +// tsw_vsize - 1, +// 0x17, +// 0, +// SINGLE_BORDER ); + + win.open( 1, + tsw_vsize - WINSIZE, + maxx, + tsw_vsize - 1, + 0x70, + 0, + CHISEL_BORDER, + 0x7F, + NULL, + 0x78 ); + + SCREEN.setPos( x, cursorline ); + SCREEN.attrib( att ); + + + delete [] buf; +} + + + +static +void near hide() +{ + int maxx = SCREEN.maxX; + + + win.close(); + + + word *buf = new word[ tsw_vsize * maxx ]; + + + tsw_gettext( buf, + 1, + 1, + maxx, + tsw_vsize - ( WINSIZE + 1 ) ); + + + byte att = SCREEN.attrib(); + + + SCREEN.saveCursor(); + + SCREEN.attrib( 7 ); + SCREEN.change( 1, + 1, + maxx, + tsw_vsize - 1 ); + + SCREEN.clear(); + SCREEN.restoreCursor(); + SCREEN.attrib( att ); + + + tsw_puttext( buf, + 1, + 1, + maxx, + tsw_vsize - ( WINSIZE + 1 ) ); + + + delete [] buf; +} + + + +void toggle_userinfo() +{ + // if ( user_recnr < 0 ) + // { + // return; + // } + // + // + // switch ( status ) + // { + // case USER: + // + // hide(); + // + // status = 0; + // + // break; + // + // + // case 0: + // + // WINSIZE = 5; + // + // show(); + // + // + // default: + // + // if ( WINSIZE != 5 ) + // { + // hide(); + // + // WINSIZE = 5; + // + // show(); + // } + // + // + // win.clear(); + // + // win.attrib( 0x17 ); + // + // win << " Handle : Flags :\n" + // " # Calls : Last call:\n" + // " Downloads: Uploads :"; + // + // win.attrib( 0x1F ); + // + // win.setpos( 13, 1); + // win << user.alias; + // + // + // win.setpos( 45, 1 ); + // + // char s[ 33 ]; + // + // user.aflags.flagstostr( s ); + // + // win << s; + // + // + // win.setpos( 13, 2 ); + // + // win << form( "%d", user.timescalled ); + // + // + // win.setpos( 45, 2 ); + // + // win << form( "%02d %3s %04d at %02d:%02d:%02d", + // user.lastdate[ 0 ], + // months_short[ user.lastdate[ 1 ] ], + // user.lastdate[ 2 ] + 1900, // Y2K FIX! + // user.lasttime[ 0 ], + // user.lasttime[ 1 ], + // user.lasttime[ 2 ] ); + // + // + // win.setpos( 13, 3 ); + // + // win << form( "%d (%d Kb)", + // user.numdownloads, + // user.kdownloaded ); + // + // + // win.setpos( 45, 3 ); + // + // win << form( "%d (%d Kb)", + // user.numuploads, + // user.kuploaded ); + // + // + // SCREEN.setpos( SCREEN.getx(), + // SCREEN.gety() ); + // + // status = USER; + // + // break; + // }; +} + + + +void toggle_help() +{ + switch ( status ) + { + case HELP: + + hide(); + + status = 0; + + break; + + + case 0: + + WINSIZE = 7; + + show(); + + + default: + + if ( WINSIZE != 7 ) + { + hide(); + + WINSIZE = 7; + + show(); + } + + + win.clear(); + win.attrib( 0x71 ); + + win << " [ShF1] Macro Help [AltM] Edit Current Menu [AltS] Static\n" + " [AltC] Chat [AltE] Edit User [AltH] Hang Up\n" + " [AltI] Image [AltJ] DOS Shell [AltL] Lock Out\n" + " [AltR] Reset Chat [Ctrl-Lt/Rt] Level [Up/Dn] Timer\n" + " [Home] Reset Status [F2-F10] Status [PgUp/PgDn] Cycle status"; + + SCREEN.setPos( SCREEN.getX(), + SCREEN.getY() ); + + status = HELP; + + break; + } +} + + + +void toggle_macrohelp() +{ + switch ( status ) + { + case MACRO: + + hide(); + + status = 0; + + break; + + + case 0: + + WINSIZE = 7; + + show(); + + + default: + + if ( WINSIZE != 7 ) + { + hide(); + + WINSIZE = 7; + + show(); + } + + + win.clear(); + + + for ( int i = 0; i < 10; i++ ) + { + win.setPos( ( i / 5 ) * 38 + 2, + i % 5 + 1 ); + + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if ( registered ) + { + win << form( "AF%-2d - %-27.27s", + i + 1, + cfg.sysopkeys[ i ] ); + } + else + { + win << form( "AF%-2d - %-27.27s", + i + 1, + "REGISTER NOW!" ); + } + } + + + SCREEN.setPos( SCREEN.getX(), + SCREEN.getY() ); + + status = MACRO; + + + break; + } +} diff --git a/HELP.OBJ b/HELP.OBJ new file mode 100644 index 0000000..132f1c1 Binary files /dev/null and b/HELP.OBJ differ diff --git a/HUDSON.CPP b/HUDSON.CPP new file mode 100644 index 0000000..3f4a605 --- /dev/null +++ b/HUDSON.CPP @@ -0,0 +1,1429 @@ +#define Use_MsgBase + +#include +#include +#include +#include "proboard.hpp" + + + +struct HudsonMsgInfo +{ + int low; + int high; + int total; + int active[ 200 ]; +}; + + + +struct HudsonMsgIdx +{ + int num; + byte area; +}; + + + +struct HudsonMsgToIdx +{ + char to[ 36 ]; +}; + + + +struct HudsonMsgHdr +{ + int msgNum; + int prevMsg; + int nextMsg; + int tRead; + word startRec; + int numRecs; + int destNet; + int destNode; + int orgNet; + int orgNode; + char destZone; + char orgZone; + int cost; + byte msgAttr; + byte netAttr; + byte area; + char postTime[ 6 ]; + char postDate[ 9 ]; + char to [ 36 ]; + char from[ 36 ]; + char subj[ 67 ]; + Date recvDate; + Time recvTime; + + void operator=( Message& ); +}; + + + +const byte QMSGATTR_DELETED = 0x01; +const byte QMSGATTR_UNMOVED_NET = 0x02; +const byte QMSGATTR_NET = 0x04; +const byte QMSGATTR_PVT = 0x08; +const byte QMSGATTR_RECEIVED = 0x10; +const byte QMSGATTR_UNMOVED_ECHO = 0x20; +const byte QMSGATTR_LOCAL = 0x40; + +const byte QNETATTR_KILL = 0x01; +const byte QNETATTR_SENT = 0x02; +const byte QNETATTR_ATTACH = 0x04; +const byte QNETATTR_CRASH = 0x08; +const byte QNETATTR_REQ = 0x10; +const byte QNETATTR_AUD = 0x20; +const byte QNETATTR_RET = 0x40; + +const int CACHE_NEXT = 1; +const int CACHE_PREV = 2; +const int CACHE_START = 3; + + + +HudsonMsgBase::HudsonMsgBase() +{ + lastMsgIdx = new HudsonMsgIdx; + lastReadArray = NULL; + highArray = NULL; + + open(); +} + + + +HudsonMsgBase::~HudsonMsgBase() +{ + close(); + + delete lastMsgIdx; + + + if ( highArray ) + { + delete [] highArray; + } + + + if ( lastReadArray ) + { + delete [] lastReadArray; + } +} + + + +void HudsonMsgHdr::operator=( Message &msg ) +{ + msg.to[ 35 ] = msg.from[ 35 ] + = msg.subj[ 65 ] = '\0'; // Safety measure + + + msgNum = int( msg.id ); + prevMsg = int( msg.prev ); + nextMsg = int( msg.next ); + tRead = 0; + destNet = msg.destNet; + destZone = msg.destZone; + destNode = msg.destNode; + orgNet = msg.origNet; + orgZone = msg.origZone; + orgNode = msg.origNode; + cost = msg.cost; + area = msg.areaNum(); + + msgAttr = 0; + netAttr = 0; + + + if ( msg.attr & MSGATTR_ECHOMAIL && + ! ( msg.attr & MSGATTR_SENT ) && + msg.attr & MSGATTR_LOCAL ) + { + msgAttr |= QMSGATTR_UNMOVED_ECHO; + } + + + if ( msg.attr & MSGATTR_NETMAIL && + ! ( msg.attr & MSGATTR_SENT ) && + msg.attr & MSGATTR_LOCAL ) + { + msgAttr |= QMSGATTR_UNMOVED_NET; + } + + + if ( msg.attr & MSGATTR_DELETED ) msgAttr |= QMSGATTR_DELETED; + // if ( msg.attr & MSGATTR_UNSENT_NET ) msgAttr |= QMSGATTR_UNMOVED_NET; + if ( msg.attr & MSGATTR_NETMAIL ) msgAttr |= QMSGATTR_NET; + if ( msg.attr & MSGATTR_PRIVATE ) msgAttr |= QMSGATTR_PVT; + if ( msg.attr & MSGATTR_RECEIVED ) msgAttr |= QMSGATTR_RECEIVED; + // if ( msg.attr & MSGATTR_UNSENT_ECHO ) msgAttr |= QMSGATTR_UNMOVED_ECHO; + if ( msg.attr & MSGATTR_LOCAL ) msgAttr |= QMSGATTR_LOCAL; + + if ( msg.attr & MSGATTR_KILL ) netAttr |= QNETATTR_KILL; + if ( msg.attr & MSGATTR_CRASH ) netAttr |= QNETATTR_CRASH; + if ( msg.attr & MSGATTR_SENT ) netAttr |= QNETATTR_SENT; + if ( msg.attr & MSGATTR_FILE ) netAttr |= QNETATTR_ATTACH; + if ( msg.attr & MSGATTR_FILEREQ ) netAttr |= QNETATTR_REQ; + if ( msg.attr & MSGATTR_AUDITREQ ) netAttr |= QNETATTR_AUD; + if ( msg.attr & MSGATTR_RECEIPTREQ ) netAttr |= QNETATTR_RET; + + + sprintf( postTime, + "%02d:%02d", + msg.postTime[ 0 ], + msg.postTime[ 1 ] ); + + c2pas( postTime ); + + + sprintf( postDate, + "%02d-%02d-%02d", + msg.postDate[ 1 ], + msg.postDate[ 0 ], + // msg.postDate[ 2 ] ); // Y2K BUG! + msg.postDate[ 2 ] % 100 ); // JDR: Y2K FIXED! + + c2pas( postDate ); + + + strcpy( to, msg.to ); + + c2pas( to ); + + + strcpy( from, msg.from ); + + c2pas( from ); + + + strcpy( subj, msg.subj ); + + c2pas( subj ); + + + recvDate = msg.recvDate; + recvTime = msg.recvTime; +} + + + +void Message::operator=( HudsonMsgHdr& mh ) +{ + num = mh.msgNum; + id = mh.msgNum; + prev = mh.prevMsg; + next = mh.nextMsg; + destNet = mh.destNet; + destZone = mh.destZone; + destNode = mh.destNode; + origNet = mh.orgNet; + origZone = mh.orgZone; + origNode = mh.orgNode; + cost = mh.cost; + + attr = 0; + + + if ( mh.msgAttr & QMSGATTR_DELETED ) attr |= MSGATTR_DELETED; + if ( mh.msgAttr & QMSGATTR_UNMOVED_NET ) attr |= MSGATTR_NETMAIL; + if ( mh.msgAttr & QMSGATTR_NET ) attr |= MSGATTR_NETMAIL; + if ( mh.msgAttr & QMSGATTR_PVT ) attr |= MSGATTR_PRIVATE; + if ( mh.msgAttr & QMSGATTR_RECEIVED ) attr |= MSGATTR_RECEIVED; + if ( mh.msgAttr & QMSGATTR_UNMOVED_ECHO ) attr |= MSGATTR_ECHOMAIL; + if ( mh.msgAttr & QMSGATTR_LOCAL ) attr |= MSGATTR_LOCAL; + + if ( mh.netAttr & QNETATTR_KILL ) attr |= MSGATTR_KILL; + if ( mh.netAttr & QNETATTR_SENT ) attr |= MSGATTR_SENT; + if ( mh.netAttr & QNETATTR_ATTACH ) attr |= MSGATTR_FILE; + if ( mh.netAttr & QNETATTR_CRASH ) attr |= MSGATTR_CRASH; + if ( mh.netAttr & QNETATTR_REQ ) attr |= MSGATTR_FILEREQ; + if ( mh.netAttr & QNETATTR_AUD ) attr |= MSGATTR_AUDITREQ; + if ( mh.netAttr & QNETATTR_RET ) attr |= MSGATTR_RECEIPTREQ; + + + if ( attr & MSGATTR_LOCAL ) + { + if ( ! ( mh.msgAttr & QMSGATTR_UNMOVED_ECHO ) && + ! ( mh.msgAttr & QMSGATTR_UNMOVED_NET ) ) + { + attr |= MSGATTR_SENT; + } + } + + + setArea( mh.area ); + + + mh.postTime[ 0 ] = min( (byte) mh.postTime[ 0 ], 5 ); + + pas2c( mh.postTime ); + + + postTime[ 0 ] = atoi( strtok( mh.postTime, ":" ) ); + postTime[ 1 ] = atoi( strtok( NULL, ":" ) ); + postTime[ 2 ] = 0; + + + mh.postDate[ 0 ] = min( (byte) mh.postDate[ 0 ], 8 ); + + pas2c( mh.postDate ); + + + postDate[ 1 ] = atoi( strtok( mh.postDate, "-" ) ); + postDate[ 0 ] = atoi( strtok( NULL, "-" ) ); + // postDate[ 2 ] = atoi( strtok( NULL, "-" ) ); // Y2K BUG! + postDate[ 2 ] = atoi( strtok( NULL, "-" ) ) % 100; // JDR: Y2K FIX! + + + mh.to[ 0 ] = min( (byte) mh.to[ 0 ], 35 ); + + pas2c( mh.to ); + strcpy( to, mh.to ); + + + mh.from[ 0 ] = min( (byte) mh.from[ 0 ], 35 ); + + pas2c( mh.from ); + strcpy( from, mh.from ); + + + mh.subj[ 0 ] = min( (byte) mh.subj[ 0 ], 65 ); + + pas2c( mh.subj ); + strcpy( subj, mh.subj ); + + + recvDate = mh.recvDate; + recvTime = mh.recvTime; +} + + + +bool HudsonMsgBase::open() +{ + FileName fn_msghdr( cfg.msgpath, "MSGHDR.BBS" ); + FileName fn_msgtxt( cfg.msgpath, "MSGTXT.BBS" ); + FileName fn_msgtoidx( cfg.msgpath, "MSGTOIDX.BBS" ); + FileName fn_msgidx( cfg.msgpath, "MSGIDX.BBS" ); + FileName fn_msginfo( cfg.msgpath, "MSGINFO.BBS" ); + + + if ( ! f_msghdr .open( fn_msghdr, fmode_rw | fmode_copen ) || + ! f_msgtxt .open( fn_msgtxt, fmode_rw | fmode_copen ) || + ! f_msgtoidx.open( fn_msgtoidx, fmode_rw | fmode_copen, 2048 ) || + ! f_msgidx .open( fn_msgidx, fmode_rw | fmode_copen, 1024 ) || + ! f_msginfo .open( fn_msginfo, fmode_rw | fmode_copen ) ) + { + if ( f_msghdr .error() ) file_error( fn_msghdr ); + if ( f_msgtxt .error() ) file_error( fn_msgtxt ); + if ( f_msgtoidx.error() ) file_error( fn_msgtoidx ); + if ( f_msgidx .error() ) file_error( fn_msgidx ); + if ( f_msginfo .error() ) file_error( fn_msginfo ); + + fatalerror( "Error creating Hudson message base" ); + + return FALSE; + } + + flushCache(); + + return TRUE; +} + + + +void HudsonMsgBase::close() +{ + flushCache(); + + f_msghdr .close(); + f_msgtxt .close(); + f_msgtoidx.close(); + f_msgidx .close(); + f_msginfo .close(); +} + + + +long HudsonMsgBase::highMsg( MsgArea& ma ) +{ + readHighArray(); + + return long( highArray[ ma.areaNum - 1 ] ); +} + + + +long HudsonMsgBase::lowMsg( MsgArea& ) +{ + HudsonMsgInfo mi; + + readInfo( mi ); + + return long( mi.low ); +} + + + +long HudsonMsgBase::numMsgs( MsgArea& ma ) +{ + HudsonMsgInfo mi; + + readInfo( mi ); + + return long( mi.active[ ma.areaNum - 1 ] ); +} + + + +long HudsonMsgBase::totalMsgs() +{ + HudsonMsgInfo mi; + + readInfo( mi ); + + return long( mi.total ); +} + + + +void HudsonMsgBase::readInfo( HudsonMsgInfo &mi ) +{ + CLEAR_OBJECT( mi ); + + f_msginfo.rewind(); + f_msginfo.flush(); + + f_msginfo.read( & mi, + sizeof( mi ) ); +} + + + +void HudsonMsgBase::writeInfo( HudsonMsgInfo &mi ) +{ + f_msginfo.rewind(); + + f_msginfo.write( & mi, + sizeof( mi ) ); + + f_msginfo.flush(); +} + + + +long HudsonMsgBase::readMsg( Message &msg, + long num ) +{ + HudsonMsgIdx mi; + int order = 1; + + + f_msgidx.rewind(); + + + if ( num < 0 ) + { + order = -1; + num = -num; + } + + + long index = findIdx( mi, + int( num ), + msg.areaNum(), + order ); + + + if ( index < 0 ) + { + return -1; + } + + + HudsonMsgHdr hdr; + + + f_msghdr.seek( index * sizeof( hdr ) ); + + + if ( f_msghdr.read( & hdr, + sizeof( hdr ) ) != sizeof( hdr ) ) + { + return -1; + } + + + msg = hdr; // Conversion applied! + + return msg.id; +} + + + +void HudsonMsgBase::flushCache() +{ + lastReadRecord = -1; + lastIndex = -1; + lastMsgIdx->num = -1; + lastMsgIdx->area = 0; + + + if ( highArray != NULL ) + { + delete [] highArray; + } + + + if ( lastReadArray != NULL ) + { + delete [] lastReadArray; + } + + + highArray = NULL; + lastReadArray = NULL; +} + + + +void HudsonMsgBase::readHighArray() +{ + if ( highArray ) + { + return; + } + + + highArray = new int[ 200 ]; + + + HudsonMsgIdx mi; + + + memset( highArray, + 0, + sizeof( *highArray ) * 200 ); + + f_msgidx.seek( 0 ); + + + for ( ; ; ) + { + if ( f_msgidx.read( & mi, + sizeof( mi ) ) != sizeof( mi ) ) + { + break; + } + + + if ( mi.num > 0 && + mi.area > 0 && + mi.area < 200 && + mi.num > highArray[ mi.area - 1 ] ) + { + highArray[ mi.area - 1 ] = mi.num; + } + } +} + + + +long HudsonMsgBase::findIdx( HudsonMsgIdx &mi, + int num, + int area, + int order ) +{ + long idx = -1; + + + if ( order < 0 ) + { + idx = f_msgidx.len() / 3; + } + + + if ( lastMsgIdx->num == num && + lastMsgIdx->area == area ) + { + mi = *lastMsgIdx; + + return lastIndex; + } + + + if ( order == 0 ) + { + flushCache(); + } + + + if ( lastMsgIdx->num > 0 ) + { + if ( num > lastMsgIdx->num && + order > 0 ) + { + idx = lastIndex; + } + + + if ( num < lastMsgIdx->num && + order < 0 ) + { + idx = lastIndex; + } + } + + + if ( order < 0 ) + { + f_msgidx.disableBuffer(); + + + for ( idx--; idx >= 0; idx-- ) + { + f_msgidx.seek( idx * sizeof( HudsonMsgIdx ) ); + + f_msgidx.read( lastMsgIdx, sizeof( *lastMsgIdx ) ); + + + if ( lastMsgIdx->num < 1 ) + { + continue; + } + + + if ( lastMsgIdx->num <= num && + lastMsgIdx->area == area ) + { + lastIndex = idx; + mi = *lastMsgIdx; + + f_msgidx.enableBuffer(); + + return idx; + } + } + + + f_msgidx.enableBuffer(); + } + else + { + //---- + // >=0 + //---- + + for ( idx++; ; idx++ ) + { + f_msgidx.seek( idx * sizeof( HudsonMsgIdx ) ); + + + if ( f_msgidx.read( lastMsgIdx, + sizeof( *lastMsgIdx ) ) != sizeof( *lastMsgIdx ) ) + { + break; + } + + + if ( lastMsgIdx->area == area ) + { + if ( + lastMsgIdx->num == num || + ( + lastMsgIdx->num >= num && + order > 0 + ) + ) + { + lastIndex = idx; + mi = *lastMsgIdx; + + return idx; + } + } + } + } + + + flushCache(); + + return -1; +} + + + +word HudsonMsgBase::readMsgText( Message &msg, + char *ptr, + long offset, + word size ) +{ + HudsonMsgIdx mi; + HudsonMsgHdr hdr; + long index = findIdx( mi, + int( msg.id ), + msg.areaNum(), + 0 ); + + + if ( index < 0 ) + { + return 0; + } + + + f_msghdr.seek( index * sizeof( HudsonMsgHdr ) ); + + + if ( f_msghdr.read( & hdr, + sizeof( hdr ) ) != sizeof( hdr ) ) + { + return 0; + } + + + byte buf[ 256 ]; + long rec = hdr.startRec + offset / 255; + word bytescopied = 0; + int buf_index = int( offset % 255 ); + + + for ( ; + + rec < ( hdr.startRec + hdr.numRecs ) && + bytescopied < size; + + rec++ ) + { + f_msgtxt.seek( rec * 256 ); + f_msgtxt.read( buf, 256 ); + + + int l = int( buf[ 0 ] ); + + pas2c( buf ); + + l -= buf_index; + + + if ( l < 1 ) + { + break; + } + + + if ( l > size-bytescopied ) + { + l = size - bytescopied; + } + + + memcpy( ptr + bytescopied, + & buf[ buf_index ], + l ); + + bytescopied += l; + buf_index = 0; + } + + + return bytescopied; +} + + + +word HudsonMsgBase::scanMail( MessageIndex *mi, + word maxmsgs ) +{ + f_msgtoidx.rewind(); + + + int i; + int num_found; + long index; + MsgArea ma; + + + for ( index = 0, i = 0; i < maxmsgs; index++ ) + { + HudsonMsgToIdx h_mti; + HudsonMsgIdx h_mi; + + + if ( f_msgtoidx.read( & h_mti, + sizeof( h_mti ) ) != sizeof( h_mti ) ) + { + break; + } + + + pas2c( h_mti.to ); + + + if ( stricmp( user.name, h_mti.to ) && + stricmp( user.alias, h_mti.to ) ) + { + continue; + } + + + f_msgidx.seek( index * 3 ); + + + if ( f_msgidx.read( & h_mi, + sizeof( h_mi ) ) == sizeof( h_mi ) ) + { + mi[ i ].num = h_mi.num; + mi[ i ].area = h_mi.area; + + + if ( ! ma.read( mi[ i ].area ) ) + { + continue; + } + + + if ( ! stricmp( user.alias, + h_mti.to ) && + + ! ma.flags && + + strcmp( user.name, user.alias ) ) + { + continue; + } + + + if ( mi[ i ].num > 1 && + user.mailCheckBoards.connected( mi[ i ].area ) && + ma.msgBaseType == MSGBASE_HUDSON && + ( + check_access( ma.readLevel, + ma.readFlags, + ma.readFlagsNot ) || + + ma.sysopAccess() + ) + ) + { + i++; + } + } + } + + + num_found = i; + + bool *to_all_areas = new bool[ 200 ]; + + + for ( i = 0; i < 200; i++ ) + { + to_all_areas[ i ] = FALSE; + } + + + for ( i = 1; i <= 200 && i <= MsgArea::highAreaNum(); i++ ) + { + if ( ! ma.read( i ) || + ! check_access( ma.readLevel, + ma.readFlags, + ma.readFlagsNot ) || + + ma.msgBaseType != MSGBASE_HUDSON || + ma.msgType != MSG_TOALL ) + { + continue; + } + + + to_all_areas[ i - 1 ] = TRUE; + } + + + f_msgidx.rewind(); + + + while ( num_found < 200 ) + { + HudsonMsgIdx tmp_mi; + + + if ( f_msgidx.read( & tmp_mi, + sizeof( tmp_mi ) ) != sizeof( tmp_mi ) ) + { + break; + } + + + if ( tmp_mi.num < 1 ) + { + continue; + } + + + if ( tmp_mi.area < 1 || + tmp_mi.area > 200 || + ! to_all_areas[ tmp_mi.area - 1 ] ) + { + continue; + } + + + if ( ! ma.read( tmp_mi.area ) ) + { + continue; + } + + + if ( tmp_mi.num > ma.lastRead( user_recnr ) ) + { + mi[ num_found ].num = tmp_mi.num; + mi[ num_found ].area = tmp_mi.area; + + num_found++; + } + } + + + delete [] to_all_areas; + + return num_found; +} + + + +long HudsonMsgBase::appendMsg( Message &msg ) +{ + File ft; + HudsonMsgIdx midx; + HudsonMsgToIdx mtidx; + HudsonMsgInfo minfo; + long startrec; + long numrecs; + long index; + + + if ( msg.areaNum() < 1 || + msg.areaNum() > 200 ) + { + return -1; + } + + + readInfo( minfo ); + + + if ( ! lock() ) + { + return -1; + } + + + msg.id = ++minfo.high; + msg.num = msg.id; + + + minfo.total++; + + minfo.active[ msg.areaNum() - 1 ]++; + + + midx.num = int( msg.id ); + midx.area = msg.areaNum(); + + + index = word( f_msghdr.len() / sizeof( HudsonMsgHdr ) ); + + + if ( ! ft.open( "MSGTMP" ) ) + { + unlock(); + + return -1; + } + + + startrec = f_msgtxt.len() / 256L; + + f_msgtxt.seek( 256L * startrec ); + + + for ( numrecs = 0; ; numrecs++ ) + { + char x[ 256 ]; + int l = 0; + + + if ( ! numrecs ) + { + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + sprintf( x, + "\1PID: " PID_STRING_HUDSON "%c\r\n" , + registered + ? 'r' + : 'u' ); + + l = strlen( x ); + } + + + l += ft.read( & x[ l ], + 255 - l ); + + x[ l ] = 0; + + + if ( l < 1 ) + { + break; + } + + + c2pas( x ); + + f_msgtxt.write( x, 256 ); + } + + + ft.close(); + + msg.postDate.today(); + msg.postTime.now(); + + + HudsonMsgHdr hdr; + + + hdr = msg; // Conversion applied + + + hdr.startRec = word( startrec ); + hdr.numRecs = int( numrecs ); + + + f_msghdr.seek( index * sizeof( HudsonMsgHdr ) ); + f_msghdr.write( & hdr, + sizeof( hdr ) ); + + + strcpy( mtidx.to, msg.to ); + + c2pas( mtidx.to ); + + + f_msgtoidx.seek( index * sizeof( HudsonMsgToIdx ) ); + f_msgtoidx.write( & mtidx, + sizeof( mtidx ) ); + + f_msgidx.seek( index * sizeof( HudsonMsgIdx ) ); + f_msgidx.write( & midx, + sizeof( midx ) ); + + + writeInfo( minfo ); + + unlock(); + + flushCache(); + + + return msg.id; +} + + + +bool HudsonMsgBase::updateMsg( Message &msg ) +{ + HudsonMsgIdx midx; + HudsonMsgToIdx mtidx; + long index; + + + if ( msg.areaNum() < 1 || + msg.areaNum() > 200 ) + { + return FALSE; + } + + + index = findIdx( midx, + int( msg.id ), + msg.areaNum(), + 0 ); + + + if ( index < 0 ) + { + return FALSE; + } + + + HudsonMsgHdr hdr; + + + f_msghdr.seek( index * sizeof( hdr ) ); + + + if ( f_msghdr.read( & hdr, + sizeof( hdr ) ) != sizeof( hdr ) ) + { + return FALSE; + } + + + if ( ! lock() ) + { + return FALSE; + } + + hdr = msg; + + + f_msghdr.seek( index * sizeof( hdr ) ); + f_msghdr.write( & hdr, + sizeof( hdr ) ); + + + strcpy( mtidx.to, msg.to ); + + + if ( msg.attr & MSGATTR_RECEIVED ) + { + strcpy( mtidx.to, "* Received *" ); + } + + + if ( msg.attr & MSGATTR_DELETED ) + { + strcpy( mtidx.to, "* Deleted *" ); + } + + + c2pas( mtidx.to ); + + + f_msgtoidx.seek( index * sizeof( HudsonMsgToIdx ) ); + f_msgtoidx.write( & mtidx, + sizeof( mtidx ) ); + + unlock(); + + flushCache(); + + + return TRUE; +} + + + +bool HudsonMsgBase::deleteMsg( Message &msg ) +{ + HudsonMsgIdx midx; + HudsonMsgToIdx mtidx; + HudsonMsgInfo minfo; + long index; + + + if ( msg.areaNum() < 1 || + msg.areaNum() > 200 ) + { + return FALSE; + } + + + index = findIdx( midx, + int( msg.id ), + msg.areaNum(), + 0 ); + + + if ( index < 0 ) + { + return FALSE; + } + + + HudsonMsgHdr hdr; + + + f_msghdr.seek( index * sizeof( hdr ) ); + + + if ( f_msghdr.read( & hdr, + sizeof( hdr ) ) != sizeof( hdr ) ) + { + return FALSE; + } + + + if ( ! lock() ) + { + return FALSE; + } + + + msg.attr |= MSGATTR_DELETED; + hdr = msg; + + + f_msghdr.seek( index * sizeof( hdr ) ); + f_msghdr.write( & hdr, + sizeof( hdr ) ); + + + strcpy( mtidx.to, "* Deleted *" ); + + c2pas( mtidx.to ); + + + f_msgtoidx.seek( index * sizeof( HudsonMsgToIdx ) ); + f_msgtoidx.write( & mtidx, + sizeof( mtidx ) ); + + + midx.num = -1; + + + f_msgidx.seek( index * 3 ); + f_msgidx.write( & midx, 3 ); + + readInfo( minfo ); + + + minfo.total--; + + minfo.active[ msg.areaNum() - 1 ]--; + + + writeInfo( minfo ); + + unlock(); + + flushCache(); + + + return TRUE; +} + + + +bool HudsonMsgBase::lock() +{ + static bool lock_error = FALSE; + + + if ( lock_error ) + { + return FALSE; + } + + f_msghdr.flush(); + f_msgtxt.flush(); + f_msginfo.flush(); + f_msgtoidx.flush(); + f_msgidx.flush(); + + + if ( ! cfg.multiline ) + { + return TRUE; + } + + + if ( ! f_msginfo.lock( 407, 1 ) ) + { + int errno = f_msginfo.error(); + + + lock_error = TRUE; + + fatalerror( form( "FILE LOCK ERROR (%d - %s)", + errno, + dos_error_message( errno ) ) ); + + return FALSE; + } + + + return TRUE; +} + + + +bool HudsonMsgBase::unlock() +{ + static bool lock_error = FALSE; + + + if ( lock_error ) + { + return FALSE; + } + + + f_msghdr.flush(); + f_msgtxt.flush(); + f_msginfo.flush(); + f_msgtoidx.flush(); + f_msgidx.flush(); + + + if ( ! cfg.multiline ) + { + return TRUE; + } + + + if ( ! f_msginfo.unlock( 407, 1 ) ) + { + int errno = f_msginfo.error(); + + + lock_error = TRUE; + + fatalerror( form( "FILE UNLOCK ERROR (%d - %s)", + errno, + dos_error_message( errno ) ) ); + } + + + return TRUE; +} + + + +long HudsonMsgBase::lastRead( MsgArea &ma, + long rec ) +{ + readLastRead( rec ); + + + if ( ma.areaNum < 1 || + ma.areaNum > 200 ) + { + return 0; + } + + + return long( lastReadArray[ ma.areaNum - 1 ] ); +} + + + +void HudsonMsgBase::setLastRead( MsgArea &ma, + long rec, + long num ) +{ + File f; + + + readLastRead( rec ); + + + if ( ! f.open( FileName( cfg.msgpath, + "LASTREAD.BBS" ), + fmode_rw | fmode_copen ) ) + { + return; + } + + + if ( f.len() < ( rec + 1 ) * 400 ) + { + word n = 0; + long r = f.len() / 400 * 400; + + f.seek( r ); + + + for( ; r < ( rec + 1 ) * 400; r += 2 ) + { + f.write( & n, 2 ); + } + } + + + if ( ma.areaNum < 1 || + ma.areaNum > 200 ) + { + return; + } + + + long pos = rec * 400 + ( ma.areaNum - 1 ) * 2; + + + f.seek( pos ); + + f.write( & num, 2 ); + + + lastReadArray[ ma.areaNum - 1 ] = int( num ); +} + + + +void HudsonMsgBase::readLastRead( long recno ) +{ + static dword ticks = clockticks(); + + + if ( clockdiff( ticks ) > 1000 ) + { + ticks = clockticks(); + + flushCache(); + } + + + if ( lastReadArray && + recno == lastReadRecord ) + { + return; + } + + + if ( lastReadArray == NULL ) + { + lastReadArray = new int[ 200 ]; + + memset( lastReadArray, + 0, + 400 ); + } + + + lastReadRecord = recno; + + + File f; + + + if ( ! f.open( FileName( cfg.msgpath, + "LASTREAD.BBS" ) ) ) + { + return; + } + + + f.seek( recno * 400 ); + + + if ( f.read( lastReadArray, 400 ) != 400 ) + { + lastReadRecord = -1; + + memset( lastReadArray, + 0, + 400 ); + } +} diff --git a/HUDSON.OBJ b/HUDSON.OBJ new file mode 100644 index 0000000..d73fe92 Binary files /dev/null and b/HUDSON.OBJ differ diff --git a/IMAGE.CPP b/IMAGE.CPP new file mode 100644 index 0000000..293958d --- /dev/null +++ b/IMAGE.CPP @@ -0,0 +1,41 @@ +#include +#include "proboard.hpp" +#include + +void +screen_image() +{ + File fp(form("%sIMAGE.TXT",syspath),fmode_write | + fmode_text | + fmode_copen | + fmode_append ); + + if(!fp.opened()) return; + + String line; + + for(int y=SCREEN.minY;y<=SCREEN.maxY;y++) + { + int lastchar = 0; + + line = ""; + + for(int x=SCREEN.minX;x<=SCREEN.maxX;x++) + { + char c = tsw_whaton(x,y); + + if(c!=' ') lastchar = x-SCREEN.minX+1; + + line << c; + } + + line << "\n\n"; + + line[lastchar] = '\n'; + line[lastchar+1] = '\0'; + + fp.printf("%s",(char *)line); + } +} + + diff --git a/IMAGE.HPP b/IMAGE.HPP new file mode 100644 index 0000000..08ae74b --- /dev/null +++ b/IMAGE.HPP @@ -0,0 +1,336 @@ +BYTE IMAGEDATA [] = { + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0C, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, + 'Ü', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'ú', 0x0C, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'Ü', 0x0F, 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0C, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'Ü', 0x0F, 'ß', 0x7F, ' ', 0x7F, 'þ', 0x7E, ' ', 0x7E, + ' ', 0x7E, 'þ', 0x7E, ' ', 0x7E, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ú', 0x0C, ' ', 0x0C, ' ', 0x0C, ' ', 0x0C, + ' ', 0x0C, 'Ü', 0x0F, 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Ü', 0x0F, + 'Ü', 0x0F, 'Û', 0x0F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Û', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, + 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, + 'Û', 0x0F, 'Û', 0x0F, 'Û', 0x0F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Û', 0x0F, 'Û', 0x0F, 'Û', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, + 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, 'Ü', 0x0F, + 'Ü', 0x0F, 'Ü', 0x0F, 'Û', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Û', 0x7F, 'Ü', 0x0F, 'Ü', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Ü', 0x0F, + 'ß', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'Û', 0x0F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Û', 0x7F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0C, ' ', 0x0C, ' ', 0x0C, + 'ß', 0x0F, 'ß', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, ' ', 0x7F, + 'þ', 0x7E, ' ', 0x7E, ' ', 0x7E, 'þ', 0x7E, ' ', 0x7E, ' ', 0x7E, + 'Ü', 0x7F, 'ß', 0x0F, 'ß', 0x0F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0C, ' ', 0x0C, ' ', 0x0C, ' ', 0x0C, ' ', 0x0C, 'Ü', 0x0F, + 'ß', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, + ' ', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0C, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ß', 0x0F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'ú', 0x0C, ' ', 0x0C, ' ', 0x0C, ' ', 0x0C, 'Ü', 0x0F, + 'ß', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, 'ß', 0x7F, + 'Ü', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'Û', 0x7F, 'ß', 0x7F, 'ß', 0x4F, 'ß', 0x7F, + 'ß', 0x7F, 'ß', 0x4F, 'ß', 0x7F, 'Û', 0x7F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Ü', 0x0F, + 'ß', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0F, ' ', 0x0F, + 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Û', 0x7F, + 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, 'Û', 0x7F, 'ß', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Ü', 0x0F, + 'ß', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, 'ú', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, + ' ', 0x7F, 'ß', 0x7F, 'Ü', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Ü', 0x0F, + 'Ü', 0x0F, 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, 'ß', 0x7F, + 'ß', 0x7F, 'Ü', 0x0F, 'Ü', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Ü', 0x0F, + 'ß', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ú', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, + ' ', 0x0D, 'ú', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, + 'ú', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, 'ú', 0x0D, + ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, 'ú', 0x0D, ' ', 0x0D, ' ', 0x0D, + ' ', 0x0D, 'ú', 0x0D, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, 'Û', 0x0F, + 'ß', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, + 'Ü', 0x7F, 'Ü', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, 'ß', 0x7F, + 'Û', 0x0F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0D, ' ', 0x0D, + ' ', 0x0D, ' ', 0x0D, 'ú', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, + 'ú', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, 'ú', 0x0D, + ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, ' ', 0x0D, 'ú', 0x0D, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'Û', 0x7F, ' ', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x3F, 'ß', 0x3F, + ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, 'ß', 0x3F, 'ß', 0x3F, + 'Ü', 0x7F, ' ', 0x7F, ' ', 0x7F, 'Û', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0E, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'Û', 0x0F, ' ', 0x7F, ' ', 0x7F, 'Û', 0x7F, ' ', 0x3F, + ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, + ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, 'Û', 0x7F, ' ', 0x7F, ' ', 0x7F, + 'Û', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'ú', 0x0E, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ú', 0x0E, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, + 'ß', 0x7F, 'Ü', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, + ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, ' ', 0x3F, 'Ü', 0x3F, 'ß', 0x7F, + ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0E, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0E, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'ú', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, + 'ß', 0x0F, 'Ü', 0x7F, ' ', 0x7F, ' ', 0x7F, 'ß', 0x7F, 'ß', 0x7F, + 'Ü', 0x3F, 'Ü', 0x3F, 'Ü', 0x3F, 'Ü', 0x3F, 'ß', 0x7F, 'ß', 0x7F, + ' ', 0x7F, ' ', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, 'ú', 0x0B, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0E, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0E, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0B, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'Ü', 0x7F, + 'Ü', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, ' ', 0x7F, + ' ', 0x7F, 'Ü', 0x7F, 'Ü', 0x7F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, 'ú', 0x0B, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0E, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ú', 0x0B, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'ß', 0x0F, 'ß', 0x0F, 'ß', 0x0F, + 'ß', 0x0F, 'ß', 0x0F, 'ß', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + 'ú', 0x0B, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0B, 'Ü', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, 'Ü', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Ü', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, 'Ü', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Ü', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ü', 0x0B, ' ', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ü', 0x0B, + ' ', 0x0B, 'Þ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ý', 0x0B, ' ', 0x0B, + 'Ü', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Ü', 0x0B, ' ', 0x0B, 'Ü', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, + 'Ü', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, + ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, + ' ', 0x0B, 'Þ', 0x0B, 'Û', 0x0B, 'Ý', 0x0B, ' ', 0x0B, ' ', 0x0B, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, + 'Ü', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, + ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, + 'Ü', 0x0B, 'Ü', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Ü', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, 'Ü', 0x0B, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'ß', 0x0B, + 'ß', 0x0B, 'ß', 0x0B, 'ß', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Þ', 0x0B, 'Û', 0x0B, 'Ý', 0x0B, + ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'ß', 0x0B, + 'ß', 0x0B, 'ß', 0x0B, 'ß', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'ß', 0x0B, 'ß', 0x0B, 'ß', 0x0B, + 'ß', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, 'ß', 0x0B, + 'ß', 0x0B, 'ß', 0x0B, 'ß', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'ß', 0x0B, 'ß', 0x0B, 'ß', 0x0B, 'ß', 0x0B, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0B, 'ß', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, 'Þ', 0x0B, + 'Û', 0x0B, 'Ý', 0x0B, ' ', 0x0B, ' ', 0x0B, ' ', 0x0B, 'ß', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, 'ß', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, 'Û', 0x0B, + 'Û', 0x0B, ' ', 0x0B, ' ', 0x0B, 'ß', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + ' ', 0x0B, 'Þ', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Ý', 0x0B, ' ', 0x0B, + 'ß', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'ß', 0x0B, ' ', 0x0B, 'ß', 0x0B, 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, + 'Û', 0x0B, 'Û', 0x0B, 'Û', 0x0B, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, ' ', 0x0F, + ' ', 0x0F, ' ', 0x0F}; + diff --git a/IMAGE.OBJ b/IMAGE.OBJ new file mode 100644 index 0000000..7470cdc Binary files /dev/null and b/IMAGE.OBJ differ diff --git a/INPDATE.CPP b/INPDATE.CPP new file mode 100644 index 0000000..ef5415f --- /dev/null +++ b/INPDATE.CPP @@ -0,0 +1,275 @@ +#include +#include +#include "proboard.hpp" + + + +//---------------------------------------------------------------- +// +// This table identifies where the slashes should be in the date +// strings. This supports each of the international date formats: +// +// MM/DD/YYYY +// YYYY/MM/DD +// DD/MM/YYYY +// +//---------------------------------------------------------------- + +static +const char piSlashColumns[ 3 ] [ 2 ] = +{ + { 2, 5 }, + { 4, 7 }, + { 2, 5 }, +}; + + + +//************************************************************************** +// +// Input a date value from the user +// +// Prototype: void InputDate( Date &d ); +// +// Parameters: d ... Date variable to fill-in +// iDateFormat ... Format of date to be entered +// +// Returns: None +// +// Remarks: +// +// This code has to be changed to support the various international formats: +// +// MM/DD/YYYY +// YYYY/MM/DD +// DD/MM/YYYY +// +// ------------------------------------------------------------------------- +// +// Created on: ??/??/?? (Philippe Leybaert) +// Last modified: 06/17/99 (Jeff Reeder) +// +//************************************************************************** + +void InputDate( Date &d, + byte iDateFormat ) // JDR: Added +{ + char s[ MAX_DATE_FIELD_SIZE + 1 ]; + byte k; + + + //------------------------------------------- + // Show a MAX_DATE_FIELD_SIZE-character field + //------------------------------------------- + + io.drawfield( MAX_DATE_FIELD_SIZE ); + + + int i = 0; + + + //------------------------------ + // Keep looping until we're done + //------------------------------ + + loop + { + //------------------------------------- + // Wait until the user enters something + //------------------------------------- + + k = io.wait(); + + + //----------------- + // What do we have? + //----------------- + + if ( + ( + ! isdigit( k ) and + k != CR and + k != BS + ) + or k > 0x7F // This check isn't needed, but better safe + ) + { + //---------------------------------------------- + // If it's not a digit, CR or a BS, we ignore it + //---------------------------------------------- + + continue; + } + + + if ( k == BS ) + { + //---------------------------------- + // We got a backspace (BS) character + //---------------------------------- + + if ( i > 0 ) + { + //------------------------------------- + // We have characters to backspace over + //------------------------------------- + + i--; + + + //------------------------------------------- + // Erase the previous character - destructive + // backspace just to be on the cautious side. + //------------------------------------------- + + io << "\b \b"; + + + if ( i == piSlashColumns[ iDateFormat ][ 0 ] or + i == piSlashColumns[ iDateFormat ][ 1 ] ) + { + //----------------------------------------- + // We ran over a slash/delimiter. Erase it + //----------------------------------------- + + i--; + + io << "\b \b"; + } + } + + + continue; + } + + + if ( k == CR ) + { + if ( i == 0 ) + { + //------------------------------------- + // We haven't entered anything. Choose + // the default date, Jan 1, 1900 + //------------------------------------- + + d.set( 0, 0, 0 ); + + break; + } + + + if ( i != MAX_DATE_FIELD_SIZE ) + { + //---------------------------------------------------- + // We haven't maxed out our field size. Ignore the CR + //---------------------------------------------------- + + continue; + } + else + { + //----------------------------------------- + // We have filled our date field. Let's + // parse the date information appropriately + //----------------------------------------- + + parse_date( d, + s, + user.dateFormat ); + + + if ( d.ok() ) + { + //------------------------------------------------- + // The date has legitimate values. Alright to quit + //------------------------------------------------- + + break; + } + else + { + //-------------------------------------------- + // The data was bogus. Keep reading more data + //-------------------------------------------- + + continue; + } + } + } + + + if ( i == MAX_DATE_FIELD_SIZE ) + { + //----------------------------------------------- + // We're at the maximum field size. Ignore input + //----------------------------------------------- + + continue; + } + + + //----------------------------------------------------------- + // Assign the current character at the current input position + //----------------------------------------------------------- + + s[ i++ ] = k; + + + //----------------------------- + // Output the current character + //----------------------------- + + io << k; + + + if ( i == piSlashColumns[ iDateFormat ][ 0 ] or + i == piSlashColumns[ iDateFormat ][ 1 ] ) + { + //--------------------------------------------------- + // We've moved to a slash position. Insert the slash + // automatically, and move to the next digit location + //--------------------------------------------------- + + s[ i++ ] = '/'; + + io << '/'; + } + } + + + //------------------------------------------------------------ + // We're all done with our date. Output a carriage return and + // make sure our buffer is NUL terminated before continuing. + //------------------------------------------------------------ + + io << '\r'; + + s[ i ] = '\0'; + + + if ( avatar ) + { + //--------------------------------------------------------------- + // We're in Avatar mode. Reset our screen attributes accordingly + //--------------------------------------------------------------- + + io << char( 22 ) + << char( 1 ) + << char( SCREEN.attrib() & 0x0F ); + } + else if ( ansi_mode ) + { + //------------------------------------------------------------- + // We're in ANSI mode. Make sure we reset the background color + //------------------------------------------------------------- + + io << "\x1b[40m"; + } + + + //------------------------------------- + // Flush all output to the user's modem + //------------------------------------- + + io.flush(); +} diff --git a/INPDATE.OBJ b/INPDATE.OBJ new file mode 100644 index 0000000..304729e Binary files /dev/null and b/INPDATE.OBJ differ diff --git a/IO.CPP b/IO.CPP new file mode 100644 index 0000000..c4a1eba --- /dev/null +++ b/IO.CPP @@ -0,0 +1,1065 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include +#include +#include +#include "desqview.hpp" +#include "proboard.hpp" +#include "fossil.hpp" + +static String align_string(char *s , int width , int alignment); + +static void near +nocarrier() +{ + if(ignore_carrier) return; + + dword ticks = clockticks(); + + for(;clockdiff(ticks)<10;) // Check for 1/2 second + { + msleep(100); + + if(fos_carrier(io.port)) return; + } + + LOG("Carrier lost!"); + + exit_proboard(); +} + +static byte conversion[256]; + +void +fossilio::init(int p,long b) +{ + byte baudcode; + + for(int i=0;i<256;i++) conversion[i]=i; + + conversion[(byte)'Ú']='+'; + conversion[(byte)'Ã']='+'; + conversion[(byte)'À']='+'; + conversion[(byte)'Â']='+'; + conversion[(byte)'Å']='+'; + conversion[(byte)'Á']='+'; + conversion[(byte)'¿']='+'; + conversion[(byte)'´']='+'; + conversion[(byte)'Ù']='+'; + conversion[(byte)'É']='+'; + conversion[(byte)'Ë']='+'; + conversion[(byte)'»']='+'; + conversion[(byte)'Ì']='+'; + conversion[(byte)'Î']='+'; + conversion[(byte)'¹']='+'; + conversion[(byte)'È']='+'; + conversion[(byte)'Ê']='+'; + conversion[(byte)'¼']='+'; + conversion[(byte)'Ö']='+'; + conversion[(byte)'Ò']='+'; + conversion[(byte)'·']='+'; + conversion[(byte)'Ç']='+'; + conversion[(byte)'×']='+'; + conversion[(byte)'¶']='+'; + conversion[(byte)'Ó']='+'; + conversion[(byte)'Ð']='+'; + conversion[(byte)'½']='+'; + conversion[(byte)'Õ']='+'; + conversion[(byte)'Ñ']='+'; + conversion[(byte)'¸']='+'; + conversion[(byte)'Æ']='+'; + conversion[(byte)'Ø']='+'; + conversion[(byte)'µ']='+'; + conversion[(byte)'Ô']='+'; + conversion[(byte)'Ï']='+'; + conversion[(byte)'¾']='+'; + conversion[(byte)'Í']='-'; + conversion[(byte)'Ä']='-'; + conversion[(byte)'³']='|'; + conversion[(byte)'º']='|'; + conversion[(byte)'Û']='#'; + conversion[(byte)'û']='*'; + conversion[(byte)'']='^'; + conversion[(byte)'']='v'; + conversion[(byte)'°']='#'; + conversion[(byte)'±']='#'; + conversion[(byte)'²']='#'; + + port=p; + baud=b; + stopenabled=0; + show_local = TRUE; + show_remote = TRUE; + more_func = NULLFUNC; + + inputbuffer.clear(); + + if(baud) + { + switch(baud) + { + case 300L: baudcode=0x43; break; + case 1200L: baudcode=0x83; break; + case 2400L: baudcode=0xA3; break; + case 4800L: baudcode=0xC3; break; + case 7200L: + case 9600L: baudcode=0xE3; break; + case 12000L: + case 14400L: + case 16800L: + case 19200L: baudcode=0x03; break; + default : baudcode=0x23; break; + } + + fos_init(port); + fos_setbps(port,baudcode); + fos_flowctl(port,2); + sleep(1); + } + + if(outputBuffer == NULL) + outputBuffer = new byte[cfg.IObuffersize]; + + bufferPtr = 0; + + SCREEN.disableCursor(); +} + +void +fossilio::clearinput() +{ + fos_purgeinput(port); +} + +fossilio::~fossilio() +{ + cooldown(); + + if(outputBuffer != NULL) + delete [] outputBuffer; +} + +void fossilio::cooldown() +{ + if(baud && baud != 65535L) + { + fos_purgeoutput(port); + fos_deinit(port); + sleep(1); + } +} + +void +fossilio::heatup() +{ + if(baud) + { + fos_init(port); + sleep(1); + } + + bufferPtr = 0; +} + +byte +fossilio::readkey() +{ + if(KB.hit()) + { + KEY key=KB.get(); + if(key>256) + { + sysopkey(key); + return 0; + } + else + { + external=0; + return (byte)key; + } + } + + static dword prevticks = 0; + + if(clockdiff(prevticks)>90) + { + static int inchatreq=0; + + prevticks = clockticks(); + + SCRAMBLE(); + + timer.check(); + + if(!access(form("%sDOWN.%d",syspath,node_number),0)) + { + io << S_SYSTEM_GOING_DOWN; + + LOG("Going down on external request"); + + File f; + f.open(form("%sISDOWN.%d",syspath,node_number),fmode_create|fmode_write); + f.close(); + + exit_proboard(100); + } + + if(!inchatreq && cfg.numnodes>1 && !chatflag) + { + user_online uo; + int cht=uo.check_chat(); + + if(cht) + { + inchatreq=1; + uo.read(cht); + io << "\n\n" << S_USER_REQUESTS_CHAT(uo.name,form("%d",cht)); + + if(ask(1)) + { + uo.setstatus(UO_CHATTING); + + io << "\n\n" << S_MULTILINE_CHAT_STARTED; + + multilinechat(cht); + + io << "\n\n" << S_MULTILINE_CHAT_ENDED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + uo.setstatus(UO_BROWSING); + } + else + { + uo.setstatus(UO_BUSY); + } + + inchatreq=0; + } + } + } + + if(!baud) return 0; + + FOS_STATUS status = fos_status(port); + + if(!status_carrier(status)) nocarrier(); + + if(status_byteready(status)) + { + external = 1; + return fos_getch(port); + } + + return 0; +} + +void +fossilio::flush() +{ + SCREEN.placeCursor(); + + if(bufferPtr) + { + for(;;) + { + FOS_STATUS s = fos_status(port); + + if(!(s & FSTAT_CARRIER)) nocarrier(); + + word x = fos_sendblock(port,outputBuffer,bufferPtr); + + if(x >= bufferPtr) break; + + bufferPtr -= x; + + memmove( outputBuffer , &outputBuffer[x] , bufferPtr); + } + + bufferPtr = 0; + } +} + +fossilio& +fossilio::operator<<(char c) +{ + if(c=='\f' && !cls_mode && user_recnr>=0 && !SCREEN.inEscape()) return *this; + + if(c=='\f' && !SCREEN.inEscape()) + { + color(COLOR_WHITE); + linecounter(0); + } + + if(c=='\n' && !SCREEN.inEscape()) (*this) << '\r'; + + if(no_ibm) c=conversion[(byte)c]; + + if(byte(c) == byte(255)) + { + flush(); + + return *this; + } + + if(baud && show_remote) + { + if(cfg.IObuffersize == 1) + { + for(;;) + { + FOS_STATUS s = fos_status(port); + + if(!(s & FSTAT_CARRIER)) nocarrier(); + + if(s & FSTAT_BUFEMPTY) break; + } + + fos_send(port,c); + } + else + { + outputBuffer[bufferPtr++] = c; + + if(bufferPtr == cfg.IObuffersize) flush(); + } + } + + if(show_local) SCREEN << c; + + return *this; +} + +fossilio& +fossilio::operator<<(char *s) +{ + send(s); + + return *this; +} + +byte +fossilio::send(char *str,char *hotkeys) +{ + if(hotkeys) + strupr(hotkeys); + + for(;*str;str++) + { + byte c=0; + + if(SCREEN.inEscape()) + { + (*this) << (*str); + + continue; + } + + if(stopenabled || hotkeys) + c = toupper(readkey()); + + if(hotkeys && c) + if(strchr(hotkeys,c)) + { + return c; + } + + if(c=='S') + { + stopped = TRUE; + flush(); + + return 1; + } + + if(c=='P') + wait("P\r"); + + c = *str; + + if(c=='\t') + { + wait('\r'); + + continue; + } + + if(c == 26) + { + fullcolor(*(++str)); + continue; + } + + if(c<8 && c>0) + { + color(c); + + continue; + } + + if(c == 24 || c == 25) + { + int l = int(*(str+1)); + char *fname = new char[l+1]; + strncpy(fname,str+2,l); + fname[l] = '\0'; + + if(c == 24) + run_sdkfile(fname); + else + showansasc(fname); + + str += l+1; + + delete [] fname; + + continue; + } + + if(c<0x18 && c>0x10 && c!=0x16) + { + color((c-0x10)|0x80); + } + else + { + (*this) << c; + } + } + + return 0; +} + +#pragma warn -def + +const int ALIGN_LEFT = 0, + ALIGN_RIGHT = 1, + ALIGN_CENTER = 2; + +byte +fossilio::sendfile(char *fn,char *hotkeys) +{ +bool fflag = FALSE, + kflag = FALSE, + moreok = TRUE, + stopok = TRUE, + avt_compr = FALSE; + +int alignment = ALIGN_LEFT; + +String str; + +if(rip_mode && (!show_local || !show_remote)) +{ + moreok = FALSE; + stopok = FALSE; +} + +static char *on_string = "ON " , *off_string = "OFF"; + +int fieldwidth; +byte avt_compr_char = '\0'; + +File f(fn,fmode_read,1024); +if(!f.opened()) return 2; + +if(hotkeys) strupr(hotkeys); + +linecounter(0); +for(;;) + { + byte c=toupper(readkey()); + if(hotkeys && c) if(strchr(hotkeys,c)) + { + return c; + } + if(c=='S' && stopok) + { + stopped=1; + flush(); + return 1; + } + if(c=='P') wait("\rP"); + + int x=f.readByte(); + if(x<0) break; + + byte input=(byte)x; + + if(avt_compr) + { + if(fflag || kflag) + { + if(!avt_compr_char) + { + avt_compr_char = input; + } + else + { + if(avt_compr_char=='@' || avt_compr_char=='#' || avt_compr_char=='%') + { + fieldwidth += input; + + switch(avt_compr_char) + { + case '@': alignment = ALIGN_LEFT; break; + case '#': alignment = ALIGN_RIGHT; break; + case '%': alignment = ALIGN_CENTER; break; + } + } + avt_compr = FALSE; + } + } + else + { + avt_compr = FALSE; + + (*this) << char(25) << input; + } + + continue; + } + + if(SCREEN.inEscape()) + { + (*this) << input; + continue; + } + + if(input == 0x19) + { + avt_compr = TRUE; + avt_compr_char = '\0'; + continue; + } + + if((fflag || kflag) && (input=='@' || input=='#' || input=='%')) + { + fieldwidth++; + + switch(input) + { + case '@': alignment = ALIGN_LEFT; break; + case '#': alignment = ALIGN_RIGHT; break; + case '%': alignment = ALIGN_CENTER; break; + } + + continue; + } + + if(fflag) + { + switch(input) + { + case 'A': str = user.name; break; + case 'B': str = user.city; break; + case 'C': str = user.passWord; break; + case 'D': str = user.dataPhone; break; + case 'E': str = user.voicePhone; break; + case 'F': str = user.lastDate.format("D MMM CCYY"); break; + case 'G': str = user.lastTime.format("HH:MM:SS"); break; + case 'H': + case 'I': + case 'J': + case 'K': { + char s[33]; + user.aFlags.flagstostr(s); + str = s; + } break; + case 'L': str = form("%d",user.credit); break; + case 'M': str = form("%lu",user.msgsPosted); break; + case 'N': str = form("%d",user.highMsgRead); break; + case 'O': str = form("%u",user.level); break; + case 'P': str = form("%lu",user.timesCalled); break; + case 'Q': str = form("%lu",user.numUploads); break; + case 'R': str = form("%lu",user.kbUploaded); break; + case 'S': str = form("%lu",user.numDownloads); break; + case 'T': str = form("%lu",user.kbDownloaded); break; + case 'U': str = form("%ld",user.timeUsed); break; + case 'V': str = form("%d",user.screenLength); break; + case 'W': str = user_firstname; break; + case 'X': str = (ansi_mode? on_string:off_string); break; + case 'Y': str = (pause_mode? on_string:off_string); break; + case 'Z': str = (cls_mode? on_string:off_string); break; + case '0': str = (fsed_mode? on_string:off_string); break; + case '1': str = user.alias; break; + case '2': str = (stack_mode? off_string:on_string); break; + case '3': str = (no_ibm? off_string:on_string); break; + case '4': str = user.state; break; + case '5': str = user.birthDate.format("D MMM CCYY"); break; + case '6': str = user.expDate.format("D MMM CCYY"); break; + case '7': str = form("%d",int(user.expDate - Date(TODAY))); break; + case '8': str = (avatar? on_string:off_string); break; + case '9': str = (avtplus? on_string:off_string); break; + case '>': str = user.forwardTo; break; + case '<': str = date_formats_long[user.dateFormat]; break; + case '[': str = form("%ld",long(download_limit)-user.kbToday); break; + case '!': if(timer.online()90) // Update info-window every 5 seconds. + { + update_display(); + ticks = clockticks(); + } + + if(inputbuffer.pollnext()) goto redo; + timer.checkinactivity(); + DV_timeslice(); + } + + return c; +} + +void +fossilio::wait(char c) +{ + while(toupper(wait())!=toupper(c)) {} +} + +byte +fossilio::wait(char *s) +{ + strupr(s); + + for(;;) + { + char k = toupper(wait()); + + if(strchr(s,k)) return k; + } +} + +void +fossilio::drawfield(int max) +{ + int i; + + if(ansi_mode || avatar) + { + fullcolor((SCREEN.attrib()) & (0xF) | (cfg.promptColor<<4)); + + if(!avatar) + { + for(i=0;i0) + { + i--; + (*this) << "\b \b"; + } + } + else if(i= 0) i = int(l); + + return ret; +} + +int +fossilio::read(long& i,int len) +{ + char s[10]; + + read(s,(len<10)?len:10,READMODE_DIGITS); + if(!s[0]) return -1; + + i = atol(s); + + return 0; +} + + +void +fossilio::hangup() +{ + if(baud) fos_setdtr(port,0); +} + +int +fossilio::ask(int def) +{ + int ret; + String keys; + + if(def) + { + io << S_ASK_YES_NO; + keys = K_ASK_YES_NO; + } + else + { + io << S_ASK_NO_YES; + keys = K_ASK_NO_YES; + } + + keys << '\r'; + + char k = wait(keys); + + if(k == keys[0]) + ret = TRUE; + if(k == keys[1]) + ret = FALSE; + if(k == keys[2]) + ret = def; + + if(ret) + (*this) << S_YES; + else + (*this) << S_NO; + + (*this) << char(0xFF); + + return ret; +} + +void +fossilio::color(byte c) +{ + current_color=c; + + int blink=(int)(c & 0x80); + c &= 0x7; + + if(avatar) + { + static char colors[] = { 0,4,2,6,1,5,3,7 }; + + (*this) << char(22) << char(1); + (*this) << char(colors[c]|8); + if(blink) (*this) << char(22) << char(2); + return; + } + + if(!ansi_mode) return; + + String s("\x1b[0;1;3"); + + s << (char)(c+'0'); + if(blink) s << ";5"; + s << 'm'; + + for(int i=0;s[i];i++) (*this) << s[i]; +} + +void +fossilio::cls() +{ + (*this) << '\f' << char(0xFF); +} + + +void +fossilio::enablestop() +{ + stopenabled = 1; + stopped = 0; +} + +void +fossilio::disablestop() +{ + stopenabled = stopped = 0; +} + +static +String +align_string(char *s , int width , int alignment) +{ + String ret_s; + int i,j = width-strlen(s); + + if(strlen(s) >= width) return String(s); + + switch(alignment) + { + case ALIGN_LEFT : for(i=0;i +#include +#include +#include +#include "proboard.hpp" +#include "jam.hpp" + + +//////////////////////////////////////////////////////////////////////////////////// + +static dword +PbDate2JamDate( const Date& pbd , const Time& pbt) +{ + int years = pbd.year() - 70; + + dword unixtime = dword(years) * 365L + (dword(years + 1) / 4L); + + return ((unixtime + pbd.dayNum() - 1) * 86400L + long(pbt)); +} + + + +static +void JamDate2PbDate( Date &pbd, + Time& pbt , + dword jamdate ) +{ + struct tm *tms = localtime( (long *) & jamdate ); + long seconds = long( jamdate ) % 86400L; + + + jamdate -= seconds; + + pbt = seconds; + + + pbd[ 0 ] = tms->tm_mday; + pbd[ 1 ] = tms->tm_mon+1; + pbd[ 2 ] = tms->tm_year; // Y2K - LOOKS OK, BUT CHECK IT OUT +} + + + +static void +JamMsg2Message(JamHeader *jam,JamExtHeader *xjam,Message *msg) +{ + strcpy(msg->from , xjam->from); + strcpy(msg->to , xjam->to); + strcpy(msg->subj , xjam->subject); + + msg->origZone = xjam->fromZone; + msg->origNet = xjam->fromNet; + msg->origNode = xjam->fromNode; + msg->origPoint = xjam->fromPoint; + msg->destZone = xjam->toZone; + msg->destNet = xjam->toNet; + msg->destNode = xjam->toNode; + msg->destPoint = xjam->toPoint; + + JamDate2PbDate( msg->postDate, msg->postTime , jam->dateWritten ); + JamDate2PbDate( msg->recvDate, msg->recvTime , jam->dateReceived); + + msg->num = jam->messageNumber; + msg->id = msg->num; + + msg->prev = jam->replyTo; + msg->next = jam->reply1St; + + msg->attr = 0; + + if(jam->attribute & JAM_MSG_LOCAL ) msg->attr |= MSGATTR_LOCAL; + if(jam->attribute & JAM_MSG_INTRANSIT ) msg->attr |= MSGATTR_TRANSIT; + if(jam->attribute & JAM_MSG_PRIVATE ) msg->attr |= MSGATTR_PRIVATE; + if(jam->attribute & JAM_MSG_READ ) msg->attr |= MSGATTR_RECEIVED; + if(jam->attribute & JAM_MSG_SENT ) msg->attr |= MSGATTR_SENT; + if(jam->attribute & JAM_MSG_KILLSENT ) msg->attr |= MSGATTR_KILL; + if(jam->attribute & JAM_MSG_HOLD ) msg->attr |= MSGATTR_HOLD; + if(jam->attribute & JAM_MSG_CRASH ) msg->attr |= MSGATTR_CRASH; + if(jam->attribute & JAM_MSG_IMMEDIATE ) msg->attr |= MSGATTR_IMMEDIATE; + if(jam->attribute & JAM_MSG_DIRECT ) msg->attr |= MSGATTR_DIRECT; + if(jam->attribute & JAM_MSG_FILEREQUEST) msg->attr |= MSGATTR_FILEREQ; + if(jam->attribute & JAM_MSG_FILEATTACH ) msg->attr |= MSGATTR_FILE; + if(jam->attribute & JAM_MSG_TRUNCFILE ) msg->attr |= MSGATTR_TRUNCFILE; + if(jam->attribute & JAM_MSG_KILLFILE ) msg->attr |= MSGATTR_DELFILE; + if(jam->attribute & JAM_MSG_RECEIPTREQ ) msg->attr |= MSGATTR_RECEIPTREQ; + if(jam->attribute & JAM_MSG_ORPHAN ) msg->attr |= MSGATTR_ORPHAN; + if(jam->attribute & JAM_MSG_NODISP ) msg->attr |= MSGATTR_NODISP; + if(jam->attribute & JAM_MSG_LOCKED ) msg->attr |= MSGATTR_LOCKED; + if(jam->attribute & JAM_MSG_DELETED ) msg->attr |= MSGATTR_DELETED; + + if(jam->attribute & JAM_MSG_TYPEECHO ) msg->attr |= MSGATTR_ECHOMAIL; + if(jam->attribute & JAM_MSG_TYPENET ) msg->attr |= MSGATTR_NETMAIL; +} + +static void +Message2JamMsg(JamHeader *jam,JamExtHeader *xjam,Message *msg) +{ + if(xjam != NULL) + { + strcpy(xjam->from , msg->from); + strcpy(xjam->to , msg->to ); + strcpy(xjam->subject , msg->subj); + + xjam->fromZone = msg->origZone ; + xjam->fromNet = msg->origNet ; + xjam->fromNode = msg->origNode ; + xjam->fromPoint = msg->origPoint; + xjam->toZone = msg->destZone ; + xjam->toNet = msg->destNet ; + xjam->toNode = msg->destNode ; + xjam->toPoint = msg->destPoint; + } + + if(msg->postDate.ok()) + jam->dateWritten = PbDate2JamDate( msg->postDate, msg->postTime ); + + jam->dateReceived = 0; + + if(msg->attr & MSGATTR_RECEIVED && msg->recvDate.ok()) + jam->dateReceived = PbDate2JamDate( msg->recvDate, msg->recvTime ); + + jam->messageNumber = msg->num; + + jam->replyTo = msg->prev; + jam->reply1St = msg->next; + + jam->attribute = 0; + + if(msg->attr & MSGATTR_LOCAL ) jam->attribute |= JAM_MSG_LOCAL ; + if(msg->attr & MSGATTR_TRANSIT ) jam->attribute |= JAM_MSG_INTRANSIT ; + if(msg->attr & MSGATTR_PRIVATE ) jam->attribute |= JAM_MSG_PRIVATE ; + if(msg->attr & MSGATTR_RECEIVED ) jam->attribute |= JAM_MSG_READ ; + if(msg->attr & MSGATTR_SENT ) jam->attribute |= JAM_MSG_SENT ; + if(msg->attr & MSGATTR_KILL ) jam->attribute |= JAM_MSG_KILLSENT ; + if(msg->attr & MSGATTR_HOLD ) jam->attribute |= JAM_MSG_HOLD ; + if(msg->attr & MSGATTR_CRASH ) jam->attribute |= JAM_MSG_CRASH ; + if(msg->attr & MSGATTR_IMMEDIATE ) jam->attribute |= JAM_MSG_IMMEDIATE ; + if(msg->attr & MSGATTR_DIRECT ) jam->attribute |= JAM_MSG_DIRECT ; + if(msg->attr & MSGATTR_FILEREQ ) jam->attribute |= JAM_MSG_FILEREQUEST; + if(msg->attr & MSGATTR_FILE ) jam->attribute |= JAM_MSG_FILEATTACH ; + if(msg->attr & MSGATTR_TRUNCFILE ) jam->attribute |= JAM_MSG_TRUNCFILE ; + if(msg->attr & MSGATTR_DELFILE ) jam->attribute |= JAM_MSG_KILLFILE ; + if(msg->attr & MSGATTR_RECEIPTREQ) jam->attribute |= JAM_MSG_RECEIPTREQ ; + if(msg->attr & MSGATTR_ORPHAN ) jam->attribute |= JAM_MSG_ORPHAN ; + if(msg->attr & MSGATTR_NODISP ) jam->attribute |= JAM_MSG_NODISP ; + if(msg->attr & MSGATTR_LOCKED ) jam->attribute |= JAM_MSG_LOCKED ; + if(msg->attr & MSGATTR_DELETED ) jam->attribute |= JAM_MSG_DELETED ; + + if(msg->attr & MSGATTR_ECHOMAIL ) jam->attribute |= JAM_MSG_TYPEECHO ; + if(msg->attr & MSGATTR_NETMAIL ) jam->attribute |= JAM_MSG_TYPENET ; + + if(!(msg->attr & (MSGATTR_ECHOMAIL|MSGATTR_NETMAIL))) + jam->attribute |= JAM_MSG_TYPELOCAL; +} + +static bool +SubFields2ExtHeader( byte *subfields , word size , JamExtHeader& ext_hdr ) +{ + JamSubField *sub; + word pos; + + for(pos = 0 ; pos < size ; ) + { + sub = (JamSubField *)(&subfields[pos]); + + pos += sizeof(JamSubField); + + byte *buf = new byte[word(sub->datLen)+1]; + memcpy(buf , &subfields[pos] , word(sub->datLen)); + buf[word(sub->datLen)] = '\0'; + + pos += sub->datLen; + + // At this point we have all data! + + switch(sub->loId) + { + case JAMID_SENDERNAME: + { + strncpy( ext_hdr.from , buf , 35 ); + ext_hdr.from[35] = '\0'; + } + break; + case JAMID_RECEIVERNAME: + { + strncpy( ext_hdr.to , buf , 35 ); + ext_hdr.to[35] = '\0'; + } + break; + case JAMID_SUBJECT: + { + strncpy( ext_hdr.subject , buf , 71 ); + ext_hdr.subject[71] = '\0'; + } + break; + case JAMID_PID: + { + strncpy( ext_hdr.pid , buf , 79 ); + ext_hdr.pid[79] = '\0'; + } + break; + case JAMID_OADDRESS: + { + char *s = strtok( buf , ":"); + + ext_hdr.fromZone = 0; + ext_hdr.fromNet = 0; + ext_hdr.fromNode = 0; + ext_hdr.fromPoint = 0; + + if(s) + { + ext_hdr.fromZone = atoi(s); + s = strtok( NULL , "/"); + if(s) + { + ext_hdr.fromNet = atoi(s); + s = strtok( NULL , "."); + if(s) + { + ext_hdr.fromNode = atoi(s); + s = strtok( NULL , "@"); + if(s) + { + ext_hdr.fromPoint = atoi(s); + } + } + } + } + } + break; + case JAMID_DADDRESS: + { + char *s = strtok( buf , ":"); + + ext_hdr.toZone = 0; + ext_hdr.toNet = 0; + ext_hdr.toNode = 0; + ext_hdr.toPoint = 0; + + if(s) + { + ext_hdr.toZone = atoi(s); + s = strtok( NULL , "/"); + if(s) + { + ext_hdr.toNet = atoi(s); + s = strtok( NULL , "."); + if(s) + { + ext_hdr.toNode = atoi(s); + s = strtok( NULL , "."); + if(s) + { + ext_hdr.toPoint = atoi(s); + } + } + } + } + } + break; + } + + delete [] buf; + } + + return TRUE; +} + +word +ExtHeader2SubFields(byte *subfields, JamExtHeader& xjam) +{ + char addr_buf[30]; + + JamSubField *sub; + word index = 0; + + sub = (JamSubField *) &subfields[index]; + + sub->loId = JAMID_SENDERNAME; + sub->hiId = 0; + sub->datLen = strlen(xjam.from); + + index += sizeof(JamSubField); + + strcpy(&subfields[index] , xjam.from); + + index += sub->datLen; + + sub = (JamSubField *) &subfields[index]; + + sub->loId = JAMID_RECEIVERNAME; + sub->hiId = 0; + sub->datLen = strlen(xjam.to); + + index += sizeof(JamSubField); + + strcpy(&subfields[index] , xjam.to); + + index += sub->datLen; + + sub = (JamSubField *) &subfields[index]; + + sub->loId = JAMID_SUBJECT; + sub->hiId = 0; + sub->datLen = strlen(xjam.subject); + + index += sizeof(JamSubField); + + strcpy(&subfields[index] , xjam.subject); + + index += sub->datLen; + + if(xjam.fromZone) + { + sprintf(addr_buf,"%d:%d/%d.%d",xjam.fromZone,xjam.fromNet,xjam.fromNode,xjam.fromPoint); + + sub = (JamSubField *) &subfields[index]; + + sub->loId = JAMID_OADDRESS; + sub->hiId = 0; + sub->datLen = strlen(addr_buf); + + index += sizeof(JamSubField); + + strcpy(&subfields[index] , addr_buf); + + index += sub->datLen; + } + + if(xjam.toZone) + { + sprintf(addr_buf,"%d:%d/%d.%d",xjam.toZone,xjam.toNet,xjam.toNode,xjam.toPoint); + + sub = (JamSubField *) &subfields[index]; + + sub->loId = JAMID_DADDRESS; + sub->hiId = 0; + sub->datLen = strlen(addr_buf); + + index += sizeof(JamSubField); + + strcpy(&subfields[index] , addr_buf); + + index += sub->datLen; + } + + if(xjam.pid[0]) + { + sub = (JamSubField *) &subfields[index]; + + sub->loId = JAMID_PID; + sub->hiId = 0; + sub->datLen = strlen(xjam.pid); + + index += sizeof(JamSubField); + + strcpy(&subfields[index] , xjam.pid); + + index += sub->datLen; + } + + return index; +} + + +JamMsgBase::JamMsgBase() +{ + lastAreaNum = -1; + + jamHeader = new JamFileHeader; + + CLEAR_OBJECT(*jamHeader); +} + +JamMsgBase::~JamMsgBase() +{ + close(); + + delete jamHeader; +} + +bool +JamMsgBase::open() +{ + return TRUE; +} + +void +JamMsgBase::close() +{ + f_jhr.close(); + f_jdt.close(); + f_jdx.close(); + f_jlr.close(); + + lastAreaNum = -1; +} + +bool +JamMsgBase::jamLock() +{ + return f_jhr.lock(0,1); +} + +bool +JamMsgBase::jamUnLock() +{ + return f_jhr.unlock(0,1); +} + +bool +JamMsgBase::readHeader() +{ + f_jhr.rewind(); + + return (f_jhr.read( jamHeader , sizeof(JamFileHeader) ) == sizeof(JamFileHeader)); +} + +bool +JamMsgBase::writeHeader() +{ + f_jhr.rewind(); + + return (f_jhr.write( jamHeader , sizeof(JamFileHeader) ) == sizeof(JamFileHeader)); +} + +bool +JamMsgBase::openArea(MsgArea& ma) +{ + if(ma.areaNum == lastAreaNum) + return TRUE; + + lastAreaNum = -1; + + FileName fn_jhr( ma.path , ".JHR" ); + FileName fn_jdt( ma.path , ".JDT" ); + FileName fn_jdx( ma.path , ".JDX" ); + FileName fn_jlr( ma.path , ".JLR" ); + + f_jhr.close(); + f_jdt.close(); + f_jdx.close(); + f_jlr.close(); + + if(!f_jhr.open( fn_jhr , fmode_rw | fmode_shared , 4096)) + { + if(!f_jhr.open( fn_jhr , fmode_create | fmode_rw | fmode_shared , 4096)) + return FALSE; + + CLEAR_OBJECT(*jamHeader); + + jamHeader->signature = JAM_SIGNATURE; + jamHeader->baseMsgNum = 1; + jamHeader->passwordCrc = dword(-1); + jamHeader->dateCreated = PbDate2JamDate( Date(TODAY) , Time(NOW) ); + + if(!writeHeader()) + return FALSE; + } + else + { + if(!readHeader()) + return FALSE; + } + + if( !f_jdt.open( fn_jdt , fmode_rw | fmode_copen | fmode_shared , 512 ) + || !f_jdx.open( fn_jdx , fmode_rw | fmode_copen | fmode_shared , 2048 ) + || !f_jlr.open( fn_jlr , fmode_rw | fmode_copen | fmode_shared , 512 ) + ) + { + return FALSE; + } + + lastAreaNum = ma.areaNum; + + return TRUE; +} + +long +JamMsgBase::readMsg(Message &msg,long id) +{ + int order = 1; + JamIndex idx; + + if(id < 0) + { + order = -1; + id = -id; + } + + if(!openArea(*msg.msgArea)) + return -1; + + long num_found = findIdx( idx , id , order ); + + if(num_found < 0) + return -1; + + JamHeader hdr; + JamExtHeader ext_hdr; + + f_jhr.seek(idx.offset); + if(f_jhr.read( &hdr , sizeof(JamHeader) ) != sizeof(JamHeader)) + return -1; + + if(hdr.signature != JAM_SIGNATURE) + return -1; + + byte *subfields = new byte[word(hdr.subFieldLen)]; + + if(f_jhr.read( subfields , hdr.subFieldLen ) != hdr.subFieldLen) + return -1; + + SubFields2ExtHeader( subfields , word(hdr.subFieldLen) , ext_hdr ); + + JamMsg2Message( &hdr , &ext_hdr , &msg ); + + delete [] subfields; + + return num_found; +} + +long +JamMsgBase::lowMsg(MsgArea &ma) +{ + if(!openArea(ma)) + return -1; + + readHeader(); + + return jamHeader->baseMsgNum; +} + +long +JamMsgBase::numMsgs(MsgArea &ma) +{ + if(!openArea(ma)) + return -1; + + readHeader(); + + return jamHeader->activeMsgs; +} + +long +JamMsgBase::highMsg(MsgArea &ma) +{ + if(!openArea(ma)) + return -1; + + readHeader(); + + return (f_jdx.len() / sizeof(JamIndex) + jamHeader->baseMsgNum - 1); +} + +word +JamMsgBase::readMsgText(Message& msg,char *ptr,long offset,word size) +{ + JamIndex idx; + + long num_found = findIdx( idx , msg.num , 0 ); + + if(num_found != msg.num) + return 0; + + JamHeader hdr; + + f_jhr.seek(idx.offset); + if(f_jhr.read( &hdr , sizeof(JamHeader) ) != sizeof(JamHeader)) + return 0; + + if(hdr.signature != JAM_SIGNATURE) + return 0; + + if(offset + size > hdr.txtLen) + { + if(offset > hdr.txtLen) + return 0; + + size = hdr.txtLen - offset; + } + + f_jdt.seek(hdr.offset + offset); + + return f_jdt.read( ptr , size ); +} + + +long +JamMsgBase::appendMsg(Message& msg) +{ + JamIndex j_idx; + JamHeader j_hdr; + JamExtHeader j_ext_hdr; + + if(!openArea(*msg.msgArea)) + return -1; + + jamLock(); + readHeader(); + + long next_num = f_jdx.len() / sizeof(JamIndex); + + j_idx.crc32 = JamCrc(msg.to); + j_idx.offset = f_jhr.len(); + + f_jdx.seek(next_num * sizeof(JamIndex)); + f_jdx.write(&j_idx , sizeof(JamIndex)); + + byte *subfields = new char[1024]; + + CLEAR_OBJECT( j_hdr ); + CLEAR_OBJECT( j_ext_hdr ); + + j_hdr.signature = JAM_SIGNATURE; + j_hdr.revision = 1; + j_hdr.passwordCrc = dword(-1); + j_hdr.offset = f_jdt.len(); + + msg.num = next_num + jamHeader->baseMsgNum; + msg.id = msg.num; + + Message2JamMsg(&j_hdr,&j_ext_hdr,&msg); + + strcpy(j_ext_hdr.pid,PID_STRING_JAM); + + j_hdr.subFieldLen = ExtHeader2SubFields(subfields, j_ext_hdr); + + File f_txt; + + if(f_txt.open("MSGTMP",fmode_read,512)) + { + f_jdt.seek( j_hdr.offset ); + + for(int len = 0;;) + { + int c = f_txt.readByte(); + + if(c < 0) + break; + + if(char(c) == '' || char(c) == '\n') + continue; + + f_jdt << char(c); + len++; + } + + j_hdr.txtLen = len; + } + + f_jhr.seek ( j_idx.offset ); + f_jhr.write( &j_hdr , sizeof(JamHeader)); + f_jhr.write( subfields , j_hdr.subFieldLen); + + delete [] subfields; + + jamHeader->activeMsgs++; + jamHeader->modCounter++; + + writeHeader(); + jamUnLock(); + + return msg.num; +} + +bool +JamMsgBase::updateMsg(Message& msg) +{ + JamIndex idx; + JamHeader hdr; + + if(!openArea(*msg.msgArea)) + return FALSE; + + if(!jamLock()) + return FALSE; + + readHeader(); + + long found = findIdx( idx , msg.num , 0 ); + + if(found != msg.num) + { + jamUnLock(); + + return FALSE; + } + + f_jhr.seek(idx.offset); + if(f_jhr.read( &hdr , sizeof(JamHeader) ) != sizeof(JamHeader)) + { + jamUnLock(); + + return FALSE; + } + + Message2JamMsg( &hdr , NULL , &msg ); + + f_jhr.seek(idx.offset); + f_jhr.write( &hdr , sizeof(JamHeader) ); + + jamHeader->modCounter++; + + writeHeader(); + + jamUnLock(); + + return TRUE; +} + +long +JamMsgBase::msgNum(MsgArea&,long id) +{ + return id; +} + +long +JamMsgBase::msgId(MsgArea&,long num) +{ + return num; +} + + +bool +JamMsgBase::deleteMsg(Message &msg) +{ + JamIndex idx; + JamHeader hdr; + + if(!openArea(*msg.msgArea)) + return FALSE; + + if(!jamLock()) + return FALSE; + + readHeader(); + + long found = findIdx( idx , msg.num , 0 ); + + if(found != msg.num) + { + jamUnLock(); + + return FALSE; + } + + f_jhr.seek(idx.offset); + if(f_jhr.read( &hdr , sizeof(JamHeader) ) != sizeof(JamHeader)) + { + jamUnLock(); + + return FALSE; + } + + if(hdr.attribute & JAM_MSG_DELETED) + { + jamUnLock(); + + return FALSE; + } + + hdr.attribute |= JAM_MSG_DELETED; + hdr.txtLen = 0; + + f_jhr.seek(idx.offset); + f_jhr.write( &hdr , sizeof(JamHeader) ); + + idx.crc32 = dword(-1); + + f_jdx.seek ( (found - jamHeader->baseMsgNum) * sizeof(JamIndex) ); + f_jdx.write( &idx , sizeof(JamIndex) ); + + jamHeader->activeMsgs--; + jamHeader->modCounter++; + + writeHeader(); + + jamUnLock(); + + return TRUE; +} + + +static void +showbusy() +{ + static int x = 0; + + char *ss[] = { + "|", + "/", + "-", + "\\", + NULL + }; + + io << '\b' << ss[x] << char(0xFF); + + x = ++x % 4; +} + +word +JamMsgBase::scanMail(MessageIndex *msgidx,word maxmsgs) +{ + MsgArea ma; + int index = 0; + + io << "\3 "; + + for(int i = 1; i <= MsgArea::highAreaNum() ; i++) + { + if(!ma.read(i)) continue; + + if(ma.msgBaseType != MSGBASE_JAM) continue; + + if(!user.mailCheckBoards.connected(i)) continue; + + if(!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot)) continue; + + dword name_crc = JamCrc(user.name); + dword alias_crc = JamCrc(user.alias); + + if(!openArea(ma)) + continue; + + long lr = ma.lastRead(user_recnr); + + showbusy(); + + f_jdx.rewind(); + long rec = 0; + + while( index < maxmsgs ) + { + JamIndex jamidx; + + if(f_jdx.read(&jamidx,sizeof(JamIndex)) != sizeof(JamIndex)) break; + + if(jamidx.crc32 == name_crc || jamidx.crc32 == alias_crc || (ma.msgType == MSG_TOALL && (rec+jamHeader->baseMsgNum) > lr)) + { + Message msg(ma.areaNum); + + //*msg.msgArea = ma; + + long msgread = readMsg( msg , rec + jamHeader->baseMsgNum ); + + if(msgread == rec + jamHeader->baseMsgNum && !(msg.attr & MSGATTR_RECEIVED)) + { + if(( !stricmp(msg.to,user.name) + || (!stricmp(msg.to,user.alias) && ma.flags && strcmp(user.name,user.alias)) + || (ma.msgType == MSG_TOALL && (rec+jamHeader->baseMsgNum) > lr) + ) + && (check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) || ma.sysopAccess()) + ) + { + msgidx[index].num = msgread; + msgidx[index].area = ma.areaNum; + index++; + } + } + + f_jdx.seek( (rec+1) * sizeof(JamIndex) ); + } + + rec++; + } + } + + io << '\b'; + + return index; +} + +long +JamMsgBase::lastRead(MsgArea& ma,long) +{ + if(!openArea(ma)) + return -1; + + dword crc = JamCrc(user.name); + + JamLastRead jlr; + + f_jlr.rewind(); + + for(;;) + { + if(f_jlr.read( &jlr , sizeof(JamLastRead) ) != sizeof(JamLastRead)) + break; + + if(crc == jlr.userCrc) + return jlr.highReadMsg; + } + + return 0; +} + +void +JamMsgBase::setLastRead(MsgArea& ma,long,long num) +{ + if(!openArea(ma)) + return; + + dword crc = JamCrc(user.name); + + JamLastRead jlr; + + f_jlr.rewind(); + + for(long rec = 0 ;; rec++) + { + if(f_jlr.read( &jlr , sizeof(JamLastRead) ) != sizeof(JamLastRead)) + break; + + if(crc == jlr.userCrc) + { + f_jlr.seek( rec * sizeof(JamLastRead) ); + + jlr.highReadMsg = num; + + f_jlr.write( &jlr , sizeof(JamLastRead) ); + + return; + } + } + + jlr.userCrc = crc; + jlr.userId = crc; + jlr.lastReadMsg = num; + jlr.highReadMsg = num; + + f_jlr.seek( rec * sizeof(JamLastRead) ); + f_jlr.write( &jlr , sizeof(JamLastRead) ); +} + +long +JamMsgBase::findIdx( JamIndex &mi,long num,int order ) +{ + JamIndex local_idx; + + if(order < 0) + order = -1; + + if(order > 0) + order = 1; + + if(num < jamHeader->baseMsgNum) + { + if(order <= 0) + return -1; + + num = jamHeader->baseMsgNum; + } + + f_jdx.seek((num - jamHeader->baseMsgNum) * sizeof(JamIndex)); + + if(f_jdx.read( &local_idx , sizeof(JamIndex) ) != sizeof(JamIndex)) + { + if(order >= 0) // exact or forward + return -1; + + num = f_jdx.len() / sizeof(JamIndex) + jamHeader->baseMsgNum - 1; + + f_jdx.seek((num - jamHeader->baseMsgNum) * sizeof(JamIndex)); + if(f_jdx.read( &local_idx , sizeof(JamIndex) ) != sizeof(JamIndex)) + return -1; + + if(num <= 0) + return -1; + } + + if(local_idx.crc32 != dword(-1)) + { + mi = local_idx; + + return num; + } + + if(!order) + return -1; + + while( local_idx.crc32 == dword(-1) ) + { + num += order; + + if(order < 0) + { + f_jdx.seek((num - jamHeader->baseMsgNum) * sizeof(JamIndex)); + } + + if(f_jdx.read( &local_idx , sizeof(JamIndex) ) != sizeof(JamIndex)) + return -1; + } + + mi = local_idx; + + return (local_idx.crc32 != dword(-1)) ? num : -1; +} diff --git a/JAM.HPP b/JAM.HPP new file mode 100644 index 0000000..0715e3b --- /dev/null +++ b/JAM.HPP @@ -0,0 +1,127 @@ +const dword JAM_SIGNATURE = 0x004D414ALU; + +struct JamFileHeader + { + dword signature; + dword dateCreated; + dword modCounter; + dword activeMsgs; + dword passwordCrc; + dword baseMsgNum; + byte reserved[1000]; + }; + +struct JamHeader + { + dword signature; + word revision; + word reserved; + dword subFieldLen; + dword timesRead; + dword msgidCrc; + dword replyCrc; + dword replyTo; + dword reply1St; + dword replyNext; + dword dateWritten; + dword dateReceived; + dword dateProcessed; + dword messageNumber; + dword attribute; + dword attribute2; + dword offset; + dword txtLen; + dword passwordCrc; + dword cost; + }; + +struct JamExtHeader + { + int fromZone; + int fromNet; + int fromNode; + int fromPoint; + int toZone; + int toNet; + int toNode; + int toPoint; + + char from[36]; + char to[36]; + char subject[72]; + char pid[80]; + }; + +struct JamSubField + { + word loId; + word hiId; + dword datLen; + }; + +struct JamIndex + { + dword crc32; + dword offset; + }; + +struct JamLastRead + { + dword userCrc; + dword userId; + dword lastReadMsg; + dword highReadMsg; + }; + + +const word JAMID_OADDRESS = 0; +const word JAMID_DADDRESS = 1; +const word JAMID_SENDERNAME = 2; +const word JAMID_RECEIVERNAME = 3; +const word JAMID_MSGID = 4; +const word JAMID_REPLYID = 5; +const word JAMID_SUBJECT = 6; +const word JAMID_PID = 7; +const word JAMID_TRACE = 8; +const word JAMID_ENCLOSEDFILE = 9; +const word JAMID_ENCLOSEDFILEWALIAS = 10; +const word JAMID_ENCLOSEDFREQ = 11; +const word JAMID_ENCLOSEDFILEWCARD = 12; +const word JAMID_ENCLOSEDINDIRECTFILE= 13; +const word JAMID_EMBINDAT = 1000; +const word JAMID_FTSKLUDGE = 2000; +const word JAMID_SEENBY2D = 2001; +const word JAMID_PATH2D = 2002; +const word JAMID_FLAGS = 2003; +const word JAMID_TZUTCINFO = 2004; + + +const dword JAM_MSG_LOCAL = 0x00000001L; +const dword JAM_MSG_INTRANSIT = 0x00000002L; +const dword JAM_MSG_PRIVATE = 0x00000004L; +const dword JAM_MSG_READ = 0x00000008L; +const dword JAM_MSG_SENT = 0x00000010L; +const dword JAM_MSG_KILLSENT = 0x00000020L; +const dword JAM_MSG_ARCHIVESENT = 0x00000040L; +const dword JAM_MSG_HOLD = 0x00000080L; +const dword JAM_MSG_CRASH = 0x00000100L; +const dword JAM_MSG_IMMEDIATE = 0x00000200L; +const dword JAM_MSG_DIRECT = 0x00000400L; +const dword JAM_MSG_GATE = 0x00000800L; +const dword JAM_MSG_FILEREQUEST = 0x00001000L; +const dword JAM_MSG_FILEATTACH = 0x00002000L; +const dword JAM_MSG_TRUNCFILE = 0x00004000L; +const dword JAM_MSG_KILLFILE = 0x00008000L; +const dword JAM_MSG_RECEIPTREQ = 0x00010000L; +const dword JAM_MSG_CONFIRMREQ = 0x00020000L; +const dword JAM_MSG_ORPHAN = 0x00040000L; +const dword JAM_MSG_ENCRYPT = 0x00080000L; +const dword JAM_MSG_COMPRESS = 0x00100000L; +const dword JAM_MSG_ESCAPED = 0x00200000L; +const dword JAM_MSG_FPU = 0x00400000L; +const dword JAM_MSG_TYPELOCAL = 0x00800000L; +const dword JAM_MSG_TYPEECHO = 0x01000000L; +const dword JAM_MSG_TYPENET = 0x02000000L; +const dword JAM_MSG_NODISP = 0x20000000L; +const dword JAM_MSG_LOCKED = 0x40000000L; +const dword JAM_MSG_DELETED = 0x80000000L; diff --git a/JAM.OBJ b/JAM.OBJ new file mode 100644 index 0000000..2257213 Binary files /dev/null and b/JAM.OBJ differ diff --git a/LANGUAGE.CPP b/LANGUAGE.CPP new file mode 100644 index 0000000..361bd35 --- /dev/null +++ b/LANGUAGE.CPP @@ -0,0 +1,286 @@ +#include +#include +#include +#include "proboard.hpp" + +LanguageFile pb_curlang; +LanguageString *pb_lang; +int pb_num_lang = 0; + +static void +KillLanguage() +{ + if(pb_lang) + { + delete [] pb_lang; + } + + pb_lang = NULL; + pb_num_lang = 0; +} + +bool +ReadLanguage( char *langname ) +{ + if(langname == NULL) + { + KillLanguage(); + + return FALSE; + } + + FileName fn(syspath , langname , ".PBL"); + File f; + + if(!f.open(fn , fmode_read , 4096)) + { + LOG("ERROR: Unable to read language file %s",(char *)fn); + + return FALSE; + } + + if(f.read(&pb_curlang , sizeof(LanguageFile)) != sizeof(LanguageFile)) + { + LOG("Error reading language file <%s>" , (char *)fn); + + return FALSE; + } + + if(strlen(pb_curlang.menuPath) < 3) + pb_curlang.menuPath[0] = '\0'; + + if(strlen(pb_curlang.txtPath) < 3) + pb_curlang.txtPath[0] = '\0'; + + if(strlen(pb_curlang.questPath) < 3) + pb_curlang.questPath[0] = '\0'; + + if(pb_curlang.menuPath[0]) + append_backspace(pb_curlang.menuPath); + + if(pb_curlang.txtPath[0]) + append_backspace(pb_curlang.txtPath); + + if(pb_curlang.questPath[0]) + append_backspace(pb_curlang.questPath); + + KillLanguage(); + + f >> pb_num_lang; + + pb_lang = new LanguageString[pb_num_lang]; + + for(int i=0;i0) + LOG("s = '%s'",(char *)str); +#endif + + if(pb_lang[i].flags & LANG_PROMPT) + { + if(!last_was_ansi) + str << ' '; + + str << char(26) << char(pb_lang[i].promptcolor); + } + + delete [] pb_lang[i].s; + + pb_lang[i].len = str.len(); + pb_lang[i].s = new char[ pb_lang[i].len + 1 ]; + + strcpy(pb_lang[i].s , str); + } + + f.close(); + + S_PRESS_ENTER_TO_CONTINUE = _S_PRESS_ENTER_TO_CONTINUE; + S_PRESS_ENTER_TO_CONTINUE << '\t'; + + return TRUE; +} + +char +wait_language_hotkeys(char *hk, bool enter) +{ + String hotkeys; + + hotkeys = hk; + if(enter) + hotkeys << '\r'; + + char k = io.wait(hotkeys); + + k = hotkeys.find(String(char(k))); + + if(hotkeys[k] == '\r') + return '\r'; + else + return k; +} + +int +language_string_length( char *str ) +{ + int l = 0; + + for( ; *str ; str++) + { + char c = *str; + + if(c == char(26)) + { + str++; + continue; + } + + l++; + } + + return l; +} diff --git a/LANGUAGE.OBJ b/LANGUAGE.OBJ new file mode 100644 index 0000000..7d61f32 Binary files /dev/null and b/LANGUAGE.OBJ differ diff --git a/LASTCALL.CPP b/LASTCALL.CPP new file mode 100644 index 0000000..5496f2a --- /dev/null +++ b/LASTCALL.CPP @@ -0,0 +1,8 @@ +#include +#include "proboard.hpp" + +void +lastcallers(char *data) +{ + run_sdkfile(String("_LC ") + data); +} diff --git a/LASTCALL.OBJ b/LASTCALL.OBJ new file mode 100644 index 0000000..f0392b6 Binary files /dev/null and b/LASTCALL.OBJ differ diff --git a/LISTFILE.CPP b/LISTFILE.CPP new file mode 100644 index 0000000..d88a0e5 --- /dev/null +++ b/LISTFILE.CPP @@ -0,0 +1,1330 @@ +#define Use_LinkedList +#define Use_TagList + +#include +#include +#include +#include +#include +#include "proboard.hpp" + +static char *valid="ABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890#$"; + +static void near getfname(char *s,char *fn); +static bool near displayline(char *line,FileArea& fa); + +const int MAX_TAGS = 52; + +LinkedList taglist; + +FilesIdx local_tags[MAX_TAGS]; +int num_local_tags; + +static int remember_area = 0; +static long remember_pos = -1; + +static int last_tag = 0; + +char tag_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890*#$!@%+=&?|>= 26) continue; + + for(i=0; tag_chars[i] ; i++) + { + if(c == tag_chars[i]) break; + } + + if(tag_chars[i] && i < num_local_tags) + { + io << c << "\7,"; + io.fullcolor(tagcharcol); + tagged << c; + } + } + + for(i=0;i num_local_tags) continue; + + if(!is_tagged(local_tags[j].name , local_tags[j].area)) + taglist.add(local_tags[j]); + } + + io << '\r' << S_X_FILES_TAGGED(form("%d",taglist.count())); + + io.wait('\r'); + + io << "\7\r" << String(' ',language_string_length(S_X_FILES_TAGGED(form("%d",taglist.count())))) << '\r'; + + //io << "\7\r \r"; + + //if(rip_mode) io.show_remote = FALSE; + } + + if(rep == (eol ? 2:4)) + { + io.show_remote = TRUE; + + edit_taglist(); + + io << "\f\7"; + + rep = 0; + + //if(rip_mode) io.show_remote = FALSE; + } + + if(eol) + { + if(rep == 0) break; + } + else + { + if(rep >= 0 && rep <= 2) break; + } + + } + + io.show_remote = TRUE; + + io.fullcolor(oldcolor); + + /* + if(rip_mode) + { + rip_clear_status(); + rip_show_enter(); + } + */ + + return rep; +} + +void +clear_tags() +{ + last_tag = 0; + num_local_tags = 0; +} + +static bool +is_whitespace(char c) +{ + return (c==' ' || c=='\t'); +} + +static char +first_nonblank( char *line ) +{ + char f =*line; + + if(is_whitespace(*line)) + { + for(int i=0 ; line[i] != '\0' && is_whitespace(line[i]) ; i++) {} + + f = line[i]; + } + + return f; +} + +static int +display_areaname(int areanum, char *areaname , int prevsize) +{ + io << form("\7%3d - %*s\r\xFF",areanum,-prevsize,areaname); + + return strlen(areaname); +} + +void +list_files(char *data) +{ + FileArea fa; + int areanum; + + io << "\f\n" << S_FILELIST_PRESS_S_TO_STOP << "\n\n\xFF"; + + linecounter(2); + io.enablestop(); + + if(toupper(data[0])=='X') + areanum = user.fileArea; + else + areanum = atoi(data); + + if(!fa.read(areanum)) return; + + LOG(2,"Files listed (%s)",fa.name); + + File tf; + if(!tf.open(fa.listpath,fmode_read | fmode_text)) + { + LOG("Can't open file list %s",fa.listpath); + return; + } + + eol = FALSE; + io.more_func = filelist_more; + clear_tags(); + + char *line = new char[500]; + + bool interrupted = FALSE; + + remember_area = fa.areaNum; + remember_pos = 0; + + while(tf.readLine(line,499)) + { + strip_linefeed(line); + + if(!displayline(line,fa)) + { + interrupted = TRUE; + break; + } + + remember_pos = tf.pos(); + } + + io.more_func = NULLFUNC; + + delete [] line; + + if(!interrupted) + { + if(num_local_tags) + { + eol = TRUE; + filelist_more(); + } + + //io << '\n' << S_END_OF_FILE_LISTING << ' ' << S_PRESS_ENTER_TO_CONTINUE; + } +} + +void +keyword_search(char *data) +{ + FileArea fa; + char item[41]; + + io << "\f\n" << S_KEYWORD_SEARCH_TITLE_AND_PROMPT; + + io.read(item,40,READMODE_UPALL); + + if(!*item) return; + + String buffer[10]; + + int pointer = 0, + found = 0, + group = 0; + + String param[40]; + BitArray arealist(MAX_FILE_AREAS,1); + + int npara=parse_data(data,param); + + LOG(2,"Keyword search (%s)",item); + + io << "\n\f\n" << S_SEARCHING_FOR_KEYWORD(item) << "\n\n"; + + create_arealist(param,npara,arealist); + + for(int i = 0;i= cmpdate ) + { + strcpy( newf[ num_new++ ].name, find.name() ); + } + } + + + if ( ! num_new ) + { + continue; + } + + + File tf; + + + if ( ! tf.open( fa.listpath, + fmode_read | fmode_text ) ) + { + LOG( "Can't open file list %s", fa.listpath ); + + continue; + } + + + for ( bool found = FALSE; tf.readLine( line, 499 ); ) + { + strip_linefeed( line ); + + + if ( strchr( valid, toupper( *line ) ) && + *line ) + { + char file[ 13 ]; + + + found = FALSE; + + + getfname( line, file ); + + strupr( file ); + + + for ( int i = 0; i < num_new; i++ ) + { + if ( ! strcmp( newf[ i ].name, file )) + { + break; + } + } + + + if ( i < num_new ) + { + found = TRUE; + + + if ( linefeed ) + { + io << '\n'; + + + if ( linecounter() ) + { + interrupted = TRUE; + + break; + } + } + + + linefeed = FALSE; + + + if ( ! displayline( line, fa ) ) + { + interrupted = TRUE; + + break; + } + } + } + else + { + char fnb = first_nonblank( line ); + + + if ( fnb && + found && + strchr( "+|!;", fnb ) ) + { + if ( linefeed ) + { + io << '\n'; + + + if ( linecounter() ) + { + interrupted = TRUE; + + break; + } + } + + + linefeed = FALSE; + + + if ( ! displayline( line, fa ) ) + { + interrupted = TRUE; + + break; + } + } + } + } + } + + + delete [] line; + delete [] newf; + + + io.more_func = NULLFUNC; + + + if ( ! interrupted ) + { + if ( num_local_tags ) + { + eol = TRUE; + + filelist_more(); + } + + // io << '\n' + // << S_END_OF_FILE_SEARCH + // << ' ' + // << S_PRESS_ENTER_TO_CONTINUE; + } +} + + +void +filename_search(char *data) +{ + int group = 0; + char search[13]; + + io << "\f\n" << S_FILENAME_SEARCH_TITLE_AND_PROMPT; + + io.read(search,12,READMODE_UPALL); + + if(!*search) return; + + FileArea fa; + String param[40]; + BitArray arealist(MAX_FILE_AREAS,1); + + int npara = parse_data(data,param); + + for(int i = 0;i= 0) + s.del(i,1); + while((i = s.find("\x18")) >= 0) + s.del(i,1); + while((i = s.find("\x19")) >= 0) + s.del(i,1); + } +} + + + +static +bool near displayline( char *line, + FileArea &fa ) +{ + String str; + String wrap; + String wrapcolor; + int left_margin; + + + if ( + ( + strchr( valid, toupper( *line ) ) || + ( + *line=='!' && + strchr( valid, toupper( line[ 1 ] ) ) + ) + ) + && *line ) + { + Date date; + long size; + int counter; + String fname; + String desc; + + + split_line( line, + fname, + date, + size, + counter, + desc, + fa ); + + RemoveDangerousChars( desc ); + + + str = fullcolor_string( cfg.listColorTag ); + + local_tags[ last_tag ].area = fa.areaNum; + + + strcpy( local_tags[ last_tag ].name, fname ); + strupr( local_tags[ last_tag ].name ); + + + if ( size ) + { + str << tag_chars[ last_tag ] + << ' '; + + + if ( last_tag >= num_local_tags ) + { + num_local_tags = last_tag + 1; + } + + + last_tag = ( ++last_tag ) % + min( MAX_TAGS, + ( + /* rip_mode + ? rip_screenlines + : */ + user.screenLength + ) + ); + } + else + { + str << " "; + } + + + str << fullcolor_string( cfg.listColorFileName ); + + str << form( "%-12s ", (char *) fname ); + + + if ( size ) + { + str << fullcolor_string( cfg.listColorDate ); + + str << date.format( date_formats_long[ user.dateFormat ] ); + + + // form( "%02d/%02d/%02d", + // date[ ( cfg.europe ? 0 : 1 ) ], + // date[ ( cfg.europe ? 1 : 0 ) ], + // date[ 2 ] % 100 ); // Y2K FIXED! + // date[ 2 ] ); // Y2K BUG! + + + str << fullcolor_string( cfg.listColorSize ); + + + if ( ( size + 512L ) / 1024L > 1000L ) + { + str << form( "%2ld.%1ldM ", + ( size + 512L ) / 1024L / 1024L, + ( ( size + 512L ) % ( 1024L * 1024L ) ) / + 1024L * 10L / 1024L ); + } + else + { + if ( size >= 1000L ) + { + str << form( "%4ldk ", + ( size + 512L ) / 1024L ); + } + else + { + str << form( "%4ldb ", size ); + } + } + } + else + { + str << fullcolor_string( cfg.listColorMissing ); + str << " "; + } + + + if ( ! cfg.hideFileCounter ) + { + str << fullcolor_string( cfg.listColorCounter ); + str << form( "[%02d]", counter ); + + + if ( counter < 100 ) + { + str << ' '; + } + } + + + wrapcolor = fullcolor_string( cfg.listColorDesc ); + + + str << wrapcolor; + io << str; + + + if ( stopped ) + { + return FALSE; + } + + + left_margin = 34 - 5 * cfg.hideFileCounter; + + str = desc; + } + else + { + char fnb = first_nonblank( line ); + + + if ( fnb && + strchr( "+|", fnb ) ) + { + line = strchr( line, fnb ); + } + + + switch ( *line ) + { + case '|': + case '+': + + line++; + + while ( is_whitespace( *line ) && + *line != '\0' ) + { + line++; + } + + + left_margin = 34 - 5 * cfg.hideFileCounter; + wrapcolor = fullcolor_string( cfg.listColorDesc ); + + io.fullcolor( cfg.listColorDesc ); + + io << String( ' ', left_margin ); + + break; + + + case '!': + + left_margin = 0; + + io.fullcolor( cfg.listColorDesc ); + + wrapcolor = fullcolor_string( cfg.listColorDesc ); + + line++; + + break; + + + case ';': + + left_margin = 0; + + io.fullcolor( cfg.listColorDesc ); + + wrapcolor = fullcolor_string( cfg.listColorDesc ); + + line++; + + break; + + + default : + + left_margin = 0; + + io.fullcolor( cfg.listColorSeperator ); + + wrapcolor = fullcolor_string( cfg.listColorSeperator ); + + break; + } + + + str = line; + + RemoveDangerousChars( str ); + } + + + str.replace( "\t", " " ); + + + if ( stopped ) + { + return FALSE; + } + + + for ( ; ; ) + { + int l = wordwrap( str, + wrap, + 79 - left_margin ); + + str << '\n'; + io << str; + + + if ( linecounter() || + stopped ) + { + return FALSE; + } + + + if ( ! l ) + { + break; + } + + + io << wrapcolor + << String( ' ', left_margin ); + + if ( stopped ) + { + return FALSE; + } + + + str = wrap; + } + + + io.flush(); + + + return TRUE; +} + + diff --git a/LISTFILE.OBJ b/LISTFILE.OBJ new file mode 100644 index 0000000..4efb0fb Binary files /dev/null and b/LISTFILE.OBJ differ diff --git a/LOADPEX.CPP b/LOADPEX.CPP new file mode 100644 index 0000000..ced07aa --- /dev/null +++ b/LOADPEX.CPP @@ -0,0 +1,2402 @@ +#define Use_TagList +#define Use_LinkedList +#define Use_Handlers +#define Use_MsgBase + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "proboard.hpp" +#include "fossil.hpp" + +static long _cdecl +hook_l_mul(long,long v1,long v2) +{ + return v1*v2; +} + +static long _cdecl +hook_l_div(long,long v1,long v2) +{ + return v1/v2; +} + +static long _cdecl +hook_l_mod(long,long v1,long v2) +{ + return v1%v2; +} + +static unsigned long _cdecl +hook_ul_div(long,unsigned long v1,unsigned long v2) +{ + return v1/v2; +} + +static unsigned long _cdecl +hook_ul_mod(long,unsigned long v1,unsigned long v2) +{ + return v1%v2; +} + +static long _cdecl +hook_l_shl(long,long v,unsigned shift) +{ + return v << shift; +} + +static long _cdecl +hook_l_shr(long,long v,unsigned shift) +{ + return v >> shift; +} + +static unsigned long _cdecl +hook_ul_shl(long,unsigned long v,unsigned shift) +{ + return v << shift; +} + +static unsigned long _cdecl +hook_ul_shr(long,unsigned long v,unsigned shift) +{ + return v >> shift; +} + +static FILE * _cdecl +hook_fopen(long,char *a,char *b) +{ + bool shared = TRUE; + + if(strchr(b,'*')) + { + *strchr(b,'*') = '\0'; + + shared = FALSE; + } + + FILE *fp; + + if(shared) fp = _fsopen(a,b,0x40); + else fp = fopen(a,b); + + return fp; +} + +static FILE * _cdecl +hook_freopen(long,char *a,char *b,FILE *c) +{ + return freopen(a,b,c); +} + +static int _cdecl +hook_fseek(long,FILE *a,long b,int c) +{ + return fseek(a,b,c); +} + +static long _cdecl +hook_ftell(long,FILE *a) +{ + return ftell(a); +} + +static char * _cdecl +hook_fgets(long,char *a,int b,FILE *c) +{ + return fgets(a,b,c); +} + +static int _cdecl +hook_fgetc(long,FILE *a) +{ + return fgetc(a); +} + +static int _cdecl +hook_fflush(long,FILE *a) +{ + return fflush(a); +} + +static int _cdecl +hook_fclose(long,FILE *a) +{ + return fclose(a); +} + +static int _cdecl +hook_fputs(long,char *a,FILE *b) +{ + return fputs(a,b); +} + +static int _cdecl +hook_getc(long,FILE *a) +{ + return getc(a); +} + +static int _cdecl +hook_getchar() +{ + return io.wait(); +} + +static char * _cdecl +hook_gets(long,char *a) +{ + io.read(a,79,READMODE_NOFIELD); + + return a; +} + +static int _cdecl +hook_fputc(long,int a,FILE *b) +{ + return fputc(a,b); +} + +static int _cdecl +hook_putc(long,int a,FILE * b) +{ + return putc(a,b); +} + +static int _cdecl +hook_putchar(long,int a) +{ + io << char(a) << char(255); + + return a; +} + +static int _cdecl +hook_puts(long,char *a) +{ + io << a << "\n\xFF"; + + return 1; +} + +static size_t _cdecl +hook_fread(long,void *a,size_t b,size_t c,FILE *d) +{ + size_t r = fread(a,b,c,d); + + return r; +} + +static size_t _cdecl +hook_fwrite(long,void *a,size_t b,size_t c,FILE *d) +{ + return fwrite(a,b,c,d); +} + +static int _cdecl +hook_printf(long,char *a ...) +{ + va_list x; + va_start(x,a); + + char s[256]; + + int l=vsprintf(s,a,x); + + if(l>0) + io << s << char(0xFF); + + return l; +} + +static int _cdecl +hook_fprintf(long,FILE *a,char *b ...) +{ + va_list x; + va_start(x,b); + + return vfprintf(a,b,x); +} + +static int _cdecl +hook_vfprintf(long,FILE *a,char *b,va_list c) +{ + return vfprintf(a,b,c); +} + +static int _cdecl +hook_vprintf(long,char *a,va_list b) +{ + char s[256]; + + int l = vsprintf(s,a,b); + + if(l>0) + io << s << char(0xFF); + + return l; +} + +static int _cdecl +hook_sprintf(long,char *a,char *b ...) +{ + va_list x; + va_start(x,b); + + return vsprintf(a,b,x); +} + +static int _cdecl +hook_vsprintf(long,char *a,char *b,va_list c) +{ + return vsprintf(a,b,c); +} + +static void _cdecl +hook_setbuf(long,FILE *a,char *b) +{ + setbuf(a,b); +} + +static int _cdecl +hook_setvbuf(long,FILE *a,char *b,int c,size_t d) +{ + return setvbuf(a,b,c,d); +} + +static int _cdecl +hook_remove(long,char *a) +{ + return remove(a); +} + +static int _cdecl +hook_rename(long,char *a,char *b) +{ + return rename(a,b); +} + +static void _cdecl +hook_rewind(long,FILE *a) +{ + rewind(a); +} + +static void _cdecl +hook_clearerr(long,FILE *a) +{ + clearerr(a); +} + +static int _cdecl +hook_feof(long,FILE *a) +{ + return feof(a); +} + +static int _cdecl +hook_isalnum(long,int a) +{ + return isalnum(a); +} + +static int _cdecl +hook_isalpha(long,int a) +{ + return isalpha(a); +} + +static int _cdecl +hook_iscntrl(long,int a) +{ + return iscntrl(a); +} + +static int _cdecl +hook_isdigit(long,int a) +{ + return isdigit(a); +} + +static int _cdecl +hook_isgraph(long,int a) +{ + return isgraph(a); +} + +static int _cdecl +hook_islower(long,int a) +{ + return islower(a); +} + +static int _cdecl +hook_isprint(long,int a) +{ + return isprint(a); +} + +static int _cdecl +hook_ispunct(long,int a) +{ + return ispunct(a); +} + +static int _cdecl +hook_isspace(long,int a) +{ + return isspace(a); +} + +static int _cdecl +hook_isupper(long,int a) +{ + return isupper(a); +} + +static int _cdecl +hook_isxdigit(long,int a) +{ + return isxdigit(a); +} + +static int _cdecl +hook_toupper(long,int a) +{ + return toupper(a); +} + +static int _cdecl +hook_tolower(long,int a) +{ + return tolower(a); +} + +static int _cdecl +hook_int86(long,int a,union REGS *b,union REGS *c) +{ + return int86(a,b,c); +} + +static int _cdecl +hook_int86x(long,int a,union REGS *b,union REGS *c,struct SREGS *d) +{ + return int86x(a,b,c,d); +} + +static int _cdecl +hook_intdos(long,union REGS *a,union REGS *b) +{ + return intdos(a,b); +} + +static int _cdecl +hook_intdosx(long,union REGS *a,union REGS *b,struct SREGS *c) +{ + return intdosx(a,b,c); +} + +static int _cdecl +hook_dos_findfirst(long,char *a, unsigned b, struct find_t *c) +{ + return _dos_findfirst(a,b,c); +} + +static int _cdecl +hook_dos_findnext(long,struct find_t *a) +{ + return _dos_findnext(a); +} + +static int _cdecl +hook_read(long,int a,void *b,unsigned c) +{ + return msdos_read(a,b,c); +} + +static int _cdecl +hook_write(long,int a,void *b,unsigned c) +{ + return msdos_write(a,b,c); +} + +static int _cdecl +hook_open(long,char *a,int b) +{ + int fh = msdos_open(a,b); + + return fh; +} + +static int _cdecl +hook_creat(long,char *a,int b) +{ + return creat(a,b); +} + +static void _cdecl +hook_close(long,int a) +{ + msdos_close(a); +} + +static int _cdecl +hook_unlink(long,char *a) +{ + return unlink(a); +} + +static int _cdecl +hook_chsize(long,int a,long b) +{ + return chsize(a,b); +} + +static int _cdecl +hook_dup(long,int a) +{ + return dup(a); +} + +static int _cdecl +hook_dup2(long,int a,int b) +{ + return dup2(a,b); +} + +static long _cdecl +hook_lseek(long,int a,long b,int c) +{ + return lseek(a,b,c); +} + +static int _cdecl +hook_access(long,char *a,int b) +{ + return access(a,b); +} + +static long _cdecl +hook_filesize(long,char *) +{ + return -1; +} + +static long _cdecl +hook_filelength(long,int a) +{ + return filelength(a); +} + +static int _cdecl +hook_isatty(long,int a) +{ + return isatty(a); +} + +static int _cdecl +hook_mkdir(long,char *a) +{ + return mkdir(a); +} + +static int _cdecl +hook_chdir(long,char *a) +{ + return chdir(a); +} + +static int _cdecl +hook_rmdir(long,char *a) +{ + return rmdir(a); +} + +static int _cdecl +hook_atoi(long,char *a) +{ + return atoi(a); +} + +static long _cdecl +hook_atol(long,char *a) +{ + return atol(a); +} + +static long _cdecl +hook_strtol(long,char *a,char **b,int c) +{ + return strtol(a,b,c); +} + +static int _cdecl +hook_rand(long) +{ + return rand(); +} + +static void _cdecl +hook_srand(long,unsigned a) +{ + srand(a); +} + +static void * _cdecl +hook_calloc(long,size_t a,size_t b) +{ + return calloc(a,b); +} + +static void _cdecl +hook_free(long,void *a) +{ + free(a); +} + +static void * _cdecl +hook_malloc(long,size_t a) +{ + return malloc(a); +} + +static void * _cdecl +hook_realloc(long,void *a,size_t b) +{ + return realloc(a,b); +} + +static char * _cdecl +hook_getenv(long,char *a) +{ + return getenv(a); +} + +static int cdecl +hook_putenv(long,char *a) +{ + return putenv(a); +} + +static int _cdecl +hook_abs(long,int a) +{ + return abs(a); +} + +static long _cdecl +hook_labs(long,long a) +{ + return labs(a); +} + +static void * _cdecl +hook_memcpy(long,void *a,void *b,size_t c) +{ + return memcpy(a,b,c); +} + +static void * _cdecl +hook_memmove(long,void *a,void *b,size_t c) +{ + return memmove(a,b,c); +} + +static char * _cdecl +hook_strcpy(long,char *a,char *b) +{ + return strcpy(a,b); +} + +static char * _cdecl +hook_strncpy(long,char *a,char *b,size_t c) +{ + return strncpy(a,b,c); +} + +static char * _cdecl +hook_strcat(long,char *a,char *b) +{ + return strcat(a,b); +} + +static char * _cdecl +hook_strncat(long,char *a,char *b,size_t c) +{ + return strncat(a,b,c); +} + +static int _cdecl +hook_memcmp(long,void *a,void *b,size_t c) +{ + return memcmp(a,b,c); +} + +static int _cdecl +hook_strcmp(long,char *a,char *b) +{ + return strcmp(a,b); +} + +static int _cdecl +hook_strncmp(long,char *a,char *b,size_t c) +{ + return strncmp(a,b,c); +} + +static void * _cdecl +hook_memchr(long,void *a,int b,size_t c) +{ + return memchr(a,b,c); +} + +static char * _cdecl +hook_strchr(long,char *a,int b) +{ + return strchr(a,b); +} + +static size_t _cdecl +hook_strcspn(long,char *a,char *b) +{ + return strcspn(a,b); +} + +static char * _cdecl +hook_strpbrk(long,char *a,char *b) +{ + return strpbrk(a,b); +} + +static char * _cdecl +hook_strrchr(long,char *a,int b) +{ + return strrchr(a,b); +} + +static size_t _cdecl +hook_strspn(long,char *a,char *b) +{ + return strspn(a,b); +} + +static char * _cdecl +hook_strstr(long,char *a,char *b) +{ + return strstr(a,b); +} + +static char * _cdecl +hook_strtok(long,char *a,char *b) +{ + return strtok(a,b); +} + +static void * _cdecl +hook_memset(long,void *a,int b,size_t c) +{ + return memset(a,b,c); +} + +static size_t _cdecl +hook_strlen(long,char *a) +{ + return strlen(a); +} + +static int _cdecl +hook_memicmp(long,void *a,void *b,size_t c) +{ + return memicmp(a,b,c); +} + +static char * _cdecl +hook_stpcpy(long,char *a,char *b) +{ + return stpcpy(a,b); +} + +static int _cdecl +hook_strcmpl(long,char *a,char *b) +{ + return strcmpl(a,b); +} + +static int _cdecl +hook_strnicmp(long,char *a, char *b, size_t c) +{ + return strnicmp(a,b,c); +} + +static char * _cdecl +hook_strdup(long,char *a) +{ + return strdup(a); +} + +static char * _cdecl +hook_strlwr(long,char *a) +{ + return strlwr(a); +} + +static char * _cdecl +hook_strupr(long,char *a) +{ + return strupr(a); +} + +static char * _cdecl +hook_strnset(long,char *a,int b,size_t c) +{ + return strnset(a,b,c); +} + +static char * _cdecl +hook_strrev(long,char *a) +{ + return strrev(a); +} + +static char * _cdecl +hook_strset(long,char *a,int b) +{ + return strset(a,b); +} + +static void _cdecl +hook_swab(long,char *a,char *b,size_t c) +{ + swab(a,b,c); +} + +static clock_t _cdecl +hook_clock(long) +{ + return clock(); +} + +static time_t _cdecl +hook_time(long,time_t *a) +{ + return time(a); +} + +static time_t _cdecl +hook_mktime(long,struct tm *a) +{ + return mktime(a); +} + +static char * _cdecl +hook_asctime(long,struct tm *a) +{ + return asctime(a); +} + +static char * _cdecl +hook_ctime(long,time_t *a) +{ + return ctime(a); +} + +static struct tm * _cdecl +hook_localtime(long,time_t *a) +{ + return localtime(a); +} + +static struct tm * _cdecl +hook_gmtime(long,time_t *a) +{ + return gmtime(a); +} + +static size_t _cdecl +hook_strftime(long,char *a,size_t b,char *c,struct tm *d) +{ + return strftime(a,b,c,d); +} + +static void _cdecl +hook_sleep(long,time_t a) +{ + sleep(int(a)); +} + +static void _cdecl +hook_usleep(long,unsigned long a) +{ +#ifdef __ZTC + usleep(a); +#else + msleep(int(a/1000)); +#endif +} + +static void _cdecl +hook_msleep(long,unsigned long a) +{ + msleep(int(a)); +} + +static long _cdecl +hook_MemAvail() +{ + return farcoreleft(); +} + +static char * _cdecl +hook_form(long,char *s ...) +{ + static int index = 0; + static char buffer[1024]; + va_list v; + + if(index >= 512) index = 0; + + va_start(v,s); + + char *ret = &buffer[index]; + + index += vsprintf(&buffer[index],s,v) + 1; + + if(index >= 1024) _exit(EXIT_FAILURE); + + return ret; +} + +static void _cdecl +hook_SetColor(long,char color) +{ + char s[2] = { 0,0 }; + + s[0] = color; + + io << s << char(0xFF); +} + +static void _cdecl +hook_MenuFunction(long,int func,char *data) +{ + (*(menufunctions[func]))(data); +} + +static char _cdecl +hook_WaitKey() +{ + return io.wait(); +} + +static char _cdecl +hook_WaitKeys(long,char *s) +{ + return io.wait(s); +} + +static void _cdecl +hook_Input(long,char *s,int len,int method) +{ + io.read(s,len,method); +} + +static void _cdecl +hook_HangUp(long) +{ + io.flush(); + exit_proboard(); +} + +static void _cdecl +hook_Log(long,int loglevel,char *string ...) +{ + char s[100]; + va_list x; + va_start(x,string); + + vsprintf(s,string,x); + + LOG(loglevel,s); +} + +static int _cdecl +hook_PostMessage(long,char *from,char *to,char *subj,int area,bool pvt) +{ + return (int)post_message(from,to,subj,area,pvt); +} + +static int _cdecl +hook_PostNetmail(long,char *from,char *to,char *subj,int area,unsigned *address,bool attach,bool crash,bool kill) +{ + return (int)post_netmail_message(from,to,subj,area,address[0],address[1],address[2],address[3],crash,attach,kill); +} + +static bool _cdecl +hook_ReadMsgArea(long,int areanum,_MsgArea *ma) +{ + MsgArea local_area; + + memcpy(&local_area , ma , sizeof(_MsgArea)); + + bool r = local_area.read(areanum); + + memcpy(ma , &local_area , sizeof(_MsgArea)); + + return r; +} + +static int _cdecl +hook_NumMsgAreas(long) +{ + return MsgArea::highAreaNum(); +} + +static int _cdecl +hook_ReadFileArea(long,int area,FileArea *fa) +{ + return (fa->read(area)) ? 0 : (-1); +} + +static int _cdecl +hook_NumFileAreas(long) +{ + return FileArea::highAreaNum(); +} + +static void _cdecl +hook_MsgEd() +{ + edit_message(); +} + +static void _cdecl +hook_AddTime(long,int minutes) +{ + int i; + + if(minutes<0) for(i=0;i<-minutes;i++) timer.decrease(); + else for(i=0;i< minutes;i++) timer.increase(); +} + +static int _cdecl +hook_TimeLeft(long) +{ + return timer.left(); +} + +static int _cdecl +hook_TimeOnline(long) +{ + return timer.online(); +} + +static int _cdecl +hook_CheckAccess(long,word level,AccessFlags flags) +{ + return check_access(level,flags); +} + +static void _cdecl +hook_SuspendTimer() +{ + timer.suspend(); +} + +static void _cdecl +hook_RestartTimer() +{ + timer.restart(); +} + +#define HANDLER_SYSOPKEY 6 +#define HANDLER_HANGUP 7 + +static int _cdecl +hook_InstallHandler(long,int handler,void (*function)(void),unsigned ds) +{ + PEXhandle h; + + h.func = function; + h.ds = ds; + + switch(handler) + { + case HANDLER_SYSOPKEY: sysopkey_handlers.insert(h); + break; + case HANDLER_HANGUP: hangup_handlers.insert(h); + break; + } +// pex_handlers[handler].func = function; +// pex_handlers[handler].ds = ds; + + return 0; +} + +static void _cdecl +hook_RemoveHandler(long,int handler,void (*function)(void),unsigned ds) +{ + LinkedList *ll; + + switch(handler) + { + case HANDLER_SYSOPKEY: ll = &sysopkey_handlers; + break; + case HANDLER_HANGUP: ll = &hangup_handlers; + break; + } + + for(ll->rewind() ; !ll->eol() ; ) + { + if(ll->get().ds == ds && ll->get().func == function) + { + ll->remove(); + } + else + { + (*ll)++; + } + } +} + +static bool _cdecl +hook_ReadHandler(long,int /*handler*/,PEXhandle * /*ph*/) +{ +// memcpy(ph , &pex_handlers[handler] , sizeof(PEXhandle)); +// +// return (ph->func ? TRUE : FALSE); + + return FALSE; +} + +static void _cdecl +hook_RestoreHandler(long,int /*handler*/,PEXhandle * /*ph*/) +{ +// memcpy(&pex_handlers[handler] , ph , sizeof(PEXhandle)); +} + +static void _cdecl +hook_EnableStop() +{ + io.enablestop(); +} + +static void _cdecl +hook_DisableStop() +{ + io.enablestop(); +} + +static bool _cdecl +hook_Stopped() +{ + return stopped; +} + +static bool _cdecl +hook_IO_SendByte(long,byte x) +{ + return fos_sendnw(io.port,x); +} + +static int _cdecl +hook_IO_ReadByte() +{ + return fos_getchnw(io.port); +} + +static bool _cdecl +hook_IO_Carrier() +{ + return fos_carrier(io.port); +} + +static bool _cdecl +hook_IO_ByteReady() +{ + return fos_byteready(io.port); +} + +static bool _cdecl +hook_IO_BufEmpty() +{ + return fos_outputempty(io.port); +} + +static void _cdecl +hook_IO_StartBreak() +{ + fos_break(io.port,TRUE); +} + +static void _cdecl +hook_IO_StopBreak() +{ + fos_break(io.port,FALSE); +} + +static void _cdecl +hook_IO_DTR(long,bool mode) +{ + fos_setdtr(io.port,mode); +} + +static word _cdecl +hook_IO_SendBlock(long,byte *buf,word size) +{ + return fos_sendblock(io.port,buf,size); +} + +static word _cdecl +hook_IO_ReadBlock(long,byte *buf,word size) +{ + return fos_readblock(io.port,buf,size); +} + + +static +void _cdecl hook_PostInfo( long, + char *fname ) +{ + File fp( FileName( syspath, + fname, + ".ASW" ), + fmode_write | + fmode_text | + fmode_append | + fmode_copen ); + + + if ( ! fp.opened() ) + { + return; + } + + + Date date( TODAY ); + Time time( NOW ); + + + fp.printf( "*** %s completed questionnaire at %02d:%02d on %02d-%s-%02d ***\n", + user.name, + time[ 0 ], + time[ 1 ], + date[ 0 ], + months_short[ date[ 1 ] ], + date[ 2 ] % 100 ); // Y2K BUG FIXED! + // date[ 2 ] ); // Y2K BUG! +} + +static char _cdecl +hook_ShowHotkeyFile(long,char *fname,char *hotkeys) +{ + return io.sendfile(fname,hotkeys); +} + +static char _cdecl +hook_ShowHotkeyANSIFile(long,char *fname,char *hotkeys) +{ + return showansasc(fname,hotkeys); +} + +static char _cdecl +hook_PlayMusic(long,char *fname,char *hotkeys) +{ + return playsong(fname,hotkeys,0); +} + +static void _cdecl +hook_AdjustTime() +{ + adjust_limits(); +} + +static bool _cdecl +hook_ReadUser(long,User *rec,long recnr) +{ + return rec->read(recnr); +} + +static void _cdecl +hook_WriteUser(long,User *rec) +{ + bool append = FALSE; + + if(rec->record < 0) + append = TRUE; + + rec->write(append); + + num_users = int(User::numUsers()); +} + +static bool _cdecl +hook_SetUser(long,long r) +{ + if(user.read(r)) + { + user_recnr = r; + return TRUE; + } + else + { + return FALSE; + } + +} + +void *operator new(size_t,void *p) { return p; } + +static bool _cdecl +hook_ReadMessage(long,Message *msg,long msgnum,int area) +{ + Message *local_msg = new (msg) Message; + + local_msg->setArea(area); + + bool r = local_msg->read(msgnum); + + area = local_msg->areaNum(); + + local_msg->Message::~Message(); + + msg->area = area; + + return r; +} + + +static void _cdecl +hook_WriteMSGTMP(long,char *text) +{ + File f; + f.open("MSGTMP",fmode_create); + f << text; +} + +static void _cdecl +hook_AppendMSGTMP(long,char *text) +{ + File f; + if(!f.open("MSGTMP",fmode_write | fmode_copen | fmode_append)) return; + f << text; +} + +static void _cdecl +hook_ShowMessage(long,Message *msg) +{ + msg->show(); +} + +static void _cdecl +hook_CreateMessageText(long,Message *msg) +{ + int area = msg->area; + + msg->msgArea = new MsgArea; + + msg->setArea(area); + + msg->createMsgTextFile("MSGTMP",FALSE); + + delete msg->msgArea; + + msg->area = area; +} + +static void _cdecl +hook_CreateMessageTextString(long,Message *msg,char *s,int maxsize) +{ +#ifdef DEBUG_PEX + LOG("DEBUG: CreateMessageTextString( ... maxsize = %d)" , clockticks() , maxsize); +#endif + int area = msg->area; + + msg->msgArea = new MsgArea; + + msg->setArea(area); + + msg->createMsgTextString(s,maxsize); + + delete msg->msgArea; + + msg->area = area; + +#ifdef DEBUG_PEX + LOG("DEBUG: CreateMessageTextString()", clockticks()); +#endif +} + +static bool _cdecl +hook_FirstMessage(long,Message *msg,int area,int order,long first) +{ +#ifdef DEBUG_PEX + LOG("DEBUG: FirstMessage( ... , area = %d , order = %d , first = %ld)" , clockticks() , area,order,first); +#endif + msg->clear(); + + msg->msgArea = new MsgArea; + + msg->setArea(area); + + bool r = msg->readFirst(READMSG_ALL,order,first,""); + + area = msg->areaNum(); + + delete msg->msgArea; + + msg->area = area; + +#ifdef DEBUG_PEX + LOG("DEBUG: FirstMessage() = %s", clockticks() , r?"TRUE":"FALSE"); +#endif + + return r; +} + +static bool _cdecl +hook_NextMessage(long,Message *msg,int area,int order) +{ +#ifdef DEBUG_PEX + LOG("DEBUG: NextMessage( ... , area = %d , order = %d )" , clockticks() , area,order); +#endif + msg->msgArea = new MsgArea; + + msg->setArea(area); + + bool r = msg->readNext(READMSG_ALL,order,""); + + area = msg->areaNum(); + + delete msg->msgArea; + + msg->area = area; + +#ifdef DEBUG_PEX + LOG("DEBUG: NextMessage() = %s", clockticks() , r?"TRUE":"FALSE"); +#endif + return r; +} + +static void _cdecl +hook_DeleteMessage(long,Message *msg) +{ + int area = msg->area; + + msg->msgArea = new MsgArea; + + msg->setArea(area); + + msg->remove(); + + delete msg->msgArea; + + msg->area = area; +} + +static void _cdecl +hook_MarkMessage(long,int area,long msgnum) +{ + MsgArea ma; + + if(!ma.read(area)) return; + + markedmsglist.add(MessageIndex(area,msgnum)); +} + +static long _cdecl +hook_GetLastRead(long,int area,long userrec) +{ + MsgArea ma; +#ifdef DEBUG_PEX + + LOG("DEBUG: GetLastRead( area = %d , recno = %ld )" , clockticks() , area,userrec); + + if(!ma.read(area)) + { + LOG("SDK: Area not found"); + return -1; + } + + long n = ma.msgNum(ma.lastRead(userrec)); + + LOG("DEBUG: GetLastRead() = %ld" , clockticks() , n); + + return n; +#else + if(!ma.read(area)) return -1; + + return ma.lastRead(userrec); +#endif +} + +static void _cdecl +hook_SetLastRead(long,int area,long userrec,long num) +{ + MsgArea ma; +#ifdef DEBUG_PEX + LOG("DEBUG: SetLastRead( area = %d , recno = %ld , num = %ld )",area,userrec,num); +#endif + if(!ma.read(area)) return; + + ma.setLastRead(userrec,num); +} + +long +hook_MsgId( long , int area , long num) +{ + MsgArea ma; + + if(!ma.read(area)) return -1; + + return ma.msgId(num); +} + +long +hook_MsgNum( long , int area , long id) +{ + MsgArea ma; + + if(!ma.read(area)) return -1; + + return ma.msgNum(id); +} + +long +hook_HighMsg(long,int area) +{ + MsgArea ma; + + if(!ma.read(area)) return -1; + + return ma.highMsg(); +} + +long +hook_NumMsgs(long,int area) +{ + MsgArea ma; + + if(!ma.read(area)) return -1; + + return ma.numMsgs(); +} + +static void _cdecl +hook_UnMarkAllMessages() +{ + markedmsglist.clear(); +} + +static void _cdecl +hook_ReadMarkedMessages() +{ + readmsg("0 /N"); +} + +static void _cdecl +hook_ListMarkedMessages() +{ + qscan_msg("0 /N"); +} + +static bool _cdecl +hook_Ask(long,bool def) +{ + return (io.ask(def) ? TRUE : FALSE); +} + +static char _cdecl +hook_PeekChar() +{ + return io.readkey(); +} + +static KEY _cdecl +hook_ScanKey() +{ + if(KB.hit()) return KB.get(); + else return 0; +} + +static void _cdecl +hook_InitLineCounter() +{ + linecounter(0); +} + +static bool _cdecl +hook_LineCounter() +{ + return linecounter() ? FALSE : TRUE; +} + +static int _cdecl +hook_FuzzySearch(long,char *text,char *search,int degree) +{ + return fuzzy_search(search,text,degree); +} + +static bool _cdecl +hook_ExternalInput() +{ + return io.external ? TRUE:FALSE; +} + +static void _cdecl +hook_GotoXY(long,int x,int y) +{ + io.move(x,y); + io.flush(); +} + +static void _cdecl +hook_SetFullColor(long,byte x) +{ + io.fullcolor(x); + io.flush(); +} + +static int _cdecl +hook_ErrorLevel() +{ + return returnvalue; +} + +static void _cdecl +hook_ClrEol() +{ + io.clreol(); + io.flush(); +} + +static bool _cdecl +hook_GetIniVar(long,char *a,char *b,char *c,int d) +{ + return get_ini_var(a,b,c,d); +} + +static bool _cdecl +hook_SetIniVar(long,char *a,char *b,char *c) +{ + return set_ini_var(a,b,c); +} + +static void _cdecl +hook_ParseStringVars(long,char *input , char *output , int maxlen) +{ + String s = replace_stringvars(input); + + strncpy(output , s , maxlen); + output[maxlen] = '\0'; +} + +static bool _cdecl +hook_LocalDisplay(long,bool a) +{ + bool r = io.show_local; + + io.show_local = a; + + return r; +} + +static bool _cdecl +hook_ShowRIPscrip(long,char *a) +{ + return show_rip(a,FALSE); +} + +static bool _cdecl +hook_RIP(long) +{ + return rip_mode; +} + +static bool _cdecl +hook_RemoteDisplay(long,bool a) +{ + bool r = io.show_remote; + + io.show_remote = a; + + return r; +} + +static int _cdecl +hook_TimeUntilEvent(long) +{ + return (event_due - timer.online()); +} + +static void _cdecl +hook_ResetInactivity(long) +{ + timer.clearinactivity(); +} + +typedef struct + { + char name[13]; + word area; + } SDK_TAGGED_FILE; + +static int _cdecl +hook_GetTaggedFiles(long,SDK_TAGGED_FILE *array,int max) +{ + int n = 0; + + for(taglist.rewind(); !taglist.eol() && n < max ; n++,taglist++) + { + strncpy(array[n].name,taglist.get().name,12); + array[n].name[12] = '\0'; + array[n].area = taglist.get().area; + } + + return n; +} + +bool +hook_PutTaggedFiles(long,SDK_TAGGED_FILE *array,int n) +{ + taglist.kill(); + + for(int i=0;iname,tag->area)) + { + FilesIdx idx; + + strncpy(idx.name,tag->name,12); + idx.name[12] = '\0'; + idx.area = tag->area; + + taglist.add(idx); + + return TRUE; + } + else + { + return FALSE; + } +} + +bool +hook_RemoveTaggedFile(SDK_TAGGED_FILE *tag) +{ + if(is_tagged(tag->name,tag->area)) + { + for(taglist.rewind() ; !taglist.eol() ; taglist++) + { + if(!stricmp(tag->name,taglist.get().name) && tag->area == taglist.get().area) + { + taglist.remove(); + + return TRUE; + } + } + } + + return FALSE; +} + +void +hook_ClearTaggedFiles(long) +{ + taglist.kill(); +} + + +bool +hook_IsTagged(long,SDK_TAGGED_FILE *tag) +{ + return is_tagged(tag->name,tag->area); +} + + +//------------------------- +// THESE WERE ADDED IN V2.2 +//------------------------- + +static +int _cdecl hook_getdisk( long ) +{ + return getdisk(); +} + +static +int _cdecl hook_getcurdir( long, + int drive, + char *directory ) +{ + return getcurdir( drive, directory ); +} + +static +unsigned _cdecl hook_dos_getftime( long, + int fd, + unsigned *date, + unsigned *time ) +{ + return _dos_getftime( fd, date, time ); +} + +static +unsigned _cdecl hook_dos_setftime( long, + int fd, + unsigned date, + unsigned time ) +{ + return _dos_setftime( fd, date, time ); +} + +static +int _cdecl hook_fileno( long, + FILE *a ) +{ + return fileno( a ); +} + + +/******* END OF HOOKS ********************************************************/ + +typedef void _far *DataHook; +typedef void _far *FuncHook; + +typedef int (_far _cdecl *MainFunc)(int,char *[]); + +struct ExeHeader + { + unsigned Signature; + unsigned PartPage; + unsigned PageCount; + unsigned NumRelocItems; + unsigned HeaderSize; + unsigned MinMem; + unsigned MaxMem; + unsigned SS; + unsigned SP; + unsigned Checksum; + unsigned IP; + unsigned CS; + unsigned FirstReloc; + unsigned Overlay; + }; + +struct PexHdr + { + unsigned host_DS; + MainFunc entry; + void _far *functable; + void _far *datatable; + unsigned Version; + }; + +struct PexRes + { + String name; + MainFunc func; + DataHook data; + void *p; + void (_far _cdecl *constr)(void); + void (_far _cdecl *destr )(void); + }; + +struct DataStruct + { + DataHook user; + DataHook login_date; + DataHook login_time; + DataHook user_recnr; + DataHook limit; + DataHook num_limits; + DataHook net_entered; + DataHook echo_entered; + DataHook num_users; + DataHook node_number; + DataHook curmenu; + DataHook user_firstname; + DataHook lastuser; + DataHook mypath; + DataHook syspath; + DataHook cfg; + DataHook version; + DataHook baud; + DataHook beta; + DataHook page_reason; + DataHook num_yells; + }; + +inline void +init_values(DataStruct *p) +{ + p->user = (DataHook) &user; + p->login_date = (DataHook) &login_date; + p->login_time = (DataHook) &login_time; + p->user_recnr = (DataHook) (long) user_recnr; + p->limit = (DataHook) &limit; + p->num_limits = (DataHook) (long) num_limits; + p->net_entered = (DataHook) (long) net_entered; + p->echo_entered = (DataHook) (long) echo_entered; + p->num_users = (DataHook) (long) num_users; + p->node_number = (DataHook) (long) node_number; + p->curmenu = (DataHook) &curmenu[0]; + p->user_firstname = (DataHook) &user_firstname[0]; + p->lastuser = (DataHook) &lastcaller.name[0]; + p->mypath = (DataHook) &mypath[0]; + p->syspath = (DataHook) &syspath[0]; + p->cfg = (DataHook) &cfg; + p->version = (DataHook) (long) VER_WORD; + p->baud = (DataHook) (long) io.baud; + p->beta = (DataHook) (long) VER_BETA; + p->page_reason = (DataHook) page_reason; + p->num_yells = (DataHook) (long) &num_yells; +} + +inline void +update_values(DataStruct *) +{ +} + +static bool _near load_pex(char *pexname); + +static PexRes res_pex[100]; +static bool internal; + +static bool _near +is_resident(char *name) +{ + for(int i=0;i<100;i++) if(res_pex[i].name == name) return TRUE; + + return FALSE; +} + +static void _near +add_resident(PexRes &x) +{ + for(int i=0;i<100;i++) + if(res_pex[i].name[0] == '\0') + { + res_pex[i].name = x.name; + res_pex[i].func = x.func; + res_pex[i].data = x.data; + res_pex[i].p = x.p; + res_pex[i].constr = x.constr; + res_pex[i].destr = x.destr; + + return; + } +} + +static void _near +remove_resident(char *name) +{ + for(int i=0;i<100;i++) + if(res_pex[i].name == name) + { + word ds = FP_SEG(res_pex[i].data); + + for( sysopkey_handlers.rewind() ; !sysopkey_handlers.eol() ; ) + if(sysopkey_handlers.get().ds == ds) + { + sysopkey_handlers.remove(); + } + else + { + sysopkey_handlers++; + } + + for( hangup_handlers.rewind() ; !hangup_handlers.eol() ; ) + if(hangup_handlers.get().ds == ds) + { + hangup_handlers.remove(); + } + else + { + hangup_handlers++; + } + + if(res_pex[i].destr) (*res_pex[i].destr)(); // Call static destructors + + farfree(res_pex[i].p); + + res_pex[i].name.clear(); + res_pex[i].func = NULLFUNC; + res_pex[i].data = NULL; + res_pex[i].p = NULL; + res_pex[i].constr = NULL; + res_pex[i].destr = NULL; + + return; + } +} + +static int _near +run_resident(char *name,int argc,char *argv[]) +{ + for(int i=0;i<100;i++) + if(res_pex[i].name == name) + { + init_values((DataStruct *)res_pex[i].data); + int r = (*res_pex[i].func)(argc,argv); + update_values((DataStruct *)res_pex[i].data); + + return r; + } + + return -1; +} + + +int +run_sdkfile(char *data) +{ + internal = FALSE; + + String param[20]; + String tmps; + FileName pexfullname; + + int npara = parse_data(data,param); + + for(int i=0;i",(char *)fn); + return FALSE; + } + + ExeHeader exehdr; + + f.read(&exehdr,sizeof(exehdr)); + + long l = 512L*exehdr.PageCount-16L*exehdr.HeaderSize+exehdr.PartPage-(exehdr.PartPage ? 512:0); + long allocsize = long(exehdr.SS+2) << 4L; + + char *ptr; + + if((ptr = (char *)farmalloc(allocsize))==NULL) + { + LOG("PEX file <%s> : Not enough memory",pexname); + return FALSE; + } + else + { + byte huge *hptr = (byte huge *)ptr; + + for(long x = 0 ; x < allocsize ; x++) hptr[x] = '\0'; + } + + res.p = ptr; + + ptr = (char *)normalize_ptr(ptr); // Normalize pointer + ptr = (char *)MK_FP(FP_SEG(ptr)+1,0); // Make zero-offset pointer + + f.seek(16L*exehdr.HeaderSize); + + { + char * p = ptr; + + for(;;) + { + int n; + + if(!l) break; + + if(l<30000) n = f.read(p,unsigned(l)); + else n = f.read(p,30000); + + l -= n; + p = (char *)normalize_ptr(p+n); + } + } + + if(exehdr.NumRelocItems) + { + f.seek(exehdr.FirstReloc); + word loadseg = FP_SEG(ptr); + + for(int i=0;i",(char *)fn); + return FALSE; + } + + if(((PexHdr *)ptr)->Version>VER_NUM) + { + LOG("PEX file <%s> needs ProBoard v%d.%d",(char *)fn,((PexHdr *)ptr)->Version/100,((PexHdr *)ptr)->Version%100); + return FALSE; + } + + if(((PexHdr *)ptr)->Version < 200) + { + LOG("PEX file <%s> compiled with old SDK (v%d.%d), please upgrade!",(char *)fn,((PexHdr *)ptr)->Version/100,((PexHdr *)ptr)->Version%100); + return FALSE; + } + + if(((PexHdr *)ptr)->Version >= 129) + { + res.constr = (void (_far _cdecl *)(void)) (*(long *)(ptr - 4)); + res.destr = (void (_far _cdecl *)(void)) (*(long *)(ptr - 8)); + } + else + { + res.constr = NULL; + res.destr = NULL; + } + + SCRAMBLE(); + + ((PexHdr *)ptr)->host_DS = _DS; + + FuncHook *fptr = (FuncHook *)(((PexHdr *)ptr)->functable); + + *(fptr++) = (FuncHook) hook_l_mul; + *(fptr++) = (FuncHook) hook_l_div; + *(fptr++) = (FuncHook) hook_l_mod; + *(fptr++) = (FuncHook) hook_ul_div; + *(fptr++) = (FuncHook) hook_ul_mod; + *(fptr++) = (FuncHook) hook_l_shl; + *(fptr++) = (FuncHook) hook_l_shr; + *(fptr++) = (FuncHook) hook_ul_shl; + *(fptr++) = (FuncHook) hook_ul_shr; + *(fptr++) = (FuncHook) hook_fopen; + *(fptr++) = (FuncHook) hook_freopen; + *(fptr++) = (FuncHook) hook_fseek; + *(fptr++) = (FuncHook) hook_ftell; + *(fptr++) = (FuncHook) hook_fgets; + *(fptr++) = (FuncHook) hook_fgetc; + *(fptr++) = (FuncHook) hook_fflush; + *(fptr++) = (FuncHook) hook_fclose; + *(fptr++) = (FuncHook) hook_fputs; + *(fptr++) = (FuncHook) hook_getc; + *(fptr++) = (FuncHook) hook_getchar; + *(fptr++) = (FuncHook) hook_gets; + *(fptr++) = (FuncHook) hook_fputc; + *(fptr++) = (FuncHook) hook_putc; + *(fptr++) = (FuncHook) hook_putchar; + *(fptr++) = (FuncHook) hook_puts; + *(fptr++) = (FuncHook) hook_fread; + *(fptr++) = (FuncHook) hook_fwrite; + *(fptr++) = (FuncHook) hook_printf; + *(fptr++) = (FuncHook) hook_fprintf; + *(fptr++) = (FuncHook) hook_vfprintf; + *(fptr++) = (FuncHook) hook_vprintf; + *(fptr++) = (FuncHook) hook_sprintf; + *(fptr++) = (FuncHook) hook_vsprintf; + *(fptr++) = (FuncHook) hook_setbuf; + *(fptr++) = (FuncHook) hook_setvbuf; + *(fptr++) = (FuncHook) hook_rename; + *(fptr++) = (FuncHook) hook_rewind; + *(fptr++) = (FuncHook) hook_clearerr; + *(fptr++) = (FuncHook) hook_feof; + *(fptr++) = (FuncHook) hook_isalnum; + *(fptr++) = (FuncHook) hook_isalpha; + *(fptr++) = (FuncHook) hook_iscntrl; + *(fptr++) = (FuncHook) hook_isdigit; + *(fptr++) = (FuncHook) hook_isgraph; + *(fptr++) = (FuncHook) hook_islower; + *(fptr++) = (FuncHook) hook_isprint; + *(fptr++) = (FuncHook) hook_ispunct; + *(fptr++) = (FuncHook) hook_isspace; + *(fptr++) = (FuncHook) hook_isupper; + *(fptr++) = (FuncHook) hook_isxdigit; + *(fptr++) = (FuncHook) hook_toupper; + *(fptr++) = (FuncHook) hook_tolower; + *(fptr++) = (FuncHook) hook_int86; + *(fptr++) = (FuncHook) hook_int86x; + *(fptr++) = (FuncHook) hook_intdos; + *(fptr++) = (FuncHook) hook_intdosx; + *(fptr++) = (FuncHook) hook_dos_findfirst; + *(fptr++) = (FuncHook) hook_dos_findnext; + *(fptr++) = (FuncHook) hook_read; + *(fptr++) = (FuncHook) hook_write; + *(fptr++) = (FuncHook) hook_open; + *(fptr++) = (FuncHook) hook_creat; + *(fptr++) = (FuncHook) hook_close; + *(fptr++) = (FuncHook) hook_unlink; + *(fptr++) = (FuncHook) hook_remove; + *(fptr++) = (FuncHook) hook_chsize; + *(fptr++) = (FuncHook) hook_dup; + *(fptr++) = (FuncHook) hook_dup2; + *(fptr++) = (FuncHook) hook_lseek; + *(fptr++) = (FuncHook) hook_access; + *(fptr++) = (FuncHook) hook_filesize; + *(fptr++) = (FuncHook) hook_filelength; + *(fptr++) = (FuncHook) hook_isatty; + *(fptr++) = (FuncHook) hook_atoi; + *(fptr++) = (FuncHook) hook_atol; + *(fptr++) = (FuncHook) hook_strtol; + *(fptr++) = (FuncHook) hook_rand; + *(fptr++) = (FuncHook) hook_srand; + *(fptr++) = (FuncHook) hook_calloc; + *(fptr++) = (FuncHook) hook_free; + *(fptr++) = (FuncHook) hook_malloc; + *(fptr++) = (FuncHook) hook_realloc; + *(fptr++) = (FuncHook) hook_getenv; + *(fptr++) = (FuncHook) NULL; // hook_bsearch; + *(fptr++) = (FuncHook) NULL; // hook_qsort; + *(fptr++) = (FuncHook) hook_abs; + *(fptr++) = (FuncHook) hook_labs; + *(fptr++) = (FuncHook) hook_memcpy; + *(fptr++) = (FuncHook) hook_memmove; + *(fptr++) = (FuncHook) hook_strcpy; + *(fptr++) = (FuncHook) hook_strncpy; + *(fptr++) = (FuncHook) hook_strcat; + *(fptr++) = (FuncHook) hook_strncat; + *(fptr++) = (FuncHook) hook_memcmp; + *(fptr++) = (FuncHook) hook_strcmp; + *(fptr++) = (FuncHook) hook_strncmp; + *(fptr++) = (FuncHook) hook_memchr; + *(fptr++) = (FuncHook) hook_strchr; + *(fptr++) = (FuncHook) hook_strcspn; + *(fptr++) = (FuncHook) hook_strpbrk; + *(fptr++) = (FuncHook) hook_strrchr; + *(fptr++) = (FuncHook) hook_strspn; + *(fptr++) = (FuncHook) hook_strstr; + *(fptr++) = (FuncHook) hook_strtok; + *(fptr++) = (FuncHook) hook_memset; + *(fptr++) = (FuncHook) hook_strlen; + *(fptr++) = (FuncHook) hook_memicmp; + *(fptr++) = (FuncHook) hook_stpcpy; + *(fptr++) = (FuncHook) hook_strcmpl; + *(fptr++) = (FuncHook) hook_strnicmp; + *(fptr++) = (FuncHook) hook_strdup; + *(fptr++) = (FuncHook) hook_strlwr; + *(fptr++) = (FuncHook) hook_strupr; + *(fptr++) = (FuncHook) hook_strnset; + *(fptr++) = (FuncHook) hook_strrev; + *(fptr++) = (FuncHook) hook_strset; + *(fptr++) = (FuncHook) hook_swab; + *(fptr++) = (FuncHook) hook_clock; + *(fptr++) = (FuncHook) hook_time; + *(fptr++) = (FuncHook) hook_mktime; + *(fptr++) = (FuncHook) hook_asctime; + *(fptr++) = (FuncHook) hook_ctime; + *(fptr++) = (FuncHook) hook_localtime; + *(fptr++) = (FuncHook) hook_gmtime; + *(fptr++) = (FuncHook) hook_strftime; + *(fptr++) = (FuncHook) hook_sleep; + *(fptr++) = (FuncHook) hook_usleep; + *(fptr++) = (FuncHook) hook_msleep; + *(fptr++) = (FuncHook) hook_form; + *(fptr++) = (FuncHook) hook_MemAvail; + *(fptr++) = (FuncHook) hook_SetColor; + *(fptr++) = (FuncHook) hook_MenuFunction; + *(fptr++) = (FuncHook) hook_WaitKey; + *(fptr++) = (FuncHook) hook_WaitKeys; + *(fptr++) = (FuncHook) hook_Input; + *(fptr++) = (FuncHook) hook_Log; + *(fptr++) = (FuncHook) hook_HangUp; + *(fptr++) = (FuncHook) hook_PostMessage; + *(fptr++) = (FuncHook) hook_ReadMsgArea; + *(fptr++) = (FuncHook) hook_MsgEd; + *(fptr++) = (FuncHook) hook_AddTime; + *(fptr++) = (FuncHook) hook_TimeLeft; + *(fptr++) = (FuncHook) hook_TimeOnline; + *(fptr++) = (FuncHook) hook_CheckAccess; + *(fptr++) = (FuncHook) hook_SuspendTimer; + *(fptr++) = (FuncHook) hook_RestartTimer; + *(fptr++) = (FuncHook) hook_InstallHandler; + *(fptr++) = (FuncHook) hook_EnableStop; + *(fptr++) = (FuncHook) hook_DisableStop; + *(fptr++) = (FuncHook) hook_Stopped; + *(fptr++) = (FuncHook) hook_IO_SendByte; + *(fptr++) = (FuncHook) hook_IO_ReadByte; + *(fptr++) = (FuncHook) hook_IO_Carrier; + *(fptr++) = (FuncHook) hook_IO_ByteReady; + *(fptr++) = (FuncHook) hook_IO_BufEmpty; + *(fptr++) = (FuncHook) hook_IO_StartBreak; + *(fptr++) = (FuncHook) hook_IO_StopBreak; + *(fptr++) = (FuncHook) hook_IO_DTR; + *(fptr++) = (FuncHook) hook_PostInfo; + *(fptr++) = (FuncHook) hook_ShowHotkeyFile; + *(fptr++) = (FuncHook) hook_ShowHotkeyANSIFile; + *(fptr++) = (FuncHook) hook_PlayMusic; + *(fptr++) = (FuncHook) hook_AdjustTime; + *(fptr++) = (FuncHook) hook_ReadUser; + *(fptr++) = (FuncHook) hook_WriteUser; + *(fptr++) = (FuncHook) hook_ReadMessage; + *(fptr++) = (FuncHook) hook_WriteMSGTMP; + *(fptr++) = (FuncHook) hook_AppendMSGTMP; + *(fptr++) = (FuncHook) hook_ShowMessage; + *(fptr++) = (FuncHook) hook_CreateMessageText; + *(fptr++) = (FuncHook) hook_FirstMessage; + *(fptr++) = (FuncHook) hook_NextMessage; + *(fptr++) = (FuncHook) hook_DeleteMessage; + *(fptr++) = (FuncHook) hook_PostNetmail; + *(fptr++) = (FuncHook) hook_MarkMessage; + *(fptr++) = (FuncHook) hook_ReadMarkedMessages; + *(fptr++) = (FuncHook) hook_ListMarkedMessages; + *(fptr++) = (FuncHook) hook_UnMarkAllMessages; + *(fptr++) = (FuncHook) hook_Ask; + *(fptr++) = (FuncHook) hook_PeekChar; + *(fptr++) = (FuncHook) hook_ScanKey; + *(fptr++) = (FuncHook) hook_InitLineCounter; + *(fptr++) = (FuncHook) hook_LineCounter; + *(fptr++) = (FuncHook) hook_ReadFileArea; + *(fptr++) = (FuncHook) hook_CreateMessageTextString; + *(fptr++) = (FuncHook) hook_FuzzySearch; + *(fptr++) = (FuncHook) hook_RemoveHandler; + *(fptr++) = (FuncHook) hook_ExternalInput; + *(fptr++) = (FuncHook) hook_GotoXY; + *(fptr++) = (FuncHook) hook_SetFullColor; + *(fptr++) = (FuncHook) hook_putenv; + *(fptr++) = (FuncHook) hook_ErrorLevel; + *(fptr++) = (FuncHook) hook_ClrEol; + *(fptr++) = (FuncHook) hook_GetIniVar; + *(fptr++) = (FuncHook) hook_SetIniVar; + *(fptr++) = (FuncHook) hook_NumMsgAreas; + *(fptr++) = (FuncHook) hook_NumFileAreas; + *(fptr++) = (FuncHook) hook_GetLastRead; + *(fptr++) = (FuncHook) hook_SetLastRead; + *(fptr++) = (FuncHook) hook_ReadHandler; + *(fptr++) = (FuncHook) hook_RestoreHandler; + *(fptr++) = (FuncHook) hook_ParseStringVars; + *(fptr++) = (FuncHook) hook_LocalDisplay; + *(fptr++) = (FuncHook) hook_ShowRIPscrip; + *(fptr++) = (FuncHook) hook_RIP; + *(fptr++) = (FuncHook) hook_RemoteDisplay; + *(fptr++) = (FuncHook) hook_MsgNum; + *(fptr++) = (FuncHook) hook_MsgId; + *(fptr++) = (FuncHook) hook_HighMsg; + *(fptr++) = (FuncHook) hook_NumMsgs; + *(fptr++) = (FuncHook) hook_TimeUntilEvent; + *(fptr++) = (FuncHook) hook_ResetInactivity; + *(fptr++) = (FuncHook) hook_mkdir; + *(fptr++) = (FuncHook) hook_rmdir; + *(fptr++) = (FuncHook) hook_chdir; + *(fptr++) = (FuncHook) hook_GetTaggedFiles; + *(fptr++) = (FuncHook) hook_PutTaggedFiles; + *(fptr++) = (FuncHook) hook_AddTaggedFile; + *(fptr++) = (FuncHook) hook_RemoveTaggedFile; + *(fptr++) = (FuncHook) hook_ClearTaggedFiles; + *(fptr++) = (FuncHook) hook_IsTagged; + *(fptr++) = (FuncHook) hook_SetUser; + *(fptr++) = (FuncHook) hook_IO_SendBlock; + *(fptr++) = (FuncHook) hook_IO_ReadBlock; + + + //------------------- + // New, added in v2.2 + //------------------- + + *(fptr++) = (FuncHook) hook_getdisk; + *(fptr++) = (FuncHook) hook_getcurdir; + *(fptr++) = (FuncHook) hook_dos_getftime; + *(fptr++) = (FuncHook) hook_dos_setftime; + *(fptr++) = (FuncHook) hook_fileno; + + res.name = pexname; + res.func = ((PexHdr *)ptr)->entry; + res.data = (DataStruct *)(((PexHdr *)ptr)->datatable); + + add_resident(res); + + init_values((DataStruct *)res.data); + + if(res.constr) (*res.constr)(); + + return TRUE; +} + diff --git a/LOADPEX.OBJ b/LOADPEX.OBJ new file mode 100644 index 0000000..70eb224 Binary files /dev/null and b/LOADPEX.OBJ differ diff --git a/LOGIN.CPP b/LOGIN.CPP new file mode 100644 index 0000000..e9715d5 --- /dev/null +++ b/LOGIN.CPP @@ -0,0 +1,1374 @@ +#include +#include +#include +#include +#include +#include "proboard.hpp" + + +static bool newuser( char *username ); + +static bool check_trashcan( char *username ); + + + +//------------------------------- +// 0 -> ok -1 -> User violation +//------------------------------- + +int login() +{ + char username[ 36 ]; + char password[ 16 ]; + int i; + bool systempwd_ok = FALSE; + bool login_pex_found = FALSE; + + + for ( ; ; ) + { + if ( ! io.baud && + cfg.allowquicklogin ) + { + tsw_showfooter( "Press [Enter] to login as sysop", BAR_COLOR ); + } + + + bool ansi = user.uFlags & UFLAG_ANSI; + + + user.newUser(); + + strcpy( user.language, cfg.defaultLanguage ); + + user.logLevel = 1; + + + if ( ansi ) + { + user.uFlags |= UFLAG_ANSI; + } + + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if ( ! registered ) + { + char *s = "\rProBoard v" VERSION " [UNREGISTERED]\n"; + + + // LOG( "crc = %08lX", crc32( s ) ); + + + /* if ( crc32( s ) != 0x17D65243L ) + { + exit_proboard(); + } */ + + + io << s; + } + + + if ( cfg.usesystempwd && + cfg.systempwd[ 0 ] && + ! systempwd_ok ) + { + showansascrip( "BEFOREPW" ); + + + for ( int i = 0; i < cfg.max_passinput; i++ ) + { + char pwd[ 16 ]; + + + io << S_ENTER_SYSTEM_PASSWORD; + + io.read( pwd, + 15, + READMODE_PWD ); + + io << "\n\n\xFF"; + + + if ( pwd[ 0 ] ) + { + if ( ! stricmp( pwd, cfg.systempwd ) ) + { + break; + } + + + io << S_WRONG_PASSWORD + << "\n\n"; + + LOG( "Wrong system password: '%s'", pwd ); + } + } + + + if ( i == cfg.max_passinput ) + { + LOG( "Exceeded maximum retries." ); + + io << "\n\n" + << S_HANGING_UP + << "\n\xFF"; + + LOG( "Hanging up" ); + + sleep( 2 ); + + exit_proboard(); + } + + + systempwd_ok = TRUE; + + showansascrip( "AFTERPW" ); + } + + + user_recnr = -1; + + + if ( run_sdkfile( form( "/I _LOGIN %lu", + (dword) username ) ) >= 0 ) + { + login_pex_found = TRUE; + } + + + if ( user_recnr >= 0 ) + { + break; + } + + + if ( ! login_pex_found ) + { + io << '\r' + << S_ENTER_YOUR_NAME; + + + int saved_x; + int saved_y; + + + SCREEN.getPos( saved_x, saved_y ); + + io.read( username, + 35, + READMODE_UPFIRST ); + + + if ( strchr( username, ';' ) ) + { + *strchr( username, ';' ) = '\0'; + } + + + for ( i = 0; username[ i ]; i++ ) + { + if ( username[ i ] == '\xFF' ) + { + username[ i ] = ' '; + } + } + + + strip_trailing( username ); + strip_leading( username ); + + tsw_showfooter( "", BAR_COLOR ); + + + if ( ! username[ 0 ] ) + { + if ( ! io.baud ) + { + strcpy( username, cfg.sysopname ); + + SCREEN.setPos( saved_x, saved_y ); + + SCREEN.attrib( ( SCREEN.attrib() & 0xF ) | 0x10 ); + + + io << username; + + + for ( i = 0; i < 35 - strlen( username ); i++ ) + { + io << ' '; + } + } + else + { + io << "\n\n\xFF"; + + continue; + } + } + + + if ( check_trashcan( username ) ) + { + LOG( "Trashcan name: \"%s\"", username ); + + io << "\n\n"; + + + if ( showansascrip( "TRASHCAN" ) == ANS_NOFILE ) + { + io << S_ILLEGAL_NAME + << "\n\n"; + } + + + continue; + } + + + rip_reset(); + rip_textmode(); + + + io << "\n\n\7" + << S_SCANNING_USER_FILE + << char( 0xFF ); + + + bool found = user.search( username ); + + + while ( found && + ( user.uFlags & UFLAG_DELETED ) ) + { + found = user.searchNext(); + } + + + user_recnr = found + ? int( user.record ) + : -1; + + + if ( ! found && + cfg.allowalias ) + { + found = user.search( username, + TRUE, + FALSE, + TRUE ); + + user_recnr = found + ? int( user.record ) + : -1; + } + + + if ( user_recnr < 0 && + ! cfg.allowoneword && + ! strchr( username, ' ' ) ) + { + LOG( "Illegal name: \"%s\"", username ); + + io << "\n\n" + << S_WRONG_NAME_FORMAT + << "\n\n"; + + + continue; + } + } + + + login_date.today(); + login_time.now(); + + + if ( user_recnr < 0 ) + { + LOG( "User not located : %s", username ); + + run_sdkfile( "/I NEWUSER" ); + + showansascrip( "NEWUSER" ); + + + io << "\n\n" + << S_ARE_YOU_A_NEW_USER( username ); + + + if ( io.ask( 0 ) ) + { + /*if ( ! registered && + num_users >= MAX_UNREG_USERS ) + { + io << "\n\n" + << "This unregistered version of ProBoard cannot create any more new accounts\n" + << "\n\n"; + + continue; + }*/ + + + user_recnr = newuser( username ) + ? int( user.record ) + : ( -1 ); + + return 0; + } + else + { + io << "\n\n"; + + LOG( "Name misspelled (%s).", username ); + + + continue; + } + } + else + { + break; + } + } + + + read_taglist(); + + login_date.today(); + login_time.now(); + + + if ( user.language[ 0 ] ) + { + if ( ! ReadLanguage( user.language ) ) + { + if ( ! ReadLanguage( cfg.defaultLanguage ) ) + { + fatalerror( "Default language not found" ); + } + } + + + readconfig(); + } + + + if ( ! user.lastNewFilesCheck.ok() ) + { + user.lastNewFilesCheck.today(); + } + + + if ( user.lastDate != Date( TODAY ) || + ( user.uFlags & UFLAG_GUEST ) ) + { + user.timeUsed = 0; + user.kbToday = 0; + } + + + if ( user.level < min_level ) + { + LOG( "User \"%s\" not allowed to logon", user.name ); + + + if ( showansascrip( "NOACCESS" ) == ANS_NOFILE ) + { + io << "\7\n\n" + << S_NO_ACCESS_ON_THIS_NODE + << "\n\xFF"; + } + + + sleep( 2 ); + + exit_proboard(); + } + + + if ( ( user.uFlags & UFLAG_LOCALONLY ) && + io.baud ) + { + LOG( "User \"%s\" not allowed to logon from remote", user.name ); + + io << "\7\n\n" + << S_NO_ACCESS_ON_THIS_NODE + << "\n\xFF"; + + sleep( 2 ); + + exit_proboard(); + } + + + update_display(); + + LOG( "User logged in: %s", user.name ); + + + if ( ! login_pex_found ) + { + for ( i = 0; io.baud || ! cfg.allowquicklogin; i++ ) + { + io << "\n\n"; + + + if ( ! i ) + { + showansascrip( "BEFOREPW" ); + } + + + io << S_ENTER_PASSWORD; + + io.read( password, + 15, + READMODE_PWD ); + + + if ( user.passWord[ 0 ] == '\0' ) + { + if ( RaCrc( password ) == user.passWordCRC ) + { + break; + } + } + else + { + if ( ! stricmp( user.passWord, password ) ) + { + break; + } + } + + + LOG( "Wrong password: %s", password ); + + io << "\n\n" + << S_WRONG_PASSWORD; + + + if ( i == cfg.max_passinput - 1 ) + { + LOG( "User exceeded maximum password tries" ); + + + if ( cfg.pwdmessages && + ! ( user.uFlags & UFLAG_GUEST ) ) + { + LOG( "Posting message to user & sysop" ); + + write_msgtmp( form( "Someone failed to login using your name on %d %s %d, at %02d:%02d\r\n", + login_date[ 0 ], + months_short[ login_date[ 1 ] ], + login_date[ 2 ] + 1900, // Y2K OK + login_time[ 0 ], + login_time[ 1 ] ) ); + + post_message( "ProBoard Security Manager", + user.name, + "Password violation", + cfg.securityboard, + TRUE); + + write_msgtmp( form( "Someone failed to login as '%s' on %d %s %d, at %02d:%02d\r\n", + user.name, + login_date[ 0 ], + months_short[ login_date[ 1 ] ], + login_date[ 2 ] + 1900, // Y2K OK + login_time[ 0 ], + login_time[ 1 ] ) ); + + post_message( "ProBoard Security Manager", + cfg.sysopname, + "Password violation", + cfg.securityboard, + TRUE ); + } + + + io << "\n\n" + << S_LEAVE_MESSAGE_TO_SYSOP; + + + if ( io.ask() ) + { + io << '\n'; + + writemsg( form( "%d /T=Sysop", + cfg.securityboard ) ); + } + + + io << "\n\n" + << S_HANGING_UP + << "\n\xFF"; + + LOG( "Hanging up" ); + + sleep( 2 ); + + user_recnr = -1; + + + return -1; + } + } + + + showansascrip( "AFTERPW" ); + } + + + io << '\n'; + + + if ( cfg.asksex && + ! user.sex ) + { + io << '\n' + << S_ASK_SEX; + + + char k = wait_language_hotkeys( K_ASK_SEX, FALSE ); + + + user.sex = k + 1; + + + io << ( k ? S_FEMALE + : S_MALE + ); + + io << '\n'; + } + + + if ( cfg.askBirthDay == 1 && + ! user.birthDate.ok() ) + { + do + { + io << '\n' + << S_ASK_BIRTHDATE( date_formats_long[ user.dateFormat ] ); + + InputDate( user.birthDate, user.dateFormat ); + } + while ( ! user.birthDate.ok() ); + + + io << '\n'; + } + + + password_ok = TRUE; + + + if ( ! cfg.allowansi ) + { + user.uFlags &= ~UFLAG_ANSI; + } + + + if ( user.expDate[ 0 ] ) + { + int ex = user.expDate - Date( TODAY ); + + + if ( ex <= 0 ) + { + if ( user.expLevel < user.level ) + { + word oldlevel = user.level; + user.level = user.expLevel; + + + for ( int f = 1; f <= 32; f++ ) + { + if ( user.expFlagsOn.getflag( f ) ) + { + user.aFlags.setflag( f ); + } + } + + + for ( f = 1; f <= 32; f++ ) + { + if ( user.expFlagsOff.getflag( f ) ) + { + user.aFlags.clearflag( f ); + } + } + + + run_sdkfile( form( "/I EXPIRED %u", oldlevel ) ); + + + if ( showansascrip( "EXPIRED" ) == ANS_NOFILE ) + { + io << '\n' + << S_LEVEL_EXPIRED + << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + } + } + } + else + { + if ( ex <= 30 ) + { + if ( showansascrip( "EXP_WARN" ) == ANS_NOFILE ) + { + io << '\n' + << S_LEVEL_WILL_EXPIRE( form( "%d", ex ) ) + << "\n\n"; + + io << S_PRESS_ENTER_TO_CONTINUE; + } + } + } + } + + + if ( user.level < 1 ) + { + LOG( "Access denied (Level 0 - Locked out)" ); + + io << '\n' + << S_LOCKED_OUT + << "\n\n" + << S_HANGING_UP + << '\xFF'; + + sleep( 2 ); + + exit_proboard(); + } + + + if ( user.fileArea <= 0 ) + { + user.fileArea = 1; + } + + + if ( user.msgArea <= 0 ) + { + user.msgArea = 1; + } + + + if ( cfg.discrete && + ! strcmpl( user.name, cfg.sysopname ) ) + { + user.uFlags |= UFLAG_HIDDEN; + } + + + if ( user.uFlags & UFLAG_ATTEN ) + { + if ( playsong( "ATTEN", + "\x1b", + 0 ) == 1 ) + { + for ( i = 0; i < 5; i++ ) + { + sound( word( 1000 + i * 400 ) ); + + msleep( 100 ); + } + + + nosound(); + } + } + + + return 0; +} + + + +//------------------------------ +// returns record number of user +//------------------------------ + +static +bool newuser( char *username ) +{ + if ( ! cfg.newuserlevel ) + { + if ( showansascrip( "PRIVATE" ) == ANS_NOFILE ) + { + io << "\n\n" + << S_PRIVATE_SYSTEM << "\n\n" + << S_HANGING_UP << '\xFF'; + } + + + sleep( 2 ); + + LOG( "Private System - New User rejected" ); + + exit_proboard(); + } + + + if ( cfg.newuserlevel < min_level ) + { + if ( showansascrip( "NOACCESS" ) == ANS_NOFILE ) + { + io << "\n\n" + << S_NOT_FOR_NEW_USERS + << "\n\xFF"; + } + + + sleep( 2 ); + + LOG( "New user rejected" ); + + exit_proboard(); + } + + + bool tmp_ansi = ansi_mode; + + + user.newUser(); + + strcpy( user.language, cfg.defaultLanguage ); + + + if ( tmp_ansi ) + { + user.uFlags |= UFLAG_ANSI; + } + + + if ( cfg.europe ) + { + user.dateFormat = 2; + } + + + strcpy( user.name, username ); + + LOG( "Creating new user." ); + + run_sdkfile( "/I NEWUSER1" ); + + showansascrip( "NEWUSER1" ); + + + for ( ; ; ) + { + int num_languages = 0; + DirScan scan( FileName( syspath, "*.PBL" ) ); + + + for ( ; int( scan ); scan++, num_languages++ ) + { + if ( String(scan.name()) == "_DEFAULT.PBL") + { + num_languages--; + } + } + + + if ( num_languages > 1 ) + { + io << "\n\n"; + + select_language(); + } + + + if ( cfg.allowansi ) + { + io << "\n\n" + << S_ASK_ANSI; + + + if ( io.ask( 1 ) ) + { + user.uFlags |= UFLAG_ANSI; + } + } + + + if ( cfg.allowavatar ) + { + io << "\n\n" + << S_ASK_AVATAR; + + + if ( io.ask( 0 ) ) + { + user.uFlags |= UFLAG_AVATAR; + } + + + if ( avatar ) + { + io << "\n\n" + << S_ASK_AVATAR_PLUS; + + + if ( io.ask( 0 ) ) + { + user.uFlags |= UFLAG_AVTPLUS; + } + } + } + + + if ( ansi_mode ) + { + io << "\n\n" + << S_ASK_FSED; + + + if ( io.ask( 1 ) ) + { + user.uFlags |= UFLAG_FSED; + } + } + + + io << "\n\n" + << S_ASK_CLS; + + + if ( io.ask( 1 ) ) + { + user.uFlags |= UFLAG_CLEAR; + } + + + io << "\n\n" + << S_ASK_PAUSE; + + + if ( io.ask( 1 ) ) + { + user.uFlags |= UFLAG_PAUSE; + } + + + io << "\n\n" + << S_ASK_SCREENLENGTH( "24" ); + + + char length[ 3 ]; + + + io.read( length, + 2, + READMODE_DIGITS ); + + user.screenLength = atoi( length ); + + + if ( user.screenLength < 5 ) + { + user.screenLength = 24; + } + + + do + { + do + { + io << "\n\n" + << S_ASK_CITY; + + io.read( user.city, 25 ); + } + while ( strlen( user.city ) < 3 ); + + + if ( cfg.askstate ) + { + io << "\n\n" + << S_ASK_STATE; + + io.read( user.state, 25 ); + } + } + while ( cfg.askstate && + strlen( user.state ) < 2 ); + + + if ( cfg.askcountry ) + { + do + { + io << "\n\n" + << S_ASK_COUNTRY; + + io.read( user.country, 25 ); + } + while ( strlen( user.country ) < 2 ); + } + + + if ( cfg.askaddress ) + { + io << "\n\n" + << S_ASK_MAILING_ADDRESS + << "\n\n"; + + io.read( user.address1, 50 ); + + io << '\n'; + + io.read( user.address2, 50 ); + + io << '\n'; + + io.read( user.address3, 50 ); + } + + + if ( cfg.askvoicephone ) + { + do + { + io << "\n\n" + << S_ASK_VOICE_PHONE; + + io.read( user.voicePhone, 15 ); + } + while ( strlen( user.voicePhone ) < 6 ); + } + + + if ( cfg.askdataphone ) + { + io << "\n\n" + << S_ASK_DATA_PHONE; + + io.read( user.dataPhone, 15 ); + } + + + if ( cfg.askfaxphone ) + { + io << "\n\n" + << S_ASK_FAX_PHONE; + + io.read( user.faxPhone, 15 ); + } + + + if ( cfg.askdateformat ) + { + io << "\n\n"; + + change_dateformat(); + } + + + if ( cfg.asksex ) + { + io << "\n\n" + << S_ASK_SEX; + + + char k = wait_language_hotkeys( K_ASK_SEX, FALSE ); + + + user.sex = k + 1; + + io << ( + k ? S_FEMALE + : S_MALE + ); + } + + + if ( cfg.askBirthDay ) + { + do + { + io << "\n\n" + << S_ASK_BIRTHDATE( date_formats_long[ user.dateFormat ] ); + + InputDate( user.birthDate, user.dateFormat ); + + + if ( ! user.birthDate.ok() ) + { + if ( cfg.askBirthDay > 1 ) + { + user.birthDate.set( 0, 0, 0 ); + + break; + } + else + { + continue; + } + } + } + while ( ! user.birthDate.ok() ); + } + + + if ( cfg.allowalias ) + { + for ( ; ; ) + { + user.alias[ 0 ] = 0; + + io << "\n\n" + << S_ASK_ALIAS; + + io.read( user.alias, + 30, + READMODE_UPFIRST ); + + + if ( ! user.alias[ 0 ] ) + { + break; + } + + + User tmpuser; + + + if ( tmpuser.search( user.alias ) || + tmpuser.search( user.alias, + TRUE, + FALSE, + TRUE ) ) + { + io << "\n\n" + << S_ALIAS_BEING_USED; + + continue; + } + else + { + break; + } + } + } + + + char pass[ 16 ]; + + + for ( ; ; ) + { + io << "\n\n" + << S_ASK_PASSWORD( form( "%d", cfg.min_passlength ), "15" ); + + io.read( user.passWord, + 15, + READMODE_PWD ); + + + if ( strlen( user.passWord ) < cfg.min_passlength ) + { + io << "\n\n" + << S_ILLEGAL_PASSWORD; + + continue; + } + + + io << "\n\n" + << S_ASK_PASSWORD_AGAIN; + + io.read( pass, + 15, + READMODE_PWD ); + + + if ( ! strcmpl( pass, user.passWord ) ) + { + break; + } + } + + + password_ok = TRUE; + + user.level = cfg.newuserlevel; + user.logLevel = cfg.newuserloglevel; + user.aFlags = cfg.newuserflags; + + + io << "\n\n\n" + << S_ASK_EVERYTHING_CORRECT; + + + if ( io.ask( 1 ) ) + { + break; + } + else + { + LOG( "Missed some questions, reentering..." ); + } + } + + + user.uFlags |= UFLAG_HOTKEYS; + user.fileArea = 1; + user.msgArea = 1; + + + io << '\n'; + + LOG( "New user created." ); + + run_sdkfile( "/I NEWUSER2" ); + + showansascrip( "NEWUSER2" ); + questionnaire( "NEWUSER" ); + + user.lastDate.today(); + user.lastTime.now(); + user.firstDate.today(); + user.lastNewFilesCheck.today(); + + + return user.write( TRUE ); +} + + + +static +bool check_trashcan( char *username ) +{ + File f; + + + if ( ! f.open( FileName( syspath, "TRASHCAN.CTL" ), + fmode_read | fmode_text ) ) + { + return FALSE; + } + + + for ( ; ; ) + { + char s[ 80 ]; + + + if ( ! f.readLine( s, 79 ) ) + { + return FALSE; + } + + + strip_linefeed( s ); + + + if ( ! strcmpl( s, username ) ) + { + return TRUE; + } + } +} + + + +void show_intro() +{ + char *notregstr = " [UNREGISTERED] Ä Node %d\nCopyright (c) 1990-1999 TeleGrafix Communications, Inc. All Rights Reserved\n"; +// char *notregstr = " [UNREGISTERED] Ä Node %d Ä Copyright (c) 1990,99 TeleGrafix Communications\n\n"; +// char *notregstr = " [UNREGISTERED] ÄÄ Node %d ÄÄ (c) 1990-1997 Philippe Leybaert\n\n"; + long checksum = 0; + int i; + + + for ( i = 0; i < strlen( notregstr ); i++ ) + { + checksum += notregstr[ i ]; + } + + //------------------------------------------- + // Magic registration/copyright futzing check + //------------------------------------------- + + if ( checksum != 8235 ) + { + exit_proboard(); + } + + + io << "\x1b[5n\x1b[!\r"; + + io << "\fProBoard v" VERSION; + + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if ( registered ) + { + int l = 38 - strlen( VERSION ); + char *pUserName; + + + pUserName = registered_user_name(); + + + if ( cfg.numnodes > 1 ) + { + io << form( " ÄÄ Node %d ÄÄ ", node_number ); + } + else + { + l += 17; + } + + + for ( i = 0; i < l - strlen( pUserName ); i++ ) + { + io << ' '; + } + + + checksum = 0; + + //char *regtostr = "Registered to %s\n\n"; + char* regtostr = " Freeware\n\n"; + + + /*for ( i = 0; i < strlen( regtostr ); i++ ) + { + checksum += regtostr[ i ]; + } + + + if ( checksum != 1501 ) + { + exit_proboard(); + } */ + + + //io << form( regtostr, pUserName ) << char( 0xFF ); + io << regtostr << char(0xFF); + } + else + { + io << form( notregstr, node_number ) << char( 0xFF ); + + + if ( io.baud ) + { + sleep( 2 ); + } + } + + + // io << form( "Checksum=%ld\n", checksum ); + + + String response; + dword ticks = clockticks(); + + + for ( ; clockdiff( ticks ) < 30 && io.baud; ) + { + char k = io.readkey(); + + + if ( ! k ) + { + continue; + } + + + response << k; + + + if ( strstr( response, "RIPSCRIP" ) ) + { + rip_detected = TRUE; + } + + + if ( strstr( response, "\x1b[" ) ) + { + user.uFlags |= UFLAG_ANSI; + } + + + if ( rip_detected && + ( user.uFlags & UFLAG_ANSI ) ) + { + break; + } + } + + + if ( rip_detected ) + { + for ( ticks = clockticks(); + clockdiff( ticks ) < 18 && + io.baud; + ) + { + io.readkey(); + } + } + + + if ( cfg.disableRIP ) + { + rip_detected = FALSE; + } + + + if ( rip_detected ) + { + LOG( "*** RIP DETECTED ***" ); + } + + + if ( ! io.baud ) + { + user.uFlags |= UFLAG_ANSI; + } + + + rip_send_icons(); + + + if ( ! show_rip( form( "INTRO%d", node_number ) ) ) + { + if ( ! show_rip( "INTRO" ) ) + { + if ( showansasc( form( "INTRO%d", node_number ), + NULL ) == ANS_NOFILE ) + { + if ( showansasc( "INTRO", NULL ) == ANS_NOFILE ) + { + showansasc( "LOGO" ); + } + } + } + else + { + rip_text_window( 0, + 21, + 79, + 24, + 2 ); + } + } +} diff --git a/LOGIN.OBJ b/LOGIN.OBJ new file mode 100644 index 0000000..011f570 Binary files /dev/null and b/LOGIN.OBJ differ diff --git a/MAILCHK.CPP b/MAILCHK.CPP new file mode 100644 index 0000000..2549bd1 --- /dev/null +++ b/MAILCHK.CPP @@ -0,0 +1,322 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include "proboard.hpp" + + + +void mailcheck( char *data ) +{ + MsgArea ma; + String param[ 10 ]; + bool checkmail = TRUE; + bool checkfiles = TRUE; + int num_para = parse_data( data, param ); + + + for ( int i = 0; i < num_para; i++ ) + { + if ( param[ i ][ 0 ] == '/' ) + { + switch ( toupper( param[ i ][ 1 ] ) ) + { + case 'M': + + checkfiles = FALSE; + break; + + + case 'F': + + checkmail = FALSE; + break; + } + } + } + + + if ( checkmail ) + { + // if ( rip_mode ) + // { + // rip_start_dialog( S_CHECKING_MAILBOX, 2 ); + // io.fullcolor( 0x1F ); + // + // io.show_remote = FALSE; + // } + + + io << "\n\7" + << S_CHECKING_MAILBOX + << char( 0xFF ); + + io.show_remote = TRUE; + + + int found = 0; + MessageIndex *msgsfound = new MessageIndex[ 200 ]; + + + found = msgbase.scanMail( msgsfound, 200 ); + + + // if ( rip_mode ) + // { + // rip_end_dialog(); + // rip_reset(); + // } + + + if ( ! found ) + { + io << "\n\n" + << S_MAILBOX_EMPTY + << '\xFF'; + + msleep( 1500 ); + + io << '\n'; + } + else + { + io << "\n\n" + << S_MAIL_FOUND_TITLE + << "\n\n"; + } + + + if ( found ) + { + markedmsglist.clear(); + + + for ( i = 1; i <= MsgArea::highAreaNum(); i++ ) + { + int on1line = 0; + + + if ( ! ma.read( i ) ) + { + continue; + } + + + for ( int j = 0; j < found; j++ ) + { + if ( msgsfound[ j ].area == i ) + { + if ( ! on1line ) + { + if ( ! check_access( ma.readLevel, + ma.readFlags, + ma.readFlagsNot ) && + + ! ma.sysopAccess() ) + { + LOG( "Mail found in inaccessible area (%d)!!", + i ); + + break; + } + + + io << form( "\6%-33.33s: \3", ma.name ); + } + + + if ( on1line++ == 6 ) + { + io << form( "\n%-35s", "" ); + + on1line = 1; + } + + + io << form( "#%-5d ", + ma.msgNum( msgsfound[ j ].num ) ); + + markedmsglist.add( msgsfound[ j ] ); + } + } + + + if ( on1line ) + { + io << "\n\n"; + } + } + + + for ( ; ; ) + { + io << S_MAIL_FOUND_ACTION_PROMPT; + + + char k = wait_language_hotkeys( K_MAIL_FOUND_ACTION_PROMPT ); + + + switch ( k ) + { + case '\r': + case 0: + + io << K_MAIL_FOUND_ACTION_PROMPT[ 0 ] + << '\n'; + + readmsg( "0 /N" ); + + break; + + + case 1: + + io << K_MAIL_FOUND_ACTION_PROMPT[ 1 ] + << '\n'; + + qscan_msg( "0 /N" ); + + break; + + + default: + + io << K_MAIL_FOUND_ACTION_PROMPT[ 2 ] + << "\n\n" + << S_MESSAGES_HAVE_BEEN_MARKED + << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + + break; + } + + + io << '\n'; + + + if ( k != 1 ) + { + break; + } + } + } + + + delete [] msgsfound; + } + + + + if ( checkfiles ) + { + File f; + int found = 0; + + + if ( ! checkmail ) + { + io << '\n' + << S_CHECKING_FOR_PERSONAL_FILES + << '\xFF'; + } + + + if ( f.open( FN_PVTFILES_PB ) ) + { + _PrivateFile pvtfil; + + + for ( ; ; ) + { + if ( f.read( & pvtfil, + sizeof( pvtfil ) ) != sizeof( pvtfil ) ) + { + break; + } + + + if ( strcmpl( pvtfil.to, user.name ) || + ! pvtfil.fname[ 0 ] ) + { + continue; + } + + + FileName fn; + + + if ( ! strchr( pvtfil.fname, '\\' ) ) + { + fn = String( cfg.pvtuploadpath ) + pvtfil.fname; + } + else + { + fn = pvtfil.fname; + } + + + if ( access( fn, 0 ) ) + { + continue; + } + + + fn.stripPath(); + + + if ( ! found ) + { + io << "\n\n" + << S_PERSONAL_FILES_FOUND + << "\n\n"; + } + + + io << form( " \7* \3%-12s \7-\2 %02d %3s %4d\3 \7- ", + (char *) fn,pvtfil.date[ 0 ], + months_short[ pvtfil.date[ 1 ] ], + pvtfil.date[ 2 ] + 1900 ); // Y2K OKAY + + io << S_PERSONAL_FILE_FROM( pvtfil.from ) + << '\n'; + + + found++; + } + + + f.close(); + + + if ( found ) + { + io << '\n' + << S_DOWNLOAD_NOW; + + + if ( io.ask( 0 ) ) + { + download( "/P" ); + } + + // io << '\n' + // << S_PRESS_ENTER_TO_CONTINUE; + } + } + + + if ( ! found && + ! checkmail ) + { + io << "\n\n" + << S_NO_PERSONAL_FILES_FOUND + << '\xFF'; + + msleep( 1500 ); + + io << '\n'; + } + } +} diff --git a/MAILCHK.OBJ b/MAILCHK.OBJ new file mode 100644 index 0000000..734b63c Binary files /dev/null and b/MAILCHK.OBJ differ diff --git a/MAKE0000.BAT b/MAKE0000.BAT new file mode 100644 index 0000000..eb8cdf0 --- /dev/null +++ b/MAKE0000.BAT @@ -0,0 +1,5 @@ +@echo off +del /q turboc.cfg +if errorlevel 1 goto m_end +echo>D:\CPP\PB\PROBOARD\make0000.err +:m_end diff --git a/MAKE0000.LCK b/MAKE0000.LCK new file mode 100644 index 0000000..e69de29 diff --git a/MAKEFILE b/MAKEFILE new file mode 100644 index 0000000..dfbda8c --- /dev/null +++ b/MAKEFILE @@ -0,0 +1,41 @@ +## Makefile for ProBoard v1.xx + +## Caution!! The standard Borland C++ library has to be changed before compiling +## ProBoard v1.30 - The __NFILE__ macro in the file _nfile.h should be changed to +## 100. The files FILES.C and FILES2.C in the RTL\CLIB directory should be +## recompiled using all memory models, and updated in C?.LIB + + +MODEL = LARGE +OVERLAY = 1 + +OBJS = exec.obj io.obj fossil.obj menu.obj \ + chat.obj shell.obj login.obj pbuser.obj readmsg.obj \ + misc.obj timer.obj mailchk.obj msg.obj zip.obj \ + writemsg.obj tops.obj forward.obj replymsg.obj timestat.obj \ + msgdel.obj combined.obj question.obj aka.obj qscanmsg.obj \ + showmsg.obj scanmsg.obj version.obj rawdir.obj msged.obj \ + dl.obj viewfile.obj lastcall.obj desqview.obj stacking.obj \ + cleanup.obj sysopkey.obj msgfind.obj binlog.obj protocol.obj \ + listfile.obj ul.obj tag.obj sellang.obj proboard.obj \ + nodelist.obj online.obj msgmove.obj cdrom.obj regis.obj \ + mchat.obj setarea.obj usered.obj deckey.obj music.obj \ + gif.obj msgexprt.obj help.obj ega.obj event.obj \ + filearea.obj msgarea.obj timelog.obj wordwrap.obj showans.obj \ + userset.obj usage.obj loadpex.obj image.obj postmsg.obj \ + pexcall.obj strvars.obj userwin.obj bulletin.obj modem.obj \ + execheck.obj language.obj fuzzy.obj terminal.obj squish.obj \ + hudson.obj msgbase.obj mark.obj rip.obj jam.obj \ + inpdate.obj tag_rw.obj + + +OVLOBJS = $(OBJS,Nexec\.obj,Nio\.obj,Nfossil\.obj,Ntimer\.obj,Nmisc\.obj) + +TSLIB = 1 +TSWIN = 1 +SQUISH = 1 +PBLIB = 1 + +#----------------------------------------------------------------------------# + +ProBoard.exe: $(OBJS) diff --git a/MARK.CPP b/MARK.CPP new file mode 100644 index 0000000..8605e63 --- /dev/null +++ b/MARK.CPP @@ -0,0 +1,138 @@ +#define Use_MsgBase + +#include "proboard.hpp" + +MarkedMsgList::MarkedMsgList() +{ + msgList = new MessageIndex[MAX_MARKED_MSGS]; + + n = 0; +} + +MarkedMsgList::MarkedMsgList(const MarkedMsgList &m) +{ + msgList = new MessageIndex[MAX_MARKED_MSGS]; + + (*this) = m; +} + +MarkedMsgList::~MarkedMsgList() +{ + delete [] msgList; +} + +void +MarkedMsgList::operator=(const MarkedMsgList& m) +{ + for(int i=0 ; i < MAX_MARKED_MSGS ; i++) msgList[i] = m.msgList[i]; + + n = m.n; +} + +bool +MarkedMsgList::add(MessageIndex& mi) +{ + if(isMarked(mi)) return TRUE; + + if(n < MAX_MARKED_MSGS) + { + msgList[n++] = mi; + + return TRUE; + } + else + { + return FALSE; + } +} + +bool +MarkedMsgList::add(Message& msg) +{ + return add(MessageIndex(msg.areaNum(),msg.id)); +} + +bool +MarkedMsgList::isMarked(MessageIndex& mi) +{ + for(int i=0 ; i msgList[y].area) + { + MessageIndex tmp = msgList[x]; + msgList[x] = msgList[y]; + msgList[y] = tmp; + } + + for(x=0;xmsgList[y].num) + { + MessageIndex tmp = msgList[x]; + msgList[x] = msgList[y]; + msgList[y] = tmp; + } +} + + +void +get_new_msgs(MarkedMsgList& marked,int area) +{ + Message msg; + MsgArea ma; + + io << ' '; + + int start = 1; + int end = 1000; + + if(area) + { + start = end = area; + } + + for(int i=start ; i <= end ; i++) + { + if( (area && area != i) + || (!user.combinedBoards.connected(i) && !area) + || !ma.read(i) + ) continue; + + if( !check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) + && !ma.sysopAccess()) continue; + + if(ma.highMsg() <= ma.lastRead(user_recnr)) continue; + + bool ok = msg.readFirst(READMSG_ALL,1,ma.lastRead(user_recnr) + 1,"",i); + + int cnt = 0; + + while(ok) + { + if(!marked.add(MessageIndex(msg.areaNum(),msg.id))) break; + + io << '\b' << (("/-\\|")[cnt]) ; + + cnt = (++cnt) % 4; + + ok = msg.readNext(READMSG_ALL,1,""); + } + + if(ok) break; + } + + io << "\b \b"; +} diff --git a/MARK.OBJ b/MARK.OBJ new file mode 100644 index 0000000..9e7235e Binary files /dev/null and b/MARK.OBJ differ diff --git a/MC.CFG b/MC.CFG new file mode 100644 index 0000000..c68a223 --- /dev/null +++ b/MC.CFG @@ -0,0 +1,17 @@ +-P-cpp +-c +-ml +-Y +-w-par +-w-aus +-w-use +-w-inl +-w-pin +-w-amb +-w-asm +-w-def +-w-nod +-w-pro +-w-stv +-w-pre +-w-sig diff --git a/MCHAT.CPP b/MCHAT.CPP new file mode 100644 index 0000000..ab3330c --- /dev/null +++ b/MCHAT.CPP @@ -0,0 +1,321 @@ +#include +#include +#include +#include +#include "desqview.hpp" +#include "proboard.hpp" + +const MAX_LOCK_TRIES = 500; +const LOCK_PAUSE = 10; + +static char *lock_err_msg = "CHAT FILE LOCKING ERROR (%d)"; + +class chatdata + { + int online; + int head,tail; + char data[240]; + static File f[2]; + static int node[2]; + public: + chatdata(int n1,int n2); + ~chatdata(); + void queue(char x); + int getnext(char *); + }; + +File chatdata::f[2]; + +int chatdata::node[2]; + +chatdata::chatdata(int n1,int n2) +{ + node[0] = n1; + node[1] = n2; + + if(!f[0].open(form("%sCHAT%d.DAT",syspath,node[0]),fmode_rw | fmode_shared | fmode_copen)) + return; + + memset(this,0,sizeof(*this)); + + f[0].write(this,sizeof(*this)); + + time_t t = time(NULL); + + for(;;) + { + if(f[1].open(form("%sCHAT%d.DAT",syspath,node[1]),fmode_rw | fmode_shared)) break; + + if((time(NULL)-t)>20) + { + LOG("File sharing error during chat!"); + break; + } + } +} + + +chatdata::~chatdata() +{ + f[0].close(); + f[1].close(); +} + +void +chatdata::queue(char c) +{ + for(int i=0;icfg.numnodes || node2<=0) + return; + + user_online uo; + uo.setstatus(UO_BROWSING); + + switch(uo.chatreq(node2)) + { + case 1: + uo.setstatus(UO_BUSY,node2); + + case 2: + io << S_MCHAT_NODE_IS_NOT_AVAILABLE << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + io << S_MCHAT_STARTED << "\n\n\xFF"; + + multilinechat(node2); + + uo.setstatus(UO_BROWSING); + + io << "\n\n" << S_MULTILINE_CHAT_ENDED << ' ' << S_PRESS_ENTER_TO_CONTINUE; +} + +void +multilinechat(int n) +{ + int node1,node2; + char buffer[240]; + user_online uo; + int last=0; + String s; + + node1 = node_number; + node2 = n; + + LOG(1,"Multiline chat started"); + + chatdata cd(node1,node2); + + uo.setstatus(UO_CHATTING); + + for(int i=0;;i++) + { + char x; + + if((x=io.readkey())!=0) + { + if(x<8) + continue; + + if(x==27) + break; + + if(last!=1) + { + if(avatar) + io << "\x16\x01\x0B\xFF"; + else + if(ansi_mode) + io << "\xFF"; + } + + last=1; + + if(x=='\t') x=' '; + + if(x!=8) io << x << char(0xFF); + + switch(x) + { + case 8: + if(s.len()>0) + { + s[s.len()-1]=0; + io << "\b \b\xFF"; + } + break; + + case 13: + io << '\n' << char(255); + s=""; + break; + + default: + s << (char)x; + } + + if(s.len()>78) + { + String wrap; + + int l = wordwrap(s,wrap,78); + + for(int i=0;i5) + { + i = uo.getstatus(node2); + + if(i==UO_OFFLINE) + { + io << "\n\n" << S_MCHAT_OTHER_NODE_HUNG_UP << '\xFF'; + return; + } + i=0; + } + + int count = cd.getnext(buffer); + + for(int i=0;i0) + { + s[s.len()-1]=0; + io << "\b \b\xFF"; + } + break; + + case 13: + io << "\n\xFF"; + s = ""; + break; + + default: + s << (char)x; + } + + if(s.len()>78) + { + String wrap; + int l=wordwrap(s,wrap,78); + for(int i=0;i +#include +#include +#include +#include +#include "proboard.hpp" + + +struct MenuItem : public _MenuItem + { + bool checkAccess() const; + }; + +bool +MenuItem::checkAccess() const +{ + if(!check_access(access.minLevel , access.flags , access.flagsNot)) + return FALSE; + + if(access.maxLevel && user.level > access.maxLevel) + return FALSE; + + int age = -1; + + if(user.birthDate.ok()) + age = Date(TODAY).age(user.birthDate); + + if(access.minAge || access.maxAge) + { + if(age < 0) + return FALSE; + + if((access.minAge && age < access.minAge) || (access.maxAge && age > access.maxAge)) + return FALSE; + } + + if(access.minTimeLeft && timer.left() < access.minTimeLeft) + return FALSE; + + if(access.minTimeOnline && timer.online() < access.minTimeOnline) + return FALSE; + + if(!access.timeFrame.enabled()) + return FALSE; + + if(access.sex) + { + if(!user.sex) + return FALSE; + + if(user.sex == SEX_MALE) + { + if(access.sex == 2) + return FALSE; + } + + if(user.sex == SEX_FEMALE) + { + if(access.sex == 1) + return FALSE; + } + } + + dword speed = io.baud; + + if(speed < 1) + speed = 38400L; + + if(access.minSpeed && speed < access.minSpeed) + return FALSE; + + if(access.maxSpeed && speed > access.maxSpeed) + return FALSE; + + if(access.nodes[(node_number-1)/8] & (1 << ((node_number-1) & 7))) + return FALSE; + + return TRUE; +} + + +typedef char *str; + +#define MAX_MENUSTACK 100 + +static + class menu_stack + { + str *menus; + int sp; + public: + menu_stack() + { + menus = new str[MAX_MENUSTACK]; + for(int i=0;i0) strcpy(m,menus[--sp]); } + } mstack; + +void +logoff(char *data) +{ + if(data==NULL || data[0]!='/') io.cls(); + + run_sdkfile("/I GOODBYE"); + showansascrip("GOODBYE"); + run_sdkfile("/I GOODBYE2"); + + LOG("User logged off"); + + if(io.baud) sleep(2); + + exit_proboard(); +} + +static void +gotomenu(char *data) +{ + String param[4]; + char newmenu[20]; + static int reg_counter = 0; + + if(reg_counter++ == 10) + { + CHECK_REG(); + reg_counter = 0; + } + + int n=parse_data(data,param); + + for(int i=0;i=user.msgArea;i--) + { + int area = ((i-1)%MsgArea::highAreaNum())+1; + if(!ma.read(area) || !check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot)) continue; + user.msgArea = area; + break; + } + break; + } + + user.msgArea =atoi(&(param[i][3])); + break; + } + case 'F': { + FileArea fa; + + if(param[i][3]=='+') + { + for(int i=user.fileArea+1;i<=user.fileArea+FileArea::highAreaNum();i++) + { + int area = ((i-1)%FileArea::highAreaNum())+1; + if(!fa.read(area) || !check_access(fa.level,fa.flags,fa.flagsNot)) continue; + user.fileArea = area; + break; + } + break; + } + + if(param[i][3]=='-') + { + for(int i=user.fileArea+FileArea::highAreaNum()-1;i>=user.fileArea;i--) + { + int area = ((i-1)%FileArea::highAreaNum())+1; + if(!fa.read(area) || !check_access(fa.level,fa.flags,fa.flagsNot)) continue; + user.fileArea = area; + break; + } + break; + } + + user.fileArea=atoi(&(param[i][3])); + break; + } + case 'P': { + char s[20]; + + io << '\n' << S_ENTER_MENU_PASSWORD; + io.read(s,15,READMODE_PWD); + io << "\n\xFF"; + + if(!s[0]) return; + + if(strcmpl(&(param[i][3]),s)) + { + LOG(1,"Wrong password for menu <%s> : %s",newmenu,strupr(s)); + io << '\n' << S_ACCESS_DENIED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + } + break; + } + } + else strcpy(newmenu,param[i]); + } + + strcpy(curmenu,newmenu); + + menuchanged = TRUE; +} + +static void +gosubmenu(char *data) +{ + mstack.push(curmenu); + gotomenu(data); + if(!menuchanged) mstack.pop(curmenu); +} + +static void +prevmenu(char *) +{ + mstack.pop(curmenu); + + menuchanged = TRUE; +} + +static void +gotomenu_clear(char *data) +{ + mstack.clear(); + gotomenu(data); +} + +#define MAX_ITEMS 255 + +struct menu_item + { + union { + char type; + char highlight; + }; + unsigned level; + AccessFlags flags; + char string[76]; + char key; + char data[81]; + byte color; + byte attr; + }; + +const byte MNU_RIP_SHOW_REMOTE = 1; +const byte MNU_RIP_HIDE_LOCAL = 2; +const byte MNU_RIP_NO_RESET = 4; + +static void nofunction(char *) {} + +void (*menufunctions[])(char *) = + { + (void (*)(char *)) nofunction, // function 0 -> niets!! raar maar waar + (void (*)(char *)) gotomenu, // function 1 -> goto menu + (void (*)(char *)) gosubmenu, // function 2 -> gosub menu + (void (*)(char *)) prevmenu, // function 3 -> previous menu + (void (*)(char *)) gotomenu_clear, // function 4 -> clear stack and goto menu + showansasc, // function 5 -> show ans/asc file + (void (*)(char *)) change_state, // function 6 -> change state (!!) + (void (*)(char *)) shell, // function 7 -> shell + (void (*)(char *)) version_info, // function 8 -> version information + (void (*)(char *)) logoff, // function 9 -> logoff + (void (*)(char *)) usage_graph, // function 10 -> system usage graph by hour + (void (*)(char *)) pagesysop, // function 11 -> Chat request + (void (*)(char *)) questionnaire, // function 12 -> questionnaire + (void (*)(char *)) user_list, // function 13 -> user list + (void (*)(char *)) time_stat, // function 14 -> time info + (void (*)(char *)) view_ans_wait, // function 15 -> View ans/asc and wait + (void (*)(char *)) city_change, // function 16 -> change city + (void (*)(char *)) password_change, // function 17 -> change password + (void (*)(char *)) lines_change, // function 18 -> change screen size + (void (*)(char *)) cls_toggle, // function 19 -> toggle clearscreen + (void (*)(char *)) pause_toggle, // function 20 -> toggle more prompt + (void (*)(char *)) ansi_toggle, // function 21 -> toggle ANSI graphics + (void (*)(char *)) mailcheck, // function 22 -> check for mail + (void (*)(char *)) readmsg, // function 23 -> read messages + (void (*)(char *)) scan_msg, // function 24 -> scan messages + (void (*)(char *)) qscan_msg, // function 25 -> qscan messages + (void (*)(char *)) days_graph, // function 26 -> usage graph by day + (void (*)(char *)) writemsg, // function 27 -> write a message + (void (*)(char *)) combined_select, // function 28 -> combined boards select + (void (*)(char *)) weeks_graph, // function 29 -> usage graph per week + (void (*)(char *)) raw_dir, // function 30 -> show directory + (void (*)(char *)) list_files, // function 31 -> list files + (void (*)(char *)) download, // function 32 -> download a file + (void (*)(char *)) upload, // function 33 -> upload a file + (void (*)(char *)) list_archive, // function 34 -> view archive + (void (*)(char *)) keyword_search, // function 35 -> keyword search + (void (*)(char *)) filename_search, // function 36 -> filename search + (void (*)(char *)) new_files, // function 37 -> show new files + (void (*)(char *)) view_file, // function 38 -> view a file + (void (*)(char *)) view_named_file, // function 39 -> display named file + (void (*)(char *)) nofunction, // function 40 -> display ans/asc w/hotkeys + (void (*)(char *)) fsed_toggle, // function 41 -> toggle fs-editor + (void (*)(char *)) hotkey_toggle, // function 42 -> toggle hotkeys + (void (*)(char *)) clearmarked, // function 43 -> clear marked messages + (void (*)(char *)) combined_clear, // function 44 -> reset combined boards + (void (*)(char *)) view_file_wait, // function 45 -> display textfile and wait + (void (*)(char *)) change_access, // function 46 -> Change Access (flags/level) + (void (*)(char *)) logentry, // function 47 -> make a log entry + (void (*)(char *)) tops, // function 48 -> Tops + (void (*)(char *)) set_msgarea, // function 49 -> Set msg-area + (void (*)(char *)) show_users_online,// function 50 -> show users online + (void (*)(char *)) lastcallers, // function 51 -> list last callers + (void (*)(char *)) usereditor, // function 52 -> toggle no-disturb + (void (*)(char *)) multichat, // function 53 -> multi-line chat + (void (*)(char *)) set_filearea, // function 54 -> Set File Area + (void (*)(char *)) view_gif, // function 55 -> View GIF type + (void (*)(char *)) ibm_toggle, // function 56 -> Toggle IBM chars + (void (*)(char *)) phone_change, // function 57 -> Change phone # + (void (*)(char *)) dataphone_change, // function 58 -> Change data phone # + (void (*)(char *)) handle_change, // function 59 -> Change handle + (void (*)(char *)) run_sdkfile, // function 60 -> Load a ProBoard SDK File + (void (*)(char *)) bulletin, // function 61 -> Show bulletin + (void (*)(char *)) toggle_avatar, // function 62 -> Toggle AVT/0 + (void (*)(char *)) toggle_avtplus, // function 63 -> Toggle AVT/0+ + (void (*)(char *)) show_graph, // function 64 -> Show general usage graph + (void (*)(char *)) showansascrip, // function 65 -> Show ANS/ASC/RIP w/hotkeys + (void (*)(char *)) ripfont_change, // function 66 -> Change RIP font + (void (*)(char *)) rip_toggle, // function 67 -> Toggle RIP graphics + (void (*)(char *)) edit_taglist, // function 68 -> Edit file tags + (void (*)(char *)) select_language, // function 69 -> Select a language + (void (*)(char *)) change_dateformat,// function 70 -> Change date format + (void (*)(char *)) change_address, // function 71 -> Change address + (void (*)(char *)) change_faxphone, // function 72 -> Change fax phone + (void (*)(char *)) change_country, // function 73 -> Change country + (void (*)(char *)) change_default_protocol, // function 74 -> Change default protocol + (void (*)(char *)) select_msggroup, // function 75 -> Select message area group + (void (*)(char *)) select_filegroup // function 76 -> Select file area group + }; + +static void _near +execute_function(MenuItem *item) +{ + rip_reset(); + + if( item->function>4 + && item->function != 23 + && item->function != 32 + && item->function != 33 + && !(item->attr & MNU_RIP_NO_RESET)) + { + rip_textmode(); + } + + if(item->attr & MENU_PASSWORD) + { + char s[20]; + + io << '\n' << S_ENTER_SELECTION_PASSWORD; + io.read(s,15,READMODE_PWD); + io << "\n\xFF"; + + if(!s[0]) return; + + if(stricmp(item->password,s)) + { + LOG(1,"Wrong password in menu <%s>",(char *)curmenu); + io << '\n' << S_ACCESS_DENIED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + } + + (*menufunctions[item->function])(replace_stringvars(item->data)); +} + +static char * near +colorstring(char col) +{ + char cols[] = { 0,4,2,6,1,5,3,7 }; + String s; + static char str[30]; + + str[0]=0; + + char fg=col&7; + char bg=(col&0x70)>>4; + char bright=!(col&8); + + if(avatar) + { + fg = cols[fg]; + bg = cols[bg]; + s << char(22) << char(1) << char(fg|(bg<<4)|(bright?8:0)); + strcpy(str,s); + + return str; + } + + if(!ansi_mode) return str; + + s="["; + if(bright) s << "1;"; + else s << "0;"; + + s << form("3%d;4%dm",fg,bg); + + strcpy(str,s); + + return str; +} + +static String near +translate_menutext(char *s,byte color,byte highlight,bool prompt) +{ + String str; + bool high = FALSE; + + if(*s == ';') return ""; + if(*s == '\0') return "\n"; + + str << colorstring(color); + + for(;*s;s++) + { + char c = *s; + + switch(c) + { + case '^': high = !high; + if(high) + str << colorstring(highlight); + else + str << colorstring(color); + break; + case '~': str << "@@"; + break; + case '`': str << "@@"; + break; + case '@': if(*(s+1)=='<' || (*(s-1))=='>') + str << '@'; + else + str << "@@"; + break; + case '\\': c = *(s+1); + if(c>='1' && c<='7') + { + str << char(c - '0'); + s++; + continue; + } + if(c=='0') + { + str << colorstring(color); + s++; + continue; + } + c = '\\'; + default : str << c; + } + } + + if(!prompt) + { + if(str[str.len()-1] == ';') str[str.len()-1] = '\0'; + else str << '\n'; + } + + return replace_stringvars(str); +} + + +static bool +menu_show_at_all(MenuItem *item , _MenuFile *prompt) +{ + return + ( (item->attr & MNU_RIP_SHOW_REMOTE) + || !(item->attr & MNU_RIP_HIDE_LOCAL) + || !rip_mode + || !prompt->attr + ); +} + +static bool +menu_show_local(MenuItem *item , _MenuFile *prompt) +{ + return + ( + !(item->attr & MNU_RIP_HIDE_LOCAL) + || !rip_mode + || !prompt->attr + ); +} + +static bool +menu_show_remote(MenuItem *item , _MenuFile *prompt) +{ + return ( + (item->attr & MNU_RIP_SHOW_REMOTE) + || !rip_mode + || !prompt->attr + ); +} + + +void +menu_processor() +{ + int i,j; + char hotkeys[MAX_ITEMS]; + File f; + _MenuFile *menufile = NULL; + MenuItem **items = NULL; + int numallocated = 0; + int numitems = 0; + int glob_numitems = 0; + + menufile = new _MenuFile; + + strcpy(curmenu,"TOP"); + + for(;;) + { + LOG(3,"Menu: %s",curmenu); + menuchanged = FALSE; + updatemenu = FALSE; + + if(f.open(FileName(cfg.mnupath,"GLOBAL.PBM"))) + { + glob_numitems = int((f.len() - sizeof(_MenuFile)) / sizeof(MenuItem)); + f.close(); + } + + if(!f.open(FileName(cfg.mnupath,curmenu,".PBM"))) + { + if(!strcmpl(curmenu,"TOP")) fatalerror("NO TOP MENU"); + mstack.clear(); + LOG("ERROR: Menu %s not found!",curmenu); + strcpy(curmenu,"TOP"); + continue; + } + + if(items != NULL) + { + for(i=0;icheckAccess()) + if(items[i]->hotKey>13 && items[i]->function) + hotkeys[j++] = toupper(items[i]->hotKey); + + hotkeys[j++]='\r'; + hotkeys[j++]=';'; + hotkeys[j]=0; + + for(;;) + { + char k; + + again: + + if(updatemenu) break; + + rip_reset(); + + k=toupper(comstack.pollnext()); + if(strchr(hotkeys,k) && k!=13 && k) + { + k=toupper(comstack.getnext()); + for(i=0;ihotKey && items[i]->checkAccess()) + { + if(!stack_mode) io << k << "\n\xFF"; + execute_function(items[i]); + if(menuchanged) break; + } + if(menuchanged) break; + + io << "\n\xFF"; + continue; + } + + io.disablestop(); + io << "\n\f\xFF"; + + if(menufile->attr) + show_rip(menufile->RIPname,FALSE); + + for(i=0;icheckAccess()) + continue; + + if(items[i]->function==40) + { + if(menu_show_at_all(items[i],menufile)) + { + if(!menu_show_local(items[i],menufile)) io.show_local = FALSE; + if(!menu_show_remote(items[i],menufile)) io.show_remote = FALSE; + + k=showansasc(replace_stringvars(items[i]->data),hotkeys); + + io.show_local = TRUE; + io.show_remote = TRUE; + + if(k>2) + { + io << " \7" << k << "\n\xFF"; + for(int j=0;jhotKey==k && items[j]->checkAccess()) + { + if(items[j]->function) execute_function(items[j]); + if(menuchanged) break; + } + + if(menuchanged) break; + goto again; + } + } + } + else if(items[i]->hotKey==1) + { + if(items[i]->function == 5 || items[i]->function == 38) + { + if(menu_show_at_all(items[i],menufile)) + { + if(!menu_show_local(items[i],menufile)) io.show_local = FALSE; + if(!menu_show_remote(items[i],menufile)) io.show_remote = FALSE; + + execute_function(items[i]); + + io.show_local = TRUE; + io.show_remote = TRUE; + } + } + else + { + execute_function(items[i]); + } + if(menuchanged) break; + } + + k=0; + + if(menu_show_at_all(items[i],menufile)) + { + if(!menu_show_local(items[i],menufile)) io.show_local = FALSE; + if(!menu_show_remote(items[i],menufile)) io.show_remote = FALSE; + + k = io.send(translate_menutext(items[i]->text, + items[i]->color, + menufile->highlight, + FALSE), + hotkeys); + + io.show_local = TRUE; + io.show_remote = TRUE; + } + + if(k==1) break; + + if(k>1) + { + io << " \7" << k << "\n\xFF"; + for(int j=0;jhotKey==k && items[j]->checkAccess()) + { + if(items[j]->function) execute_function(items[j]); + if(menuchanged) break; + } + + if(menuchanged) break; + + goto again; + } + } + + if(menuchanged) break; + + io << '\n' << translate_menutext(menufile->prompt, // hidden constructor + menufile->color, + menufile->highlight, + TRUE); + + if(!stack_mode) k=io.wait(hotkeys); + + if(k==';') io << "> "; + + if(k==';' || stack_mode) + { + if(k==';' || !strchr(hotkeys,k) || !k) + { + comstack.clear(); + + char command[60]; + io.read(command,59,READMODE_NOFIELD); + if(!command[0]) { command[0]='\r'; command[1]=0; } + io << "\n\xFF"; + k=toupper(command[0]); + if(!strchr(hotkeys,k)) k='\r'; + else comstack.parse(&command[1]); + } + } + + for(i=0;ihotKey && items[i]->checkAccess()) + { + if(!stack_mode) io << k << "\n\xFF"; + execute_function(items[i]); + if(menuchanged) break; + } + + if(menuchanged) break; + + io << "\n\xFF"; + } + } +} + diff --git a/MENU.OBJ b/MENU.OBJ new file mode 100644 index 0000000..ddea16f Binary files /dev/null and b/MENU.OBJ differ diff --git a/MISC.CPP b/MISC.CPP new file mode 100644 index 0000000..affa21b --- /dev/null +++ b/MISC.CPP @@ -0,0 +1,994 @@ +#include +#include +#include +#include +#include +#include +#include +#include "proboard.hpp" +#include "fossil.hpp" + + + +void logentry( char *data ) +{ + LOG("%s",data); +} + + + +static +void near dolog( int level, + char *str ) +{ + if ( + ( + ! io.baud && + ! cfg.loglocal + ) + || user.logLevel < level ) + { + return; + } + + + Date date( TODAY ); + Time time( NOW ); + + + File fp( "PROBOARD.LOG", + fmode_write | + fmode_text | + fmode_copen | + fmode_append ); + + fp.seek( fp.len() ); + + + fp.printf( "%02d-%s-%02d %02d:%02d:%02d %s\n", + date[ 0 ], + months_short[ date[ 1 ] ], + date[ 2 ] % 100, // Y2K FIXED! + // date[ 2 ], // Y2K BUG! + time[ 0 ], + time[ 1 ], + time[ 2 ], + str ); +} + + + +void LOG( char *str ... ) +{ + char s[ 200 ]; + va_list va; + + + va_start( va, str ); + + vsprintf( s, + str, + va ); + + dolog( 0, s ); +} + + + +void LOG( int level, + char *str ... ) +{ + char s[ 200 ]; + va_list va; + + + va_start( va, str ); + + vsprintf( s, + str, + va ); + + dolog( level, s ); +} + + + +void fatalerror( char *s ) +{ + String str( "Fatal error: " ); + + + str << s; + + LOG( "%s", (char *) str ); + + + if ( io.baud > 0 ) + { + io << "\n\n" + << S_FATAL_ERROR; + } + else + { + SCREEN << "\f\n\n" + << str + << '\n'; + } + + + fatal = TRUE; + + + exit( ERRLVL_FATALERR ); +} + + + +//---------------------- +// reset=-1 -> increment +//---------------------- + +int linecounter( int reset ) +{ + static int linecount = 0; + static bool continuous = FALSE; + + + if ( reset >= 0 ) + { + linecount = reset; + continuous = FALSE; + + return 0; + } + + + if ( ++linecount >= ( + ( + /* rip_mode + ? rip_screenlines: */ + user.screenLength + ) - 1 + ) + && !continuous + && pause_mode ) + { + char rep; + + + if ( io.more_func ) + { + rep = char( ( *io.more_func ) () ); + } + else + { + byte oldcolor = SCREEN.attrib(); + + + // if ( rip_mode ) + // { + // rip_show_more(); + // + // io.show_remote = FALSE; + // } + + + io << S_MORE; + + + int prompt_len = strlen( S_MORE ); + + + rep = wait_language_hotkeys( K_MORE ); + + + io << '\r' + << String( ' ', prompt_len ) + << '\r'; + + io.fullcolor( oldcolor ); + + io.show_remote = TRUE; + + + // if ( rip_mode ) + // { + // rip_clear_status(); + // rip_show_enter(); + // } + } + + + if ( rep == '\r' ) + { + rep = 0; + } + + + if ( rep == 2 ) + { + continuous = TRUE; + rep = 0; + } + + + linecount = 0; + + return rep; + } + + + return 0; +} + + + +int check_access( unsigned level, + AccessFlags flags ) +{ + if ( user.level < level ) + { + return 0; + } + + + for ( int i = 1; i <= 32; i++ ) + { + if ( flags.getflag( i ) ) + { + if ( ! user.aFlags.getflag( i ) ) + { + return 0; + } + } + } + + + return 1; +} + + + +int check_access( unsigned level, + AccessFlags flags, + AccessFlags notflags ) +{ + if ( user.level < level ) + { + return 0; + } + + + for ( int i = 1; i <= 32; i++ ) + { + if ( flags.getflag( i ) ) + { + if ( ! user.aFlags.getflag( i ) ) + { + return 0; + } + } + } + + + for ( i = 1; i <= 32; i++ ) + { + if ( notflags.getflag( i ) ) + { + if ( user.aFlags.getflag( i ) ) + { + return 0; + } + } + } + + + return 1; +} + + + +char *strstrl( char *s, + char *f ) +{ + int lf = strlen( f ); + int l = strlen( s ) - lf + 1; + + + for ( int i = 0; i < l; i++ ) + { + if ( ! memicmp( & s[ i ], + f, + lf ) ) + { + return & s[ i ]; + } + } + + + return NULL; +} + + + +int matchstring( char *s, + char *d ) +{ + for ( ; *s && *d; s++, d++ ) + { + switch ( *s ) + { + case '?': + + continue; + + + case '*': + + return 1; + + + default: + + if ( toupper( *s ) != toupper( *d ) ) + { + return 0; + } + } + } + + + if ( toupper( *s ) != toupper( *d ) && + *s!='*') + { + return 0; + } + else + { + return 1; + } +} + + + +int matchfile( char *search, + char *file ) +{ + String sbody; + String sext; + String fbody; + String fext; + + + while ( *search != '.' && + *search ) + { + sbody << *search++; + } + + + if ( ! *search++ ) + { + return 0; + } + + + while ( *search ) + { + sext << *search++; + } + + + while ( *file != '.' && + *file ) + { + fbody << *file++; + } + + + if ( ! *file++ ) + { + return 0; + } + + + while ( *file ) + { + fext << *file++; + } + + + if ( matchstring( sbody, fbody ) && + matchstring( sext, fext ) ) + { + return 1; + } + + + return 0; +} + + + +void strip_path( char *s ) +{ + int l = strlen( s ); + + + for ( int i = l - 1; i >= 0; i-- ) + { + if ( s[ i ] == '\\' || + s[ i ] == '/' ) + { + break; + } + } + + + if ( i >= 0 ) + { + memmove( s, + & s[ i + 1 ], + l - i ); + } +} + + + +void strip_fname( char *s ) +{ + int l = strlen( s ); + + + for ( int i = l - 1; i >= 0; i-- ) + { + if ( s[ i ] == '\\' || + s[ i ] == '/' ) + { + s[ i + 1 ] = '\0'; + + break; + } + } +} + + + +int parse_data( char *s, + String *param ) +{ + for ( int i = 0; ; i++ ) + { + int inquote = 0; + + + while ( *s == ' ' && + *s ) + { + s++; + } + + + if ( *s == '\0' ) + { + break; + } + + + param[ i ].clear(); + + + while ( *s ) + { + if ( *s == ' ' && + ! inquote ) + { + break; + } + + + if ( *s == '\"' ) + { + inquote = ! inquote; + + s++; + + continue; + } + + + param[ i ] << ( *s++ ); + } + } + + + return i; +} + + + +void adjust_limits() +{ + long kbgranted; + int i; + int j; + + + for ( i = 0; i < num_limits - 1; i++ ) + { + for ( j = i + 1; j < num_limits; j++ ) + { + if ( limit[ i ].level < limit[ j ].level ) + { + limits temp; + + + temp = limit[ i ]; + limit[ i ] = limit[ j ]; + limit[ j ] = temp; + } + } + } + + + for ( int n = -1; ; ) + { + for ( i = num_limits - 1; i >= 0; i-- ) + { + if ( user.level >= limit[ i ].level ) + { + n = i; + } + } + + + if ( n < 0 ) + { + return; + } + + + if ( limit[ n ].max_download && + user.kbDownloaded > limit[ n ].max_download ) + { + if ( user.level != limit[ n ].fallto ) + { + user.level = limit[ n ].fallto; + + continue; + } + } + + + if ( limit[ n ].factor ) + { + kbgranted = long( user.kbUploaded ) * 100L / + limit[ n ].factor + + long( user.msgsPosted ) * limit[ n ].msgfactor + + limit[ n ].free; + } + else + { + kbgranted = 0x7FFFFFFFL; + } + + + if ( user.kbDownloaded > kbgranted ) + { + if ( ! limit[ n ].factor ) + { + upload_needed = 0x7FFF; + } + else + { + upload_needed = int( ( + long( user.kbDownloaded ) - + kbgranted + ) + * limit[ n ].factor / 100 + ); + } + + + free_download = 0; + } + else + { + free_download = int( kbgranted - user.kbDownloaded ); + upload_needed = 0; + + + if ( free_download > limit[ n ].daily_klimit ) + { + free_download = limit[ n ].daily_klimit; + } + } + + + break; + } + + + time_limit = limit[ n ].timelimit; + download_limit = limit[ n ].daily_klimit; + download_delay = limit[ n ].pre_download; + + timer.changeleft( time_limit - + timer.used() - + user.timeUsed - + time_removed); + + updatemenu = TRUE; +} + + + +void change_access(char *data) +{ + String param[ 40 ]; + int n = parse_data( data, param ); + + + for ( int i = 0; i < n; i++ ) + { + param[ i ].upperCase(); + + + if ( + isalpha( param[ i ][ 0 ] ) || + ( + param[ i ][ 0 ] >= '1' && + param[ i ][ 0 ] <= '6' && + strchr( "+-", param[ i ][ 1 ] ) + ) + ) + { + int flag; + + + if ( isalpha( param[ i ][ 0 ] ) ) + { + flag = param[ i ][ 0 ] - 64; + } + else + { + flag = param[ i ][ 0 ] - '1' + 27; + } + + + if ( param[ i ][ 1 ] == '-' ) + { + user.aFlags.clearflag( flag ); + } + else + { + user.aFlags.setflag( flag ); + } + } + else + { + user.level = word( atol( param[ i ] ) ); + } + } + + + adjust_limits(); + timer.check(); + + updatemenu = TRUE; +} + + + +void file_error( int fn, + int errno ) +{ + String s( "Error accessing file " ); + + + switch ( abs( fn ) ) + { + case ERR_BINLOG_PB: + + s << FN_BINLOG_PB; + break; + + + case ERR_TIMELOG_PRO: + + s << FN_TIMELOG_PRO; + break; + + + case ERR_ONLINE_PRO: + + s << FN_ONLINE_PRO; + break; + + + case ERR_AKA_PRO: + + s << "AKA.PRO"; + break; + } + + + if ( errno ) + { + s << form( " (%d - %s)", + errno, + dos_error_message( errno ) ); + } + + + if ( fn < 0 ) + { + LOG( "%s", (char *) s ); + } + else + { + fatalerror( s ); + } +} + + + +void file_error( char *fn, + int errno ) +{ + String s( "Error accessing file " ); + + s << fn; + + + if ( errno ) + { + s << form( " (%d - %s)", + errno, + dos_error_message( errno ) ); + } + + + fatalerror( s ); +} + + + +void file_warning( char *fn, + int errno ) +{ + String s( "Error accessing file " ); + + s << fn; + + + if ( errno ) + { + s << form( " (%d - %s)", + errno, + dos_error_message( errno ) ); + } + + + LOG( s ); +} + + + +int intimewindow( Time t1, + Time t2 ) +{ + Time now( NOW ); + + + if ( t2 <= t1 ) + { + t2[ 0 ] += 24; + } + + + if ( now < t1 ) + { + now[ 0 ] += 24; + } + + + if ( now < t1 || + now > t2 ) + { + return 0; + } + else + { + return 1; + } +} + + + +char *dos_error_message( int errno ) +{ + static struct + { + int no; + char *msg; + } + errmsg[] = + { + { 1, "Invalid DOS call (SHARE not loaded?)" }, + { 2, "File not found" }, + { 3, "Directory not found" }, + { 4, "Too many open files" }, + { 5, "Access denied" }, + { 6, "Invalid handle" }, + { 7, "MCB destroyed" }, + { 8, "Not enough memory" }, + { 0, "" } + }; + + + for ( int i = 0; errmsg[ i ].no; i++ ) + { + if ( errno == errmsg[ i ].no ) + { + break; + } + } + + + return errmsg[ i ].msg; +} + + + + +//************************************************************************** +// +// Parse a date string for the current locale +// +// Prototype: void parse_date( Date &d, char *s, int format ); +// +// Parameters: d ... Date value to fill-in +// s ... String containing date data to parse +// format ... Desired date locale +// +// Returns: None +// +// Remarks: +// +// This routine parses a date string, and returns the appropriate values in +// the date value . +// +// Remember: +// +// d[0] ... day +// d[1] ... month +// d[2] ... year (-1900) +// +// Year value are between 0 to 127. This means that a ProBoard Date object +// can store a year value from 1900 to 2027. +// +// ------------------------------------------------------------------------- +// +// Created on: ??/??/?? (Philippe Leybaert) +// Last modified: 06/17/99 (Jeff Reeder) +// Modified to handle dates in 10-byte formats for Y2K +// compliance. Fixed a MAJOR bug in this routine where the +// original code didn't check for a proper sequence of +// three delimited numeric values. Also modified this code +// to properly handle two-byte years. +// +//************************************************************************** + +void parse_date( Date &d, + char *s, + int format ) +{ + char str[ 11 ]; + + + strncpy( str, + s, + 10 ); + + str[ 10 ] = '\0'; + + + char *fmt = date_formats[ format ]; + int fmt_ar[ 3 ]; + + + fmt_ar[ 0 ] = 0; + fmt_ar[ 1 ] = 0; + fmt_ar[ 2 ] = 0; + + + //------------------------------------------------------- + // Figure out what sequence the M/D/Y values should be in + //------------------------------------------------------- + + if ( toupper( fmt[ 0 ] == 'D' ) ) fmt_ar[ 0 ] = DATE_DAY; + if ( toupper( fmt[ 0 ] == 'M' ) ) fmt_ar[ 0 ] = DATE_MONTH; + if ( toupper( fmt[ 0 ] == 'Y' ) ) fmt_ar[ 0 ] = DATE_YEAR; + + if ( toupper( fmt[ 3 ] == 'D' ) ) fmt_ar[ 1 ] = DATE_DAY; + if ( toupper( fmt[ 3 ] == 'M' ) ) fmt_ar[ 1 ] = DATE_MONTH; + if ( toupper( fmt[ 3 ] == 'Y' ) ) fmt_ar[ 1 ] = DATE_YEAR; + + if ( toupper( fmt[ 6 ] == 'D' ) ) fmt_ar[ 2 ] = DATE_DAY; + if ( toupper( fmt[ 6 ] == 'M' ) ) fmt_ar[ 2 ] = DATE_MONTH; + if ( toupper( fmt[ 6 ] == 'Y' ) ) fmt_ar[ 2 ] = DATE_YEAR; + + + //-------------------------- + // Initialize our date value + //-------------------------- + + d.set( 0, + 0, + 0 ); + + + //------------------------- + // Find our first delimiter + //------------------------- + + s = strtok( str, "-/." ); + + + if ( s ) + { + int val; + + + val = atoi( s ); + + + if ( fmt_ar[ 0 ] == DATE_YEAR ) + { + d[ fmt_ar[ 0 ] ] = NormalizeYear( val ); + } + else + { + d[ fmt_ar[ 0 ] ] = val; + } + + + s = strtok( NULL, "-/." ); + + + if ( s ) + { + val = atoi( s ); + + + if ( fmt_ar[ 1 ] == DATE_YEAR ) + { + d[ fmt_ar[ 1 ] ] = NormalizeYear( val ); + } + else + { + d[ fmt_ar[ 1 ] ] = val; + } + + + s = strtok( NULL, "-/." ); + + + if ( s ) + { + val = atoi( s ); + + + if ( fmt_ar[ 2 ] == DATE_YEAR ) + { + d[ fmt_ar[ 2 ] ] = NormalizeYear( val ); + } + else + { + d[ fmt_ar[ 2 ] ] = val; + } + } + } + } +} diff --git a/MISC.OBJ b/MISC.OBJ new file mode 100644 index 0000000..75f9399 Binary files /dev/null and b/MISC.OBJ differ diff --git a/MODEM.CPP b/MODEM.CPP new file mode 100644 index 0000000..f896d76 --- /dev/null +++ b/MODEM.CPP @@ -0,0 +1,741 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include +#include +#include + +#include "fossil.hpp" +#include "desqview.hpp" +#include "proboard.hpp" + + + +#define STAT_LINE_Y 20 +#define LAST_CALLER_Y 16 + +#define EVENT_LABEL 0x5F +#define EVENT_DATA 0x5E + +#define TITLE_COLOR 0x71 +#define LABEL_COLOR 0x70 + +static void +fos_sendbreak(int port) +{ + fos_break(port,TRUE); + + unsigned long ticks = clockticks(); + while(clockdiff(ticks)<2) {} + + fos_break(port,FALSE); +} + +struct modem_config : _ModemConfig {}; + +class modem + { + int port; + long baud; + int delay; + public: + modem(int p,long b); + ~modem() + { + fos_deinit(port); + } + void set_delay(int d) + { + delay = d; + } + void cmd(char *s); + bool check_response(String& s); + }; + +modem::modem(int p,long b) +{ + byte baudcode = 0; + + port = p; + baud = b; + + fos_init(port); + + switch(baud) + { + case 300L: baudcode = 0x43; break; + case 1200L: baudcode = 0x83; break; + case 2400L: baudcode = 0xA3; break; + case 4800L: baudcode = 0xC3; break; + case 9600L: baudcode = 0xE3; break; + case 19200L: baudcode = 0x03; break; + case 38400L: baudcode = 0x23; break; + } + + fos_setbps(port,baudcode); +} + +void +modem::cmd(char *s) +{ + for(;*s;s++) + { + char c = *s; + + switch(c) + { + case '~': ::delay(500); + break; + case '`': + case '': + case 'v': fos_setdtr(port,0); + break; + case '^': fos_setdtr(port,1); + break; + case '$': fos_sendbreak(port); + break; + case '|': c = '\r'; + default : fos_sendnw(port,c); + if(delay) + ::delay(delay*100); + } + } +} + +bool +modem::check_response(String& s) +{ + static String resp; + + if(!fos_byteready(port)) + { + return FALSE; + } + + byte c = fos_getch(port); + + if(c == '\r') + { + s = resp; + resp.clear(); + + return (s[0]) ? TRUE:FALSE; + } + + if(c != '\n') resp << char(c); + + return FALSE; +} + +const int STATUS_WAITING_FOR_CALL = 0; +const int STATUS_INITIALIZING = 1; +const int STATUS_WAITING_FOR_OK = 2; + + +bool +do_modem(modem_response *response) +{ + tsw_fillscreen( '±', 0x19 ); + + Window dlg_win( 3, + 2, + 76, + 22, + 0x70, + SHADOW, + CHISEL_BORDER, + 0x7F, + NULL, + 0x78 ); + + Window bar_win( 1, + tsw_vsize, + tsw_hsize, + tsw_vsize, + 0x4F, + NOBORDER|NOSAVE, + NULL ); + + Window stat_win( 6, + 19, + 73, + 21, + 0x0E, // Inner color + NOSAVE, + RECESS_BORDER, + 0x08, // Bright color + NULL, + 0x0F, // Dark color + 0x70 ); // Outer color + + Window lc_win( 6, + 15, + 73, + 17, + 0x1F, + NOSAVE, + RECESS_BORDER, + 0x08, + NULL, + 0x0F, + 0x70 ); + + + Window resp_win( 6, + 8, + 28, + 13, + 0x30, + NOSAVE, + RECESS_BORDER, + 0x08, + NULL, + 0x0F, + 0x70 ); + + Window event_win( 30, + 8, + 73, + 13, + EVENT_LABEL, + NOSAVE, + RECESS_BORDER, + 0x08, + NULL, + 0x0F, + 0x70 ); + + dlg_win.ShadowColor( 0x10 ); + + dlg_win.open(); + resp_win.open(); + lc_win.open(); + stat_win.open(); + event_win.open(); + bar_win.open(); + + + if ( registered ) + { + tsw_centerline( 3, + form( "ProBoard v%s (Node %d - S/N=%s)", + VERSION, + (int) node_number, + software_serial_number() ), + TITLE_COLOR ); + } + else + { + tsw_centerline( 3, + form( "ProBoard v%s [Node %d - UNREGISTERED for %d day%s]", + VERSION, + (int) node_number, + pastFirstUse, + ( pastFirstUse == 1 ) + ? "" + : "s" ), + TITLE_COLOR ); + } + + tsw_centerline( 4, + "Copyright (c) 1990-1999 TeleGrafix Communications, Inc.", + TITLE_COLOR ); + + tsw_centerline( 5, + "All Rights Reserved", + TITLE_COLOR ); + + tsw_maputs( 4, + 6, + 0x7F, + "Ã" ); + + tsw_maputs( 5, + 6, + 0x78, + "ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´" ); + + tsw_centerline( 14, "Last Caller" ); + tsw_centerline( 18, "Current Status" ); + + modem_config *modem_cfg = new modem_config; + CLEAR_OBJECT(*modem_cfg); + + File f; + + if(!f.open(FileName(syspath,form("MODEM%03d.PB",node_number)))) + if(!f.open(FileName(syspath,"MODEM.PB"))) + { + LOG("Unable to open MODEM.PB"); + delete modem_cfg; + return FALSE; + } + + + f.read(modem_cfg,sizeof(modem_config)); + f.close(); + + modem_cfg->port--; + + if(response->baud) modem_cfg->maxBps = response->baud; + if(response->port>=0) modem_cfg->port = response->port; + + tsw_maputs( 8, + 7, + LABEL_COLOR, + form( "Modem COM%d/%ld bps", + modem_cfg->port + 1, + modem_cfg->maxBps ) ); + + tsw_maputs( 43, + 7, + LABEL_COLOR, + "System Statistics" ); + + response->port = modem_cfg->port; + + modem modem(modem_cfg->port,(modem_cfg->flags & MODEM_LOCKED) ? 38400L : modem_cfg->maxBps); + + modem.set_delay(modem_cfg->commandDelay); + + tsw_cursoroff(); + + stat_win.clear(); + tsw_centerline(STAT_LINE_Y,"Initializing modem",0xE); + + event_win.attrib( EVENT_LABEL ); + event_win << "\n # Calls: "; + + event_win.attrib( EVENT_DATA ); + event_win << form( "%-6ld ", totalcalls ); + + event_win.attrib( EVENT_LABEL ); + event_win << "# Users: "; + + event_win.attrib( EVENT_DATA ); + event_win << form( "%d\n", num_users ); + + event_win.attrib( EVENT_LABEL ); + event_win << "# Hudson Msgs: "; + + event_win.attrib( EVENT_DATA ); + event_win << form( "%-5ld\n", msgbase.totalMsgs() ); + + event_win.attrib( EVENT_LABEL ); + + if ( lastcaller.name && + *lastcaller.name ) + { + tsw_centerline( LAST_CALLER_Y, + form( "%s (%02d:%02d to %02d:%02d)", + lastcaller.name, + lastcaller.timeIn[ 0 ], + lastcaller.timeIn[ 1 ], + lastcaller.timeOut[ 0 ], + lastcaller.timeOut[ 1 ] ), + 0x1E ); + } + else + { + tsw_centerline( LAST_CALLER_Y, + form( "(%02d:%02d to %02d:%02d)", + lastcaller.timeIn[ 0 ], + lastcaller.timeIn[ 1 ], + lastcaller.timeOut[ 0 ], + lastcaller.timeOut[ 1 ] ), + 0x1E ); + } + + + time_t start_time = time(NULL); + + time_t init_sent = 0; + int init_tries = 0; + bool initialized = FALSE; + bool blanked = FALSE; + + bool init1_ok; + bool init2_ok; + bool init3_ok; + + bool init1_sent = FALSE; + bool init2_sent = FALSE; + bool init3_sent = FALSE; + + time_t blank_start = time(NULL); + + word *blank_buf = new word[tsw_vsize*tsw_hsize]; + + for(;;) + { + String s; + Date date(TODAY); + Time time(NOW); + + if(!blanked) + { + bar_win.direct( 57, + 1, + 0x4E, + form( "%02d:%02d:%02d", + time[ 0 ], + time[ 1 ], + time[ 2 ] ) ); + + bar_win.direct( 66, + 1, + 0x4E, + form( "- %02d %s %d ", + date[ 0 ], + months_short[ date[ 1 ] ], + date[ 2 ] + 1900 ) ); // Y2K OKAY! + + event_win.setPos(1,1); + + event_win.attrib( EVENT_LABEL ); + event_win << " Next Event: "; + + event_win.attrib( EVENT_DATA ); + + if ( nextevent.enabled ) + { + event_win << form( "%s %02d:%02d (%d min) ",days_short[nextevent.nextday()],nextevent.start[0],nextevent.start[1],nextevent.minutesleft()); + } + else + { + event_win << "-NONE-"; + } + + event_win.attrib( EVENT_LABEL ); + event_win << "\n\n\n Time idle: "; + + event_win.attrib( EVENT_DATA ); + event_win << form( "%ld min", (::time(NULL)-start_time)/60); + } + + + if(init_sent && (::time(NULL)-init_sent)>5 && !initialized) + { + if(!blanked) stat_win.clear(); + + if(init_tries>3) + { + if(!blanked) tsw_centerline(STAT_LINE_Y,"Unable to initialize modem",0xE); + response->port = -1; + break; + } + + if(!blanked) tsw_centerline(STAT_LINE_Y,form("Unable to initialize modem. Retrying (Try #%d)",init_tries+1),0x8E); + + initialized = FALSE; + init1_sent = FALSE; + init2_sent = FALSE; + init3_sent = FALSE; + init_sent = 0; + } + + if(!initialized) + { + if(!init1_sent) + { + if(modem_cfg->cmdInit1[0]) + { + modem.cmd(modem_cfg->cmdInit1); + + init1_ok = FALSE; + } + + init1_sent = TRUE; + init_sent = ::time(NULL); + } + + if(!init2_sent && init1_ok) + { + if(modem_cfg->cmdInit2[0]) + { + modem.cmd(modem_cfg->cmdInit2); + + init2_ok = FALSE; + } + else + { + init2_ok = TRUE; + } + + init2_sent = TRUE; + init_sent = ::time(NULL); + } + + if(!init3_sent && init2_sent && init2_ok) + { + if(modem_cfg->cmdInit3[0]) + { + modem.cmd(modem_cfg->cmdInit3); + + init3_ok = FALSE; + } + else + { + init3_ok = TRUE; + } + + init3_sent = TRUE; + init_sent = ::time(NULL); + + init_tries++; + } + } + + if(!initialized && init1_ok && init2_ok && init3_ok) + { + initialized = TRUE; + + stat_win.clear(); + tsw_centerline(STAT_LINE_Y,"Waiting for a call",0xE); + + bar_win.direct( 3, 1, 0x4E, "Alt-L" ); + bar_win.direct( 8, 1, 0x4F, "=Local" ); + + bar_win.direct( 16, 1, 0x4E, "Alt-J" ); + bar_win.direct( 21, 1, 0x4F, "=Jump to DOS" ); + + bar_win.direct( 35, 1, 0x4E, "Esc" ); + bar_win.direct( 38, 1, 0x4F, "=Exit" ); + + + //---------------------------------------------- + // This line of code is used to show the current + // screen saver timeout (debuging only) + //---------------------------------------------- + + //bar_win.direct( 50, 1, form( "%ld", (long) modem_cfg->blankTime ) ); + } + + + if(init_sent && (::time(NULL)-init_sent) > 300) + { + initialized = FALSE; + init1_sent = FALSE; + init2_sent = FALSE; + init3_sent = FALSE; + init_sent = 0; + init_tries = 0; + } + + + if(modem.check_response(s)) + { + s << '|'; + + if(blanked) + { + tsw_puttext(blank_buf,1,1,tsw_hsize,tsw_vsize); + blanked = FALSE; + blank_start = ::time(NULL); + } + + if(init1_sent && !init1_ok && s==modem_cfg->cmdInit1) + continue; + if(init2_sent && !init2_ok && s==modem_cfg->cmdInit2) + continue; + if(init3_sent && !init3_ok && s==modem_cfg->cmdInit3) + continue; + + s.delLast(); + resp_win << form("%-17.17s",(char *)s) << '\n'; + s << '|'; + + if(strstr(s,modem_cfg->msgOk) && !initialized) + { + if(init1_sent && !init1_ok) + init1_ok = TRUE; + if(init2_sent && !init2_ok) + init2_ok = TRUE; + if(init3_sent && !init3_ok) + init3_ok = TRUE; + } + + + if(initialized) + { + String connect = s; + long baud = 0; + + if(modem_cfg->msgRing[0] && strstr(connect,modem_cfg->msgRing) && (modem_cfg->flags & MODEM_MANUAL_ANSWER)) + { + modem.cmd(modem_cfg->cmdAnswer); + } + + if(!baud && modem_cfg->userConBps1 && strstr(connect,modem_cfg->msgConUser1) && modem_cfg->msgConUser1[0]) baud = modem_cfg->userConBps1; + if(!baud && modem_cfg->userConBps2 && strstr(connect,modem_cfg->msgConUser2) && modem_cfg->msgConUser2[0]) baud = modem_cfg->userConBps2; + if(!baud && modem_cfg->userConBps3 && strstr(connect,modem_cfg->msgConUser3) && modem_cfg->msgConUser3[0]) baud = modem_cfg->userConBps3; + if(!baud && modem_cfg->userConBps4 && strstr(connect,modem_cfg->msgConUser4) && modem_cfg->msgConUser4[0]) baud = modem_cfg->userConBps4; + if(!baud && modem_cfg->userConBps5 && strstr(connect,modem_cfg->msgConUser5) && modem_cfg->msgConUser5[0]) baud = modem_cfg->userConBps5; + if(!baud && modem_cfg->userConBps6 && strstr(connect,modem_cfg->msgConUser6) && modem_cfg->msgConUser6[0]) baud = modem_cfg->userConBps6; + + if(!baud && strstr(connect,modem_cfg->msgCon115200)&& modem_cfg->msgCon115200[0])baud = 115200L; + if(!baud && strstr(connect,modem_cfg->msgCon64000) && modem_cfg->msgCon64000[0]) baud = 64000L; + if(!baud && strstr(connect,modem_cfg->msgCon57600) && modem_cfg->msgCon57600[0]) baud = 57600L; + if(!baud && strstr(connect,modem_cfg->msgCon38400) && modem_cfg->msgCon38400[0]) baud = 38400L; + if(!baud && strstr(connect,modem_cfg->msgCon36000) && modem_cfg->msgCon36000[0]) baud = 36000L; + if(!baud && strstr(connect,modem_cfg->msgCon33600) && modem_cfg->msgCon33600[0]) baud = 33600L; + if(!baud && strstr(connect,modem_cfg->msgCon31200) && modem_cfg->msgCon31200[0]) baud = 31200L; + if(!baud && strstr(connect,modem_cfg->msgCon28800) && modem_cfg->msgCon28800[0]) baud = 28800L; + if(!baud && strstr(connect,modem_cfg->msgCon26400) && modem_cfg->msgCon26400[0]) baud = 26400L; + if(!baud && strstr(connect,modem_cfg->msgCon24000) && modem_cfg->msgCon24000[0]) baud = 24000L; + if(!baud && strstr(connect,modem_cfg->msgCon21600) && modem_cfg->msgCon21600[0]) baud = 21600L; + if(!baud && strstr(connect,modem_cfg->msgCon19200) && modem_cfg->msgCon19200[0]) baud = 19200L; + if(!baud && strstr(connect,modem_cfg->msgCon16800) && modem_cfg->msgCon16800[0]) baud = 16800L; + if(!baud && strstr(connect,modem_cfg->msgCon14400) && modem_cfg->msgCon14400[0]) baud = 14400L; + if(!baud && strstr(connect,modem_cfg->msgCon12000) && modem_cfg->msgCon12000[0]) baud = 12000L; + if(!baud && strstr(connect,modem_cfg->msgCon9600 ) && modem_cfg->msgCon9600[0] ) baud = 9600L; + if(!baud && strstr(connect,modem_cfg->msgCon7200 ) && modem_cfg->msgCon7200[0] ) baud = 7200L; + if(!baud && strstr(connect,modem_cfg->msgCon4800 ) && modem_cfg->msgCon4800[0] ) baud = 4800L; + if(!baud && strstr(connect,modem_cfg->msgCon2400 ) && modem_cfg->msgCon2400[0] ) baud = 2400L; + if(!baud && strstr(connect,modem_cfg->msgCon1200 ) && modem_cfg->msgCon1200[0] ) baud = 1200L; + if(!baud && strstr(connect,modem_cfg->msgCon1275 ) && modem_cfg->msgCon1275[0] ) baud = 1200L; + if(!baud && strstr(connect,modem_cfg->msgCon300 ) && modem_cfg->msgCon300[0] ) baud = 300L; + + if(baud) + { + stat_win.clear(); + tsw_centerline(STAT_LINE_Y,form("Incoming call at %ld bps",baud),0xE); + response->baud = baud; + break; + } + + if(modem_cfg->msgConExternal[0] && strstr(connect,modem_cfg->msgConExternal)) + { + SCREEN.clear(); + modem.modem::~modem(); + exit(modem_cfg->externalErrorLevel); + } + } + } + + if ( modem_cfg->blankTime && + ! blanked && + ( ::time( NULL ) - blank_start ) > modem_cfg->blankTime ) + { + tsw_gettext(blank_buf,1,1,tsw_hsize,tsw_vsize); + tsw_fillscreen(' ',0); + blanked = TRUE; + } + + if( nextevent.minutesleft()==0 && nextevent.start[0]==time[0] + && nextevent.start[1]==time[1] && time[2]<=1 + && nextevent.node == node_number) + { + modem.modem::~modem(); + SCREEN.clear(); + + + if(nextevent.type) + { + String s = "*=*Q*N*C /C "; + s << nextevent.command; + shell(s); + exit(0); + } + else + { + exit(nextevent.errorlevel); + } + } + + if(KB.hit()) + { + if(blanked) + { + tsw_puttext(blank_buf,1,1,tsw_hsize,tsw_vsize); + blanked = FALSE; + blank_start = ::time(NULL); + } + + KEY k=KB.get(); + + if(k==KEY_ALTL) + { + stat_win.clear(); + tsw_centerline(STAT_LINE_Y,"Local login",0xE); + modem.cmd(modem_cfg->cmdOffHook); + response->baud = 0; + sleep(1); + break; + } + + if(k==KEY_ESC) + { + stat_win.clear(); + tsw_centerline(STAT_LINE_Y,"Exit",0xE); + modem.cmd(modem_cfg->cmdDown); + sleep(1); + modem.modem::~modem(); + SCREEN.clear(); + exit(99); + } + + if(k==KEY_ALTJ) + { + tsw_gettext(blank_buf,1,1,tsw_hsize,tsw_vsize); + tsw_cursoron(); + SCREEN.clear(); + modem.cmd(modem_cfg->cmdOffHook); + shell("*X*C*N*Q"); + tsw_cursoroff(); + tsw_puttext(blank_buf,1,1,tsw_hsize,tsw_vsize); + + initialized = FALSE; + init1_sent = FALSE; + init2_sent = FALSE; + init3_sent = FALSE; + init_sent = 0; + init_tries = 0; + } + } + + if(!access(form("%sDOWN.%d",syspath,node_number),0)) + { + stat_win.clear(); + tsw_centerline(STAT_LINE_Y,"Going down on external request",0xE); + LOG("Going down on external request"); + + modem.cmd(modem_cfg->cmdDown); + sleep(1); + modem.modem::~modem(); + SCREEN.clear(); + + File f; + f.open(form("%sISDOWN.%d",syspath,node_number),fmode_create|fmode_write); + f.close(); + + exit(100); + } + + static int timeslice_count = 0; + + if(!(++timeslice_count % 20)) + DV_timeslice(); + } + + + tsw_cursoron(); + + delete modem_cfg; + delete [] blank_buf; + + bar_win.close(); + resp_win.close(); + lc_win.close(); + stat_win.close(); + event_win.close(); + dlg_win.close(); + + SCREEN.clear(); + + return (response->port<0) ? FALSE:TRUE; +} + diff --git a/MODEM.OBJ b/MODEM.OBJ new file mode 100644 index 0000000..d4f95b3 Binary files /dev/null and b/MODEM.OBJ differ diff --git a/MSG.CPP b/MSG.CPP new file mode 100644 index 0000000..bd35e6d --- /dev/null +++ b/MSG.CPP @@ -0,0 +1,679 @@ +#define Use_MsgBase + +#include +#include +#include +#include "proboard.hpp" + + + +Message::Message( int n ) +{ + clear(); + + msgArea = new MsgArea; + + + if ( n ) + { + msgArea->read( n ); + } +} + + + +Message::Message( Message *p, + int n ) +{ + if ( p != this ) + { + memcpy( this, + p, + sizeof( *p ) ); + } + + + msgArea = new MsgArea; + + + if ( n ) + { + msgArea->read( n ); + } +} + + + +void Message::clear() +{ + MsgArea *ma = msgArea; + + CLEAR_OBJECT( *this ); + + msgArea = ma; +} + + + +Message::~Message() +{ + delete msgArea; +} + + + +bool Message::readAccess() +{ + if ( ! check_access( msgArea->readLevel, + msgArea->readFlags, + msgArea->readFlagsNot ) && + + !msgArea->sysopAccess() ) + { + return FALSE; + } + + + if ( attr & MSGATTR_PRIVATE ) + { + return ! ( strcmpl( to, user.name ) && + strcmpl( from, user.name ) && + ( + strcmpl( to, user.alias ) || + ! msgArea->flags + ) + && + ( + strcmpl( from, user.alias ) || + ! msgArea->flags + ) + && + ! msgArea->sysopAccess() ); + } + else + { + return TRUE; + } +} + + + +int Message::areaNum() +{ + return msgArea->areaNum; +} + + + +bool Message::setArea( int n ) +{ + bool r = msgArea->read( n ); + + + if ( ! r ) + { + msgArea->areaNum = 0; + } + + + return r; +} + + + +bool Message::read( long n, + int a ) +{ + if ( a ) + { + if ( ! msgArea->read( a ) ) + { + return FALSE; + } + } + + + long actual_n = msgBase()->readMsg( *this, n ); + + + return ( n == actual_n ) + ? TRUE + : FALSE; +} + + + +void Message::setFlag( dword msgflag ) +{ + if ( msgflag & MSGATTR_RECEIVED ) + { + recvDate.today(); + recvTime.now(); + } + + + attr |= msgflag; + + msgBase()->updateMsg( *this ); +} + + + +void Message::clearFlag( dword msgflag ) +{ + attr &= ~msgflag; + + msgBase()->updateMsg( *this ); +} + + + +void Message::toggleFlag( dword msgflag ) +{ + attr ^= msgflag; + + msgBase()->updateMsg( *this ); +} + + + +void clearmarked( char * ) +{ + markedmsglist.clear(); + + + io << "\n\n" + << S_UNMARKED_ALL_MESSAGES + << ' ' + << S_PRESS_ENTER_TO_CONTINUE; +} + + + +void Message::addOrigin() +{ + aka a; + bool echo_area = FALSE; + + File fo; + File fi( "MSGTMP", fmode_text ); + + + if ( ! fi.opened() ) + { + return; + } + + + fo.open( "MSGTMP.$$$", + fmode_create | fmode_text ); + + + if ( msgArea->msgKind == MSG_NET ) + { + a.read( msgArea->aka ); + + origZone = a.zone; + origNet = a.net; + origNode = a.node; + origPoint = a.point; + + + if ( msgArea->msgBaseType != MSGBASE_JAM ) + { + if ( origPoint ) + { + fo << form( "\1FMPT %d\n", + origPoint ); + } + + + if ( destPoint ) + { + fo << form( "\1TOPT %d\n", + destPoint ); + } + } + } + + + if ( msgArea->msgKind == MSG_ECHO || + msgArea->msgKind == MSG_PVTECHO ) + { + a.read( msgArea->aka ); + + origZone = destZone = a.zone; + origNet = destNet = a.net; + origNode = destNode = a.node; + origPoint = destPoint = a.point; + + echo_area = TRUE; + } + + + bool blankline = FALSE; + + + for ( ; ; ) + { + String line; + String copiedline; + + + line = fi.readLine(); + + + if ( line[ 0 ] == '\0' ) + { + break; + } + + + line.delLast( '\n' ); + + copiedline = line; + + copiedline.trim(); + + + if ( line.len() >= 4 ) + { + if ( ! strncmp( copiedline, + "--- ", + 4 ) ) + { + //------------------- + // Get rid of tagline + //------------------- + + break; + } + + + if ( ! strncmp( copiedline, + "* Origin", + 8 ) ) + { + //------------------------ + // Stop when *Origin found + //------------------------ + + break; + } + } + + + if ( ! strcmp( copiedline, "---" ) ) + { + line.clear(); + } + + + if ( line[ 0 ] != '\x01' ) + { + fo << line + << '\n'; + } + + + blankline = ( line[ 0 ] == '\0' ); + } + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if ( ! registered && + ( + pastFirstUse < 0 || + pastFirstUse > 60 + ) + ) + { + if ( pastFirstUse < 0 ) + { + pastFirstUse = 61; + } + + + if ( ! blankline ) + { + fo << '\n'; + } + + + char *unr_str = "...This copy of ProBoard has been unregistered for %d days!\n\n"; + + + if ( crc32( unr_str ) != 0xB3328DC5L ) + { + exit_proboard(); + } + + + fo << form( unr_str, pastFirstUse ); + + blankline = TRUE; + } + + + if ( echo_area ) + { + if ( ! blankline ) + { + fo << '\n'; + } + + + fo << "--- ProBoard v" TEARVERSION; + + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if ( registered ) + { + fo << " [Reg]"; + } + else + { + fo << " [EVALUATION]"; + } + + + fo << "\n * Origin: "; + + + if ( msgArea->origin[ 0 ] ) + { + fo << msgArea->origin; + } + else + { + fo << cfg.originline; + } + + + fo << form( " (%d:%d/%d", + a.zone, + a.net, + a.node ); + + if ( a.point ) + { + fo << form( ".%d)\n", a.point ); + } + else + { + fo << ")\n"; + } + } + + + fo.close(); + fi.close(); + + + unlink( "MSGTMP" ); + rename( "MSGTMP.$$$", "MSGTMP" ); +} + + + +long Message::add() +{ + attr |= MSGATTR_LOCAL; + + + switch ( msgArea->msgKind ) + { + case MSG_NET: + + attr |= MSGATTR_NETMAIL; + + break; + + + case MSG_PVTECHO: + case MSG_ECHO: + + attr |= MSGATTR_ECHOMAIL; + + break; + } + + + addOrigin(); + + + if ( msgArea->tag[ 0 ] ) + { + File f( FileName( syspath, "ECHOTOSS.LOG" ), + fmode_text | + fmode_copen | + fmode_rw | + fmode_append ); + + + if ( f.opened() ) + { + f << msgArea->tag + << '\n'; + } + } + + + long n = msgBase()->appendMsg( *this ); + + + if ( n < 1 ) + { + return -1; + } + + + switch ( msgArea->msgKind ) + { + case MSG_NET: + + net_entered++; + + break; + + + case MSG_PVTECHO: + case MSG_ECHO: + + echo_entered++; + + break; + } + + + return n; +} + + + +void Message::addReply( Message &org ) +{ + Message msg( org.areaNum() ); + long n = org.id; + + + if ( ! msg.read( n ) ) + { + return; + } + + + while ( msg.next ) + { + if ( ! msg.read( msg.next ) ) + { + break; + } + } + + + prev = msg.id; + + msgBase()->updateMsg( *this ); + + + msg.next = id; + + msg.msgBase()->updateMsg( msg ); +} + + + +void Message::delReply() +{ + Message msg( areaNum() ); + + + if ( prev ) + { + if ( msg.read( prev ) ) + { + msg.next = next; + + msg.msgBase()->updateMsg( msg ); + } + } + + + if ( next ) + { + if ( msg.read( next ) ) + { + msg.prev = prev; + + msg.msgBase()->updateMsg( msg ); + } + } + + + if ( next || + prev ) + { + next = 0; + prev = 0; + + msgBase()->updateMsg( *this ); + } +} + + + +int Message::pointNum( int mode ) +{ + if ( msgArea->msgBaseType != MSGBASE_HUDSON ) + { + if ( mode ) + { + return destPoint; + } + else + { + return origPoint; + } + } + + + String s; + int inkludge = 0; + bool msgdone = FALSE; + + + for ( long txt_off = 0; ! msgdone; txt_off += 255 ) + { + char rec[ 256 ]; + int l = readText( rec, + txt_off, + 255 ); + + + if ( l < 255 ) + { + msgdone = TRUE; + } + + + for ( int j = 0; j < l; j++ ) + { + switch ( rec[ j ] ) + { + case '\n': + + break; + + + case '\r': + + if ( inkludge ) + { + s.upperCase(); + + + if ( mode ) + { + if ( ! strncmp( s, + "TOPT", + 4 ) ) + { + return atoi(&s[5]); + } + } + else + { + if ( ! strncmp( s, + "FMPT", + 4 ) ) + { + return atoi( & s[ 5 ] ); + } + } + } + + + inkludge = 0; + s = ""; + + break; + + + case 1: + + s = ""; + inkludge = 1; + + break; + + + default: + + if ( inkludge ) + { + s << char( rec[ j ] ); + } + + break; + } + } + } + + + return 0; +} + + + +void write_msgtmp( char *s ) +{ + File f( "MSGTMP", fmode_create ); + + f << s; +} diff --git a/MSG.OBJ b/MSG.OBJ new file mode 100644 index 0000000..f6af72c Binary files /dev/null and b/MSG.OBJ differ diff --git a/MSGAREA.CPP b/MSGAREA.CPP new file mode 100644 index 0000000..cff67c1 --- /dev/null +++ b/MSGAREA.CPP @@ -0,0 +1,119 @@ +#define Use_MsgBase + +#include +#include "proboard.hpp" + +File MsgArea::f; +int MsgArea::lastAreaNum = -1; +int MsgArea::numAreas = -1; + +MsgArea *MsgArea::lastArea = NULL; + +void +MsgArea::open() +{ + if(!f.opened()) + { + if(!f.open(FN_MSGAREAS_PRO,fmode_read,cfg.fastmode ? BUFSIZE_FAST:BUFSIZE_SLOW)) + file_error(FN_MSGAREAS_PRO); + + numAreas = int(f.len() / sizeof(_MsgArea)); + } +} + +bool +MsgArea::read(int a) +{ + open(); + + msgBase = NULL; + + if(a<1 || a>numAreas) return FALSE; + + if(lastArea == NULL) + { + lastArea = new MsgArea; + lastAreaNum = -1; + } + + if(a != lastAreaNum) + { + f.seek(long(a-1) * sizeof(_MsgArea)); + + if( f.read(lastArea,sizeof(_MsgArea)) != sizeof(_MsgArea) + || lastArea->name[0] == '\0' ) + { + lastAreaNum = -1; + + return FALSE; + } + + switch(lastArea->msgBaseType) + { + case MSGBASE_SDM : + case MSGBASE_SQUISH: lastArea->msgBase = squishMsgBase; + break; + case MSGBASE_JAM : lastArea->msgBase = jamMsgBase; + break; + case MSGBASE_HUDSON: lastArea->msgBase = hudsonMsgBase; + if((a<1 || a>200) && lastArea->name[0]) + { + LOG("Message area %d: Hudson type not allowed",a); + return FALSE; + } + break; + default : LOG("Bad message base type for area #%d",a); + return FALSE; + } + } + + (*this) = (*lastArea); + + if(msgBaseType != MSGBASE_HUDSON) + { + append_backspace(path); + + if(msgBaseType != MSGBASE_SDM) path[strlen(path)-1] = '\0'; + } + + lastAreaNum = areaNum; + + if(!sysop[0]) strcpy(sysop,cfg.sysopname); + + if(!replyBoard) replyBoard = areaNum; + + strip_trailing( name ); + strip_leading( name ); + + return (name[0]) ? TRUE:FALSE; +} + +void +MsgArea::close() +{ + f.close(); + + if(lastArea != NULL) delete lastArea; + + lastAreaNum = -1; + numAreas = -1; + lastArea = NULL; +} + +int +MsgArea::highAreaNum() +{ + open(); + + return numAreas; +} + +bool +MsgArea::sysopAccess() +{ + return ( check_access(sysopLevel,sysopFlags,sysopFlagsNot) + || !strcmpl(sysop,user.name) + || !strcmpl(cfg.sysopname,user.name) + ); +} + diff --git a/MSGAREA.OBJ b/MSGAREA.OBJ new file mode 100644 index 0000000..3d8facc Binary files /dev/null and b/MSGAREA.OBJ differ diff --git a/MSGBASE.CPP b/MSGBASE.CPP new file mode 100644 index 0000000..d34d5bd --- /dev/null +++ b/MSGBASE.CPP @@ -0,0 +1,82 @@ +#define Use_MsgBase + +#include "proboard.hpp" + +MsgBaseList::MsgBaseList() +{ + mblist[0] = NULL; +} + +void +MsgBaseList::add(MsgBase *mb) +{ + for(int i=0; mblist[i] ; i++) {} + + mblist[i] = mb; + mblist[i+1] = NULL; +} + +MsgBaseList::~MsgBaseList() +{ + for(int i=0; mblist[i] ; i++) delete mblist[i]; +} + +void +MsgBaseList::open() +{ + for(int i=0 ; mblist[i] ; i++) mblist[i]->open(); +} + +void +MsgBaseList::close() +{ + for(int i=0 ; mblist[i] ; i++) mblist[i]->close(); + + MsgArea::close(); +} + +bool +MsgBaseList::lock() +{ + for(int i=0 ; mblist[i] ; i++) + if(!mblist[i]->lock()) + return FALSE; + + return TRUE; +} + +bool +MsgBaseList::unlock() +{ + for(int i=0 ; mblist[i] ; i++) + if(!mblist[i]->unlock()) + return FALSE; + + return TRUE; +} + +word +MsgBaseList::scanMail(MessageIndex *mi,word maxmsgs) +{ + word left = maxmsgs; + + for(int i=0; mblist[i] ; i++) + { + if(left>0) left -= mblist[i]->scanMail(&mi[maxmsgs-left],left); + } + + return maxmsgs-left; +} + +long +MsgBaseList::totalMsgs() +{ + long total = 0; + + for(int i=0; mblist[i] ; i++) + { + total += mblist[i]->totalMsgs(); + } + + return total; +} diff --git a/MSGBASE.HPP b/MSGBASE.HPP new file mode 100644 index 0000000..1076d9c --- /dev/null +++ b/MSGBASE.HPP @@ -0,0 +1,433 @@ +class Message; +class MsgBase; +class SquishMsgBase; +class HudsonMsgBase; +class JamMsgBase; +class MsgArea; +class MessageIndex; + +class HudsonMsgIdx; +class HudsonMsgHdr; +class HudsonMsgToIdx; +class HudsonMsgInfo; + +class JamFileHeader; +class JamHeader; +class JamExtHeader; +class JamIndex; +class JamLastRead; + +class MsgBase + { + public: + MsgBase() {} + virtual ~MsgBase() {} + + virtual bool open() = 0; + virtual void close() = 0; + + virtual bool lock() { return TRUE; } + virtual bool unlock() { return TRUE; } + + virtual long readMsg(Message& msg , long num) = 0; + virtual word readMsgText(Message& msg, char *text, long offset , word size) = 0; + virtual word scanMail(MessageIndex *mi,word maxmsgs) = 0; + virtual long appendMsg(Message&) = 0; + virtual bool updateMsg(Message&) = 0; + + virtual long highMsg(MsgArea&) = 0; + virtual long lowMsg (MsgArea&) = 0; + virtual long numMsgs(MsgArea&) = 0; + virtual long totalMsgs() = 0; + + virtual bool deleteMsg(Message&) = 0; + + virtual long lastRead(MsgArea&,long rec) = 0; + virtual void setLastRead(MsgArea&,long rec,long num) = 0; + + virtual long msgNum(MsgArea&,long id) = 0; + virtual long msgId (MsgArea&,long num) = 0; + }; + +class SquishMsgBase : public MsgBase + { + MSG *lastarea; + int lastareanum; + + MSG *readArea(MsgArea&); + public: + SquishMsgBase() { open(); } + ~SquishMsgBase() { close(); } + + bool open(); + void close(); + + bool lock() { return TRUE; } + bool unlock() { return TRUE; } + + long readMsg(Message& msg , long num); + word readMsgText(Message& msg, char *text, long offset , word size); + word scanMail(MessageIndex *mi,word maxmsgs); + long appendMsg(Message&); + bool updateMsg(Message&); + + long highMsg(MsgArea&); + long lowMsg (MsgArea&); + long numMsgs(MsgArea&); + long totalMsgs() { return 0; } + + bool deleteMsg(Message&); + + long lastRead(MsgArea&,long rec); + void setLastRead(MsgArea&,long rec,long num); + + long msgNum(MsgArea&,long id); + long msgId (MsgArea&,long num); + }; + +class HudsonMsgBase : public MsgBase + { + File f_msghdr; + File f_msgtxt; + File f_msgtoidx; + File f_msgidx; + File f_msginfo; + + HudsonMsgIdx *lastMsgIdx; + int *highArray; + int *lastReadArray; + long lastIndex; + long lastReadRecord; + /////////////////// + + void flushCache(); + void readHighArray(); + void readLastRead(long record); + + void readInfo(HudsonMsgInfo&); + void writeInfo(HudsonMsgInfo&); + + long findIdx(HudsonMsgIdx &mi,int num,int area,int order); + + public: + HudsonMsgBase(); + ~HudsonMsgBase(); + + bool open(); + void close(); + + bool lock(); + bool unlock(); + + long readMsg(Message& msg , long num); + word readMsgText(Message& msg, char *text, long offset , word size); + word scanMail(MessageIndex *mi,word maxmsgs); + long appendMsg(Message&); + bool updateMsg(Message&); + + long highMsg(MsgArea&); + long lowMsg (MsgArea&); + long numMsgs(MsgArea&); + long totalMsgs(); + + bool deleteMsg(Message&); + + long lastRead(MsgArea&,long rec); + void setLastRead(MsgArea&,long rec,long num); + + long msgNum(MsgArea&,long id); + long msgId(MsgArea& ma, long num); + }; + +class JamMsgBase : public MsgBase + { + File f_jhr; + File f_jdt; + File f_jdx; + File f_jlr; + + int lastAreaNum; + JamFileHeader *jamHeader; + + bool openArea( MsgArea& ); + + bool jamLock(); + bool jamUnLock(); + + bool readHeader(); + bool writeHeader(); + + long findIdx( JamIndex &mi,long num,int order ); + + public: + JamMsgBase(); + ~JamMsgBase(); + + bool open(); + void close(); + + bool lock() { return TRUE; } + bool unlock() { return TRUE; } + + long readMsg(Message& msg , long num); + word readMsgText(Message& msg, char *text, long offset , word size); + word scanMail(MessageIndex *mi,word maxmsgs); + long appendMsg(Message&); + bool updateMsg(Message&); + + long highMsg(MsgArea&); + long lowMsg (MsgArea&); + long numMsgs(MsgArea&); + long totalMsgs() + { + return 0; + } + + bool deleteMsg(Message&); + + long lastRead(MsgArea&,long rec); + void setLastRead(MsgArea&,long rec,long num); + + long msgNum(MsgArea&,long id); + long msgId (MsgArea&,long num); + }; + + +class MsgBaseList + { + MsgBase *mblist[5]; + public: + MsgBaseList(); + ~MsgBaseList(); + + void add(MsgBase *); + + void close(); + void open(); + bool lock(); + bool unlock(); + + word scanMail(MessageIndex *,word maxmsgs); + long totalMsgs(); + }; + +class MsgArea : public _MsgArea + { + static File f; + static int lastAreaNum; + static MsgArea *lastArea; + static int numAreas; + + static void open(); + public: + MsgBase *msgBase; + + bool read(int); + bool sysopAccess(); + + static void close(); + static int highAreaNum(); + + long numMsgs() + { + return (msgBase==NULL) ? 0L : msgBase->numMsgs(*this); + } + long lowMsg() + { + return (msgBase==NULL) ? 0L : msgBase->lowMsg (*this); + } + long highMsg() + { + return (msgBase==NULL) ? 0L : msgBase->highMsg(*this); + } + long lastRead(long rec) + { + return (msgBase==NULL) ? 0L : msgBase->lastRead(*this,rec); + } + void setLastRead(long rec,long num) + { + if(msgBase) + msgBase->setLastRead(*this,rec,num); + } + long msgNum(long id) + { + return (msgBase==NULL) ? 0L : msgBase->msgNum(*this,id); + } + long msgId (long num) + { + return (msgBase==NULL) ? 0L : msgBase->msgId(*this,num); + } + }; + +const dword MSGATTR_PRIVATE = 0x00000001L; +const dword MSGATTR_RECEIVED = 0x00000002L; +const dword MSGATTR_DELETED = 0x00000004L; +const dword MSGATTR_NETMAIL = 0x00000008L; +const dword MSGATTR_UNSENT_ECHO = 0x00000010L; +const dword MSGATTR_UNSENT_NET = 0x00000020L; +const dword MSGATTR_LOCAL = 0x00000040L; +const dword MSGATTR_KILL = 0x00000080L; +const dword MSGATTR_CRASH = 0x00000100L; +const dword MSGATTR_SENT = 0x00000200L; +const dword MSGATTR_FILE = 0x00000400L; +const dword MSGATTR_FILEREQ = 0x00000800L; +const dword MSGATTR_AUDITREQ = 0x00001000L; +const dword MSGATTR_RECEIPTREQ = 0x00002000L; +const dword MSGATTR_TRANSIT = 0x00004000L; +const dword MSGATTR_HOLD = 0x00008000L; +const dword MSGATTR_IMMEDIATE = 0x00010000L; +const dword MSGATTR_DIRECT = 0x00020000L; +const dword MSGATTR_TRUNCFILE = 0x00040000L; +const dword MSGATTR_DELFILE = 0x00080000L; +const dword MSGATTR_ORPHAN = 0x00100000L; +const dword MSGATTR_ECHOMAIL = 0x00200000L; +const dword MSGATTR_NODISP = 0x00400000L; +const dword MSGATTR_LOCKED = 0x00800000L; + + +struct Message + { + long num; + dword id; // for Squish only, others -> == num + + char from[36]; + char to [36]; + char subj[66]; + + dword attr; + + Date postDate; + Time postTime; + Date recvDate; + Time recvTime; + + long next; + long prev; + + int origZone, + origNet, + origNode, + origPoint; + + int destZone, + destNet, + destNode, + destPoint; + + int cost; + + /************************************************************/ + + static long lastIndex; + + union { + MsgArea *msgArea; + int area; + }; + + Message(int area = 0); + Message(Message *, int area = 0); + + ~Message(); + + int areaNum() ; + + MsgBase *msgBase() + { + return msgArea->msgBase; + } + + void clear(); + + bool setArea (int num); + bool read (long num, int area = 0); + bool readFirst(int method,int order,long first,char *data,int area = 0); + bool readNext (int method,int order,char *data); + bool readPrev (int method,int order,char *data); + + word readText(char *text,long offset,word size) + { + return msgBase()->readMsgText(*this, text, offset , size); + } + + void createMsgTextFile(char *fname , bool append); + void createMsgTextString(char *string , word maxsize); + void export(char *fname); + void forward(); + void move(); + + void setFlag (dword msgflag); + void clearFlag (dword msgflag); + void toggleFlag(dword msgflag); + + bool testFlag (dword msgflag) { return (attr & msgflag) ? TRUE:FALSE; } + + void operator=(HudsonMsgHdr&); + + void addReply(Message&); + void delReply(); + void remove(); + + byte show(); + void addOrigin(); + int pointNum(int mode); + long add(); + + long msgNum() { return msgBase()->msgNum(*msgArea,id); } + + bool readAccess(); + }; + +struct MessageIndex + { + MessageIndex() {} + MessageIndex(int a,long n) { area = a; num = n; } + + int area; + long num; + }; + +class MarkedMsgList + { + MessageIndex *msgList; + int n; + public: + MarkedMsgList(); + MarkedMsgList(const MarkedMsgList&); + ~MarkedMsgList(); + + void operator=(const MarkedMsgList&); + + bool add(MessageIndex&); + bool add(Message&); + void clear() { n = 0; } + bool remove(MessageIndex&); + void sort(); + int numMarked() { return n; } + bool isMarked(MessageIndex&); + MessageIndex getMarked(int n) { return msgList[n]; } + MessageIndex operator[](int n) { return msgList[n]; } + }; + +const int MAX_MARKED_MSGS = 500; + +extern MsgBase *squishMsgBase; +extern MsgBase *hudsonMsgBase; +extern MsgBase *jamMsgBase; +extern MsgBaseList msgbase; +extern MarkedMsgList markedmsglist; + +void get_new_msgs(MarkedMsgList& marked,int area); + + +inline long +HudsonMsgBase::msgNum(MsgArea&,long id) +{ + return id; +} + +inline long +HudsonMsgBase::msgId(MsgArea&, long num) +{ + return num; +} diff --git a/MSGBASE.OBJ b/MSGBASE.OBJ new file mode 100644 index 0000000..b02fe1c Binary files /dev/null and b/MSGBASE.OBJ differ diff --git a/MSGDEL.CPP b/MSGDEL.CPP new file mode 100644 index 0000000..ef65e61 --- /dev/null +++ b/MSGDEL.CPP @@ -0,0 +1,12 @@ +#define Use_MsgBase + +#include +#include "proboard.hpp" + +void +Message::remove() +{ + if(next || prev) delReply(); + + if(!msgBase()->deleteMsg(*this)) LOG("Error deleting message"); +} diff --git a/MSGDEL.OBJ b/MSGDEL.OBJ new file mode 100644 index 0000000..c850aed Binary files /dev/null and b/MSGDEL.OBJ differ diff --git a/MSGED.CPP b/MSGED.CPP new file mode 100644 index 0000000..306124c --- /dev/null +++ b/MSGED.CPP @@ -0,0 +1,325 @@ +#include +#include +#include +#include +#include "proboard.hpp" + +#define LINELEN 70 + +class msglines + { + String *line; + int n; + void rebuild(); + void enterline(String&,String&); + void ruler(); + public: + msglines() { line=new String[60]; n=0; } + ~msglines() { delete [] line; n=0; } + String& operator[](int i) { return line[i-1]; } + int numlines() { return n; } + void append(); + void save(); + void insert(int l); + void del(int l1,int l2); + void edit(int l); + void replace(int l,char *str1,char *str2); + void show(); + void show(int l); + }; + +void +msged() +{ +msglines msg; + +unlink("MSGTMP"); + +if(run_sdkfile("/I MSGED") >= 0) return; + +io << "\n\n" << S_MSGED_HEADER << "\n\n"; + +msg.append(); + +for(;;) + { + io << '\n' << S_MSGED_COMMAND_LIST; + char k= wait_language_hotkeys(K_MSGED_COMMAND_LIST); + + switch(k) + { + case 5 : { + io << S_MSGED_LIST << '\n'; + msg.show(); + } break; + case 0 : { + io << S_MSGED_SAVE; + msg.save(); + return; + } + case 6 : { + io << S_MSGED_ASK_ABORT; + if(io.ask(0)) return; + io << "\n\n"; + } break; + case 1 : { + io << S_MSGED_CONTINUE << '\n'; + msg.append(); + } break; + case 7 : { + int line=0; + io << S_MSGED_EDIT_LINE(form("%d",msg.numlines())); + + io.read(line,2); + io << '\n'; + if(line<1 || line>msg.numlines()) break; + io << '\n'; + msg.edit(line); + io << '\n'; + } break; + case 3 : { + int line1=0,line2=0; + io << S_MSGED_DELETE_LINE << "\n\n"; + io << S_MSGED_DELETE_FROM_LINE(form("%d",msg.numlines())); + io.read(line1,2); + io << '\n'; + if(line1<1 || line1>msg.numlines()) break; + io << S_MSGED_DELETE_TO_LINE(form("%d",line1),form("%d",msg.numlines())); + io.read(line2,2); + io << '\n'; + if(line2msg.numlines()) break; + msg.del(line1,line2); + io << '\n' << S_MSGED_X_LINES_DELETED(form("%d",line2-line1+1)) << '\n'; + } break; + case 4 : { + int line=0; + io << S_MSGED_INSERT_LINE(form("%d",msg.numlines())); + io.read(line,2); + io << '\n'; + if(line<1 || line>msg.numlines()) break; + io << '\n'; + msg.insert(line); + } break; + case 2 : { + int line=0; + char text1[50],text2[50]; + + io << S_MSGED_REPLACE_TEXT(form("%d",msg.numlines())); + io.read(line,2); + io << '\n'; + if(line<1 || line>msg.numlines()) break; + io << '\n'; + msg.show(line); + io << '\n' << S_MSGED_ENTER_TEXT_TO_REPLACE; + io.read(text1,49); + if(!text1[0]) + { + io << '\n'; + break; + } + if(msg[line].find(text1)<0) + { + io << "\n\n" << S_MSGED_TEXT_NOT_FOUND << '\n'; + break; + } + io << "\n\n" << S_MSGED_REPLACE_BY; + io.read(text2,49); + msg.replace(line,text1,text2); + io << "\n\n" << S_MSGED_LINE_NOW_READS << "\n\n"; + msg.show(line); + } break; + } + } +} + +void +msglines::save() +{ +if(n<1) return; + +File f("MSGTMP",fmode_create | fmode_text); + +for(int i=0;i=l;i--) line[i]=line[i-1]; + line[l-1]=tmpline; + tmpline=wrap; + n++; + l++; + } +} + +void +msglines::del(int l1,int l2) +{ +l1--; +l2--; + +for(int i=l1;iLINELEN) + { + wordwrap(tmpline[l],wrap,LINELEN); + tmpline[++l]=wrap; + } + } + } +for(i=0,n=-1;i<60;i++) + { + line[i]=tmpline[i]; + if(n<0) if(!line[i][0]) n=i; + } +} + +void +msglines::show(int l) +{ +String s(line[l-1]); +strip_linefeed(s); +io << form("\3[\7%2d\3]:\6 %s\n",l,(char *)s); +} + +void +msglines::show() +{ +io << '\n'; +stopped=0; +linecounter(0); +for(int i=1;i<=n;i++) + { + show(i); + if(linecounter() || stopped) break; + } +} + +void +msglines::enterline(String& s,String& wrap) +{ +int nowrap=0; +if(wrap.len()) nowrap=1; +int i; + +if(!nowrap) wrap=""; + +for(i=0;i0) + { + s[s.len()-1]=0; + io << "\b \b"; + } + break; + case 13: s << '\n'; io << '\n'; wrap=""; return; + default: if(nowrap && s.len()>LINELEN) continue; + io << k; + s << (char)k; + } + if(s.len()>LINELEN) + { + int l=wordwrap(s,wrap,LINELEN); + for(int i=0;i +#include "proboard.hpp" + +const int text_bufsize = 512; + + + +void Message::export( char *fname ) +{ + File outf; + + + if ( ! outf.open( fname, fmode_create ) ) + { + return; + } + + + outf << form( "Message #%-5ld [%s] ", + msgNum(), + msgArea->name ); + + + if ( attr & MSGATTR_PRIVATE ) + { + outf << "[PRIVATE] "; + } + + + if ( msgArea->msgKind == MSG_NET ) + { + if ( attr & MSGATTR_CRASH ) outf << "[CRASH] "; + if ( attr & MSGATTR_KILL ) outf << "[KILL] "; + if ( attr & MSGATTR_FILE ) outf << "[FILE] "; + if ( attr & MSGATTR_SENT ) outf << "[SENT] "; + } + + + if ( prev ) + { + outf << form( "[%ld <ÄÄ] ", + msgArea->msgNum( prev ) ); + } + + + if ( next ) + { + outf << form( "[ÄÄ> %ld] ", + msgArea->msgNum( next ) ); + } + + + outf << "\r\n"; + + + String org( from ); + String dest( to ); + + + if ( msgArea->msgKind == MSG_NET ) + { + int pt_from = pointNum( 0 ); + int pt_to = pointNum( 1 ); + + + org << form( " (%d:%d/%d", + origZone, + origNet, + origNode ); + + dest << form( " (%d:%d/%d", + destZone, + destNet, + destNode ); + + + if ( pt_from ) + { + org << form( ".%d", pointNum( 0 ) ); + } + + + if ( pt_to ) + { + dest << form( ".%d", pointNum( 1 ) ); + } + + + org << ')'; + dest << ')'; + } + + + outf << form( "From: %-46.46s Posted: %2d %s %02d %02d:%02d\r\n", + (char *) org,postDate[ 0 ], + months_short[ postDate[ 1 ] ], + postDate[ 2 ] % 100, // Y2K FIXED! + // postDate[ 2 ], // Y2K BUG! + postTime[ 0 ], + postTime[ 1 ] ); + + outf << form( "To : %-46.46s ", + (char *) dest ); + + + if ( attr & MSGATTR_RECEIVED ) + { + outf << form( "Received: %2d %s %02d %02d:%02d", + recvDate[ 0 ], + months_short[ recvDate[ 1 ] ], + recvDate[ 2 ] % 100, // Y2K FIXED! + // recvDate[ 2 ], // Y2K BUG! + recvTime[ 0 ], + recvTime[ 1 ], + recvTime[ 2 ] ); + } + + + outf << "\r\n"; + + + if ( attr & MSGATTR_FILE ) + { + outf << form( "File: %s\r\n\r\n", subj ); + } + else + { + outf << form( "Subj: %s\r\n\r\n", subj ); + } + + + outf.close(); + + createMsgTextFile( fname, TRUE ); +} + + + +void +Message::createMsgTextFile(char *fname , bool append) +{ + File file; + + if(append) file.open(fname , fmode_write | fmode_append); + + if(!file.opened()) file.open(fname,fmode_create); + if(!file.opened()) return; + + bool inkludge = FALSE; + + int index = 0; + + char line[100]; + memset(line,0,100); + + bool msgdone = FALSE; + + for(long txt_off = 0; !msgdone ;txt_off += 255) + { + char r[256]; + + int l = msgBase()->readMsgText(*this,r,txt_off,255); + + if(l < 255) msgdone = TRUE; + + for(int j=0;j=' ' || x==0x1B) line[index++] = x; + } + + if(index>79) + { + String wrap; + + wordwrap(line,wrap,79); + + if(strncmp(line,"SEEN-BY",7)) file << line << "\r\n"; + + memset(line,0,100); + + strcpy(line,wrap); + + index=strlen(line); + } + } + } + + if(index) + if(strncmp(line,"SEEN-BY",7)) + file << line << "\r\n"; +} + + +void +Message::createMsgTextString(char *string , word maxsize ) +{ + maxsize -= 100; + + string[0] = 0; + + bool inkludge = FALSE; + + int index = 0; + + char line[100]; + memset(line,0,100); + + bool msgdone = FALSE; + + char *r = new char[text_bufsize+1]; + + for(long txt_off = 0; !msgdone ;txt_off += text_bufsize) + { + int l = msgBase()->readMsgText(*this,r,txt_off,text_bufsize); + + if(l < text_bufsize) msgdone = TRUE; + + for(int j=0;j=' ' || x==0x1B) line[index++] = x; + } + + if(index>79) + { + String wrap; + + wordwrap(line,wrap,79); + + if(strncmp(line,"SEEN-BY",7)) + { + if(strlen(string) < maxsize) + { + strcat(string,line); + strcat(string,"\r\n"); + } + } + + memset(line,0,100); + + strcpy(line,wrap); + + index=strlen(line); + } + } + } + + if(index) + if(strncmp(line,"SEEN-BY",7)) + { + if(strlen(string) < maxsize) + { + strcat(string,line); + strcat(string,"\r\n"); + } + } + + delete [] r; +} diff --git a/MSGEXPRT.OBJ b/MSGEXPRT.OBJ new file mode 100644 index 0000000..1ee4044 Binary files /dev/null and b/MSGEXPRT.OBJ differ diff --git a/MSGFIND.CPP b/MSGFIND.CPP new file mode 100644 index 0000000..0436a1c --- /dev/null +++ b/MSGFIND.CPP @@ -0,0 +1,73 @@ +#define Use_MsgBase + +#include "proboard.hpp" + +bool +Message::readFirst(int method,int order,long first,char *data,int area) +{ + if(area) + { + if(!setArea(area)) return FALSE; + } + + if(order<0) + { + lastIndex = first + 1; + } + else + { + lastIndex = (first > 0) ? (first - 1) : 0; + } + + return readNext(method,order,data); +} + +bool +Message::readNext(int method,int order,char *data) +{ + for(lastIndex += order ; lastIndex ; lastIndex+=order) + { + lastIndex = msgBase()->readMsg(*this,(order<0) ? (-lastIndex) : (lastIndex)); + + if(lastIndex < 0) break; + + switch(method) + { + case READMSG_ALL: + { + return TRUE; + } + + case READMSG_SEL: + { + switch(data[0]) + { + case 'F': if(strstrl(from,&data[1])) return TRUE; + break; + case 'T': if(strstrl(to,&data[1])) return TRUE; + break; + case 'S': if(strstrl(subj,&data[1])) return TRUE; + break; + case 'E': if(strstrl(from,&data[1]) || strstrl(to,&data[1])) return TRUE; + break; + } + } + break; + } + } + + return FALSE; +} + +bool +Message::readPrev(int method,int order,char *data) +{ + long prevlast=lastIndex; + + bool x = readNext(method,-order,data); + + if(!x) lastIndex = prevlast; + + return x; +} + diff --git a/MSGFIND.OBJ b/MSGFIND.OBJ new file mode 100644 index 0000000..e2a5b77 Binary files /dev/null and b/MSGFIND.OBJ differ diff --git a/MSGMOVE.CPP b/MSGMOVE.CPP new file mode 100644 index 0000000..fd4ec72 --- /dev/null +++ b/MSGMOVE.CPP @@ -0,0 +1,37 @@ +#define Use_MsgBase + +#include +#include "proboard.hpp" + +void +Message::move() +{ + MsgArea ma; + int areanum = 0; + + io << "\n\n"; + linecounter(0); + set_msgarea(form("* -N -%d /L" , msgArea->areaNum)); + io << '\n' << S_SELECT_MSG_AREA_TO_MOVE_MESSAGE_TO; + io.read(areanum,5); + + if(areanum < 1) return; + + if(!ma.read(areanum)) + { + io << "\n\n" << S_UNKNOWN_MESSAGE_AREA << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + io << "\n\n" << S_MOVING_MESSAGE; + + Message msg(this,areanum); + + createMsgTextFile("MSGTMP",FALSE); + + remove(); + + msg.add(); + + io << "\n\n"; +} diff --git a/MSGMOVE.OBJ b/MSGMOVE.OBJ new file mode 100644 index 0000000..2d0fd48 Binary files /dev/null and b/MSGMOVE.OBJ differ diff --git a/MUSIC.CPP b/MUSIC.CPP new file mode 100644 index 0000000..67929e4 --- /dev/null +++ b/MUSIC.CPP @@ -0,0 +1,95 @@ +#include +#include +#include +#include +#include +#include "proboard.hpp" + +struct music_data { unsigned freq,dur; }; + +char +playsong(char *name,char *hotkeys,int length) +{ +int silent=0,i,j; +music_data *data; +time_t tm; + +File fp(FileName(syspath,name,".MUS"),fmode_read | fmode_text); + +if(!fp.opened()) + { + if(!length) return 1; + tm=time(NULL); + + for(i=0;;i++) + { + if(int(time(NULL)-tm)>length) break; + + if(!silent && !noyell_flag) tsw_beep(100*(i%20)+200,40); + + if(KB.hit()) + { + KEY c=KB.uget(); + if(hotkeys) for(j=0;jlength) { nosound(); delete [] data; return 0; } + if(!noyell_flag) + { + if(data[i].freq) + { + sound(data[i].freq); + msleep(data[i].dur*10); + } + else + { + nosound(); + msleep(data[i].dur*10); + } + } + } + if(!length) break; + } +nosound(); + +delete [] data; + +return 0; +} + diff --git a/MUSIC.OBJ b/MUSIC.OBJ new file mode 100644 index 0000000..040bf61 Binary files /dev/null and b/MUSIC.OBJ differ diff --git a/Main copyite filing 2.doc b/Main copyite filing 2.doc new file mode 100644 index 0000000..8f930fb Binary files /dev/null and b/Main copyite filing 2.doc differ diff --git a/Main copyite filing.doc b/Main copyite filing.doc new file mode 100644 index 0000000..13feeba Binary files /dev/null and b/Main copyite filing.doc differ diff --git a/NODELIST.CPP b/NODELIST.CPP new file mode 100644 index 0000000..2fb68a1 --- /dev/null +++ b/NODELIST.CPP @@ -0,0 +1,232 @@ +#include +#include +#include +#include "proboard.hpp" + +static void near +getnode(char *temp,node_entry& n) +{ +char *options[]={"ZONE","REGION","HOST","HUB","PVT","DOWN","HOLD"}; +char slices[6][100]; + +for(int i=0;i<6;i++) + { + int y=0; + while (*temp!=',') if (*temp!='_') slices[i][y++]=*temp++; + else {slices[i][y++]=' '; temp++;} + temp++; + slices[i][y]='\0'; + } + +for(i=0;i<7;i++) if(!strcmpl(slices[0],options[i])) break; + +n.type=i+1; + +strcpy(n.name,slices[2]); +strcpy(n.city,slices[3]); + +switch(i+1) + { + case NODE_ZONE : n.zone=atoi(slices[1]); + case NODE_REGION : n.region=atoi(slices[1]); + case NODE_HOST : { + n.net=atoi(slices[1]); + n.node=0; + } break; + default : n.node=atoi(slices[1]); + break; + } +} + +struct node_index + { + byte type; + long offset; + union + { + int zone,net; + }; + int cost; + long fill; + }; + +#define NODE_ZONE 1 +#define NODE_REGION 2 +#define NODE_HOST 3 +#define NODE_HUB 4 +#define NODE_PVT 5 +#define NODE_DOWN 6 +#define NODE_HOLD 7 +#define NODE_NODE 7 + +#define LISTNODE_SINGLE 1 +#define LISTNODE_MULTIPLE 2 + +static int near +list_node(node_index& idx,char *fname,char mode) +{ +char *types[]={ "","ZONE","REGION","NET","HUB","PVT","DOWN","HOLD","" }; + +File fp(FileName(cfg.nodelistdir,fname),fmode_read | fmode_text); + +if(!fp.opened()) return -1; + +fp.seek(idx.offset); +node_entry n; +n.net=idx.net; + +for(;;) + { + int num; + char s[300]; + if(!fp.readLine(s,299)) break; + if(s[0]==';') continue; + + getnode(s,n); + + if(mode==LISTNODE_MULTIPLE && n.net!=idx.net) break; + + switch(n.type) + { + case NODE_ZONE : num=n.zone; break; + case NODE_REGION: num=n.region; break; + case NODE_HOST : num=n.net; break; + default : num=n.node; break; + } + + io.enablestop(); + stopped=0; + io << form("\2 %-6s \3%5d \7%-28.28s \6%-28.28s \3%4d\n",types[n.type],num,n.name,n.city,idx.cost); + io.disablestop(); + if(stopped || linecounter()) return -1; + if(mode==LISTNODE_SINGLE) break; + } + +return 0; +} + +int +node_entry::read(char *s) +{ +char nodenr[14]; +char *tmp=nodenr; +int point=0; + +strcpy(nodenr,s); + +if((s=strchr(tmp,'.'))!=NULL) + { + point=atoi(s+1); + *s=0; + } + +if((s=strchr(tmp,':'))!=NULL) + { + *s++=0; + zone=atoi(tmp); + tmp=s; + } + else if(tmp[0]=='?') zone=-1; + +if((s=strchr(tmp,'/'))!=NULL) + { + *s++=0; + if(tmp[0]!='?') net=atoi(tmp); + else net=-1; + tmp=s; + } + else if(tmp[0]=='?') net=-1; + +if(tmp[0]!='?') node=atoi(tmp); + else node=-1; + +node_index idx; + +char nl_name[13]; + +File f(FileName(syspath,"NODE_IDX.PRO"),fmode_read,512); +if(!f.opened()) return -1; + +char xor[13]={ 234,123,76,245,87,12,43,56,23,12,98,55,34 }; + +int curzone=0; + +if(zone==-1) + io << S_ZONELIST_HEADER << '\n'; + else if(net==-1) + io << S_NETLIST_HEADER(form("%d",zone)) << '\n'; + else if(node==-1) + { + char *s=form("%d:%d",zone,net); + io << S_NODELIST_HEADER(s) << '\n'; + } + +linecounter(2); + +for(;;) + { + if(f.read(&idx,sizeof(idx))!=sizeof(idx)) break; + + char *ptr=(char *)&idx; + for(int i=0;i<13;i++) ptr[i]^=xor[i]; + + if(idx.type>10) { strcpy(nl_name,ptr); continue; } + + if(idx.type==NODE_ZONE) + { + curzone=idx.zone; + if(zone==-1) + { + if(list_node(idx,nl_name,LISTNODE_SINGLE)<0) break; + continue; + } + idx.net=curzone; + if(curzone!=zone) continue; + } + + if(curzone==zone && net==-1) + { + if(list_node(idx,nl_name,LISTNODE_SINGLE)<0) break; + continue; + } + + if(idx.net==net && zone==curzone) + { + if(node==-1) + { + if(list_node(idx,nl_name,LISTNODE_MULTIPLE)<0) return -1; + break; + } + + node_entry tmp; + tmp.zone=curzone; + tmp.net=idx.net; + tmp.cost=idx.cost; + + File fp(FileName(cfg.nodelistdir,nl_name),fmode_read | fmode_text); + if(!fp.opened()) return -1; + + fp.seek(idx.offset); + for(;;) + { + char s[300]; + if(fp.readLine(s,299)==NULL) break; + if(s[0]==';') continue; + getnode(s,tmp); + if(tmp.type +#include +#include "proboard.hpp" + +void +user_online::write() +{ + memset(this,0,sizeof(*this)); + + File f(FN_ONLINE_PRO,fmode_rw); + + if(!f.opened()) + { + f.open(FN_ONLINE_PRO,fmode_create | fmode_rw); + for(int i=0;i=0) { sleep(1); continue; } + + switch(req) + { + case UO_CHATTING: setstatus(UO_CHATTING); + return 0; + default: return 2; + } + } +return 1; +} + +int +user_online::check_chat() +{ +int x=getstatus(); + +return (x>0)?x:0; +} + +void +user_online::read(int node) +{ + File f(FN_ONLINE_PRO); + if(!f.opened()) return; + + if(!node) node=node_number; + + f.seek(long(node-1)*sizeof(*this)); + f.read(this,sizeof(*this)); +} diff --git a/ONLINE.OBJ b/ONLINE.OBJ new file mode 100644 index 0000000..a9a1ac1 Binary files /dev/null and b/ONLINE.OBJ differ diff --git a/Original Proboard Copyright Material.doc b/Original Proboard Copyright Material.doc new file mode 100644 index 0000000..afa95c4 Binary files /dev/null and b/Original Proboard Copyright Material.doc differ diff --git a/PB32.DEF b/PB32.DEF new file mode 100644 index 0000000..2c7e0d6 --- /dev/null +++ b/PB32.DEF @@ -0,0 +1,3 @@ +EXETYPE WINDOWS +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE diff --git a/PBUSER.CPP b/PBUSER.CPP new file mode 100644 index 0000000..b1d3bd0 --- /dev/null +++ b/PBUSER.CPP @@ -0,0 +1,104 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include "proboard.hpp" + + + +void User::list( char *s, + bool aliases ) +{ + struct User tuser; + + + io << S_USER_LIST_HEADER + << '\n'; + + + linecounter( 2 ); + + io.enablestop(); + + + for ( int rec = 0; ; rec++ ) + { + if ( ! tuser.read( rec ) ) + { + break; + } + + + if ( + tuser.uFlags & ( + UFLAG_DELETED | + UFLAG_HIDDEN + ) + ) + { + continue; + } + + + if ( s[ 0 ] && + fuzzy_search( s, + ( aliases + ? tuser.alias + : tuser.name ), + + 75 ) < 0 ) + { + continue; + } + + + if ( ! strcmpl( ( aliases + ? tuser.alias + : tuser.name ), + + cfg.sysopname ) && + + cfg.discrete ) + { + continue; + } + + + String id; + + + for ( int i = 0; i < num_limits; i++ ) + { + if ( limit[ i ].level == tuser.level ) + { + id = limit[ i ].id; + } + } + + + if ( io.send( form( "\3%-30.30s \6%-18.18s \2%02d %s %02d, %02d:%02d \6%5ld \7%s\n", + ( aliases + ? tuser.alias + : tuser.name ), + tuser.city, + tuser.lastDate[ 0 ], + months_short[ tuser.lastDate[ 1 ] ], + tuser.lastDate[ 2 ] % 100, // Y2K FIXED! + // tuser.lastDate[ 2 ], // Y2K BUG! + tuser.lastTime[ 0 ], + tuser.lastTime[ 1 ], + tuser.timesCalled, + (char *) id ) ) ) + { + break; + } + + + if ( linecounter() ) + { + break; + } + } +} diff --git a/PBUSER.OBJ b/PBUSER.OBJ new file mode 100644 index 0000000..682e048 Binary files /dev/null and b/PBUSER.OBJ differ diff --git a/PEXCALL.ASM b/PEXCALL.ASM new file mode 100644 index 0000000..e5582ed --- /dev/null +++ b/PEXCALL.ASM @@ -0,0 +1,73 @@ +% MODEL MEM_MOD + +CODESEG + +;PUBLIC __pex_dummy , __pex_set_pex_ds , __pex_set_pb_ds +PUBLIC _CallPEX + +PROC _CallPEX + ARG p:PTR + + push bp + mov bp,sp + + les bx,[p] + + mov ax,[es:bx+2] ; Get segment of function + or ax,ax + jz @@no_func + + push ds + push [bp+16] + push [bp+14] + push [bp+12] + push [bp+10] + + mov ds,[es:bx+4] + + call [dword ptr es:bx] + + add sp,8 + pop ds + +@@no_func: + pop bp + ret +ENDP _CallPEX + + +;PROC __pex_dummy +; ret +;ENDP __pex_dummy +; +;PROC __pex_set_pex_ds +; push bp +; mov bp,sp +; mov bx,[bp+6] +; mov ds,bx +; pop bp +; ret +;ENDP __pex_set_pex_ds +; +;PROC __pex_set_pb_ds +; push bp +; mov bp,sp +; +; mov bx,@Data +; mov ds,bx +; mov bx,[bp+6] +; mov cx,[bp+8] +; or bx,bx +; or bx,cx +; jz @@no_set +; +; pop bp +; ret +; +;@@no_set: +; xor ax,ax ; So PEX_RET returns NOT_HANDLED +; pop bp +; ret +;ENDP __pex_set_pb_ds +; +END diff --git a/PEXCALL.OBJ b/PEXCALL.OBJ new file mode 100644 index 0000000..6aaf3d1 Binary files /dev/null and b/PEXCALL.OBJ differ diff --git a/POSTMSG.CPP b/POSTMSG.CPP new file mode 100644 index 0000000..45780c8 --- /dev/null +++ b/POSTMSG.CPP @@ -0,0 +1,69 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +long +post_message(char *from,char *to,char *subj,int area,int pvt) +{ + Message msg; + + if(!msg.setArea(area)) return -1; + + if(msg.msgArea->msgKind == MSG_NET) return -1; + + strcpy(msg.from , from); + strcpy(msg.to , to); + strcpy(msg.subj , subj); + + if(pvt) msg.attr = MSGATTR_PRIVATE; + + msg.postDate.today(); + msg.postTime.now(); + + long nr = msg.add(); + + if(nr>0) + if(msg.msgArea->msgKind == MSG_PVTECHO || msg.msgArea->msgKind == MSG_ECHO) + echo_entered++; + + unlink("MSGTMP"); + + return nr; +} + + +long +post_netmail_message(char *from,char *to,char *subj,int area,int zone,int net,int node,int point,bool crash,bool attach,bool kill) +{ + Message msg; + + if(!msg.setArea(area)) return -1; + + if(msg.msgArea->msgKind != MSG_NET) return -1; + + strcpy(msg.from,from); + strcpy(msg.to,to); + strcpy(msg.subj,subj); + + msg.destZone = zone; + msg.destNet = net; + msg.destNode = node; + msg.origNode = point; + + msg.attr = MSGATTR_PRIVATE; + msg.attr |= (crash ? MSGATTR_CRASH : 0) + | (attach ? MSGATTR_FILE : 0) + | (kill ? MSGATTR_KILL : 0); + + msg.postDate.today(); + msg.postTime.now(); + + long nr = msg.add(); + + unlink("MSGTMP"); + + return nr; +} + diff --git a/POSTMSG.OBJ b/POSTMSG.OBJ new file mode 100644 index 0000000..3efd250 Binary files /dev/null and b/POSTMSG.OBJ differ diff --git a/PROBOARD.EXE b/PROBOARD.EXE new file mode 100644 index 0000000..8872601 Binary files /dev/null and b/PROBOARD.EXE differ diff --git a/PROBOARD.HPP b/PROBOARD.HPP new file mode 100644 index 0000000..82cd898 --- /dev/null +++ b/PROBOARD.HPP @@ -0,0 +1,717 @@ +#ifndef PROBOARD_HPP +#define PROBOARD_HPP + +#include +#include + +#define VERSION "2.22" +#define TEARVERSION "2.22" +#define PID_STRING "ProBoard 2.22" +#define PID_STRING_HUDSON PID_STRING " H" +#define PID_STRING_SQUISH PID_STRING " S" +#define PID_STRING_JAM PID_STRING " J" +#define PORT_VALUE 10 + +#define MAX_UNREG_NODES 255 +#define MAX_UNREG_USERS 100000 + +#define VER_NUM 222 + +const word VER_WORD = 0x0220; +const word VER_BETA = 0xFFFF; // 0000-EFFF = beta + // F000-FEEE = gamma + // FFFF = release + + +//-------------------------------------------- +// Color of the status bar on the main console +//-------------------------------------------- + +#define BAR_COLOR 0x4E + + +#include + +#ifndef MSGAPI + class MSG; +#endif + +#ifdef Use_MsgBase + #include "msgbase.hpp" +#else + class Message; + class MsgBase; + class MsgBaseList; + class SquishMsgBase; + class HudsonMsgBase; + class JamMsgBase; +#endif + +extern String S_PRESS_ENTER_TO_CONTINUE; + +const int MAX_PEX_HANDLERS = 100; + +const int BUFSIZE_FAST = 2048; +const int BUFSIZE_SLOW = 512; + +#ifdef RELEASE + inline void SCRAMBLE() + { + *((dword _far *)12) = *((dword _far *)0x46C); + } +#else + #define SCRAMBLE() ; +#endif + +/* +struct User : _User + { + int Read(int rec); // Read record from recnr 'rec' + int Write(int rec); // Write record to recnr 'rec' (-1 = add) + int Find(char *username); // Find user with name 'username' + int FindAlias(char *alias); // Find user with alias 'alias' + void list(char *); // Generate user list + void gentops(); // Generate top-statistics + int FindFirstMatch(char *str,bool fuzzy); + int FindNextMatch (char *str,bool fuzzy); + }; +*/ + +struct User : _User + { + void list(char *,bool aliases=FALSE); // Generate user list + //void gentops(); // Generate top-statistics + }; + +struct Config : _Config {}; +struct LanguageString : _LanguageString {}; +struct AreaGroup : _AreaGroup {}; + +struct FileArea : _FileArea + { + static File f; + static int lastAreaNum; + static FileArea *lastArea; + static int numAreas; + + static void open(); + public: + int areaNum; + + bool read(int); + + static void close(); + static int highAreaNum(); + }; + +struct timelog : _TimeLog + { + void read(); + void update(); + }; + +struct dl_today + { + int files; + int kb; + }; + +struct BinLog + { + Date date; // 3 + Time timeIn; // 3 + Time timeOut; // 3 + char name[36]; // 36 + char city[26]; // 26 + char country[26]; // 26 + long baud; // 4 + word node; // 2 + long kbDown; // 4 + long kbUp; // 4 + word yells; // 2 + word level; // 2 + dword uflags; // 4 + char alias[36]; // 36 + + byte extra[45]; + + BinLog(); + + bool append(); + }; + +struct user_online + { + char name[36]; + char city[16]; + unsigned baud; + int status; + byte extra[8]; + + void read(int = 0); + void write(); + void clear(); + int chatreq(int); // 0->Chat Granted 1->Timeout 2->Not Avail + int check_chat(); // 0->No (>0)->node + void setstatus(int stat,int node=0); + int getstatus(int node=0); + }; + +#define UO_OFFLINE -2 +#define UO_BROWSING 0 +#define UO_SHELLING -3 +#define UO_BUSY -4 +#define UO_CHATTING -1 + +struct limits + { + unsigned level; + int timelimit; + int daily_klimit; + int pre_download; + char id[6]; + unsigned free; // Free upload in Kb. + unsigned char factor; // Percentage upload required + unsigned max_download; // Max download for this level + unsigned fallto; // Fall to level x when max. reached + int msgfactor; // # Kbytes granted per message written + int sessionlimit; // Time limit per session + byte extra[3]; + }; + +struct topentry + { + char name[36]; + dword n; + }; + +struct aka + { + int zone; + int net; + int node; + int point; + + int read(int n); + }; + + +class usertimer + { + time_t started; + time_t suspend_start; + int suspendedtime; + bool suspended; + int fixedtime; + time_t inactivity_start; + public: + usertimer(); + void start(int minutes); + void increase(); + void decrease(); + void changeleft(int); + void suspend(); + void restart(); + int timesuspended() { return suspendedtime; } + int left(); + int online(); + int used(); + void check(); + void clearinactivity(); + void checkinactivity(); + }; + +#define READMODE_ALL 0 +#define READMODE_UPFIRST 1 +#define READMODE_UPALL 2 +#define READMODE_DIGITS 3 +#define READMODE_PWD 64 +#define READMODE_NOFIELD 128 + +class command_stack + { + int sp; + char buf[100]; + public: + command_stack() { sp=0; } + void parse(char *); + void clear() { sp=0; } + char getnext(); + char pollnext(); + }; + +struct fossilio + { + int port; // comport (0=COM1) + long baud; // baud rate + int external; // 1 if key received from com-port + int stopenabled; + bool show_local; + bool show_remote; + command_stack inputbuffer; + int (*more_func)(); + + byte *outputBuffer; + int bufferPtr; + + void init(int port,long baud); + fossilio() { baud = 65535L; outputBuffer = NULL; } + ~fossilio(); + void flush(); + byte readkey(); + byte wait(); + byte wait(char *); + void wait(char); + fossilio& operator<<(char); + fossilio& operator<<(char*); + byte send(char *str,char *hotkeys=NULL); + byte sendfile(char *filename,char *hotkeys=NULL); + void drawfield(int len); + void read(char *s,int max,byte mode=READMODE_ALL); + int read(int& i,int max=5); + int read(long&, int max=7); + void readpass(char *s); + void hangup(); + int ask(int def=1); + void cooldown(); + void heatup(); + void color(byte); + void fullcolor(byte); + void move(int x,int y); + void clreol(); + void cls(); + void enablestop(); + void disablestop(); + void clearinput(); + }; + + +struct node_entry + { + byte type; + int zone,region,net,node; + int cost; + char name[50]; + char city[50]; + + int read(char *); + }; + +struct KeyData + { + Date createDate; + Time createTime; + char createdBy[36]; + char sysopName[36]; + char bbsName[36]; + bool alpha; + bool beta; + bool gamma; + bool distSite; + bool regSite; + bool commercial; + Date expirDate; + word expirVersion; + byte extra[2]; + }; + +#define NODE_ZONE 1 +#define NODE_REGION 2 +#define NODE_HOST 3 +#define NODE_HUB 4 + +struct event + { + int type; // Errorlevel or DOS command + int errorlevel; // Errorlevel to use (>5) + char command[80]; // DOS Command to execute + Time start; // Time of the event + int duration; // Duration of the event (min). + byte empty; + byte days; // Bits 0-6 -> days of the week + byte node; // Node number to execute the event on + byte enabled; // Enabled? + + int minutesleft(); // Minutes until this event + int nextday(); // Day of this event + }; + +struct pvt_file + { + Date date; + char fname[13]; + char username[36]; + char from[36]; + }; + + +struct modem_response + { + long baud; + int port; + }; + +struct protocol + { + char name[50]; // Name of protocol + char key; // Hotkey for Protocol + char flags; // Protocol behavior + char logfile[60]; // Logfile from protocol + char ctlfile[60]; // Control file (redirection file) + char dlcom[126]; // Download command line + unsigned efficiency; // Throughput efficiency + char ulcom[128]; // Upload command line + char dlstring[80]; // String to place in download control file + char ulstring[80]; // String to place in upload control file + char dlkeyword[40]; // Download keyword to search for in logfile + char ulkeyword[40]; // Upload keyword to search for in logfile + int wordnr; // File name word nr after keyword (1-..) + + bool read(int n); + }; + +#define PROT_BATCH 1 +#define PROT_ENABLED 2 +#define PROT_BOTH 4 +#define PROT_BIM 8 +#define PROT_LOCAL 16 + +extern byte current_color; + +extern bool chatflag; +extern bool noyell_flag; +extern int num_yells; + +extern bool stopped; + +extern char user_firstname[]; +extern char mypath[]; +extern char syspath[]; +extern char curmenu[]; +extern char page_reason[]; + +extern bool menuchanged; +extern bool updatemenu; + +extern long totalcalls; +extern bool password_ok; +extern int num_users; +extern int time_limit; +extern int event_due; +extern int time_removed; +extern int download_limit; +extern int download_delay; +extern word free_download; +extern word upload_needed; +extern int node_number; +extern bool desqview; +extern int num_limits; +extern int returnvalue; +extern bool quiet; +extern bool net_entered,echo_entered; +extern bool registered; +extern word max_node_count; +extern int display_mode; +extern bool ega_43; +extern bool use_ems; +extern byte org_videomode; +extern word org_numlines; +extern bool ignore_carrier; +extern bool reliable; +extern bool fatal; +extern bool no_hangup; +extern word min_level; +extern bool rip_detected; +extern bool sysop_next; +extern int rip_screenlines; +extern int pastFirstUse; +extern bool newFilesChecked; + +extern User user; +extern int user_recnr; +extern Config far cfg; +extern limits limit[]; +extern command_stack comstack; +extern KeyData regis; +extern fossilio io; +extern event nextevent; + +extern LanguageFile pb_curlang; +extern LanguageString *pb_lang; +extern int pb_num_lang; + +extern BinLog lastcaller; + +#ifdef Use_TagList + extern LinkedList taglist; +#endif + +struct PEXhandle + { + void *func; + unsigned ds; + }; + +//extern PEXhandle pex_handlers[]; + +extern "C" int CallPEX(PEXhandle * ...); +//extern "C" void add_fhandles(); + +#ifdef Use_Handlers + extern LinkedList sysopkey_handlers; + extern LinkedList hangup_handlers; +#endif + +/* +#define PEX_IO_INIT (&pex_handlers[0]) +#define PEX_IO_STATUS (&pex_handlers[1]) +#define PEX_IO_HANGUP (&pex_handlers[2]) +#define PEX_IO_READBYTE (&pex_handlers[3]) +#define PEX_IO_SENDBYTE (&pex_handlers[4]) +#define PEX_IO_SENDBLOCK (&pex_handlers[5]) +#define PEX_SYSOPKEY (&pex_handlers[6]) +#define PEX_HANGUP (&pex_handlers[7]) +*/ + +/* +extern + File f_users, + f_usersxi, + f_usersidx, + f_userspb; +*/ + +extern char *noregmsg; + +extern Date login_date; +extern Time login_time; + +void chat(); +void LOG(char * ...); +void LOG(int level, char * ...); +void fatalerror(char *s); +void file_error(int fn , int errno = 0); // <0 -> Return, >0 -> Exit +void file_error (char *fn , int errno = 0); +void file_warning(char *fn , int errno = 0); +int login(); +void menu_processor(); + +void shell (char * = NULL), combined_clear (char * = NULL), + showansasc (char * = NULL), clearmarked (char * = NULL), + pagesysop (char * = NULL), qscan_msg (char * = NULL), + writemsg (char * = NULL), scan_msg (char * = NULL), + readmsg (char * = NULL), usage_graph (char * ), + city_change (char * = NULL), days_graph (char * ), + change_state (char * = NULL), weeks_graph (char * ), + password_change (char * = NULL), version_info (char * = NULL), + lines_change (char * = NULL), raw_dir (char * = NULL), + ansi_toggle (char * = NULL), list_files (char * = NULL), + cls_toggle (char * = NULL), new_files (char * = NULL), + pause_toggle (char * = NULL), keyword_search (char * = NULL), + set_filearea (char * = NULL), filename_search (char * = NULL), + fsed_toggle (char * = NULL), download (char * = NULL), + hotkey_toggle (char * = NULL), upload (char * = NULL), + user_list (char * = NULL), view_named_file (char * = NULL), + questionnaire (char * = NULL), view_file (char * = NULL), + mailcheck (char * = NULL), view_file_wait (char * = NULL), + list_archive (char * = NULL), lastcallers (char * = NULL), + time_stat (char * = NULL), logentry (char * = NULL), + combined_select (char * = NULL), logoff (char * = NULL), + change_access (char * = NULL), view_gif (char * = NULL), + tops (char * = NULL), ibm_toggle (char * = NULL), + show_users_online (char * = NULL), phone_change (char * = NULL), + multichat (char * = NULL), dataphone_change (char * = NULL), + set_msgarea (char * = NULL), handle_change (char * = NULL), + view_ans_wait (char * = NULL), usereditor (char * = NULL), + bulletin (char * = NULL), toggle_avatar (char * = NULL), + toggle_avtplus (char * = NULL), show_graph (char * ), + ripfont_change (char * = NULL), select_language (char * = NULL), + rip_toggle (char * = NULL), edit_taglist (char * = NULL), + change_dateformat (char * = NULL), change_faxphone (char * = NULL), + change_address (char * = NULL), change_country (char * = NULL), + change_default_protocol(char * = NULL), + select_msggroup (char * = NULL), select_filegroup (char * = NULL); + +int run_sdkfile (char * = NULL); +char showansascrip (char *); +extern void (*menufunctions[])(char *); + +void parse_date(Date& d,char *s,int format); +void multilinechat(int); +char *strstrl(char *,char *); +int check_access(unsigned,AccessFlags); // 0 -> Denied +int check_access(unsigned,AccessFlags,AccessFlags); // 0 -> Denied +int linecounter(int = -1); +void sysopkey(word); +void replymsg(Message&); +int matchstring(char *s,char *d); // 1->ok, 0->not ok +int matchstring(char *s,char *d,int l); // 1->ok, 0->not ok +int matchfile(char *search,char *file); +char *findmatch(char *,char *); +void strip_path(char *); +void strip_fname(char *); +void msged(); +char showansasc(char *file,char *hotkeys); +bool show_rip( char *file , bool reset = FALSE); + +void rip_send( char *s); +void rip_query( char *cmd); +void rip_reset(); +void rip_textmode(); +void rip_nomore(); +void rip_kill_mouse_fields(); +void rip_bar(int,int,int,int); +void rip_color(int); +void rip_fill_color(int,int); +void rip_send_icons(); +void rip_button(int x1,int y1,int x2,int y2,int hotkey,bool def,char *icon,char *text,char *hostcmd); +void rip_start_dialog(char *prompt,int max); +void rip_end_dialog(); +void rip_start_yesno_dialog( char *prompt , bool); +void rip_clear_status(); +void rip_show_more(); +void rip_show_more_tag(); +void rip_show_enter(); + +#define rip_save_textwindow() rip_query("$STW$") +#define rip_restore_textwindow() rip_query("$RTW$") +#define rip_save_mouse_fields() rip_query("$SMF$") +#define rip_restore_mouse_fields() rip_query("$RMF$") +#define rip_paste_clipboard() rip_query("$PCB$") +#define rip_doorway_on() rip_query("$DWAYON$") +#define rip_doorway_off() rip_query("$DWAYOFF$") +#define rip_cursor_on() rip_query("$CON$") +#define rip_cursor_off() rip_query("$COFF$") + +String meganum(word); + +void readconfig(); +int parse_data(char *s,String *param); // ret=number of params +void create_arealist(String param[],int numpara,BitArray& arealist,bool msgareas = FALSE); +void adjust_limits(); +void deltrailspaces(char *); +int wordwrap(char *,String&,int max); +char playsong(char *name,char *keys,int length); +void toggle_userinfo(); +void toggle_help(); +void toggle_macrohelp(); +void edit_user(); +void screen_image(); +void update_user_window(); +void update_display(); +long post_message(char *from,char *to,char *subj,int area,int pvt); +long post_netmail_message(char *from,char *to,char *subj,int area,int zone,int net,int node,int point,bool crash,bool attach,bool kill); +void write_msgtmp(char *s); +void edit_message(); +void write_msginf( char *from , char *to , char *subj , long num , char *area , char *pvt); +String replace_stringvars(char *s); +void show_intro(); +void check_exe(char *); +int fuzzy_search(char *,char *,int); +int intimewindow(Time t1,Time t2); +char *dos_error_message(int errno); +bool select_protocol(protocol& p , char protocol_key = '\0' , bool seldef = FALSE); +String fullcolor_string(byte color); +void remove_tag(char *name , int area); +bool is_tagged(char *name , int area); +void write_taglist(); +void read_taglist(); +void InputDate( Date &d, + byte iDateFormat ); + +void rip_text_window( int x0, int y0 , int x1 , int y1 , int font ); + +extern "C" + { + void set43(); + void set25(); + void setvideomode(unsigned); + unsigned getvideomode(); + } + +void exit_proboard(int level = 0); + +extern char *months_short[]; +extern char *months_full []; +extern char *days_short []; +extern char *days_full []; +extern char *date_formats[]; +extern char *date_formats_long[]; + +extern usertimer timer; + +extern FileName FN_BINLOG_PB, + FN_TIMELOG_PRO, + FN_ONLINE_PRO, + FN_MSGAREAS_PRO, + FN_PVTFILES_PB; + +const int ERR_BINLOG_PB = 6; +const int ERR_TIMELOG_PRO = 7; +const int ERR_ONLINE_PRO = 9; +const int ERR_AKA_PRO = 10; +const int ERR_USERS_BBS = 11; +const int ERR_USERSXI_BBS = 12; +const int ERR_USERSIDX_BBS = 13; +const int ERR_USERSPB_BBS = 14; +const int ERR_LASTREAD_BBS = 15; + +extern char *EMPTY_STRING; + +#define COLOR_RED 1 +#define COLOR_GREEN 2 +#define COLOR_YELLOW 3 +#define COLOR_BLUE 4 +#define COLOR_MAGENTA 5 +#define COLOR_CYAN 6 +#define COLOR_WHITE 7 +#define COLOR_BLINK 0x80 + +#define ERRLVL_FATALERR 1 + +#define READMSG_ALL 1 +#define READMSG_FWD 1 +#define READMSG_REV 2 +#define READMSG_SEL 3 +#define READMSG_SEARCH 4 +#define READMSG_NEW 5 +#define READMSG_INDIV 6 +#define READMSG_MARKED 7 + +#define ANS_OK 0 // showansasc retval if ok +#define ANS_STOP 1 // showansasc retval if file stopped +#define ANS_NOFILE 2 // showansasc retval if no file + +#define ansi_mode (user.uFlags & UFLAG_ANSI) +#define cls_mode (user.uFlags & UFLAG_CLEAR) +#define pause_mode (user.uFlags & UFLAG_PAUSE) +#define fsed_mode (user.uFlags & UFLAG_FSED) +#define rip_mode (rip_detected && !(user.uFlags & UFLAG_NORIP)) +#define stack_mode (!(user.uFlags & UFLAG_HOTKEYS)) +#define no_ibm (user.uFlags & UFLAG_NOIBM) +#define avatar (user.uFlags & UFLAG_AVATAR) +#define avtplus (user.uFlags & UFLAG_AVTPLUS) + +struct DownloadFile + { + int area; + long size; + bool free; + bool copy; + String name; + }; + +#include "prompts.hpp" + +bool ReadLanguage( char *langname ); + +char wait_language_hotkeys(char *hk, bool enter = TRUE); +int language_string_length( char *str ); + + + +#include "reg.hpp" + + +#endif + diff --git a/PROBOARD.LOG b/PROBOARD.LOG new file mode 100644 index 0000000..619c85a --- /dev/null +++ b/PROBOARD.LOG @@ -0,0 +1,455 @@ +23-May-95 20:57:21 ----------------------------------------------------- +23-May-95 20:57:21 Local login +23-May-95 20:57:22 Sysop hung up +23-May-95 20:57:50 ----------------------------------------------------- +23-May-95 20:57:50 Local login +23-May-95 20:57:51 Sysop hung up +23-May-95 20:58:09 ----------------------------------------------------- +23-May-95 20:58:09 Local login +23-May-95 20:58:11 User logged in: Philippe Leybaert +23-May-95 20:58:11 Calling from Zelzate - Level 65001 +23-May-95 20:58:18 Sysop hung up +23-May-95 20:58:51 s = ' Scanning user database...TEST....' +23-May-95 20:58:51 ----------------------------------------------------- +23-May-95 20:58:51 Local login +23-May-95 20:58:53 Sysop hung up +23-May-95 21:00:20 s = ' Scanning user database...TEST....' +23-May-95 21:00:20 ----------------------------------------------------- +23-May-95 21:00:20 Local login +23-May-95 21:00:23 Sysop hung up +23-May-95 21:10:41 ----------------------------------------------------- +23-May-95 21:10:41 Local login +23-May-95 21:10:42 Can't read file +23-May-95 21:10:42 User logged in: Philippe Leybaert +23-May-95 21:10:42 Calling from Zelzate - Level 65001 +23-May-95 21:10:46 Sysop hung up +23-May-95 21:11:04 ----------------------------------------------------- +23-May-95 21:11:04 Local login +23-May-95 21:11:05 User logged in: Philippe Leybaert +23-May-95 21:11:05 Calling from Zelzate - Level 65001 +23-May-95 21:11:12 Sysop hung up +23-May-95 21:12:08 ----------------------------------------------------- +23-May-95 21:12:08 Local login +23-May-95 21:12:09 User logged in: Philippe Leybaert +23-May-95 21:12:09 Calling from Zelzate - Level 65001 +23-May-95 21:12:10 Sysop hung up +23-May-95 21:12:53 ----------------------------------------------------- +23-May-95 21:12:53 Local login +23-May-95 21:12:55 User logged in: Philippe Leybaert +23-May-95 21:12:55 Calling from Zelzate - Level 65001 +23-May-95 21:12:56 Sysop hung up +23-May-95 21:13:35 ----------------------------------------------------- +23-May-95 21:13:35 Local login +23-May-95 21:13:38 fname found = 'SCANNING' +23-May-95 21:13:39 User logged in: Philippe Leybaert +23-May-95 21:13:39 Calling from Zelzate - Level 65001 +23-May-95 21:13:41 Sysop hung up +05-Jun-95 12:27:23 ----------------------------------------------------- +05-Jun-95 12:27:23 Local login +05-Jun-95 12:27:27 User logged in: Ronny Minjou +05-Jun-95 12:27:27 Calling from Ertvelde - Level 50 +05-Jun-95 12:27:33 Sysop hung up +05-Jun-95 12:29:10 ----------------------------------------------------- +05-Jun-95 12:29:10 Local login +05-Jun-95 12:29:16 User logged in: Ronny Minjou +05-Jun-95 12:29:16 Calling from Ertvelde - Level 50 +05-Jun-95 12:45:39 Message #313 received (area 1) +05-Jun-95 12:48:38 Message #902 received (area 4) +05-Jun-95 12:55:53 ----------------------------------------------------- +05-Jun-95 12:55:53 Local login +05-Jun-95 12:55:57 User logged in: Ronny Minjou +05-Jun-95 12:55:57 Calling from Ertvelde - Level 50 +05-Jun-95 12:57:15 Message #313 received (area 1) +05-Jun-95 12:58:14 Message #902 received (area 4) +05-Jun-95 12:59:24 Message #313 received (area 1) +05-Jun-95 13:02:11 Message #902 received (area 4) +05-Jun-95 13:02:17 Sysop hung up +05-Jun-95 13:03:07 ----------------------------------------------------- +05-Jun-95 13:03:07 Local login +05-Jun-95 13:03:08 User logged in: Philippe Leybaert +05-Jun-95 13:03:08 Calling from Zelzate - Level 65001 +05-Jun-95 13:03:09 Menu: TOP +05-Jun-95 13:03:09 Menu: MAIN +05-Jun-95 13:03:10 Menu: FILES +05-Jun-95 13:03:11 Files listed (ProBoard BBS Software) +05-Jun-95 13:03:51 Menu: FILES +05-Jun-95 13:03:54 Sysop hung up +07-Jun-95 13:58:26 ----------------------------------------------------- +07-Jun-95 13:58:26 Local login +07-Jun-95 13:58:27 User logged in: Philippe Leybaert +07-Jun-95 13:58:27 Calling from Zelzate - Level 65001 +07-Jun-95 13:58:30 Menu: TOP +07-Jun-95 13:58:30 Menu: MAIN +07-Jun-95 13:58:31 Menu: SETUP +07-Jun-95 13:58:45 Screenlength changed to 25 +07-Jun-95 13:58:45 Menu: MAIN +07-Jun-95 13:58:46 Menu: UTIL +07-Jun-95 13:58:57 Version info requested +07-Jun-95 13:58:58 Version info requested +07-Jun-95 13:58:59 Version info requested +07-Jun-95 13:59:00 Version info requested +07-Jun-95 13:59:01 Version info requested +07-Jun-95 13:59:01 Version info requested +07-Jun-95 13:59:02 Version info requested +07-Jun-95 13:59:03 Version info requested +07-Jun-95 13:59:04 Version info requested +07-Jun-95 13:59:04 Version info requested +07-Jun-95 13:59:05 Version info requested +07-Jun-95 13:59:12 Sysop hung up +07-Jun-95 14:04:32 ----------------------------------------------------- +07-Jun-95 14:04:32 Local login +07-Jun-95 14:04:33 User logged in: Philippe Leybaert +07-Jun-95 14:04:33 Calling from Zelzate - Level 65001 +07-Jun-95 14:04:34 Menu: TOP +07-Jun-95 14:04:34 Menu: MAIN +07-Jun-95 14:04:36 Menu: SETUP +07-Jun-95 14:24:55 ----------------------------------------------------- +07-Jun-95 14:24:55 Local login +07-Jun-95 14:24:56 User logged in: Philippe Leybaert +07-Jun-95 14:24:56 Calling from Zelzate - Level 65001 +07-Jun-95 14:24:57 Menu: TOP +07-Jun-95 14:24:57 Menu: MAIN +07-Jun-95 14:24:58 Menu: MAIL +07-Jun-95 14:24:59 Menu: MAIN +07-Jun-95 14:25:00 Menu: SETUP +07-Jun-95 14:28:30 ----------------------------------------------------- +07-Jun-95 14:28:30 Local login +07-Jun-95 14:28:31 User logged in: Philippe Leybaert +07-Jun-95 14:28:31 Calling from Zelzate - Level 65001 +07-Jun-95 14:28:32 Menu: TOP +07-Jun-95 14:28:32 Menu: MAIN +07-Jun-95 14:28:33 Menu: SETUP +07-Jun-95 14:28:51 ----------------------------------------------------- +07-Jun-95 14:28:51 Local login +07-Jun-95 14:28:52 User logged in: Philippe Leybaert +07-Jun-95 14:28:52 Calling from Zelzate - Level 65001 +07-Jun-95 14:28:53 Menu: TOP +07-Jun-95 14:28:53 Menu: MAIN +07-Jun-95 14:28:53 Menu: MAIL +07-Jun-95 14:29:08 Menu: MAIN +07-Jun-95 14:29:11 Menu: SETUP +07-Jun-95 14:29:23 Sysop hung up +07-Jun-95 19:45:39 ----------------------------------------------------- +07-Jun-95 19:45:39 Local login +07-Jun-95 19:45:40 User logged in: Philippe Leybaert +07-Jun-95 19:45:40 Calling from Zelzate - Level 65001 +07-Jun-95 19:45:41 Menu: TOP +07-Jun-95 19:45:41 Menu: MAIN +07-Jun-95 19:45:42 Menu: MAIL +07-Jun-95 19:45:44 Menu: MAIN +07-Jun-95 19:45:45 Menu: SETUP +07-Jun-95 19:47:03 ----------------------------------------------------- +07-Jun-95 19:47:03 Local login +07-Jun-95 19:47:03 User logged in: Philippe Leybaert +07-Jun-95 19:47:03 Calling from Zelzate - Level 65001 +07-Jun-95 19:47:04 Menu: TOP +07-Jun-95 19:47:04 Menu: MAIN +07-Jun-95 19:47:07 Menu: SETUP +07-Jun-95 19:47:14 Sysop hung up +08-Jun-95 10:19:41 ----------------------------------------------------- +08-Jun-95 10:19:41 Local login +08-Jun-95 10:19:42 User logged in: Philippe Leybaert +08-Jun-95 10:19:42 Calling from Zelzate - Level 65001 +08-Jun-95 10:19:43 Menu: TOP +08-Jun-95 10:19:43 Menu: MAIN +08-Jun-95 10:19:43 Menu: MAIL +08-Jun-95 10:19:45 Menu: MAIN +08-Jun-95 10:19:45 Menu: FILES +08-Jun-95 10:19:46 Files listed (ProBoard BBS Software) +08-Jun-95 10:19:53 Menu: MAIN +08-Jun-95 10:19:53 Menu: SETUP +08-Jun-95 10:19:55 Page pausing enabled +08-Jun-95 10:19:56 Menu: SETUP +08-Jun-95 10:19:57 Menu: MAIN +08-Jun-95 10:19:58 Menu: FILES +08-Jun-95 10:19:59 Files listed (ProBoard BBS Software) +08-Jun-95 10:20:09 New files listed +08-Jun-95 10:22:04 Sysop hung up +08-Jun-95 10:22:54 ----------------------------------------------------- +08-Jun-95 10:22:54 Local login +08-Jun-95 10:22:54 User logged in: Philippe Leybaert +08-Jun-95 10:22:54 Calling from Zelzate - Level 65001 +08-Jun-95 10:22:55 Menu: TOP +08-Jun-95 10:22:55 Menu: MAIN +08-Jun-95 10:22:55 Menu: FILES +08-Jun-95 10:22:56 Files listed (FrontDoor Inbound) +08-Jun-95 10:23:11 Sysop hung up +26-Jun-95 18:32:01 ----------------------------------------------------- +26-Jun-95 18:32:01 Local login +26-Jun-95 18:32:02 User logged in: Philippe Leybaert +26-Jun-95 18:32:02 Calling from Zelzate - Level 65001 +26-Jun-95 18:32:06 Menu: TOP +26-Jun-95 18:32:06 Menu: MAIN +26-Jun-95 18:32:07 Menu: UTIL +26-Jun-95 18:32:12 Sysop hung up +12-Jul-95 10:14:22 ----------------------------------------------------- +12-Jul-95 10:14:22 Local login +12-Jul-95 10:14:22 crc = 113E8AB0 +12-Jul-95 10:15:04 ----------------------------------------------------- +12-Jul-95 10:15:04 Local login +12-Jul-95 10:18:54 Sysop hung up +15-Jul-95 15:45:48 ----------------------------------------------------- +15-Jul-95 15:45:48 Local login +15-Jul-95 15:45:50 User logged in: Philippe Leybaert +15-Jul-95 15:45:52 Calling from Zelzate - Level 65001 +15-Jul-95 15:45:53 Menu: TOP +15-Jul-95 15:45:53 Menu: MAIN +15-Jul-95 15:45:54 Menu: FILES +15-Jul-95 15:45:56 Files listed (ProBoard BBS Software) +15-Jul-95 15:46:42 Menu: FILES +15-Jul-95 15:48:00 Menu: FILES +15-Jul-95 15:48:21 Menu: FILES +15-Jul-95 15:48:50 Menu: FILES +15-Jul-95 15:48:52 Sysop hung up +15-Jul-95 15:50:51 ----------------------------------------------------- +15-Jul-95 15:50:51 Local login +15-Jul-95 15:50:52 User logged in: Philippe Leybaert +15-Jul-95 15:50:55 Calling from Zelzate - Level 65001 +15-Jul-95 15:51:23 Message #151 received (area 1) +15-Jul-95 15:51:24 Message #154 received (area 1) +15-Jul-95 15:51:25 Menu: TOP +15-Jul-95 15:51:26 Menu: MAIN +15-Jul-95 15:51:29 Menu: FILES +15-Jul-95 15:51:30 Files listed (ProBoard BBS Software) +15-Jul-95 15:52:17 Sysop hung up +16-Jul-95 08:29:20 ----------------------------------------------------- +16-Jul-95 08:29:20 Local login +16-Jul-95 08:32:23 Sysop hung up +16-Jul-95 08:39:25 ----------------------------------------------------- +16-Jul-95 08:39:25 Local login +16-Jul-95 08:39:27 Sysop hung up +16-Jul-95 11:08:57 ----------------------------------------------------- +16-Jul-95 11:08:57 Local login +16-Jul-95 11:08:59 User logged in: Philippe Leybaert +16-Jul-95 11:09:00 Sysop hung up +16-Jul-95 11:09:24 ----------------------------------------------------- +16-Jul-95 11:09:24 Local login +16-Jul-95 11:09:25 User logged in: Philippe Leybaert +16-Jul-95 11:09:49 Sysop hung up +16-Jul-95 11:14:59 ----------------------------------------------------- +16-Jul-95 11:14:59 Local login +16-Jul-95 11:15:00 User logged in: Philippe Leybaert +16-Jul-95 11:15:03 Sysop hung up +17-Jul-95 15:52:07 ----------------------------------------------------- +17-Jul-95 15:52:07 Local login +17-Jul-95 15:52:09 User logged in: Philippe Leybaert +17-Jul-95 15:52:12 Calling from Zelzate - Level 65001 +17-Jul-95 15:52:14 Menu: TOP +17-Jul-95 15:52:15 Menu: MAIN +17-Jul-95 15:52:16 Sysop hung up +17-Jul-95 16:00:55 ----------------------------------------------------- +17-Jul-95 16:00:55 Local login +17-Jul-95 16:00:56 User not located : Test User +17-Jul-95 16:01:01 Creating new user. +17-Jul-95 16:01:28 New user created. +17-Jul-95 16:01:29 Calling from fhdskfhsdkf - Level 50 +17-Jul-95 16:01:36 Sysop hung up +17-Jul-95 16:02:09 ----------------------------------------------------- +17-Jul-95 16:02:09 Local login +17-Jul-95 16:02:10 User logged in: Philippe Leybaert +17-Jul-95 16:02:10 Calling from Zelzate - Level 65001 +17-Jul-95 16:03:39 Sysop hung up +17-Jul-95 16:04:02 ----------------------------------------------------- +17-Jul-95 16:04:02 Local login +17-Jul-95 16:04:07 User not located : Uuu Uuu +17-Jul-95 16:04:10 Name misspelled (Uuu Uuu). +17-Jul-95 16:04:14 User not located : Uu Uu +17-Jul-95 16:04:15 Creating new user. +17-Jul-95 16:04:18 Sysop hung up +31-Jul-95 14:14:00 ----------------------------------------------------- +31-Jul-95 14:14:00 Local login +31-Jul-95 14:14:39 ----------------------------------------------------- +31-Jul-95 14:14:39 Local login +31-Jul-95 14:14:55 ----------------------------------------------------- +31-Jul-95 14:14:55 Local login +31-Jul-95 14:14:55 crc = 4E964376 +31-Jul-95 14:15:23 ----------------------------------------------------- +31-Jul-95 14:15:23 Local login +31-Jul-95 14:15:26 Sysop hung up +31-Jul-95 14:16:56 ----------------------------------------------------- +31-Jul-95 14:16:57 Local login +31-Jul-95 14:16:57 crc = 4E964376 +31-Jul-95 14:18:09 ----------------------------------------------------- +31-Jul-95 14:18:13 Local login +31-Jul-95 14:22:30 ----------------------------------------------------- +31-Jul-95 14:22:30 Local login +31-Jul-95 14:22:30 crc = 4E964376 +31-Jul-95 14:22:57 ----------------------------------------------------- +31-Jul-95 14:22:57 Local login +31-Jul-95 14:22:57 crc = 4E964376 +31-Jul-95 14:25:16 ----------------------------------------------------- +31-Jul-95 14:25:16 Local login +31-Jul-95 14:25:17 crc = 4E964376 +22-Aug-95 19:40:00 ----------------------------------------------------- +22-Aug-95 19:40:00 Local login +22-Aug-95 19:40:01 User logged in: Philippe Leybaert +22-Aug-95 19:40:02 Calling from Zelzate - Level 65001 +22-Aug-95 19:40:10 Menu: TOP +22-Aug-95 19:40:11 Menu: MAIN +22-Aug-95 19:40:15 Sysop hung up +22-Aug-95 19:40:25 ----------------------------------------------------- +22-Aug-95 19:40:25 Local login +22-Aug-95 19:40:26 User logged in: Philippe Leybaert +22-Aug-95 19:40:28 Calling from Zelzate - Level 65001 +22-Aug-95 19:40:29 Menu: TOP +22-Aug-95 19:40:29 Menu: MAIN +22-Aug-95 19:40:30 Menu: FILES +22-Aug-95 19:40:30 Files listed (Night Owl - Win Games) +22-Aug-95 19:40:30 Can't open file list F:\058A\FILES.BBS +22-Aug-95 19:40:31 Files listed (Night Owl - Win Games) +22-Aug-95 19:40:31 Can't open file list F:\058A\FILES.BBS +22-Aug-95 19:40:33 Menu: FILES +22-Aug-95 19:40:34 Files listed (ProBoard BBS Software) +22-Aug-95 19:40:39 Sysop hung up +22-Aug-95 19:41:04 ----------------------------------------------------- +22-Aug-95 19:41:05 Incoming call at 2 bps +22-Aug-95 19:41:05 Carrier lost! +22-Aug-95 19:41:34 ----------------------------------------------------- +22-Aug-95 19:41:35 Incoming call at 2 bps +22-Aug-95 19:41:36 Carrier lost! +22-Aug-95 19:41:38 ----------------------------------------------------- +22-Aug-95 19:41:38 Local login +22-Aug-95 19:41:44 User logged in: Rutger Lasuy +22-Aug-95 19:41:44 Calling from Serskamp - Level 100 +22-Aug-95 19:41:48 Message #1 read (area 20) +22-Aug-95 19:41:50 Message #2 read (area 20) +22-Aug-95 19:42:17 Files listed (ProBoard BBS Software) +22-Aug-95 19:42:26 Files listed (ProBoard BBS Software) +22-Aug-95 19:42:31 Sysop hung up +22-Aug-95 19:43:06 ----------------------------------------------------- +22-Aug-95 19:43:06 Local login +22-Aug-95 19:43:07 User logged in: Philippe Leybaert +22-Aug-95 19:43:07 Calling from Zelzate - Level 65001 +22-Aug-95 19:43:26 Menu: TOP +22-Aug-95 19:43:26 Menu: MAIN +22-Aug-95 19:43:27 Sysop hung up +22-Aug-95 19:43:34 ----------------------------------------------------- +22-Aug-95 19:43:34 Local login +22-Aug-95 19:43:34 Sysop hung up +22-Aug-95 19:43:42 ----------------------------------------------------- +22-Aug-95 19:43:42 Local login +22-Aug-95 19:43:44 User logged in: Philippe Leybaert +22-Aug-95 19:43:44 Calling from Zelzate - Level 65001 +22-Aug-95 19:44:03 Menu: TOP +22-Aug-95 19:44:03 Menu: MAIN +22-Aug-95 19:44:14 Menu: FILES +22-Aug-95 19:44:20 Menu: FILES +22-Aug-95 19:44:23 Files listed (General ProBoard Utilities) +22-Aug-95 19:44:28 Sysop hung up +22-Aug-95 19:51:05 ----------------------------------------------------- +22-Aug-95 19:51:05 Local login +22-Aug-95 19:51:06 User logged in: Philippe Leybaert +22-Aug-95 19:51:06 Calling from Zelzate - Level 65001 +22-Aug-95 19:51:25 Menu: TOP +22-Aug-95 19:51:25 Menu: MAIN +22-Aug-95 19:51:27 Menu: FILES +22-Aug-95 19:51:29 Files listed (General ProBoard Utilities) +22-Aug-95 19:52:00 Sysop hung up +22-Aug-95 19:52:02 ----------------------------------------------------- +22-Aug-95 19:52:02 Local login +22-Aug-95 19:52:06 User logged in: Rutger Lasuy +22-Aug-95 19:52:06 Calling from Serskamp - Level 100 +22-Aug-95 19:52:11 Files listed (ProBoard BBS Software) +22-Aug-95 19:52:13 Sysop hung up +22-Aug-95 19:52:53 ----------------------------------------------------- +22-Aug-95 19:52:53 Local login +22-Aug-95 19:52:54 User logged in: Philippe Leybaert +22-Aug-95 19:52:54 Calling from Zelzate - Level 65001 +22-Aug-95 19:53:13 Menu: TOP +22-Aug-95 19:53:13 Menu: MAIN +22-Aug-95 19:53:14 Menu: FILES +22-Aug-95 19:53:15 Files listed (General ProBoard Utilities) +22-Aug-95 19:53:17 Sysop hung up +22-Aug-95 19:53:25 ----------------------------------------------------- +22-Aug-95 19:53:25 Local login +22-Aug-95 19:53:30 Sysop hung up +09-Sep-95 18:11:49 ----------------------------------------------------- +09-Sep-95 18:11:49 Local login +09-Sep-95 18:11:49 crc = 969841F3 +09-Sep-95 18:13:03 ----------------------------------------------------- +09-Sep-95 18:13:04 Local login +09-Sep-95 18:13:05 Sysop hung up +09-Sep-95 18:16:08 ----------------------------------------------------- +09-Sep-95 18:16:08 Local login +09-Sep-95 18:16:30 ----------------------------------------------------- +09-Sep-95 18:16:30 Local login +09-Sep-95 18:16:30 crc = C5021A77 +09-Sep-95 18:17:16 ----------------------------------------------------- +09-Sep-95 18:17:16 Local login +09-Sep-95 18:17:26 Sysop hung up +26-Sep-95 15:36:03 ----------------------------------------------------- +26-Sep-95 15:36:03 Local login +26-Sep-95 15:36:05 Sysop hung up +26-Sep-95 15:45:50 ----------------------------------------------------- +26-Sep-95 15:45:50 Local login +26-Sep-95 15:45:52 Sysop hung up +26-Sep-95 15:48:56 ----------------------------------------------------- +26-Sep-95 15:48:56 Local login +26-Sep-95 15:48:56 User logged in: Philippe Leybaert +26-Sep-95 15:48:57 Calling from Zelzate - Level 65001 +26-Sep-95 15:49:12 Menu: TOP +26-Sep-95 15:49:12 Menu: MAIN +26-Sep-95 15:49:12 Menu: MAIN +26-Sep-95 15:49:13 Menu: MAIL +26-Sep-95 15:49:17 Area #10 toggled for mailcheck +26-Sep-95 15:49:19 Menu: MAIN +26-Sep-95 15:49:20 Menu: SETUP +26-Sep-95 15:49:34 Sysop hung up +01-Oct-95 21:42:22 ----------------------------------------------------- +01-Oct-95 21:42:22 Local login +01-Oct-95 21:42:24 User logged in: Philippe Leybaert +01-Oct-95 21:42:24 Calling from Zelzate - Level 65001 +01-Oct-95 21:42:27 Menu: TOP +01-Oct-95 21:42:27 Menu: MAIN +01-Oct-95 21:42:29 Sysop hung up +21-Mar-96 22:42:09 ----------------------------------------------------- +21-Mar-96 22:42:09 Local login +21-Mar-96 22:42:10 User logged in: Philippe Leybaert +21-Mar-96 22:42:10 Calling from Zelzate - Level 65001 +21-Mar-96 22:42:12 Menu: TOP +21-Mar-96 22:42:12 Menu: MAIN +21-Mar-96 22:42:13 Menu: MAIL +21-Mar-96 22:42:17 Msg aborted (Area 1) +21-Mar-96 22:42:18 Sysop hung up +28-Apr-96 22:48:17 ----------------------------------------------------- +28-Apr-96 22:48:17 Local login +28-Apr-96 22:48:19 Sysop hung up +28-Apr-96 22:49:17 Going down on external request +28-Apr-96 22:49:51 Going down on external request +25-Mar-97 19:18:09 ----------------------------------------------------- +25-Mar-97 19:18:09 Local login +25-Mar-97 19:18:11 Sysop hung up +25-Mar-97 19:18:31 ----------------------------------------------------- +25-Mar-97 19:18:31 Local login +25-Mar-97 19:18:31 crc = B60A3DB8 +25-Mar-97 19:20:44 ----------------------------------------------------- +25-Mar-97 19:20:44 Local login +25-Mar-97 19:20:48 User logged in: Philippe Leybaert +25-Mar-97 19:20:48 Calling from Zelzate - Level 64000 +25-Mar-97 19:20:50 Menu: TOP +25-Mar-97 19:20:50 Menu: MAIN +25-Mar-97 19:20:51 Sysop hung up +25-Mar-97 19:23:26 ----------------------------------------------------- +25-Mar-97 19:23:26 Local login +25-Mar-97 19:24:11 ----------------------------------------------------- +25-Mar-97 19:24:11 Local login +25-Mar-97 19:24:46 ----------------------------------------------------- +25-Mar-97 19:24:46 Local login +25-Mar-97 19:26:01 User logged in: Philippe Leybaert +25-Mar-97 19:26:01 Calling from Zelzate - Level 64000 +25-Mar-97 19:26:02 Menu: TOP +25-Mar-97 19:26:02 Menu: MAIN +25-Mar-97 19:26:04 Menu: FILES +25-Mar-97 19:26:04 Files listed (Echomail Processors) +25-Mar-97 19:26:24 Sysop hung up +01-May-97 21:47:25 ----------------------------------------------------- +01-May-97 21:47:25 Local login +01-May-97 21:47:27 User logged in: Philippe Leybaert +01-May-97 21:47:27 Calling from Zelzate - Level 64000 +01-May-97 21:47:29 Menu: TOP +01-May-97 21:47:29 Menu: MAIN +01-May-97 21:47:30 Menu: UTIL +01-May-97 21:47:31 Version info requested +01-May-97 21:47:43 Sysop hung up +19-May-99 18:14:50 Fatal error: Error accessing file I:\CPP\PB\PROBOARD\CONFIG.PRO (2 - File not found) +19-May-99 18:15:01 Fatal error: Error accessing file I:\CPP\PB\PROBOARD\CONFIG.PRO (2 - File not found) diff --git a/PROBOARD.MAP b/PROBOARD.MAP new file mode 100644 index 0000000..a42c92f --- /dev/null +++ b/PROBOARD.MAP @@ -0,0 +1,257 @@ + + Start Stop Length Name Class + + 00000H 0676EH 0676FH _TEXT CODE + 06770H 06770H 00000H EXEC_TEXT CODE + 06770H 08BE8H 02479H IO_TEXT CODE + 08BEAH 08D0FH 00126H FOSSIL_TEXT CODE + 08D10H 0A36CH 0165DH MISC_TEXT CODE + 0A36DH 0AE91H 00B25H TIMER_TEXT CODE + 0AE92H 0B29BH 0040AH FUZZY_TEXT CODE + 0B29CH 0C4EEH 01253H _OVRTEXT_ CODE + 0C4EFH 0CBC6H 006D8H PB_LIB_TEXT CODE + 0CBC7H 0D3A7H 007E1H LANG_TEXT CODE + 0D3A8H 0FC9EH 028F7H USER_TEXT CODE + 0FC9FH 111D5H 01537H DATE_TEXT CODE + 111D6H 11453H 0027EH DIRSCAN_TEXT CODE + 11454H 1148BH 00038H FIND_TEXT CODE + 1148CH 12409H 00F7EH DSTRING_TEXT CODE + 1240AH 125AAH 001A1H BITARRAY_TEXT CODE + 125ABH 12624H 0007AH SOUND_TEXT CODE + 12625H 126F8H 000D4H CRC16_TEXT CODE + 126F9H 1283DH 00145H CRC32_TEXT CODE + 1283EH 128A5H 00068H FORM_TEXT CODE + 128A6H 129BFH 0011AH MSDOS_TEXT CODE + 129C0H 12EDEH 0051FH FNAME_TEXT CODE + 12EDFH 14210H 01332H FILE_TEXT CODE + 14211H 14848H 00638H INIVAR_TEXT CODE + 14849H 14ECEH 00686H DIRFUNC_TEXT CODE + 14ECFH 15121H 00253H COPYFILE_TEXT CODE + 15122H 15284H 00163H INIT_TEXT CODE + 15285H 153D8H 00154H KEYBOARD_TEXT CODE + 153D9H 1587EH 004A6H RECTANG_TEXT CODE + 1587FH 1745AH 01BDCH WINDOW_TEXT CODE + 1745CH 1790CH 004B1H PWS_ASM_TEXT CODE + 1790DH 17B21H 00215H SAVEBUF_TEXT CODE + 17B22H 17BADH 0008CH TSW_ASM_TEXT CODE + 17BB0H 17BB0H 00000H _FARDATA FAR_DATA + 17BB0H 1837FH 007D0H PROBOARD5_DATA FAR_DATA + 18380H 18380H 00000H _FARBSS FAR_BSS + 18380H 18380H 00000H _OVERLAY_ OVRINFO + 18380H 18486H 00107H _OVRDATA_ OVRINFO + 18490H 184AFH 00020H _STUB_ OVRINFO + 184B0H 184BFH 00010H _EXTSEG_ OVRINFO + 184C0H 184CFH 00010H _EMSSEG_ OVRINFO + 184D0H 1851FH 00050H _VDISKSEG_ OVRINFO + 18520H 189F7H 004D8H _EXEINFO_ OVRINFO + 18A00H 18A00H 00000H _1STUB_ STUBSEG + 18A00H 18A5BH 0005CH MENU_TEXT STUBSEG + 18A60H 18A89H 0002AH CHAT_TEXT STUBSEG + 18A90H 18AD2H 00043H SHELL_TEXT STUBSEG + 18AE0H 18B13H 00034H LOGIN_TEXT STUBSEG + 18B20H 18B44H 00025H PBUSER_TEXT STUBSEG + 18B50H 18B83H 00034H READMSG_TEXT STUBSEG + 18B90H 18BB9H 0002AH MAILCHK_TEXT STUBSEG + 18BC0H 18C39H 0007AH MSG_TEXT STUBSEG + 18C40H 18C69H 0002AH ZIP_TEXT STUBSEG + 18C70H 18C9EH 0002FH WRITEMSG_TEXT STUBSEG + 18CA0H 18CC4H 00025H TOPS_TEXT STUBSEG + 18CD0H 18CF4H 00025H FORWARD_TEXT STUBSEG + 18D00H 18D24H 00025H REPLYMSG_TEXT STUBSEG + 18D30H 18D54H 00025H TIMESTAT_TEXT STUBSEG + 18D60H 18D84H 00025H MSGDEL_TEXT STUBSEG + 18D90H 18DB9H 0002AH COMBINED_TEXT STUBSEG + 18DC0H 18DE4H 00025H QUESTION_TEXT STUBSEG + 18DF0H 18E14H 00025H AKA_TEXT STUBSEG + 18E20H 18E44H 00025H QSCANMSG_TEXT STUBSEG + 18E50H 18E74H 00025H SHOWMSG_TEXT STUBSEG + 18E80H 18EA4H 00025H SCANMSG_TEXT STUBSEG + 18EB0H 18ED4H 00025H VERSION_TEXT STUBSEG + 18EE0H 18F04H 00025H RAWDIR_TEXT STUBSEG + 18F10H 18F6BH 0005CH MSGED_TEXT STUBSEG + 18F70H 19084H 00115H DL_TEXT STUBSEG + 19090H 190BEH 0002FH VIEWFILE_TEXT STUBSEG + 190C0H 190E4H 00025H LASTCALL_TEXT STUBSEG + 190F0H 1911EH 0002FH DESQVIEW_TEXT STUBSEG + 19120H 1914EH 0002FH STACKING_TEXT STUBSEG + 19150H 1917EH 0002FH CLEANUP_TEXT STUBSEG + 19180H 191A4H 00025H SYSOPKEY_TEXT STUBSEG + 191B0H 191DEH 0002FH MSGFIND_TEXT STUBSEG + 191E0H 19209H 0002AH BINLOG_TEXT STUBSEG + 19210H 1923EH 0002FH PROTOCOL_TEXT STUBSEG + 19240H 192D2H 00093H LISTFILE_TEXT STUBSEG + 192E0H 19377H 00098H UL_TEXT STUBSEG + 19380H 193AEH 0002FH TAG_TEXT STUBSEG + 193B0H 193DEH 0002FH SELLANG_TEXT STUBSEG + 193E0H 1947CH 0009DH PROBOARD_TEXT STUBSEG + 19480H 194A4H 00025H NODELIST_TEXT STUBSEG + 194B0H 194F7H 00048H ONLINE_TEXT STUBSEG + 19500H 19524H 00025H MSGMOVE_TEXT STUBSEG + 19530H 1955EH 0002FH CDROM_TEXT STUBSEG + 19560H 195A2H 00043H REGIS_TEXT STUBSEG + 195B0H 19601H 00052H MCHAT_TEXT STUBSEG + 19610H 19643H 00034H SETAREA_TEXT STUBSEG + 19650H 19679H 0002AH USERED_TEXT STUBSEG + 19680H 196A4H 00025H DECKEY_TEXT STUBSEG + 196B0H 196D4H 00025H MUSIC_TEXT STUBSEG + 196E0H 19704H 00025H GIF_TEXT STUBSEG + 19710H 1973EH 0002FH MSGEXPRT_TEXT STUBSEG + 19740H 19778H 00039H HELP_TEXT STUBSEG + 19780H 197B3H 00034H EGA_TEXT STUBSEG + 197C0H 197E9H 0002AH EVENT_TEXT STUBSEG + 197F0H 19832H 00043H FILEAREA_TEXT STUBSEG + 19840H 19882H 00043H MSGAREA_TEXT STUBSEG + 19890H 198B9H 0002AH TIMELOG_TEXT STUBSEG + 198C0H 198E4H 00025H WORDWRAP_TEXT STUBSEG + 198F0H 19923H 00034H SHOWANS_TEXT STUBSEG + 19930H 199BDH 0008EH USERSET_TEXT STUBSEG + 199C0H 199F3H 00034H USAGE_TEXT STUBSEG + 19A00H 19EACH 004ADH LOADPEX_TEXT STUBSEG + 19EB0H 19ED4H 00025H IMAGE_TEXT STUBSEG + 19EE0H 19F09H 0002AH POSTMSG_TEXT STUBSEG + 19F10H 19F34H 00025H PEXCALL_TEXT STUBSEG + 19F40H 19F64H 00025H STRVARS_TEXT STUBSEG + 19F70H 19F9EH 0002FH USERWIN_TEXT STUBSEG + 19FA0H 19FC4H 00025H BULLETIN_TEXT STUBSEG + 19FD0H 1A008H 00039H MODEM_TEXT STUBSEG + 1A010H 1A034H 00025H EXECHECK_TEXT STUBSEG + 1A040H 1A07DH 0003EH LANGUAGE_TEXT STUBSEG + 1A080H 1A0A9H 0002AH FUZZY_TEXT STUBSEG + 1A0B0H 1A0E3H 00034H TERMINAL_TEXT STUBSEG + 1A0F0H 1A15FH 00070H SQUISH_TEXT STUBSEG + 1A160H 1A20BH 000ACH HUDSON_TEXT STUBSEG + 1A210H 1A25CH 0004DH MSGBASE_TEXT STUBSEG + 1A260H 1A2ACH 0004DH MARK_TEXT STUBSEG + 1A2B0H 1A351H 000A2H RIP_TEXT STUBSEG + 1A360H 1A406H 000A7H JAM_TEXT STUBSEG + 1A410H 1A434H 00025H INPDATE_TEXT STUBSEG + 1A440H 1A469H 0002AH TAG_RW_TEXT STUBSEG + 1A470H 1A494H 00025H 1STCHAR_TEXT STUBSEG + 1A4A0H 1A500H 00061H MSGAPI_TEXT STUBSEG + 1A510H 1A5A2H 00093H API_SDM_TEXT STUBSEG + 1A5B0H 1A66FH 000C0H API_SQ_TEXT STUBSEG + 1A670H 1A69EH 0002FH SQASM_TEXT STUBSEG + 1A6A0H 1A6CEH 0002FH CVTDATE_TEXT STUBSEG + 1A6D0H 1A6F4H 00025H DATE2BIN_TEXT STUBSEG + 1A700H 1A724H 00025H DOSDATE_TEXT STUBSEG + 1A730H 1A75EH 0002FH FEXIST_TEXT STUBSEG + 1A760H 1A793H 00034H FFIND_TEXT STUBSEG + 1A7A0H 1A7C4H 00025H FLUSHA_TEXT STUBSEG + 1A7D0H 1A7EFH 00020H MONTHS_TEXT STUBSEG + 1A7F0H 1A819H 0002AH PARSENN_TEXT STUBSEG + 1A820H 1A849H 0002AH QKSORT_TEXT STUBSEG + 1A850H 1A874H 00025H STRISTR_TEXT STUBSEG + 1A880H 1A8A4H 00025H STROCPY_TEXT STUBSEG + 1A8B0H 1A8D9H 0002AH TRAIL_TEXT STUBSEG + 1A8E0H 21AB7H 071D8H _DATA DATA + 21AB8H 21AB9H 00002H _CVTSEG DATA + 21ABAH 21ABFH 00006H _SCNSEG DATA + 21AC0H 21AC0H 00000H _CONST CONST + 21AC0H 21B31H 00072H _INIT_ INITDATA + 21B32H 21B32H 00000H _INITEND_ INITDATA + 21B32H 21B91H 00060H _EXIT_ EXITDATA + 21B92H 21B92H 00000H _EXITEND_ EXITDATA + 21B92H 25A45H 03EB4H _BSS BSS + 25A46H 25A46H 00000H _BSSEND BSSEND + 25A50H 25ACFH 00080H _STACK STACK + 25AE0H 27847H 01D68H MENU_TEXT :OVY + 279D0H 28213H 00844H CHAT_TEXT :OVY + 282F0H 2A77DH 0248EH SHELL_TEXT :OVY + 2AA60H 2CC12H 021B3H LOGIN_TEXT :OVY + 2CF50H 2D1AEH 0025FH PBUSER_TEXT :OVY + 2D1E0H 2FC58H 02A79H READMSG_TEXT :OVY + 2FF50H 3081EH 008CFH MAILCHK_TEXT :OVY + 308E0H 31B67H 01288H MSG_TEXT :OVY + 31C50H 327CBH 00B7CH ZIP_TEXT :OVY + 32890H 33DFAH 0156BH WRITEMSG_TEXT :OVY + 33FC0H 34428H 00469H TOPS_TEXT :OVY + 34470H 34950H 004E1H FORWARD_TEXT :OVY + 349C0H 35A72H 010B3H REPLYMSG_TEXT :OVY + 35B80H 36146H 005C7H TIMESTAT_TEXT :OVY + 361F0H 3625FH 00070H MSGDEL_TEXT :OVY + 36270H 367D3H 00564H COMBINED_TEXT :OVY + 36850H 37168H 00919H QUESTION_TEXT :OVY + 37200H 37304H 00105H AKA_TEXT :OVY + 37320H 38367H 01048H QSCANMSG_TEXT :OVY + 38480H 396C9H 0124AH SHOWMSG_TEXT :OVY + 39830H 3A8C2H 01093H SCANMSG_TEXT :OVY + 3A9E0H 3ABC6H 001E7H VERSION_TEXT :OVY + 3AC10H 3AE5FH 00250H RAWDIR_TEXT :OVY + 3AEA0H 3C083H 011E4H MSGED_TEXT :OVY + 3C1D0H 40706H 04537H DL_TEXT :OVY + 40B90H 40CB7H 00128H VIEWFILE_TEXT :OVY + 40CE0H 40D3FH 00060H LASTCALL_TEXT :OVY + 40D50H 40D83H 00034H DESQVIEW_TEXT :OVY + 40D90H 40E42H 000B3H STACKING_TEXT :OVY + 40E50H 412DAH 0048BH CLEANUP_TEXT :OVY + 41350H 4187EH 0052FH SYSOPKEY_TEXT :OVY + 418F0H 41B4DH 0025EH MSGFIND_TEXT :OVY + 41B60H 41E85H 00326H BINLOG_TEXT :OVY + 41ED0H 4231DH 0044EH PROTOCOL_TEXT :OVY + 42380H 453C3H 03044H LISTFILE_TEXT :OVY + 45700H 4818DH 02A8EH UL_TEXT :OVY + 48500H 488A3H 003A4H TAG_TEXT :OVY + 48910H 48E05H 004F6H SELLANG_TEXT :OVY + 48E80H 4A91AH 01A9BH PROBOARD_TEXT :OVY + 4AB70H 4B4E3H 00974H NODELIST_TEXT :OVY + 4B570H 4BD4DH 007DEH ONLINE_TEXT :OVY + 4BDE0H 4BFB4H 001D5H MSGMOVE_TEXT :OVY + 4BFE0H 4C639H 0065AH CDROM_TEXT :OVY + 4C6F0H 4D228H 00B39H REGIS_TEXT :OVY + 4D270H 4DDCCH 00B5DH MCHAT_TEXT :OVY + 4DEC0H 4F2ADH 013EEH SETAREA_TEXT :OVY + 4F430H 4F7F4H 003C5H USERED_TEXT :OVY + 4F840H 4FD4EH 0050FH DECKEY_TEXT :OVY + 4FD60H 5015BH 003FCH MUSIC_TEXT :OVY + 501B0H 5058EH 003DFH GIF_TEXT :OVY + 505F0H 51256H 00C67H MSGEXPRT_TEXT :OVY + 51320H 516D1H 003B2H HELP_TEXT :OVY + 51710H 51745H 00036H EGA_TEXT :OVY + 51750H 519B4H 00265H EVENT_TEXT :OVY + 519E0H 521CFH 007F0H FILEAREA_TEXT :OVY + 52240H 5292BH 006ECH MSGAREA_TEXT :OVY + 52970H 52CABH 0033CH TIMELOG_TEXT :OVY + 52CF0H 52DADH 000BEH WORDWRAP_TEXT :OVY + 52DC0H 52FF4H 00235H SHOWANS_TEXT :OVY + 53020H 54F7BH 01F5CH USERSET_TEXT :OVY + 55190H 5524FH 000C0H USAGE_TEXT :OVY + 55260H 59739H 044DAH LOADPEX_TEXT :OVY + 59C00H 59D18H 00119H IMAGE_TEXT :OVY + 59D30H 59FB6H 00287H POSTMSG_TEXT :OVY + 59FF0H 5A017H 00028H PEXCALL_TEXT :OVY + 5A020H 5AB21H 00B02H STRVARS_TEXT :OVY + 5ABC0H 5B1AEH 005EFH USERWIN_TEXT :OVY + 5B230H 5B3F2H 001C3H BULLETIN_TEXT :OVY + 5B420H 5D3BEH 01F9FH MODEM_TEXT :OVY + 5D5E0H 5D5E4H 00005H EXECHECK_TEXT :OVY + 5D5F0H 5DE0CH 0081DH LANGUAGE_TEXT :OVY + 5DE90H 5E298H 00409H FUZZY_TEXT :OVY + 5E2B0H 5E569H 002BAH TERMINAL_TEXT :OVY + 5E5A0H 609B7H 02418H SQUISH_TEXT :OVY + 60AE0H 634C7H 029E8H HUDSON_TEXT :OVY + 63730H 63A4CH 0031DH MSGBASE_TEXT :OVY + 63A60H 641C1H 00762H MARK_TEXT :OVY + 64200H 65298H 01099H RIP_TEXT :OVY + 653B0H 67CD0H 02921H JAM_TEXT :OVY + 67E60H 68047H 001E8H INPDATE_TEXT :OVY + 68070H 683C1H 00352H TAG_RW_TEXT :OVY + 68410H 6857BH 0016CH 1STCHAR_TEXT :OVY + 68590H 68CF1H 00762H MSGAPI_TEXT :OVY + 68D50H 6A9EAH 01C9BH API_SDM_TEXT :OVY + 6AAF0H 6E060H 03571H API_SQ_TEXT :OVY + 6E1C0H 6E20BH 0004CH SQASM_TEXT :OVY + 6E220H 6E41CH 001FDH CVTDATE_TEXT :OVY + 6E430H 6E677H 00248H DATE2BIN_TEXT :OVY + 6E690H 6E6CDH 0003EH DOSDATE_TEXT :OVY + 6E6E0H 6E86FH 00190H FEXIST_TEXT :OVY + 6E890H 6E939H 000AAH FFIND_TEXT :OVY + 6E950H 6E965H 00016H FLUSHA_TEXT :OVY + 6E970H 6E970H 00000H MONTHS_TEXT :OVY + 6E980H 6EC80H 00301H PARSENN_TEXT :OVY + 6ECB0H 6EDD4H 00125H QKSORT_TEXT :OVY + 6EDE0H 6EEECH 0010DH STRISTR_TEXT :OVY + 6EF00H 6EF3CH 0003DH STROCPY_TEXT :OVY + 6EF50H 6EFE7H 00098H TRAIL_TEXT :OVY + +Program entry point at 0000:0000 + diff --git a/PROBOARD.OBJ b/PROBOARD.OBJ new file mode 100644 index 0000000..d8779ca Binary files /dev/null and b/PROBOARD.OBJ differ diff --git a/PROMPTS.HPP b/PROMPTS.HPP new file mode 100644 index 0000000..1466f04 --- /dev/null +++ b/PROMPTS.HPP @@ -0,0 +1,433 @@ +/**** Language Constants ****************************************************/ + +#define S_ENTER_YOUR_NAME pb_lang[ 0 ].s +#define S_SCANNING_USER_FILE pb_lang[ 1 ].s +#define S_ENTER_PASSWORD pb_lang[ 2 ].s +#define S_MORE pb_lang[ 3 ].s +#define S_YES pb_lang[ 4 ].s +#define S_NO pb_lang[ 5 ].s +#define _S_PRESS_ENTER_TO_CONTINUE pb_lang[ 6 ].s +#define S_EVENT_HAS_TO_RUN pb_lang[ 7 ].s +#define S_UPCOMING_EVENT pb_lang[ 8 ].s +#define S_CHECK_MAIL_PROMPT pb_lang[ 9 ].s +#define S_ASK_YES_NO pb_lang[ 10 ].s +#define S_ASK_NO_YES pb_lang[ 11 ].s +#define S_ENTER_SYSTEM_PASSWORD pb_lang[ 12 ].s +#define S_WRONG_PASSWORD pb_lang[ 13 ].s +#define S_ILLEGAL_NAME pb_lang[ 14 ].s +#define S_WRONG_NAME_FORMAT pb_lang[ 15 ].s +#define S_ARE_YOU_A_NEW_USER(p1) parse_lang(pb_lang[ 16 ].s , (p1)) +#define S_NO_ACCESS_ON_THIS_NODE pb_lang[ 17 ].s +#define S_LEAVE_MESSAGE_TO_SYSOP pb_lang[ 18 ].s +#define S_HANGING_UP pb_lang[ 19 ].s +#define S_LEVEL_EXPIRED pb_lang[ 20 ].s +#define S_LEVEL_WILL_EXPIRE(p1) parse_lang(pb_lang[ 21 ].s , (p1)) +#define S_LOCKED_OUT pb_lang[ 22 ].s +#define S_PRIVATE_SYSTEM pb_lang[ 23 ].s +#define S_NOT_FOR_NEW_USERS pb_lang[ 24 ].s +#define S_ASK_ANSI pb_lang[ 25 ].s +#define S_ASK_AVATAR pb_lang[ 26 ].s +#define S_ASK_AVATAR_PLUS pb_lang[ 27 ].s +#define S_ASK_FSED pb_lang[ 28 ].s +#define S_ASK_CLS pb_lang[ 29 ].s +#define S_ASK_PAUSE pb_lang[ 30 ].s +#define S_ASK_SCREENLENGTH(p1) parse_lang(pb_lang[ 31 ].s , (p1)) +#define S_ASK_CITY pb_lang[ 32 ].s +#define S_ASK_STATE pb_lang[ 33 ].s +#define S_ASK_VOICE_PHONE pb_lang[ 34 ].s +#define S_ASK_DATA_PHONE pb_lang[ 35 ].s +#define S_ASK_BIRTHDATE(p1) parse_lang(pb_lang[ 36 ].s , (p1)) +#define S_ASK_ALIAS pb_lang[ 37 ].s +#define S_ALIAS_BEING_USED pb_lang[ 38 ].s +#define S_ASK_PASSWORD(p1,p2) parse_lang(pb_lang[ 39 ].s , (p1) , (p2)) +#define S_ILLEGAL_PASSWORD pb_lang[ 40 ].s +#define S_ASK_PASSWORD_AGAIN pb_lang[ 41 ].s +#define S_ASK_EVERYTHING_CORRECT pb_lang[ 42 ].s +#define S_WRITE_MESSAGE_TITLE(p1) parse_lang(pb_lang[ 43 ].s , (p1)) +#define S_NOT_ALLOWED_TO_WRITE_IN_AREA pb_lang[ 44 ].s +#define S_ASK_WRITE_MSG_USING_YOUR_ALIAS pb_lang[ 45 ].s +#define S_ASK_WRITE_MSG_USING_AN_ALIAS pb_lang[ 46 ].s +#define S_ENTER_ALIAS_TO_USE pb_lang[ 47 ].s +#define S_ENTER_ALL_IF_TO_EVERYONE pb_lang[ 48 ].s +#define S_WRITE_MSG_TO pb_lang[ 49 ].s +#define S_CONFIRM_WRITE_MESSAGE_TO(p1) parse_lang(pb_lang[ 50 ].s,(p1)) +#define S_FUZZY_SEARCH_LIST_HEADER pb_lang[ 51 ].s +#define S_FUZZY_SEARCH_LIST_FOOTER pb_lang[ 52 ].s +#define S_USER_NOT_LOCATED pb_lang[ 53 ].s +#define S_ENTER_NETMAIL_ADDRESS_HEADER pb_lang[ 54 ].s +#define S_ENTER_NETMAIL_ADDRESS pb_lang[ 55 ].s +#define S_CONFIRM_NETMAIL_ADDRESS(p1,p2,p3) parse_lang(pb_lang[ 56 ].s , (p1) , (p2) , (p3)) +#define S_NOT_ENOUGH_NETMAIL_CREDIT(p1) parse_lang(pb_lang[ 57 ].s , (p1)) +#define S_ASK_SEND_CRASH pb_lang[ 58 ].s +#define S_ASK_ATTACH_FILE pb_lang[ 59 ].s +#define S_FILE_TO_ATTACH pb_lang[ 60 ].s +#define S_SHOW_MESSAGE_SUBJECT(p1) parse_lang(pb_lang[ 61 ].s , (p1)) +#define S_ENTER_MESSAGE_SUBJECT pb_lang[ 62 ].s +#define S_ASK_PRIVATE_MESSAGE pb_lang[ 63 ].s +#define S_SAVING_MESSAGE pb_lang[ 64 ].s +#define S_SAVING_MESSAGE_ERROR pb_lang[ 65 ].s +#define S_MESSAGE_ABORTED pb_lang[ 66 ].s +#define S_USER_REQUESTS_CHAT(p1,p2) parse_lang(pb_lang[ 67 ].s,(p1),(p2)) +#define S_MULTILINE_CHAT_STARTED pb_lang[ 68 ].s +#define S_MULTILINE_CHAT_ENDED pb_lang[ 69 ].s +#define S_FATAL_ERROR pb_lang[ 70 ].s +#define S_ACCESS_DENIED pb_lang[ 71 ].s +#define S_THIS_MESSAGE_AREA_IS_LOCKED pb_lang[ 72 ].s +#define S_THERE_ARE_X_MESSAGES_IN_THIS_AREA(p1) parse_lang(pb_lang[ 73 ].s,(p1)) +#define S_THERE_ARE_NO_MESSAGES_IN_THIS_AREA pb_lang[ 74 ].s +#define S_READ_MESSAGES_ORDER_SELECTION pb_lang[ 75 ].s +#define S_READMSG_FORWARD pb_lang[ 76 ].s +#define S_READMSG_REVERSE pb_lang[ 77 ].s +#define S_READMSG_ALL pb_lang[ 78 ].s +#define S_READMSG_NEW pb_lang[ 79 ].s +#define S_READMSG_SELECTED pb_lang[ 80 ].s +#define S_READMSG_SELECTED_SEARCH_FOR pb_lang[ 81 ].s +#define S_READMSG_INDIVIDUAL pb_lang[ 82 ].s +#define S_READMSG_MARKED pb_lang[ 83 ].s +#define S_READMSG_ALL_FORWARD_OR_REVERSE pb_lang[ 84 ].s +#define S_READMSG_START_AT_MESSAGE pb_lang[ 85 ].s +#define S_READMSG_SEARCHING_NEW_MESSAGES pb_lang[ 86 ].s +#define S_READMSG_NO_NEW_MESSAGES_FOUND pb_lang[ 87 ].s +#define S_READMSG_X_NEW_MESSAGES_FOUND(p1) parse_lang(pb_lang[ 88 ].s , (p1)) +#define S_READMSG_NO_MESSAGES_FOUND pb_lang[ 89 ].s +#define S_READMSG_WAIT_AFTER_EACH_MSG pb_lang[ 90 ].s +#define S_PRESS_S_TO_STOP_OR_P_TO_PAUSE pb_lang[ 91 ].s +#define S_READMSG_INDIV_ASK_MSGNUM pb_lang[ 92 ].s +#define S_READMSG_INDIV_MSG_NOT_FOUND pb_lang[ 93 ].s +#define S_ASK_DELETE_MSG pb_lang[ 94 ].s +#define S_MESSAGE_MARKED pb_lang[ 95 ].s +#define S_EXPORT_MESSAGE_TO_FILE pb_lang[ 96 ].s +#define S_THERE_IS_NO_PREVIOUS_MSG pb_lang[ 97 ].s +#define S_NO_ACCESS_TO_REPLIES pb_lang[ 98 ].s +#define S_END_OF_MESSAGES pb_lang[ 99 ].s +#define S_QSCAN_MESSAGES_ORDER_SELECTION pb_lang[ 100 ].s +#define S_QSCAN_MSG_HEADER pb_lang[ 101 ].s +#define S_QSCAN_MSG_DATALINE(p1,p2,p3,p4,p5) parse_lang(pb_lang[ 102 ].s , (p1) , (p2) , (p3) , (p4) , (p5) ) +#define S_SCAN_MESSAGES_ORDER_SELECTION pb_lang[ 103 ].s +#define S_SCAN_MESSAGES_SHOWMSG(p1,p2,p3,p4,p5) parse_lang(pb_lang[ 104 ].s , (p1) , (p2) , (p3) , (p4) , (p5) ) +#define S_SCAN_MESSAGES_PROMPT pb_lang[ 105 ].s +#define S_ENTER_MENU_PASSWORD pb_lang[ 106 ].s +#define S_DOWNLOAD_TITLE pb_lang[ 107 ].s +#define S_DOWNLOAD_DELAY(p1) parse_lang(pb_lang[ 108 ].s , (p1)) +#define S_DOWNLOAD_NOT_NOW pb_lang[ 109 ].s +#define S_ENTER_FILES_TO_DOWNLOAD pb_lang[ 110 ].s +#define S_ENTER_DOWNLOAD_FILENAME(p1) parse_lang(pb_lang[ 111 ].s , (p1)) +#define S_SEARCHING_FILE_DATABASE pb_lang[ 112 ].s +#define S_NO_PERSONAL_FILES_FOUND pb_lang[ 113 ].s +#define S_DOWNLOAD_FILES_FOUND_HEADER pb_lang[ 114 ].s +#define S_DOWNLOAD_FILE_FOUND_ENTRY(p1,p2,p3) parse_lang(pb_lang[ 115 ].s , (p1),(p2),(p3)) +#define S_FILE_EXCEEDS_LIMIT(p1) parse_lang(pb_lang[ 116 ].s , (p1)) +#define S_UPLOAD_REQUIRED(p1) parse_lang(pb_lang[ 117 ].s , (p1)) +#define S_FILE_FOUND_ACTION_PROMPT pb_lang[ 118 ].s +#define S_ACTION_DOWNLOAD pb_lang[ 119 ].s +#define S_FREE_FILE pb_lang[ 120 ].s +#define S_ACTION_FILE_SKIPPED pb_lang[ 121 ].s +#define S_ACTION_FILE_QUIT pb_lang[ 122 ].s +#define S_NO_FILES_FOUND pb_lang[ 123 ].s +#define S_X_FILES_SELECTED(p1,p2,p3) parse_lang(pb_lang[ 124 ].s , (p1),(p2),(p3)) +#define S_NOT_ENOUGH_TIME_LEFT_FOR_DOWNLOAD pb_lang[ 125 ].s +#define S_START_DOWNLOAD_PROMPT pb_lang[ 126 ].s +#define S_DOWNLOAD_ACTION_GOODBYE pb_lang[ 127 ].s +#define S_ACTIVATING_PROTOCOL pb_lang[ 128 ].s +#define S_COPYING_FROM_CDROM(p1) parse_lang(pb_lang[ 129 ].s , (p1)) +#define S_ERROR_COPYING_FROM_CDROM pb_lang[ 130 ].s +#define S_X_FILES_DOWNLOADED_SUCCESSFULLY(p1,p2) parse_lang(pb_lang[ 131 ].s , (p1),(p2)) +#define S_X_FILES_NOT_DOWNLOADED(p1) parse_lang(pb_lang[ 132 ].s , (p1)) +#define S_HANGUP_AFTER_DOWNLOAD_PROMPT pb_lang[ 133 ].s +#define S_MORE_TAG pb_lang[ 134 ].s +#define S_ENTER_FILE_TAGS pb_lang[ 135 ].s +#define S_X_FILES_TAGGED(p1) parse_lang(pb_lang[ 136 ].s , (p1)) +#define S_FILELIST_PRESS_S_TO_STOP pb_lang[ 137 ].s +#define S_END_OF_FILE_LISTING pb_lang[ 138 ].s +#define S_KEYWORD_SEARCH_TITLE_AND_PROMPT pb_lang[ 139 ].s +#define S_SEARCHING_FOR_KEYWORD(p1) parse_lang(pb_lang[ 140 ].s , (p1)) +#define S_END_OF_FILE_SEARCH pb_lang[ 141 ].s +#define S_NEW_FILES_SEARCH_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 142 ].s ,(p1)) +#define S_SEARCHING_FOR_NEW_FILES(p1) parse_lang(pb_lang[ 143 ].s ,(p1)) +#define S_FILENAME_SEARCH_TITLE_AND_PROMPT pb_lang[ 144 ].s +#define S_SEARCHING_FOR_FILENAME(p1) parse_lang(pb_lang[ 145 ].s ,(p1)) +#define S_CHANGE_CITY_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 146 ].s ,(p1)) +#define S_CHANGE_VOICE_PHONE_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 147 ].s ,(p1)) +#define S_CHANGE_DATA_PHONE_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 148 ].s ,(p1)) +#define S_CHANGE_STATE_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 149 ].s ,(p1)) +#define S_CHANGE_ALIAS_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 150 ].s ,(p1)) +#define S_CHANGE_SCREENLENGTH_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 151 ].s ,(p1)) +#define S_ANSI_ENABLED pb_lang[ 152 ].s +#define S_ANSI_DISABLED pb_lang[ 153 ].s +#define S_AVATAR_ENABLED pb_lang[ 154 ].s +#define S_AVATAR_DISABLED pb_lang[ 155 ].s +#define S_AVTPLUS_ENABLED pb_lang[ 156 ].s +#define S_AVTPLUS_DISABLED pb_lang[ 157 ].s +#define S_FSED_ENABLED pb_lang[ 158 ].s +#define S_FSED_DISABLED pb_lang[ 159 ].s +#define S_CLS_ENABLED pb_lang[ 160 ].s +#define S_CLS_DISABLED pb_lang[ 161 ].s +#define S_PAUSE_ENABLED pb_lang[ 162 ].s +#define S_PAUSE_DISABLED pb_lang[ 163 ].s +#define S_IBMCHARS_ENABLED pb_lang[ 164 ].s +#define S_IBMCHARS_DISABLED pb_lang[ 165 ].s +#define S_HOTKEYS_ENABLED pb_lang[ 166 ].s +#define S_HOTKEYS_DISABLED pb_lang[ 167 ].s +#define S_RIP_ENABLED pb_lang[ 168 ].s +#define S_RIP_DISABLED pb_lang[ 169 ].s +#define S_ASK_HOTKEYS pb_lang[ 170 ].s +#define S_ASK_IBMCHARS pb_lang[ 171 ].s +#define S_ASK_RIP pb_lang[ 172 ].s +#define S_ASK_RIP_FONT pb_lang[ 173 ].s +#define S_LARGE_RIP_FONT_SELECTED pb_lang[ 174 ].s +#define S_SMALL_RIP_FONT_SELECTED pb_lang[ 175 ].s +#define S_CHANGE_PASSWORD_TITLE pb_lang[ 176 ].s +#define S_ENTER_NEW_PASSWORD(p1) parse_lang(pb_lang[ 177 ].s ,(p1)) +#define S_PASSWORD_CHANGED_SUCCESSFULLY pb_lang[ 178 ].s +#define S_LIST_USERS_TITLE_AND_PROMPT pb_lang[ 179 ].s +#define S_END_OF_USER_LIST pb_lang[ 180 ].s +#define S_UPLOAD_TITLE pb_lang[ 181 ].s +#define S_NOT_ENOUGH_FREE_DISK_SPACE pb_lang[ 182 ].s +#define S_NO_UPLOAD_DUE_TO_EVENT pb_lang[ 183 ].s +#define S_FILE_TO_UPLOAD pb_lang[ 184 ].s +#define S_UPLOAD_START_PROMPT pb_lang[ 185 ].s +#define S_READY_TO_UPLOAD_FILES pb_lang[ 186 ].s +#define S_NO_FILES_RECEIVED pb_lang[ 187 ].s +#define S_CHECKING_UPLOADS pb_lang[ 188 ].s +#define S_FILE_RECEIVED(p1) parse_lang(pb_lang[ 189 ].s , (p1)) +#define S_DUPLICATE_UPLOAD_REMOVED pb_lang[ 190 ].s +#define S_DUPLICATE_UPLOAD pb_lang[ 191 ].s +#define S_X_FILES_UPLOADED(p1,p2) parse_lang(pb_lang[ 192 ].s , (p1),(p2)) +#define S_NO_FILES_UPLOADED pb_lang[ 193 ].s +#define S_PLEASE_ENTER_UPLOAD_DESCRIPTIONS pb_lang[ 194 ].s +#define S_ENTER_USERNAME_FOR_PERSONAL_FILE(p1) parse_lang(pb_lang[ 195 ].s , (p1)) +#define S_ENTER_DESCRIPTION_LINE_1(p1) parse_lang(pb_lang[ 196 ].s , (p1)) +#define S_ENTER_DESCRIPTION_LINE_X pb_lang[ 197 ].s +#define S_USER_LIST_HEADER pb_lang[ 198 ].s +#define S_UNMARKED_ALL_MESSAGES pb_lang[ 199 ].s +#define S_PAGED_TOO_MANY_TIMES pb_lang[ 200 ].s +#define S_PAGING_NOT_ALLOWED_RIGHT_NOW pb_lang[ 201 ].s +#define S_ASK_CHAT_REASON pb_lang[ 202 ].s +#define S_CHAT_REASON_TOO_SHORT(p1) parse_lang(pb_lang[ 203 ].s , (p1)) +#define S_SYSOP_NOT_RESPONDING pb_lang[ 204 ].s +#define S_MSGED_HEADER pb_lang[ 205 ].s +#define S_MSGED_COMMAND_LIST pb_lang[ 206 ].s +#define S_MSGED_LIST pb_lang[ 207 ].s +#define S_MSGED_SAVE pb_lang[ 208 ].s +#define S_MSGED_ASK_ABORT pb_lang[ 209 ].s +#define S_MSGED_CONTINUE pb_lang[ 210 ].s +#define S_MSGED_EDIT_LINE(p1) parse_lang(pb_lang[ 211 ].s , (p1)) +#define S_MSGED_DELETE_LINE pb_lang[ 212 ].s +#define S_MSGED_DELETE_FROM_LINE(p1) parse_lang(pb_lang[ 213 ].s , (p1)) +#define S_MSGED_DELETE_TO_LINE(p1,p2) parse_lang(pb_lang[ 214 ].s , (p1),(p2)) +#define S_MSGED_X_LINES_DELETED(p1) parse_lang(pb_lang[ 215 ].s , (p1)) +#define S_MSGED_INSERT_LINE(p1) parse_lang(pb_lang[ 216 ].s , (p1)) +#define S_MSGED_REPLACE_TEXT(p1) parse_lang(pb_lang[ 217 ].s , (p1)) +#define S_MSGED_ENTER_TEXT_TO_REPLACE pb_lang[ 218 ].s +#define S_MSGED_TEXT_NOT_FOUND pb_lang[ 219 ].s +#define S_MSGED_REPLACE_BY pb_lang[ 220 ].s +#define S_MSGED_LINE_NOW_READS pb_lang[ 221 ].s +#define S_VIEW_ARCHIVE_TITLE_AND_PROMPT pb_lang[ 222 ].s +#define S_ARCHIVE_FILE_NOT_FOUND pb_lang[ 223 ].s +#define S_ARCHIVE_HEADER_FILENAME pb_lang[ 224 ].s +#define S_ARCHIVE_HEADER_DATE pb_lang[ 225 ].s +#define S_ARCHIVE_HEADER_TIME pb_lang[ 226 ].s +#define S_ARCHIVE_HEADER_ORIGSIZE pb_lang[ 227 ].s +#define S_ARCHIVE_HEADER_COMPSIZE pb_lang[ 228 ].s +#define S_TIME_LIMIT_EXCEEDED pb_lang[ 229 ].s +#define S_TIME_LIMIT_WARNING(p1) parse_lang(pb_lang[ 230 ].s , (p1)) +#define S_INACTIVITY_TIMEOUT(p1) parse_lang(pb_lang[ 231 ].s , (p1)) +#define S_INACTIVITY_WARNING(p1) parse_lang(pb_lang[ 232 ].s , (p1)) +#define S_MCHAT_TITLE pb_lang[ 233 ].s +#define S_MCHAT_ENTER_NODE_NUMBER pb_lang[ 234 ].s +#define S_MCHAT_CALLING_OTHER_NODE pb_lang[ 235 ].s +#define S_MCHAT_NODE_IS_NOT_AVAILABLE pb_lang[ 236 ].s +#define S_MCHAT_STARTED pb_lang[ 237 ].s +#define S_MCHAT_OTHER_NODE_HUNG_UP pb_lang[ 238 ].s +#define S_SELECT_AREAS_TO_SCAN_TITLE pb_lang[ 239 ].s +#define S_SELECT_COMBINED_AREAS_TITLE pb_lang[ 240 ].s +#define S_SELECT_AREAS_TO_TOGGLE pb_lang[ 241 ].s +#define S_ENABLE_OR_DISABLE_ALL_AREAS pb_lang[ 242 ].s +#define S_ALL_AREAS_ENABLED pb_lang[ 243 ].s +#define S_ALL_AREAS_DISABLED pb_lang[ 244 ].s +#define S_EDIT_TAGGED_TITLE pb_lang[ 245 ].s +#define S_EDIT_TAGGED_PROMPT pb_lang[ 246 ].s +#define S_ALL_FILE_TAGS_CLEARED pb_lang[ 247 ].s +#define S_ENTER_FILE_TO_UNTAG pb_lang[ 248 ].s +#define S_MAIL_FOUND_TITLE pb_lang[ 249 ].s +#define S_MAIL_FOUND_ACTION_PROMPT pb_lang[ 250 ].s +#define S_CHECKING_MAILBOX pb_lang[ 251 ].s +#define S_MAILBOX_EMPTY pb_lang[ 252 ].s +#define S_MESSAGES_HAVE_BEEN_MARKED pb_lang[ 253 ].s +#define S_CHECKING_FOR_PERSONAL_FILES pb_lang[ 254 ].s +#define S_PERSONAL_FILES_FOUND pb_lang[ 255 ].s +#define S_PERSONAL_FILE_FROM(p1) parse_lang(pb_lang[ 256 ].s , (p1)) +#define S_PROTOCOL_MENU_TITLE pb_lang[ 257 ].s +#define S_PROTOCOL_MENU_GOBACK pb_lang[ 258 ].s +#define S_PROTOCOL_MENU_PROMPT pb_lang[ 259 ].s +#define S_ENTER_MESSAGE_AREA_NUMBER pb_lang[ 260 ].s +#define S_PRESS_ENTER_TO_LIST pb_lang[ 261 ].s +#define S_SELECT_MESSAGE_AREA_TITLE pb_lang[ 262 ].s +#define S_UNKNOWN_MESSAGE_AREA pb_lang[ 263 ].s +#define S_ENTER_FILE_AREA_NUMBER pb_lang[ 264 ].s +#define S_SELECT_FILE_AREA_TITLE pb_lang[ 265 ].s +#define S_UNKNOWN_FILE_AREA pb_lang[ 266 ].s +#define S_ZONELIST_HEADER pb_lang[ 267 ].s +#define S_NETLIST_HEADER(p1) parse_lang(pb_lang[ 268 ].s , (p1)) +#define S_NODELIST_HEADER(p1) parse_lang(pb_lang[ 269 ].s , (p1)) +#define S_NODE_NUMBER_NOT_FOUND pb_lang[ 270 ].s +#define S_ENTER_FILENAME_TO_DISPLAY pb_lang[ 271 ].s +#define S_REPLY_TO_MSG_USING_YOUR_ALIAS pb_lang[ 272 ].s +#define S_REPLY_TO_MSG_USING_AN_ALIAS pb_lang[ 273 ].s +#define S_DO_YOU_WANT_TO_CHANGE_THE_SUBJECT pb_lang[ 274 ].s +#define S_QUOTING_MESSAGE pb_lang[ 275 ].s +#define S_SHOW_GIF_INFO_TITLE_AND_PROMPT pb_lang[ 276 ].s +#define S_SHOW_GIF_FILENAME pb_lang[ 277 ].s +#define S_SHOW_GIF_RESOLUTION pb_lang[ 278 ].s +#define S_SHOW_GIF_COLORS pb_lang[ 279 ].s +#define S_ENTER_BULLETIN pb_lang[ 280 ].s +#define S_FILE_NOT_FOUND pb_lang[ 281 ].s +#define S_SELECT_MSG_AREA_TO_MOVE_MESSAGE_TO pb_lang[ 282 ].s +#define S_MOVING_MESSAGE pb_lang[ 283 ].s +#define S_FORWARD_IN_SAME_AREA pb_lang[ 284 ].s +#define S_SELECT_MSG_AREA_TO_FORWARD_MESSAGE_IN pb_lang[ 285 ].s +#define S_FORWARD_MESSAGE_TO pb_lang[ 286 ].s +#define S_FORWARDING_MESSAGE pb_lang[ 287 ].s +#define S_TIME_STATS_TITLE pb_lang[ 288 ].s +#define S_STATS_TIME_ONLINE(p1) parse_lang(pb_lang[ 289 ].s , (p1)) +#define S_STATS_TIME_LEFT(p1) parse_lang(pb_lang[ 290 ].s , (p1)) +#define S_STATS_FREE_TIME(p1) parse_lang(pb_lang[ 291 ].s , (p1)) +#define S_STATS_TIME_TODAY(p1) parse_lang(pb_lang[ 292 ].s , (p1)) +#define S_STATS_DAILY_TIME_LIMIT(p1) parse_lang(pb_lang[ 293 ].s , (p1)) +#define S_STATS_DAILY_DL_LIMIT(p1) parse_lang(pb_lang[ 294 ].s , (p1)) +#define S_STATS_DOWNLOAD_LEFT(p1) parse_lang(pb_lang[ 295 ].s , (p1)) +#define S_STATS_KB_DOWNLOAD(p1) parse_lang(pb_lang[ 296 ].s , (p1)) +#define S_STATS_KB_UPLOADED(p1) parse_lang(pb_lang[ 297 ].s , (p1)) +#define S_STATS_KB_UPLOAD_NEEDED(p1) parse_lang(pb_lang[ 298 ].s , (p1)) +#define S_STATS_FREE_DOWNLOAD(p1) parse_lang(pb_lang[ 299 ].s , (p1)) +#define S_STATS_LAST_CALLED(p1,p2) parse_lang(pb_lang[ 300 ].s , (p1),(p2)) +#define S_STATS_TOTAL_CALLS(p1) parse_lang(pb_lang[ 301 ].s , (p1)) +#define S_TOPS_TOP_CALLERS pb_lang[ 302 ].s +#define S_TOPS_TOP_CALLERS_UNIT pb_lang[ 303 ].s +#define S_TOPS_TOP_DOWNLOADERS_KB pb_lang[ 304 ].s +#define S_TOPS_TOP_DOWNLOADERS_KB_UNIT pb_lang[ 305 ].s +#define S_TOPS_TOP_DOWNLOADERS_TIMES pb_lang[ 306 ].s +#define S_TOPS_TOP_DOWNLOADERS_TIMES_UNIT pb_lang[ 307 ].s +#define S_TOPS_TOP_UPLOADERS_KB pb_lang[ 308 ].s +#define S_TOPS_TOP_UPLOADERS_KB_UNIT pb_lang[ 309 ].s +#define S_TOPS_TOP_UPLOADERS_TIMES pb_lang[ 310 ].s +#define S_TOPS_TOP_UPLOADERS_TIMES_UNIT pb_lang[ 311 ].s +#define S_TOPS_TOP_MSGWRITERS pb_lang[ 312 ].s +#define S_TOPS_TOP_MSGWRITERS_UNIT pb_lang[ 313 ].s +#define S_TOPS_TOP_ONLINE pb_lang[ 314 ].s +#define S_TOPS_TOP_ONLINE_UNIT pb_lang[ 315 ].s +#define S_SHOW_USERS_ONLINE_HEADER pb_lang[ 316 ].s +#define S_USER_ONLINE_STATUS_BROWSING pb_lang[ 317 ].s +#define S_USER_ONLINE_STATUS_CHATTING pb_lang[ 318 ].s +#define S_USER_ONLINE_STATUS_ONLINE pb_lang[ 319 ].s +#define S_USER_ONLINE_STATUS_INSHELL pb_lang[ 320 ].s +#define S_USER_ONLINE_STATUS_BUSY pb_lang[ 321 ].s +#define S_USER_ONLINE_NO_USER_ONLINE pb_lang[ 322 ].s +#define S_DIRECTORY_TO_SHOW pb_lang[ 323 ].s +#define S_ONE_MOMENT_PLEASE ((char *)replace_stringvars(pb_lang[ 324 ].s)) +#define S_LOADING ((char *)replace_stringvars(pb_lang[ 325 ].s)) +#define S_SYSOP_SHELLING ((char *)replace_stringvars(pb_lang[ 326 ].s)) +#define S_SYSOP_RETURNED_FROM_DOS ((char *)replace_stringvars(pb_lang[ 327 ].s)) +#define S_SYSOP_CHAT_START ((char *)replace_stringvars(pb_lang[ 328 ].s)) +#define S_SYSOP_CHAT_ENDED ((char *)replace_stringvars(pb_lang[ 329 ].s)) +#define S_SELECT_LANGUAGE_TITLE pb_lang[ 330 ].s +#define S_SELECT_LANGUAGE pb_lang[ 331 ].s +#define S_READING_LANGUAGE_FILE pb_lang[ 332 ].s +#define S_INVALID_ENTRY pb_lang[ 333 ].s +#define S_ASK_FAX_PHONE pb_lang[ 334 ].s +#define S_ASK_MAILING_ADDRESS pb_lang[ 335 ].s +#define S_ASK_SEX pb_lang[ 336 ].s +#define S_SELECT_DATE_FORMAT_TITLE pb_lang[ 337 ].s +#define S_SELECT_DATE_FORMAT_PROMPT pb_lang[ 338 ].s +#define S_CHANGE_FAX_PHONE_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 339 ].s ,(p1)) +#define S_CHANGE_MAILING_ADDRESS_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 340 ].s ,(p1)) +#define S_CHANGE_DATE_FORMAT_TITLE(p1) parse_lang(pb_lang[ 341 ].s ,(p1)) +#define S_MALE pb_lang[ 342 ].s +#define S_FEMALE pb_lang[ 343 ].s +#define S_UNKNOWN pb_lang[ 344 ].s +#define S_ASK_COUNTRY pb_lang[ 345 ].s +#define S_CHANGE_COUNTRY_TITLE_AND_PROMPT(p1) parse_lang(pb_lang[ 346 ].s ,(p1)) +#define S_END_OF_LIST_TAG pb_lang[ 347 ].s +#define S_SELECT_FILE_AREA_GROUP_TITLE pb_lang[ 348 ].s +#define S_SELECT_MSG_AREA_GROUP_TITLE pb_lang[ 349 ].s +#define S_ENTER_GROUP_NUMBER pb_lang[ 350 ].s +#define S_UNKNOWN_GROUP pb_lang[ 351 ].s +#define S_DOWNLOAD_NOW pb_lang[ 352 ].s +#define S_SCANNING_UPLOADS pb_lang[ 353 ].s +#define S_FOLLOWING_FILES_REJECTED pb_lang[ 354 ].s +#define S_MSGHEADER_MESSAGENUM(p1,p2) parse_lang(pb_lang[ 355 ].s ,(p1),(p2)) +#define S_MSGHEADER_PRIVATE pb_lang[ 356 ].s +#define S_MSGHEADER_CRASH pb_lang[ 357 ].s +#define S_MSGHEADER_KILL pb_lang[ 358 ].s +#define S_MSGHEADER_FILE pb_lang[ 359 ].s +#define S_MSGHEADER_SENT pb_lang[ 360 ].s +#define S_MSGHEADER_FROM(p1,p2,p3) parse_lang(pb_lang[ 361 ].s , (p1),(p2),(p3)) +#define S_MSGHEADER_TO(p1) parse_lang(pb_lang[ 362 ].s , (p1)) +#define S_MSGHEADER_RECEIVED pb_lang[ 363 ].s +#define S_MSGHEADER_RECEIVED_ON(p1,p2) parse_lang(pb_lang[ 364 ].s ,(p1),(p2)) +#define S_MSGHEADER_SUBJECT(p1) parse_lang(pb_lang[ 365 ].s ,(p1)) +#define S_MSGHEADER_FILEATTACHED(p1) parse_lang(pb_lang[ 366 ].s ,(p1)) +#define S_MSGPROMPT_NEXT pb_lang[ 367 ].s +#define S_MSGPROMPT_PREV pb_lang[ 368 ].s +#define S_MSGPROMPT_AGAIN pb_lang[ 369 ].s +#define S_MSGPROMPT_STOP pb_lang[ 370 ].s +#define S_MSGPROMPT_MARK pb_lang[ 371 ].s +#define S_MSGPROMPT_REPLY pb_lang[ 372 ].s +#define S_MSGPROMPT_UNREAD pb_lang[ 373 ].s +#define S_MSGPROMPT_DEL pb_lang[ 374 ].s +#define S_MSGPROMPT_ORIG pb_lang[ 375 ].s +#define S_MSGPROMPT_SYSOPFUNC pb_lang[ 376 ].s +#define S_MSGHELP_TITLE pb_lang[ 377 ].s +#define S_MSGHELP_NEXT pb_lang[ 378 ].s +#define S_MSGHELP_PREV pb_lang[ 379 ].s +#define S_MSGHELP_AGAIN pb_lang[ 380 ].s +#define S_MSGHELP_STOP pb_lang[ 381 ].s +#define S_MSGHELP_MARK pb_lang[ 382 ].s +#define S_MSGHELP_REPLY pb_lang[ 383 ].s +#define S_MSGHELP_DEL pb_lang[ 384 ].s +#define S_MSGHELP_UNREAD pb_lang[ 385 ].s +#define S_MSGHELP_PLUS pb_lang[ 386 ].s +#define S_MSGHELP_MINUS pb_lang[ 387 ].s +#define S_MSGHELP_ORIG pb_lang[ 388 ].s +#define S_MSGHELP_FORWARD pb_lang[ 389 ].s +#define S_MSGHELP_PRIVATE pb_lang[ 390 ].s +#define S_MSGHELP_MOVE pb_lang[ 391 ].s +#define S_MSGHELP_EXPORT pb_lang[ 392 ].s +#define S_MSGHELP_NOTE pb_lang[ 393 ].s +#define S_CHANGE_PROTOCOL_TITLE(p1) parse_lang(pb_lang[ 394 ].s , (p1)) +#define S_NO_DEFAULT_PROTOCOL pb_lang[ 395 ].s +#define S_PROTOCOL_SELECTED(p1) parse_lang(pb_lang[ 396 ].s , (p1)) +#define S_ENTER_SELECTION_PASSWORD pb_lang[ 397 ].s +#define S_SYSTEM_GOING_DOWN pb_lang[ 398 ].s +#define S_UNREG_NO_NEW_ACCOUNTS pb_lang[ 399 ].s + +#define K_MORE pb_lang[ 3 ].hotkeys +#define K_ASK_YES_NO pb_lang[ 10 ].hotkeys +#define K_ASK_NO_YES pb_lang[ 11 ].hotkeys +#define K_READ_MESSAGES_ORDER_SELECTION pb_lang[ 75 ].hotkeys +#define K_READMSG_SELECTED pb_lang[ 80 ].hotkeys +#define K_READMSG_ALL_FORWARD_OR_REVERSE pb_lang[ 84 ].hotkeys +#define K_QSCAN_MESSAGES_ORDER_SELECTION pb_lang[ 100 ].hotkeys +#define K_SCAN_MESSAGES_ORDER_SELECTION pb_lang[ 103 ].hotkeys +#define K_SCAN_MESSAGES_PROMPT pb_lang[ 105 ].hotkeys +#define K_FILE_FOUND_ACTION_PROMPT pb_lang[ 118 ].hotkeys +#define K_START_DOWNLOAD_PROMPT pb_lang[ 126 ].hotkeys +#define K_HANGUP_AFTER_DOWNLOAD_PROMPT pb_lang[ 133 ].hotkeys +#define K_MORE_TAG pb_lang[ 134 ].hotkeys +#define K_UPLOAD_START_PROMPT pb_lang[ 185 ].hotkeys +#define K_MSGED_COMMAND_LIST pb_lang[ 206 ].hotkeys +#define K_ENABLE_OR_DISABLE_ALL_AREAS pb_lang[ 242 ].hotkeys +#define K_EDIT_TAGGED_PROMPT pb_lang[ 246 ].hotkeys +#define K_MAIL_FOUND_ACTION_PROMPT pb_lang[ 250 ].hotkeys +#define K_ASK_SEX pb_lang[ 336 ].hotkeys +#define K_END_OF_LIST_TAG pb_lang[ 347 ].hotkeys +#define K_MSGPROMPT_NEXT pb_lang[ 367 ].hotkeys +#define K_MSGPROMPT_PREV pb_lang[ 368 ].hotkeys +#define K_MSGPROMPT_AGAIN pb_lang[ 369 ].hotkeys +#define K_MSGPROMPT_STOP pb_lang[ 370 ].hotkeys +#define K_MSGPROMPT_MARK pb_lang[ 371 ].hotkeys +#define K_MSGPROMPT_REPLY pb_lang[ 372 ].hotkeys +#define K_MSGPROMPT_UNREAD pb_lang[ 373 ].hotkeys +#define K_MSGPROMPT_DEL pb_lang[ 374 ].hotkeys +#define K_MSGPROMPT_ORIG pb_lang[ 375 ].hotkeys +#define K_MSGPROMPT_SYSOPFUNC pb_lang[ 376 ].hotkeys diff --git a/PROTOCOL.CPP b/PROTOCOL.CPP new file mode 100644 index 0000000..413364c --- /dev/null +++ b/PROTOCOL.CPP @@ -0,0 +1,97 @@ +#include +#include +#include "proboard.hpp" + +bool +select_protocol(protocol& p , char protocol_key , bool seldef) +{ + String hotkeys; + String s; + + if(protocol_key == '\0') + { + s << S_PROTOCOL_MENU_TITLE << "\n\n"; + + for(int i=1 ; p.read(i) ; i++) + { + if(p.flags&PROT_ENABLED && !(io.baud>0 && (p.flags&PROT_LOCAL))) + { + s << form("\6<\3%c\6>\7 %s\n",p.key,p.name); + + hotkeys << p.key; + } + else + { + hotkeys << '-'; + } + } + + s << "\n\6<\3-\6> " << (seldef ? S_NO_DEFAULT_PROTOCOL : S_PROTOCOL_MENU_GOBACK) + << "\n\n" + << S_PROTOCOL_MENU_PROMPT; + + hotkeys << '-'; + + char k=io.send(s,hotkeys); + + io.show_remote = TRUE; + + if(k==1) return FALSE; + + if(!k) k=io.wait(hotkeys); + + if(k=='-') + return FALSE; + + for(i=0;i +#include +#include +#include "proboard.hpp" + +void +qscan_msg(char *data) +{ + MsgArea ma; + String param[10]; + int searchmethod = 0; + int searchorder = 0; + char searchdata[80]; + long firstmsg=0; + int area; + bool nonext = FALSE; + + Message msg; + MarkedMsgList marked = markedmsglist; + + parse_data(data,param); + + if(param[0][0]=='*') area = user.msgArea; + else area = atoi(param[0]); + + if(area) + { + if(!ma.read(area)) return; + + if(!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) && !ma.sysopAccess()) + { + io << "\n\n" << S_ACCESS_DENIED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + long n = ma.msgBase->numMsgs(ma); + + if(!n) + { + io << '\n' << S_THERE_ARE_NO_MESSAGES_IN_THIS_AREA << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + msg.setArea(area); + } + + + if(param[1][0]=='/' && param[1][1]=='N') + { + searchmethod = READMSG_MARKED; + searchorder = +1; + } + else + { + String hotkeys = K_QSCAN_MESSAGES_ORDER_SELECTION; + hotkeys << '\r'; + char key; + + if(area) + { + io << '\n'; + key=io.send(S_QSCAN_MESSAGES_ORDER_SELECTION,hotkeys); + } + else + key = K_QSCAN_MESSAGES_ORDER_SELECTION[3]; + + if(!key) key=io.wait(hotkeys); + + key = hotkeys.find(String(char(key))); + + io << "\n\n"; + switch(key) + { + case 6 : return; + case 1 : io << S_READMSG_FORWARD << '\n'; + searchmethod = READMSG_ALL; + searchorder = 1; + break; + case 2 : io << S_READMSG_REVERSE << '\n'; + searchmethod = READMSG_ALL; + searchorder = -1; + break; + case 0 : io << S_READMSG_ALL << '\n'; + searchmethod = READMSG_ALL; + break; + case 3 : io << S_READMSG_NEW << '\n'; + searchmethod = READMSG_NEW; + searchorder = 1; + break; + case 4 : { + io << S_READMSG_SELECTED; + char k = wait_language_hotkeys(K_READMSG_SELECTED); + + if(k == '\r') return; + + io << K_READMSG_SELECTED[k]; + + switch(k) + { + case 0: k = 'F'; break; + case 1: k = 'T'; break; + case 2: k = 'S'; break; + case 3: k = 'E'; break; + } + searchdata[0] = k; + io << "\n\n" << S_READMSG_SELECTED_SEARCH_FOR; + io.read(&searchdata[1],60,READMODE_UPALL); + if(!searchdata[1]) return; + searchmethod = READMSG_SEL; + io << '\n'; + } break; + case 5 : io << S_READMSG_MARKED << '\n'; + searchmethod = READMSG_MARKED; + break; + } + + if(!searchorder) + { + io << S_READMSG_ALL_FORWARD_OR_REVERSE; + key=wait_language_hotkeys(K_READMSG_ALL_FORWARD_OR_REVERSE); + if(key==1) + { + searchorder = -1; + io << S_READMSG_REVERSE << '\n'; + } + else + { + searchorder = +1; + io << S_READMSG_FORWARD << '\n'; + } + } + + if(area) + { + long highnum = ma.msgBase->msgNum(ma,ma.msgBase->highMsg(ma)); + long lownum = ma.msgBase->msgNum(ma,ma.msgBase->lowMsg(ma)); + + if(searchorder<0) firstmsg = highnum; + else firstmsg = lownum; + + if(searchmethod != READMSG_MARKED && searchmethod != READMSG_INDIV) + { + io << '\n' << S_READMSG_START_AT_MESSAGE; + io.read(firstmsg); + + if(firstmsg > highnum && searchorder < 0) firstmsg = highnum; + if(firstmsg < lownum && searchorder > 0) firstmsg = lownum; + + firstmsg = ma.msgBase->msgId(ma,firstmsg); + + io << '\n'; + } + } + } // No "/N" parameter + + if(searchmethod == READMSG_NEW) + { + marked.clear(); + + io << '\n' << S_READMSG_SEARCHING_NEW_MESSAGES; + + get_new_msgs(marked,area); + + if(!marked.numMarked()) + { + io << "\n\n" << S_READMSG_NO_NEW_MESSAGES_FOUND << + "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + io << S_READMSG_X_NEW_MESSAGES_FOUND(form("%d",marked.numMarked())) << '\n'; + + searchmethod = READMSG_MARKED; + } + + if(searchmethod != READMSG_MARKED) + { + if(!msg.readFirst(searchmethod,searchorder,firstmsg,searchdata)) + { + io << '\n' << S_READMSG_NO_MESSAGES_FOUND + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + nonext = TRUE; + } + + int markedmsg_index = 0; + + io << '\n' << S_QSCAN_MSG_HEADER << '\n'; + + stopped=0; + io.enablestop(); + linecounter(3); + + for(;;) + { + if(searchmethod == READMSG_MARKED) + { + if(markedmsg_index >= marked.numMarked()) break; + + MessageIndex mi = marked[markedmsg_index++]; + + if(area) if(mi.area != area) continue; + + if(!msg.read(mi.num,mi.area)) continue; + } + + if(searchmethod!=READMSG_MARKED && !nonext) + if(!msg.readNext(searchmethod,searchorder,searchdata)) break; + + nonext = FALSE; + + ma = *msg.msgArea; + + if(!msg.readAccess()) continue; + + io << S_QSCAN_MSG_DATALINE(form("%d",msg.areaNum()) , form("%ld",msg.msgBase()->msgNum(*msg.msgArea,msg.id)) , msg.from,msg.to,msg.subj) << '\n'; + +// io << form("\7%4d %5ld \6%-20.20s \3%-20.20s \5%-24.24s\n",msg.areaNum(),msg.msgBase()->msgNum(*msg.msgArea,msg.id),msg.from,msg.to,msg.subj); + if(stopped) break; + if(linecounter()) break; + } + + if(param[1][0] != '/' || param[1][1]!='N') + io << '\n' << S_END_OF_MESSAGES + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; +} diff --git a/QSCANMSG.OBJ b/QSCANMSG.OBJ new file mode 100644 index 0000000..79abd7f Binary files /dev/null and b/QSCANMSG.OBJ differ diff --git a/QUESTION.CPP b/QUESTION.CPP new file mode 100644 index 0000000..ddcdaec --- /dev/null +++ b/QUESTION.CPP @@ -0,0 +1,416 @@ +#include +#include +#include "proboard.hpp" + + + +static +void near adjust_parms( char *s, + String *param ) +{ + char delimiter; + + + strip_linefeed( s ); + + + for ( int i = 0; i < 4; i++ ) + { + param[ i ].clear(); + + + while( *s == ' ' && + *s ) + { + s++; + } + + + if ( *s == '\0' ) + { + break; + } + + + if ( *s == '\"' ) + { + delimiter = *s++; + } + else + { + delimiter = ' '; + } + + + for ( int j = 0; + + *s != delimiter && + (*s); + + j++ ) + { + param[ i ] << (*s++); + } + } +} + + + +#define NUMCOMMANDS 18 + + + +void questionnaire( char *data ) +{ + char str[ 300 ]; + char *commands[] = { + "ASK" , + "CHANGECOLOR", + "OUTPUTANSWER", + "POSTINFO", + "QUIT", + "SETFLAG", + "CLEARSCREEN", + "DISPLAY", + "ENDIF", + "IF", + "GETCHOICE", + "CAPITALISE", + "DISPLAYFILE", + "EXEC", + "LISTANSWER", + "MENUCMND", + "SETSECURITY", + "WAITENTER" + }; + String answers[ 30 ]; + String param [ 4 ]; + File qf; + + FileName qafile( pb_curlang.questPath[ 0 ] + ? pb_curlang.questPath + : syspath,data, + ".Q-A" ); + + FileName aswfile( data, ".ASW" ); + int i; + bool capitalise = FALSE; + + + if ( ! qf.open( qafile, + fmode_read | fmode_text ) ) + { + if ( strcmpl( data, "NEWUSER" ) ) + { + LOG( "File %s not found!", (char *) qafile ); + + io << "\n\n\1Scriptfile not found! " + << S_PRESS_ENTER_TO_CONTINUE; + } + + + return; + } + + + LOG( 2, "Questionnaire: %s", data ); + + + for ( ; ; ) + { + if ( ! qf.readLine( str, 299 ) ) + { + break; + } + + + adjust_parms( str, param ); + + + for ( i = 0; i < NUMCOMMANDS; i++ ) + { + if ( param[ 0 ] != commands[ i ] ) + { + continue; + } + + + switch ( i ) + { + case 0: + + char s[ 80 ]; + + + io.read( s, + atoi( param[ 1 ] ), + capitalise + ? READMODE_UPFIRST + : 0 ); + + answers[ atoi( param[ 2 ] ) - 1 ] = s; + + io << '\n'; + + break; + + + case 1: + + io.color( atoi( param[ 1 ] ) ); + + break; + + + case 2: + + File f( aswfile, + fmode_write | + fmode_append | + fmode_copen | + fmode_text ); + + + if ( param[ 2 ][ 0 ] ) + { + f << form( "%s%s\n", + (char *) param[ 1 ], + (char *) answers[ atoi( param[ 2 ] ) - 1 ] ); + } + else + { + f << form( "%s\n", + (char *) answers[ atoi( param[ 1 ] ) - 1 ] ); + } + + + break; + + + case 3: + { + Date date( TODAY ); + Time time( NOW ); + File f( aswfile, + fmode_write | + fmode_append | + fmode_copen | + fmode_text ); + + + f << form( "*** %s completed questionnaire at %02d:%02d on %02d-%s-%02d ***\n", + user.name, + time[ 0 ], + time[ 1 ], + date[ 0 ], + months_short[ date[ 1 ] ], + date[ 2 ] % 100 ); // Y2K FIXED + // date[ 2 ] ); // Y2K BUG + } + break; + + + case 4: + + return; + + + case 5: + + int flag = -1; + + + strupr( param[ 1 ] ); + + + if ( param[ 1 ][ 1 ] >= '1' && + param[ 1 ][ 1 ] <= '8' ) + { + switch ( param[ 1 ][ 0 ] ) + { + case 'A': + + flag = param[ 1 ][ 1 ] - '1' + 1; + break; + + + case 'B': + + flag = param[ 1 ][ 1 ] - '1' + 9; + break; + + + case 'C': + + flag = param[ 1 ][ 1 ] - '1' + 17; + break; + + + case 'D': + + flag = param[ 1 ][ 1 ] - '1' + 25; + break; + } + } + else + { + if ( param[ 1 ][ 0 ] >= 'A' && + param[ 1 ][ 0 ] <= 'Z') + { + flag = param[ 1 ][ 0 ] - 'A' + 1; + } + + + if ( param[ 1 ][ 0 ] >= '1' && + param[ 1 ][ 0 ] <= '6' ) + { + flag = param[ 1 ][ 0 ] - '1' + 27; + } + } + + + if ( flag < 1 || + flag > 32 ) + { + break; + } + + + if ( param[ 2 ] == "ON" ) + { + user.aFlags.setflag( flag ); + } + + + if ( param[ 2 ] == "OFF" ) + { + user.aFlags.clearflag( flag ); + } + + + updatemenu = TRUE; + + break; + + + case 6: + + io.cls(); + break; + + + case 7: + + for ( int i = 0; i < param[ 1 ].len(); i++ ) + { + if ( param[ 1 ][ i ] == '|' ) + { + param[ 1 ][ i ] = '\n'; + } + } + + + io << param[ 1 ]; + + + break; + + + case 9: + + if ( answers[ atoi( param[ 1 ] ) - 1 ] == param[ 3 ] ) + { + break; + } + + + do + { + if ( ! qf.readLine( str, 299 ) ) + { + return; + } + + + adjust_parms( str, param ); + } + while ( param[ 0 ] != commands[ 8 ] ); + + + break; + + + case 10: + + char c = io.wait( param[ 1 ] ); + + + answers[ atoi( param[ 2 ] ) - 1 ] = String( c ); + + io << c + << '\n'; + + break; + + + case 11: + + if ( param[ 1 ] == "ON" ) + { + capitalise = TRUE; + } + else + { + capitalise = FALSE; + } + + + break; + + + case 12: + + showansasc( param[ 1 ] ); + + break; + + + case 13: + + shell( param[ 1 ] ); + + break; + + + case 14: + + io << (char *) answers[ atoi( param[ 1 ] ) - 1 ] + << '\n'; + + break; + + + case 15: + + ( *( menufunctions[ atoi( param[ 1 ] ) ] ) ) ( param[ 2 ] ); + + break; + + + case 16: + + user.level = atoi( param[ 1 ] ); + updatemenu = TRUE; + + break; + + + case 17: + + io << "\t\n"; + + break; + } + } + } +} diff --git a/QUESTION.OBJ b/QUESTION.OBJ new file mode 100644 index 0000000..f30035e Binary files /dev/null and b/QUESTION.OBJ differ diff --git a/RAWDIR.CPP b/RAWDIR.CPP new file mode 100644 index 0000000..1c01c8c --- /dev/null +++ b/RAWDIR.CPP @@ -0,0 +1,77 @@ +#include +#include "proboard.hpp" + + + +void raw_dir( char *data ) +{ + char wildcard[ 64 ]; + + + if ( ! *data ) + { + io << "\f\n" + << S_DIRECTORY_TO_SHOW; + + io.read( wildcard, + 50, + READMODE_UPALL ); + + + if ( ! wildcard[ 0 ] ) + { + return; + } + } + else + { + strcpy( wildcard, data ); + } + + + append_backspace( wildcard ); + + strcat( wildcard, "*.*" ); + + LOG( 1, "Raw dir: %s", wildcard ); + + io << "\n\n"; + + + io.enablestop(); + linecounter( 2 ); + + + DirScan f( wildcard ); + + + while( int( f ) ) + { + Date d = f.date(); + Time t = f.time(); + + + io << form( "\7%-12s \3%7ld \6%02d-%s-%04d \2%02d:%02d:%02d\n", + f.name(), + f.size(), + d[ 0 ], + months_short[ d[ 1 ] ], + d[ 2 ] + 1900, // Y2K OKAY! + t[ 0 ], + t[ 1 ], + t[ 2 ] ); + + if ( linecounter() || + stopped ) + { + break; + } + + + ++f; + } + + + io << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; +} diff --git a/RAWDIR.OBJ b/RAWDIR.OBJ new file mode 100644 index 0000000..25997bd Binary files /dev/null and b/RAWDIR.OBJ differ diff --git a/READMSG.CPP b/READMSG.CPP new file mode 100644 index 0000000..cc3ccde --- /dev/null +++ b/READMSG.CPP @@ -0,0 +1,846 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +static void draw_button(int num , char *text , char cmd , char hotkey); +static int readmsg_more(); +static void draw_readmsg_screen(); +static void kill_readmsg_buttons(); + +void +readmsg(char *data) +{ + MsgArea ma , reply_area; + long orgmsg; + String param[10]; + int searchmethod = 0; + int searchorder = 0; + char searchdata[80]; + long firstmsg=0; + int area; + bool inchain = FALSE; + bool nonext = FALSE; + bool newmode = FALSE; + + Message msg; + + MarkedMsgList marked = markedmsglist; + + parse_data(data,param); + + if(param[0][0]=='*') area = user.msgArea; + else area = atoi(param[0]); + + if(area) + { + if(!ma.read(area)) return; + + if(!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) && !ma.sysopAccess()) + { + io << "\n\n" << S_ACCESS_DENIED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + long n = ma.msgBase->numMsgs(ma); + + if(n < 0) + { + io << '\n' << S_THIS_MESSAGE_AREA_IS_LOCKED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + //if(!rip_mode) + if(n) + { + io << '\n' << S_THERE_ARE_X_MESSAGES_IN_THIS_AREA(form("%d",n)) << '\n'; + } + else + { + io << '\n' << S_THERE_ARE_NO_MESSAGES_IN_THIS_AREA << + "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + msg.setArea(area); + } + + + if(param[1][0]=='/' && param[1][1]=='N') + { + searchmethod = READMSG_MARKED; + searchorder = +1; + } + else + { + String hotkeys = K_READ_MESSAGES_ORDER_SELECTION; + hotkeys << '\r'; + + /*char *hotkeys="FRANSTIM\r";*/ + + char key; + + if(area) + { + io << '\n'; + key = io.send(S_READ_MESSAGES_ORDER_SELECTION,hotkeys); + + if(!key) key=io.wait(hotkeys); + + key = hotkeys.find(String(char(key))); + } + else key = 3; // read new! + + io << "\n\n"; + + switch(key) + { + case 7 : return; + case 1 : io << S_READMSG_FORWARD << '\n'; + searchmethod = READMSG_ALL; + searchorder = 1; + break; + case 2 : io << S_READMSG_REVERSE << '\n'; + searchmethod = READMSG_ALL; + searchorder = -1; + break; + case 0 : io << S_READMSG_ALL << '\n'; + searchmethod = READMSG_ALL; + break; + case 3 : io << S_READMSG_NEW << '\n'; + searchmethod = READMSG_NEW; + searchorder = 1; + break; + case 4 : { + io << S_READMSG_SELECTED; + + char k = wait_language_hotkeys(K_READMSG_SELECTED); + + if(k == '\r') return; + + io << K_READMSG_SELECTED[k]; + + switch(k) + { + case 0: k = 'F'; break; + case 1: k = 'T'; break; + case 2: k = 'S'; break; + case 3: k = 'E'; break; + } + searchdata[0] = k; + io << "\n\n" << S_READMSG_SELECTED_SEARCH_FOR; + io.read(&searchdata[1],60,READMODE_UPALL); + if(!searchdata[1]) return; + searchmethod = READMSG_SEL; + io << '\n'; + } break; + case 5 : io << S_READMSG_INDIVIDUAL << '\n'; + searchmethod = READMSG_INDIV; + searchorder = 1; + break; + case 6 : io << S_READMSG_MARKED << '\n'; + searchmethod = READMSG_MARKED; + break; + } + + if(!searchorder) + { + io << S_READMSG_ALL_FORWARD_OR_REVERSE; + key=wait_language_hotkeys(K_READMSG_ALL_FORWARD_OR_REVERSE); + if(key==1) + { + searchorder = -1; + io << S_READMSG_REVERSE << '\n'; + } + else + { + searchorder = +1; + io << S_READMSG_FORWARD << '\n'; + } + } + + if(area) + { + long highnum = ma.msgNum(ma.highMsg()); + long lownum = ma.msgNum(ma.lowMsg()); + + if(searchorder<0) firstmsg = highnum; + else firstmsg = lownum; + + if(searchmethod != READMSG_MARKED && searchmethod != READMSG_INDIV && searchmethod != READMSG_NEW) + { + io << '\n' << S_READMSG_START_AT_MESSAGE; + io.read(firstmsg); + + if(firstmsg > highnum && searchorder < 0) firstmsg = highnum; + if(firstmsg < lownum && searchorder > 0) firstmsg = lownum; + + firstmsg = ma.msgId(firstmsg); + + io << '\n'; + } + } + } // No "/N" parameter + + if(searchmethod == READMSG_NEW) + { + newmode = TRUE; + + marked.clear(); + + io << '\n' << S_READMSG_SEARCHING_NEW_MESSAGES; + + get_new_msgs(marked,area); + + if(!marked.numMarked()) + { + io << "\n\n" << S_READMSG_NO_NEW_MESSAGES_FOUND << + "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + io << S_READMSG_X_NEW_MESSAGES_FOUND(form("%d",marked.numMarked())) << '\n'; + + searchmethod = READMSG_MARKED; + } + + if(searchmethod != READMSG_INDIV && searchmethod != READMSG_MARKED) + { + if(!msg.readFirst(searchmethod,searchorder,firstmsg,searchdata)) + { + io << '\n' << S_READMSG_NO_MESSAGES_FOUND << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + nonext = TRUE; + } + + int markedmsg_index = 0; + + bool continuous = FALSE; + + if(searchmethod!=READMSG_INDIV) + { + io << '\n' << S_READMSG_WAIT_AFTER_EACH_MSG; + continuous = !io.ask(1); + + if(continuous) + { + io << "\f\n\n" << S_PRESS_S_TO_STOP_OR_P_TO_PAUSE; + } + } + + if(!continuous) + { + draw_readmsg_screen(); + } + + + for(;;) + { + if(searchmethod==READMSG_INDIV && !inchain) + { + long nr; + + io << "\n\n" << S_READMSG_INDIV_ASK_MSGNUM; + + if(io.read(nr)<0) break; + + nr = ma.msgId(nr); + + if(!msg.read(nr)) + { + io << "\n\n" << S_READMSG_INDIV_MSG_NOT_FOUND; + + continue; + } + + io << '\n'; + } + + if(searchmethod == READMSG_MARKED && !inchain && !nonext) + { + if(markedmsg_index >= marked.numMarked()) break; + + MessageIndex mi = marked[markedmsg_index++]; + + if(area) + if(mi.area != area) + continue; + + if(!msg.read(mi.num,mi.area)) + continue; + } + + if(!area) + { + if(!ma.read(msg.areaNum())) continue; + } + + if(nonext || inchain) + nonext=0; + else + { + if(searchmethod!=READMSG_INDIV && searchmethod!=READMSG_MARKED) + if(!msg.readNext(searchmethod,searchorder,searchdata)) + break; + } + + #pragma warn -def + if(orgmsg == msg.id) inchain = FALSE; + #pragma warn .def + + if(!msg.readAccess()) continue; + + if((searchmethod!=READMSG_MARKED || ma.msgType==MSG_TOALL || newmode) && !inchain) + { + if(msg.id > ma.lastRead(user_recnr)) ma.setLastRead(user_recnr , msg.id); + + if( int(msg.id) > user.highMsgRead + && ma.areaNum <= 200 + && ma.msgBaseType == MSGBASE_HUDSON) user.highMsgRead = int(msg.id); + } + + if( !strcmpl(msg.to,user.name) + || (!strcmpl(msg.to,user.alias) && ma.flags>0 && user.alias[0])) + { + if(!(msg.attr & MSGATTR_RECEIVED)) + { + msg.setFlag(MSGATTR_RECEIVED); + + LOG(1,"Message #%ld received (area %d)",msg.num,msg.areaNum()); + } + } + else + { + LOG(2,"Message #%ld read (area %d)",msg.num,msg.areaNum()); + } + + again: + /* + if(rip_mode && !continuous) + { + kill_readmsg_buttons(); + } + */ + stopped=0; + + if(!cls_mode || continuous) + { + io << '\n'; + if(linecounter()) stopped = TRUE; + io << '\n'; + if(linecounter()) stopped = TRUE; + } + + if(!continuous) io << '\f'; + + if(!stopped) + switch(msg.show()) + { + case 'N': + case '\r': continue; + case 'S': stopped=1; + break; + case 'A':goto again; + } + + /* + if(rip_mode && !continuous) + rip_send("\r!|1B0000020QPE020F000F080300020E07000000|Y00000100\n"); + */ + + if(continuous) + { + if(stopped) break; + continue; + } + + String optline("\n\6"); + String hotkeys("?\r"); + + int button_num = 0; + + if(!inchain) + { + //hotkeys << 'N'; + + optline << S_MSGPROMPT_NEXT << ' '; + hotkeys << K_MSGPROMPT_NEXT; + + //if(ma.sysopAccess()) optline << "[N]xt "; + // else optline << "[N]ext "; + + if(!continuous) draw_button(button_num++,"Next",'N','N'); + } + + if(searchmethod != READMSG_MARKED || markedmsg_index>1) + { + optline << S_MSGPROMPT_PREV << ' '; + hotkeys << K_MSGPROMPT_PREV; + //optline << "[P]rev "; + //hotkeys << 'P'; + if(!continuous) draw_button(button_num++,"Previous",'P','P'); + } + + optline << S_MSGPROMPT_AGAIN << ' ' << S_MSGPROMPT_STOP << ' ' << S_MSGPROMPT_MARK << ' '; + hotkeys << K_MSGPROMPT_AGAIN << K_MSGPROMPT_STOP << K_MSGPROMPT_MARK; + + //optline << "[A]gain [S]top [M]ark "; + + if(!continuous) draw_button(button_num++,"Again",'A','A'); + if(!continuous) draw_button(button_num++,"Stop",'S','S'); + if(!continuous) draw_button(button_num++,"Mark",'M','M'); + + reply_area = ma; + + if(ma.replyBoard) + if(!reply_area.read(ma.replyBoard)) + reply_area = ma; + + if(check_access(reply_area.writeLevel,reply_area.writeFlags,reply_area.writeFlagsNot) || reply_area.sysopAccess()) + { + optline << S_MSGPROMPT_REPLY << ' '; + hotkeys << K_MSGPROMPT_REPLY; + +// if(reply_area.sysopAccess()) optline << "[R]ep "; +// else optline << "[R]eply "; +// hotkeys << 'R'; + if(!continuous) draw_button(button_num++,"Reply",'R','R'); + } + + if(ma.sysopAccess() || !strcmpl(msg.from,user.name) || !strcmpl(msg.to,user.name)) + { + optline << S_MSGPROMPT_UNREAD << ' '; + hotkeys << K_MSGPROMPT_UNREAD; + //optline << "[U]nrd "; + //hotkeys << 'U'; + if(!continuous) draw_button(button_num++,"UnRead",'U','U'); + if( ma.sysopAccess() + || (ma.msgKind != MSG_ECHO) + || ( ma.msgKind == MSG_ECHO + && msg.attr & MSGATTR_UNSENT_ECHO + && !strcmpl(msg.from,user.name) + ) + ) + { + optline << S_MSGPROMPT_DEL << ' '; + hotkeys << K_MSGPROMPT_DEL; + //optline << "[D]el "; + //hotkeys << 'D'; + if(!continuous) draw_button(button_num++,"Delete",'D','D'); + } + } + if(ma.sysopAccess()) + { + optline << S_MSGPROMPT_SYSOPFUNC << ' '; + hotkeys << K_MSGPROMPT_SYSOPFUNC; + //if(ma.msgKind != MSG_ECHO) + // { + // optline << "[FVTX] "; + // hotkeys << "FVTX"; + // } + // else + // { + // optline << "[FVX] "; + // hotkeys << "FVX"; + // } + + if(!continuous) draw_button(button_num++,"Private",'T','T'); + if(!continuous) draw_button(button_num++,"Forward",'F','F'); + if(!continuous) draw_button(button_num++,"Move",'V','V'); + if(!continuous) draw_button(button_num++,"Export",'X','X'); + } + if(inchain) + { + optline << S_MSGPROMPT_ORIG << ' '; + hotkeys << K_MSGPROMPT_ORIG; + //optline << "[O]rg "; + //hotkeys << 'O'; + if(!continuous) draw_button(button_num++,"Original",'O','O'); + } + + if(msg.next) + { + optline << "[+"; + if(msg.prev) optline << '/'; + hotkeys << '+'; + } + else + { + if(msg.prev) optline << '['; + } + + if(msg.prev) + { + optline << "-] "; + hotkeys << '-'; + } + else + { + if(msg.next) optline << "] "; + } + + if(inchain) optline << "[?]: <\7" << K_MSGPROMPT_ORIG << "\6> \7"; + else optline << "[?]: <\7" << K_MSGPROMPT_NEXT << "\6> \7"; + + /* + if(rip_mode && !continuous) + { + rip_nomore(); + io.show_remote = FALSE; + } + */ + + char k=io.send(optline,hotkeys); + + if(!k) k=io.wait(hotkeys); + if(k=='\r') k=(inchain)?K_MSGPROMPT_ORIG[0]:K_MSGPROMPT_NEXT[0]; + io << k; + + //if(rip_mode && !continuous) io.show_remote = TRUE; + + if(k==K_MSGPROMPT_STOP[0]) + { + break; + } + + if(k==K_MSGPROMPT_AGAIN[0]) + { + goto again; + } + + if(k==K_MSGPROMPT_REPLY[0]) + { + kill_readmsg_buttons(); + replymsg(msg); + updatemenu = TRUE; + draw_readmsg_screen(); + if(!msg.read(msg.id)) + continue; + else + goto again; + } + + if(k==K_MSGPROMPT_DEL[0]) + { + if(!ma.sysopAccess()) + { + io << "\n\n" << S_ASK_DELETE_MSG; + + if(!io.ask()) break; + } + LOG(1,"Msg #%ld deleted (area %d)",msg.num,msg.areaNum()); + msg.remove(); + if(inchain) + { + if(msg.read(orgmsg)) nonext = 1; + } + else + { + msg.readPrev(searchmethod,searchorder,searchdata); + } + inchain=0; + updatemenu = TRUE; + continue; + } + + if(k==K_MSGPROMPT_MARK[0]) + { + LOG(2,"Msg #%ld marked (area %d)",msg.num,msg.areaNum()); + markedmsglist.add(msg); + io << "\n\n" << S_MESSAGE_MARKED + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + if(k==K_MSGPROMPT_SYSOPFUNC[2]) + { + msg.toggleFlag(MSGATTR_PRIVATE); + msg.read(msg.id); + goto again; + } + + if(k==K_MSGPROMPT_SYSOPFUNC[0]) + { + msg.forward(); + updatemenu = TRUE; + goto again; + } + + if(k==K_MSGPROMPT_UNREAD[0]) + { + msg.clearFlag(MSGATTR_RECEIVED); + msg.read(msg.id); + } + + if(k==K_MSGPROMPT_SYSOPFUNC[1]) + { + msg.move(); + if(inchain) + { + if(msg.read(orgmsg)) + nonext = 1; + } + else + { + msg.readPrev(searchmethod,searchorder,searchdata); + } + inchain = 0; + updatemenu = TRUE; + } + + if(k==K_MSGPROMPT_SYSOPFUNC[3]) + { + char fn[50]; + + /* + if(rip_mode) + { + rip_start_dialog("Enter file name to export message to",49); + io.show_remote = FALSE; + } + */ + + io << "\n\n" << S_EXPORT_MESSAGE_TO_FILE; + + io.show_remote = TRUE; + + io << "\3"; + + io.read(fn,49,READMODE_UPALL); + + //if(rip_mode) rip_end_dialog(); + + if(!fn[0]) goto again; + + io << '\n'; + + msg.export(fn); + + goto again; + } + + if(k==K_MSGPROMPT_PREV[0]) + { + nonext = TRUE; + + if(searchmethod == READMSG_MARKED) + { + markedmsg_index -= 2; + nonext = FALSE; + continue; + } + for(;;) + { + if(msg.readPrev(searchmethod,searchorder,searchdata)) + { + if(!msg.readAccess()) continue; + + break; + } + else + { + io << "\n\n" << S_THERE_IS_NO_PREVIOUS_MSG << ' ' << S_PRESS_ENTER_TO_CONTINUE; + break; + } + } + } + + if(k==K_MSGPROMPT_ORIG[0]) + { + if(inchain) + if(msg.read(orgmsg)) + nonext=1; + inchain=0; + } + + switch(k) + { + case '+': { + if(!inchain) orgmsg = msg.id; + + for(;;) + { + if(!msg.next) + { + io << "\n\n" << S_NO_ACCESS_TO_REPLIES + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + if(msg.read(orgmsg)) nonext = TRUE; + inchain=0; + break; + } + + if(msg.read(msg.next)) + { + if(!ma.read(msg.areaNum())) continue; + + if(!msg.readAccess()) continue; + + inchain = TRUE; + break; + } + else + { + if(msg.read(orgmsg)) nonext = TRUE; + inchain = FALSE; + break; + } + } + } break; + case '-': { + if(!inchain) orgmsg = msg.id; + + for(;;) + { + if(!msg.prev) + { + io << "\n\n" << S_NO_ACCESS_TO_REPLIES + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + if(msg.read(orgmsg)) nonext=1; + inchain = FALSE; + break; + } + + if(msg.read(msg.prev)) + { + if(!msg.readAccess()) continue; + + inchain = TRUE; + break; + } + else + { + if(msg.read(orgmsg)) nonext=1; + inchain=0; + break; + } + } + } break; + case '?' : { + if(showansasc("MSGHELP",NULL)==ANS_NOFILE) + { + io << "\n\n\f" << S_MSGHELP_TITLE << "\n\n"; + + io << S_MSGHELP_NEXT << '\n'; + io << S_MSGHELP_PREV << '\n'; + io << S_MSGHELP_AGAIN << '\n'; + io << S_MSGHELP_STOP << '\n'; + io << S_MSGHELP_MARK << '\n'; + io << S_MSGHELP_REPLY << '\n'; + io << S_MSGHELP_DEL << '\n'; + io << S_MSGHELP_UNREAD << '\n'; + io << S_MSGHELP_PLUS << '\n'; + io << S_MSGHELP_MINUS << '\n'; + io << S_MSGHELP_ORIG << '\n'; + + if(ma.sysopAccess()) + { + io << S_MSGHELP_FORWARD << '\n'; + io << S_MSGHELP_PRIVATE << '\n'; + io << S_MSGHELP_MOVE << '\n'; + io << S_MSGHELP_EXPORT << '\n'; + } + + io << '\n' << S_MSGHELP_NOTE << '\n'; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE << '\n'; + } + goto again; + } + //default: goto again; + } + }// for + + //if(!rip_mode) + io << "\n\n" << S_END_OF_MESSAGES + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + /* + if(rip_mode) + { + rip_reset(); + io.more_func = NULLFUNC; + } + */ +} + +static void +draw_button(int num , char *text , char cmd , char hotkey) +{ + /* + if(rip_mode) + { + String buttons; + + buttons << "!|1U" << meganum((num%6) * 100 + 30 ) + << meganum((num/6) * 24 + 285) + << meganum((num%6) * 100 + 110) + << meganum((num/6) * 24 + 297) + << meganum(hotkey) + << "00<>" << text << "<>" << cmd << '\n'; + + rip_send(buttons); + } + */ +} + +static int +readmsg_more() +{ + rip_kill_mouse_fields(); + + draw_button(0,"Cont?" ,K_MORE[0],0); + draw_button(1,"Yes" ,K_MORE[0],'Y'); + draw_button(2,"No" ,K_MORE[1],'N'); + draw_button(3,"Scroll" ,K_MORE[2],'S'); + + rip_nomore(); + + int k = wait_language_hotkeys(K_MORE); + + if(k=='\r') k=0; + + rip_kill_mouse_fields(); + rip_color(7); + rip_fill_color(1,7); + + rip_bar(12,279,625,326); + + return k; +} + +static void +draw_readmsg_screen() +{ + /* + if(rip_mode) + { + rip_reset(); + show_rip("_MSGFRAM"); + io.more_func = readmsg_more; + } + */ +} + +static void +kill_readmsg_buttons() +{ + /* + if(rip_mode) + { + rip_kill_mouse_fields(); + rip_color(7); + rip_fill_color(1,7); + + rip_bar(12,279,625,326); + rip_bar(355,8,624,25); + rip_bar(355,40,624,54); + } + */ +} diff --git a/READMSG.OBJ b/READMSG.OBJ new file mode 100644 index 0000000..c430eab Binary files /dev/null and b/READMSG.OBJ differ diff --git a/REG.HPP b/REG.HPP new file mode 100644 index 0000000..7dbdb1a --- /dev/null +++ b/REG.HPP @@ -0,0 +1,16 @@ +#ifndef __REGISTRATION_HEADER_HPP +#define __REGISTRATION_HEADER_HPP + + +char *serialFormatted( char *sBuf ); + +char *software_serial_number( void ); +char *registered_user_name( void ); +char *get_system_code( void ); +word get_node_count( void ); +word is_version_registered( void ); + +void CHECK_REG( void ); + + +#endif // __REGISTRATION_HEADER_HPP diff --git a/REGIS.CPP b/REGIS.CPP new file mode 100644 index 0000000..fd62a18 --- /dev/null +++ b/REGIS.CPP @@ -0,0 +1,1042 @@ +#include "proboard.hpp" + + +//************************************************************************** +// +// TELEGRAFIX CONFIDENTIAL +// PROTECTED TRADE SECRETS +// +// The contents of this file are confidential materials of TeleGrafix +// Communications, Inc. Use of this information is subject to the terms and +// conditions set forth in the TeleGrafix software source code licensing +// contract. +// +//************************************************************************** + +//########################################################################## +// +// Module file: SERIALIZ.C +// +// Last modified: 12/11/94 (Jeff Reeder) +// Author(s): Jeff Reeder - 12/11/94 +// +// ------------------------------------------------------------------------- +// +// Copyright (c) 1992-95 TeleGrafix Communications, Inc. +// All Rights Reserved +// +// ------------------------------------------------------------------------- +// +// REVISION HISTORY INFORMATION +// +// Version Date Description +// ------------------------------------------------------------------ +// +// +//########################################################################## + +#include +#include +#include +#include + +#include +#include +#include + +//-------------------------------------------------------------------------- + +#define UNREG_STRING "(Unregistered copy)" + +#define SERIAL_NUMBER_LENGTH 17 + + +#define USERNAME_LEN 31 +#define DEFAULT_REGNAME "Name of Registered Owner here!" + +#define SERIAL_NUM_LEN 17 +#define DEFAULT_SERIALNO "" + +#define SYSTEM_CODE_LEN 13 +#define DEFAULT_SYSTEM_CODE "TELEGRAFIX\0\0" + + + +//--------------------- +// Product Code defines +//--------------------- + +#define PROBOARD_BBS "PB" +#define PROBOARD_BBS_NAME "ProBoard BBS" + + +//----------------- +// Platform defines +//----------------- + +#define PLATFORM_DOS 'D' +#define PLATFORM_DOS_NAME "MS-DOS" + + +//--------------- +// Origin defines +//--------------- + +#define ORIGIN_TELEGRFX '0' +#define ORIGIN_TELEGRFX_NAME "TeleGrafix Corporate HQ" + +#define ORIGIN_TELEGRFX_COMP '1' +#define ORIGIN_TELEGRFX_NAME_COMP "Free Upgrades" + +#define ORIGIN_TELEGRFX_GIF '2' +#define ORIGIN_TELEGRFX_NAME_GIF "GIF edition" + + +//------------- +// Misc defines +//------------- + +#define BASE_36 36 // Meganums are base 36 +#define START_YEAR 1992 // The year TeleGrafix began +#define MAX_SN_COUNTER 1285 // 1295 is ZZ in meganums, set to 1285 to prevent duplicate serial numbers (says Jeff) +#define MAX_SN_YEARS 35 // Seconds / 2 +#define MAX_SN_MONTHS 11 // Seconds / 2 +#define MAX_SN_DAYS 31 // Number of 2 +#define MAX_SN_HOURS 23 // Seconds / 2 +#define MAX_SN_MINS 29 // Minutes / 2 +#define MAX_SN_SECS 29 // Seconds / 2 + +#define MAX_SN_LENGTH 16 // Maximum length of a serial number + + +static char regname_buf [ USERNAME_LEN ] = DEFAULT_REGNAME; +static char serial_buf [ SERIAL_NUM_LEN ] = DEFAULT_SERIALNO; +static char system_code_buf[ SYSTEM_CODE_LEN ] = DEFAULT_SYSTEM_CODE; + + + +enum regResults +{ + registrationNone = 0, // Software is not registered + registrationBad, // Illegal registration information + registrationGood, // Software is fully registered +}; + + + +static +word crc_table_16[ 256 ] = +{ + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, + 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, + 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, + 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, + 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, + 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, + 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, + 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, + 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, + 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, + 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, + 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, + 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, + 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, + 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, + 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, + 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, + 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, + 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, + 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, + 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, + 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, + 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, + 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, + 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, + 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, + 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, + 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, + 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, + 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, + 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, + 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 +}; + + + +static +word makeCRC16( word count, + word crc, + byte *buffer ) +{ + byte *p = buffer; + + + while ( count-- != 0 ) + { + crc = word( ( crc << 8 ) ^ crc_table_16[ ( crc >> 8 ) ^ *p++ ] ); + } + + return crc; +} + + + +byte *decryptData( byte *buf, + short len, + byte key ) +{ + short i; + byte c; + byte shift = 0; + byte iPrime; + byte nKey; + + (void) shift; + + iPrime = 0x17; + nKey = ( byte ) ~key; + + + for ( i = 0; i < len; i++, key++, iPrime++, nKey++ ) + { + c = ( buf[ i ] ^ nKey ) ^ iPrime; // Get encrypted char + + + //-------------------------------------------------------------- + // Now let's do the bit shifting (rolling) to the left. We used + // to do this in a loop, but doing it this way avoids the loop + // overhead and speeds things up at the cost of slightly larger + // code size. + //-------------------------------------------------------------- + + shift = ( byte ) ( i & 0x07 ); + + + if ( shift != 0 ) + { + c = ( byte ) ( ( c << shift ) | + ( c >> ( 8 - shift ) ) ); + } + + + //----------------------------------- + // Now let's perform the bit swapping + //----------------------------------- + + c = ( byte ) ~( ( c >> 7 ) | + ( c << 7 ) | + ( ( c & 0x40 ) >> 5 ) | + ( ( c & 0x02 ) << 5 ) | + ( ( c & 0x20 ) >> 3 ) | + ( ( c & 0x04 ) << 3 ) | + ( ( c & 0x10 ) >> 1 ) | + ( ( c & 0x08 ) << 1 ) ); + + + buf[ i ] = ( byte ) ( ( c ^ key ) ^ 0x49 ); // Store real char in buf + } + + + return( buf ); +} + + + +static +byte *encryptData( byte *buf, + short len, + byte key ) +{ + short i; + byte c; + byte shift = 0; + byte iPrime; + byte nKey; + + (void) shift; + + iPrime = 0x17; + nKey = ( byte ) ~key; + + + for ( i = 0; i < ( short ) len; i++, key++, iPrime++, nKey++ ) + { + //------------------ + // Get the character + //------------------ + + c = ( byte ) ( ( buf[ i ] ^ key ) ^ 0x49 ); + + + //----------------------------------- + // Now let's perform the bit swapping + //----------------------------------- + + c = ( byte ) ~( ( c >> 7 ) | + ( c << 7 ) | + ( ( c & 0x40 ) >> 5 ) | + ( ( c & 0x02 ) << 5 ) | + ( ( c & 0x20 ) >> 3 ) | + ( ( c & 0x04 ) << 3 ) | + ( ( c & 0x10 ) >> 1 ) | + ( ( c & 0x08 ) << 1 ) ); + + + //---------------------------------------------------------------- + // Now let's do the bit shifting (rolling) to the right. We used + // to do this in a loop, but doing it this way eliminates the loop + // code overhead and consequently speeds things up a bit. + //---------------------------------------------------------------- + + shift = ( byte ) ( i & 0x07 ); + + + if ( shift != 0 ) + { + c = ( byte ) ( ( c >> shift ) | + ( c << ( 8 - shift ) ) ); + } + + buf[ i ] = ( c ^ iPrime ) ^ nKey; + } + + + return( buf ); +} + + + +static +int isValidMegaNum( char iChar ) +{ + if ( iChar >= '0' && + iChar <= '9' ) + { + return 1; + } + else if ( isalpha( iChar ) ) + { + return 1; + } + else + { + return 0; + } +} + + + +static +word serialNumberDecode( char *sBuf, + word *piNodeCount ) +{ + char pstrProductID[ 3 ]; + byte iPlatformID; + byte iOriginID; + char buf[ 16 + 1 ]; + char eBuf[ 16 + 1 ]; + struct dosdate_t dt; + struct dostime_t tm; + word yearValue; + word minValue; + word secValue; + char counterBuf[ 8 ]; + char minuteBuf[ 8 ]; + char dayBuf[ 8 ]; + char secBuf[ 8 ]; + char yearBuf[ 8 ]; + char hourBuf[ 8 ]; + char monthBuf[ 8 ]; + char crcBuf[ 5 ]; + word oldCRC; + word newCRC; + word iCounter; + + char P1; // Product Code byte 1 + char P2; // Product Code byte 2 + char Pl; // Platform + char Or; // Origin + + char N1; // Numeric Counter byte 1 + char N2; // Numeric Counter byte 2 + + char Yr; // Year + char Mo; // Month + char Dy; // Day + char Hr; // Hour + char Mi; // Minute/2 + char Se; // Second/2 + + char R1; // CRC byte 1 + char R2; // CRC byte 2 + char R3; // CRC byte 3 + char R4; // CRC byte 4 + + + if ( piNodeCount ) + { + *piNodeCount = 2; + } + + + if ( strlen( sBuf ) != MAX_SN_LENGTH ) + { + //----------------------------- + // Illegal serial number length + //----------------------------- + + return( 0 ); + } + + //------------------------------------------------------ + // Assign buffer fields to our serial number field codes + //------------------------------------------------------ + + R1 = sBuf[ 7 ]; + R2 = sBuf[ 14 ]; + R3 = sBuf[ 5 ]; + R4 = sBuf[ 11 ]; + + P1 = sBuf[ 0 ]; + P2 = sBuf[ 1 ]; + Pl = sBuf[ 2 ]; + Or = sBuf[ 3 ]; + N2 = sBuf[ 4 ]; + Mi = sBuf[ 6 ]; + Dy = sBuf[ 8 ]; + Se = sBuf[ 9 ]; + Yr = sBuf[ 10 ]; + Hr = sBuf[ 12 ]; + N1 = sBuf[ 13 ]; + Mo = sBuf[ 15 ]; + + crcBuf[ 0 ] = R1; + crcBuf[ 1 ] = R2; + crcBuf[ 2 ] = R3; + crcBuf[ 3 ] = R4; + crcBuf[ 4 ] = '\0'; + + //---------------------------------- + // build buffer for encryption check + //---------------------------------- + + buf[ 0 ] = P1; + buf[ 1 ] = P2; + buf[ 2 ] = Pl; + buf[ 3 ] = Or; + buf[ 4 ] = N2; + buf[ 5 ] = Mi; + buf[ 6 ] = Dy; + buf[ 7 ] = Se; + buf[ 8 ] = Yr; + buf[ 9 ] = Hr; + buf[ 10 ] = N1; + buf[ 11 ] = Mo; + buf[ 12 ] = '\0'; + + + oldCRC = word( strtol( crcBuf, + NULL, + 16 ) ); + + + strcpy( eBuf, buf ); + + encryptData( eBuf, strlen( eBuf ), 0 ); + + + newCRC = makeCRC16( strlen( buf ), + 0, + eBuf ); + + + sprintf( crcBuf, "%04x", newCRC ); + + strupr( crcBuf ); + + + if ( toupper( P1 ) != 'P' || + toupper( P2 ) != 'B' ) + { + //--------------------- + // Invalid product code + //--------------------- + + return( 0 ); + } + + pstrProductID[ 0 ] = P1; // buf[ 0 ]; + pstrProductID[ 1 ] = P2; // buf[ 1 ]; + pstrProductID[ 2 ] = '\0'; + + iPlatformID = Pl; // buf[ 2 ]; + iOriginID = Or; // buf[ 3 ]; + + counterBuf[ 0 ] = N1; // buf[ 10 ]; + counterBuf[ 1 ] = N2; // buf[ 4 ]; + counterBuf[ 2 ] = '\0'; + + minuteBuf[ 0 ] = Mi; // buf[ 5 ]; + minuteBuf[ 1 ] = '\0'; + + dayBuf[ 0 ] = Dy; // buf[ 6 ]; + dayBuf[ 1 ] = '\0'; + + secBuf[ 0 ] = Se; // buf[ 7 ]; + secBuf[ 1 ] = '\0'; + + yearBuf[ 0 ] = Yr; // buf[ 8 ]; + yearBuf[ 1 ] = '\0'; + + hourBuf[ 0 ] = Hr; // buf[ 9 ]; + hourBuf[ 1 ] = '\0'; + + monthBuf[ 0 ] = Mo; // buf[ 11 ]; + monthBuf[ 1 ] = '\0'; + + + if ( not isxdigit( R1 ) or + not isxdigit( R2 ) or + not isxdigit( R3 ) or + not isxdigit( R4 ) ) + { + //------------------------------------ + // Illegal CRC value - not hexadecimal + //------------------------------------ + + return( 0 ); + } + else if ( newCRC != oldCRC ) + { + //----------------------- + // CRC values don't match + //----------------------- + + return( 0 ); + } + else if ( not isupper( iPlatformID ) ) + { + //-------------------- + // Illegal platform ID + //-------------------- + + return( 0 ); + } + else if ( not isValidMegaNum( iOriginID ) ) + { + //------------------ + // Illegal origin ID + //------------------ + + return( 0 ); + } + else if ( not isValidMegaNum( counterBuf[ 0 ] ) or + not isValidMegaNum( counterBuf[ 1 ] ) ) + { + //---------------------- + // Illegal counter value + //---------------------- + + return( 0 ); + } + else if ( not isValidMegaNum( yearBuf[ 0 ] ) ) + { + //------------------- + // Illegal year value + //------------------- + + return( 0 ); + } + else if ( not isValidMegaNum( monthBuf[ 0 ] ) ) + { + //-------------------- + // Illegal month value + //-------------------- + + return( 0 ); + } + else if ( not isValidMegaNum( dayBuf[ 0 ] ) ) + { + //------------------ + // Illegal day value + //------------------ + + return( 0 ); + } + else if ( not isValidMegaNum( hourBuf[ 0 ] ) ) + { + //------------------- + // Illegal hour value + //------------------- + + return( 0 ); + } + else if ( not isValidMegaNum( minuteBuf[ 0 ] ) ) + { + //--------------------- + // Illegal minute value + //--------------------- + + return( 0 ); + } + else if ( not isValidMegaNum( secBuf[ 0 ] ) ) + { + //--------------------- + // Illegal second value + //--------------------- + + return( 0 ); + } + + + iCounter = ( word ) strtol( counterBuf, NULL, BASE_36 ); + minValue = ( word ) strtol( minuteBuf, NULL, BASE_36 ); + dt.day = strtol( dayBuf, NULL, BASE_36 ); + secValue = ( word ) strtol( secBuf, NULL, BASE_36 ); + yearValue = ( word ) strtol( yearBuf, NULL, BASE_36 ); + tm.hour = strtol( hourBuf, NULL, BASE_36 ); + dt.month = strtol( monthBuf, NULL, BASE_36 ); + + + if ( iCounter > MAX_SN_COUNTER ) + { + //--------------------------- + // Counter value out of range + //--------------------------- + + return( 0 ); + } + else if ( yearValue > BASE_36 ) + { + //------------------ + // year out of range + //------------------ + + return( 0 ); + } + else if ( dt.month > MAX_SN_MONTHS ) + { + //---------------------- + // Month second of range + //---------------------- + + return( 0 ); + } + else if ( dt.day > MAX_SN_DAYS ) + { + //----------------- + // Day out of range + //----------------- + + return( 0 ); + } + else if ( tm.hour > MAX_SN_HOURS ) + { + //--------------------- + // Hour second of range + //--------------------- + + return( 0 ); + } + else if ( minValue > MAX_SN_MINS ) + { + //--------------------------- + // Minutes value out of range + //--------------------------- + + return( 0 ); + } + else if ( secValue > MAX_SN_SECS ) + { + //-------------------- + // second out of range + //-------------------- + + return( 0 ); + } + + dt.month++; + dt.day++; + + dt.year = START_YEAR + yearValue; + tm.minute = minValue * 2; + tm.second = secValue * 2; + + + if ( piNodeCount ) + { + *piNodeCount = iCounter; + } + + return( 1 ); +} + + + +static +regResults registration_info( char *name, + char *serial, + char *actcode, + word *node_count ) +{ + word i; + word checksum = 0; + byte nBuf[ 80 ]; + byte sBuf[ 80 ]; + + + if ( memcmp( system_code_buf, + DEFAULT_SYSTEM_CODE, + SYSTEM_CODE_LEN ) == 0 ) + { + //--------------------- + // System Code is blank + //--------------------- + + if ( actcode ) + { + strcpy( actcode, DEFAULT_SYSTEM_CODE ); + } + } + else + { + //--------------------------------------------------------- + // Looks like we have a valid system code. Let's decode it + //--------------------------------------------------------- + + char eBuf[ 80 ]; + + + memmove( eBuf, + system_code_buf, + SYSTEM_CODE_LEN ); + + decryptData( eBuf, + SYSTEM_CODE_LEN, + 0x00 ); + + + if ( actcode ) + { + //--------------------------------------------------------- + // Now let's copy that system code to our calling parameter + //--------------------------------------------------------- + + sprintf( actcode, + "%-12.12s", + eBuf ); + } + } + + + if ( memcmp( regname_buf, + DEFAULT_REGNAME, + USERNAME_LEN ) == 0 ) + { + //------------------- + // User name is blank + //------------------- + + return( registrationNone ); + } + else if ( memcmp( serial_buf, + DEFAULT_SERIALNO, + SERIAL_NUM_LEN ) == 0 ) + { + //----------------------- + // Serial number is blank + //----------------------- + + return( registrationNone ); + } + + + for ( i = 0; i < USERNAME_LEN; i++ ) + { + checksum += regname_buf[ i ]; + } + + + checksum = checksum & 0x00FF; + + + memmove( nBuf, regname_buf, USERNAME_LEN ); + memmove( sBuf, serial_buf, SERIAL_NUM_LEN ); + + + decryptData( nBuf, USERNAME_LEN, 0x00 ); + decryptData( sBuf, SERIAL_NUM_LEN, checksum ); + + + if ( memchr( sBuf, '\0', SERIAL_NUM_LEN ) == NULL ) + { + //--------------------------------- + // One of 'em isn't null terminated + //--------------------------------- + + return( registrationBad ); + } + else if ( memchr( nBuf, '\0', USERNAME_LEN ) == NULL ) + { + //--------------------------------- + // One of 'em isn't null terminated + //--------------------------------- + + return( registrationBad ); + } + else if ( not serialNumberDecode( sBuf, node_count ) ) + { + //---------------------------------- + // couldn't decode the serial number + //---------------------------------- + + return( registrationBad ); + } + + + if ( name ) + { + strcpy( name, nBuf ); + } + + + if ( serial ) + { + serial[ 0 ] = sBuf[ 0 ]; + serial[ 1 ] = sBuf[ 1 ]; + serial[ 2 ] = sBuf[ 2 ]; + serial[ 3 ] = sBuf[ 3 ]; + serial[ 4 ] = '-'; + serial[ 5 ] = sBuf[ 4 ]; + serial[ 6 ] = sBuf[ 5 ]; + serial[ 7 ] = sBuf[ 6 ]; + serial[ 8 ] = sBuf[ 7 ]; + serial[ 9 ] = '-'; + serial[ 10 ] = sBuf[ 8 ]; + serial[ 11 ] = sBuf[ 9 ]; + serial[ 12 ] = sBuf[ 10 ]; + serial[ 13 ] = sBuf[ 11 ]; + serial[ 14 ] = '-'; + serial[ 15 ] = sBuf[ 12 ]; + serial[ 16 ] = sBuf[ 13 ]; + serial[ 17 ] = sBuf[ 14 ]; + serial[ 18 ] = sBuf[ 15 ]; + + serial[ 19 ] = sBuf[ 16 ]; + + serial[ 20 ] = '\0'; + } + + + return( registrationGood ); +} + + + +static +char *serialFormatted( char *sBuf ) +{ + static char tBuf[ 20 ]; + + + sprintf( tBuf, + "%-4.4s %-4.4s %-4.4s %-4.4s", + sBuf, + sBuf + 4, + sBuf + 8, + sBuf + 12 ); + + return( tBuf ); +} + + + +char *software_serial_number( void ) +{ + static char buf[ 50 ]; + regResults result; + + + if ( registered ) + { + result = registration_info( NULL, + buf, + NULL, + NULL ); + + + //------------------------------------------- + // This is a "shareware" copy of the software + //------------------------------------------- + + if ( result == registrationGood ) + { + //---------------------------------------------------------- + // We have valid registration information. Let's return the + // serial number to the calling function. + //---------------------------------------------------------- + + return buf; + //return( serialFormatted( buf ) ); + } + } + + + //------------------------------------------------------------- + // We have a version with no serial number. This means that we + // have an unregistered copy of the software. + //------------------------------------------------------------- + + return( UNREG_STRING ); +} + + + +char *registered_user_name( void ) +{ + + regResults result; + static char buf[ 50 ]; + + + + if ( registered ) + { + result = registration_info( buf, + NULL, + NULL, + NULL ); + + + //------------------------------------------- + // This is a "shareware" copy of the software + //------------------------------------------- + + if ( result == registrationGood ) + { + //---------------------------------------------------------- + // We have valid registration information. Let's return the + // user's name to the calling function. + //---------------------------------------------------------- + + return( buf ); + } + } + + + //--------------------------------------------------------- + // We have a version with no user name. This means that we + // have an unregistered copy of the software. + //--------------------------------------------------------- + + return( UNREG_STRING ); +} + + + +char *get_system_code( void ) +{ + regResults result; + static char buf[ 30 ]; + + + if ( registered ) + { + result = registration_info( NULL, + NULL, + buf, + NULL ); + + + //------------------------------------------- + // This is a "shareware" copy of the software + //------------------------------------------- + + if ( result == registrationGood ) + { + return( buf ); + } + } + + + return( UNREG_STRING ); +} + + + +word get_node_count( void ) +{ + regResults result; + word iNodeCount = 2; + + + if ( registered ) + { + result = registration_info( NULL, + NULL, + NULL, + & iNodeCount ); + + + //------------------------------------------- + // This is a "shareware" copy of the software + //------------------------------------------- + + if ( result == registrationGood ) + { + return iNodeCount; + } + } + + + return 2; +} + + + +word is_version_registered( void ) +{ + regResults result; + char serial[ 80 ]; + char name[ 80 ]; + + + result = registration_info( name, + serial, + NULL, + NULL ); + + + if ( result == registrationGood ) + { + //---------------------- + // Fully registered copy + //---------------------- + + return( TRUE ); + } + else + { + //--------------------- + // Unregistered edition + //--------------------- + + return( FALSE ); + } +} + + + +void CHECK_REG( void ) +{ + if ( is_version_registered() ) + { + registered = TRUE; + max_node_count = get_node_count(); + } + else + { + registered = TRUE; + max_node_count = 255; + } +} diff --git a/REGIS.OBJ b/REGIS.OBJ new file mode 100644 index 0000000..f05590f Binary files /dev/null and b/REGIS.OBJ differ diff --git a/REPLYMSG.CPP b/REPLYMSG.CPP new file mode 100644 index 0000000..af9ba02 --- /dev/null +++ b/REPLYMSG.CPP @@ -0,0 +1,211 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +void +replymsg(Message& orgmsg) +{ + Message msg; + MsgArea ma; + bool diff_area = FALSE; + + strcpy(msg.to,orgmsg.from); + strcpy(msg.from,user.name); + strcpy(msg.subj,orgmsg.subj); + + ma = *orgmsg.msgArea; + + msg.setArea(ma.replyBoard); + + if(ma.replyBoard && ma.replyBoard != ma.areaNum) diff_area = TRUE; + + ma = *msg.msgArea; + + if(ma.flags == 3) + { + if(user.alias[0] == '\0') strcpy(user.alias,user.name); + strcpy(msg.from,user.alias); + } + else + if(ma.flags && (ma.flags!=2 || user.alias[0])) + { + if(ma.flags == 2) + io << "\n\n" << S_REPLY_TO_MSG_USING_YOUR_ALIAS; + else + io << "\n\n" << S_REPLY_TO_MSG_USING_AN_ALIAS; + + if(io.ask(0)) + { + if(ma.flags==2) + { + if(user.alias[0] == '\0') strcpy(user.alias,user.name); + strcpy(msg.from,user.alias); + } + else + for(;;) + { + User tmpuser; + + io << "\n\n" << S_ENTER_ALIAS_TO_USE; + io.read(msg.from,35); + if(!msg.from[0]) return; + if(tmpuser.search(msg.from,TRUE,FALSE,TRUE)) continue; + if(!tmpuser.search(msg.from)) break; + } + + io << '\n'; + } + } + + io << "\n\n" << S_SHOW_MESSAGE_SUBJECT(msg.subj); + + io << "\n\n" << S_DO_YOU_WANT_TO_CHANGE_THE_SUBJECT; + + if(io.ask(FALSE)) + { + io << "\n\n" << S_ENTER_MESSAGE_SUBJECT; + io.read(msg.subj,63); + if(!msg.subj[0]) return; + } + +switch(ma.msgType) + { + case MSG_BOTH: { + io << "\n\n" << S_ASK_PRIVATE_MESSAGE; + if(io.ask(0)) msg.attr |= MSGATTR_PRIVATE; + } break; + case MSG_PVT: msg.attr |= MSGATTR_PRIVATE; break; + } + +if(ma.msgKind==MSG_NET) + { + msg.destZone = orgmsg.origZone; + msg.destNet = orgmsg.origNet; + msg.destNode = orgmsg.origNode; + msg.destPoint= orgmsg.pointNum(0); + + if(check_access(cfg.crashlevel,cfg.crashflags)) + { + io << "\n\n" << S_ASK_SEND_CRASH; + if(io.ask(0)) msg.attr |= MSGATTR_CRASH; + } + + if(cfg.killsent) msg.attr |= MSGATTR_KILL; + } + +unlink("MSGTMP"); + +if(fsed_mode && (ansi_mode || avatar)) + { + String quote; + + io << "\n\n" << S_QUOTING_MESSAGE << '\xFF'; + + if(!cfg.quotestring[0]) strcpy(cfg.quotestring,">>"); + + for(int i=0;i, %s wrote to %s :\r\n\r\n", + orgmsg.postDate[0], + months_short[orgmsg.postDate[1]], + orgmsg.postTime[0], + orgmsg.postTime[1], + orgmsg.from, + orgmsg.to); + + int l = 255; + + for(long off=0;l==255;off+=255) + { + char s[256]; + + l = orgmsg.readText(s,off,255); + + for(int j=0;j78-quote.len()) + { + String wrap; + wordwrap(line,wrap,78-quote.len()); + tmpf << quote << line << "\r\n"; + line=wrap; + } + } + } + + if(line.len()) tmpf << quote << line << "\r\n"; + + tmpf.close(); + } + +write_msginf( msg.from , msg.to , msg.subj , ma.highMsg()+1 , ma.name , (msg.attr & MSGATTR_PRIVATE) ? "YES":"NO"); + +edit_message(); + +unlink("MSGINF"); + +if(!access("MSGTMP",0)) + { + io << "\n\n" << S_SAVING_MESSAGE; + + msg.postDate.today(); + msg.postTime.now(); + + long nr=msg.add(); + + if(nr >= 1) + { + nr = msg.msgBase()->msgNum(*msg.msgArea,nr); + } + + if(nr<1) io << S_SAVING_MESSAGE_ERROR; + else + { + io << form("\3#%d\n",nr); + + if(!diff_area) msg.addReply(orgmsg); + + user.msgsPosted++; + + LOG(1,"Msg #%ld, Rep to #%ld from %s",msg.num,orgmsg.num,orgmsg.from); + } + } + else + LOG(1,"Msg aborted. Reply to #%ld from %s",orgmsg.num,orgmsg.from); +} + diff --git a/REPLYMSG.OBJ b/REPLYMSG.OBJ new file mode 100644 index 0000000..6dbc1af Binary files /dev/null and b/REPLYMSG.OBJ differ diff --git a/REPORT.BTM b/REPORT.BTM new file mode 100644 index 0000000..da66e97 --- /dev/null +++ b/REPORT.BTM @@ -0,0 +1,3 @@ +echo Generating source file report +call clines >>source.rpt +list source.rpt diff --git a/RIP.CPP b/RIP.CPP new file mode 100644 index 0000000..6a098ef --- /dev/null +++ b/RIP.CPP @@ -0,0 +1,408 @@ +#include +#include +#include "proboard.hpp" + +const int MAX_ICONS = 200; + +static Window rip_window; + +static void +open_sending_rip() +{ + tsw_cursoroff(); + rip_window.open(tsw_hsize/2-15 , tsw_vsize/2 - 1 , tsw_hsize/2+15 , tsw_vsize/2 + 1 , 0x1F , 0); + tsw_centerline(tsw_vsize/2,"SENDING RIP SEQUENCE",0x9E); +} + +static void +close_sending_rip() +{ + rip_window.close(); + tsw_cursoron(); +} + +String +meganum( word num ) +{ + int n[2]; + char s[3] = "00"; + + n[0] = num / 36; + n[1] = num % 36; + + for(int i = 0 ; i < 2 ; i++) + { + if(n[i] < 10) + s[i] = '0' + n[i]; + else + s[i] = 'A' + n[i] - 10; + } + + return String(s); +} + +void +rip_text_window( int x0, int y0 , int x1 , int y1 , int font ) +{ + if(rip_mode) + { + io.show_local = FALSE; + + String s; + + s << "\r!|w" << meganum(x0) + << meganum(y0) + << meganum(x1) + << meganum(y1) + << '1' + << char(font + '0') + << '\n'; + + io << s << char(0xFF); + + io.show_local = TRUE; + } +} + +void +rip_reset() +{ + if(rip_mode) rip_send("\r!|1K|*\n"); +} + +bool +show_rip( char *ripfile , bool reset ) +{ + if(!rip_mode) return FALSE; + + FileName fn(cfg.RIPpath,ripfile); + fn.changeExt("RIP"); + + if(reset) rip_reset(); + + open_sending_rip(); + + io.show_local = FALSE; + io << '\r'; + char k = io.sendfile(fn , NULL); + io.show_local = TRUE; + + close_sending_rip(); + + return (k != ANS_NOFILE); +} + +void +rip_send( char *s ) +{ + if(!rip_mode) return; + + open_sending_rip(); + io.show_local = FALSE; + io << s << char(0xFF); + io.show_local = TRUE; + close_sending_rip(); +} + +bool +rip_icon_exists( char *fn ) +{ + String cmd = "\r!|1F010000"; + cmd << fn << "\n"; + rip_send(cmd); + + String response; + dword ticks = clockticks(); + + while(clockdiff(ticks)<30) + { + char k = io.readkey(); + + if(k) + { + if(k == '\r') + { + if(response == "0") + { + return FALSE; + } + if(response == "1") + { + return TRUE; + } + } + + if(k == '\n') continue; + + response << k; + } + } + + return FALSE; +} + + +void +rip_send_icons() +{ + if(rip_mode) + { + FileName fn(cfg.iconspath,"*.IC?"); + + String *icons = new String[MAX_ICONS]; + + DirScan dir(fn); + + for(int i = 0 ; int(dir) && i=0 ; i--) + { + f << cfg.iconspath << (char *)icons[i] << '\n'; + } + f.close(); + + rip_send("\r!|907020000<>\n"); + + download(form("/F=@%s /K=Z /I /Q /N /T",(char *)fn)); + } + } +} + +void +rip_query( char *cmd ) +{ + rip_send(form("\r!|10000%s\n" , cmd)); +} + +void +rip_color( int color ) +{ + rip_send(form("\r!|c%02X\n",color)); +} + +void +rip_fill_color( int pattern , int color) +{ + rip_send(form("\r!|S%02X%02X\n",pattern,color)); +} + +void +rip_bar( int x1 , int y1 , int x2 , int y2 ) +{ + String cmd = "\r!|B"; + + cmd << meganum(x1) + << meganum(y1) + << meganum(x2) + << meganum(y2) + << '\n'; + + rip_send(cmd); +} + +void +rip_kill_mouse_fields() +{ + rip_send("\r!|1K\n"); +} + +void +rip_nomore() +{ + rip_send("\r!|#|#|#\n"); +} + +void +rip_get_image( int x1,int y1,int x2,int y2 ) +{ + String cmd = "\r!|1C"; + + cmd << meganum(x1) + << meganum(y1) + << meganum(x2) + << meganum(y2) + << "0\n"; + + rip_send(cmd); +} + +void +rip_put_image( int x,int y ) +{ + String cmd = "\r!|1P"; + + cmd << meganum(x) + << meganum(y) + << "000\n"; + + rip_send(cmd); +} + +void +rip_button(int x1,int y1,int x2,int y2,int hotkey,bool def,char *icon,char *text,char *hostcmd) +{ + String cmd = "\r!|1U"; + + cmd << meganum(x1) + << meganum(y1) + << meganum(x2) + << meganum(y2) + << meganum(hotkey) + << meganum(def ? 2:0) + << '0' + << icon << "<>" << text << "<>" << hostcmd + << '\n'; + + rip_send(cmd); +} + + +void +rip_start_dialog( char *prompt, int max ) +{ + int width = max; + + if(strlen(prompt) > width) width = strlen(prompt); + + int offset = width/2 + width%2; + + rip_save_textwindow(); + rip_get_image(297-offset*8, 50 , 342+offset*8, 108 ); + rip_send("\r!|Y00000100|1B0000020PVK030F000F080700000F07000000\n"); + rip_button(300-offset*8,53,339+offset*8,105,0,FALSE,"","",""); + rip_send("\r!|1B0000020PHK030F000F080700000F07000000\n"); + rip_button(310-offset*8,56,329+offset*8,75,0,FALSE,"",prompt,""); + + offset = max/2+max%2; + + rip_text_window(40-offset,11,39+offset,11,0); + rip_send("\r!|1B00000200LC030B00080F0100080F07000000\n"); + rip_button(310-offset*8,87,329+offset*8,98,0,FALSE,"","",""); + rip_nomore(); + + io.show_local = FALSE; + io.color(6); + io.show_local = TRUE; +} + +void +rip_end_dialog() +{ + rip_paste_clipboard(); + rip_restore_textwindow(); +} + +void +rip_start_yesno_dialog( char *prompt , bool def) +{ + int width = 30; + + if(strlen(prompt) > width) width = strlen(prompt); + + int offset = width/2 + width%2; + + rip_save_textwindow(); + rip_get_image(297-offset*8, 50 , 358+offset*8, 125 ); + rip_send("\r!|Y00000100|1B0000020PVK030F000F080700000F07000000\n"); + rip_button(300-offset*8,53,339+offset*8,120,0,FALSE,"","",""); + rip_send("\r!|1B0000020PHK030F000F080700000F07000000\n"); + rip_button(310-offset*8,56,329+offset*8,75,0,FALSE,"",prompt,""); + + rip_send("\r!|1B0000020SAI030E000F080700020F07000000\n"); + + rip_text_window(0,0,0,0,0); + rip_button(250,85,310,108,'Y',def ,"","Yes","Y"); + rip_button(329,85,389,108,'N',!def,"","No" ,"N"); + rip_nomore(); +} + +void +rip_textmode() +{ + if(user.screenLength == 38) user.screenLength = 23; + + if(rip_mode) + { + if(user.ripFont) + { + rip_screenlines = 22; + rip_text_window(0,0,79,21,2); + } + else + { + rip_screenlines = 38; + rip_text_window(0,0,79,37,0); + } + + rip_send("\r!|Y00000100\n" + "!|1B0000020074030F000F080F00000F07000000|1U018OHR9A0000<><>\n" + "!|1B0000020PHC030F000F080700000F07000000|1U028PHR9A0000<><>\n" + "!|#|#|#\n"); + + rip_show_enter(); + } +} + +void +rip_clear_status() +{ + rip_fill_color(1,7); + rip_color(7); + rip_bar(3,315,637,332); + rip_kill_mouse_fields(); +} + +void +rip_show_enter() +{ + rip_send("\r!|1B0000020QOY030F000B080300000E07000000|1UF58THN960000<>Enter<>^m\n!|#|#|#\n"); +} + +void +rip_show_more() +{ + rip_send( + "\r!|1B0000020QOY020F000B080100020E07000000\n" + "!|1U2T8T47962H00<>Yes<>Y|1U4H8T5V962600<>No<>N|1U658T8N961V00<>Continuous<>C\n" + "!|1B0000020PI8020B000F080700000E07000000|1U0B8S2J970000<>More?<>|#|#|#\n" + ); +} + +void +rip_show_more_tag() +{ + rip_send( + "\r!|1B0000020QOY020F000B080100020E07000000\n" + "!|1U2T8T47962H00<>Yes<>Y|1U4H8T5V962600<>No<>N|1U658T8N961V00<>Continuous<>C\n" + "!|1UAK8TDC961X00<>Edit Tagged<>E|1U8W8TAA962C00<>Tag<>T\n" + "!|1B0000020PI8020B000F080700000E07000000|1U0B8S2J970000<>More?<>|#|#|#\n" + ); +} diff --git a/RIP.OBJ b/RIP.OBJ new file mode 100644 index 0000000..a3975c8 Binary files /dev/null and b/RIP.OBJ differ diff --git a/SCANMSG.CPP b/SCANMSG.CPP new file mode 100644 index 0000000..6369205 --- /dev/null +++ b/SCANMSG.CPP @@ -0,0 +1,260 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +void +scan_msg(char *data) +{ + MsgArea ma; + String param[10]; + int searchmethod = 0; + int searchorder = 0; + char searchdata[80]; + long firstmsg=0; + bool nonext = FALSE; + int area; + + Message msg; + MarkedMsgList marked = markedmsglist; + + parse_data(data,param); + + if(param[0][0]=='*') area = user.msgArea; + else area = atoi(param[0]); + + if(area) + { + if(!ma.read(area)) return; + + if(!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) && !ma.sysopAccess()) + { + io << "\n\n" << S_ACCESS_DENIED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + long n = ma.msgBase->numMsgs(ma); + + if(n <= 0) + { + io << '\n' << S_THERE_ARE_NO_MESSAGES_IN_THIS_AREA << + "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + msg.setArea(area); + } + + + if(param[1][0]=='/' && param[1][1]=='N') + { + searchmethod = READMSG_MARKED; + searchorder = +1; + } + else + { + String hotkeys = K_SCAN_MESSAGES_ORDER_SELECTION; + hotkeys << '\r'; + //char *hotkeys="FRANSTM\r"; + char key; + + if(area) + { + io << '\n'; + key=io.send(S_SCAN_MESSAGES_ORDER_SELECTION,hotkeys); + } + else + key = K_SCAN_MESSAGES_ORDER_SELECTION[3]; + + if(!key) key=io.wait(hotkeys); + + key = hotkeys.find(String(char(key))); + + io << "\n\n"; + switch(key) + { + case 6 : return; + case 1 : io << S_READMSG_FORWARD << '\n'; + searchmethod = READMSG_ALL; + searchorder = 1; + break; + case 2 : io << S_READMSG_REVERSE << '\n'; + searchmethod = READMSG_ALL; + searchorder = -1; + break; + case 0 : io << S_READMSG_ALL << '\n'; + searchmethod = READMSG_ALL; + break; + case 3 : io << S_READMSG_NEW << '\n'; + searchmethod = READMSG_NEW; + searchorder = 1; + break; + case 4 : { + io << S_READMSG_SELECTED; + char k = wait_language_hotkeys(K_READMSG_SELECTED); + + if(k == '\r') return; + + io << K_READMSG_SELECTED[k]; + + switch(k) + { + case 0: k = 'F'; break; + case 1: k = 'T'; break; + case 2: k = 'S'; break; + case 3: k = 'E'; break; + } + searchdata[0] = k; + io << "\n\n" << S_READMSG_SELECTED_SEARCH_FOR; + io.read(&searchdata[1],60,READMODE_UPALL); + if(!searchdata[1]) return; + searchmethod = READMSG_SEL; + io << '\n'; + } break; + case 5 : io << S_READMSG_MARKED << '\n'; + searchmethod = READMSG_MARKED; + break; + } + + if(!searchorder) + { + io << S_READMSG_ALL_FORWARD_OR_REVERSE; + key=wait_language_hotkeys(K_READMSG_ALL_FORWARD_OR_REVERSE); + if(key==1) + { + searchorder = -1; + io << S_READMSG_REVERSE << '\n'; + } + else + { + searchorder = +1; + io << S_READMSG_FORWARD << '\n'; + } + } + + if(area) + { + long highnum = ma.msgBase->msgNum(ma,ma.msgBase->highMsg(ma)); + long lownum = ma.msgBase->msgNum(ma,ma.msgBase->lowMsg(ma)); + + if(searchorder<0) firstmsg = highnum; + else firstmsg = lownum; + + if(searchmethod != READMSG_MARKED && searchmethod != READMSG_INDIV) + { + io << '\n' << S_READMSG_START_AT_MESSAGE; + io.read(firstmsg); + + if(firstmsg > highnum && searchorder < 0) firstmsg = highnum; + if(firstmsg < lownum && searchorder > 0) firstmsg = lownum; + + firstmsg = ma.msgBase->msgId(ma,firstmsg); + + io << '\n'; + } + } + } // No "/N" parameter + + if(searchmethod == READMSG_NEW) + { + marked.clear(); + + io << '\n' << S_READMSG_SEARCHING_NEW_MESSAGES; + + get_new_msgs(marked,area); + + if(!marked.numMarked()) + { + io << "\n\n" << S_READMSG_NO_NEW_MESSAGES_FOUND << + "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + io << S_READMSG_X_NEW_MESSAGES_FOUND(form("%d",marked.numMarked())) << '\n'; + + searchmethod = READMSG_MARKED; + } + + if(searchmethod != READMSG_MARKED) + { + if(!msg.readFirst(searchmethod,searchorder,firstmsg,searchdata)) + { + io << '\n' << S_READMSG_NO_MESSAGES_FOUND + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + nonext = TRUE; + } + + int markedmsg_index = 0; + + for(;;) + { + if(searchmethod == READMSG_MARKED) + { + if(markedmsg_index >= marked.numMarked()) break; + + MessageIndex mi = marked[markedmsg_index++]; + + if(area) if(mi.area != area) continue; + + if(!msg.read(mi.num,mi.area)) continue; + } + + if(searchmethod!=READMSG_MARKED && !nonext) + if(!msg.readNext(searchmethod,searchorder,searchdata)) break; + + nonext = FALSE; + + ma = *msg.msgArea; + + if(!msg.readAccess()) continue; + + + String hotkeys("MNS\r"); + io << "\n\n" << S_SCAN_MESSAGES_SHOWMSG(form("%ld",msg.num),ma.name,msg.from,msg.to,msg.subj) << "\n\n"; + +// if( ma.sysopAccess() +// || ( ma.msgKind!=MSG_ECHO +// && ( !strcmpl(msg.from,user.name) +// || !strcmpl(msg.to,user.name) +// ) +// ) +// || ( ma.msgKind == MSG_ECHO +// && msg.attr & MSGATTR_UNSENT_ECHO +// && !strcmpl(msg.from,user.name) +// ) +// ) +// { +// io << "\6[\3D\6]elete "; +// hotkeys << 'D'; +// } + + io << S_SCAN_MESSAGES_PROMPT; + + char k = wait_language_hotkeys(K_SCAN_MESSAGES_PROMPT); + if(k==2) break; + switch(k) + { + case '\r': + case 1: io << K_SCAN_MESSAGES_PROMPT[1]; break; + case 0: { + io << S_MESSAGE_MARKED; + markedmsglist.add(msg); + LOG(2,"Msg #%ld marked",msg.num); + } break; +// case 'D': { +// io << "\7Deleted"; +// //msg.remove(); +// LOG(2,"Msg #%ld deleted",msg.num); +// } break; + } + } + + io << "\n\n" << S_END_OF_MESSAGES + << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; +} + diff --git a/SCANMSG.OBJ b/SCANMSG.OBJ new file mode 100644 index 0000000..644a137 Binary files /dev/null and b/SCANMSG.OBJ differ diff --git a/SELLANG.CPP b/SELLANG.CPP new file mode 100644 index 0000000..bb19d31 --- /dev/null +++ b/SELLANG.CPP @@ -0,0 +1,77 @@ +#include +#include "proboard.hpp" + +const int MAX_LANGUAGES = 20; + +void +select_language(char *data) +{ + if(data != NULL) + io << "\n\f\n"; + + io << S_SELECT_LANGUAGE_TITLE << "\n\n"; + + FileName *languages = new FileName[20]; + + DirScan scan(FileName(syspath,"*.PBL")); + + for(int i = 0; int(scan) ; scan++ , i= 1 && num <= i) + { + if(data) + io << "\n\n" << S_READING_LANGUAGE_FILE; + + if(!ReadLanguage( languages[num-1] )) + if(!ReadLanguage( cfg.defaultLanguage )) + fatalerror("Error reading default language file"); + + strcpy(user.language,languages[num-1]); + + readconfig(); + } + else + { + if(num) + io << "\n\n" << S_INVALID_ENTRY; + } + + if(num && data) + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + delete [] languages; +} diff --git a/SELLANG.OBJ b/SELLANG.OBJ new file mode 100644 index 0000000..c626b00 Binary files /dev/null and b/SELLANG.OBJ differ diff --git a/SETAREA.CPP b/SETAREA.CPP new file mode 100644 index 0000000..8d631a5 --- /dev/null +++ b/SETAREA.CPP @@ -0,0 +1,386 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +void select_filegroup(char *); +void select_msggroup(char *); + +void +set_msgarea(char *data) +{ + MsgArea ma; + int areanum = 0; + String param[50]; + word group = 0; + int columns = 2; + bool group_specified = FALSE; + bool listareas = FALSE; + bool show_lastread = TRUE; + bool list_specified = FALSE; + + BitArray arealist(MAX_MSG_AREAS,1); + + int npara = parse_data(data,param); + + for(int i=0;i=0) break; + + if(shown) return; + + io << "\n\f\n" << S_SELECT_MESSAGE_AREA_TITLE << "\n\n"; + + linecounter(3); + } + + io.enablestop(); + + for(int i=1,count=0;i<=MsgArea::highAreaNum();i++) + { + String newmail = " "; + + if(!arealist[i] || !ma.read(i) || !check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot)) continue; + + if(group && !ma.allGroups) + { + for(int g=0;g<4;g++) + { + if(ma.groups[g] == group) + break; + } + + if(g==4) + continue; + } + + if(!listareas && show_lastread) + if(ma.lastRead(user_recnr) < ma.highMsg()) + newmail = "\7*"; + + io << form("\3%4d. %s \6%-*.*s ",i,(char *)newmail,80/columns-10,80/columns-10,ma.name); + + if(stopped) break; + + if(!((++count)%columns)) + { + io << '\n'; + if(linecounter()) break; + } + } + + if(count%columns) io << '\n'; + + if(listareas) break; + } + + if(!listareas) + { + io << '\n'; + + if(!arealist[areanum] || !ma.read(areanum) || (!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) && !ma.sysopAccess())) + { + io << '\n' << S_UNKNOWN_MESSAGE_AREA << ' ' << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + user.msgArea = areanum; + + updatemenu = TRUE; + } +} + +void +set_filearea(char *data) +{ + FileArea fa; + word group = 0; + int areanum = 0; + bool arealist_created = FALSE; + bool group_specified = FALSE; + int columns = 2; + String param[50]; + BitArray arealist(MAX_FILE_AREAS , 1); + + int npara=parse_data(data,param); + + for(int i=0;i=0) break; + + if(shown) return; + + io << "\f\n" << S_SELECT_FILE_AREA_TITLE << "\n\n"; + + io << "\x17."; + + create_arealist(param,npara,arealist); + arealist_created = TRUE; + + io << '\r'; + + linecounter(3); + io.enablestop(); + + for(int i=1,count=0;i<=FileArea::highAreaNum();i++) + { + if(!arealist[i] || !fa.read(i)) continue; + + if(!check_access(fa.level,fa.flags,fa.flagsNot)) continue; + + if(group && !fa.allGroups) + { + for(int g=0;g<4;g++) + { + if(fa.groups[g] == group) + break; + } + + if(g==4) + continue; + } + + io << form("\3%4d. \6%-*.*s ",i,80/columns-8,80/columns-8,fa.name); + + if(stopped) break; + if(!((++count)%columns)) + { + io <<'\n'; + if(linecounter()) break; + } + } + + if(count%columns) io << '\n'; + } + +io << '\n'; + +if((arealist_created && !arealist[areanum]) || !fa.read(areanum) || !check_access(fa.level,fa.flags,fa.flagsNot)) + { + io << '\n' << S_UNKNOWN_FILE_AREA << ' ' << S_PRESS_ENTER_TO_CONTINUE; + return; + } + +user.fileArea = areanum; + +updatemenu = TRUE; +} + +void +select_filegroup(char *) +{ + File f; + AreaGroup group; + + f.open(FileName(syspath,"FGROUPS.PB")); + + io << "\f\n" << S_SELECT_FILE_AREA_GROUP_TITLE << "\n\n"; + + linecounter(3); + io.enablestop(); + + for(int i=1,count=0;;i++) + { + if(f.read(&group,sizeof(group)) != sizeof(group)) + break; + + if(!check_access(group.level,group.flags,group.flagsNot)) + continue; + + if(!group.name[0]) + continue; + + io << form(" \3%3d. \6%-29.29s ",i,group.name); + + if(stopped) break; + + if((count++)%2) + { + io <<'\n'; + if(linecounter()) break; + } + } + + if(count%2) io << '\n'; + + int groupnum = 0; + + io << '\n' << S_ENTER_GROUP_NUMBER; + + if(io.read(groupnum,3) < 0) return; + + io << '\n'; + + if(groupnum < 1 || groupnum > 255) + io << '\n' << S_UNKNOWN_GROUP << ' ' << S_PRESS_ENTER_TO_CONTINUE; + + f.seek(long(groupnum-1) * sizeof(group)); + + if(f.read(&group,sizeof(group)) != sizeof(group) || !check_access(group.level,group.flags,group.flagsNot)) + io << '\n' << S_UNKNOWN_GROUP << ' ' << S_PRESS_ENTER_TO_CONTINUE; + + user.fileGroup = groupnum; + + updatemenu = TRUE; +} + +void +select_msggroup(char *) +{ + File f; + AreaGroup group; + + f.open(FileName(syspath,"MGROUPS.PB")); + + io << "\f\n" << S_SELECT_MSG_AREA_GROUP_TITLE << "\n\n"; + + linecounter(3); + io.enablestop(); + + for(int i=1,count=0;;i++) + { + if(f.read(&group,sizeof(group)) != sizeof(group)) + break; + + if(!check_access(group.level,group.flags,group.flagsNot)) + continue; + + if(!group.name[0]) + continue; + + io << form(" \3%3d. \6%-29.29s ",i,group.name); + + if(stopped) break; + + if((count++)%2) + { + io <<'\n'; + if(linecounter()) break; + } + } + + if(count%2) io << '\n'; + + int groupnum = 0; + + io << '\n' << S_ENTER_GROUP_NUMBER; + + if(io.read(groupnum,3) < 0) return; + + io << '\n'; + + if(groupnum < 1 || groupnum > 255) + { + io << '\n' << S_UNKNOWN_GROUP << ' ' << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + f.seek(long(groupnum-1) * sizeof(group)); + + if(f.read(&group,sizeof(group)) != sizeof(group) || !check_access(group.level,group.flags,group.flagsNot)) + { + io << '\n' << S_UNKNOWN_GROUP << ' ' << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + user.msgGroup = groupnum; + + updatemenu = TRUE; +} + + diff --git a/SETAREA.OBJ b/SETAREA.OBJ new file mode 100644 index 0000000..e4f7257 Binary files /dev/null and b/SETAREA.OBJ differ diff --git a/SHELL.CPP b/SHELL.CPP new file mode 100644 index 0000000..49dc102 --- /dev/null +++ b/SHELL.CPP @@ -0,0 +1,822 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include +#include +#include "proboard.hpp" + +extern "C" int swapshell(char *command); + +static void write_dorinfo(int node,bool write_handle,bool write_avatar); +static void write_exitinfo1(); +static void read_exitinfo1(); +static void write_exitinfo2(); +static void read_exitinfo2(); +static void write_doorsys(); + +unsigned shell_windowed = 0; +unsigned shell_updateline = 0; +unsigned shell_swap = 0; + +char shell_swapname[13]; + +static bool use_underscore; + +inline void +test_ems() +{ + char far *ptr = (char far *) MK_FP(*((word *)MK_FP(0,0x67*4+2)),10); + + if(strncmp(ptr,"EMMXXXX0",8)) use_ems = 0; +} + + +static void +set_environment() +{ + static char _far *alloc_ptr = NULL; + + int envlen = 1; // Start with 1 (extra zero byte at end of table) + + for(int i=0;environ[i];i++) envlen += strlen(environ[i])+1; + + if(alloc_ptr != NULL) free(alloc_ptr); + + char far *eptr = (char far *)malloc(envlen+16); + + alloc_ptr = eptr; + + if(eptr == NULL) return; + + eptr = (char far *)normalize_ptr(eptr); // Normalize pointer + eptr = (char far *)MK_FP(FP_SEG(eptr)+1,0); // Make zero-offset pointer + + char _far *p = eptr; + + for(i=0;environ[i];i++) + { + memcpy(p,environ[i],strlen(environ[i])+1); + p += strlen(environ[i]) + 1; + } + + *p = 0; + + *((word _far *)MK_FP(_psp,0x2C)) = FP_SEG(eptr); +} + +void +shell(char *data) +{ + bool hotfossil = FALSE; + bool log = TRUE; + bool message = TRUE; + bool old_exitinfo = FALSE; + bool do_door_sys = FALSE; + bool suspend = FALSE; + bool sysop = FALSE; + bool no_io = FALSE; + bool doscmd = FALSE; + bool write_handle = FALSE; + bool write_avatar = TRUE; + +#ifdef DEBUG_EFL + LOG("EFLDEBUG: [SP=%04X] shell() entry",_SP); +#endif + + use_underscore = TRUE; + + int dorinfo_node = node_number; + + test_ems(); + shell_swap = cfg.doswap; + + String commandline; + + shell_windowed = 0; + shell_updateline = 0; + + bool flag = FALSE; + + for(;*data;data++) + { + if(*data=='*' && !flag) + { + flag = TRUE; + continue; + } + + if(flag) + { // free: J,K,U + switch(toupper(*data)) + { + case '*': commandline << '*'; break; + case '#': commandline << node_number; break; + case 'A': write_handle = TRUE; break; + case 'B': commandline << io.baud; break; + case 'C': commandline << getenv("COMSPEC"); break; + case 'D': do_door_sys = TRUE; break; + case 'E': old_exitinfo = TRUE; break; + case 'F': commandline << user_firstname; break; + case 'G': commandline << ((ansi_mode)?1:0); break; + case 'H': hotfossil = TRUE; break; + case 'I': commandline << cfg.inactivity_time; break; + // case 'J': break; + // case 'K': break; + case 'L': { + String s(user.name); + for(int i=0;i= 0) user.write(FALSE); + + write_taglist(); + + FileArea::close(); + + msgbase.close(); + + /* + f_users .close(); + f_usersxi .close(); + f_usersidx.close(); + f_userspb .close(); + */ + + display_mode = 1; + + word *screenbuf=new word[tsw_hsize*tsw_vsize]; + tsw_gettext(screenbuf,1,1,tsw_hsize,tsw_vsize); + + if(!hotfossil && !no_io) io.cooldown(); + + sprintf(shell_swapname,"PB$$$%03.3d.SWP",node_number); + + byte videomode = getvideomode(); + + unsigned old_vsize = tsw_vsize; + unsigned old_hsize = tsw_hsize; + + write_dorinfo(dorinfo_node,write_handle,write_avatar); + + if(old_exitinfo) + write_exitinfo1(); + else + write_exitinfo2(); + + if(do_door_sys) write_doorsys(); + + if(suspend) timer.suspend(); + + set_environment(); + +#ifdef DEBUG_EFL + LOG("EFLDEBUG: [SP=%04X] Before swapshell()",_SP); +#endif + + returnvalue=swapshell(commandline); + +#ifdef DEBUG_EFL + LOG("EFLDEBUG: [SP=%04X] After swapshell()",_SP); +#endif + + if(suspend) timer.restart(); + + timer.clearinactivity(); + + if(old_exitinfo) + read_exitinfo1(); + else + read_exitinfo2(); + + if(tsw_videocard==EGA) tsw_vsize = *((byte _far *)0x484)+1; + + tsw_hsize = *((byte far *)0x44A); + + if((old_vsize != tsw_vsize) || (old_hsize != tsw_hsize)) + { + setvideomode(videomode); + + if((videomode == 3) && (old_vsize>25)) set43(); + + if(tsw_videocard==EGA) tsw_vsize=*((byte _far *)0x484)+1; + + tsw_hsize = *((byte far *)0x44A); + } + + SCREEN.moveCursor(0,0); + + if(!hotfossil && !no_io) io.heatup(); + + read_taglist(); + + msgbase.open(); + + uo.setstatus(UO_BROWSING); + + tsw_puttext(screenbuf,1,1,tsw_hsize,tsw_vsize); + + timer.clearinactivity(); + + if(rip_mode) io << "\r\r[2!"; + + if(sysop) io << S_SYSOP_RETURNED_FROM_DOS << char(255); + + unlink(form("%sDORINFO%d.DEF",mypath,dorinfo_node)); + unlink(form("%sDOOR.SYS",mypath)); + unlink(form("%sEXITINFO.BBS",mypath)); + + delete [] screenbuf; + + updatemenu = TRUE; +} + +static void +write_dorinfo(int node,bool write_handle,bool write_avt) +{ + int i; + + File f(form("%sDORINFO%d.DEF",mypath,node),fmode_create | fmode_text); + + String sysopname (cfg.sysopname); + String username (user.name); + String usercity (user.city); + String boardname (cfg.bbsname); + + if(write_handle) if(user.alias[0]) username = user.alias; + + sysopname.upperCase(); + username.upperCase(); + usercity.upperCase(); + boardname.upperCase(); + + f << boardname << '\n'; + + for(i=0;iusers_bbs, + ei->usersxi_bbs, + upb ); + + ei->BaudRate = io.baud; + ei->CallCount = totalcalls; + + + strcpy( ei->LastCaller, lastcaller.name ); + c2pas( ei->LastCaller ); + + strcpy( ei->StartDate, "01-01-80" ); + c2pas( ei->StartDate ); + + + ei->TmLimit = timer.left(); + ei->DownLimit = int( download_limit - user.kbToday ); + ei->UserRecNum = user_recnr; + ei->LoginSec = 3600L * login_time[ 0 ] + + 60L * login_time[ 1 ] + + login_time[ 0 ]; + + + Date now(NOW); + + + sprintf( ei->TimeOfCreation, + "%02d:%02d", + now[ 0 ], + now[ 1 ] ); + + c2pas( ei->TimeOfCreation ); + + + sprintf( ei->LoginTime, + "%02d:%02d", + login_time[ 0 ], + login_time[ 1 ] ); + + c2pas( ei->LoginTime ); + + + sprintf( ei->LoginDate, + "%02d-%02d-%02d", + login_date[ 0 ], + login_date[ 1 ], + login_date[ 2 ] % 100 ); // Y2K FIXED! + // login_date[ 2 ] ); // Y2K BUG! + + c2pas( ei->LoginDate ); + + + ei->PageTimes = num_yells; + + + sprintf( ei->EventRunTime, + "%02d:%02d", + nextevent.start[ 0 ], + nextevent.start[ 1 ] ); + + c2pas( ei->EventRunTime ); + + + if ( nextevent.enabled ) + { + ei->EventStatus = 1; + } + else + { + ei->EventStatus = 2; + } + + + ei->EventErrorLevel = nextevent.errorlevel; + + + if ( nextevent.enabled ) + { + ei->EventDays = nextevent.days; + } + else + { + ei->EventDays = 0; + } + + + strcpy( ei->EventLastTimeRun, "01-01-80" ); + c2pas( ei->EventLastTimeRun ); + + + ei->NetMailEntered = ( net_entered ) ? TRUE : FALSE; + ei->EchoMailEntered = ( echo_entered ) ? TRUE : FALSE; + + ei->RIPmode = ! ! rip_mode; + ei->DoesAVT = ! ! avatar; + + + File f( form( "%sEXITINFO.BBS", mypath ), + fmode_create ); + + f.write( ei, sizeof( exitinfo2 ) ); + + + delete ei; +} + +static void +write_exitinfo1() +{ + struct exitinfo1 *ei = new exitinfo1; + + memset(ei,0,sizeof(exitinfo1)); + + ei->BaudRate = io.baud; + ei->CallCount = totalcalls; + + strcpy(ei->LastCaller,lastcaller.name); + c2pas(ei->LastCaller); + strcpy(ei->StartDate,"01-01-80"); + c2pas(ei->StartDate); + + ei->TmLimit = timer.left(); + ei->LoginSec = 3600L*login_time[0]+60L*login_time[1]+login_time[0]; + ei->DownLimit = int(download_limit-user.kbToday); + ei->UserRecNum = user_recnr; + + Date now(NOW); + sprintf(ei->TimeOfCreation,"%02d:%02d",now[0],now[1]); + c2pas(ei->TimeOfCreation); + sprintf(ei->LoginTime,"%02d:%02d",login_time[0],login_time[1]); + c2pas(ei->LoginTime); + sprintf(ei->LoginDate,"%02d-%02d-%02d",login_date[0],login_date[1],login_date[2]); + c2pas(ei->LoginDate); + + ei->PageTimes=num_yells; + + sprintf(ei->EventRunTime,"%02d:%02d",nextevent.start[0],nextevent.start[1]); + c2pas(ei->EventRunTime); + + if(nextevent.enabled) ei->EventStatus = 1; + else ei->EventStatus = 2; + + ei->EventErrorLevel = nextevent.errorlevel; + + if(nextevent.enabled) ei->EventDays = nextevent.days; + else ei->EventDays = 0; + + strcpy(ei->EventLastTimeRun,"01-01-80"); + c2pas(ei->EventLastTimeRun); + + ei->NetMailEntered = (net_entered) ? TRUE : FALSE; + ei->EchoMailEntered = (echo_entered) ? TRUE : FALSE; + + strcpy(ei->users_bbs.Name,user.name); + strcpy(ei->users_bbs.Location,user.city); + strcpy(ei->users_bbs.Password,user.passWord); + strncpy(ei->users_bbs.DataPhone,user.dataPhone,12); + ei->users_bbs.DataPhone[12]='\0'; + strncpy(ei->users_bbs.VoicePhone,user.voicePhone,12); + ei->users_bbs.VoicePhone[12]='\0'; + strcpy(ei->usersxi_bbs.Handle,user.alias); + strcpy(ei->usersxi_bbs.Comment,user.comment); + strcpy(ei->usersxi_bbs.ForwardFor,user.forwardTo); + + sprintf(ei->usersxi_bbs.BirthDate,"%02d-%02d-%02d",user.birthDate[1],user.birthDate[0],user.birthDate[2]); + sprintf(ei->usersxi_bbs.FirstDate,"%02d-%02d-%02d",user.firstDate[1],user.firstDate[0],user.firstDate[2]); + sprintf(ei->usersxi_bbs.SubDate ,"%02d-%02d-%02d",user.expDate[1],user.expDate[0],user.expDate[2]); + sprintf(ei->users_bbs .LastDate ,"%02d-%02d-%02d",user.lastDate[1],user.lastDate[0],user.lastDate[2]); + sprintf(ei->users_bbs .LastTime ,"%02d:%02d" ,user.lastTime[0],user.lastTime[1]); + + ei->users_bbs.Security = user.level ; + ei->users_bbs.NoCalls = user.timesCalled ; + ei->users_bbs.Elapsed = user.timeUsed ; + ei->users_bbs.Downloads = user.numDownloads ; + ei->users_bbs.DownloadsK = user.kbDownloaded ; + ei->users_bbs.Uploads = user.numUploads ; + ei->users_bbs.UploadsK = user.kbUploaded ; + ei->users_bbs.MsgsPosted = user.msgsPosted ; + ei->users_bbs.TodayK = user.kbToday ; + ei->users_bbs.ScreenLength = user.screenLength ; + ei->users_bbs.Credit = user.credit ; + ei->users_bbs.Pending = user.pending ; + ei->users_bbs.LastRead = user.highMsgRead ; + + for(int z=0;z<25;z++) ei->usersxi_bbs.CombinedInfo[z] = ((byte *)(&user.combinedBoards))[z]; + + ei->users_bbs.Flags = swapbits(*((long *)&user.aFlags)); + + if(user.uFlags & UFLAG_DELETED) ei->users_bbs.Attribute |= RA1_UFLAG_DELETED; + if(user.uFlags & UFLAG_CLEAR) ei->users_bbs.Attribute |= RA1_UFLAG_CLRSCR; + if(user.uFlags & UFLAG_PAUSE) ei->users_bbs.Attribute |= RA1_UFLAG_MORE; + if(user.uFlags & UFLAG_ANSI) ei->users_bbs.Attribute |= RA1_UFLAG_ANSI; + if(user.uFlags & UFLAG_NOKILL) ei->users_bbs.Attribute |= RA1_UFLAG_NOKILL; + if(user.uFlags & UFLAG_IGNORE) ei->users_bbs.Attribute |= RA1_UFLAG_IGNORE; + if(user.uFlags & UFLAG_FSED) ei->users_bbs.Attribute |= RA1_UFLAG_FSE; +// if(uflags & UFLAG_QUIET) ei->users_bbs.Attribute |= RA_UFLAG_QUIET; + + if(user.uFlags & UFLAG_HIDDEN) ei->users_bbs.Attribute2 |= RA1_UFLAG2_HIDDEN; + if(user.uFlags & UFLAG_AVATAR) ei->users_bbs.Attribute2 |= RA1_UFLAG2_AVATAR; + + if(user.uFlags & UFLAG_HOTKEYS) ei->users_bbs.Attribute2 |= RA1_UFLAG2_HOTKEYS; + + ei->usersxi_bbs.MsgArea = user.msgArea & 0xFF; + ei->usersxi_bbs.FileArea = user.fileArea & 0xFF; + + c2pas(ei->users_bbs.Name); + c2pas(ei->users_bbs.Location); + c2pas(ei->users_bbs.Password); + c2pas(ei->users_bbs.DataPhone); + c2pas(ei->users_bbs.VoicePhone); + c2pas(ei->users_bbs.LastTime); + c2pas(ei->users_bbs.LastDate); + c2pas(ei->usersxi_bbs.Handle); + c2pas(ei->usersxi_bbs.Comment); + c2pas(ei->usersxi_bbs.BirthDate); + c2pas(ei->usersxi_bbs.SubDate); + c2pas(ei->usersxi_bbs.FirstDate); + c2pas(ei->usersxi_bbs.ForwardFor); + + File f(form("%sEXITINFO.BBS",mypath),fmode_create); + f.write(ei,sizeof(exitinfo1)); + delete ei; +} + + + +static void +read_exitinfo2() +{ + struct exitinfo2 *ei = new exitinfo2; + + RA2_UsersPbBBS upb; + + user.toRa(ei->users_bbs,ei->usersxi_bbs,upb); + + memset(ei,0,sizeof(exitinfo2)); + + File f(form("%sEXITINFO.BBS",mypath)); + if(f.read(ei,sizeof(exitinfo2)) != sizeof(exitinfo2)) + { + delete ei; + return; + } + f.close(); + + num_yells = ei->PageTimes; + + unsigned oldlevel = user.level; + + user.fromRa(ei->users_bbs,ei->usersxi_bbs,upb); + + user.timeUsed -= time_adj; + + timer.changeleft(int(time_limit-timer.used()-user.timeUsed-time_removed)); + + net_entered = ei->NetMailEntered; + net_entered = ei->EchoMailEntered; + + if(user.level != oldlevel) adjust_limits(); + + delete ei; +} + +static void +read_exitinfo1() +{ + struct exitinfo1 *ei = new exitinfo1; + + memset(ei,0,sizeof(exitinfo1)); + + File f(form("%sEXITINFO.BBS",mypath)); + if(f.read(ei,sizeof(exitinfo1)) != sizeof(exitinfo1)) + { + delete ei; + return; + } + f.close(); + + num_yells = ei->PageTimes; + + unsigned oldlevel = user.level; + + user.level = ei->users_bbs.Security; + + net_entered = ei->NetMailEntered; + net_entered = ei->EchoMailEntered; + + if(user.level != oldlevel) adjust_limits(); + + delete ei; +} diff --git a/SHELL.OBJ b/SHELL.OBJ new file mode 100644 index 0000000..00a370a Binary files /dev/null and b/SHELL.OBJ differ diff --git a/SHOWANS.CPP b/SHOWANS.CPP new file mode 100644 index 0000000..a1755d2 --- /dev/null +++ b/SHOWANS.CPP @@ -0,0 +1,112 @@ +#include "proboard.hpp" + + + + +//--------------------- +// Show ANS or ASC file +//--------------------- + +void showansasc( char *data ) +{ + showansasc( data, NULL ); +} + + + +//-------------------------- +// Show ANS, ASC or RIP file +//-------------------------- + +char showansascrip( char *data ) +{ + if ( ! show_rip( data, FALSE ) ) + { + return showansasc( data, NULL ); + } + else + { + return 0; + } +} + + + +//---------------------------- +// View ANS file, with a pause +//---------------------------- + +void view_ans_wait( char *data ) +{ + showansasc( data, NULL ); + + + io << '\n' + << S_PRESS_ENTER_TO_CONTINUE; +} + + + +//-------------------------------------------------------- +// Show an AVT, ANS or ASC file with Avatar auto-detection +//-------------------------------------------------------- + +char showansasc( char *data, + char *hotkeys ) +{ + FileName f( cfg.txtpath, data ); + char k; + + + if ( avtplus ) + { + f.changeExt( "AVP" ); + + k = io.sendfile( f, hotkeys ); + + + if ( k != ANS_NOFILE ) + { + return k; + } + } + + + if ( avatar ) + { + f.changeExt( "AVT" ); + + k = io.sendfile( f, hotkeys ); + + + if ( k != ANS_NOFILE ) + { + return k; + } + } + + + if ( ansi_mode ) + { + f.changeExt( "ANS" ); + + k = io.sendfile( f, hotkeys ); + + + if ( k != ANS_NOFILE ) + { + return k; + } + } + + + io.color( COLOR_WHITE ); + + + f.changeExt( "ASC" ); + + k = io.sendfile( f, hotkeys ); + + return k; +} + diff --git a/SHOWANS.OBJ b/SHOWANS.OBJ new file mode 100644 index 0000000..885e791 Binary files /dev/null and b/SHOWANS.OBJ differ diff --git a/SHOWMSG.CPP b/SHOWMSG.CPP new file mode 100644 index 0000000..b57be9e --- /dev/null +++ b/SHOWMSG.CPP @@ -0,0 +1,330 @@ +#define Use_MsgBase + +#include +#include +#include "proboard.hpp" + +#define SEND_HEADER_LINE() \ + { \ + k = io.send(s,hotkeys); \ + switch(k) \ + { \ + case 0: break; \ + case 1: return 'S'; \ + default: return k; \ + } \ + if(/*!rip_mode &&*/ linecounter()) return 'S'; \ + s.clear(); \ + } + +static void +status_button( int num , char *text) +{ + rip_button(590 - num*40,11,620 - num*40,21,0,0,"",text,""); +} + +byte +Message::show() +{ +char *hotkeys="AN\r"; +String s; +char k; + +//if(rip_mode) io.show_remote = FALSE; + +s << '\r' << S_MSGHEADER_MESSAGENUM(form("%ld",msgNum()),msgArea->name) << " \7"; + +//s << form("\r\7Message #\6%-5ld\2 [%s] \7",msgNum(),msgArea->name); + +if(attr & MSGATTR_PRIVATE) s << S_MSGHEADER_PRIVATE << ' '; + +if(msgArea->msgKind == MSG_NET) + { + if(attr & MSGATTR_CRASH) s << S_MSGHEADER_CRASH << ' '; + if(attr & MSGATTR_KILL) s << S_MSGHEADER_KILL << ' '; + if(attr & MSGATTR_FILE) s << S_MSGHEADER_FILE << ' '; + if(attr & MSGATTR_SENT) s << S_MSGHEADER_SENT << ' '; + } + + +if(prev) s << form("\7[%ld <ÄÄ] ",msgArea->msgNum(prev)); +if(next) s << form("\7[ÄÄ> %ld] ",msgArea->msgNum(next)); + +s << '\n'; + +SEND_HEADER_LINE(); + +String org(from); +String rip_org(from); +String dest(to); +String rip_dest(to); + +org << "\7"; +dest << "\7"; + +if(msgArea->msgKind == MSG_NET) + { + int pt_from = pointNum(0); + int pt_to = pointNum(1); + + org << form(" (%d:%d/%d",origZone,origNet,origNode); + dest << form(" (%d:%d/%d",destZone,destNet,destNode); + + if(pt_from) org << form(".%d",pointNum(0)); + if(pt_to) dest << form(".%d",pointNum(1)); + + org << ')'; + dest << ')'; + + rip_org << form(" (%d:%d/%d",origZone,origNet,origNode); + rip_dest << form(" (%d:%d/%d",destZone,destNet,destNode); + + if(pt_from) rip_org << form(".%d",pointNum(0)); + if(pt_to) rip_dest << form(".%d",pointNum(1)); + + rip_org << ')'; + rip_dest << ')'; + } + + /* + if(rip_mode) + { + io.show_remote = TRUE; + + String rip_subj; + + for(int i=0; subj[i] ; i++) + { + if(strchr("\\|",subj[i])) rip_subj << '\\'; + + rip_subj << subj[i]; + } + + rip_send("\r!|Y00000100|1B0000020PI8030E080F080700080107000000\n"); + rip_send(form("!|1U2I0R9Q130000<>%s<>|1U2I159Q1H0000<>%s<>\n",(char *)rip_org,(char *)rip_dest)); + rip_send("!|1B0000020PI8030E080F080700000107000000\n"); + rip_send( form( "!|1UCS0RFA130000<>%d %s %04d<>|1UFK0RH8130000<>%02d:%02d<>\n", + postDate[ 0 ], + months_short[ postDate[ 1 ] ], + postDate[ 2 ] + 1900, // Y2K FIX! + postTime[ 0 ], + postTime[ 1 ] ) ); + + if(attr & MSGATTR_RECEIVED) + { + rip_send("!|1B0000020PI803000F0F0807000G0107000000\n"); + rip_send("!|1UA015CI1H0000<>Received<>\n"); + rip_send("!|1B0000020PI8030E080F080700000107000000\n"); + + if ( recvDate.ok() ) + rip_send( form( "!|1UCS15FA1H0000<>%d %s %04d<>|1UFK15H81H0000<>%02d:%02d<>\n", + recvDate[ 0 ], + months_short[ recvDate[ 1 ] ], + recvDate[ 2 ] + 1900, // Y2K FIX + recvTime[ 0 ], + recvTime[ 1 ], + recvTime[ 2 ] ) ); + } + + rip_send("!|1B0000020PI8030B080F080700080107000000\n"); + rip_send(form("!|1U2I1LH81X0000<>%s<>\n",(char *)rip_subj)); + + rip_send(form("!|1B0000020PHC020E080F080100000107000000|1U0K0B280N0000<>#%ld<>\n",msgNum())); + rip_send(form("!|1B0000020PHC020E080F080300000107000000|1U2I0B9Q0N0000<>%s<>\n",msgArea->name)); + + rip_send("!|1B0000020PVK020E080F080300000107000000|Y02000400\n"); + + int button_num = 0; + + if(attr & MSGATTR_PRIVATE) + status_button(button_num++,"PVT"); + + if(msgArea->msgKind == MSG_NET) + { + if(attr & MSGATTR_CRASH) status_button(button_num++,"CR"); + if(attr & MSGATTR_KILL) status_button(button_num++,"KILL"); + if(attr & MSGATTR_FILE) status_button(button_num++,"FILE"); + if(attr & MSGATTR_SENT) status_button(button_num++,"SNT"); + } + + if(prev || next) rip_send("!|1B0000020QOY020E000F080500000107000000\n"); + if(prev) rip_send("!|1UA00BB40N1O00<><<>-\n"); + if(next) rip_send("!|1UBE0BCI0N1Q00<>><>+\n"); + + rip_send("!|1B0000020QPE020F000F080300020E07000000|Y00000100\n"); + + rip_screenlines = 24; + + io.show_remote = FALSE; + } + */ + + + // Y2K FIXED! + + s << S_MSGHEADER_FROM( (char *) org, + form( "%2d %s %04d", + postDate[ 0 ], + months_short[ postDate[ 1 ] ], + postDate[ 2 ] + 1900 ), + + form( "%02d:%02d", + postTime[ 0 ], + postTime[ 1 ] ) + ) << '\n'; + + //s << form("\6From: \3%-47.47s \6Posted:\3 %2d %s %02d\5 %02d:%02d\n", + // (char *)org,postDate[0],months_short[postDate[1]],postDate[2],postTime[0],postTime[1]); + + SEND_HEADER_LINE(); + + s << S_MSGHEADER_TO((char *)dest) << ' '; + + //s << form("\6To : \3%-47.47s \6",(char *)dest); + + if(attr & MSGATTR_RECEIVED) + { + if(recvDate.ok()) + { + + // Y2K FIX! + + s << S_MSGHEADER_RECEIVED_ON( form( "%2d %s %04d", + recvDate[ 0 ], + months_short[ recvDate[ 1 ] ], + recvDate[ 2 ] + 1900 ), + + form( "%02d:%02d", + recvTime[ 0 ], + recvTime[ 1 ] ) ); + + //s << form("Received:\3 %2d %s %02d\5 %02d:%02d",recvDate[0],months_short[recvDate[1]],recvDate[2],recvTime[0],recvTime[1],recvTime[2]); + } + else + { + s << S_MSGHEADER_RECEIVED; + //s << "Received"; + } + } + + s << '\n'; + + SEND_HEADER_LINE(); + + if(attr & MSGATTR_FILE) s << S_MSGHEADER_FILEATTACHED(subj) << '\n'; + else s << S_MSGHEADER_SUBJECT(subj) << '\n'; + + SEND_HEADER_LINE(); + +s << "\n\7"; + +SEND_HEADER_LINE(); + +s = ""; + + io.show_remote = TRUE; + +io << "\7"; + +int inkludge=0; + +String wrap; + +int inquote=0; +int index=0; + +char line[100]; +memset(line,0,100); + +bool msgdone = FALSE; + +for(long txt_off = 0; !msgdone ;txt_off += 255) + { + char r[256]; + + int l = msgBase()->readMsgText(*this,r,txt_off,255); + + if(l < 255) msgdone = TRUE; + + for(int j=0;j') inquote=1; + if(inquote) + { + if(avatar) io << char(22) << char(1) << char(0xB); + else if(ansi_mode) io << ""; + } + if(strncmp(line,"SEEN-BY",7)) + { + io << line << '\n'; + if(linecounter()) return 'S'; + } + if(inquote) + { + if(avatar) io << char(22) << char(1) << char(0xF); + else if(ansi_mode) io << ""; + } + + memset(line,0,100); + index=0; + } + else + { + if(x>=' ' || x==0x1B) line[index++] = x; + } + + if(index>79) + { + wordwrap(line,wrap,79); + if(strncmp(line,"SEEN-BY",7)) + { + io << line << '\n'; + if(linecounter()) return 'S'; + } + memset(line,0,100); + strcpy(line,wrap); + index=strlen(line); + } + } + } + +if(index) + if(strncmp(line,"SEEN-BY",7)) + { + io << line << '\n'; + if(linecounter()) return 'S'; + } + +return 0; +} + diff --git a/SHOWMSG.OBJ b/SHOWMSG.OBJ new file mode 100644 index 0000000..af3a53f Binary files /dev/null and b/SHOWMSG.OBJ differ diff --git a/SOURCE.LOG b/SOURCE.LOG new file mode 100644 index 0000000..d4c82d4 --- /dev/null +++ b/SOURCE.LOG @@ -0,0 +1,346 @@ +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³05/03/90³20:45³ 36770 bytes source ³ 25734 bytes EXE ³ Source lines: 1677 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³08/03/90³23:41³ 36735 bytes source ³ 25750 bytes EXE ³ Source lines: 1679 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³09/03/90³23:27³ 36927 bytes source ³ 25774 bytes EXE ³ Source lines: 1702 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10/03/90³23:25³ 41537 bytes source ³ 28044 bytes EXE ³ Source lines: 1931 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11/03/90³21:00³ 46473 bytes source ³ 30176 bytes EXE ³ Source lines: 2141 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12/03/90³01:20³ 48070 bytes source ³ 30686 bytes EXE ³ Source lines: 2186 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³17/03/90³11:37³ 48070 bytes source ³ 30718 bytes EXE ³ Source lines: 2186 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³18/03/90³20:57³ 55727 bytes source ³ 30408 bytes EXE ³ Source lines: 2518 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³25/03/90³21:10³ 60523 bytes source ³ 32604 bytes EXE ³ Source lines: 2681 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³26/03/90³17:06³ 63063 bytes source ³ 33014 bytes EXE ³ Source lines: 2773 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³02/04/90³15:57³ 65471 bytes source ³ 33856 bytes EXE ³ Source lines: 2976 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³04/04/90³23:30³ 62164 bytes source ³ 34236 bytes EXE ³ Source lines: 2790 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³05/04/90³23:47³ 63055 bytes source ³ 36150 bytes EXE ³ Source lines: 2760 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³07/04/90³21:47³ 67127 bytes source ³ 36498 bytes EXE ³ Source lines: 2907 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³08/04/90³22:23³ 66885 bytes source ³ 36502 bytes EXE ³ Source lines: 2893 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³09/04/90³02:14³ 71415 bytes source ³ 41560 bytes EXE ³ Source lines: 3076 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10/04/90³21:29³ 76551 bytes source ³ 43654 bytes EXE ³ Source lines: 3218 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11/04/90³20:51³ 89072 bytes source ³ 45428 bytes EXE ³ Source lines: 4007 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12/04/90³14:42³ 96372 bytes source ³ 49378 bytes EXE ³ Source lines: 4342 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³13/04/90³19:01³ 99485 bytes source ³ 51362 bytes EXE ³ Source lines: 4475 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³14/04/90³02:23³ 101452 bytes source ³ 52332 bytes EXE ³ Source lines: 4562 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³15/04/90³23:10³ 106555 bytes source ³ 55478 bytes EXE ³ Source lines: 4785 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³16/04/90³20:03³ 112159 bytes source ³ 57654 bytes EXE ³ Source lines: 5030 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³17/04/90³18:27³ 114166 bytes source ³ 59260 bytes EXE ³ Source lines: 5111 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³18/04/90³19:54³ 120881 bytes source ³ 81360 bytes EXE ³ Source lines: 5313 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³19/04/90³16:16³ 125019 bytes source ³ 84110 bytes EXE ³ Source lines: 5481 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³20/04/90³14:40³ 129207 bytes source ³ 85740 bytes EXE ³ Source lines: 5655 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³22/04/90³20:12³ 135489 bytes source ³ 89930 bytes EXE ³ Source lines: 5912 ³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³23/04/90³01:17³ 138768 bytes source ³ 91754 bytes EXE ³ Source lines: 6092 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³26/04/90³21:43³ 139341 bytes source ³ 92106 bytes EXE ³ Source lines: 6120 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³27/04/90³23:42³ 140395 bytes source ³ 92218 bytes EXE ³ Source lines: 6151 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³01/05/90³01:25³ 141836 bytes source ³ 92858 bytes EXE ³ Source lines: 6223 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³03/05/90³14:57³ 142754 bytes source ³ 93050 bytes EXE ³ Source lines: 6212 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³05/05/90³13:23³ 146989 bytes source ³ 96082 bytes EXE ³ Source lines: 6381 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³06/05/90³20:27³ 149580 bytes source ³ 94234 bytes EXE ³ Source lines: 6480 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³07/05/90³19:16³ 150362 bytes source ³ 94958 bytes EXE ³ Source lines: 6513 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11/05/90³23:38³ 151929 bytes source ³ 96412 bytes EXE ³ Source lines: 6588 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12/05/90³23:33³ 155942 bytes source ³ 99110 bytes EXE ³ Source lines: 6742 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³14/05/90³16:17³ 156405 bytes source ³ 99472 bytes EXE ³ Source lines: 6750 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³16/05/90³21:30³ 157963 bytes source ³100902 bytes EXE ³ Source lines: 6785 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³17/05/90³13:59³ 157876 bytes source ³100622 bytes EXE ³ Source lines: 6787 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³18/05/90³22:24³ 161715 bytes source ³102256 bytes EXE ³ Source lines: 6917 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³28/05/90³14:52³ 162433 bytes source ³102786 bytes EXE ³ Source lines: 6955 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³30/05/90³13:49³ 166643 bytes source ³105242 bytes EXE ³ Source lines: 7228 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³31/05/90³20:01³ 169349 bytes source ³106998 bytes EXE ³ Source lines: 7372 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³02/06/90³22:14³ 171618 bytes source ³108316 bytes EXE ³ Source lines: 7436 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³03/06/90³17:27³ 173361 bytes source ³109176 bytes EXE ³ Source lines: 7519 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³04/06/90³14:28³ 174287 bytes source ³109592 bytes EXE ³ Source lines: 7559 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³05/06/90³22:42³ 175566 bytes source ³110626 bytes EXE ³ Source lines: 7629 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³07/06/90³19:54³ 185284 bytes source ³112358 bytes EXE ³ Source lines: 7987 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³08/06/90³00:40³ 186085 bytes source ³112910 bytes EXE ³ Source lines: 8017 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³09/06/90³00:47³ 187879 bytes source ³112560 bytes EXE ³ Source lines: 8156 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³09/06/90³14:56³ 187915 bytes source ³112594 bytes EXE ³ Source lines: 8157 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10/06/90³18:42³ 188106 bytes source ³112662 bytes EXE ³ Source lines: 8167 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11/06/90³23:14³ 188104 bytes source ³112676 bytes EXE ³ Source lines: 8168 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³16/06/90³19:46³ 187339 bytes source ³112290 bytes EXE ³ Source lines: 8118 ³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³22/07/90³21:03³ 187701 bytes source ³112422 bytes EXE ³ Source lines: 8145 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³23/07/90³23:24³ 189796 bytes source ³114036 bytes EXE ³ Source lines: 8262 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³07/08/90³18:40³ 196562 bytes source ³116768 bytes EXE ³ Source lines: 8540 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³08/08/90³22:11³ 201626 bytes source ³120090 bytes EXE ³ Source lines: 8820 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³09/08/90³21:17³ 204817 bytes source ³121826 bytes EXE ³ Source lines: 8938 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10/08/90³20:58³ 206197 bytes source ³122206 bytes EXE ³ Source lines: 9012 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12/08/90³19:40³ 201932 bytes source ³122342 bytes EXE ³ Source lines: 8788 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³13/08/90³22:58³ 203266 bytes source ³123278 bytes EXE ³ Source lines: 8836 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³15/08/90³23:30³ 203539 bytes source ³123236 bytes EXE ³ Source lines: 8861 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³16/08/90³20:04³ 204680 bytes source ³123960 bytes EXE ³ Source lines: 8932 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³18/08/90³15:02³ 204768 bytes source ³123976 bytes EXE ³ Source lines: 8936 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³19/08/90³14:25³ 204850 bytes source ³123842 bytes EXE ³ Source lines: 8936 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³29/08/90³15:33³ 205066 bytes source ³123944 bytes EXE ³ Source lines: 8951 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³02/09/90³19:44³ 205783 bytes source ³124448 bytes EXE ³ Source lines: 8979 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³04/09/90³21:24³ 205792 bytes source ³124464 bytes EXE ³ Source lines: 8979 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³07/09/90³23:28³ 205932 bytes source ³124670 bytes EXE ³ Source lines: 8996 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³08/09/90³23:19³ 206402 bytes source ³124996 bytes EXE ³ Source lines: 9007 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10/09/90³17:20³ 207050 bytes source ³125508 bytes EXE ³ Source lines: 9032 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11/09/90³19:25³ 207453 bytes source ³125764 bytes EXE ³ Source lines: 9074 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³13/09/90³16:01³ 208903 bytes source ³126784 bytes EXE ³ Source lines: 9151 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³14/09/90³20:27³ 209761 bytes source ³127846 bytes EXE ³ Source lines: 9186 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³15/09/90³16:56³ 210833 bytes source ³128062 bytes EXE ³ Source lines: 9227 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³17/09/90³11:54³ 210386 bytes source ³128150 bytes EXE ³ Source lines: 9210 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³17/09/90³18:51³ 211058 bytes source ³128692 bytes EXE ³ Source lines: 9225 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³24/09/90³19:18³ 211498 bytes source ³128666 bytes EXE ³ Source lines: 9258 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³16/10/90³23:52³ 210740 bytes source ³128624 bytes EXE ³ Source lines: 9213 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³22/10/90³22:22³ 212579 bytes source ³129598 bytes EXE ³ Source lines: 9286 ³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³23/10/90³20:29³ 225324 bytes source ³137818 bytes EXE ³ Source lines: 10027³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³24/10/90³19:25³ 225459 bytes source ³138062 bytes EXE ³ Source lines: 10040³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³29/10/90³00:28³ 230999 bytes source ³138558 bytes EXE ³ Source lines: 10285³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³30/10/90³01:26³ 229585 bytes source ³138518 bytes EXE ³ Source lines: 10197³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³08/11/90³06:27³ 230969 bytes source ³138698 bytes EXE ³ Source lines: 10257³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10/11/90³13:17³ 231615 bytes source ³138958 bytes EXE ³ Source lines: 10283³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12/11/90³18:56³ 231284 bytes source ³137798 bytes EXE ³ Source lines: 10275³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³13/11/90³22:27³ 232019 bytes source ³139178 bytes EXE ³ Source lines: 10364³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³14/11/90³21:45³ 239955 bytes source ³143092 bytes EXE ³ Source lines: 10631³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³15/11/90³08:12³ 243998 bytes source ³145676 bytes EXE ³ Source lines: 10851³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³21/11/90³00:43³ 245234 bytes source ³146770 bytes EXE ³ Source lines: 10914³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³22/11/90³18:53³ 248490 bytes source ³149298 bytes EXE ³ Source lines: 11044³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³25/11/90³14:45³ 247996 bytes source ³146858 bytes EXE ³ Source lines: 11012³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³29/11/90³04:01³ 269529 bytes source ³153546 bytes EXE ³ Source lines: 11904³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³30/11/90³07:04³ 275300 bytes source ³157484 bytes EXE ³ Source lines: 12421³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³04/12/90³18:02³ 281900 bytes source ³160768 bytes EXE ³ Source lines: 12568³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³05/12/90³19:23³ 282778 bytes source ³162626 bytes EXE ³ Source lines: 12616³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³06/12/90³19:30³ 287303 bytes source ³165294 bytes EXE ³ Source lines: 12807³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11/12/90³19:27³ 289721 bytes source ³165468 bytes EXE ³ Source lines: 12970³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³21/04/91³18:11³ 410902 bytes source ³171426 bytes EXE ³ Source lines: 17010³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³28/04/91³22:20³ 412192 bytes source ³167964 bytes EXE ³ Source lines: 17000³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³09/05/91³21:21³ 425503 bytes source ³173174 bytes EXE ³ Source lines: 17428³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³26/05/91³22:03³ 444328 bytes source ³185196 bytes EXE ³ Source lines: 18488³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³23/08/91³16:17³ 446754 bytes source ³182710 bytes EXE ³ Source lines: 18574³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³29/08/91³01:52³ 448903 bytes source ³183324 bytes EXE ³ Source lines: 18656³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³30/08/91³18:11³ 449869 bytes source ³183292 bytes EXE ³ Source lines: 18686³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³30/08/91³23:15³ 452583 bytes source ³183694 bytes EXE ³ Source lines: 18830³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³31/08/91³00:25³ 453005 bytes source ³183742 bytes EXE ³ Source lines: 18850³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³01/09/91³00:31³ 464333 bytes source ³185992 bytes EXE ³ Source lines: 19187³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³02/09/91³22:07³ 468795 bytes source ³185154 bytes EXE ³ Source lines: 19413³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³06/09/91³07:08³ 471177 bytes source ³185414 bytes EXE ³ Source lines: 19476³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³07/09/91³21:30³ 471290 bytes source ³185430 bytes EXE ³ Source lines: 19479³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-09-91³18:29³ 474411 bytes source ³185884 bytes EXE ³ Source lines: 19597³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-10-91³ 0:44³ 474929 bytes source ³186110 bytes EXE ³ Source lines: 19620³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ + +From here on, only ProBoard.EXE is measured. + +ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +³ 9-10-91³19:35³ 306149 bytes source ³188862 bytes EXE ³ Source lines: 13280³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-11-91³ 1:39³ 307153 bytes source ³189158 bytes EXE ³ Source lines: 13331³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-12-91³22:54³ 310199 bytes source ³191426 bytes EXE ³ Source lines: 13489³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-14-91³21:46³ 315082 bytes source ³194260 bytes EXE ³ Source lines: 13659³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-15-91³22:45³ 315628 bytes source ³194674 bytes EXE ³ Source lines: 13684³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-16-91³22:12³ 315117 bytes source ³194708 bytes EXE ³ Source lines: 13647³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-17-91³20:57³ 318539 bytes source ³197202 bytes EXE ³ Source lines: 13709³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-18-91³01:34³ 322574 bytes source ³198424 bytes EXE ³ Source lines: 13840³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-18-91³02:19³ 323196 bytes source ³198424 bytes EXE ³ Source lines: 13871³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-18-91³16:56³ 325905 bytes source ³199860 bytes EXE ³ Source lines: 13971³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-18-91³18:12³ 325962 bytes source ³199844 bytes EXE ³ Source lines: 13977³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-19-91³21:06³ 328687 bytes source ³201036 bytes EXE ³ Source lines: 14080³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-20-91³16:02³ 332976 bytes source ³202908 bytes EXE ³ Source lines: 14281³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-20-91³21:36³ 332870 bytes source ³202666 bytes EXE ³ Source lines: 14279³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-21-91³00:49³ 333035 bytes source ³202782 bytes EXE ³ Source lines: 14286³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-21-91³19:30³ 333483 bytes source ³203080 bytes EXE ³ Source lines: 14306³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-21-91³20:40³ 334029 bytes source ³203340 bytes EXE ³ Source lines: 14335³ v1.15 +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-22-91³18:32³ 334546 bytes source ³203600 bytes EXE ³ Source lines: 14367³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-24-91³ 4:13³ 334643 bytes source ³203754 bytes EXE ³ Source lines: 14373³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-25-91³17:56³ 334831 bytes source ³203882 bytes EXE ³ Source lines: 14381³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-29-91³22:31³ 335997 bytes source ³205906 bytes EXE ³ Source lines: 14435³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-30-91³15:32³ 336191 bytes source ³206062 bytes EXE ³ Source lines: 14446³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-30-91³15:34³ 336253 bytes source ³206038 bytes EXE ³ Source lines: 14446³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-30-91³22:41³ 338767 bytes source ³207150 bytes EXE ³ Source lines: 14521³ v1.16 +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-03-91³17:16³ 340054 bytes source ³207702 bytes EXE ³ Source lines: 14557³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-05-91³17:57³ 343429 bytes source ³209622 bytes EXE ³ Source lines: 14713³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-06-91³ 3:38³ 349672 bytes source ³214610 bytes EXE ³ Source lines: 14980³ v1.17à +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-06-91³21:29³ 351237 bytes source ³214770 bytes EXE ³ Source lines: 15069³ v1.17à Mk.II +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-07-91³23:44³ 351963 bytes source ³215276 bytes EXE ³ Source lines: 15101³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-07-91³23:59³ 352366 bytes source ³214732 bytes EXE ³ Source lines: 15106³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-08-91³16:51³ 354053 bytes source ³215520 bytes EXE ³ Source lines: 15152³ v1.17á +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-09-91³19:08³ 356744 bytes source ³216404 bytes EXE ³ Source lines: 15227³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-09-91³22:47³ 357033 bytes source ³216558 bytes EXE ³ Source lines: 15244³ v1.17ã +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-10-91³23:05³ 357465 bytes source ³218004 bytes EXE ³ Source lines: 15271³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-11-91³ 3:17³ 357462 bytes source ³217972 bytes EXE ³ Source lines: 15271³ v1.17 +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-21-91³15:30³ 359126 bytes source ³218450 bytes EXE ³ Source lines: 15348³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³10-30-91³16:44³ 361779 bytes source ³217274 bytes EXE ³ Source lines: 15464³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11-10-91³23:10³ 367644 bytes source ³218150 bytes EXE ³ Source lines: 15725³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11-19-91³16:40³ 439127 bytes source ³230798 bytes EXE ³ Source lines: 18973³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11-20-91³17:21³ 445005 bytes source ³234468 bytes EXE ³ Source lines: 19197³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11-22-91³ 0:18³ 447769 bytes source ³235782 bytes EXE ³ Source lines: 19307³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³11-22-91³15:19³ 449429 bytes source ³237810 bytes EXE ³ Source lines: 19381³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12-12-91³13:59³ 394520 bytes source ³248726 bytes EXE ³ Source lines: 16749³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12-12-91³19:11³ 394253 bytes source ³248110 bytes EXE ³ Source lines: 16733³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³12-13-91³ 3:20³ 395602 bytes source ³246974 bytes EXE ³ Source lines: 16787³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³01-31-92³18:10³ 401789 bytes source ³281680 bytes EXE ³ Source lines: 17087³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³03-16-92³21:28³ 403327 bytes source ³284774 bytes EXE ³ Source lines: 17174³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³03-25-92³ 0:01³ 403337 bytes source ³284948 bytes EXE ³ Source lines: 17176³ v1.21 +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 4-25-92³ 1:54³ 417916 bytes source ³304626 bytes EXE ³ Source lines: 17916³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 5-08-92³21:08³ 433921 bytes source ³313262 bytes EXE ³ Source lines: 18608³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 8-31-92³18:34³ 439527 bytes source ³319824 bytes EXE ³ Source lines: 18922³ +ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ +³ 9-05-94³18:34³ 617707 bytes source ³434720 bytes EXE ³ Source lines: 25866³ +ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ diff --git a/SOURCE.RPT b/SOURCE.RPT new file mode 100644 index 0000000..595a5be --- /dev/null +++ b/SOURCE.RPT @@ -0,0 +1,130 @@ +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 09-06-94 , 04:26:43 + +PROBOARD.EXE... 25866 ( 603k) +PROCFG.EXE..... 9246 ( 275k) +PBUTIL.EXE..... 3681 ( 83k) +PBLIB.LIB...... 2816 ( 107k) +CONVERT.EXE.... 4227 ( 112k) +TSLIB.LIB...... 4882 ( 85k) +TSWIN.LIB...... 4510 ( 99k) + +TOTAL LINES..... 55228 +TOTAL SIZE...... 1367 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 09-15-94 , 01:06:26 + +PROBOARD.EXE... 25858 ( 602k) +PROCFG.EXE..... 9247 ( 275k) +PBUTIL.EXE..... 3681 ( 83k) +PBLIB.LIB...... 2816 ( 107k) +CONVERT.EXE.... 4227 ( 112k) +TSLIB.LIB...... 4882 ( 85k) +TSWIN.LIB...... 4523 ( 99k) + +TOTAL LINES..... 55234 +TOTAL SIZE...... 1367 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 03-21-95 , 11:39:45 + +PROBOARD.EXE... 25986 ( 606k) +PROCFG.EXE..... 9368 ( 278k) +PBUTIL.EXE..... 3702 ( 82k) +PBLIB.LIB...... 2872 ( 109k) +CONVERT.EXE.... 4309 ( 115k) +TSLIB.LIB...... 4897 ( 86k) +TSWIN.LIB...... 4536 ( 99k) + +TOTAL LINES..... 55670 +TOTAL SIZE...... 1378 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 03-28-95 , 15:11:50 + +PROBOARD.EXE... 26233 ( 612k) +PROCFG.EXE..... 9363 ( 277k) +PBUTIL.EXE..... 3890 ( 87k) +PBLIB.LIB...... 2921 ( 110k) +CONVERT.EXE.... 4378 ( 116k) +TSLIB.LIB...... 5229 ( 91k) +TSWIN.LIB...... 4536 ( 99k) + +TOTAL LINES..... 56550 +TOTAL SIZE...... 1395 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 05-24-95 , 15:12:39 + +PROBOARD.EXE... 26530 ( 620k) +PROCFG.EXE..... 9365 ( 277k) +PBUTIL.EXE..... 3902 ( 87k) +PBLIB.LIB...... 2965 ( 113k) +CONVERT.EXE.... 4378 ( 116k) +TSLIB.LIB...... 5229 ( 91k) +TSWIN.LIB...... 4668 ( 102k) + +TOTAL LINES..... 57037 +TOTAL SIZE...... 1410 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 06-09-95 , 16:15:19 + +PROBOARD.EXE... 26579 ( 621k) +PROCFG.EXE..... 9368 ( 277k) +PBUTIL.EXE..... 3902 ( 87k) +PBLIB.LIB...... 2965 ( 113k) +CONVERT.EXE.... 4378 ( 116k) +TSLIB.LIB...... 5229 ( 91k) +TSWIN.LIB...... 4674 ( 102k) + +TOTAL LINES..... 57095 +TOTAL SIZE...... 1412 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 06-26-95 , 16:54:04 + +PROBOARD.EXE... 26602 ( 622k) +PROCFG.EXE..... 9380 ( 279k) +PBUTIL.EXE..... 3902 ( 87k) +PBLIB.LIB...... 2982 ( 114k) +CONVERT.EXE.... 4361 ( 115k) +TSLIB.LIB...... 5248 ( 91k) +TSWIN.LIB...... 4948 ( 107k) + +TOTAL LINES..... 57423 +TOTAL SIZE...... 1418 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 06-26-95 , 19:55:15 + +PROBOARD.EXE... 26719 ( 625k) +PROCFG.EXE..... 9380 ( 279k) +PBUTIL.EXE..... 3904 ( 87k) +PBLIB.LIB...... 2982 ( 114k) +CONVERT.EXE.... 4361 ( 115k) +TSLIB.LIB...... 5248 ( 91k) +TSWIN.LIB...... 4948 ( 107k) + +TOTAL LINES..... 57542 +TOTAL SIZE...... 1421 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 10-01-95 , 12:21:37 + +PROBOARD.EXE... 26689 ( 624k) +PROCFG.EXE..... 9398 ( 280k) +PBUTIL.EXE..... 3922 ( 88k) +PBLIB.LIB...... 2998 ( 115k) +CONVERT.EXE.... 4480 ( 117k) +TSLIB.LIB...... 5319 ( 93k) +TSWIN.LIB...... 4981 ( 107k) + +TOTAL LINES..... 57787 +TOTAL SIZE...... 1427 Kb +---------------------------------------------------------------- +SOURCE FILE SIZE REPORT FOR 10-05-95 , 16:19:31 + +PROBOARD.EXE... 26774 ( 626k) +PROCFG.EXE..... 9567 ( 284k) +PBUTIL.EXE..... 3922 ( 88k) +PBLIB.LIB...... 3000 ( 115k) +CONVERT.EXE.... 4480 ( 117k) +TSLIB.LIB...... 5319 ( 93k) +TSWIN.LIB...... 5188 ( 110k) + +TOTAL LINES..... 58250 +TOTAL SIZE...... 1436 Kb diff --git a/SQUISH.CPP b/SQUISH.CPP new file mode 100644 index 0000000..182879f --- /dev/null +++ b/SQUISH.CPP @@ -0,0 +1,802 @@ +#define Use_MsgBase + +#include +#include +#include +#include + +extern "C" { +#include +} + +#include "proboard.hpp" + +/* +#include "cache.hpp" + +const byte cachemode_lowmsg = 0; +const byte cachemode_highmsg = 1; +const byte cachemode_nummsgs = 2; +const byte cachemode_lastread = 3; + + +struct CacheIndexKey + { + int area; + byte mode; + + CacheIndexKey(int a,byte m) { area = a ; mode = m; } + + int operator==(const CacheIndexKey& k) { return !memcmp(&k,this,sizeof(k)); } + }; + + +static ObjectCache squishCache(300); +*/ + +static void _near +xmsg2message(XMSG *xmsg,Message *msg) +{ + strcpy(msg->from , xmsg->from); + strcpy(msg->to , xmsg->to); + strcpy(msg->subj , xmsg->subj); + + msg->origZone = xmsg->orig.zone; + msg->origNet = xmsg->orig.net; + msg->origNode = xmsg->orig.node; + msg->origPoint = xmsg->orig.point; + msg->destZone = xmsg->dest.zone; + msg->destNet = xmsg->dest.net; + msg->destNode = xmsg->dest.node; + msg->destPoint = xmsg->dest.point; + + msg->postDate[0] = xmsg->date_written.date.da; + msg->postDate[1] = xmsg->date_written.date.mo; + msg->postDate[2] = xmsg->date_written.date.yr+80; + msg->postTime[0] = xmsg->date_written.time.hh; + msg->postTime[1] = xmsg->date_written.time.mm; + msg->postTime[2] = xmsg->date_written.time.ss; + msg->recvDate[0] = xmsg->date_arrived.date.da; + msg->recvDate[1] = xmsg->date_arrived.date.mo; + msg->recvDate[2] = xmsg->date_arrived.date.yr+80; + msg->recvTime[0] = xmsg->date_arrived.time.hh; + msg->recvTime[1] = xmsg->date_arrived.time.mm; + msg->recvTime[2] = xmsg->date_arrived.time.ss; + + msg->attr = 0; + + if(xmsg->attr & MSGLOCAL) + { + msg->attr |= MSGATTR_LOCAL; + + if(xmsg->attr & MSGSCANNED) + msg->attr |= MSGATTR_SENT; + } + + if(xmsg->attr & MSGPRIVATE) msg->attr |= MSGATTR_PRIVATE; + if(xmsg->attr & MSGREAD ) msg->attr |= MSGATTR_RECEIVED; + if(xmsg->attr & MSGCRASH ) msg->attr |= MSGATTR_CRASH; + if(xmsg->attr & MSGFILE ) msg->attr |= MSGATTR_FILE; + if(xmsg->attr & MSGKILL ) msg->attr |= MSGATTR_KILL; + if(xmsg->attr & MSGSENT ) msg->attr |= MSGATTR_SENT; + if(xmsg->attr & MSGORPHAN ) msg->attr |= MSGATTR_ORPHAN; + if(xmsg->attr & MSGFRQ ) msg->attr |= MSGATTR_FILEREQ; + if(xmsg->attr & MSGRRQ ) msg->attr |= MSGATTR_RECEIPTREQ; + if(xmsg->attr & MSGHOLD ) msg->attr |= MSGATTR_HOLD; + + if(msg->msgArea->msgKind == MSG_ECHO) msg->attr |= MSGATTR_ECHOMAIL; + if(msg->msgArea->msgKind == MSG_PVTECHO) msg->attr |= MSGATTR_ECHOMAIL; + if(msg->msgArea->msgKind == MSG_NET) msg->attr |= MSGATTR_NETMAIL; +} + +static void _near +message2xmsg(XMSG *xmsg,Message *msg) +{ + strcpy(xmsg->from , msg->from); + strcpy(xmsg->to , msg->to); + strcpy(xmsg->subj , msg->subj); + + xmsg->orig.zone = msg->origZone; + xmsg->orig.net = msg->origNet; + xmsg->orig.node = msg->origNode; + xmsg->orig.point = msg->origPoint; + + xmsg->dest.zone = msg->destZone; + xmsg->dest.net = msg->destNet; + xmsg->dest.node = msg->destNode; + xmsg->dest.point = msg->destPoint; + + xmsg->date_written.date.da = msg->postDate[0]; + xmsg->date_written.date.mo = msg->postDate[1]; + xmsg->date_written.date.yr = msg->postDate[2]-80; + xmsg->date_written.time.hh = msg->postTime[0]; + xmsg->date_written.time.mm = msg->postTime[1]; + xmsg->date_written.time.ss = msg->postTime[2]; + xmsg->date_arrived.date.da = msg->recvDate[0]; + xmsg->date_arrived.date.mo = msg->recvDate[1]; + xmsg->date_arrived.date.yr = msg->recvDate[2]-80; + xmsg->date_arrived.time.hh = msg->recvTime[0]; + xmsg->date_arrived.time.mm = msg->recvTime[1]; + xmsg->date_arrived.time.ss = msg->recvTime[2]; + + xmsg->attr &= ~dword( MSGPRIVATE | MSGREAD | MSGLOCAL + | MSGSCANNED | MSGSENT | MSGCRASH + | MSGFILE | MSGKILL | MSGSENT + | MSGORPHAN | MSGFRQ | MSGRRQ + | MSGHOLD + ); + + if(msg->attr & MSGATTR_LOCAL) + { + xmsg->attr |= MSGLOCAL; + + if( ((msg->attr & MSGATTR_ECHOMAIL) || (msg->attr & MSGATTR_NETMAIL)) + && (msg->attr & MSGATTR_SENT)) + { + xmsg->attr |= MSGSCANNED | MSGSENT; + } + } + + if(msg->attr & MSGATTR_PRIVATE) xmsg->attr |= MSGPRIVATE ; + if(msg->attr & MSGATTR_RECEIVED) xmsg->attr |= MSGREAD ; + if(msg->attr & MSGATTR_CRASH) xmsg->attr |= MSGCRASH ; + if(msg->attr & MSGATTR_FILE) xmsg->attr |= MSGFILE ; + if(msg->attr & MSGATTR_KILL) xmsg->attr |= MSGKILL ; + if(msg->attr & MSGATTR_SENT) xmsg->attr |= MSGSENT ; + if(msg->attr & MSGATTR_ORPHAN) xmsg->attr |= MSGORPHAN ; + if(msg->attr & MSGATTR_FILEREQ) xmsg->attr |= MSGFRQ ; + if(msg->attr & MSGATTR_RECEIPTREQ) xmsg->attr |= MSGRRQ ; + if(msg->attr & MSGATTR_HOLD) xmsg->attr |= MSGHOLD ; +} + +struct __sqidx +{ + dword ofs; + UMSGID umsgid; + dword hash; +}; + + +bool +SquishMsgBase::open() +{ + _minf mi = { 0x200 , 0 }; + + aka a; + + if(a.read(0) >= 0) mi.def_zone = a.zone; + + if(MsgOpenApi(&mi) < 0) + { + fatalerror("Unable to initialize Squish API"); + } + + lastarea = NULL; + lastareanum = -1; + + //squishCache.purge(); + + return TRUE; +} + +void +SquishMsgBase::close() +{ + if(lastarea != NULL) + { + MsgCloseArea(lastarea); + lastarea = NULL; + lastareanum = -1; + } + + MsgCloseApi(); + + //squishCache.purge(); +} + +MSG * +SquishMsgBase::readArea(MsgArea& ma) +{ + if(ma.areaNum != lastareanum || lastarea == NULL) + { + if(lastarea != NULL) MsgCloseArea(lastarea); + + lastarea = MsgOpenArea(ma.path,MSGAREA_CRIFNEC,(ma.msgBaseType == MSGBASE_SQUISH) ? + MSGTYPE_SQUISH : + MSGTYPE_SDM); + + if(lastarea == NULL) return NULL; + + + if(ma.msgBaseType == MSGBASE_SQUISH) + { + SquishSetMaxMsg(lastarea, ma.maxMsgs, 0, ma.msgKillDays); + } + + lastareanum = ma.areaNum; + } + + return lastarea; +} + +long +SquishMsgBase::readMsg(Message &msg,long id) +{ + int areanum = msg.areaNum(); + MSG *sqarea = readArea(*msg.msgArea); + + if(sqarea == NULL) return -1; + + MSGH *mh; + XMSG xmsg; + + if(msg.msgArea->msgBaseType == MSGBASE_SDM) + { + bool found = FALSE; + + if(id > 0) + { + for(; id <= MsgGetHighMsg(sqarea) ; id++) + { + if((mh = MsgOpenMsg(sqarea , MOPEN_READ , id)) != NULL) + { + found = TRUE; + + break; + } + } + + if(!found) return -1; + } + else + { + for( id = -id ; id >= 1 ; id--) + { + if((mh = MsgOpenMsg(sqarea , MOPEN_READ , id)) != NULL) + { + found = TRUE; + + break; + } + } + + if(!found) return -1; + } + + } + else + { + long msgnum; + + if(id < 0) msgnum = MsgUidToMsgn(sqarea,-id,UID_PREV); + else msgnum = MsgUidToMsgn(sqarea, id,UID_NEXT); + + if((mh = MsgOpenMsg(sqarea , MOPEN_READ , msgnum)) == NULL) return -1; + + id = msgnum; + } + + id = labs(id); + + MsgReadMsg(mh,&xmsg,0,0,0,0,0); + + MsgCloseMsg(mh); + + msg.clear(); + + xmsg2message(&xmsg,&msg); + + msg.prev = xmsg.replyto; + msg.next = xmsg.replies[0]; + + msg.id = MsgMsgnToUid(sqarea,id); + msg.num = id; + + msg.setArea(areanum); + + return msg.id; +} + +long +SquishMsgBase::lowMsg(MsgArea &ma) +{ + long x; + //CacheIndexKey idx(ma.areaNum,cachemode_lowmsg); + + //if(squishCache.find(x,idx)) return x; + + MSG *sqarea = readArea(ma); + + if(sqarea == NULL) return -1; + + x = MsgMsgnToUid(sqarea,1); + + //squishCache.add(x,idx); + + return x; +} + +long +SquishMsgBase::numMsgs(MsgArea &ma) +{ + long x; + //CacheIndexKey idx(ma.areaNum,cachemode_nummsgs); + + //if(squishCache.find(x,idx)) return x; + + MSG *sqarea = readArea(ma); + + if(sqarea == NULL) return -1; + + x = MsgGetNumMsg(sqarea); + + //squishCache.add(x,idx); + + return x; +} + +long +SquishMsgBase::highMsg(MsgArea &ma) +{ + MSG *sqarea = readArea(ma); + + if(sqarea == NULL) return -1; + + return MsgMsgnToUid(sqarea,MsgGetHighMsg(sqarea)); +} + + +word +SquishMsgBase::readMsgText(Message& msg,char *ptr,long offset,word size) +{ + MSGH *mh; + MSG *sqarea; + + if((sqarea = readArea(*msg.msgArea)) == NULL) return 0; + + msg.num = MsgUidToMsgn(sqarea,msg.id,UID_EXACT); + + if(msg.num < 1) return 0; + + if((mh = MsgOpenMsg(sqarea , MOPEN_READ , msg.num)) == NULL) return 0; + + if(msg.msgArea->msgBaseType == MSGBASE_SDM) + MsgReadMsg(mh,NULL,0,0,0,0,0); // Workaround for a bug in Squish API + + int l = (int) MsgReadMsg(mh,NULL,offset,size,ptr,0,0); + + MsgCloseMsg(mh); + + if(l < 0) l = 0; + + return l; +} + + +long +SquishMsgBase::appendMsg(Message& msg) +{ + MSG *sqarea; + MSGH *mh; + XMSG xmsg; + File f; + String control_text; + String text; + String kludge_text; + + if((sqarea = readArea(*msg.msgArea)) == NULL) return -1; + + if( !f.open("MSGTMP",fmode_read,512) ) + { + return -1; + } + + long bytecount = 0; + + for(bool inkludge = FALSE;;) + { + int c = f.readByte(); + + if(c < 0) break; + + switch( byte(c) ) + { + case '\n' : + case '' : continue; + case 1 : inkludge = TRUE; + kludge_text = ""; + break; + case '\r' : if(inkludge) + { + inkludge = FALSE; + bytecount--; + control_text << char(1) << kludge_text; + if(!strncmp(kludge_text,"FMPT",4)) msg.origPoint = atoi(&kludge_text[5]); + if(!strncmp(kludge_text,"TOPT",4)) msg.destPoint = atoi(&kludge_text[5]); + } + else + { + text << char(c); + } + break; + default : if(inkludge) + { + kludge_text << char(c); + } + else + { + text << char(c); + } + break; + } + + if(!inkludge) bytecount++; + } + + f.close(); + + if(!bytecount) return -1; + + control_text << "\x01PID: " PID_STRING_SQUISH; + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + control_text << (registered ? 'r':'u'); + + if((mh = MsgOpenMsg(sqarea , MOPEN_CREATE , 0)) == NULL) return -1; + + CLEAR_OBJECT(xmsg); + + message2xmsg(&xmsg,&msg); + + MsgWriteMsg(mh,0,&xmsg,(char *)text,text.len()+1,bytecount,control_text.len() + 1,(char *)control_text); + + msg.num = mh->sq->high_msg; + + MsgCloseMsg(mh); + + msg.id = MsgMsgnToUid(sqarea,msg.num); + + //squishCache.purge(); + + return msg.id; +} + +bool +SquishMsgBase::updateMsg(Message& msg) +{ + MSG *sqarea = readArea(*msg.msgArea); + + if(sqarea == NULL) return FALSE; + + msg.num = MsgUidToMsgn(sqarea,msg.id,UID_EXACT); + + if(msg.num < 1) return FALSE; + + MSGH *mh; + XMSG xmsg; + + if((mh = MsgOpenMsg(sqarea , MOPEN_RW , msg.num)) == NULL) return -1; + + MsgReadMsg(mh,&xmsg,0,0,0,0,0); + + message2xmsg(&xmsg,&msg); + + xmsg.replyto = msg.prev; + xmsg.replies[0] = msg.next; + + for(int i=1; i < MAX_REPLY; i++) xmsg.replies[i] = 0; + + MsgWriteMsg(mh,0,&xmsg,0,0,0,0,0); + + MsgCloseMsg(mh); + + //squishCache.purge(); + + if(msg.msgArea->msgBaseType != MSGBASE_SQUISH) return TRUE; + + File f; + + if(!f.open(FileName(msg.msgArea->path,".SQI"),fmode_rw,1024)) return FALSE; + + for(;;) + { + struct __sqidx sidx; + + if(f.read(&sidx,sizeof(sidx)) != sizeof(sidx)) break; + + if(sidx.umsgid == msg.id) + { + if(msg.attr & MSGATTR_RECEIVED) sidx.hash |= 0x80000000L; + else sidx.hash &= 0x7FFFFFFFL; + + f.seek(f.pos() - sizeof(sidx)); + f.flush(); + f.write(&sidx,sizeof(sidx)); + + break; + } + } + + return TRUE; +} + +long +SquishMsgBase::msgNum(MsgArea& ma,long id) +{ + MSG *sqarea = readArea(ma); + + return MsgUidToMsgn(sqarea,id,UID_EXACT); +} + +long +SquishMsgBase::msgId(MsgArea& ma,long num) +{ + MSG *sqarea = readArea(ma); + + return MsgMsgnToUid(sqarea,num); +} + + +bool +SquishMsgBase::deleteMsg(Message &msg) +{ + MSG *sqarea = readArea(*msg.msgArea); + + if(sqarea == NULL) return FALSE; + + long num = MsgUidToMsgn(sqarea,msg.id,UID_EXACT); + + msg.num = 0; + + //squishCache.purge(); + + return (MsgKillMsg(sqarea,num) ? FALSE:TRUE); +} + +static void +showbusy() +{ + static int x = 0; + + char *ss[] = { + "|", + "/", + "-", + "\\", + NULL + }; + + /* + char *ss1[] = { + "*....", + "**...", + "***..", + ".***.", + "..***", + "...**", + "....*", + "...**", + "..***", + ".***.", + "***..", + "**...", + NULL + }; + */ + + //char **ss = (!io.baud || io.baud > 4800) ? ss1:ss2; + + io << '\b' << ss[x] << char(0xFF); + + x = ++x % 4; +} + + +word +SquishMsgBase::scanMail(MessageIndex *mi,word maxmsgs) +{ + MsgArea ma; + FileName sqname; + int index = 0; + + io << "\3 "; + + for(int i = 1; i <= MsgArea::highAreaNum() ; i++) + { + if(!ma.read(i)) continue; + + if(ma.msgBaseType != MSGBASE_SQUISH && ma.msgBaseType != MSGBASE_SDM) continue; + + if(!user.mailCheckBoards.connected(i)) continue; + + if(!check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot)) continue; + + XMSG xmsg; + MSGH *msgh; + + if(ma.msgBaseType != MSGBASE_SQUISH || ma.msgType == MSG_TOALL) + { + MSG *sqarea = readArea(ma); + + if(sqarea == NULL) continue; + + long startnum = ma.lowMsg(); + + if(ma.msgType == MSG_TOALL) + { + startnum = ma.lastRead(user_recnr); + + if(startnum < 1) + { + startnum = 1; + } + else + { + startnum = MsgUidToMsgn(sqarea,startnum,UID_EXACT); + } + + if(startnum < 1) startnum = MsgUidToMsgn(sqarea,ma.lastRead(user_recnr),UID_NEXT); + else startnum++; + + if(ma.lastRead(user_recnr) < 1) startnum = 1; + + if(startnum < 1) continue; + } + + if(startnum < 1) startnum = 1; + + for(long num = startnum ; num <= ma.highMsg() && index < maxmsgs;num++) + { + if((msgh = MsgOpenMsg(sqarea , MOPEN_READ , num)) == NULL) continue; + + showbusy(); + + MsgReadMsg(msgh,&xmsg,0,0,0,0,0); + + MsgCloseMsg(msgh); + + if(xmsg.attr & MSGREAD) continue; + + if(( !stricmp(xmsg.to,user.name) + || (!stricmp(xmsg.to,user.alias) && ma.flags && strcmp(user.name,user.alias)) + || ma.msgType == MSG_TOALL ) + && (check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) || ma.sysopAccess()) + ) + { + mi[index].num = ma.msgId(num); + mi[index].area = ma.areaNum; + index++; + } + } + + continue; + } + + + dword name_hashvalue = SquishHash(user.name); + dword alias_hashvalue = SquishHash(user.alias); + + sqname = ma.path; + + sqname.changeExt("SQI"); + + File f(sqname,fmode_read | fmode_copen,2048); + + if(!f.opened()) + { + LOG("Can't open Squish index file '%s'",(char *)sqname); + continue; + } + + showbusy(); + + while( index < maxmsgs ) + { + struct __sqidx si; + + if(f.read(&si,sizeof(si)) != sizeof(si)) break; + + if(si.hash == name_hashvalue || si.hash == alias_hashvalue) + { + for(int i=index-1 ; i >= 0 ; i--) + { + if(si.umsgid == mi[i].num && ma.areaNum == mi[i].area) break; + } + + if(i>=0) continue; + + MSG *sqarea = readArea(ma); + + if(sqarea == NULL) continue; + + long id = si.umsgid; + + long num = MsgUidToMsgn(sqarea,id,UID_EXACT); + + if(num < 1) continue; + + if((msgh = MsgOpenMsg(sqarea , MOPEN_READ , num)) == NULL) continue; + + MsgReadMsg(msgh,&xmsg,0,0,0,0,0); + + MsgCloseMsg(msgh); + + if(xmsg.attr & MSGREAD) continue; + + if(( !stricmp(xmsg.to,user.name) + || (!stricmp(xmsg.to,user.alias) && ma.flags && strcmp(user.name,user.alias)) + ) + && (check_access(ma.readLevel,ma.readFlags,ma.readFlagsNot) || ma.sysopAccess()) + ) + { + mi[index].num = id; + mi[index].area = ma.areaNum; + index++; + } + } + } + } + + + io << '\b'; + + return index; +} + +long +SquishMsgBase::lastRead(MsgArea& ma,long rec) +{ + long n = 0; + + File f; + FileName sqname; + + if(ma.msgBaseType == MSGBASE_SQUISH) sqname(ma.path,".SQL"); + else sqname(ma.path,"LASTREAD"); + + int lr_size = (ma.msgBaseType == MSGBASE_SQUISH) ? 4 : 2; + + if(!f.open(sqname)) return 0; + + f.seek(rec * lr_size); + if(f.read(&n,lr_size) != lr_size) return 0; + + MSG *sqarea = readArea(ma); + + if(sqarea == NULL) return 0; + + n = MsgUidToMsgn(sqarea,n,UID_PREV); + n = MsgMsgnToUid(sqarea,n); + + return n; +} + +void +SquishMsgBase::setLastRead(MsgArea& ma,long rec,long num) +{ + File f; + FileName sqname; + + //squishCache.purge(); + + if(ma.msgBaseType == MSGBASE_SQUISH) sqname(ma.path,".SQL"); + else sqname(ma.path,"LASTREAD"); + + if(!f.open(sqname,fmode_rw | fmode_copen)) return; + + int lr_size = (ma.msgBaseType == MSGBASE_SQUISH) ? 4 : 2; + + if(f.len() < (rec+1)*lr_size) + { + byte x = 0; + + f.seek(f.len()); + for(long i = f.len() ; i < (rec+1)*lr_size ; i++) f.write(&x,1); + } + + f.seek(rec * lr_size); + f.write(&num,lr_size); +} diff --git a/SQUISH.OBJ b/SQUISH.OBJ new file mode 100644 index 0000000..97bdd62 Binary files /dev/null and b/SQUISH.OBJ differ diff --git a/STACKING.CPP b/STACKING.CPP new file mode 100644 index 0000000..a9a9c14 --- /dev/null +++ b/STACKING.CPP @@ -0,0 +1,29 @@ +#include +#include "proboard.hpp" + +void +command_stack::parse(char *s) +{ + int l = strlen(s); + + if(!l) return; + + sp = l; + if(sp>100) sp = 100; + + for(int i=sp-1;i>=0;i--,s++) buf[i]=(*s==';')?'\r':(*s); +} + +char +command_stack::getnext() +{ + if(!sp) return 0; + return buf[--sp]; +} + +char +command_stack::pollnext() +{ + if(!sp) return 0; + return buf[sp-1]; +} diff --git a/STACKING.OBJ b/STACKING.OBJ new file mode 100644 index 0000000..02e7251 Binary files /dev/null and b/STACKING.OBJ differ diff --git a/STRVARS.CPP b/STRVARS.CPP new file mode 100644 index 0000000..14557a4 --- /dev/null +++ b/STRVARS.CPP @@ -0,0 +1,389 @@ +#define Use_MsgBase + +#include +#include +#include +#include "proboard.hpp" + +static + char *varnames[] = { /* 0 */ "NAME", + /* 1 */ "CITY", + /* 2 */ "NODE", + /* 3 */ "SYSDIR", + /* 4 */ "STARTDIR", + /* 5 */ "UPDIR", + /* 6 */ "PVTDIR", + /* 7 */ "BAUD", + /* 8 */ "PORT", + /* 9 */ "FIRSTNAME", + /* 10 */ "LASTNAME", + /* 11 */ "TMLEFT", + /* 12 */ "TMONLINE", + /* 13 */ "LEVEL", + /* 14 */ "DATE", + /* 15 */ "TIME", + /* 16 */ "HANDLE", + /* 17 */ "MNUDIR", + /* 18 */ "TXTDIR", + /* 19 */ "MSGDIR", + /* 20 */ "SYSOPNAME", + /* 21 */ "PASSWORD", + /* 22 */ "NLDIR", + /* 23 */ "PEXDIR", + /* 24 */ "CURFILEAREA#", + /* 25 */ "CURMSGAREA#", + /* 26 */ "CURFILEAREA", + /* 27 */ "CURMSGAREA", + /* 28 */ "CURMENU", + /* 29 */ "NUMUSERS", + /* 30 */ "ID", + /* 31 */ "USERREC", + /* 32 */ "#1", + /* 33 */ "#2", + /* 34 */ "#3", + /* 35 */ "#4", + /* 36 */ "#5", + /* 37 */ "#6", + /* 38 */ "#7", + /* 39 */ "#B1", + /* 40 */ "#B2", + /* 41 */ "#B3", + /* 42 */ "#B4", + /* 43 */ "#B5", + /* 44 */ "#B6", + /* 45 */ "#B7", + /* 46 */ "NUMMSG", + /* 47 */ "LOWMSG", + /* 48 */ "HIGHMSG", + /* 49 */ "TOTALMSG", + /* 50 */ "LASTDATE", + /* 51 */ "LASTTIME", + /* 52 */ "TOTALCALLS", + /* 53 */ "VERSION", + /* 54 */ "VOICEPHONE", + /* 55 */ "DATAPHONE", + /* 56 */ "COUNTRY", + /* 57 */ "NUMYELLS", + /* 58 */ "CURFILEAREADIR", + /* 59 */ "CURFILEGROUP#", + /* 60 */ "CURMSGGROUP#", + /* 61 */ "CURFILEGROUP", + /* 62 */ "CURMSGGROUP", + /* 63 */ "LANGUAGE", + NULL }; + + +static String +varvalue(char *s,int len) +{ + String tmp; + + len = -len; + + if(s[0]=='%') + { + if(getenv(&s[1])) tmp = getenv(&s[1]); + + return tmp; + } + + for(int i=0;varnames[i];i++) + { + char ts[80]; + + if(strcmpl(varnames[i],s)) continue; + + switch(i) + { + case 0: sprintf(ts,"%*s",len,user.name); + tmp = ts; + break; + case 1: sprintf(ts,"%*s",len,user.city); + tmp = ts; + break; + case 2: sprintf(ts,"%*d",len,node_number); + tmp = ts; + break; + case 3: sprintf(ts,"%*s",len,syspath); + tmp = ts; + break; + case 4: sprintf(ts,"%*s",len,mypath); + tmp = ts; + break; + case 5: sprintf(ts,"%*s",len,cfg.uploadpath); + tmp = ts; + break; + case 6: sprintf(ts,"%*s",len,cfg.pvtuploadpath); + tmp = ts; + break; + case 7: sprintf(ts,"%*ld",len,io.baud); + tmp = ts; + break; + case 8: sprintf(ts,"%*d",len,io.port+1); + tmp = ts; + break; + case 9: sprintf(ts,"%*s",len,user_firstname); + tmp = ts; + break; + case 10: { + for(int i=0;i': if(invar) + { + if(*(s+1) == '@') + { + s++; + tmp << varvalue(varname,inlen ? atoi(lenstr) : 0); + invar = FALSE; + inlen = FALSE; + } + continue; // We don't want '>' chars in varnames + } + case ':': if(invar) + { + inlen = TRUE; + continue; + } + default : if(invar) + { + if(inlen) lenstr << (*s); + else varname << (*s); + } + else + { + tmp << char((*s == '|') ? '\n' : (*s)); + } + } + + return tmp; +} diff --git a/STRVARS.OBJ b/STRVARS.OBJ new file mode 100644 index 0000000..8c05229 Binary files /dev/null and b/STRVARS.OBJ differ diff --git a/SYSOPKEY.CPP b/SYSOPKEY.CPP new file mode 100644 index 0000000..de12d24 --- /dev/null +++ b/SYSOPKEY.CPP @@ -0,0 +1,170 @@ +#define Use_LinkedList +#define Use_Handlers + +#include +#include +#include "proboard.hpp" + +void +sysopkey(KEY k) +{ + int i; + + if(k>256) + { + for( sysopkey_handlers.rewind() ; !sysopkey_handlers.eol() ; sysopkey_handlers++) + { + if( CallPEX( &sysopkey_handlers.get() , k ) ) return; + } + } + + if(k>=KEY_AF1 && k<=KEY_AF10) + { + String str = replace_stringvars(cfg.sysopkeys[(k/256)-0x68]); + + if(str[0]=='@') + { + shell(&str[1]); + } + else + if(str[0]=='`') + { + io << &str[1]; + } + else + { + for(i=0;i@")); + io << "\n\n"; + updatemenu = TRUE; + break; + case KEY_ALTC: LOG(1,"Sysop breaks in for chat"); + chat(); + break; + case KEY_ALTL: LOG("User locked out by sysop"); + user.level=0; + exit_proboard(); + case KEY_ALTH: LOG("Sysop hung up"); + exit_proboard(); + case KEY_ALTY: noyell_flag=!noyell_flag; + soundclick(); + break; + case KEY_ALTN: sysop_next = !sysop_next; + soundclick(); + break; + case KEY_ALTI: screen_image(); + break; + case KEY_ALTR: num_yells = 0; + break; + case KEY_PGUP: display_mode--; + if(display_mode<1) display_mode=9; + break; + case KEY_PGDN: display_mode++; + if(display_mode>9) display_mode=1; + break; + case KEY_UP : timer.increase(); + display_mode = 1; + break; + case KEY_DN : timer.decrease(); + display_mode = 1; + break; + case KEY_CTL_LT : { + soundclick(); + soundclick(); + soundclick(); + user.level--; + for(i=0;i=limit[i].level) + { + user.level=limit[i].level; + break; + } + if(i==num_limits) user.level++; + adjust_limits(); + timer.check(); + display_mode = 1; + soundclick(); + soundclick(); + soundclick(); + } break; + case KEY_CTL_RT : { + soundclick(); + soundclick(); + soundclick(); + user.level++; + for(i=num_limits-1;i>=0;i--) + if(user.level<=limit[i].level) + { + user.level=limit[i].level; + break; + } + if(i<0) user.level--; + adjust_limits(); + timer.check(); + display_mode = 1; + soundclick(); + soundclick(); + soundclick(); + } break; + case KEY_ALTS: { + static char *blurbs="û üüäì þàü û åñþô þàü û åõöü ýùûûýþüüäì ñþôý üüäì þàü û åñþôý"; + int off = int(clockticks()%50); + for(int i=0;i<6;i++) + { + io << blurbs[off+i]; + } + } break; + } + + update_display(); +} + diff --git a/SYSOPKEY.OBJ b/SYSOPKEY.OBJ new file mode 100644 index 0000000..ed13d0a Binary files /dev/null and b/SYSOPKEY.OBJ differ diff --git a/TAG.CPP b/TAG.CPP new file mode 100644 index 0000000..17716bc --- /dev/null +++ b/TAG.CPP @@ -0,0 +1,94 @@ +#define Use_TagList +#define Use_LinkedList + +#include +#include +#include "proboard.hpp" + +void +edit_taglist(char *) +{ + int i; + + if(taglist.count() == 0) + { + io << "\n\n\6No files tagged! " << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + for(;;) + { + io << "\n\f" << S_EDIT_TAGGED_TITLE << "\n\n"; + + for(i = 1 , taglist.rewind() ; !taglist.eol() ; taglist++,i++) + { + FileArea fa; + + fa.read(taglist.get().area); + + io << form(" \3%2d\7 - \6%-12s\7 \2 (%s)\n",i,taglist.get().name,fa.name); + } + + io << '\n' << S_EDIT_TAGGED_PROMPT; + + char rep = wait_language_hotkeys(K_EDIT_TAGGED_PROMPT); + + if(rep == 2) break; + + if(rep == 0) + { + while(taglist.count()) + { + taglist.rewind(); + taglist.remove(); + } + + io << K_EDIT_TAGGED_PROMPT[0] << "\n\n" << S_ALL_FILE_TAGS_CLEARED + << ' ' << S_PRESS_ENTER_TO_CONTINUE; + } + + if(rep == 1) + { + char s[4]; + + io << K_EDIT_TAGGED_PROMPT[1] << "\n\n" << S_ENTER_FILE_TO_UNTAG; + + io.read(s,3,READMODE_DIGITS); + + int n = atoi(s); + + if(n > 0 && n <= taglist.count()) + { + for(taglist.rewind() , i=1 ; i +#include "proboard.hpp" + +static +long +find_tagentry(File& f) +{ + char name[36]; + + f.rewind(); + for(;;) + { + if(f.read(name,36) != 36) + return -1; + + long p = f.pos(); + + if(name[0] && !stricmp(name,user.name)) + return p; + + word n; + + if(f.read(&n,sizeof(n)) != sizeof(n)) + return -1; + + f.seek(long(n) * sizeof(FilesIdx),seek_cur); + } +} + +void +write_taglist() +{ + File f; + + if(!f.open(FileName(syspath,"TAGLIST.PB"),fmode_rw|fmode_copen)) + return; + + long p = find_tagentry(f); + + if(p > 0) + { + f.seek(p - 36); + f.write("",1); // Invalidate entry + } + + if(taglist.count()) + { + f.seek(0,seek_end); + + f.write(user.name,36); + + word n = taglist.count(); + + f << n; + taglist.rewind(); + + for(word i=0;i> n; + + for(word i=0;i>4)&7]; + int blink = (x & 0x80) ? 1:0; + int high = (x & 0x08) ? 1:0; + + str << char(27) << "[0;"; + + if(high) + str << "1;"; + if(blink) str << "5;"; + + str << form("%d;%dm",fg+30,bg+40); + } + + return str; +} + +void +fossilio::fullcolor(byte x) +{ + io << fullcolor_string(x); +} + +void +fossilio::clreol() +{ + if(!ansi_mode && !avatar) return; + + if(avatar) io << "\x16\x07"; + else io << "\x1b[K"; +} diff --git a/TERMINAL.OBJ b/TERMINAL.OBJ new file mode 100644 index 0000000..e4cb396 Binary files /dev/null and b/TERMINAL.OBJ differ diff --git a/TIMEBOMB.H b/TIMEBOMB.H new file mode 100644 index 0000000..4266d58 --- /dev/null +++ b/TIMEBOMB.H @@ -0,0 +1,22 @@ +#ifndef __TIME_BOMB_HEADER_H +#define __TIME_BOMB_HEADER_H + + +#define SOFTWARE_EXPIRE + +#ifdef SOFTWARE_EXPIRE + + #define EXPIRE_YEAR 2000 + #define EXPIRE_MONTH 9 + #define EXPIRE_DAY 1 + + #define PORT_VALUE 10 + +#else + + #define PORT_VALUE -1 + +#endif + + +#endif // __TIME_BOMB_HEADER_H diff --git a/TIMELOG.CPP b/TIMELOG.CPP new file mode 100644 index 0000000..a9692b3 --- /dev/null +++ b/TIMELOG.CPP @@ -0,0 +1,51 @@ +#include +#include "proboard.hpp" + +void +timelog::read() +{ +memset(this,0,sizeof(timelog)); +numdays=1; + +File f(FN_TIMELOG_PRO); + +if(f.opened()) f.read(this,sizeof(timelog)); + +if(!daysactive) daysactive = numdays; +} + +void +timelog::update() +{ +memset(this,0,sizeof(timelog)); + +File f(FN_TIMELOG_PRO,fmode_rw | fmode_excl | fmode_copen); + +f.read(this,sizeof(timelog)); + +if(!daysactive) daysactive = numdays; + +if(lastdate!=Date(TODAY)) + { + if(cfg.usage_days && numdays>=cfg.usage_days) + { + for(int i=0;i<24;i++) hours[i] -= long(numdays-cfg.usage_days+1)*hours[i]/numdays; + for(i=0;i<7;i++) days [i] -= long(numdays-cfg.usage_days+1)*days [i]/numdays; + numdays = cfg.usage_days; + } + else numdays++; + + daysactive++; + + lastdate.today(); + } + +hours[login_time[0]%24]+=timer.online(); +days[login_date.weekDay()%7]+=timer.online(); +weeks[login_date.weekNum()%53]+=timer.online(); + +if(io.baud) totalcalls++; + +f.rewind(); +f.write(this,sizeof(timelog)); +} diff --git a/TIMELOG.OBJ b/TIMELOG.OBJ new file mode 100644 index 0000000..ee1a217 Binary files /dev/null and b/TIMELOG.OBJ differ diff --git a/TIMER.CPP b/TIMER.CPP new file mode 100644 index 0000000..db5274b --- /dev/null +++ b/TIMER.CPP @@ -0,0 +1,448 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include +#include "proboard.hpp" + + + +//************************************************************************** +// +// Update the main console's user display area +// +// Prototype: void update_display(); +// +// Parameters: None +// +// Returns: Nothing +// +// Remarks: +// +// This routine is primarly used to update the status bar. +// +// ------------------------------------------------------------------------- +// +// Created on: ??/??/???? (Philippe Leybaert) +// Last modified: 08/05/1999 (Jeff Reeder) Modified to change the color +// of the status bar, and fix the DOB Y2K glitch. +// +//************************************************************************** + +void update_display() +{ + static int oldmode = 0; + + update_user_window(); + + + if ( user_recnr >= 0 ) + { + char s[ 100 ]; + + + if ( oldmode != display_mode ) + { + tsw_clearrect( 1, + tsw_vsize, + tsw_hsize, + tsw_vsize, + BAR_COLOR ); + + oldmode = display_mode; + } + + + tsw_maputs( 1, + tsw_vsize, + BAR_COLOR, + String( ' ', tsw_hsize ) ); + + + if ( num_yells ) + { + tsw_changeatt( BAR_COLOR | 0x80, + 1, + tsw_vsize, + tsw_hsize, + tsw_vsize ); + } + + + switch ( display_mode ) + { + case 1: + + sprintf( s, + "%s <%u>", + user.name,user.level ); + + tsw_mputs( 2, + tsw_vsize, + s ); + + if ( sysop_next ) + { + tsw_changeatt( BAR_COLOR | 0x80, + 1, + tsw_vsize, + strlen( s ) + 1, + tsw_vsize ); + } + + + sprintf( s, + " [%ld bps] [Online: %d] [Left: %d]", + io.baud, + timer.online(), + timer.left() ); + + tsw_mputs( tsw_hsize - strlen( s ) - ( rip_mode + ? 2 + : 0 ), + tsw_vsize, + s ); + + + if ( rip_mode ) + { + tsw_maputc( tsw_hsize - 1, + tsw_vsize, + BAR_COLOR | 0x80, + 'R' ); + } + + break; + + + case 2: + + sprintf( s, + "[Handle: %s]", + user.alias ); + + tsw_mputs( 2, + tsw_vsize, + s ); + + sprintf( s, "[Flags: " ); + + user.aFlags.flagstostr( & s[ 8 ] ); + + strcat( s, "]" ); + + tsw_mputs( tsw_hsize - strlen( s ), + tsw_vsize, + s ); + + break; + + + case 3: + + sprintf( s, + "[City: %s", + user.city ); + + + if ( user.country[ 0 ] ) + { + strcat( s, ", " ); + strcat( s, user.country ); + } + + + strcat( s, "]" ); + + tsw_mputs( 2, + tsw_vsize, + s ); + + sprintf( s, + "[Data: %s] [Tel: %s]", + user.dataPhone, + user.voicePhone ); + + tsw_mputs( tsw_hsize - strlen( s ), + tsw_vsize, + s ); + + break; + + + case 4: + + sprintf( s, + "[#Calls: %ld] [#DL: %ld] [K DL: %ld] [#UL: %ld] [K UL: %ld]", + user.timesCalled, + user.numDownloads, + user.kbDownloaded, + user.numUploads, + user.kbUploaded ); + + tsw_centerline( tsw_vsize, s ); + + break; + + + case 5: + + sprintf( s, + "[%s]", + user.comment ); + + tsw_centerline( tsw_vsize, s ); + + break; + + + case 6: + + sprintf( s, + "[System calls: %ld] [#Msgs: %ld] [#Users: %d]", + totalcalls, + msgbase.totalMsgs(), + num_users ); + + tsw_centerline( tsw_vsize, s ); + + break; + + + case 7: + + sprintf( s, + "[Chat: %s]", + page_reason ); + + tsw_centerline( tsw_vsize, s ); + + break; + + + case 8: + + sprintf( s, + "[Last Caller: %s]", + lastcaller.name ); + + tsw_mputs( 2, + tsw_vsize, + s ); + + if ( lastcaller.date[ 0 ] == 0 && + lastcaller.date[ 1 ] == 0 && + lastcaller.date[ 2 ] == 0 ) + { + sprintf( s, + "[%d-%s-%04d] [%02d:%02d-%02d:%02d]", + 00, + "???", + 0, + lastcaller.timeIn [ 0 ], + lastcaller.timeIn [ 1 ], + lastcaller.timeOut[ 0 ], + lastcaller.timeOut[ 1 ]); + } + else + { + sprintf( s, + "[%d-%s-%04d] [%02d:%02d-%02d:%02d]", + lastcaller.date[ 0 ], + months_short[ lastcaller.date[ 1 ] ], + lastcaller.date[ 2 ] + 1900, + lastcaller.timeIn [ 0 ], + lastcaller.timeIn [ 1 ], + lastcaller.timeOut[ 0 ], + lastcaller.timeOut[ 1 ]); + } + + tsw_mputs( tsw_hsize - strlen( s ), + tsw_vsize, + s ); + + break; + + + case 9: + + sprintf( s, + "[DOB: %02d-%s-%04d] [Time used today: %ld] [Kbytes DL today: %d]", + user.birthDate[ 0 ], + months_short[ user.birthDate[ 1 ] ], + user.birthDate[ 2 ] + 1900, + long( user.timeUsed + timer.used() ), + user.kbToday ); + + tsw_centerline( tsw_vsize, s ); + + break; + } + } + else + { + tsw_selbar( tsw_vsize, + 1, + tsw_hsize, + BAR_COLOR ); + } +} + + + +void +usertimer::decrease() +{ + suspendedtime--; + check(); +} + +void +usertimer::increase() +{ + suspendedtime++; + check(); +} + +usertimer::usertimer() +{ + started = (time_t)0; + suspended = 0; + suspendedtime = 0; + fixedtime = 0; +} + +void +usertimer::start(int min) +{ + started = time(NULL); + suspended = FALSE; + suspendedtime = 0; + fixedtime = 0; + + time_limit = min; +} + +void +usertimer::suspend() +{ + if(!suspended) suspend_start = time(NULL); + + suspended++; +} + +void +usertimer::restart() +{ + if(!suspended) return; + + suspended--; + if(!suspended) suspendedtime += int((time(NULL)-suspend_start)/60L); +} + +int +usertimer::online() +{ + if(!started) return 0; + else return (int)((time(NULL)-started)/60L); +} + +int +usertimer::left() +{ + int x = time_limit - online() + suspendedtime + fixedtime; + + if(suspended) x += int((time(NULL)-suspend_start)/60L); + + return x; +} + +void +usertimer::changeleft(int l) +{ + fixedtime = l - time_limit - suspendedtime + online(); +} + +int +usertimer::used() +{ + return online() - suspendedtime; +} + + + +void +usertimer::check() +{ +static bool warning = FALSE; + +if(!started) return; + +int l=left(); + +if(l>2) warning = FALSE; + +if(l<0) + { + io << '\n' << S_TIME_LIMIT_EXCEEDED << '\xFF'; + + LOG("Time limit! User thrown out."); + sleep(2); + exit_proboard(); + } + +if(l<=2 && !warning) + { + io << '\7' << '\7' << '\n' << S_TIME_LIMIT_WARNING("2") << "\n\xFF"; + + warning = TRUE; + } +} + +void +usertimer::checkinactivity() +{ +static bool warning = FALSE; + +if(!io.baud || !cfg.inactivity_time) return; + +int inactive=(int)(time(NULL)-inactivity_start); + +if(inactive > cfg.inactivity_time+1000) + { + clearinactivity(); + return; + } + +if(inactive < cfg.inactivity_time-20) + { + warning = FALSE; + return; + } + +if(inactive >= cfg.inactivity_time) + { + io << '\n' << S_INACTIVITY_TIMEOUT(form("%d",cfg.inactivity_time)) << "\n\xFF"; + + LOG("Inactivity. User thrown out."); + sleep(2); + exit_proboard(); + } + + if(warning) return; + + io << '\7'; + io << '\7' << '\n' << S_INACTIVITY_WARNING("20") << "\n\xFF"; + + LOG(2,"Inactivity warning"); + + warning = TRUE; +} + +void +usertimer::clearinactivity() +{ +inactivity_start=time(NULL); +} diff --git a/TIMER.OBJ b/TIMER.OBJ new file mode 100644 index 0000000..d42d637 Binary files /dev/null and b/TIMER.OBJ differ diff --git a/TIMESTAT.CPP b/TIMESTAT.CPP new file mode 100644 index 0000000..024b51f --- /dev/null +++ b/TIMESTAT.CPP @@ -0,0 +1,28 @@ +#include "proboard.hpp" + +void +time_stat(char *) +{ +LOG(2,"Time statistics requested"); + +io << "\n\f\n" << S_TIME_STATS_TITLE << '\n'; + +adjust_limits(); + +io << '\n' << S_STATS_TIME_ONLINE (form("%d",timer.online())); +io << '\n' << S_STATS_TIME_LEFT (form("%d",timer.left())); +io << '\n' << S_STATS_FREE_TIME (form("%d",timer.timesuspended())); +io << '\n' << S_STATS_TIME_TODAY (form("%ld",user.timeUsed)); +io << '\n' << S_STATS_DAILY_TIME_LIMIT(form("%d",time_limit)); +io << "\n\n" << S_STATS_DAILY_DL_LIMIT (form("%d",download_limit)); +io << '\n' << S_STATS_DOWNLOAD_LEFT (form("%ld",long(download_limit)-user.kbToday)); +io << '\n' << S_STATS_KB_DOWNLOAD (form("%ld",user.kbDownloaded)); +io << '\n' << S_STATS_KB_UPLOADED (form("%ld",user.kbUploaded)); +io << '\n' << S_STATS_KB_UPLOAD_NEEDED(form("%u",upload_needed)); +io << '\n' << S_STATS_FREE_DOWNLOAD (form("%d",free_download)); +io << "\n\n" << S_STATS_LAST_CALLED ((char *)user.lastDate.format("DD MMM CCYY"),(char *)user.lastTime.format("HH:MM:SS")); +io << '\n' << S_STATS_TOTAL_CALLS (form("%ld",user.timesCalled)); + +io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; +} + diff --git a/TIMESTAT.OBJ b/TIMESTAT.OBJ new file mode 100644 index 0000000..ce42988 Binary files /dev/null and b/TIMESTAT.OBJ differ diff --git a/TOPS.CPP b/TOPS.CPP new file mode 100644 index 0000000..9fcd633 --- /dev/null +++ b/TOPS.CPP @@ -0,0 +1,80 @@ +#include +#include +#include "proboard.hpp" + +void +tops(char *data) +{ + char *headers[14]; + + headers[ 0] = S_TOPS_TOP_CALLERS ; + headers[ 1] = S_TOPS_TOP_CALLERS_UNIT ; + headers[ 2] = S_TOPS_TOP_DOWNLOADERS_KB ; + headers[ 3] = S_TOPS_TOP_DOWNLOADERS_KB_UNIT ; + headers[ 4] = S_TOPS_TOP_DOWNLOADERS_TIMES ; + headers[ 5] = S_TOPS_TOP_DOWNLOADERS_TIMES_UNIT; + headers[ 6] = S_TOPS_TOP_UPLOADERS_KB ; + headers[ 7] = S_TOPS_TOP_UPLOADERS_KB_UNIT ; + headers[ 8] = S_TOPS_TOP_UPLOADERS_TIMES ; + headers[ 9] = S_TOPS_TOP_UPLOADERS_TIMES_UNIT ; + headers[10] = S_TOPS_TOP_MSGWRITERS ; + headers[11] = S_TOPS_TOP_MSGWRITERS_UNIT ; + headers[12] = S_TOPS_TOP_ONLINE ; + headers[13] = S_TOPS_TOP_ONLINE_UNIT ; + + topentry *tp=new topentry[20]; + + int type=0; + switch(toupper(data[0])) + { + case 'C': type=0; break; + case 'K': type=1; break; + case 'T': type=2; break; + case 'U': type=3; break; + case 'F': type=4; break; + case 'M': type=5; break; + case 'O': type=6; break; + default : return; + } + int num=atoi(&data[1]); + if(!num) num=10; + + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if(!registered) num=5; + + File f(FileName(syspath,"TOPS.PB")); + if(!f.opened()) return; + + f.seek(long(type)*sizeof(topentry)*20); + f.read(tp,sizeof(topentry)*20); + + linecounter(3); + io.enablestop(); + stopped=0; + + LOG(2,"Tops requested : %s",headers[type*2]); + + io << "\n\f\7ÖÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÄ·\n"; + io << form("º\3 Pos \7º\6 %-26s\7º\6 %7s \7º\n",headers[type*2],headers[type*2+1]); + io << "ÇÄÄÄÄÄ×ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ×ÄÄÄÄÄÄÄÄĶ\n"; + for(int i=0;i +#include +#include +#include +#include +#include +#include +#include "proboard.hpp" + +static void MoveFailedFile(FileName full_fn); + +static bool file_in_index(FileName fn); + bool check_dszlog(protocol& p , LinkedList& downloads , LinkedList& uploads); + +void process_uploads(protocol& p , char *dir , LinkedList& uploads , bool pvt , bool ask_desc , bool no_log , bool quiet_dl , String extra_log ); + +static char oldpath[70]=""; + +static char env_buf[80]; + +static void +pushdir(char *p) +{ + char path[65]; + unsigned disk; + + strcpy(path,p); + getcwd(oldpath,69); + disk=toupper(path[0])-'A'+1; + + _dos_setdrive(disk,&disk); + + if(path[strlen(path)-1]=='\\') + path[strlen(path)-1]=0; + + chdir(&path[2]); +} + +static void +popdir() +{ + unsigned disk = toupper(oldpath[0])-'A'+1; + _dos_setdrive(disk,&disk); + chdir(&oldpath[2]); +} + + +void +upload(char *data) +{ + bool private_download = FALSE; + bool no_input = FALSE; + bool quiet_download = FALSE; + bool no_log = FALSE; + bool ask_description = TRUE; + char protocol_key = '\0'; + char filename[13] = ""; + FileName extra_log; + protocol p; + int i,npara; + String param[20]; + char uploadpath[80]; + + adjust_limits(); + + strcpy(uploadpath , cfg.uploadpath); + + npara = parse_data(data,param); // Parse command line + + for(i=0 ; i0 && !quiet_download) + { + io << S_NO_UPLOAD_DUE_TO_EVENT << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + + if(!select_protocol(p,protocol_key)) return; + + if(!(p.flags&PROT_BATCH) && !no_input) + { + io << "\n\n" << S_FILE_TO_UPLOAD; + + io.read(filename,12,READMODE_UPALL); + + if(!*filename || strchr(filename,':') || strchr(filename,'\\')) + return; + + io << '\n'; + } + + String command; + + if(p.ulcom[0] != '@') + command << "*N*Q"; + + for(i=0;i downloads , uploads; + + check_dszlog(p , downloads , uploads); + + if(!uploads.count()) + { + if(!quiet_download) + { + io << "\n\n" << S_NO_FILES_RECEIVED << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + } + + return; + } + + process_uploads(p,uploadpath,uploads,private_download,ask_description,no_log,quiet_download,extra_log); + + if(!quiet_download) + io << '\n' << S_PRESS_ENTER_TO_CONTINUE; +} + + +void +process_uploads(protocol& p , char *dir , LinkedList& uploads , bool pvt , + bool ask_desc , + bool no_log , + bool quiet_dl , + String extra_log + ) +{ + long total_bytes = 0; + int total_files = 0; + String uploadpath(dir); + + bool dupes_found = FALSE; + + if(!quiet_dl) + io << "\n\n" << S_CHECKING_UPLOADS << "\n\xFF"; + + for( uploads.rewind() ; !uploads.eol() ; ) + { + FileName fn( uploadpath , uploads.get() ); + + fn.upperCase(); + + FileName fullfn(fn); + + DirScan scan(fullfn); + + if(!int(scan)) + { + uploads.remove(); + + continue; + } + + fn.stripPath(); + + if(!quiet_dl) + io << '\n' << S_FILE_RECEIVED((char *)fn) << '\xFF'; + + Date date(TODAY); + Time time(NOW); + + File ul_log; + + if(!no_log) + { + ul_log.open(FileName(syspath,"UPLOAD.LOG"),fmode_text | fmode_append | fmode_write | fmode_copen); + + ul_log.printf("%02d-%s-%02d %02d:%02d:%02d Upload of %-13s by %s\n",date[0], + months_short[date[1]], + date[2], + time[0],time[1],time[2], + (char *)fn,user.name); + ul_log.close(); + } + + if(extra_log.len()) + { + ul_log.open(extra_log,fmode_text | fmode_append | fmode_write | fmode_copen); + ul_log.printf("U 0 %s %ld NO\n",(char *)fullfn,scan.size()); + ul_log.close(); + } + + if(!pvt && cfg.checkdupes && file_in_index(fn) && !quiet_dl) + { + dupes_found = TRUE; + + if(cfg.killdupes) + { + unlink(fullfn); + + io << S_DUPLICATE_UPLOAD_REMOVED; + } + else + { + io << S_DUPLICATE_UPLOAD; + } + + LOG(1,"Upload-%c %s (DUPE)",p.key,(char *)fn); + + uploads.remove(); + } + else + { + if(!no_log) + { + if(pvt) + LOG(1,"Upload-%c %s (Personal)",p.key,(char *)fn); + else + LOG(1,"Upload-%c %s",p.key,(char *)fn); + } + + total_files++; + total_bytes += scan.size(); + + uploads++; + } + } + + if(cfg.virScanCommand[0]) + { + LinkedList failed_files; + + io << "\n\n" << S_SCANNING_UPLOADS; + + for(uploads.rewind() ; !uploads.eol(); ) + { + FileName curfile(uploadpath,uploads.get()); + + DirScan scan(curfile); + + String cmd = String("*Q*N") + cfg.virScanCommand; + + cmd.replace("@@",curfile); + + shell(replace_stringvars(cmd)); + + if( (cfg.virScanType && !access(cfg.virScanSemaphore,0)) + || (!cfg.virScanType && returnvalue) + ) + { + LOG(1,"File '%s' rejected by upload scanner",(char *)curfile); + + if(cfg.virScanFailedAction == VIRSCAN_ACTION_DELETE) + { + unlink(curfile); + } + + if(cfg.virScanFailedAction == VIRSCAN_ACTION_MOVE) + { + MoveFailedFile(curfile); + } + + uploads.remove(); + + failed_files.add(curfile); + + total_files--; + total_bytes -= scan.size(); + } + else + { + uploads++; + } + } + + if(failed_files.count()) + { + io << "\n\n" << S_FOLLOWING_FILES_REJECTED << "\n\n"; + + for(failed_files.rewind() ; !failed_files.eol() ; failed_files++) + { + FileName fn = failed_files.get(); + + fn.stripPath(); + + io << " " << (char *)fn << '\n'; + } + + io << '\n' << S_PRESS_ENTER_TO_CONTINUE; + } + } + + + if(total_files) + { + if(!pvt) + { + user.numUploads += total_files; + user.kbUploaded += int(total_bytes/1024L); + + if(!quiet_dl) + io << "\n\n" << S_X_FILES_UPLOADED(form("%d",total_files),form("%ld",total_bytes/1024L)) << '\n'; + } + } + else + { + if(!quiet_dl) + io << "\n\n" << S_NO_FILES_UPLOADED << '\n'; + + return; + } + + if(!ask_desc) return; + + if(dupes_found && !quiet_dl) showansascrip("DUPESFND"); + + if(!pvt && uploads.count()) + io << '\n' + << S_PLEASE_ENTER_UPLOAD_DESCRIPTIONS + << "\n\n"; + + for(uploads.rewind() ; !uploads.eol(); uploads++) + { + io.clearinput(); + + if(pvt) + { + User tmpuser; + char username[36]; + + for(;;) + { + io << '\n' << S_ENTER_USERNAME_FOR_PERSONAL_FILE((char *)uploads.get()); + io.read(username,35,READMODE_UPFIRST); + + if(!strcmpl(username,"Sysop")) strcpy(username,cfg.sysopname); + if(tmpuser.search(username)) break; + io << "\n\n" << S_USER_NOT_LOCATED << '\n'; + } + + File f(FN_PVTFILES_PB,fmode_rw | fmode_copen); + if(!f.opened()) + { + LOG("Unable to create PVTFILES.PB"); + continue; + } + + _PrivateFile pvt; + + for(int rec=0;;rec++) + { + if(f.read(&pvt,sizeof(pvt))!=sizeof(pvt)) break; + + if(!pvt.fname[0]) break; + } + strcpy(pvt.fname,uploads.get()); + strcpy(pvt.to,username); + strcpy(pvt.from,user.name); + pvt.date.today(); + f.seek(long(rec)*sizeof(pvt)); + f.write(&pvt,sizeof(pvt)); + } + else + { + FileName fbbs; + char descr[41]; + + io << '\n' << S_ENTER_DESCRIPTION_LINE_1((char *)uploads.get()); + + io.clearinput(); + io.read(descr,40); + + if(descr[0]!='/') + fbbs(uploadpath,"FILES.BBS"); + else + fbbs(uploadpath,"FILES.PVT"); + + File tf(fbbs,fmode_write | fmode_append | fmode_text | fmode_copen); + tf << form("%-12s %s\n",(char *)uploads.get(),((descr[0]=='/') ? (&descr[1]) : descr)); + while(descr[0]) + { + io << '\n' << S_ENTER_DESCRIPTION_LINE_X; + io.read(descr,40); + if(descr[0]) tf << '+' << ((descr[0]=='/') ? (&descr[1]) : descr) << '\n'; + } + + if(cfg.addUploaderName) + tf << '+' << "[Uploader: " << user.name << ']\n'; + } + } + + io << '\n'; +} + + +bool +file_in_index(FileName fn) +{ + if(cfg.ignore_ext) fn.stripExt(); + + File idx; + + if(idx.open(FileName(syspath,"FILESIDX.PB") , fmode_read , cfg.fastmode ? 8192:2048)) + { + FilesIdx fidx; + + for(;;) + { + if(idx.read(&fidx,sizeof(fidx)) != sizeof(fidx)) break; + + if(cfg.ignore_ext) + if(strchr(fidx.name,'.')) + *strchr(fidx.name,'.') = '\0'; + + if(!stricmp(fidx.name,fn)) return TRUE; + } + } + + return FALSE; +} + +bool +check_dszlog(protocol& p , LinkedList& downloads , LinkedList& uploads) +{ + File dszlog; + int i; + char s[200]; + + if(dszlog.open(p.logfile,fmode_read | fmode_text)) + { + + while(dszlog.readLine(s,199)) + { + bool found_upload = FALSE; + bool found_download = FALSE; + + strip_linefeed(s); + + char *ptr=strtok(s," "); + + while(ptr) + { + if(!strcmp(ptr,p.dlkeyword)) + { + found_download = TRUE; + break; + } + if(!strcmp(ptr,p.ulkeyword)) + { + found_upload = TRUE; + break; + } + + ptr = strtok(NULL," "); + } + + if(ptr == NULL) continue; + + for(i=0;i& files) +{ + File tf; + + if(!tf.open(p.ctlfile,fmode_create | fmode_text)) + return FALSE; + + for(files.rewind() ; !files.eol() ; files++) + { + if(p.flags&PROT_BIM) + { + tf << form("U %-80s%-160s",(char *) files.get().name,EMPTY_STRING); + } + else + { + for(int j=0;j& files , LinkedList& downloads , LinkedList& uploads ) +{ + if(!strchr(p.dlcom,'#')) + if(!create_dszctl(p , files)) return FALSE; + + String command; + + if(p.dlcom[0] != '@') + command << "*N*Q"; + + files.rewind(); + + for(int i=0;i& dirlist) +{ + File f(FileName(syspath,form("FA_%d.CTL",area)),fmode_read | fmode_text); + + dirlist.rewind(); + + dirlist.add(String(firstdir)); + + for(;;) + { + char str[128]; + + if(!f.readLine(str,127)) break; + + append_backspace(str); + + dirlist.add(String(str)); + } +} + +bool +is_freefile(char *fname) +{ + File fp(FileName(syspath,"FREEFILE.CTL"),fmode_read | fmode_text); + + if(!fp.opened()) return FALSE; + + for(;;) + { + char s[100]; + + if(!fp.readLine(s,99)) return FALSE; + + strip_linefeed(s); + strip_leading(s); + strip_trailing(s); + + if(matchfile(s,fname)) return TRUE; + } +} + +static void +MoveFailedFile(FileName full_fn) +{ + FileArea fa; + FileName fn = full_fn; + + fn.stripPath(); + + if(fa.read(cfg.virScanFailedArea)) + { + ts_CopyFile(full_fn,fa.filepath,4096); + unlink(full_fn); + + File f(fa.listpath,fmode_rw|fmode_append|fmode_copen); + f.printf("%-12s Uploaded by %s\n",(char *)fn,user.name); + } +} diff --git a/UL.OBJ b/UL.OBJ new file mode 100644 index 0000000..589c536 Binary files /dev/null and b/UL.OBJ differ diff --git a/USAGE.CPP b/USAGE.CPP new file mode 100644 index 0000000..3e009e3 --- /dev/null +++ b/USAGE.CPP @@ -0,0 +1,26 @@ +#include +#include "proboard.hpp" + +void +show_graph(char *data) +{ + run_sdkfile(String("_GRAPH ") + data); +} + +void +usage_graph(char *data) +{ + show_graph(form("HOURLY %s",data)); +} + +void +days_graph(char *data) +{ + show_graph(form("LASTDAYS %s",data)); +} + +void +weeks_graph(char *data) +{ + show_graph(form("WEEKLY %s",data)); +} diff --git a/USAGE.OBJ b/USAGE.OBJ new file mode 100644 index 0000000..9efab1b Binary files /dev/null and b/USAGE.OBJ differ diff --git a/USERED.CPP b/USERED.CPP new file mode 100644 index 0000000..29321ec --- /dev/null +++ b/USERED.CPP @@ -0,0 +1,195 @@ +#include +#include +#include +#include +#include "proboard.hpp" + + + +void usereditor( char * ) +{ + User rec; + int cur_user; + char *loglevels[] = { + "Friend", + "Normal", + "Suspicious", + "Dangerous" }; + + + for ( cur_user = num_users ; ; ) + { + rec.read(cur_user-1); + + io << form( "\f\n\6User record \1%d", + cur_user ); + + + if ( rec.uFlags & UFLAG_DELETED ) + { + io << "\7 [DELETED]"; + } + + + if ( rec.uFlags & UFLAG_NOKILL ) + { + io << "\7 [NOKILL]"; + } + + + io << "\n\n"; + + io << form( "\6UserName : \3%s\n\n" + "\6City : \3%s\n" + "\6Password : \3%s\n\n", + rec.name, + rec.city, + rec.passWord ); + + io << form( "\6Level : \3%-5u " + "\6Loglevel : \3%s\n\n" + "\6# Calls : \3%-5ld " + "\6Last Call: \3%02d-%s-%04d at %02d:%02d:%02d\n", + rec.level, + loglevels[ rec.logLevel ], + rec.timesCalled, + rec.lastDate[ 0 ], + months_short[ rec.lastDate[ 1 ] ], + rec.lastDate[ 2 ] + 1900, + rec.lastTime[ 0 ], + rec.lastTime[ 1 ], + rec.lastTime[ 2 ] ); + + io << "\n\n\6<\3+/-\6> <\3F\6>irst <\3L\6>ast Le<\3v\6>el <\3Q\6>uit <\3S\6>earch <\3D\6>elete <\3N\6>oKill "; + + + char k = io.wait( "S+-FLVQDN\r" ); + + + switch ( k ) + { + case 'Q': + + return; + + + case 'D': + + rec.uFlags ^= UFLAG_DELETED; + + rec.write( FALSE ); + + break; + + + case 'N': + + rec.uFlags ^= UFLAG_NOKILL; + + rec.write( FALSE ); + + break; + + + case '+': + + if ( cur_user < num_users ) + { + cur_user++; + } + + break; + + + case '-': + + if ( cur_user > 1 ) + { + cur_user--; + } + + break; + + + case 'F': + + cur_user = 1; + + break; + + + case 'L': + + cur_user = num_users; + + break; + + + case 'V': + + io << "\n\nNew level: \3"; + + io.read( int( rec.level ) ); + + rec.write( FALSE ); + + break; + + + case 'S': + { + char s[ 36 ]; + int i; + + + io << "\n\nSearch for string: \3"; + + io.read( s, + 36, + READMODE_UPFIRST ); + + if ( ! s[ 0 ] ) + { + break; + } + + + io << "\7\n\nSearching..."; + + + for ( i = 0; i < num_users; i++ ) + { + rec.read( i ); + + + if ( strstrl( rec.name, s ) ) + { + cur_user = i + 1; + + break; + } + } + + + if ( i == num_users ) + { + cur_user = 1; + } + } + break; + } + } +} + + + +void edit_user() +{ + user.write( FALSE ); + + shell( String( form( "*Q*N*SPROCFG.EXE UE %d", + user_recnr + 1 ) ) ); + + user.read( user_recnr ); +} + diff --git a/USERED.OBJ b/USERED.OBJ new file mode 100644 index 0000000..8c623cf Binary files /dev/null and b/USERED.OBJ differ diff --git a/USERSET.CPP b/USERSET.CPP new file mode 100644 index 0000000..2daea4d --- /dev/null +++ b/USERSET.CPP @@ -0,0 +1,805 @@ +#include +#include +#include +#include "proboard.hpp" + +const OFF = 0; +const ON = 1; +const TOGGLE = 2; +const ASK = 3; +const NONE = 4; +const SAVE = 0x10; +const RESTORE = 0x20; +const QUIET = 0x40; + +static int _near +toggle_type(char *data) +{ + String param[5]; + int num_para; + int ret=TOGGLE; + char *strings[] = { "OFF", "ON" , "TOGGLE" , "ASK" , "SAVE" , "RESTORE" , "/Q", NULL }; + + num_para = parse_data(data,param); + + for(int i=0;i=0 && a_rec!=user_recnr) || (u_rec>=0 && u_rec!=user_recnr)) + { + LOG(1,"Duplicate alias: '%s'",tmp); + + io << "\n\n" << S_ALIAS_BEING_USED << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + + strcpy(user.alias,tmp); + + LOG(1,"Alias changed to '%s'",user.alias); +} + + + +void password_change( char * ) +{ + char pass[ 16 ]; + + + io << "\f\n" + << S_CHANGE_PASSWORD_TITLE; + + + do + { + io << "\n\n" + << S_ENTER_NEW_PASSWORD( form( "%d", cfg.min_passlength ) ); + + io.read( pass, + 15, + READMODE_PWD ); + + + if ( strlen( pass ) < cfg.min_passlength ) + { + io << "\n\n" + << S_ILLEGAL_PASSWORD + << '\n'; + + sleep( 2 ); + + return; + } + + + io << "\n\n" + << S_ASK_PASSWORD_AGAIN; + + io.read( user.passWord, + 15, + READMODE_PWD ); + } + while( strcmpl( pass, user.passWord ) ); + + + user.passWordCRC = RaCrc( user.passWord ); + + + io << "\n\n" + << S_PASSWORD_CHANGED_SUCCESSFULLY + << "\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + + + LOG( 1, + "Password changed to '%s'", + user.passWord ); +} + + + +void lines_change(char *) +{ + char newlen[4]; + + io << "\f\n" << S_CHANGE_SCREENLENGTH_TITLE_AND_PROMPT(form("%d",user.screenLength)); + + io.read(newlen,2,READMODE_DIGITS); + + if(atoi(newlen) >= 5) + user.screenLength = atoi(newlen); + + LOG(1,"Screenlength changed to %d",user.screenLength); +} + +#define TOGGLE_DISPLAY(var) { io << ((var) ? string_enabled : string_disabled); io << S_PRESS_ENTER_TO_CONTINUE; } + +void +ansi_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_ANSI) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_ANSI; + break; + case OFF : user.uFlags &= ~UFLAG_ANSI; + break; + case TOGGLE: user.uFlags ^= UFLAG_ANSI; + break; + case ASK : io << '\n' << S_ASK_ANSI; + if(io.ask()) user.uFlags |= UFLAG_ANSI; + else + { + if(ansi_mode) io << "\x1b[0m"; + user.uFlags &= ~UFLAG_ANSI; + } + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_ANSI; + else user.uFlags &= ~UFLAG_ANSI; + } + + if(!(action & QUIET)) + { + if(ansi_mode) LOG(1,"ANSI enabled"); + else LOG(1,"ANSI disabled"); + + if(ansi_mode) + io << '\n' << S_ANSI_ENABLED; + else + io << '\n' << S_ANSI_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +toggle_avatar(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_AVATAR) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_AVATAR; + break; + case OFF : user.uFlags &= ~UFLAG_AVATAR; + break; + case TOGGLE: user.uFlags ^= UFLAG_AVATAR; + break; + case ASK : io << '\n' << S_ASK_AVATAR; + if(io.ask()) user.uFlags |= UFLAG_AVATAR; + else user.uFlags &= ~UFLAG_AVATAR; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_AVATAR; + else user.uFlags &= ~UFLAG_AVATAR; + } + + if(!(user.uFlags & UFLAG_AVATAR)) user.uFlags &= ~UFLAG_AVTPLUS; + + if(!(action & QUIET)) + { + if(avatar) LOG(1,"AVATAR enabled"); + else LOG(1,"AVATAR disabled"); + + if(avatar) + io << '\n' << S_AVATAR_ENABLED; + else + io << '\n' << S_AVATAR_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +toggle_avtplus(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_AVTPLUS) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_AVTPLUS; + break; + case OFF : user.uFlags &= ~UFLAG_AVTPLUS; + break; + case TOGGLE: user.uFlags ^= UFLAG_AVTPLUS; + break; + case ASK : io << '\n' << S_ASK_AVATAR_PLUS; + if(io.ask()) user.uFlags |= UFLAG_AVTPLUS; + else user.uFlags &= ~UFLAG_AVTPLUS; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_AVTPLUS; + else user.uFlags &= ~UFLAG_AVTPLUS; + } + + if(!(action & QUIET)) + { + if(avtplus) LOG(1,"AVT/0+ enabled"); + else LOG(1,"AVT/0+ disabled"); + + if(avtplus) + io << '\n' << S_AVTPLUS_ENABLED; + else + io << '\n' << S_AVTPLUS_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +cls_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_CLEAR) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_CLEAR; + break; + case OFF : user.uFlags &= ~UFLAG_CLEAR; + break; + case TOGGLE: user.uFlags ^= UFLAG_CLEAR; + break; + case ASK : io << '\n' << S_ASK_CLS; + if(io.ask()) user.uFlags |= UFLAG_CLEAR; + else user.uFlags &= ~UFLAG_CLEAR; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_CLEAR; + else user.uFlags &= ~UFLAG_CLEAR; + } + + if(!(action & QUIET)) + { + if(cls_mode) LOG(1,"Screen clearing enabled"); + else LOG(1,"Screen clearing disabled"); + + if(cls_mode) + io << '\n' << S_CLS_ENABLED; + else + io << '\n' << S_CLS_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +pause_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_PAUSE) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_PAUSE; + break; + case OFF : user.uFlags &= ~UFLAG_PAUSE; + break; + case TOGGLE: user.uFlags ^= UFLAG_PAUSE; + break; + case ASK : io << '\n' << S_ASK_PAUSE; + if(io.ask()) user.uFlags |= UFLAG_PAUSE; + else user.uFlags &= ~UFLAG_PAUSE; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_PAUSE; + else user.uFlags &= ~UFLAG_PAUSE; + } + + if(!(action & QUIET)) + { + if(pause_mode) LOG(1,"Page pausing enabled"); + else LOG(1,"Page pausing disabled"); + + if(pause_mode) + io << '\n' << S_PAUSE_ENABLED; + else + io << '\n' << S_PAUSE_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +fsed_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_FSED) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_FSED; + break; + case OFF : user.uFlags &= ~UFLAG_FSED; + break; + case TOGGLE: user.uFlags ^= UFLAG_FSED; + break; + case ASK : io << '\n' << S_ASK_FSED; + if(io.ask()) user.uFlags |= UFLAG_FSED; + else user.uFlags &= ~UFLAG_FSED; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_FSED; + else user.uFlags &= ~UFLAG_FSED; + } + + if(!(action & QUIET)) + { + if(fsed_mode) LOG(1,"FsEd enabled"); + else LOG(1,"FsEd disabled"); + + if(fsed_mode) + io << '\n' << S_FSED_ENABLED; + else + io << '\n' << S_FSED_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +hotkey_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_HOTKEYS) ? TRUE:FALSE; + + switch(action & 0xF) + { + case ON : user.uFlags |= UFLAG_HOTKEYS; + break; + case OFF : user.uFlags &= ~UFLAG_HOTKEYS; + break; + case TOGGLE: user.uFlags ^= UFLAG_HOTKEYS; + break; + case ASK : io << '\n' << S_ASK_HOTKEYS; + if(io.ask()) user.uFlags |= UFLAG_HOTKEYS; + else user.uFlags &= ~UFLAG_HOTKEYS; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_HOTKEYS; + else user.uFlags &= ~UFLAG_HOTKEYS; + } + + if(!(action & QUIET)) + { + if(!stack_mode) LOG(1,"Hotkeys enabled"); + else LOG(1, "Hotkeys disabled"); + + if(!stack_mode) + io << '\n' << S_HOTKEYS_ENABLED; + else + io << '\n' << S_HOTKEYS_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +ibm_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_NOIBM) ? TRUE:FALSE; + + switch(action & 0xF) + { + case OFF : user.uFlags |= UFLAG_NOIBM; + break; + case ON : user.uFlags &= ~UFLAG_NOIBM; + break; + case TOGGLE: user.uFlags ^= UFLAG_NOIBM; + break; + case ASK : io << '\n' << S_ASK_IBMCHARS; + if(!io.ask()) user.uFlags |= UFLAG_NOIBM; + else user.uFlags &= ~UFLAG_NOIBM; + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_NOIBM; + else user.uFlags &= ~UFLAG_NOIBM; + } + + if(!(action & QUIET)) + { + if(!no_ibm) LOG(1,"IBM graphics enabled"); + else LOG(1,"IBM graphics disabled"); + + if(!no_ibm) + io << '\n' << S_IBMCHARS_ENABLED; + else + io << '\n' << S_IBMCHARS_DISABLED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + + +void +user_list(char *data) +{ + bool aliases = FALSE; + + char s[40]; + + if(String(data) == "/H") + aliases = TRUE; + + io << "\f\n" << S_LIST_USERS_TITLE_AND_PROMPT; + + io.read(s,39,READMODE_UPALL); + + LOG(2,"User list requested. Search for \"%s\"",s); + + io << "\n\f"; + + user.list(s,aliases); + + io << '\n' << S_END_OF_USER_LIST << ' ' << S_PRESS_ENTER_TO_CONTINUE; +} + +void +ripfont_change(char *data) +{ + static byte prev = 0; + + int action = toggle_type(data); + + if(action & SAVE) prev = user.ripFont; + + switch(action & 0xF) + { + case OFF : user.ripFont = 1; + break; + case ON : user.ripFont = 0; + break; + case TOGGLE: user.ripFont = !user.ripFont; + break; + case ASK : io << '\n' << S_ASK_RIP_FONT; + user.ripFont = io.ask(0); + io << '\n'; + break; + } + + if(action & RESTORE) + { + user.ripFont = prev; + } + + if(!(action & QUIET)) + { + if(user.ripFont) LOG(1,"Large RIP font selected"); + else LOG(1,"Small RIP font selected"); + + if(user.ripFont) + io << '\n' << S_LARGE_RIP_FONT_SELECTED; + else + io << '\n' << S_SMALL_RIP_FONT_SELECTED; + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +rip_toggle(char *data) +{ + static bool prev = FALSE; + + int action = toggle_type(data); + + if(action & SAVE) prev = (user.uFlags & UFLAG_NORIP) ? TRUE:FALSE; + + switch(action & 0xF) + { + case OFF : user.uFlags |= UFLAG_NORIP; + break; + case ON : user.uFlags &= ~UFLAG_NORIP; + break; + case TOGGLE: user.uFlags ^= UFLAG_NORIP; + break; + case ASK : io << '\n' << S_ASK_RIP; + if(!io.ask()) user.uFlags |= UFLAG_NORIP; + else + { + if(ansi_mode) io << "\x1b[0m"; + user.uFlags &= ~UFLAG_NORIP; + } + io << '\n'; + break; + } + + if(action & RESTORE) + { + if(prev) user.uFlags |= UFLAG_NORIP; + else user.uFlags &= ~UFLAG_NORIP; + } + + if(!(action & QUIET)) + { + if(user.uFlags & UFLAG_NORIP) + { + io << '\n' << S_RIP_DISABLED; + LOG(1,"RIP disabled"); + } + else + { + io << '\n' << S_RIP_ENABLED; + LOG(1,"RIP enabled"); + } + + io << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + } + + updatemenu = TRUE; +} + +void +change_dateformat(char *data) +{ + if(data) + { + io << "\f\n"; + + io << S_CHANGE_DATE_FORMAT_TITLE(date_formats_long[user.dateFormat]); + + io << "\n\n"; + } + + io << S_SELECT_DATE_FORMAT_TITLE << "\n\n"; + + io << "\3 1. \6" << date_formats_long[0] << '\n'; + io << "\3 2. \6" << date_formats_long[1] << '\n'; + io << "\3 3. \6" << date_formats_long[2] << '\n'; + + io << '\n' << S_SELECT_DATE_FORMAT_PROMPT; + + char tmp[2]; + + io.read(tmp,1); + + if(strlen(tmp)<1 || atoi(tmp) < 1 || atoi(tmp) > 3) return; + + user.dateFormat = atoi(tmp) - 1; + + if(data) + LOG(1,"Date format changed to '%s'",date_formats_long[user.dateFormat]); +} diff --git a/USERSET.OBJ b/USERSET.OBJ new file mode 100644 index 0000000..ed8ec56 Binary files /dev/null and b/USERSET.OBJ differ diff --git a/USERWIN.CPP b/USERWIN.CPP new file mode 100644 index 0000000..aa2bf02 --- /dev/null +++ b/USERWIN.CPP @@ -0,0 +1,89 @@ +#include +#include +#include +#include "proboard.hpp" + +static void _near update_right_window(); +static void _near update_bottom_window() {} + +static Window w; + +void +update_user_window() +{ + if(tsw_hsize>=132) update_right_window(); + else if(tsw_vsize>=43) update_bottom_window(); +} + +static void _near +update_right_window() +{ + static bool opened = FALSE; + + if(!opened) + { + opened = TRUE; + SCREEN.change(1,1,80,tsw_vsize-1); + w.open(81,1,tsw_hsize,tsw_vsize-1,0x70,NOSAVE); + w.direct(3,0," USER "); + } + + if(user_recnr<0) return; + + char s[80]; + + s[0] = ' '; + user.aFlags.flagstostr(&s[1]); + s[33] = ' '; + s[34] = 0; + + w.direct(14,0,s); + + tsw_cursoroff(); + w.setPos(1,1); + sprintf(s,"\n Name : %-30.30s\n",user.name); + w << s; + sprintf(s," Handle : %-30.30s\n",user.alias); + w << s; + sprintf(s," City : %-30.30s\n",user.city); + w << s; + sprintf(s," Country/St : %-30.30s\n",user.country); + w << s; + sprintf(s," Level : %-5u \n",user.level); + w << s; + sprintf(s," VoicePhone : %-30.30s\n",user.voicePhone); + w << s; + sprintf(s," DataPhone : %-30.30s\n\n",user.dataPhone); + w << s; + sprintf(s," Downloads : %-5ld (%5ld Kb) ANSI: [%c]\n",user.numDownloads,user.kbDownloaded,(ansi_mode)?'û':' '); + w << s; + sprintf(s," Uploads : %-5ld (%5ld Kb) FSED: [%c]\n",user.numUploads,user.kbUploaded,(fsed_mode)?'û':' '); + w << s; + sprintf(s," # Messages : %-5ld PAUSE: [%c]\n",user.msgsPosted,(pause_mode)?'û':' '); + w << s; + sprintf(s," # Calls : %-5ld IBM: [%c]\n",user.timesCalled,(!no_ibm)?'û':' '); + w << s; + sprintf(s," Time online: %-3d min STACKING: [%c]\n\n",timer.online(),(stack_mode)?'û':' '); + w << s; + sprintf(s," Last Call : %2d-%3.3s-19%d at %02d:%02d:%02d\n\n\n\n",user.lastDate[0],months_short[user.lastDate[1]],user.lastDate[2], + user.lastTime[0],user.lastTime[1],user.lastTime[2]); + w << s; + + sprintf(s," # Calls: %-5ld # Msgs: ----- # Users: %-5d\n",totalcalls,num_users); + w << s; + sprintf(s," Last : %-36.36s\n" + " [%02d:%02d - %02d:%02d]",lastcaller.name,lastcaller.timeIn[0],lastcaller.timeIn[1],lastcaller.timeOut[0],lastcaller.timeOut[1]); + w << s; + + + String line('Ä',tsw_hsize-84); + line.insert(0,"Ç"); + line << "¶"; + + w.direct(0,18,line); + w.direct(3,18," SYSTEM "); + + tsw_cursoron(); + SCREEN.moveCursor(0,0); // Trick to update physical cursor +} + diff --git a/USERWIN.OBJ b/USERWIN.OBJ new file mode 100644 index 0000000..b67d79f Binary files /dev/null and b/USERWIN.OBJ differ diff --git a/VERSION.CPP b/VERSION.CPP new file mode 100644 index 0000000..4d20064 --- /dev/null +++ b/VERSION.CPP @@ -0,0 +1,66 @@ +#include +#include "proboard.hpp" + +void +version_info(char *) +{ + LOG(2,"Version info requested"); + + io << "\f\n\7" + " ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\n" + " ³ ProBoard version " VERSION; + + for(int i=0;i<54-strlen(VERSION);i++) io << ' '; + io << "³\n" + //io << "\1(c) 1990-1996 Philippe Leybaert \7³\n" + " ³ ³\n"; + io << "\7 ³ Copyright (c) 1990-1999 TeleGrafix Communications, Inc. ³\n"; + io << "\7 ³ All Rights Reserved ³\n"; + io << "\7 ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij\n" + "\7 ³ ³\n"; + + + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if(registered) + { + char buf[ 80 ]; + + + if ( max_node_count == 0 ) + { + strcpy( buf, + form( buf, + "%s (Unlimited nodes)", + software_serial_number() ) ); + } + else + { + strcpy( buf, + form( "%s (%d nodes maximum)", + software_serial_number(), + max_node_count ) ); + } + io << "\7 ³ \7Registered to:\6 " << form("%-36s",registered_user_name() ) << "\7 ³\n" + "\7 ³ \6" << form("%-36s",cfg.bbsname ) << "\7 ³\n" + "\7 ³ \7Serial number:\6 " << form("%-48.48s", buf ) << "\7 ³\n" + "\7 ³ ³\n"; + } + else + { + io << " ³ \6UNREGISTERED EVALUATION VERSION ³\n" + "\7 ³ ³\n"; + } + + + io << "\7 ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄij\n"; + + io << " ³ JAM(mbp) - Copyright 1993 Joaquim Homrighausen, Andrew Milner, ³\n" + " ³ Mats Birch, Mats Wallin. ³\n" + " ³ ALL RIGHTS RESERVED. ³\n"; + io << "\7 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\n\n " + << S_PRESS_ENTER_TO_CONTINUE; +} + diff --git a/VERSION.OBJ b/VERSION.OBJ new file mode 100644 index 0000000..115fe04 Binary files /dev/null and b/VERSION.OBJ differ diff --git a/VIEWFILE.CPP b/VIEWFILE.CPP new file mode 100644 index 0000000..399a2fa --- /dev/null +++ b/VIEWFILE.CPP @@ -0,0 +1,30 @@ +#include +#include "proboard.hpp" + +void +view_named_file(char *data) +{ +io.color(7); +io.sendfile(data); +} + +void +view_file(char *data) +{ +String total(data); +char filename[13]; +io << '\n' << S_ENTER_FILENAME_TO_DISPLAY; +io.read(filename,12); +total << filename; + +io.color(7); +io.sendfile(total); +} + +void +view_file_wait(char *data) +{ +io.color(7); +io.sendfile(data); +io << '\n' << S_PRESS_ENTER_TO_CONTINUE; +} diff --git a/VIEWFILE.OBJ b/VIEWFILE.OBJ new file mode 100644 index 0000000..a5846de Binary files /dev/null and b/VIEWFILE.OBJ differ diff --git a/WORDWRAP.CPP b/WORDWRAP.CPP new file mode 100644 index 0000000..449b922 --- /dev/null +++ b/WORDWRAP.CPP @@ -0,0 +1,28 @@ +#include +#include "proboard.hpp" + +int +wordwrap(char *s,String& str,int max) +{ + int spacepos=-1; + + if(strlen(s)<=max) return 0; + + for(int i=0;i +#include +#include +#include +#include "proboard.hpp" + +void +writemsg(char *data) +{ +Message msg; +MsgArea ma; +String param[5]; +bool goodbye = FALSE; +int cost=0; +bool to_specified = FALSE; +bool subj_specified = FALSE; +char netmail_address[30]; + +netmail_address[0] = '\0'; + +parse_data(data,param); + +if(param[0][0]=='*') msg.setArea(user.msgArea); + else msg.setArea(atoi(param[0])); + +if(!ma.read(msg.areaNum())) return; + +io << "\f\n" << S_WRITE_MESSAGE_TITLE(ma.name) << '\n'; + +msg.to[0]=0; +for(int i=0;i<5;i++) + if(param[i][0]=='/') + switch(toupper(param[i][1])) + { + case 'T': strcpy(msg.to,(char *)(param[i])+3); + to_specified = TRUE; + break; + case 'S': strcpy(msg.subj,(char *)(param[i])+3); + if(msg.subj[0]) + subj_specified = TRUE; + break; + case 'L': goodbye = TRUE; + break; + case 'N': strncpy(netmail_address,(char *)(param[i])+3,29); + netmail_address[29] = '\0'; + break; + } + +if(!check_access(ma.writeLevel,ma.writeFlags,ma.writeFlagsNot) && !ma.sysopAccess()) + { + io << '\n' << S_NOT_ALLOWED_TO_WRITE_IN_AREA << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + + return; + } + +strcpy(msg.from,user.name); + +if(ma.flags == 3) + strcpy(msg.from,user.alias); +else + if(ma.flags && (ma.flags!=2 || user.alias[0])) + { + io << '\n'; + + if(ma.flags > 1) + io << S_ASK_WRITE_MSG_USING_YOUR_ALIAS; + else + io << S_ASK_WRITE_MSG_USING_AN_ALIAS; + + if(io.ask(0)) + { + if(ma.flags==2) + { + if(user.alias[0] == '\0') strcpy(user.alias,user.name); + strcpy(msg.from,user.alias); + } + else + for(;;) + { + User tmpuser; + + io << "\n\n" << S_ENTER_ALIAS_TO_USE; + + io.read(msg.from,35,READMODE_UPFIRST); + if(!msg.from[0]) return; + if(tmpuser.search(msg.from,TRUE,FALSE,TRUE)) continue; + if(!tmpuser.search(msg.from)) break; + } + } + + io << '\n'; + } + +if(!msg.to[0]) + for(;;) + { + User tuser; + + if(ma.msgType != MSG_PVT && ma.msgKind != MSG_NET) + io << '\n' << S_ENTER_ALL_IF_TO_EVERYONE << '\n'; + + io << '\n' << S_WRITE_MSG_TO; + io.read(msg.to,35,READMODE_UPFIRST); + + if(!msg.to[0]) return; + if(!strcmp(msg.to,"All") && ma.msgKind!=MSG_NET && ma.msgType != MSG_PVT) break; + if(!strcmp(msg.to,"Sysop") && ma.msgKind==MSG_LOCAL) break; + + if(ma.msgKind!=MSG_LOCAL) break; + + if(ma.flags==1) break; + + io << "\n\n\7" << S_SCANNING_USER_FILE << '\xFF'; + + if(tuser.search(msg.to)) break; + + if(ma.flags==2) + if(tuser.search(msg.to,TRUE,FALSE,TRUE)) break; + + bool found = tuser.search(msg.to,FALSE,TRUE,FALSE); + + for(int count = 0;found && count<2;count++) + found = tuser.searchNext(); + + if(count==1) + { + tuser.search(msg.to,FALSE,TRUE,FALSE); + + io << "\n\n" << S_CONFIRM_WRITE_MESSAGE_TO(tuser.name); + + if(io.ask(TRUE)) + { + strcpy(msg.to,tuser.name); + break; + } + else + { + io << '\n'; + continue; + } + } + + if(count>1) + { + io.enablestop(); + + io << "\n\n" << S_FUZZY_SEARCH_LIST_HEADER << '\n'; + + linecounter(2); + + found = tuser.search(msg.to,FALSE,TRUE,FALSE); + while(found) + { + if(!(tuser.uFlags & UFLAG_HIDDEN)) + io << form("\6 %-32.32s \5%-22.22s \2%-22.22s\n",tuser.name,tuser.city,tuser.country); + if(stopped || linecounter()) break; + found = tuser.searchNext(); + } + io.disablestop(); + if(!found) + io << S_FUZZY_SEARCH_LIST_FOOTER << '\n'; + + continue; + } + + io << S_USER_NOT_LOCATED << '\n'; + } + +if(!strcmpl(msg.to,"Sysop")) strcpy(msg.to,ma.sysop); + +if(to_specified) + io << '\n' << S_WRITE_MSG_TO << msg.to; + + +if(ma.msgKind==MSG_NET) + { + aka a; + a.read(ma.aka); + char tmp[30]; + + if(netmail_address[0]) + { + int point; + + node_entry ne; + ne.zone=a.zone; + ne.net=a.net; + ne.node=a.node; + + if((point=ne.read(netmail_address))<0) + { + LOG("Unknown netmail address: %s",netmail_address); + return; + } + + msg.destZone = ne.zone; + msg.destNet = ne.net; + msg.destNode = ne.node; + msg.destPoint= point; + msg.cost = cost; + } + else + { + io << "\n\n" << S_ENTER_NETMAIL_ADDRESS_HEADER; + + for(;;) + { + int point; + + io << "\n\n" << S_ENTER_NETMAIL_ADDRESS; + + io.read(tmp,25); + if(!tmp[0]) return; + io << "\n\n"; + + node_entry ne; + ne.zone=a.zone; + ne.net=a.net; + ne.node=a.node; + + if((point=ne.read(tmp))<0) continue; + + cost=ne.cost; + + io << S_CONFIRM_NETMAIL_ADDRESS(form("%d:%d/%d.%d",ne.zone,ne.net,ne.node,point),ne.name,form("%d",ne.cost)); + + if(io.ask(1)) + { + if(user.credit= 1) + { + nr = msg.msgBase()->msgNum(*msg.msgArea,nr); + } + + if(nr<1) io << S_SAVING_MESSAGE_ERROR << '\n'; + else + { + io << form("\3#%d\n",nr); + user.msgsPosted++; + LOG(1,"Msg #%ld entered (Area %d)",nr,msg.areaNum()); + if(ma.msgKind == MSG_NET) user.pending += cost; + } + } + else + LOG(1,"Msg aborted (Area %d)",msg.areaNum()); + +if(goodbye) logoff(NULL); + else io << '\n' << S_PRESS_ENTER_TO_CONTINUE; +} + +void +edit_message() +{ + if(fsed_mode && (ansi_mode || avatar)) + { + if(run_sdkfile("/I FSED") < 0) + { + if(!cfg.editorname[0] && !cfg.internalfsed) + { + msged(); + return; + } + String editorcommand(cfg.editorname); + + if(cfg.internalfsed) + editorcommand = "@_FSED"; + + if(editorcommand[0] == '@') + { + editorcommand.del(0,1); + run_sdkfile(replace_stringvars(editorcommand)); + } + else + { + editorcommand << "*N*Q *P *B *T *I"; + shell(replace_stringvars(editorcommand)); + } + + switch(returnvalue) + { + case 1: io << "\n\n" << S_MESSAGE_ABORTED << '\n'; + unlink("MSGTMP"); + break; + case 2: LOG("Carrier lost while editing."); + exit_proboard(); + } + } + } + else msged(); +} + +void +write_msginf( char *from , char *to , char *subj , long num , char *area , char *pvt) +{ + File f; + + if(f.open("MSGINF",fmode_create | fmode_text)) + { + f << from << '\n'; + f << to << '\n'; + f << subj << '\n'; + f << form("%ld\n",num); + f << area << '\n'; + f << pvt << '\n'; + } +} diff --git a/WRITEMSG.OBJ b/WRITEMSG.OBJ new file mode 100644 index 0000000..995ecfe Binary files /dev/null and b/WRITEMSG.OBJ differ diff --git a/Z.BAT b/Z.BAT new file mode 100644 index 0000000..115aa58 --- /dev/null +++ b/Z.BAT @@ -0,0 +1 @@ +path=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\;c:\dos;c:\util;c:\brief;c:\4dos602;d:\opus;d:\bc31\bin diff --git a/ZIP.CPP b/ZIP.CPP new file mode 100644 index 0000000..0d9a31a --- /dev/null +++ b/ZIP.CPP @@ -0,0 +1,368 @@ +#include +#include "proboard.hpp" + +static void near zip(File&); +static void near arc(File&); +static void near arj(File&); +static void near lzh(File&); +static void near zoo(File&); +static void near rar(File&); + +static bool find_area(char *fn,FileArea &fa); + +static void near print(char *,unsigned,unsigned,long,long); + +# define NUM_EXT 5 + +void +list_archive(char *data) +{ +char input[13]; + +io << "\f\n" << S_VIEW_ARCHIVE_TITLE_AND_PROMPT; + +io.read(input,12,READMODE_UPALL); +if(!input[0]) return; + +FileName fn; +File fh; +String param[40]; +BitArray arealist(MAX_FILE_AREAS,1); + +int npara=parse_data(data,param); + +create_arealist(param,npara,arealist); + +FileArea fa; + +if(!find_area(input,fa)) + { + io << "\n\n" << S_ARCHIVE_FILE_NOT_FOUND << "\n\n" << S_PRESS_ENTER_TO_CONTINUE; + return; + } + +fn(fa.filepath,input); + +fn.upperCase(); + +if(!fh.open(fn)) + return; + +fn.stripPath(); + +LOG(2,"Archive list requested (%s)",(char *)fn); + +linecounter(0); +io << form("\n\f\n\7" + "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»\n" + "º \3%-12s \7³\3 %-44.44s\7º\n",(char *)fn,fa.name); + +io << form("ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍËÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍ͹\n" + "º\6 %-15.15s\7º\6 %-12.12s\7º\6 %-6.6s\7º\6 %-9.9s\7º\6 %-9.9s\7º\n" + "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍÍÎÍÍÍÍÍÍÍÍÍ͹\n", + S_ARCHIVE_HEADER_FILENAME, + S_ARCHIVE_HEADER_DATE, + S_ARCHIVE_HEADER_TIME, + S_ARCHIVE_HEADER_ORIGSIZE, + S_ARCHIVE_HEADER_COMPSIZE + ); + +linecounter(5); + +stopped=0; +io.enablestop(); + +char ident_buf[20]; + +fh.read(ident_buf,20); +fh.seek(0); + + if(ident_buf[0] == '\x1a') arc(fh); +else if(!strncmp(ident_buf,"PK\x03\x04",4)) zip(fh); +else if(!strncmp(&ident_buf[2],"-lh",3)) lzh(fh); +else if(!strncmp(ident_buf,"ZOO",3)) zoo(fh); +else if(!strncmp(ident_buf,"\x60\xEA",2)) arj(fh); +else if(!strncmp(ident_buf,"Rar",3)) rar(fh); + +if(!stopped) io << "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍͼ\n\n" + << S_PRESS_ENTER_TO_CONTINUE; + +io.disablestop(); +} + +static void near +zip(File &f) +{ +struct zipfile + { + unsigned long signature; + unsigned version,gp,method,time,date; + long crc,comsize,uncomsize; + unsigned length,extra; + } zip_record; + +char name[80]; + +for(;;) + { + f.read(&zip_record,sizeof(zip_record)); + if(zip_record.signature!=0x04034b50L) break; + f.read(name,zip_record.length); + name[zip_record.length]='\0'; + + print(name,zip_record.date,zip_record.time,zip_record.comsize,zip_record.uncomsize); + if(linecounter() || stopped) break; + + f.seek(zip_record.comsize+zip_record.extra,seek_cur); + } +} + +static void near +arc(File &f) +{ +struct arcfile + { + char name[13]; + long size; + unsigned date,time,crc; + long length; + } arc_record; + +for(;;) + { + char mark; + + f.read(&mark,1); + if(!mark) break; + f.read(&mark,1); + if(mark==1) + { + if(f.read(&arc_record,23) != 23) break; + + arc_record.length=arc_record.size; + } + else + { + if(f.read(&arc_record,27) != 27) break; + } + + print(arc_record.name,arc_record.date,arc_record.time,arc_record.size,arc_record.length); + if(linecounter() || stopped) break; + + f.seek(arc_record.size,seek_cur); + } +} + +static void near +print(char *name,unsigned date,unsigned time,long csize,long usize) +{ +Date d; d.fileDate(date); +Time t; t.fileTime(time); + +strip_path(name); +io << form("º\6 %-15s\7º\5 %02d %3.3s %04d \7º\2 %02d:%02d \7º\3 %8ld \7º\6 %8ld \7º\n",name,d[0],months_short[d[1]],d[2]+1900,t[0],t[1],usize,csize); +} + +static void near +lzh(File &f) +{ +struct lzhfile + { + unsigned char headsiz,headchk; + char headid[3]; + int method; + unsigned long pacsiz,orgsiz; + unsigned int time,date,attr; + unsigned char fnlen; + char Fname[80]; + } lzh_record; + +for(;;) + { + if(f.read(&lzh_record.headsiz,1)<1) break; + if(f.read(&lzh_record.headchk,(int)lzh_record.headsiz+1)<((int)lzh_record.headsiz+1)) break; + if(strncmp(lzh_record.headid,"-lh",3)) break; + lzh_record.Fname[lzh_record.fnlen]='\0'; + + print(lzh_record.Fname,lzh_record.date,lzh_record.time,lzh_record.pacsiz,lzh_record.orgsiz); + if(linecounter() || stopped) break; + + f.seek(lzh_record.pacsiz,seek_cur); + } +} + +static void near +zoo(File &f) +{ +struct zoo_header + { + char text[20]; + unsigned long zoo_tag; + long zoo_start; + // De rest moeme nie-Šn! + } zoo_record; + +struct direntry + { + long zoo_tag; + char type,packing_method; + long next,offset; + unsigned date,time,file_crc; + long org_size,size_now; + unsigned char major_ver,minor_ver,deleted,struc; + long comment; + unsigned int cmt_size; + char fname[13]; + } zoo_head; + +f.read(&zoo_record,sizeof(zoo_record)); +f.seek(zoo_record.zoo_start); + +for(;;) + { + f.read(&zoo_head,sizeof(zoo_head)); + if(!zoo_head.next) break; + + print(zoo_head.fname,zoo_head.date,zoo_head.time,zoo_head.size_now,zoo_head.org_size); + if(linecounter() || stopped) break; + + f.seek(zoo_head.next); + } +} + +static void near +arj(File &f) +{ +struct { + unsigned id; + unsigned hdrsize; + byte first_hdrsize; + byte version; + byte version_needed; + byte OS; + byte arjflags; + byte method; + byte filetype; + byte reserved1; + unsigned time; + unsigned date; + long comsize; + long uncomsize; + long crc; + unsigned filespecpos; + unsigned accessmode; + } arj_record; + +char name[80]; + +for(int count = 1;;count++) + { + //unsigned extheadersize; + long pos = f.pos(); + + f.read(&arj_record,sizeof(arj_record)); + + if(arj_record.id != 0xEA60 || !arj_record.hdrsize) break; + + f.seek(pos+arj_record.first_hdrsize+4); + + f.read(name,80); + + if(count > 1) + { + print(name,arj_record.date,arj_record.time,arj_record.comsize,arj_record.uncomsize); + + if(linecounter() || stopped) break; + } + + if(count == 1) + f.seek(pos+arj_record.hdrsize+10); + else + f.seek(pos+arj_record.hdrsize+10+arj_record.comsize); + } +} + +static void near +rar(File &f) +{ + struct block_header + { + word crc; + byte type; + word flags; + word blockSize; + }; + struct file_header + { + word crc; + byte type; + word flags; + word blockSize; + long packSize; + long unpackSize; + byte hostOs; + dword fileCrc; + word fileTime; + word fileDate; + byte unpackVersion; + byte method; + word nameSize; + dword fileAttr; + }; + + + for(;;) + { + block_header bh; + file_header fh; + + long pos = f.pos(); + + if(f.read(&bh,sizeof(bh)) != sizeof(bh)) + break; + + if(bh.type == 0x74) + { + f.seek(pos); + f.read(&fh,sizeof(fh)); + + char *fname = new char[fh.nameSize+1]; + + f.read(fname,fh.nameSize); + fname[fh.nameSize] = '\0'; + + print(fname,fh.fileDate,fh.fileTime,fh.packSize,fh.unpackSize); + + f.seek(pos + fh.blockSize + fh.packSize); + } + else + { + f.seek(pos + bh.blockSize); + } + } +} + + +bool +find_area(char *fn,FileArea &fa) +{ + File idx; + + if(idx.open(FileName(syspath,"FILESIDX.PB") , fmode_read , cfg.fastmode ? 8192:4096)) + { + FilesIdx fidx; + + for(;;) + { + if(idx.read(&fidx,sizeof(fidx)) != sizeof(fidx)) break; + + if(!stricmp(fidx.name,fn)) + { + if(fa.read(fidx.area) && check_access(fa.level,fa.flags,fa.flagsNot)) + return TRUE; + } + } + } + + return FALSE; +} diff --git a/ZIP.OBJ b/ZIP.OBJ new file mode 100644 index 0000000..a4e8782 Binary files /dev/null and b/ZIP.OBJ differ diff --git a/backup/MODEM.CPP b/backup/MODEM.CPP new file mode 100644 index 0000000..07e6092 --- /dev/null +++ b/backup/MODEM.CPP @@ -0,0 +1,545 @@ +#define Use_MsgBase + +#include +#include +#include +#include +#include +#include +#include + +#include "fossil.hpp" +#include "desqview.hpp" +#include "proboard.hpp" + +static void +fos_sendbreak(int port) +{ + fos_break(port,TRUE); + + unsigned long ticks = clockticks(); + while(clockdiff(ticks)<2) {} + + fos_break(port,FALSE); +} + +struct modem_config : _ModemConfig {}; + +class modem + { + int port; + long baud; + int delay; + public: + modem(int p,long b); + ~modem() + { + fos_deinit(port); + } + void set_delay(int d) + { + delay = d; + } + void cmd(char *s); + bool check_response(String& s); + }; + +modem::modem(int p,long b) +{ + byte baudcode = 0; + + port = p; + baud = b; + + fos_init(port); + + switch(baud) + { + case 300L: baudcode = 0x43; break; + case 1200L: baudcode = 0x83; break; + case 2400L: baudcode = 0xA3; break; + case 4800L: baudcode = 0xC3; break; + case 9600L: baudcode = 0xE3; break; + case 19200L: baudcode = 0x03; break; + case 38400L: baudcode = 0x23; break; + } + + fos_setbps(port,baudcode); +} + +void +modem::cmd(char *s) +{ + for(;*s;s++) + { + char c = *s; + + switch(c) + { + case '~': ::delay(500); + break; + case '`': + case '': + case 'v': fos_setdtr(port,0); + break; + case '^': fos_setdtr(port,1); + break; + case '$': fos_sendbreak(port); + break; + case '|': c = '\r'; + default : fos_sendnw(port,c); + if(delay) + ::delay(delay*100); + } + } +} + +bool +modem::check_response(String& s) +{ + static String resp; + + if(!fos_byteready(port)) + { + return FALSE; + } + + byte c = fos_getch(port); + + if(c == '\r') + { + s = resp; + resp.clear(); + + return (s[0]) ? TRUE:FALSE; + } + + if(c != '\n') resp << char(c); + + return FALSE; +} + +const int STATUS_WAITING_FOR_CALL = 0; +const int STATUS_INITIALIZING = 1; +const int STATUS_WAITING_FOR_OK = 2; + + +bool +do_modem(modem_response *response) +{ +// tsw_fillscreen('°',0x01); + tsw_fillscreen('°',0x70); + + Window stat_win (3,21,76,23,0x0F,SHADOW|EXPLODE); + Window title_win(3,2,76,6,0x1F,SHADOW|EXPLODE); + Window resp_win (3,8,25,13,0x3F,SHADOW|EXPLODE,SINGLE_BORDER); + Window lc_win (3,16,76,18,0x1F,SHADOW|EXPLODE); + Window event_win(30,8,76,13,0x5F,SHADOW|EXPLODE); + + stat_win.ShadowColor( 0x11 ); + + title_win.open(); + resp_win.open(); + lc_win.open(); + stat_win.open(); + event_win.open(); + + lc_win.direct(56,0,"µ LAST CALLER Æ"); + resp_win.direct(11,0,0x3F,"´ Ã"); + resp_win.direct(12,0,0x3E," MODEM "); + event_win.direct(34,0,"µ SYSTEM Æ"); + + tsw_centerline(3,"ProBoard v" VERSION); + tsw_centerline(4,"Copyright (c) 1990-1999 TeleGrafix Communications, Inc."); + tsw_centerline(5,"All Rights Reserved"); + + modem_config *modem_cfg = new modem_config; + CLEAR_OBJECT(*modem_cfg); + + File f; + + if(!f.open(FileName(syspath,form("MODEM%03d.PB",node_number)))) + if(!f.open(FileName(syspath,"MODEM.PB"))) + { + LOG("Unable to open MODEM.PB"); + delete modem_cfg; + return FALSE; + } + + f.read(modem_cfg,sizeof(modem_config)); + f.close(); + + modem_cfg->port--; + + if(response->baud) modem_cfg->maxBps = response->baud; + if(response->port>=0) modem_cfg->port = response->port; + + tsw_maputs(6,13,0x3E,form("%ld bps",modem_cfg->maxBps)); + tsw_maputs(19,13,0x3E,form("COM%d",modem_cfg->port+1)); + + response->port = modem_cfg->port; + + modem modem(modem_cfg->port,(modem_cfg->flags & MODEM_LOCKED) ? 38400L : modem_cfg->maxBps); + + modem.set_delay(modem_cfg->commandDelay); + + tsw_cursoroff(); + + stat_win.clear(); + tsw_centerline(22,"Initializing modem",0xE); + + event_win << form("\n # Calls : %-6ld # Users : %d\n" + " # Hudson Msgs: %-5ld\n",totalcalls,num_users,msgbase.totalMsgs()); + + tsw_centerline(17,form("%s (%02d:%02d to %02d:%02d)", + lastcaller.name, + lastcaller.timeIn[0],lastcaller.timeIn[1], + lastcaller.timeOut[0],lastcaller.timeOut[1]),0x1E); + + time_t start_time = time(NULL); + + time_t init_sent = 0; + int init_tries = 0; + bool initialized = FALSE; + bool blanked = FALSE; + + bool init1_ok; + bool init2_ok; + bool init3_ok; + + bool init1_sent = FALSE; + bool init2_sent = FALSE; + bool init3_sent = FALSE; + + time_t blank_start = time(NULL); + + word *blank_buf = new word[tsw_vsize*tsw_hsize]; + + for(;;) + { + String s; + Date date(TODAY); + Time time(NOW); + + if(!blanked) + { + title_win.direct(2,0,0x1F,"µ Æ" ); + title_win.direct(3,0,0x1E,form(" %02d:%02d:%02d ",time[0],time[1],time[2])); + + title_win.direct(55,0,0x1F,"µ Æ" ); + title_win.direct(56,0,0x1E,form(" %02d %s %d ",date[0],months_short[date[1]],date[2]+1900)); + + event_win.setPos(1,1); + + if(nextevent.enabled) + event_win << form(" Next Event : %s %02d:%02d (%d min) ",days_short[nextevent.nextday()],nextevent.start[0],nextevent.start[1],nextevent.minutesleft()); + else + event_win << " Next Event : -NONE-"; + + event_win << form("\n\n\n Time idle : %ld min",(::time(NULL)-start_time)/60); + } + + if(init_sent && (::time(NULL)-init_sent)>5 && !initialized) + { + if(!blanked) stat_win.clear(); + + if(init_tries>3) + { + if(!blanked) tsw_centerline(22,"Unable to initialize modem",0xE); + response->port = -1; + break; + } + + if(!blanked) tsw_centerline(22,form("Unable to initialize modem. Retrying (Try #%d)",init_tries+1),0x8E); + + initialized = FALSE; + init1_sent = FALSE; + init2_sent = FALSE; + init3_sent = FALSE; + init_sent = 0; + } + + if(!initialized) + { + if(!init1_sent) + { + if(modem_cfg->cmdInit1[0]) + { + modem.cmd(modem_cfg->cmdInit1); + + init1_ok = FALSE; + } + + init1_sent = TRUE; + init_sent = ::time(NULL); + } + + if(!init2_sent && init1_ok) + { + if(modem_cfg->cmdInit2[0]) + { + modem.cmd(modem_cfg->cmdInit2); + + init2_ok = FALSE; + } + else + { + init2_ok = TRUE; + } + + init2_sent = TRUE; + init_sent = ::time(NULL); + } + + if(!init3_sent && init2_sent && init2_ok) + { + if(modem_cfg->cmdInit3[0]) + { + modem.cmd(modem_cfg->cmdInit3); + + init3_ok = FALSE; + } + else + { + init3_ok = TRUE; + } + + init3_sent = TRUE; + init_sent = ::time(NULL); + + init_tries++; + } + } + + if(!initialized && init1_ok && init2_ok && init3_ok) + { + initialized = TRUE; + + stat_win.clear(); + tsw_centerline(22,"Waiting for a call",0xE); + + stat_win.direct(2,2,0x0F,"µ Æ" ); + stat_win.direct(3,2,0xE," AltL " ); + stat_win.direct(9,2,0xB,"= Local "); + + stat_win.direct(56,2,0x0F,"µ Æ" ); + stat_win.direct(57,2,0xE," Esc " ); + stat_win.direct(62,2,0xB,"= Exit "); + } + + if(init_sent && (::time(NULL)-init_sent) > 300) + { + initialized = FALSE; + init1_sent = FALSE; + init2_sent = FALSE; + init3_sent = FALSE; + init_sent = 0; + init_tries = 0; + } + + if(modem.check_response(s)) + { + s << '|'; + + if(blanked) + { + tsw_puttext(blank_buf,1,1,tsw_hsize,tsw_vsize); + blanked = FALSE; + blank_start = ::time(NULL); + } + + if(init1_sent && !init1_ok && s==modem_cfg->cmdInit1) + continue; + if(init2_sent && !init2_ok && s==modem_cfg->cmdInit2) + continue; + if(init3_sent && !init3_ok && s==modem_cfg->cmdInit3) + continue; + + s.delLast(); + resp_win << ' ' << form("%-17.17s",(char *)s) << '\n'; + s << '|'; + + if(strstr(s,modem_cfg->msgOk) && !initialized) + { + if(init1_sent && !init1_ok) + init1_ok = TRUE; + if(init2_sent && !init2_ok) + init2_ok = TRUE; + if(init3_sent && !init3_ok) + init3_ok = TRUE; + } + + if(initialized) + { + String connect = s; + long baud = 0; + + if(modem_cfg->msgRing[0] && strstr(connect,modem_cfg->msgRing) && (modem_cfg->flags & MODEM_MANUAL_ANSWER)) + { + modem.cmd(modem_cfg->cmdAnswer); + } + + if(!baud && modem_cfg->userConBps1 && strstr(connect,modem_cfg->msgConUser1) && modem_cfg->msgConUser1[0]) baud = modem_cfg->userConBps1; + if(!baud && modem_cfg->userConBps2 && strstr(connect,modem_cfg->msgConUser2) && modem_cfg->msgConUser2[0]) baud = modem_cfg->userConBps2; + if(!baud && modem_cfg->userConBps3 && strstr(connect,modem_cfg->msgConUser3) && modem_cfg->msgConUser3[0]) baud = modem_cfg->userConBps3; + if(!baud && modem_cfg->userConBps4 && strstr(connect,modem_cfg->msgConUser4) && modem_cfg->msgConUser4[0]) baud = modem_cfg->userConBps4; + if(!baud && modem_cfg->userConBps5 && strstr(connect,modem_cfg->msgConUser5) && modem_cfg->msgConUser5[0]) baud = modem_cfg->userConBps5; + if(!baud && modem_cfg->userConBps6 && strstr(connect,modem_cfg->msgConUser6) && modem_cfg->msgConUser6[0]) baud = modem_cfg->userConBps6; + + if(!baud && strstr(connect,modem_cfg->msgCon115200)&& modem_cfg->msgCon115200[0])baud = 115200L; + if(!baud && strstr(connect,modem_cfg->msgCon64000) && modem_cfg->msgCon64000[0]) baud = 64000L; + if(!baud && strstr(connect,modem_cfg->msgCon57600) && modem_cfg->msgCon57600[0]) baud = 57600L; + if(!baud && strstr(connect,modem_cfg->msgCon38400) && modem_cfg->msgCon38400[0]) baud = 38400L; + if(!baud && strstr(connect,modem_cfg->msgCon36000) && modem_cfg->msgCon36000[0]) baud = 36000L; + if(!baud && strstr(connect,modem_cfg->msgCon33600) && modem_cfg->msgCon33600[0]) baud = 33600L; + if(!baud && strstr(connect,modem_cfg->msgCon31200) && modem_cfg->msgCon31200[0]) baud = 31200L; + if(!baud && strstr(connect,modem_cfg->msgCon28800) && modem_cfg->msgCon28800[0]) baud = 28800L; + if(!baud && strstr(connect,modem_cfg->msgCon26400) && modem_cfg->msgCon26400[0]) baud = 26400L; + if(!baud && strstr(connect,modem_cfg->msgCon24000) && modem_cfg->msgCon24000[0]) baud = 24000L; + if(!baud && strstr(connect,modem_cfg->msgCon21600) && modem_cfg->msgCon21600[0]) baud = 21600L; + if(!baud && strstr(connect,modem_cfg->msgCon19200) && modem_cfg->msgCon19200[0]) baud = 19200L; + if(!baud && strstr(connect,modem_cfg->msgCon16800) && modem_cfg->msgCon16800[0]) baud = 16800L; + if(!baud && strstr(connect,modem_cfg->msgCon14400) && modem_cfg->msgCon14400[0]) baud = 14400L; + if(!baud && strstr(connect,modem_cfg->msgCon12000) && modem_cfg->msgCon12000[0]) baud = 12000L; + if(!baud && strstr(connect,modem_cfg->msgCon9600 ) && modem_cfg->msgCon9600[0] ) baud = 9600L; + if(!baud && strstr(connect,modem_cfg->msgCon7200 ) && modem_cfg->msgCon7200[0] ) baud = 7200L; + if(!baud && strstr(connect,modem_cfg->msgCon4800 ) && modem_cfg->msgCon4800[0] ) baud = 4800L; + if(!baud && strstr(connect,modem_cfg->msgCon2400 ) && modem_cfg->msgCon2400[0] ) baud = 2400L; + if(!baud && strstr(connect,modem_cfg->msgCon1200 ) && modem_cfg->msgCon1200[0] ) baud = 1200L; + if(!baud && strstr(connect,modem_cfg->msgCon1275 ) && modem_cfg->msgCon1275[0] ) baud = 1200L; + if(!baud && strstr(connect,modem_cfg->msgCon300 ) && modem_cfg->msgCon300[0] ) baud = 300L; + + if(baud) + { + stat_win.clear(); + tsw_centerline(22,form("Incoming call at %ld bps",baud),0xE); + response->baud = baud; + break; + } + + if(modem_cfg->msgConExternal[0] && strstr(connect,modem_cfg->msgConExternal)) + { + SCREEN.clear(); + modem.modem::~modem(); + exit(modem_cfg->externalErrorLevel); + } + } + } + + if(modem_cfg->blankTime && !blanked && (::time(NULL)-blank_start)>modem_cfg->blankTime) + { + tsw_gettext(blank_buf,1,1,tsw_hsize,tsw_vsize); + tsw_fillscreen(' ',0); + blanked = TRUE; + } + + if( nextevent.minutesleft()==0 && nextevent.start[0]==time[0] + && nextevent.start[1]==time[1] && time[2]<=1 + && nextevent.node == node_number) + { + modem.modem::~modem(); + SCREEN.clear(); + if(nextevent.type) + { + String s = "*=*Q*N*C /C "; + s << nextevent.command; + shell(s); + exit(0); + } + else + { + exit(nextevent.errorlevel); + } + } + + if(KB.hit()) + { + if(blanked) + { + tsw_puttext(blank_buf,1,1,tsw_hsize,tsw_vsize); + blanked = FALSE; + blank_start = ::time(NULL); + } + + KEY k=KB.get(); + + if(k==KEY_ALTL) + { + stat_win.clear(); + tsw_centerline(22,"Local login",0xE); + modem.cmd(modem_cfg->cmdOffHook); + response->baud = 0; + sleep(1); + break; + } + + if(k==KEY_ESC) + { + stat_win.clear(); + tsw_centerline(22,"Exit",0xE); + modem.cmd(modem_cfg->cmdDown); + sleep(1); + modem.modem::~modem(); + SCREEN.clear(); + exit(99); + } + + if(k==KEY_ALTJ) + { + tsw_gettext(blank_buf,1,1,tsw_hsize,tsw_vsize); + tsw_cursoron(); + SCREEN.clear(); + modem.cmd(modem_cfg->cmdOffHook); + shell("*X*C*N*Q"); + tsw_cursoroff(); + tsw_puttext(blank_buf,1,1,tsw_hsize,tsw_vsize); + + initialized = FALSE; + init1_sent = FALSE; + init2_sent = FALSE; + init3_sent = FALSE; + init_sent = 0; + init_tries = 0; + } + } + + if(!access(form("%sDOWN.%d",syspath,node_number),0)) + { + stat_win.clear(); + tsw_centerline(22,"Going down on external request",0xE); + LOG("Going down on external request"); + + modem.cmd(modem_cfg->cmdDown); + sleep(1); + modem.modem::~modem(); + SCREEN.clear(); + + File f; + f.open(form("%sISDOWN.%d",syspath,node_number),fmode_create|fmode_write); + f.close(); + + exit(100); + } + + static int timeslice_count = 0; + + if(!(++timeslice_count % 20)) + DV_timeslice(); + } + + tsw_cursoron(); + + delete modem_cfg; + delete [] blank_buf; + + title_win.close(); + resp_win.close(); + lc_win.close(); + stat_win.close(); + event_win.close(); + + SCREEN.clear(); + + return (response->port<0) ? FALSE:TRUE; +} + diff --git a/backup/PB990519.ZIP b/backup/PB990519.ZIP new file mode 100644 index 0000000..22d45ff Binary files /dev/null and b/backup/PB990519.ZIP differ diff --git a/backup/PB990809.ZIP b/backup/PB990809.ZIP new file mode 100644 index 0000000..da5bfa5 Binary files /dev/null and b/backup/PB990809.ZIP differ diff --git a/c.bat b/c.bat new file mode 100644 index 0000000..8692706 --- /dev/null +++ b/c.bat @@ -0,0 +1 @@ +copy proboard.exe \bbs diff --git a/compare.bat b/compare.bat new file mode 100644 index 0000000..7723006 --- /dev/null +++ b/compare.bat @@ -0,0 +1,84 @@ +@echo off + + fc /b AKA.OBJ OBJ\AKA.OBJ >output.lst + fc /b BINLOG.OBJ OBJ\BINLOG.OBJ >>output.lst + fc /b BULLETIN.OBJ OBJ\BULLETIN.OBJ >>output.lst + fc /b CDROM.OBJ OBJ\CDROM.OBJ >>output.lst + fc /b CHAT.OBJ OBJ\CHAT.OBJ >>output.lst + fc /b CLEANUP.OBJ OBJ\CLEANUP.OBJ >>output.lst + fc /b COMBINED.OBJ OBJ\COMBINED.OBJ >>output.lst + fc /b DECKEY.OBJ OBJ\DECKEY.OBJ >>output.lst + fc /b DL.OBJ OBJ\DL.OBJ >>output.lst + fc /b EVENT.OBJ OBJ\EVENT.OBJ >>output.lst + fc /b EXECHECK.OBJ OBJ\EXECHECK.OBJ >>output.lst + fc /b FILEAREA.OBJ OBJ\FILEAREA.OBJ >>output.lst + fc /b FORWARD.OBJ OBJ\FORWARD.OBJ >>output.lst + fc /b FUZZY.OBJ OBJ\FUZZY.OBJ >>output.lst + fc /b GIF.OBJ OBJ\GIF.OBJ >>output.lst +REM fc /b HANDLER.OBJ OBJ\HANDLER.OBJ >>output.lst + fc /b HELP.OBJ OBJ\HELP.OBJ >>output.lst + fc /b HUDSON.OBJ OBJ\HUDSON.OBJ >>output.lst + fc /b IMAGE.OBJ OBJ\IMAGE.OBJ >>output.lst + fc /b INPDATE.OBJ OBJ\INPDATE.OBJ >>output.lst + fc /b IO.OBJ OBJ\IO.OBJ >>output.lst + fc /b JAM.OBJ OBJ\JAM.OBJ >>output.lst + fc /b LANGUAGE.OBJ OBJ\LANGUAGE.OBJ >>output.lst + fc /b LASTCALL.OBJ OBJ\LASTCALL.OBJ >>output.lst + fc /b LISTFILE.OBJ OBJ\LISTFILE.OBJ >>output.lst + fc /b LOADPEX.OBJ OBJ\LOADPEX.OBJ >>output.lst + fc /b LOGIN.OBJ OBJ\LOGIN.OBJ >>output.lst + fc /b MAILCHK.OBJ OBJ\MAILCHK.OBJ >>output.lst + fc /b MARK.OBJ OBJ\MARK.OBJ >>output.lst + fc /b MCHAT.OBJ OBJ\MCHAT.OBJ >>output.lst + fc /b MENU.OBJ OBJ\MENU.OBJ >>output.lst + fc /b MISC.OBJ OBJ\MISC.OBJ >>output.lst + fc /b MODEM.OBJ OBJ\MODEM.OBJ >>output.lst + fc /b MSG.OBJ OBJ\MSG.OBJ >>output.lst + fc /b MSGAREA.OBJ OBJ\MSGAREA.OBJ >>output.lst + fc /b MSGBASE.OBJ OBJ\MSGBASE.OBJ >>output.lst + fc /b MSGDEL.OBJ OBJ\MSGDEL.OBJ >>output.lst + fc /b MSGED.OBJ OBJ\MSGED.OBJ >>output.lst + fc /b MSGEXPRT.OBJ OBJ\MSGEXPRT.OBJ >>output.lst + fc /b MSGFIND.OBJ OBJ\MSGFIND.OBJ >>output.lst + fc /b MSGMOVE.OBJ OBJ\MSGMOVE.OBJ >>output.lst + fc /b MUSIC.OBJ OBJ\MUSIC.OBJ >>output.lst + fc /b NODELIST.OBJ OBJ\NODELIST.OBJ >>output.lst + fc /b ONLINE.OBJ OBJ\ONLINE.OBJ >>output.lst + fc /b PBUSER.OBJ OBJ\PBUSER.OBJ >>output.lst + fc /b POSTMSG.OBJ OBJ\POSTMSG.OBJ >>output.lst + fc /b PROBOARD.OBJ OBJ\PROBOARD.OBJ >>output.lst + fc /b PROTOCOL.OBJ OBJ\PROTOCOL.OBJ >>output.lst + fc /b QSCANMSG.OBJ OBJ\QSCANMSG.OBJ >>output.lst + fc /b QUESTION.OBJ OBJ\QUESTION.OBJ >>output.lst + fc /b RAWDIR.OBJ OBJ\RAWDIR.OBJ >>output.lst + fc /b READMSG.OBJ OBJ\READMSG.OBJ >>output.lst +REM fc /b REGIS.OBJ OBJ\REGIS.OBJ >>output.lst + fc /b REPLYMSG.OBJ OBJ\REPLYMSG.OBJ >>output.lst + fc /b RIP.OBJ OBJ\RIP.OBJ >>output.lst + fc /b SCANMSG.OBJ OBJ\SCANMSG.OBJ >>output.lst + fc /b SELLANG.OBJ OBJ\SELLANG.OBJ >>output.lst + fc /b SETAREA.OBJ OBJ\SETAREA.OBJ >>output.lst + fc /b SHELL.OBJ OBJ\SHELL.OBJ >>output.lst + fc /b SHOWANS.OBJ OBJ\SHOWANS.OBJ >>output.lst + fc /b SHOWMSG.OBJ OBJ\SHOWMSG.OBJ >>output.lst + fc /b SQUISH.OBJ OBJ\SQUISH.OBJ >>output.lst + fc /b STACKING.OBJ OBJ\STACKING.OBJ >>output.lst + fc /b STRVARS.OBJ OBJ\STRVARS.OBJ >>output.lst + fc /b SYSOPKEY.OBJ OBJ\SYSOPKEY.OBJ >>output.lst + fc /b TAG.OBJ OBJ\TAG.OBJ >>output.lst + fc /b TAG_RW.OBJ OBJ\TAG_RW.OBJ >>output.lst + fc /b TERMINAL.OBJ OBJ\TERMINAL.OBJ >>output.lst + fc /b TIMELOG.OBJ OBJ\TIMELOG.OBJ >>output.lst + fc /b TIMER.OBJ OBJ\TIMER.OBJ >>output.lst + fc /b TIMESTAT.OBJ OBJ\TIMESTAT.OBJ >>output.lst + fc /b TOPS.OBJ OBJ\TOPS.OBJ >>output.lst + fc /b UL.OBJ OBJ\UL.OBJ >>output.lst + fc /b USAGE.OBJ OBJ\USAGE.OBJ >>output.lst + fc /b USERED.OBJ OBJ\USERED.OBJ >>output.lst + fc /b USERSET.OBJ OBJ\USERSET.OBJ >>output.lst + fc /b USERWIN.OBJ OBJ\USERWIN.OBJ >>output.lst + fc /b VERSION.OBJ OBJ\VERSION.OBJ >>output.lst + fc /b VIEWFILE.OBJ OBJ\VIEWFILE.OBJ >>output.lst + fc /b WORDWRAP.OBJ OBJ\WORDWRAP.OBJ >>output.lst + fc /b WRITEMSG.OBJ OBJ\WRITEMSG.OBJ >>output.lst + fc /b ZIP.OBJ OBJ\ZIP.OBJ >>output.lst diff --git a/exec.err b/exec.err new file mode 100644 index 0000000..e6d95d7 --- /dev/null +++ b/exec.err @@ -0,0 +1,33 @@ +Turbo Assembler Version 3.1 Copyright (c) 1988, 1992 Borland International + +Assembling file: exec.asm +**Error** exec.asm(133) Illegal immediate +**Error** exec.asm(136) Need right square bracket +*Warning* exec.asm(136) [Constant] assumed to mean immediate constant +**Error** exec.asm(356) Need right square bracket +*Warning* exec.asm(356) [Constant] assumed to mean immediate constant +**Error** exec.asm(365) Need right square bracket +*Warning* exec.asm(365) [Constant] assumed to mean immediate constant +**Error** exec.asm(366) Need right square bracket +*Warning* exec.asm(366) [Constant] assumed to mean immediate constant +**Error** exec.asm(540) Illegal immediate +**Error** exec.asm(566) Need right square bracket +*Warning* exec.asm(566) Argument needs type override +**Error** exec.asm(586) Need right square bracket +*Warning* exec.asm(586) Argument needs type override +**Error** exec.asm(636) Illegal immediate +**Error** exec.asm(643) Need right square bracket +*Warning* exec.asm(643) Argument needs type override +**Error** exec.asm(653) Illegal immediate +**Error** exec.asm(660) Illegal immediate +**Error** exec.asm(842) Need right square bracket +*Warning* exec.asm(842) [Constant] assumed to mean immediate constant +**Error** exec.asm(905) Need right square bracket +*Warning* exec.asm(905) [Constant] assumed to mean immediate constant +**Error** exec.asm(907) Need right square bracket +*Warning* exec.asm(907) [Constant] assumed to mean immediate constant +Error messages: 15 +Warning messages: 10 +Passes: 1 +Remaining memory: 381k + diff --git a/files.lst b/files.lst new file mode 100644 index 0000000..f028367 --- /dev/null +++ b/files.lst @@ -0,0 +1,10 @@ +File SHELL.CPP: +File SHOWMSG.CPP: +File SQUISH.CPP: +File TIMER.CPP: +File TOPS.CPP: +File UL.CPP: +File USERED.CPP: +File USERSET.CPP: +File USERWIN.CPP: +File ZIP.CPP: diff --git a/files2.lst b/files2.lst new file mode 100644 index 0000000..72af664 --- /dev/null +++ b/files2.lst @@ -0,0 +1,85 @@ +AKA OBJ 761 11-06-98 9:36p AKA.OBJ +BINLOG OBJ 1,579 11-06-98 9:36p BINLOG.OBJ +BULLETIN OBJ 1,112 11-06-98 9:37p BULLETIN.OBJ +CDROM OBJ 3,545 11-06-98 9:36p CDROM.OBJ +CHAT OBJ 4,490 11-06-98 9:36p CHAT.OBJ +CLEANUP OBJ 3,267 11-06-98 9:36p CLEANUP.OBJ +COMBINED OBJ 2,836 11-06-98 9:36p COMBINED.OBJ +DECKEY OBJ 2,638 11-06-98 9:36p DECKEY.OBJ +DESQVIEW OBJ 339 11-06-98 9:36p DESQVIEW.OBJ +DL OBJ 27,106 11-06-98 9:36p DL.OBJ +EGA OBJ 304 11-06-98 9:36p EGA.OBJ +EVENT OBJ 1,048 11-06-98 9:36p EVENT.OBJ +EXEC OBJ 2,419 11-06-98 9:36p EXEC.OBJ +EXECHECK OBJ 335 11-06-98 9:37p EXECHECK.OBJ +FILEAREA OBJ 3,649 11-06-98 9:36p FILEAREA.OBJ +FORWARD OBJ 2,813 11-06-98 9:36p FORWARD.OBJ +FOSSIL OBJ 809 11-06-98 9:36p FOSSIL.OBJ +FUZZY OBJ 1,793 11-06-98 9:37p FUZZY.OBJ +GIF OBJ 2,467 11-06-98 9:36p GIF.OBJ +HELP OBJ 2,683 11-06-98 9:36p HELP.OBJ +HUDSON OBJ 15,481 11-06-98 9:37p HUDSON.OBJ +IMAGE OBJ 894 11-06-98 9:37p IMAGE.OBJ +INPDATE OBJ 1,095 11-06-98 9:37p INPDATE.OBJ +IO OBJ 15,910 11-06-98 9:36p IO.OBJ +JAM OBJ 14,468 11-06-98 9:37p JAM.OBJ +LANGUAGE OBJ 3,905 11-06-98 9:37p LANGUAGE.OBJ +LASTCALL OBJ 505 11-06-98 9:36p LASTCALL.OBJ +LISTFILE OBJ 19,013 11-06-98 9:36p LISTFILE.OBJ +LOADPEX OBJ 34,086 11-06-98 9:37p LOADPEX.OBJ +LOGIN OBJ 16,573 11-06-98 9:36p LOGIN.OBJ +MAILCHK OBJ 4,349 11-06-98 9:36p MAILCHK.OBJ +MARK OBJ 3,172 11-06-98 9:37p MARK.OBJ +MCHAT OBJ 5,586 11-06-98 9:36p MCHAT.OBJ +MENU OBJ 16,046 11-06-98 9:36p MENU.OBJ +MISC OBJ 8,489 11-06-98 9:36p MISC.OBJ +MODEM OBJ 11,355 11-06-98 9:37p MODEM.OBJ +MSG OBJ 7,351 11-06-98 9:36p MSG.OBJ +MSGAREA OBJ 3,322 11-06-98 9:36p MSGAREA.OBJ +MSGBASE OBJ 1,433 11-06-98 9:37p MSGBASE.OBJ +MSGDEL OBJ 487 11-06-98 9:36p MSGDEL.OBJ +MSGED OBJ 7,354 11-06-98 9:36p MSGED.OBJ +MSGEXPRT OBJ 4,828 11-06-98 9:36p MSGEXPRT.OBJ +MSGFIND OBJ 1,190 11-06-98 9:36p MSGFIND.OBJ +MSGMOVE OBJ 1,273 11-06-98 9:36p MSGMOVE.OBJ +MUSIC OBJ 1,848 11-06-98 9:36p MUSIC.OBJ +NODELIST OBJ 3,800 11-06-98 9:36p NODELIST.OBJ +ONLINE OBJ 3,646 11-06-98 9:36p ONLINE.OBJ +PBUSER OBJ 1,444 11-06-98 9:36p PBUSER.OBJ +PEXCALL OBJ 242 11-06-98 9:37p PEXCALL.OBJ +POSTMSG OBJ 1,268 11-06-98 9:37p POSTMSG.OBJ +PROBOARD OBJ 19,002 11-06-98 9:36p PROBOARD.OBJ +PROTOCOL OBJ 2,264 11-06-98 9:36p PROTOCOL.OBJ +QSCANMSG OBJ 6,498 11-06-98 9:36p QSCANMSG.OBJ +QUESTION OBJ 4,658 11-06-98 9:36p QUESTION.OBJ +RAWDIR OBJ 1,547 11-06-98 9:36p RAWDIR.OBJ +READMSG OBJ 16,076 11-06-98 9:36p READMSG.OBJ +REPLYMSG OBJ 6,524 11-06-98 9:36p REPLYMSG.OBJ +RIP OBJ 8,559 11-06-98 9:37p RIP.OBJ +SCANMSG OBJ 6,610 11-06-98 9:36p SCANMSG.OBJ +SELLANG OBJ 2,711 11-06-98 9:36p SELLANG.OBJ +SETAREA OBJ 7,949 11-06-98 9:36p SETAREA.OBJ +SHELL OBJ 15,958 11-06-98 9:36p SHELL.OBJ +SHOWANS OBJ 1,379 11-06-98 9:36p SHOWANS.OBJ +SHOWMSG OBJ 6,823 11-06-98 9:36p SHOWMSG.OBJ +SQUISH OBJ 12,267 11-06-98 9:37p SQUISH.OBJ +STACKING OBJ 562 11-06-98 9:36p STACKING.OBJ +STRVARS OBJ 6,503 11-06-98 9:37p STRVARS.OBJ +SYSOPKEY OBJ 3,217 11-06-98 9:36p SYSOPKEY.OBJ +TAG OBJ 2,173 11-06-98 9:36p TAG.OBJ +TAG_RW OBJ 1,875 11-06-98 9:37p TAG_RW.OBJ +TERMINAL OBJ 1,549 11-06-98 9:37p TERMINAL.OBJ +TIMELOG OBJ 1,663 11-06-98 9:36p TIMELOG.OBJ +TIMER OBJ 5,645 11-06-98 9:36p TIMER.OBJ +TIMESTAT OBJ 2,875 11-06-98 9:36p TIMESTAT.OBJ +TOPS OBJ 2,441 11-06-98 9:36p TOPS.OBJ +UL OBJ 20,543 11-06-98 9:36p UL.OBJ +USAGE OBJ 747 11-06-98 9:37p USAGE.OBJ +USERED OBJ 2,403 11-06-98 9:36p USERED.OBJ +USERSET OBJ 14,469 11-06-98 9:36p USERSET.OBJ +USERWIN OBJ 3,863 11-06-98 9:37p USERWIN.OBJ +VERSION OBJ 2,811 11-06-98 9:36p VERSION.OBJ +VIEWFILE OBJ 980 11-06-98 9:36p VIEWFILE.OBJ +WORDWRAP OBJ 554 11-06-98 9:36p WORDWRAP.OBJ +WRITEMSG OBJ 9,083 11-06-98 9:36p WRITEMSG.OBJ +ZIP OBJ 5,233 11-06-98 9:36p ZIP.OBJ diff --git a/fixyear/FIXYEAR.C b/fixyear/FIXYEAR.C new file mode 100644 index 0000000..261ee0a --- /dev/null +++ b/fixyear/FIXYEAR.C @@ -0,0 +1,198 @@ +#include +#include +#include +#include + + + + +#define TWO_DIGIT_CROSSOVER 10 + + + +//************************************************************************** +// +// Make sure a year value is ProBoard Y2K compliant (i.e., 1900 + 0-127) +// +// Prototype: int NormalizeYear( int iYearVal ); +// +// Parameters: iYearVal ... Input year value to adjust +// +// Returns: The "normalized" year value that is Y2K compliant +// +// Remarks: +// +// The year value that this routine returns is between 0 and 127, to +// indicate the years 1900 through 2027. 2027 will only be returned if the +// macro TWO_DIGIT_CROSSOVER is set to 28. Right now, it's set to 10, which +// will result in a return value of 0 to 109, indicating 1900 - 2009. +// +// We use this macro to allow the programmer to customize the cutoff of two- +// digit year values to suit their application's needs. +// +// This routine performs quite a number of checks on the year value. If the +// year value is negative, it converts it to positive and goes from there. +// +// If the value is a two-digit value, it checks the crossover value to +// figure out what century it's in. If it's a three-digit value, it +// considers it a freaky value and tries the best it can (it MOD's the value +// by 100, and treats the final date as a two-year value). +// +// We also check for typos here. We only consider a simple typo of the year +// 3XXX. If we find a year like this, we'll treat it as a 2XXX year. +// Anything else is treated verbatim as a legitimate 4-digit year. Anything +// after 2000+TWO_DIGIT_CROSSOVER-1 wraps over to the 1900 century. +// +// ------------------------------------------------------------------------- +// +// Created on: 06/17/99 (Jeff Reeder) +// Last modified: 06/17/99 (Jeff Reeder) Created +// +//************************************************************************** + +int NormalizeYear( int iYearVal ) +{ + //---------------------------------------------------------- + // First, check for really outrageous year values. This + // means years from 100..1899 and 2000+TWO_DIGIT_CROSSOVER.. + //---------------------------------------------------------- + + if ( iYearVal < 0 ) + { + //--------------------------------------- + // We somehow have a negative year value. + // Convert it to a positive value. + //--------------------------------------- + + iYearVal *= -1; + } + + + //--------------------------------- + // Check for outlandish year values + //--------------------------------- + + if ( iYearVal >= 3000 && + iYearVal < 3000 + TWO_DIGIT_CROSSOVER ) + { + //------------------------------------------------------- + // User must have hit 3 when they meant 2 - subtract 1000 + //------------------------------------------------------- + + iYearVal -= 1000; + } + + + if ( + iYearVal >= 100 && + ( + iYearVal < 1900 || + iYearVal >= 2000 + TWO_DIGIT_CROSSOVER + ) + ) + { + //------------------------------------------------ + // The year is more than two digits, and it's not + // in the range of 1900 - 2000+TWO_DIGIT_CROSSOVER + // + // This is a weird input ... do our best by + // converting it to a two-digit year and proceed. + //------------------------------------------------ + + iYearVal %= 100; + } + + + //-------------------------------------------- + // Now we can proceed with year normaliziation + //-------------------------------------------- + + if ( iYearVal < 100 ) + { + //----------- + // Short year + //----------- + + if ( iYearVal < TWO_DIGIT_CROSSOVER ) + { + //-------------------------------------------- + // Should be 2000...2000+TWO_DIGIT_CROSSOVER-1 + //-------------------------------------------- + + iYearVal += 100; + } + else + { + //----------------------------------------------- + // This year must be in the 1900's - The value is + // already in the proper value range. Do nothing + //----------------------------------------------- + } + } + else + { + //--------------------------------------------------- + // The year must be 1900...2000+TWO_DIGIT_CROSSOVER-1 + //--------------------------------------------------- + + if ( iYearVal < 2000 + TWO_DIGIT_CROSSOVER ) + { + //----------------------------- + // Year is between 1900 .. 1999 + //----------------------------- + + iYearVal -= 1900; + } + } + + + return iYearVal; +} + + + +void main( void ) +{ + for ( ; ; ) + { + char buf[ 256 ]; + + + printf( "\nEnter a year value (ENTER=quit): " ); + + gets( buf ); + + + if ( buf[ 0 ] == '\0' ) + { + break; + } + + + if ( isdigit( buf[ 0 ] ) || + ( + buf[ 0 ] == '-' && + isdigit( buf[ 1 ] ) + ) + ) + { + int val1; + int val2; + + + val1 = atoi( buf ); + val2 = NormalizeYear( val1 ); + + + printf( "Buffer=%-10.10s Year=%-7d NormalizedYear=%-4d RealYear=%d\n", + buf, + val1, + val2, + val2 + 1900 ); + } + else + { + printf( "\nInvalid year value\n\n" ); + } + } +} diff --git a/fixyear/FIXYEAR.EXE b/fixyear/FIXYEAR.EXE new file mode 100644 index 0000000..7a8e34e Binary files /dev/null and b/fixyear/FIXYEAR.EXE differ diff --git a/fixyear/FIXYEAR.OBJ b/fixyear/FIXYEAR.OBJ new file mode 100644 index 0000000..1c4ebbf Binary files /dev/null and b/fixyear/FIXYEAR.OBJ differ diff --git a/fuzzy2.cpp b/fuzzy2.cpp new file mode 100644 index 0000000..f07f36c --- /dev/null +++ b/fuzzy2.cpp @@ -0,0 +1,293 @@ +#include +#include +#include +#include + + + +//------------------- +// Local, static data +//------------------- + +static char *Text; // pointers to search string +static char *Pattern; // pointers to search string +static int Textloc; // current search position in Text +static int Plen; // length of Pattern +static int Degree; // max degree of allowed mismatch +static int *Ldiff; // dynamic difference array +static int *Rdiff; // dynamic difference array +static int *Loff; // used to calculate start of match +static int *Roff; // used to calculate start of match + +static int *allocated; + + + +static void near +App_init( char *pattern, + char *text, + int degree ) +{ + int i; + + + //---------------- + // save parameters + //---------------- + + Text = text; + Pattern = pattern; + Degree = degree; + + + //----------- + // initialize + //----------- + + Plen = strlen( pattern ); + Ldiff = allocated = (int *) malloc( sizeof( int ) * + ( Plen + 1 ) * 4 ); + Rdiff = Ldiff + Plen + 1; + Loff = Rdiff + Plen + 1; + Roff = Loff + Plen + 1; + + + for ( i = 0; i <= Plen; i++ ) + { + //------------------------------------- + // initial values for right-hand column + //------------------------------------- + + Rdiff[ i ] = i; + Roff [ i ] = 1; + } + + + //------------------------- + // current offset into Text + //------------------------- + + Textloc = -1; +} + + + +static void near +App_next( char **start, + char **end, + int *howclose ) +{ + int *temp; + int a; + int b; + int c; + int i; + + + *start = NULL; + + + while ( *start == NULL ) + { + //------------------------ + // start computing columns + //------------------------ + + if ( Text[ ++Textloc ] == '\0' ) + { + //----------------------- + // out of text to search! + //----------------------- + + break; + } + + + temp = Rdiff; // move right-hand column to left >> + Rdiff = Ldiff; // so that we can compute new >> + Ldiff = temp; // right-hand column + + Rdiff[ 0 ] = 0; // top (boundary) row + + + //---------------------------- + // and swap offset arrays, too + //---------------------------- + + temp = Roff; + Roff = Loff; + Loff = temp; + Roff[ 1 ] = 0; + + + for ( i = 0; i < Plen; i++ ) + { + //==================== + // Run through pattern + //==================== + + + //-------------------------------------------------- + // compute a, b, & c as the three adjacent cells ... + //-------------------------------------------------- + + if ( toupper( Pattern[ i ] ) == toupper( Text[ Textloc ] ) ) + { + a = Ldiff[ i ]; + } + else + { + a = Ldiff[ i ] + 1; + } + + + b = Ldiff[ i + 1 ] + 1; + c = Rdiff[ i ] + 1; + + + //----------------- + // now pick minimum + //----------------- + + if ( b < a ) + { + a = b; + } + + + if ( c < a ) + { + a = c; + } + + + //---------- + // and store + //---------- + + Rdiff[ i + 1] = a; + } + + + //======================== + // Now update offset array + //======================== + + + //------------------------------------------------- + // the values in the offset arrays are added to the + // current location to determine the beginning of + // the mismatched substring. (see text for details) + //------------------------------------------------- + + if ( Plen > 1 ) + { + for ( i = 2; i <= Plen; i++ ) + { + if ( Ldiff[ i - 1 ] < Rdiff[ i ] ) + { + Roff[ i ] = Loff[ i - 1 ] - 1; + } + else if ( Rdiff[ i - 1 ] < Rdiff[ i ] ) + { + Roff[ i ] = Roff[ i - 1 ]; + } + else if ( Ldiff[ i ] < Rdiff[ i ] ) + { + Roff[ i ] = Loff[ i ] - 1; + } + else + { + // Ldiff[ i-1] == Rdiff[i] + + Roff[ i ] = Loff[ i - 1 ] - 1; + } + } + } + + + //-------------------------------------- + // now, do we have an approximate match? + //-------------------------------------- + + if ( Rdiff[ Plen ] <= Degree ) + { + //----------- + // indeed so! + //----------- + + *end = Text + Textloc; + *start = *end + Roff[ Plen ]; + *howclose = Rdiff[ Plen ]; + } + } +} + + + +void +App_End() +{ + free( allocated ); +} + + + +int +fuzzy_search( char *pattern, + char *text, + int degree ) +{ + int min = 0x7FFF; + int howclose; + char *begin; + char *end; + + + degree = ( + strlen( pattern ) * ( 100 - degree ) + ) + / 100; + + + App_init( pattern, + text, + degree ); + + App_next( & begin, + & end, + & howclose ); + + + while( begin ) + { + if ( howclose < min ) + { + min = howclose; + } + + + App_next( & begin, + & end, + & howclose ); + } + + + App_End(); + + + if ( min <= degree ) + { + return ( + ( + strlen( pattern ) - degree + ) + * 100 + ) + / strlen( pattern ); + } + else + { + return -1; + } +} diff --git a/loadadf.bat b/loadadf.bat new file mode 100644 index 0000000..2bb3240 --- /dev/null +++ b/loadadf.bat @@ -0,0 +1,28 @@ +@echo off +rem +rem Loading ADF for COM1 +rem +rem ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄCOM-port number, COM1-COM127. +rem ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄAddress in hex of COM-port, 0-FFFF. +rem ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄIRQ number of COM-port, 0-15. +rem ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄLocked baud-rate, 1-115200. +rem ³ ³ ³ ³ ÚÄÄÄÄÄÄÄÄÄÄSize of receive buffer, 256-16384. +rem ³ ³ ³ ³ ³ ÚÄÄÄÄSize of transmit buffer, 256-16384. +rem ³ ³ ³ ³ ³ ³ ÚÄReceiver FIFO trigger level, 1, 4, 8, 14. +rem ³ ³ ³ ³ ³ ³ ³ +adf COM1 3F8 4 57600 4096 4096 8 +rem ³ ³ +rem ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ +rem ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÙ Advanced options: +rem ³ ³ +rem 4096,3584,3072 16650,16,8 3 11 +rem ³ ³ ³ ³ ³ ³ +rem ³ ³ ³ ³ ³ ÀÄ Modem Control Register. +rem ³ ³ ³ ³ ÀÄÄÄÄÄ Line Control Register. +rem ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄ 16650 Transmit FIFO trigger level: +rem ³ ³ ³ 8, 16, 24 or 30. +rem ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄ 16650 Receive FIFO trigger level: +rem ³ ³ 8, 16, 24 or 28. +rem ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Flow control continue or restart. +rem ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Flow control hold or stop. +rem diff --git a/ma.bat b/ma.bat new file mode 100644 index 0000000..e445300 --- /dev/null +++ b/ma.bat @@ -0,0 +1,3 @@ +@echo off + +tasm /o /mx /dMEM_MOD=LARGE %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/makeall.bat b/makeall.bat new file mode 100644 index 0000000..4fe01de --- /dev/null +++ b/makeall.bat @@ -0,0 +1,3 @@ +@echo off + +call mc.bat *.cpp diff --git a/mc.bat b/mc.bat new file mode 100644 index 0000000..9d441c2 --- /dev/null +++ b/mc.bat @@ -0,0 +1,5 @@ +@echo off + +echo Compiling %1 %2 %3 %4 %5 %6 %7 %8 %9 + +bcc @mc.cfg %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/new_obj/AKA.OBJ b/new_obj/AKA.OBJ new file mode 100644 index 0000000..053e888 Binary files /dev/null and b/new_obj/AKA.OBJ differ diff --git a/new_obj/BINLOG.OBJ b/new_obj/BINLOG.OBJ new file mode 100644 index 0000000..5ecb6d7 Binary files /dev/null and b/new_obj/BINLOG.OBJ differ diff --git a/new_obj/BULLETIN.OBJ b/new_obj/BULLETIN.OBJ new file mode 100644 index 0000000..416d04d Binary files /dev/null and b/new_obj/BULLETIN.OBJ differ diff --git a/new_obj/CDROM.OBJ b/new_obj/CDROM.OBJ new file mode 100644 index 0000000..f7b651f Binary files /dev/null and b/new_obj/CDROM.OBJ differ diff --git a/new_obj/CHAT.OBJ b/new_obj/CHAT.OBJ new file mode 100644 index 0000000..837911c Binary files /dev/null and b/new_obj/CHAT.OBJ differ diff --git a/new_obj/CLEANUP.OBJ b/new_obj/CLEANUP.OBJ new file mode 100644 index 0000000..78568cd Binary files /dev/null and b/new_obj/CLEANUP.OBJ differ diff --git a/new_obj/COMBINED.OBJ b/new_obj/COMBINED.OBJ new file mode 100644 index 0000000..ee9cff6 Binary files /dev/null and b/new_obj/COMBINED.OBJ differ diff --git a/new_obj/DECKEY.OBJ b/new_obj/DECKEY.OBJ new file mode 100644 index 0000000..e700624 Binary files /dev/null and b/new_obj/DECKEY.OBJ differ diff --git a/new_obj/DESQVIEW.OBJ b/new_obj/DESQVIEW.OBJ new file mode 100644 index 0000000..ddb8137 Binary files /dev/null and b/new_obj/DESQVIEW.OBJ differ diff --git a/new_obj/DL.OBJ b/new_obj/DL.OBJ new file mode 100644 index 0000000..7fc8650 Binary files /dev/null and b/new_obj/DL.OBJ differ diff --git a/new_obj/EGA.OBJ b/new_obj/EGA.OBJ new file mode 100644 index 0000000..6f6b08b Binary files /dev/null and b/new_obj/EGA.OBJ differ diff --git a/new_obj/EVENT.OBJ b/new_obj/EVENT.OBJ new file mode 100644 index 0000000..544d268 Binary files /dev/null and b/new_obj/EVENT.OBJ differ diff --git a/new_obj/EXEC.OBJ b/new_obj/EXEC.OBJ new file mode 100644 index 0000000..5f7d041 Binary files /dev/null and b/new_obj/EXEC.OBJ differ diff --git a/new_obj/EXECHECK.OBJ b/new_obj/EXECHECK.OBJ new file mode 100644 index 0000000..16e9b43 Binary files /dev/null and b/new_obj/EXECHECK.OBJ differ diff --git a/new_obj/FILEAREA.OBJ b/new_obj/FILEAREA.OBJ new file mode 100644 index 0000000..d99480c Binary files /dev/null and b/new_obj/FILEAREA.OBJ differ diff --git a/new_obj/FORWARD.OBJ b/new_obj/FORWARD.OBJ new file mode 100644 index 0000000..5a8daef Binary files /dev/null and b/new_obj/FORWARD.OBJ differ diff --git a/new_obj/FOSSIL.OBJ b/new_obj/FOSSIL.OBJ new file mode 100644 index 0000000..b8751e8 Binary files /dev/null and b/new_obj/FOSSIL.OBJ differ diff --git a/new_obj/FUZZY.OBJ b/new_obj/FUZZY.OBJ new file mode 100644 index 0000000..0e2353c Binary files /dev/null and b/new_obj/FUZZY.OBJ differ diff --git a/new_obj/GIF.OBJ b/new_obj/GIF.OBJ new file mode 100644 index 0000000..b3e7669 Binary files /dev/null and b/new_obj/GIF.OBJ differ diff --git a/new_obj/HELP.OBJ b/new_obj/HELP.OBJ new file mode 100644 index 0000000..44b504c Binary files /dev/null and b/new_obj/HELP.OBJ differ diff --git a/new_obj/HUDSON.OBJ b/new_obj/HUDSON.OBJ new file mode 100644 index 0000000..eb0dbfe Binary files /dev/null and b/new_obj/HUDSON.OBJ differ diff --git a/new_obj/IMAGE.OBJ b/new_obj/IMAGE.OBJ new file mode 100644 index 0000000..50f2e50 Binary files /dev/null and b/new_obj/IMAGE.OBJ differ diff --git a/new_obj/INPDATE.OBJ b/new_obj/INPDATE.OBJ new file mode 100644 index 0000000..fc836b9 Binary files /dev/null and b/new_obj/INPDATE.OBJ differ diff --git a/new_obj/IO.OBJ b/new_obj/IO.OBJ new file mode 100644 index 0000000..7795640 Binary files /dev/null and b/new_obj/IO.OBJ differ diff --git a/new_obj/JAM.OBJ b/new_obj/JAM.OBJ new file mode 100644 index 0000000..a371bf0 Binary files /dev/null and b/new_obj/JAM.OBJ differ diff --git a/new_obj/LANGUAGE.OBJ b/new_obj/LANGUAGE.OBJ new file mode 100644 index 0000000..dbc29ff Binary files /dev/null and b/new_obj/LANGUAGE.OBJ differ diff --git a/new_obj/LASTCALL.OBJ b/new_obj/LASTCALL.OBJ new file mode 100644 index 0000000..f4bf685 Binary files /dev/null and b/new_obj/LASTCALL.OBJ differ diff --git a/new_obj/LISTFILE.OBJ b/new_obj/LISTFILE.OBJ new file mode 100644 index 0000000..48fe7d4 Binary files /dev/null and b/new_obj/LISTFILE.OBJ differ diff --git a/new_obj/LOADPEX.OBJ b/new_obj/LOADPEX.OBJ new file mode 100644 index 0000000..f4d23b4 Binary files /dev/null and b/new_obj/LOADPEX.OBJ differ diff --git a/new_obj/LOGIN.OBJ b/new_obj/LOGIN.OBJ new file mode 100644 index 0000000..7c4be50 Binary files /dev/null and b/new_obj/LOGIN.OBJ differ diff --git a/new_obj/MAILCHK.OBJ b/new_obj/MAILCHK.OBJ new file mode 100644 index 0000000..2194c13 Binary files /dev/null and b/new_obj/MAILCHK.OBJ differ diff --git a/new_obj/MARK.OBJ b/new_obj/MARK.OBJ new file mode 100644 index 0000000..c18df58 Binary files /dev/null and b/new_obj/MARK.OBJ differ diff --git a/new_obj/MCHAT.OBJ b/new_obj/MCHAT.OBJ new file mode 100644 index 0000000..9df8b68 Binary files /dev/null and b/new_obj/MCHAT.OBJ differ diff --git a/new_obj/MENU.OBJ b/new_obj/MENU.OBJ new file mode 100644 index 0000000..c04c568 Binary files /dev/null and b/new_obj/MENU.OBJ differ diff --git a/new_obj/MISC.OBJ b/new_obj/MISC.OBJ new file mode 100644 index 0000000..8c1c4c0 Binary files /dev/null and b/new_obj/MISC.OBJ differ diff --git a/new_obj/MODEM.OBJ b/new_obj/MODEM.OBJ new file mode 100644 index 0000000..294a87f Binary files /dev/null and b/new_obj/MODEM.OBJ differ diff --git a/new_obj/MSG.OBJ b/new_obj/MSG.OBJ new file mode 100644 index 0000000..69a1cf0 Binary files /dev/null and b/new_obj/MSG.OBJ differ diff --git a/new_obj/MSGAREA.OBJ b/new_obj/MSGAREA.OBJ new file mode 100644 index 0000000..42718a9 Binary files /dev/null and b/new_obj/MSGAREA.OBJ differ diff --git a/new_obj/MSGBASE.OBJ b/new_obj/MSGBASE.OBJ new file mode 100644 index 0000000..cf9bd47 Binary files /dev/null and b/new_obj/MSGBASE.OBJ differ diff --git a/new_obj/MSGDEL.OBJ b/new_obj/MSGDEL.OBJ new file mode 100644 index 0000000..d5b6551 Binary files /dev/null and b/new_obj/MSGDEL.OBJ differ diff --git a/new_obj/MSGED.OBJ b/new_obj/MSGED.OBJ new file mode 100644 index 0000000..f13cf06 Binary files /dev/null and b/new_obj/MSGED.OBJ differ diff --git a/new_obj/MSGEXPRT.OBJ b/new_obj/MSGEXPRT.OBJ new file mode 100644 index 0000000..a5251a8 Binary files /dev/null and b/new_obj/MSGEXPRT.OBJ differ diff --git a/new_obj/MSGFIND.OBJ b/new_obj/MSGFIND.OBJ new file mode 100644 index 0000000..dee583c Binary files /dev/null and b/new_obj/MSGFIND.OBJ differ diff --git a/new_obj/MSGMOVE.OBJ b/new_obj/MSGMOVE.OBJ new file mode 100644 index 0000000..85ec34c Binary files /dev/null and b/new_obj/MSGMOVE.OBJ differ diff --git a/new_obj/MUSIC.OBJ b/new_obj/MUSIC.OBJ new file mode 100644 index 0000000..8d88ed0 Binary files /dev/null and b/new_obj/MUSIC.OBJ differ diff --git a/new_obj/NODELIST.OBJ b/new_obj/NODELIST.OBJ new file mode 100644 index 0000000..2d5db03 Binary files /dev/null and b/new_obj/NODELIST.OBJ differ diff --git a/new_obj/ONLINE.OBJ b/new_obj/ONLINE.OBJ new file mode 100644 index 0000000..c46f1a8 Binary files /dev/null and b/new_obj/ONLINE.OBJ differ diff --git a/new_obj/PBUSER.OBJ b/new_obj/PBUSER.OBJ new file mode 100644 index 0000000..155d70b Binary files /dev/null and b/new_obj/PBUSER.OBJ differ diff --git a/new_obj/PEXCALL.OBJ b/new_obj/PEXCALL.OBJ new file mode 100644 index 0000000..f6d3b58 Binary files /dev/null and b/new_obj/PEXCALL.OBJ differ diff --git a/new_obj/POSTMSG.OBJ b/new_obj/POSTMSG.OBJ new file mode 100644 index 0000000..2277f0b Binary files /dev/null and b/new_obj/POSTMSG.OBJ differ diff --git a/new_obj/PROBOARD.EXE b/new_obj/PROBOARD.EXE new file mode 100644 index 0000000..782aee4 Binary files /dev/null and b/new_obj/PROBOARD.EXE differ diff --git a/new_obj/PROBOARD.OBJ b/new_obj/PROBOARD.OBJ new file mode 100644 index 0000000..3a23c44 Binary files /dev/null and b/new_obj/PROBOARD.OBJ differ diff --git a/new_obj/PROTOCOL.OBJ b/new_obj/PROTOCOL.OBJ new file mode 100644 index 0000000..6f8d492 Binary files /dev/null and b/new_obj/PROTOCOL.OBJ differ diff --git a/new_obj/QSCANMSG.OBJ b/new_obj/QSCANMSG.OBJ new file mode 100644 index 0000000..82d9da7 Binary files /dev/null and b/new_obj/QSCANMSG.OBJ differ diff --git a/new_obj/QUESTION.OBJ b/new_obj/QUESTION.OBJ new file mode 100644 index 0000000..16e1fba Binary files /dev/null and b/new_obj/QUESTION.OBJ differ diff --git a/new_obj/RAWDIR.OBJ b/new_obj/RAWDIR.OBJ new file mode 100644 index 0000000..34defb0 Binary files /dev/null and b/new_obj/RAWDIR.OBJ differ diff --git a/new_obj/READMSG.OBJ b/new_obj/READMSG.OBJ new file mode 100644 index 0000000..da8dabf Binary files /dev/null and b/new_obj/READMSG.OBJ differ diff --git a/new_obj/REGIS.OBJ b/new_obj/REGIS.OBJ new file mode 100644 index 0000000..86ba90a Binary files /dev/null and b/new_obj/REGIS.OBJ differ diff --git a/new_obj/REPLYMSG.OBJ b/new_obj/REPLYMSG.OBJ new file mode 100644 index 0000000..3c73859 Binary files /dev/null and b/new_obj/REPLYMSG.OBJ differ diff --git a/new_obj/RIP.OBJ b/new_obj/RIP.OBJ new file mode 100644 index 0000000..80a8f38 Binary files /dev/null and b/new_obj/RIP.OBJ differ diff --git a/new_obj/SCANMSG.OBJ b/new_obj/SCANMSG.OBJ new file mode 100644 index 0000000..cdd3d07 Binary files /dev/null and b/new_obj/SCANMSG.OBJ differ diff --git a/new_obj/SELLANG.OBJ b/new_obj/SELLANG.OBJ new file mode 100644 index 0000000..8a62dfb Binary files /dev/null and b/new_obj/SELLANG.OBJ differ diff --git a/new_obj/SETAREA.OBJ b/new_obj/SETAREA.OBJ new file mode 100644 index 0000000..cdc2b02 Binary files /dev/null and b/new_obj/SETAREA.OBJ differ diff --git a/new_obj/SHELL.OBJ b/new_obj/SHELL.OBJ new file mode 100644 index 0000000..a62b5ec Binary files /dev/null and b/new_obj/SHELL.OBJ differ diff --git a/new_obj/SHOWANS.OBJ b/new_obj/SHOWANS.OBJ new file mode 100644 index 0000000..2982799 Binary files /dev/null and b/new_obj/SHOWANS.OBJ differ diff --git a/new_obj/SHOWMSG.OBJ b/new_obj/SHOWMSG.OBJ new file mode 100644 index 0000000..8619191 Binary files /dev/null and b/new_obj/SHOWMSG.OBJ differ diff --git a/new_obj/SQUISH.OBJ b/new_obj/SQUISH.OBJ new file mode 100644 index 0000000..08eea0f Binary files /dev/null and b/new_obj/SQUISH.OBJ differ diff --git a/new_obj/STACKING.OBJ b/new_obj/STACKING.OBJ new file mode 100644 index 0000000..56087ad Binary files /dev/null and b/new_obj/STACKING.OBJ differ diff --git a/new_obj/STRVARS.OBJ b/new_obj/STRVARS.OBJ new file mode 100644 index 0000000..a175371 Binary files /dev/null and b/new_obj/STRVARS.OBJ differ diff --git a/new_obj/SYSOPKEY.OBJ b/new_obj/SYSOPKEY.OBJ new file mode 100644 index 0000000..60d7621 Binary files /dev/null and b/new_obj/SYSOPKEY.OBJ differ diff --git a/new_obj/TAG.OBJ b/new_obj/TAG.OBJ new file mode 100644 index 0000000..7a44ee6 Binary files /dev/null and b/new_obj/TAG.OBJ differ diff --git a/new_obj/TAG_RW.OBJ b/new_obj/TAG_RW.OBJ new file mode 100644 index 0000000..f0c5363 Binary files /dev/null and b/new_obj/TAG_RW.OBJ differ diff --git a/new_obj/TERMINAL.OBJ b/new_obj/TERMINAL.OBJ new file mode 100644 index 0000000..f087a02 Binary files /dev/null and b/new_obj/TERMINAL.OBJ differ diff --git a/new_obj/TIMELOG.OBJ b/new_obj/TIMELOG.OBJ new file mode 100644 index 0000000..b7de5f6 Binary files /dev/null and b/new_obj/TIMELOG.OBJ differ diff --git a/new_obj/TIMER.OBJ b/new_obj/TIMER.OBJ new file mode 100644 index 0000000..948a4a4 Binary files /dev/null and b/new_obj/TIMER.OBJ differ diff --git a/new_obj/TIMESTAT.OBJ b/new_obj/TIMESTAT.OBJ new file mode 100644 index 0000000..1148098 Binary files /dev/null and b/new_obj/TIMESTAT.OBJ differ diff --git a/new_obj/TOPS.OBJ b/new_obj/TOPS.OBJ new file mode 100644 index 0000000..a6d329d Binary files /dev/null and b/new_obj/TOPS.OBJ differ diff --git a/new_obj/UL.OBJ b/new_obj/UL.OBJ new file mode 100644 index 0000000..b6f540a Binary files /dev/null and b/new_obj/UL.OBJ differ diff --git a/new_obj/USAGE.OBJ b/new_obj/USAGE.OBJ new file mode 100644 index 0000000..22cfb16 Binary files /dev/null and b/new_obj/USAGE.OBJ differ diff --git a/new_obj/USERED.OBJ b/new_obj/USERED.OBJ new file mode 100644 index 0000000..cd478af Binary files /dev/null and b/new_obj/USERED.OBJ differ diff --git a/new_obj/USERSET.OBJ b/new_obj/USERSET.OBJ new file mode 100644 index 0000000..e5b75a4 Binary files /dev/null and b/new_obj/USERSET.OBJ differ diff --git a/new_obj/USERWIN.OBJ b/new_obj/USERWIN.OBJ new file mode 100644 index 0000000..422887c Binary files /dev/null and b/new_obj/USERWIN.OBJ differ diff --git a/new_obj/VERSION.OBJ b/new_obj/VERSION.OBJ new file mode 100644 index 0000000..2e31234 Binary files /dev/null and b/new_obj/VERSION.OBJ differ diff --git a/new_obj/VIEWFILE.OBJ b/new_obj/VIEWFILE.OBJ new file mode 100644 index 0000000..363ead4 Binary files /dev/null and b/new_obj/VIEWFILE.OBJ differ diff --git a/new_obj/WORDWRAP.OBJ b/new_obj/WORDWRAP.OBJ new file mode 100644 index 0000000..7aa7dc4 Binary files /dev/null and b/new_obj/WORDWRAP.OBJ differ diff --git a/new_obj/WRITEMSG.OBJ b/new_obj/WRITEMSG.OBJ new file mode 100644 index 0000000..830b6bd Binary files /dev/null and b/new_obj/WRITEMSG.OBJ differ diff --git a/new_obj/ZIP.OBJ b/new_obj/ZIP.OBJ new file mode 100644 index 0000000..c754d51 Binary files /dev/null and b/new_obj/ZIP.OBJ differ diff --git a/obj/AKA.OBJ b/obj/AKA.OBJ new file mode 100644 index 0000000..053e888 Binary files /dev/null and b/obj/AKA.OBJ differ diff --git a/obj/BINLOG.OBJ b/obj/BINLOG.OBJ new file mode 100644 index 0000000..5ecb6d7 Binary files /dev/null and b/obj/BINLOG.OBJ differ diff --git a/obj/BULLETIN.OBJ b/obj/BULLETIN.OBJ new file mode 100644 index 0000000..416d04d Binary files /dev/null and b/obj/BULLETIN.OBJ differ diff --git a/obj/CDROM.OBJ b/obj/CDROM.OBJ new file mode 100644 index 0000000..f7b651f Binary files /dev/null and b/obj/CDROM.OBJ differ diff --git a/obj/CHAT.OBJ b/obj/CHAT.OBJ new file mode 100644 index 0000000..735ed2e Binary files /dev/null and b/obj/CHAT.OBJ differ diff --git a/obj/CLEANUP.OBJ b/obj/CLEANUP.OBJ new file mode 100644 index 0000000..7969a7a Binary files /dev/null and b/obj/CLEANUP.OBJ differ diff --git a/obj/COMBINED.OBJ b/obj/COMBINED.OBJ new file mode 100644 index 0000000..ee9cff6 Binary files /dev/null and b/obj/COMBINED.OBJ differ diff --git a/obj/DECKEY.OBJ b/obj/DECKEY.OBJ new file mode 100644 index 0000000..e700624 Binary files /dev/null and b/obj/DECKEY.OBJ differ diff --git a/obj/DESQVIEW.OBJ b/obj/DESQVIEW.OBJ new file mode 100644 index 0000000..ddb8137 Binary files /dev/null and b/obj/DESQVIEW.OBJ differ diff --git a/obj/DL.OBJ b/obj/DL.OBJ new file mode 100644 index 0000000..7fc8650 Binary files /dev/null and b/obj/DL.OBJ differ diff --git a/obj/EGA.OBJ b/obj/EGA.OBJ new file mode 100644 index 0000000..6f6b08b Binary files /dev/null and b/obj/EGA.OBJ differ diff --git a/obj/EVENT.OBJ b/obj/EVENT.OBJ new file mode 100644 index 0000000..544d268 Binary files /dev/null and b/obj/EVENT.OBJ differ diff --git a/obj/EXEC.OBJ b/obj/EXEC.OBJ new file mode 100644 index 0000000..5f7d041 Binary files /dev/null and b/obj/EXEC.OBJ differ diff --git a/obj/EXECHECK.OBJ b/obj/EXECHECK.OBJ new file mode 100644 index 0000000..16e9b43 Binary files /dev/null and b/obj/EXECHECK.OBJ differ diff --git a/obj/FILEAREA.OBJ b/obj/FILEAREA.OBJ new file mode 100644 index 0000000..d99480c Binary files /dev/null and b/obj/FILEAREA.OBJ differ diff --git a/obj/FORWARD.OBJ b/obj/FORWARD.OBJ new file mode 100644 index 0000000..f4a71e1 Binary files /dev/null and b/obj/FORWARD.OBJ differ diff --git a/obj/FOSSIL.OBJ b/obj/FOSSIL.OBJ new file mode 100644 index 0000000..b8751e8 Binary files /dev/null and b/obj/FOSSIL.OBJ differ diff --git a/obj/FUZZY.OBJ b/obj/FUZZY.OBJ new file mode 100644 index 0000000..0e2353c Binary files /dev/null and b/obj/FUZZY.OBJ differ diff --git a/obj/GIF.OBJ b/obj/GIF.OBJ new file mode 100644 index 0000000..b3e7669 Binary files /dev/null and b/obj/GIF.OBJ differ diff --git a/obj/HELP.OBJ b/obj/HELP.OBJ new file mode 100644 index 0000000..5358a3b Binary files /dev/null and b/obj/HELP.OBJ differ diff --git a/obj/HUDSON.OBJ b/obj/HUDSON.OBJ new file mode 100644 index 0000000..c11fbeb Binary files /dev/null and b/obj/HUDSON.OBJ differ diff --git a/obj/IMAGE.OBJ b/obj/IMAGE.OBJ new file mode 100644 index 0000000..58abb08 Binary files /dev/null and b/obj/IMAGE.OBJ differ diff --git a/obj/INPDATE.OBJ b/obj/INPDATE.OBJ new file mode 100644 index 0000000..483ef74 Binary files /dev/null and b/obj/INPDATE.OBJ differ diff --git a/obj/IO.OBJ b/obj/IO.OBJ new file mode 100644 index 0000000..c17749c Binary files /dev/null and b/obj/IO.OBJ differ diff --git a/obj/JAM.OBJ b/obj/JAM.OBJ new file mode 100644 index 0000000..deaa6e7 Binary files /dev/null and b/obj/JAM.OBJ differ diff --git a/obj/LANGUAGE.OBJ b/obj/LANGUAGE.OBJ new file mode 100644 index 0000000..dbc29ff Binary files /dev/null and b/obj/LANGUAGE.OBJ differ diff --git a/obj/LASTCALL.OBJ b/obj/LASTCALL.OBJ new file mode 100644 index 0000000..f4bf685 Binary files /dev/null and b/obj/LASTCALL.OBJ differ diff --git a/obj/LISTFILE.OBJ b/obj/LISTFILE.OBJ new file mode 100644 index 0000000..bbe4e5f Binary files /dev/null and b/obj/LISTFILE.OBJ differ diff --git a/obj/LOADPEX.OBJ b/obj/LOADPEX.OBJ new file mode 100644 index 0000000..166fb72 Binary files /dev/null and b/obj/LOADPEX.OBJ differ diff --git a/obj/LOGIN.OBJ b/obj/LOGIN.OBJ new file mode 100644 index 0000000..699e17a Binary files /dev/null and b/obj/LOGIN.OBJ differ diff --git a/obj/MAILCHK.OBJ b/obj/MAILCHK.OBJ new file mode 100644 index 0000000..dd422b3 Binary files /dev/null and b/obj/MAILCHK.OBJ differ diff --git a/obj/MARK.OBJ b/obj/MARK.OBJ new file mode 100644 index 0000000..c18df58 Binary files /dev/null and b/obj/MARK.OBJ differ diff --git a/obj/MCHAT.OBJ b/obj/MCHAT.OBJ new file mode 100644 index 0000000..9df8b68 Binary files /dev/null and b/obj/MCHAT.OBJ differ diff --git a/obj/MENU.OBJ b/obj/MENU.OBJ new file mode 100644 index 0000000..c04c568 Binary files /dev/null and b/obj/MENU.OBJ differ diff --git a/obj/MISC.OBJ b/obj/MISC.OBJ new file mode 100644 index 0000000..70e52b9 Binary files /dev/null and b/obj/MISC.OBJ differ diff --git a/obj/MODEM.OBJ b/obj/MODEM.OBJ new file mode 100644 index 0000000..092dbf9 Binary files /dev/null and b/obj/MODEM.OBJ differ diff --git a/obj/MSG.OBJ b/obj/MSG.OBJ new file mode 100644 index 0000000..0292efe Binary files /dev/null and b/obj/MSG.OBJ differ diff --git a/obj/MSGAREA.OBJ b/obj/MSGAREA.OBJ new file mode 100644 index 0000000..42718a9 Binary files /dev/null and b/obj/MSGAREA.OBJ differ diff --git a/obj/MSGBASE.OBJ b/obj/MSGBASE.OBJ new file mode 100644 index 0000000..cf9bd47 Binary files /dev/null and b/obj/MSGBASE.OBJ differ diff --git a/obj/MSGDEL.OBJ b/obj/MSGDEL.OBJ new file mode 100644 index 0000000..d5b6551 Binary files /dev/null and b/obj/MSGDEL.OBJ differ diff --git a/obj/MSGED.OBJ b/obj/MSGED.OBJ new file mode 100644 index 0000000..f13cf06 Binary files /dev/null and b/obj/MSGED.OBJ differ diff --git a/obj/MSGEXPRT.OBJ b/obj/MSGEXPRT.OBJ new file mode 100644 index 0000000..a2e1946 Binary files /dev/null and b/obj/MSGEXPRT.OBJ differ diff --git a/obj/MSGFIND.OBJ b/obj/MSGFIND.OBJ new file mode 100644 index 0000000..dee583c Binary files /dev/null and b/obj/MSGFIND.OBJ differ diff --git a/obj/MSGMOVE.OBJ b/obj/MSGMOVE.OBJ new file mode 100644 index 0000000..85ec34c Binary files /dev/null and b/obj/MSGMOVE.OBJ differ diff --git a/obj/MUSIC.OBJ b/obj/MUSIC.OBJ new file mode 100644 index 0000000..8d88ed0 Binary files /dev/null and b/obj/MUSIC.OBJ differ diff --git a/obj/NODELIST.OBJ b/obj/NODELIST.OBJ new file mode 100644 index 0000000..2d5db03 Binary files /dev/null and b/obj/NODELIST.OBJ differ diff --git a/obj/ONLINE.OBJ b/obj/ONLINE.OBJ new file mode 100644 index 0000000..c46f1a8 Binary files /dev/null and b/obj/ONLINE.OBJ differ diff --git a/obj/PBUSER.OBJ b/obj/PBUSER.OBJ new file mode 100644 index 0000000..bf8bb4a Binary files /dev/null and b/obj/PBUSER.OBJ differ diff --git a/obj/PEXCALL.OBJ b/obj/PEXCALL.OBJ new file mode 100644 index 0000000..f6d3b58 Binary files /dev/null and b/obj/PEXCALL.OBJ differ diff --git a/obj/POSTMSG.OBJ b/obj/POSTMSG.OBJ new file mode 100644 index 0000000..2277f0b Binary files /dev/null and b/obj/POSTMSG.OBJ differ diff --git a/obj/PROBOARD.OBJ b/obj/PROBOARD.OBJ new file mode 100644 index 0000000..79a9639 Binary files /dev/null and b/obj/PROBOARD.OBJ differ diff --git a/obj/PROTOCOL.OBJ b/obj/PROTOCOL.OBJ new file mode 100644 index 0000000..6f8d492 Binary files /dev/null and b/obj/PROTOCOL.OBJ differ diff --git a/obj/QSCANMSG.OBJ b/obj/QSCANMSG.OBJ new file mode 100644 index 0000000..82d9da7 Binary files /dev/null and b/obj/QSCANMSG.OBJ differ diff --git a/obj/QUESTION.OBJ b/obj/QUESTION.OBJ new file mode 100644 index 0000000..1ec759a Binary files /dev/null and b/obj/QUESTION.OBJ differ diff --git a/obj/RAWDIR.OBJ b/obj/RAWDIR.OBJ new file mode 100644 index 0000000..d7cd38e Binary files /dev/null and b/obj/RAWDIR.OBJ differ diff --git a/obj/READMSG.OBJ b/obj/READMSG.OBJ new file mode 100644 index 0000000..da8dabf Binary files /dev/null and b/obj/READMSG.OBJ differ diff --git a/obj/REPLYMSG.OBJ b/obj/REPLYMSG.OBJ new file mode 100644 index 0000000..3c73859 Binary files /dev/null and b/obj/REPLYMSG.OBJ differ diff --git a/obj/RIP.OBJ b/obj/RIP.OBJ new file mode 100644 index 0000000..08c46d6 Binary files /dev/null and b/obj/RIP.OBJ differ diff --git a/obj/SCANMSG.OBJ b/obj/SCANMSG.OBJ new file mode 100644 index 0000000..cdd3d07 Binary files /dev/null and b/obj/SCANMSG.OBJ differ diff --git a/obj/SELLANG.OBJ b/obj/SELLANG.OBJ new file mode 100644 index 0000000..8a62dfb Binary files /dev/null and b/obj/SELLANG.OBJ differ diff --git a/obj/SETAREA.OBJ b/obj/SETAREA.OBJ new file mode 100644 index 0000000..cdc2b02 Binary files /dev/null and b/obj/SETAREA.OBJ differ diff --git a/obj/SHELL.OBJ b/obj/SHELL.OBJ new file mode 100644 index 0000000..bd12f46 Binary files /dev/null and b/obj/SHELL.OBJ differ diff --git a/obj/SHOWANS.OBJ b/obj/SHOWANS.OBJ new file mode 100644 index 0000000..b995062 Binary files /dev/null and b/obj/SHOWANS.OBJ differ diff --git a/obj/SHOWMSG.OBJ b/obj/SHOWMSG.OBJ new file mode 100644 index 0000000..f0857fe Binary files /dev/null and b/obj/SHOWMSG.OBJ differ diff --git a/obj/SQUISH.OBJ b/obj/SQUISH.OBJ new file mode 100644 index 0000000..8079840 Binary files /dev/null and b/obj/SQUISH.OBJ differ diff --git a/obj/STACKING.OBJ b/obj/STACKING.OBJ new file mode 100644 index 0000000..56087ad Binary files /dev/null and b/obj/STACKING.OBJ differ diff --git a/obj/STRVARS.OBJ b/obj/STRVARS.OBJ new file mode 100644 index 0000000..d6ab187 Binary files /dev/null and b/obj/STRVARS.OBJ differ diff --git a/obj/SYSOPKEY.OBJ b/obj/SYSOPKEY.OBJ new file mode 100644 index 0000000..60d7621 Binary files /dev/null and b/obj/SYSOPKEY.OBJ differ diff --git a/obj/TAG.OBJ b/obj/TAG.OBJ new file mode 100644 index 0000000..7a44ee6 Binary files /dev/null and b/obj/TAG.OBJ differ diff --git a/obj/TAG_RW.OBJ b/obj/TAG_RW.OBJ new file mode 100644 index 0000000..f0c5363 Binary files /dev/null and b/obj/TAG_RW.OBJ differ diff --git a/obj/TERMINAL.OBJ b/obj/TERMINAL.OBJ new file mode 100644 index 0000000..f087a02 Binary files /dev/null and b/obj/TERMINAL.OBJ differ diff --git a/obj/TIMELOG.OBJ b/obj/TIMELOG.OBJ new file mode 100644 index 0000000..b7de5f6 Binary files /dev/null and b/obj/TIMELOG.OBJ differ diff --git a/obj/TIMER.OBJ b/obj/TIMER.OBJ new file mode 100644 index 0000000..705dc04 Binary files /dev/null and b/obj/TIMER.OBJ differ diff --git a/obj/TIMESTAT.OBJ b/obj/TIMESTAT.OBJ new file mode 100644 index 0000000..1148098 Binary files /dev/null and b/obj/TIMESTAT.OBJ differ diff --git a/obj/TOPS.OBJ b/obj/TOPS.OBJ new file mode 100644 index 0000000..c23aac9 Binary files /dev/null and b/obj/TOPS.OBJ differ diff --git a/obj/UL.OBJ b/obj/UL.OBJ new file mode 100644 index 0000000..b6f540a Binary files /dev/null and b/obj/UL.OBJ differ diff --git a/obj/USAGE.OBJ b/obj/USAGE.OBJ new file mode 100644 index 0000000..22cfb16 Binary files /dev/null and b/obj/USAGE.OBJ differ diff --git a/obj/USERED.OBJ b/obj/USERED.OBJ new file mode 100644 index 0000000..c4e406e Binary files /dev/null and b/obj/USERED.OBJ differ diff --git a/obj/USERSET.OBJ b/obj/USERSET.OBJ new file mode 100644 index 0000000..1bcfc30 Binary files /dev/null and b/obj/USERSET.OBJ differ diff --git a/obj/USERWIN.OBJ b/obj/USERWIN.OBJ new file mode 100644 index 0000000..28e22ee Binary files /dev/null and b/obj/USERWIN.OBJ differ diff --git a/obj/VERSION.OBJ b/obj/VERSION.OBJ new file mode 100644 index 0000000..3684a58 Binary files /dev/null and b/obj/VERSION.OBJ differ diff --git a/obj/VIEWFILE.OBJ b/obj/VIEWFILE.OBJ new file mode 100644 index 0000000..363ead4 Binary files /dev/null and b/obj/VIEWFILE.OBJ differ diff --git a/obj/WORDWRAP.OBJ b/obj/WORDWRAP.OBJ new file mode 100644 index 0000000..7aa7dc4 Binary files /dev/null and b/obj/WORDWRAP.OBJ differ diff --git a/obj/WRITEMSG.OBJ b/obj/WRITEMSG.OBJ new file mode 100644 index 0000000..830b6bd Binary files /dev/null and b/obj/WRITEMSG.OBJ differ diff --git a/obj/ZIP.OBJ b/obj/ZIP.OBJ new file mode 100644 index 0000000..c754d51 Binary files /dev/null and b/obj/ZIP.OBJ differ diff --git a/old_obj/AKA.OBJ b/old_obj/AKA.OBJ new file mode 100644 index 0000000..49f160f Binary files /dev/null and b/old_obj/AKA.OBJ differ diff --git a/old_obj/BINLOG.OBJ b/old_obj/BINLOG.OBJ new file mode 100644 index 0000000..0bb3447 Binary files /dev/null and b/old_obj/BINLOG.OBJ differ diff --git a/old_obj/BULLETIN.OBJ b/old_obj/BULLETIN.OBJ new file mode 100644 index 0000000..d18ae7c Binary files /dev/null and b/old_obj/BULLETIN.OBJ differ diff --git a/old_obj/CDROM.OBJ b/old_obj/CDROM.OBJ new file mode 100644 index 0000000..66dc3d4 Binary files /dev/null and b/old_obj/CDROM.OBJ differ diff --git a/old_obj/CHAT.OBJ b/old_obj/CHAT.OBJ new file mode 100644 index 0000000..f450d15 Binary files /dev/null and b/old_obj/CHAT.OBJ differ diff --git a/old_obj/CLEANUP.OBJ b/old_obj/CLEANUP.OBJ new file mode 100644 index 0000000..602e323 Binary files /dev/null and b/old_obj/CLEANUP.OBJ differ diff --git a/old_obj/COMBINED.OBJ b/old_obj/COMBINED.OBJ new file mode 100644 index 0000000..31ee92d Binary files /dev/null and b/old_obj/COMBINED.OBJ differ diff --git a/old_obj/DECKEY.OBJ b/old_obj/DECKEY.OBJ new file mode 100644 index 0000000..1670a94 Binary files /dev/null and b/old_obj/DECKEY.OBJ differ diff --git a/old_obj/DESQVIEW.OBJ b/old_obj/DESQVIEW.OBJ new file mode 100644 index 0000000..345b6d2 Binary files /dev/null and b/old_obj/DESQVIEW.OBJ differ diff --git a/old_obj/DL.OBJ b/old_obj/DL.OBJ new file mode 100644 index 0000000..bf72ca3 Binary files /dev/null and b/old_obj/DL.OBJ differ diff --git a/old_obj/EGA.OBJ b/old_obj/EGA.OBJ new file mode 100644 index 0000000..3455459 Binary files /dev/null and b/old_obj/EGA.OBJ differ diff --git a/old_obj/EVENT.OBJ b/old_obj/EVENT.OBJ new file mode 100644 index 0000000..7ea3071 Binary files /dev/null and b/old_obj/EVENT.OBJ differ diff --git a/old_obj/EXEC.OBJ b/old_obj/EXEC.OBJ new file mode 100644 index 0000000..2bcb197 Binary files /dev/null and b/old_obj/EXEC.OBJ differ diff --git a/old_obj/EXECHECK.OBJ b/old_obj/EXECHECK.OBJ new file mode 100644 index 0000000..f6f1504 Binary files /dev/null and b/old_obj/EXECHECK.OBJ differ diff --git a/old_obj/FILEAREA.OBJ b/old_obj/FILEAREA.OBJ new file mode 100644 index 0000000..b1dc797 Binary files /dev/null and b/old_obj/FILEAREA.OBJ differ diff --git a/old_obj/FORWARD.OBJ b/old_obj/FORWARD.OBJ new file mode 100644 index 0000000..2853945 Binary files /dev/null and b/old_obj/FORWARD.OBJ differ diff --git a/old_obj/FOSSIL.OBJ b/old_obj/FOSSIL.OBJ new file mode 100644 index 0000000..9efa8b7 Binary files /dev/null and b/old_obj/FOSSIL.OBJ differ diff --git a/old_obj/FUZZY.OBJ b/old_obj/FUZZY.OBJ new file mode 100644 index 0000000..0ac1d62 Binary files /dev/null and b/old_obj/FUZZY.OBJ differ diff --git a/old_obj/GIF.OBJ b/old_obj/GIF.OBJ new file mode 100644 index 0000000..fdaa3f4 Binary files /dev/null and b/old_obj/GIF.OBJ differ diff --git a/old_obj/HELP.OBJ b/old_obj/HELP.OBJ new file mode 100644 index 0000000..b59794e Binary files /dev/null and b/old_obj/HELP.OBJ differ diff --git a/old_obj/HUDSON.OBJ b/old_obj/HUDSON.OBJ new file mode 100644 index 0000000..22d6123 Binary files /dev/null and b/old_obj/HUDSON.OBJ differ diff --git a/old_obj/IMAGE.OBJ b/old_obj/IMAGE.OBJ new file mode 100644 index 0000000..4f044af Binary files /dev/null and b/old_obj/IMAGE.OBJ differ diff --git a/old_obj/INPDATE.OBJ b/old_obj/INPDATE.OBJ new file mode 100644 index 0000000..09c7125 Binary files /dev/null and b/old_obj/INPDATE.OBJ differ diff --git a/old_obj/IO.OBJ b/old_obj/IO.OBJ new file mode 100644 index 0000000..befa055 Binary files /dev/null and b/old_obj/IO.OBJ differ diff --git a/old_obj/JAM.OBJ b/old_obj/JAM.OBJ new file mode 100644 index 0000000..9c89541 Binary files /dev/null and b/old_obj/JAM.OBJ differ diff --git a/old_obj/LANGUAGE.OBJ b/old_obj/LANGUAGE.OBJ new file mode 100644 index 0000000..49edef7 Binary files /dev/null and b/old_obj/LANGUAGE.OBJ differ diff --git a/old_obj/LASTCALL.OBJ b/old_obj/LASTCALL.OBJ new file mode 100644 index 0000000..82a8ee7 Binary files /dev/null and b/old_obj/LASTCALL.OBJ differ diff --git a/old_obj/LISTFILE.OBJ b/old_obj/LISTFILE.OBJ new file mode 100644 index 0000000..81ceb70 Binary files /dev/null and b/old_obj/LISTFILE.OBJ differ diff --git a/old_obj/LOADPEX.OBJ b/old_obj/LOADPEX.OBJ new file mode 100644 index 0000000..0d230ab Binary files /dev/null and b/old_obj/LOADPEX.OBJ differ diff --git a/old_obj/LOGIN.OBJ b/old_obj/LOGIN.OBJ new file mode 100644 index 0000000..622cafb Binary files /dev/null and b/old_obj/LOGIN.OBJ differ diff --git a/old_obj/MAILCHK.OBJ b/old_obj/MAILCHK.OBJ new file mode 100644 index 0000000..b372129 Binary files /dev/null and b/old_obj/MAILCHK.OBJ differ diff --git a/old_obj/MARK.OBJ b/old_obj/MARK.OBJ new file mode 100644 index 0000000..c61249f Binary files /dev/null and b/old_obj/MARK.OBJ differ diff --git a/old_obj/MCHAT.OBJ b/old_obj/MCHAT.OBJ new file mode 100644 index 0000000..1de3f0f Binary files /dev/null and b/old_obj/MCHAT.OBJ differ diff --git a/old_obj/MENU.OBJ b/old_obj/MENU.OBJ new file mode 100644 index 0000000..3a8571b Binary files /dev/null and b/old_obj/MENU.OBJ differ diff --git a/old_obj/MISC.OBJ b/old_obj/MISC.OBJ new file mode 100644 index 0000000..1a25b1e Binary files /dev/null and b/old_obj/MISC.OBJ differ diff --git a/old_obj/MODEM.OBJ b/old_obj/MODEM.OBJ new file mode 100644 index 0000000..3a90344 Binary files /dev/null and b/old_obj/MODEM.OBJ differ diff --git a/old_obj/MSG.OBJ b/old_obj/MSG.OBJ new file mode 100644 index 0000000..58b21a7 Binary files /dev/null and b/old_obj/MSG.OBJ differ diff --git a/old_obj/MSGAREA.OBJ b/old_obj/MSGAREA.OBJ new file mode 100644 index 0000000..af15716 Binary files /dev/null and b/old_obj/MSGAREA.OBJ differ diff --git a/old_obj/MSGBASE.OBJ b/old_obj/MSGBASE.OBJ new file mode 100644 index 0000000..8a7279e Binary files /dev/null and b/old_obj/MSGBASE.OBJ differ diff --git a/old_obj/MSGDEL.OBJ b/old_obj/MSGDEL.OBJ new file mode 100644 index 0000000..ee731b6 Binary files /dev/null and b/old_obj/MSGDEL.OBJ differ diff --git a/old_obj/MSGED.OBJ b/old_obj/MSGED.OBJ new file mode 100644 index 0000000..f763b2e Binary files /dev/null and b/old_obj/MSGED.OBJ differ diff --git a/old_obj/MSGEXPRT.OBJ b/old_obj/MSGEXPRT.OBJ new file mode 100644 index 0000000..45f51cb Binary files /dev/null and b/old_obj/MSGEXPRT.OBJ differ diff --git a/old_obj/MSGFIND.OBJ b/old_obj/MSGFIND.OBJ new file mode 100644 index 0000000..0f34f2b Binary files /dev/null and b/old_obj/MSGFIND.OBJ differ diff --git a/old_obj/MSGMOVE.OBJ b/old_obj/MSGMOVE.OBJ new file mode 100644 index 0000000..d9df69c Binary files /dev/null and b/old_obj/MSGMOVE.OBJ differ diff --git a/old_obj/MUSIC.OBJ b/old_obj/MUSIC.OBJ new file mode 100644 index 0000000..84fc187 Binary files /dev/null and b/old_obj/MUSIC.OBJ differ diff --git a/old_obj/NODELIST.OBJ b/old_obj/NODELIST.OBJ new file mode 100644 index 0000000..bbfcc71 Binary files /dev/null and b/old_obj/NODELIST.OBJ differ diff --git a/old_obj/ONLINE.OBJ b/old_obj/ONLINE.OBJ new file mode 100644 index 0000000..e99b9c3 Binary files /dev/null and b/old_obj/ONLINE.OBJ differ diff --git a/old_obj/PBUSER.OBJ b/old_obj/PBUSER.OBJ new file mode 100644 index 0000000..a6ecd9b Binary files /dev/null and b/old_obj/PBUSER.OBJ differ diff --git a/old_obj/PEXCALL.OBJ b/old_obj/PEXCALL.OBJ new file mode 100644 index 0000000..cfdb960 Binary files /dev/null and b/old_obj/PEXCALL.OBJ differ diff --git a/old_obj/POSTMSG.OBJ b/old_obj/POSTMSG.OBJ new file mode 100644 index 0000000..90b1c25 Binary files /dev/null and b/old_obj/POSTMSG.OBJ differ diff --git a/old_obj/PROBOARD.EXE b/old_obj/PROBOARD.EXE new file mode 100644 index 0000000..5315689 Binary files /dev/null and b/old_obj/PROBOARD.EXE differ diff --git a/old_obj/PROBOARD.OBJ b/old_obj/PROBOARD.OBJ new file mode 100644 index 0000000..e29ec51 Binary files /dev/null and b/old_obj/PROBOARD.OBJ differ diff --git a/old_obj/PROTOCOL.OBJ b/old_obj/PROTOCOL.OBJ new file mode 100644 index 0000000..43fdbf4 Binary files /dev/null and b/old_obj/PROTOCOL.OBJ differ diff --git a/old_obj/QSCANMSG.OBJ b/old_obj/QSCANMSG.OBJ new file mode 100644 index 0000000..340f1f1 Binary files /dev/null and b/old_obj/QSCANMSG.OBJ differ diff --git a/old_obj/QUESTION.OBJ b/old_obj/QUESTION.OBJ new file mode 100644 index 0000000..7051fe3 Binary files /dev/null and b/old_obj/QUESTION.OBJ differ diff --git a/old_obj/RAWDIR.OBJ b/old_obj/RAWDIR.OBJ new file mode 100644 index 0000000..3610356 Binary files /dev/null and b/old_obj/RAWDIR.OBJ differ diff --git a/old_obj/READMSG.OBJ b/old_obj/READMSG.OBJ new file mode 100644 index 0000000..a6dddd2 Binary files /dev/null and b/old_obj/READMSG.OBJ differ diff --git a/old_obj/REGIS.OBJ b/old_obj/REGIS.OBJ new file mode 100644 index 0000000..9029842 Binary files /dev/null and b/old_obj/REGIS.OBJ differ diff --git a/old_obj/REPLYMSG.OBJ b/old_obj/REPLYMSG.OBJ new file mode 100644 index 0000000..367ec10 Binary files /dev/null and b/old_obj/REPLYMSG.OBJ differ diff --git a/old_obj/RIP.OBJ b/old_obj/RIP.OBJ new file mode 100644 index 0000000..c38c16f Binary files /dev/null and b/old_obj/RIP.OBJ differ diff --git a/old_obj/SCANMSG.OBJ b/old_obj/SCANMSG.OBJ new file mode 100644 index 0000000..c1f0789 Binary files /dev/null and b/old_obj/SCANMSG.OBJ differ diff --git a/old_obj/SELLANG.OBJ b/old_obj/SELLANG.OBJ new file mode 100644 index 0000000..057b937 Binary files /dev/null and b/old_obj/SELLANG.OBJ differ diff --git a/old_obj/SETAREA.OBJ b/old_obj/SETAREA.OBJ new file mode 100644 index 0000000..ef00e52 Binary files /dev/null and b/old_obj/SETAREA.OBJ differ diff --git a/old_obj/SHELL.OBJ b/old_obj/SHELL.OBJ new file mode 100644 index 0000000..f3fce0b Binary files /dev/null and b/old_obj/SHELL.OBJ differ diff --git a/old_obj/SHOWANS.OBJ b/old_obj/SHOWANS.OBJ new file mode 100644 index 0000000..29d986d Binary files /dev/null and b/old_obj/SHOWANS.OBJ differ diff --git a/old_obj/SHOWMSG.OBJ b/old_obj/SHOWMSG.OBJ new file mode 100644 index 0000000..bdf0129 Binary files /dev/null and b/old_obj/SHOWMSG.OBJ differ diff --git a/old_obj/SQUISH.OBJ b/old_obj/SQUISH.OBJ new file mode 100644 index 0000000..c493bd9 Binary files /dev/null and b/old_obj/SQUISH.OBJ differ diff --git a/old_obj/STACKING.OBJ b/old_obj/STACKING.OBJ new file mode 100644 index 0000000..e02420a Binary files /dev/null and b/old_obj/STACKING.OBJ differ diff --git a/old_obj/STRVARS.OBJ b/old_obj/STRVARS.OBJ new file mode 100644 index 0000000..313f70c Binary files /dev/null and b/old_obj/STRVARS.OBJ differ diff --git a/old_obj/SYSOPKEY.OBJ b/old_obj/SYSOPKEY.OBJ new file mode 100644 index 0000000..19ed724 Binary files /dev/null and b/old_obj/SYSOPKEY.OBJ differ diff --git a/old_obj/TAG.OBJ b/old_obj/TAG.OBJ new file mode 100644 index 0000000..d72ac5b Binary files /dev/null and b/old_obj/TAG.OBJ differ diff --git a/old_obj/TAG_RW.OBJ b/old_obj/TAG_RW.OBJ new file mode 100644 index 0000000..42b65dd Binary files /dev/null and b/old_obj/TAG_RW.OBJ differ diff --git a/old_obj/TERMINAL.OBJ b/old_obj/TERMINAL.OBJ new file mode 100644 index 0000000..ba8237c Binary files /dev/null and b/old_obj/TERMINAL.OBJ differ diff --git a/old_obj/TIMELOG.OBJ b/old_obj/TIMELOG.OBJ new file mode 100644 index 0000000..6aca2b9 Binary files /dev/null and b/old_obj/TIMELOG.OBJ differ diff --git a/old_obj/TIMER.OBJ b/old_obj/TIMER.OBJ new file mode 100644 index 0000000..2860e24 Binary files /dev/null and b/old_obj/TIMER.OBJ differ diff --git a/old_obj/TIMESTAT.OBJ b/old_obj/TIMESTAT.OBJ new file mode 100644 index 0000000..fadb527 Binary files /dev/null and b/old_obj/TIMESTAT.OBJ differ diff --git a/old_obj/TOPS.OBJ b/old_obj/TOPS.OBJ new file mode 100644 index 0000000..d7b36b1 Binary files /dev/null and b/old_obj/TOPS.OBJ differ diff --git a/old_obj/UL.OBJ b/old_obj/UL.OBJ new file mode 100644 index 0000000..11a0cbb Binary files /dev/null and b/old_obj/UL.OBJ differ diff --git a/old_obj/USAGE.OBJ b/old_obj/USAGE.OBJ new file mode 100644 index 0000000..cb6a8fb Binary files /dev/null and b/old_obj/USAGE.OBJ differ diff --git a/old_obj/USERED.OBJ b/old_obj/USERED.OBJ new file mode 100644 index 0000000..a9278bc Binary files /dev/null and b/old_obj/USERED.OBJ differ diff --git a/old_obj/USERSET.OBJ b/old_obj/USERSET.OBJ new file mode 100644 index 0000000..5a8b716 Binary files /dev/null and b/old_obj/USERSET.OBJ differ diff --git a/old_obj/USERWIN.OBJ b/old_obj/USERWIN.OBJ new file mode 100644 index 0000000..603304b Binary files /dev/null and b/old_obj/USERWIN.OBJ differ diff --git a/old_obj/VERSION.OBJ b/old_obj/VERSION.OBJ new file mode 100644 index 0000000..2d484f9 Binary files /dev/null and b/old_obj/VERSION.OBJ differ diff --git a/old_obj/VIEWFILE.OBJ b/old_obj/VIEWFILE.OBJ new file mode 100644 index 0000000..57be74e Binary files /dev/null and b/old_obj/VIEWFILE.OBJ differ diff --git a/old_obj/WORDWRAP.OBJ b/old_obj/WORDWRAP.OBJ new file mode 100644 index 0000000..e97ac16 Binary files /dev/null and b/old_obj/WORDWRAP.OBJ differ diff --git a/old_obj/WRITEMSG.OBJ b/old_obj/WRITEMSG.OBJ new file mode 100644 index 0000000..14b7d8c Binary files /dev/null and b/old_obj/WRITEMSG.OBJ differ diff --git a/old_obj/ZIP.OBJ b/old_obj/ZIP.OBJ new file mode 100644 index 0000000..f3941dc Binary files /dev/null and b/old_obj/ZIP.OBJ differ diff --git a/output.lst b/output.lst new file mode 100644 index 0000000..a6cbaa0 --- /dev/null +++ b/output.lst @@ -0,0 +1,43 @@ +tasm /o /mx /dMEM_MOD=LARGE exec.asm + +Assembling file: exec.asm +**Error** exec.asm(133) Illegal immediate +**Error** exec.asm(136) Need right square bracket +*Warning* exec.asm(136) [Constant] assumed to mean immediate constant +**Error** exec.asm(356) Need right square bracket +*Warning* exec.asm(356) [Constant] assumed to mean immediate constant +**Error** exec.asm(365) Need right square bracket +*Warning* exec.asm(365) [Constant] assumed to mean immediate constant +**Error** exec.asm(366) Need right square bracket +*Warning* exec.asm(366) [Constant] assumed to mean immediate constant +**Error** exec.asm(540) Illegal immediate +**Error** exec.asm(566) Need right square bracket +*Warning* exec.asm(566) Argument needs type override +**Error** exec.asm(586) Need right square bracket +*Warning* exec.asm(586) Argument needs type override +**Error** exec.asm(636) Illegal immediate +**Error** exec.asm(643) Need right square bracket +*Warning* exec.asm(643) Argument needs type override +**Error** exec.asm(653) Illegal immediate +**Error** exec.asm(660) Illegal immediate +**Error** exec.asm(842) Need right square bracket +*Warning* exec.asm(842) [Constant] assumed to mean immediate constant +**Error** exec.asm(905) Need right square bracket +*Warning* exec.asm(905) [Constant] assumed to mean immediate constant +**Error** exec.asm(907) Need right square bracket +*Warning* exec.asm(907) [Constant] assumed to mean immediate constant +Error messages: 15 +Warning messages: 10 +Passes: 1 +Remaining memory: 381k + + +tasm /o /mx /dMEM_MOD=LARGE fossil.asm + +Assembling file: fossil.asm +**Error** fossil.asm(232) Symbol already defined elsewhere: @@EXIT +Error messages: 1 +Warning messages: None +Passes: 1 +Remaining memory: 387k + diff --git a/p.bat b/p.bat new file mode 100644 index 0000000..9f6356d --- /dev/null +++ b/p.bat @@ -0,0 +1,3 @@ +cd \proboard +call p.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 +cd \cpp\pb\proboard diff --git a/proboard.cpp b/proboard.cpp new file mode 100644 index 0000000..17f1ec8 --- /dev/null +++ b/proboard.cpp @@ -0,0 +1,757 @@ +#define Use_MsgBase +#define Use_LinkedList +#define Use_Handlers + +#define INCLUDE_REGIS + +#include +#include +#include +#include +#include +#include +#include +#include "proboard.hpp" +//#include "timebomb.h" +#include + +long Message::lastIndex = 0; + +static int port = PORT_VALUE; + + +bool do_modem(modem_response *); + +// unsigned _stack = 12000; + +extern unsigned _stklen = 13000; + +#if __OVERLAY__ + unsigned _ovrbuffer = 0x800; +#endif + +char *months_short[] = { "???","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; +char *days_short[] = { "Mon","Tue","Wed","Thu","Fri","Sat","Sun" }; +char *days_full[] = { "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday" }; +char *date_formats[] = { "MM/DD/YY", "YY/MM/DD", "DD/MM/YY", NULL }; +char *date_formats_long[] = { "MM/DD/YYYY", "YYYY/MM/DD", "DD/MM/YYYY", NULL }; + +bool chatflag = FALSE; +bool noyell_flag = FALSE; +bool password_ok = FALSE; +bool desqview = FALSE; +bool stopped = FALSE; +bool use_ems = TRUE; +bool use_xms = FALSE; +bool quiet = FALSE; +bool echo_entered = FALSE; +bool net_entered = FALSE; + +bool registered = FALSE; +word max_node_count = 2; + +bool menuchanged = TRUE; +bool updatemenu = TRUE; +bool reliable = TRUE; +bool ignore_carrier = FALSE; +bool fatal = FALSE; +bool no_hangup = FALSE; +bool rip_detected = FALSE; +bool sysop_next = FALSE; + +int num_yells = 0; +long totalcalls = 0; +int num_users = 0; +int time_limit = 0; +int time_removed = 0; +int node_number = 1; +int num_limits = 0; +int returnvalue = 0; +int display_mode = 1; +int event_due = 10080; +byte org_videomode = 0; +word org_numlines = 0; +word min_level = 0; +int rip_screenlines= 0; +int pastFirstUse = 31; +bool newFilesChecked = FALSE; + +int download_limit = 0; +int download_delay = 0; +word free_download = 0; +word upload_needed = 0; + + +String S_PRESS_ENTER_TO_CONTINUE; + +byte current_color; + +fossilio io; + +BinLog lastcaller; + +char user_firstname[36] = ""; +char mypath[64] = ""; +char syspath[64] = ""; +char curmenu[9] = ""; +char page_reason[81] = ""; + +User user; +Config far cfg; +usertimer timer; +limits limit[50]; +KeyData regis; +event nextevent; + +MarkedMsgList markedmsglist; + +command_stack comstack; + +LinkedList sysopkey_handlers; +LinkedList hangup_handlers; + +Date login_date; +Time login_time; + +int user_recnr = -1; + +FileName FN_BINLOG_PB; +FileName FN_TIMELOG_PRO; +FileName FN_ONLINE_PRO; +FileName FN_MSGAREAS_PRO; +FileName FN_PVTFILES_PB; + +MsgBaseList msgbase; + +MsgBase *squishMsgBase; +MsgBase *hudsonMsgBase; +MsgBase *jamMsgBase; + +char *EMPTY_STRING=""; + +extern "C" void cleanup(); + +extern void (*_new_handler)(); + +void nomemory(); + +static void _near init(); +void readconfig(); + + + +#ifdef SOFTWARE_EXPIRE + +//--------------------- +// Expire on 06/01/2000 +//--------------------- + +int BetaTooOld( void ); + +#endif + + + +void +main(int argc,char *argv[]) +{ + File f; + long baud=0; + int i; + FileName fn; + + bool standalone = FALSE; + + +/*#ifdef SOFTWARE_EXPIRE + + if ( BetaTooOld() ) + { + printf( "\nThis software expired on %02d/%02d/%04d. Contact TeleGrafix Communications at:\n\n", + EXPIRE_MONTH, + EXPIRE_DAY, + EXPIRE_YEAR ); + + printf( " http://www.telegrafix.com/products/proboard\n\n" ); + + printf( "to obtain the latest version.\7\n" ); + printf( "\n" ); + + sleep( 5 ); + + exit( 1 ); + } + +#endif */ + + + org_videomode = getvideomode(); + org_numlines = tsw_vsize; + + for(i=1;i=3 && mode<=255) + setvideomode(mode); + } + break; + + case 'X': + use_ems = FALSE; + break; + + case 'I': + ignore_carrier = TRUE; + break; + + case 'S': + standalone = TRUE; + break; + + case 'A': + reliable = TRUE; + break; + + case 'L': + min_level = unsigned(atol(&argv[i][2])); + break; + + case 'T': + event_due = atoi(&argv[i][2]); + break; + + default : + printf("\nUnknown option '-%c'\n",toupper(argv[i][1])); + sleep(5); + } + + if(_osmajor<3 || (_osmajor==3 && _osminor<30)) + { + puts("\nDOS v3.30 or higher needed!"); + exit(1); + } + +#if __OVERLAY__ + if(use_ems) + _OvrInitEms(0, 0, 0); + + if(use_xms) + _OvrInitExt(0 ,0 ); +#endif + + syspath[0]='\0'; + + if(getenv("PROBOARD")) + { + strcpy(syspath,getenv("PROBOARD")); + append_backspace(syspath); + } + + if(!syspath[0]) + { + fn(argv[0]); + fn.stripName(); + + strcpy(syspath,fn); + append_backspace(syspath); + } + + strupr(syspath); + + getcwd(mypath,59); + append_backspace(mypath); + + check_exe(argv[0]); + + readconfig(); + + if(!ReadLanguage(cfg.defaultLanguage)) + { + fatalerror("Error reading default language files"); + } + + readconfig(); + + FN_BINLOG_PB (syspath, "BINLOG.PB"); + FN_TIMELOG_PRO (syspath, "TIMELOG.PRO" ); + FN_ONLINE_PRO (syspath, "ONLINE.PRO" ); + FN_MSGAREAS_PRO(syspath, "MESSAGES.PB" ); + FN_PVTFILES_PB (syspath, "PVTFILES.PB "); + + _new_handler=nomemory; + + if(cfg.egamode) set43(); + + if(tsw_videocard==EGA) tsw_vsize=*((byte _far *)0x484)+1; + + tsw_hsize = *((byte far *)0x44A); + + init(); + + run_sdkfile("/I INIT"); + run_sdkfile("/I INIT_1"); + run_sdkfile("/I INIT_2"); + run_sdkfile("/I INIT_3"); + run_sdkfile("/I INIT_4"); + run_sdkfile("/I INIT_5"); + run_sdkfile("/I INIT_6"); + run_sdkfile("/I INIT_7"); + run_sdkfile("/I INIT_8"); + run_sdkfile("/I INIT_9"); + + msgbase.add( squishMsgBase = new SquishMsgBase ); + msgbase.add( hudsonMsgBase = new HudsonMsgBase ); + msgbase.add( jamMsgBase = new JamMsgBase ); + + if(standalone) + { + modem_response response; + CLEAR_OBJECT(response); + + response.baud = baud; + response.port = port; + + if(do_modem(&response)) + { + baud = response.baud; + port = response.port; + } + else + { + fatalerror("Modem initialization failed"); + } + + if(!baud) port = -1; + } + else + { + if(port<0 && baud) + port = 0; + } + + SCREEN.clear(); + SCREEN.attrib(15); + + SCREEN.change(1,1,tsw_hsize,tsw_vsize-1); + + update_user_window(); + + if(baud || cfg.loglocal) LOG("-----------------------------------------------------"); + + if(port<0) + io.init(0,0); + else + io.init(port,baud); + + if(baud) + LOG("Incoming call at %ld bps",baud); + else + LOG("Local login"); + + atexit(cleanup); + + timer.start(20); + + update_display(); + + if(nextevent.minutesleft()<=5 || (event_due<=5 && event_due>=0)) + { + if(showansascrip("EVENTDUE") == ANS_NOFILE) + io << '\n' << S_EVENT_HAS_TO_RUN << "\n\xFF"; + + LOG("Event has to run"); + + sleep(2); + exit_proboard(); + } + + show_intro(); + + if(login()) exit_proboard(); + + LOG(1,"Calling from %s - Level %u",user.city,user.level); + + { + user_online uo; + uo.write(); + } + + for(i=0;i=0) + { + LOG("Event has to run"); + io << '\n' << S_EVENT_HAS_TO_RUN << "\n\xFF"; + sleep(2); + exit_proboard(); + } + + if(event_due>=0 && timer.left()>event_due-5) + { + LOG("Time limit adjusted from %d to %d minutes" , timer.left() , event_due-5); + time_removed = timer.left() - event_due + 5; + timer.changeleft(event_due-5); + + io << "\n\n" << S_UPCOMING_EVENT << "\n\n"; + io << S_PRESS_ENTER_TO_CONTINUE << '\n'; + } + + showansascrip("WELCOME"); + for(i=1;i<10;i++) + { + run_sdkfile(form("/I WELCOME%d",i)); + showansascrip(form("WELCOME%d",i)); + } + + run_sdkfile(form("/I SEC%u",user.level)); + showansascrip(form("SEC%u",user.level)); + + switch(cfg.mailcheck) + { + case 2: + { + /* + if(rip_mode) + { + rip_query("$COFF$"); + rip_query("$PHASER$"); + + show_rip("_CHKMAIL"); + } + else + */ + { + io << "\n" << S_CHECK_MAIL_PROMPT; + } + + //if(rip_mode) io.show_remote = FALSE; + bool resp = io.ask(); + //if(rip_mode) io.show_remote = TRUE; + + rip_query("$CON$"); + + if(!resp) break; + + /*if(rip_mode) rip_reset(); + else */io << '\n'; + } + + case 1: + mailcheck(); + break; + } + + rip_query("$CON$"); + + io << '\n'; + + showansascrip("NEWS"); + + if(user.birthDate[0]==login_date[0] && user.birthDate[1]==login_date[1]) + { + run_sdkfile("/I BIRTHDAY"); + showansascrip("BIRTHDAY"); + } + + menu_processor(); +} + + + +#ifdef SOFTWARE_EXPIRE + +int BetaTooOld( void ) +{ + struct dosdate_t d; + + + _dos_getdate( & d ); + + + if ( + d.year >= EXPIRE_YEAR and + d.month >= EXPIRE_MONTH and + d.day > EXPIRE_DAY + ) + { + //--------------------- + // Software has expired + //--------------------- + + return( TRUE ); + } + else + { + //--------------------------------------- + // Re-establish the proper starting port + // number for ProBoard's COM port support + //--------------------------------------- + + port = -1; + + return( FALSE ); + } +} + + + +#endif // SOFTWARE_EXPIRE + + + +void +readconfig() +{ + File f; + FileName fn(syspath,"CONFIG.PRO"); + + if(!f.open(fn)) + { + file_error(fn , f.error()); + } + else + { + if(f.len()!=sizeof(cfg) || f.read(&cfg,sizeof(cfg))!=sizeof(cfg)) + fatalerror(form("File <%s> is invalid." , (char *)fn)); + } + + f.close(); + + if(memcmp(cfg.dateStampSignature,"ecwqnoiwef",10)) + { + memcpy(cfg.dateStampSignature,"ecwqnoiwef",10); + cfg.dateStamp.today(); + cfg.dateStampCrc = crc32(cfg.dateStampSignature,13); + + f.open(fn,fmode_create); + f.write(&cfg,sizeof(cfg)); + f.close(); + } + + if(cfg.dateStampCrc != crc32(cfg.dateStampSignature,13)) + { + pastFirstUse = 61; + } + else + { + pastFirstUse = Date(TODAY) - cfg.dateStamp; + } + + if(!cfg.defaultLanguage[0]) + strcpy(cfg.defaultLanguage,"ENGLISH"); + + if(pb_curlang.menuPath[0]) + strcpy(cfg.mnupath , pb_curlang.menuPath); + + if(pb_curlang.txtPath[0]) + strcpy(cfg.txtpath , pb_curlang.txtPath); + + append_backspace(cfg.txtpath); + append_backspace(cfg.RIPpath); + append_backspace(cfg.iconspath); + append_backspace(cfg.mnupath); + append_backspace(cfg.msgpath); + append_backspace(cfg.uploadpath); + append_backspace(cfg.pexpath); + append_backspace(cfg.pvtuploadpath); + append_backspace(cfg.nodelistdir); + + if(cfg.pwdchar == '\0') cfg.pwdchar = '#'; + + if(cfg.numnodes>1) cfg.multiline = TRUE; + + if(cfg.IObuffersize < 1 || cfg.IObuffersize > 9999) + cfg.IObuffersize = 1; + + User::setDir(cfg.msgpath); +} + +static void near +init() +{ + //---------------------------- + // JDR: REGISTRATION REFERENCE + //---------------------------- + + if ( registered || + max_node_count != 2 ) + { + //------------------------------------- + // Someone tampered with the .EXE file, + // trying to hardcode these values + //------------------------------------- + + exit_proboard(); + } + + + CHECK_REG(); + + +#ifdef KEY_NEEDED + + if ( ! registered ) + { + LOG( "This version does not work in unregistered mode" ); + + exit_proboard(); + } + +#endif + + + //------------------------------------- + // Check the node count of this license + //------------------------------------- + + if ( registered ) + { + if ( max_node_count != 0 ) + { + //----------------------------------------------------------- + // We have a distinct node count. Are we within our license? + //----------------------------------------------------------- + + if ( node_number > max_node_count ) + { + //----------------- + // License exceeded + //----------------- + + fatalerror( form( "Node license exceeded. Tried to load node %d (%d allowed)", + (int) node_number, + (int) max_node_count ) ); + + exit_proboard(); + } + + } + } + else + { + //-------------------------------------------------- + // Unregistered version -- only allow two nodes max! + //-------------------------------------------------- + + if ( node_number > MAX_UNREG_NODES ) + { + fatalerror( form( "Unregistered versions cannot start more than %d nodes", MAX_UNREG_NODES ) ); + + exit_proboard(); + } + } + + + if ( tsw_OS == OS_DESQVIEW ) + { + desqview = TRUE; + } + + + timelog tl; + + + tl.read(); + + totalcalls = tl.totalcalls; + + + File f; + + + if ( f.open( FN_BINLOG_PB ) ) + { + if ( f.len() >= sizeof( BinLog ) ) + { + f.seek( f.len() - sizeof( BinLog ) ); + + f.read( & lastcaller, sizeof( lastcaller ) ); + } + + + f.close(); + } + + + event e; + + memset( & nextevent, + 0, + sizeof( nextevent ) ); + + + if ( f.open( FileName( syspath, "EVENTS.PRO" ) ) ) + { + for(;;) + { + if ( f.read( & e, sizeof( e ) ) != sizeof( e ) ) + { + break; + } + + if ( e.minutesleft() <= nextevent.minutesleft() ) + { + nextevent = e; + } + } + } + + + num_users = int( User::numUsers() ); + + // user.gentops(); +} + + + + diff --git a/proboard2.exe b/proboard2.exe new file mode 100644 index 0000000..bb90e7c Binary files /dev/null and b/proboard2.exe differ diff --git a/reg/REG.HPP b/reg/REG.HPP new file mode 100644 index 0000000..507c8aa --- /dev/null +++ b/reg/REG.HPP @@ -0,0 +1,85 @@ +#include +#include <..\key20\pbkey.hpp> + +void decompress_data(byte *input,byte *output,int insize,int outsize); + +static void +regis_read() +{ + int i , output_size; + File f; + + if(!f.open(FileName(syspath,"REGKEY.PB"))) + { + registered = FALSE; + + return; + } + + output_size = int(f.len() - 33); + + byte *output_data = new byte[output_size]; + + f.seek(33); + f.read(output_data , output_size); + f.close(); + + for(i = 0 ; i < output_size ; i++) + { + output_data[i] ^= fixed_xor_data[i % 100]; + } + + KeyFile *kf = new KeyFile; + + decompress_data(output_data , (byte *)kf , output_size , sizeof(*kf)); + + delete [] output_data; + + encrypt((char *)kf->keyData,sizeof(kf->keyData),kf->xorData); + + if( + kf->keyCrc != crc32(kf->keyData , sizeof(kf->keyData)) + || kf->xorCrc != crc32(kf->xorData , sizeof(kf->xorData)) + ) + { + registered = FALSE; + + delete kf; + + return; + } + + if(kf->securityCheck[regSelectedTable] != calc_security(&kf->keyData[0] , regTable1 , regTable2)) + { + registered = FALSE; + + delete kf; + + return; + } + + regis = kf->keyData[0]; + + delete kf; + + if( + (regis.expirDate.ok() && regis.expirDate <= Date(TODAY)) + || + (regis.expirVersion && regis.expirVersion <= VER_WORD) + ) + { + static int count = 0; + + if(!count++) LOG("Key file expired!"); + + registered = FALSE; + return; + } + + registered = (!stricmp(regis.sysopName,cfg.sysopname) && !stricmp(regis.bbsName,cfg.bbsname)); + + if(VER_BETA < 0xF000 && !regis.beta) + registered = FALSE; + + //if(VER_BETA < 0xF000 && ....) registered = FALSE; +} diff --git a/reg/REGIS.CPP b/reg/REGIS.CPP new file mode 100644 index 0000000..6cd0a52 --- /dev/null +++ b/reg/REGIS.CPP @@ -0,0 +1,13 @@ +#include "proboard.hpp" + +byte xor_data[100]= + { 0x79,0xDE,0xAA,0x71,0x3A,0x68,0x5D,0xBA,0xE7,0x2E, + 0x6D,0x4A,0xF2,0x2D,0x47,0x2A,0x12,0x0E,0xDC,0x0A, + 0xCB,0xF4,0xC5,0xC3,0x2D,0x99,0xE7,0x5E,0xE6,0xFA, + 0x8D,0x26,0xC5,0x52,0x16,0x56,0x2F,0xCB,0x8A,0x7F, + 0x59,0xB6,0x6C,0xFE,0x26,0x94,0x3D,0x48,0x35,0xEF, + 0x4F,0x99,0x1D,0x76,0x5B,0xD7,0x44,0x9F,0x4E,0x6D, + 0xBD,0x83,0x44,0xC1,0xAE,0xD7,0xA6,0x20,0x26,0xDC, + 0x69,0x90,0x4D,0x7C,0x6D,0x49,0xB7,0x66,0x51,0x57, + 0x49,0xAB,0x6F,0xF2,0x1E,0x3F,0x23,0x5E,0x7D,0x67, + 0xE7,0x43,0xA4,0x48,0x8B,0xDF,0x73,0xD7,0x20,0x29 }; diff --git a/tasm.out b/tasm.out new file mode 100644 index 0000000..676227a --- /dev/null +++ b/tasm.out @@ -0,0 +1,25 @@ +Turbo Assembler Version 3.1 Copyright (c) 1988, 1992 Borland International +Syntax: TASM [options] source [,object] [,listing] [,xref] +/a,/s Alphabetic or Source-code segment ordering +/c Generate cross-reference in listing +/dSYM[=VAL] Define symbol SYM = 0, or = value VAL +/e,/r Emulated or Real floating-point instructions +/h,/? Display this help screen +/iPATH Search PATH for include files +/jCMD Jam in an assembler directive CMD (eg. /jIDEAL) +/kh# Hash table capacity # symbols +/l,/la Generate listing: l=normal listing, la=expanded listing +/ml,/mx,/mu Case sensitivity on symbols: ml=all, mx=globals, mu=none +/mv# Set maximum valid length for symbols +/m# Allow # multiple passes to resolve forward references +/n Suppress symbol tables in listing +/os,/o,/op,/oiObject code: standard, standard w/overlays, Phar Lap, or IBM +/p Check for code segment overrides in protected mode +/q Suppress OBJ records not needed for linking +/t Suppress messages if successful assembly +/uxxxx Set version emulation, version xxxx +/w0,/w1,/w2 Set warning level: w0=none, w1=w2=warnings on +/w-xxx,/w+xxx Disable (-) or enable (+) warning xxx +/x Include false conditionals in listing +/z Display source line with error message +/zi,/zd,/zn Debug info: zi=full, zd=line numbers only, zn=none \ No newline at end of file diff --git a/test/PROBOARD.EXE b/test/PROBOARD.EXE new file mode 100644 index 0000000..30bcb9c Binary files /dev/null and b/test/PROBOARD.EXE differ diff --git a/test/REGISTER.EXE b/test/REGISTER.EXE new file mode 100644 index 0000000..51d12c4 Binary files /dev/null and b/test/REGISTER.EXE differ