home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / internet / rnr214.zip / RNRGLOB.PAS < prev    next >
Pascal/Delphi Source File  |  1996-04-09  |  6KB  |  280 lines

  1. unit rnrglob;
  2.  
  3. {
  4.  
  5. rnrglob.pas - constants, types, and global variables for rnr
  6.  
  7. }
  8.  
  9. {$I rnr-def.pas}
  10.  
  11. interface
  12.  
  13. {$ifdef mouse}
  14.  
  15. uses mouse;
  16.  
  17. {$endif}
  18.  
  19. const
  20.  
  21.   newsreadername='rnr';
  22.   newsreaderversion='v2.14';
  23.   releasedate='960409';
  24.  
  25.   oldnewsreadername='rusnews';
  26.  
  27.   faqcookie='<FAQ>';
  28.   builtincookie='(builtin)';
  29.  
  30.   ifaceversionunix='unix';
  31.  
  32.   defaultmailmarkerline=
  33.    '(begin your PRIVATE mail at this line, but no sooner)';
  34.  
  35.   defaultnewsmarkerline=
  36.     '(begin your PUBLIC post at this line, but no sooner)';
  37.  
  38. {$ifdef tiny}
  39.   maxarts=60;
  40.   maxkills=50;
  41.   maxjoined=120;
  42. {$else}
  43.   maxarts=1800;  {on my machine, it maxes out at <1600 anyway}
  44.   maxkills=200;
  45.   maxjoined=150;
  46. {$endif}
  47.  
  48.   maxlpp=50;
  49.   maxcols=132;
  50.  
  51.   minlpp=8;
  52.   mincols=32;
  53.  
  54.   eightbitclean=true;
  55.  
  56.   selheaderlines=1;
  57.   headerbufsize=6144;
  58.   headertlsize=256;
  59.  
  60. {$ifndef mouse}
  61.   hasmouse=false;
  62. {$endif}
  63.  
  64.   impossiblylargeart=maxlongint;
  65.     {note:  needs to be the maximum `articlefilenametype' value}
  66.  
  67.   maxsubjectlen=70;
  68.   maxfilenamelen=14;
  69.   maxfromlen=20;
  70.   maxgrouplen=50;
  71.  
  72.   maxpathlen=64;
  73.  
  74. { a command can only be a path, unless it's options }
  75. {
  76.   maxcmdlen=128;
  77. }
  78.  
  79.   shortstringlen=40;
  80.  
  81.   numreadlnhistory=5;
  82.   readlnhistorystringlen=80;
  83.  
  84.   numhashedrefs=4;
  85.  
  86.   maxoverviewlines=4;
  87.  
  88. type
  89.   articlefilenametype=longint;
  90.   pathstring=string[maxpathlen];
  91. {
  92.   cmdstring=string[maxcmdlen];
  93. }
  94.   cmdstring=pathstring;
  95.   shortstring=string[shortstringlen];
  96.   subjstringt=string[maxsubjectlen];
  97.   fnstringt=string[maxfilenamelen];
  98.   datet=longint;  {year * 16384 + month * 1024 + dayofmonth * 32 + gmthour}
  99.   fromstringt=string[maxfromlen];
  100.   groupstringt=string[maxgrouplen];
  101. {
  102.   fnarray=array[1..maxarts] of fnstringt;
  103.   fromarray=array[1..maxarts] of fromstringt;
  104.   datearray=array[1..maxarts] of datet;
  105. }
  106.   headerbuft=array[1..headerbufsize] of char;
  107.   headerlinet=
  108.     record
  109.       first: char;
  110.       offset: integer;
  111.     end;
  112.   headertrackedlinest=array[1..headertlsize] of headerlinet;
  113.  
  114.   hashedt=array[1..2] of word;
  115. {
  116.   hashedarr=array[1..maxarts] of hashedt;
  117. }
  118.   ifacetype=(ifacewaffle, ifaceuupc, ifaceuufree, ifaceunknown);
  119.  
  120. {$ifdef mouse}
  121.   mevent=
  122.     record
  123.       event, btnstatus, horiz, vert: word;
  124.     end;
  125. {$endif}
  126.  
  127.   sourcetype=(sourcegroup, sourcedir, sourcefolder);
  128.   layoutt=(layoutfirst,layoutnormal,layoutsquashed,layoutlast);
  129.  
  130.   readlnhistoryt=array[1..numreadlnhistory] of string[readlnhistorystringlen];
  131.   readlnhistorypt=^readlnhistoryt;
  132.  
  133.   articlet=
  134.     record
  135.       filename: fnstringt;
  136.       from: fromstringt;
  137.       date: datet;
  138.       basesubject: subjstringt;
  139.       hmessageid: hashedt;
  140.       hreferences: array[1..numhashedrefs] of hashedt;
  141. {high nybble of indents used for auto-selected articles etc.}
  142.       indents: byte;
  143.       sizeink: byte;
  144.       canonfirstchar: char;
  145.     end;
  146.   articlept=^articlet;
  147.  
  148. var
  149.   oldfilemode: byte;
  150.  
  151.   articles: array[1..maxarts] of articlept;
  152.   allocatedarts: integer;
  153.  
  154.   currdir: pathstring;
  155.   currsource: string;
  156.   currsourcekind: sourcetype;
  157.   userid: shortstring;
  158.   shadow: integer;
  159.   numarts: integer;
  160.   numjoined: integer;
  161.   unscannedarts: boolean;
  162.  
  163. {
  164.   indents: array[1..maxarts] of byte;
  165.   sizeink: array[1..maxarts] of byte;
  166.   basesubjs: array[1..maxarts] of subjstringt;
  167.   canonfirstchars: array[1..maxarts] of char;
  168. }
  169.  
  170.   joinedgroups: array[1..maxjoined] of groupstringt;
  171.  
  172. {
  173.   filenamesp: ^fnarray;
  174.   fromsp: ^fromarray;
  175.   datesp: ^datearray;
  176.   hmessageidsp: ^hashedarr;
  177.   hreferencesp: array[1..numhashedrefs] of ^hashedarr;
  178. }
  179.  
  180.   highestart: articlefilenametype;
  181.   highestread: articlefilenametype;
  182.   wafenv: pathstring;
  183.   spooldir,temporarydir,userdir,configdir,outboxdir: pathstring;
  184.   uucpname,smarthost,timezone: shortstring;
  185.   fqdn,organ,backbone: string;
  186.   outform: shortstring;
  187.   smarthostdir: pathstring;
  188.   newsname: shortstring;
  189.   netmail: string;
  190.   netnews: string;
  191.   replyto: string;
  192.   home: pathstring;
  193.   joinfn: pathstring;
  194.   joinf: text;
  195.   rcfilename: pathstring;
  196.   alreadyread: articlefilenametype;
  197.   headerinmem: pathstring;
  198.   headerbuf: headerbuft;
  199.   headertrackedlines: headertrackedlinest;
  200.   headerbytesinmem: integer;
  201.   currart: integer;
  202.   donegroup: boolean;
  203.   browsedir: integer;
  204.   browseonlysel: boolean;
  205.   needtofindnextgroup: boolean;
  206.   lowestartsearched: articlefilenametype;
  207.   highestartsearched: articlefilenametype;
  208.   readpagesback: integer;
  209.   readunfiltered: boolean;
  210.   antikilledonly: boolean;
  211.   searchinheaders: boolean;
  212.   searchinbody: boolean;
  213.   searchthedate: boolean;
  214.   searchinsubj: boolean;
  215.   searchinname: boolean;
  216.   searchtext: string;
  217.   searchdatelow: datet;
  218.   searchdatehigh: datet;
  219.   browseuppersearchstring: string;
  220.   nextwhilereading: boolean;
  221.   editor: pathstring;
  222.   editoroptions: cmdstring;
  223.   vspeller: pathstring;
  224.   vspelleroptions: cmdstring;
  225.  
  226. {so that shutdown can close them}
  227.   haskillfile: boolean;
  228.   hasantikillfile: boolean;
  229.   killf,antikillf: text;
  230.  
  231.   fullname: string;
  232.   iface: shortstring;
  233.   xiface: ifacetype;
  234.   ifaceversion: shortstring;
  235.   uupcusr: pathstring;
  236.   uupcsys: pathstring;
  237.   console: boolean;
  238.   port: integer;
  239.   trusted: boolean;
  240.   maymail: boolean;
  241.   maypost: boolean;
  242.   minutestorun: integer;
  243.   forumsetl: string;
  244.   mailfrom: string;
  245.   newsfrom: string;
  246.   lpp: integer;
  247.   sellpp: integer;
  248.   cols: integer;
  249.   lowcolor: byte;
  250.   highcolor: byte;
  251.   oldtextattr: byte;
  252.   lastfilen: pathstring;
  253.   lastfolder: pathstring;
  254.   comspec: pathstring;
  255.   fileresult: integer;  {takes the place of IOresult with safereset/rewrite}
  256.   execresult: integer;  {takes the place of doserror with execp}
  257.   internalcmdlineparams: string;
  258.   quotechar: char;
  259.   bodyaddress: string;
  260.  
  261. {$ifdef timeout}
  262.   minstart: integer;
  263. {$endif}
  264.  
  265. {$ifdef mouse}
  266.   hasmouse: boolean;
  267.   mousevent: mevent;
  268.   themouse: resetrec;
  269. {$endif}
  270.  
  271. {keyboard mapping}
  272.  
  273.   browsemap: array[char] of char;
  274.   selmap: array[char] of char;
  275.   mainmap: array[char] of char;
  276.  
  277. implementation
  278.  
  279. end.
  280.