home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
modem
/
cs_mac08.zip
/
CS-MAC.MAC
< prev
next >
Wrap
Text File
|
1993-10-24
|
39KB
|
1,032 lines
┌────────────────────────────────┐
│ Chuck Seyboldt's COMMO Macro │ CS-MAC08:CS-MAC.MAC
└────────────────────────────────┘
*
* You will need to *> !EDIT! <* Only One (1) of these .MAC files
* ^^^^^^
* The file you are reading does *NOT* require editing.
*
*** You *must* edit your COMMO.FON to automate mail and file fetching.
* To do so automatically, Press Alt-M and choose "Add a new BBSID".
*
*───────────────────────────────────────────────────────────────────────────────
{:retu} {retu} ;very handy labelname
┌─────────────────────────────────────────────────┐
│ Menu driven addition of new BBSs to COMMO.FON │
└─────────────────────────────────────────────────┘
{:new_bbsid} ;Alt-M from COMMO.MAC
{sete-p0 clea}
{setv temp}
{setv bbsid}
{setv doorno}
{setv bbsware}
{setv mailware}
{inpu temp,Search %_fon for what BBS?}
{comp temp} {ifco clea}
{rope %_hom%%_fon,pick_1}
{setv count,1}
{clea}
{:id_loop}
{disp %count,1,87,Searching ...}
{read line}
{inst line,%temp}
{ifco ,id_loop}
{subs line,1,50,%line}
{disp %count,1,0e,%count. }
{disp %count,4,07,%line}
{incr count}
{goto id_loop}
{:pick_1}
{disp %count,1,07, }
{inpu cntr,Which Number? [PgUp] sees behind box}
{comp cntr} {ifco new_bbsid}
{comp cntr,%count}
{ifco-ge pick_1}
{comp cntr,0} {ifco pick_1}
{setv count,1}
{clea}
{disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
{rope %_hom%%_fon,clect_bbs}
{:next_b}
{read line}
{inst line,%temp}
{ifco ,next_b}
{comp cntr,%count}
{ifco this_b}
{incr count}
{goto next_b}
{:this_b}
{subs line,1,80,%line}
{disp 1,1,07,%line}
{rclo}
{setv cs_col,70}
{setv bbs_col,20}
{setv mwa_col,30}
{setv ope_col,50}
{setv cfm_col,60}
{disp 4,30,%cs_col, Welcome to CS-MAC }
{disp 5,30,%cs_col, Welcome to CS-MAC }
{disp 6,30,%cs_col, Welcome to CS-MAC }
{disp 7,30,%cs_col, Welcome to CS-MAC }
{disp 8,30,%cs_col, Welcome to CS-MAC }
{inpu bbsid,What is the BBSID for this Board?}
{comp bbsid} {ifco clea}
{disp 16,20,%bbs_col, pcb = PCBoard │ maj = MajorBBS }
{disp 17,20,%bbs_col, s-f = Spitfire │ vir = Virtual }
{disp 18,20,%bbs_col, wc! = Wildcat! │ exc = EXEC-PC }
{disp 19,20,%bbs_col, gap = GAP │ }
{disp 20,20,%bbs_col, rma = Remote Access │ }
{disp 21,20,%bbs_col, tag = T.A.G. │ }
{disp 22,20,%bbs_col, mac = MACRObbs │ }
{disp 23,20,%bbs_col, max = MAXIMUS-CBCS │ }
{sete-p0 g_0}
{:g_0} {inpu bbsware,Choose BBSware for %bbsid from the list below}
{comp bbsware,pcb} {ifco g_1}
{comp bbsware,s-f} {ifco g_1}
{comp bbsware,wc!} {ifco g_1}
{comp bbsware,gap} {ifco g_1}
{comp bbsware,rma} {ifco g_1}
{comp bbsware,tag} {ifco g_1}
{comp bbsware,mac} {ifco g_1}
{comp bbsware,max} {ifco g_1}
{comp bbsware,maj} {ifco g_1}
{comp bbsware,vir} {ifco g_1}
{comp bbsware,exc} {ifco g_1}
{goto g_0}
{:g_1} {sete-p0 g_1}
{disp 16,20,%mwa_col, mm2 = MarkMail │ Virtual = vbq }
{disp 17,20,%mwa_col, coq = Charlie's │ EXEC-PC = exq }
{disp 18,20,%mwa_col, qm4 = Qmail 4 │ Major = mmj }
{disp 19,20,%mwa_col, jmr = Jimmer │ Qmail2 = qm2 }
{disp 20,20,%mwa_col, jet = JetMail │ PCBoard 15= p15 }
{disp 21,20,%mwa_col, roz = ROSEmail │ Silver Xpr= slx }
{disp 22,20,%mwa_col, dcq = DCQwk │ ZIPNews = zns }
{disp 23,20,%mwa_col, mkq = MKQwk │ Cam-Mail = cam }
{inpu mailware,Choose MAILware for %bbsid from the list below}
{comp mailware,mm2} {ifco g_2}
{comp mailware,coq} {ifco g_2}
{comp mailware,qm2} {ifco g_2}
{comp mailware,qm4} {ifco g_2}
{comp mailware,jmr} {ifco g_2}
{comp mailware,jet} {ifco g_2}
{comp mailware,roz} {ifco g_2}
{comp mailware,dcq} {ifco g_2}
{comp mailware,mkq} {ifco g_2}
{comp mailware,slx} {ifco g_2}
{comp mailware,zns} {ifco g_2}
{comp mailware,p15} {ifco g_2}
{comp mailware,mmj} {ifco g_2}
{comp mailware,vbq} {ifco g_2}
{comp mailware,cam} {ifco g_2}
{comp mailware,exq} {ifco g_2}
{goto g_1}
{:g_2} {sete-p0 g_2}
{disp 16,28,%ope_col, Some examples of DOOR }
{disp 17,28,%ope_col, commands to help you: }
{disp 18,28,%ope_col, }
{disp 19,28,%ope_col, open markmail^| }
{disp 20,28,%ope_col, }
{disp 21,28,%ope_col, s^|~~~~~~~~~~f^| }
{disp 22,28,%ope_col, }
{disp 23,28,%ope_col, /Q^| }
{inpu dorno,Enter the BBS Command to enter the Maildoor}
{sete-p0 new_bbsid}
{subs abbr,1,2,%bbsid}
{disp 4,30,%cfm_col, }
{disp 5,30,%cfm_col, }
{disp 6,30,%cfm_col, }
{disp 7,30,%cfm_col, }
{disp 8,30,%cfm_col, }
{disp 4,30,%cfm_col, LINK = ^(:qwk^)}
{disp 5,30,%cfm_col, ABBR = %abbr}
{disp 6,30,%cfm_col, BBSID = %bbsid}
{disp 7,30,%cfm_col, BBSware = %bbsware}
{disp 8,30,%cfm_col, MAILware = %mailware}
{setv ok}
{sete-p0 clea}
{inpu ok,Enter YES to write COMMOFON.NEW}
{inst ok,n} {ifco clea}
{comp ok,yes} {ifco ,new_bbsid}
{disp ,,,^mCOMMOFON.NEW can be your new dialing directory.^j}
{disp ,,,^mYou need to EXIT Commo and rename COMMOFON.NEW to COMMO.FON^j}
{disp ,,,^mfor these additions to take effect.^j^j}
{paus 10}
*
* ┌───────────────────────────────────────────────────────────────────┐
* │ Example of the data to be appended to an entry in COMMOFON.NEW; │
* │ │
* │ (bbsid,escape) (abbr,es) (dorno,mmail|) (mail,mm2) (bbs,pcb) │
* └───────────────────────────────────────────────────────────────────┘
{ifex %_hom%commofon.new,freshen}
{exec-n copy %_hom%%_fon %_hom%commofon.bak}
{goto rope}
{:freshen}
{exec-n copy %_hom%commofon.new %_hom%commofon.bak}
{:rope} {rope %_hom%commofon.bak,clea}
{wope %_hom%commofon.new}
{setv count,1}
{:add_fon}
{read line}
{inst line,%temp}
{ifco ,add_line}
{comp cntr,%count}
{ifco append}
{incr count}
{:add_line}
{writ %line}
{goto add_fon}
{:append}
{inst line,^)}
{subs p1,1,%_pos,%line} {setv pos,%_pos} {incr pos,2}
{subs p2,%pos,255,%line}
{inst p2,^)} {setv pos,%_pos} {incr pos,2}
{subs p3,%pos,255,%p2}
{subs p2,1,%_pos,%p2}
{inst p3,^)} {setv pos,%_pos} {incr pos,2}
{subs p4,%pos,255,%p3}
{subs p3,1,%_pos,%p3}
{inst p3,^(}
{subs p3,1,%_pos,%p3}
{setv p3,%p3%qwk^)}
{inst p4,^(} {ifco p4_ok}
{setv p4,^(^)}
{:p4_ok}
{setv line,%p1 %p2 %p3 %p4 ^(bbsid,%bbsid^) ^(abbr,%abbr^) ^(dorno,%dorno^) ^(mail,%mailware^) ^(bbs,%bbsware^)}
{writ %line}
{incr count}
{goto add_fon}
{:clea} {setv line}
{setv p1}
{setv p2}
{setv p3}
{setv p4}
{setv ok}
{setv abbr}
{setv cntr}
{setv mailware}
{setv bbsware}
{setv cs_col}
{setv bbs_col}
{setv mwa_col}
{setv ope_col}
{setv cfm_col}
{clea}
{exec-n del %_hom%commofon.bak}
{macl %_mac,auto} ;return control to COMMO.MAC
┌────────────────────────────────────────────┐
│ Edit COMMO.MAC with your external editor │
└────────────────────────────────────────────┘
* The short macro below uses an external editor to edit COMMO.MAC.
* It is called from COMMO.MAC ... putting CS-MAC in Commo's memory while
* you are editing COMMO.MAC.
* The revised COMMO.MAC is active after you close your editor.
{:ed_cmac}
{setv file,%_hom%%_mac}
{goto ed_it}
{:ed_it}{comp ext_ed}
{ifco in_ed}
{exec-n %ext_ed %file} {goto auto}
{:in_ed}{inst file,*} {ifco auto}
{inst file,?} {ifco auto}
{edit %file} {goto auto}
{:auto} {macl %_mac,auto}
┌────────────────────────────┐
│ Menu Driver for Sessions │
└────────────────────────────┘
* This menu driver features the use of :parse to draw and fill
* boxes. It also contains :box_draw and :box_fill routines.
{:s_menu}
{setv row,%_row}
{setv col,%_col}
{sete-p0 mnu_x}
{setv mt} ;reset flags
{setv hold}
{setv count,0} ;initialize various
{setv pcount,0} ;initialize :parse
{setv c_mtit,70} ;set menu title color
{setv c_mbox,1f} ;set menu box color
{setv c_menu,17} ;set menu color
{setv c_pbox,07} ;set prompt box color
{setv c_pmpt,0e} ;set menu prompt color
{setv c_sbar,30} ;set summary bar color
{setv c_bbs,0e} ;set bbslist color
{disp 3,23,%c_mtit,┌────────────────────────────────────┐}
{disp 4,23,%c_mtit,│ Commo Mail & File fetchin' Menus │}
{disp 5,23,%c_mtit,└────────────────────────────────────┘}
{setv cmd_str,box_make 6 23 16 60 %c_mbox}
{call parse}
{setv cmd_str,box_fill 7 24 15 59 %c_menu}
{call parse}
{disp 8,27,%c_menu,1. Mark BBSes to dial}
{disp 9,27,%c_menu,2. Choose Start Time}
{disp 10,27,%c_menu,3. Make File transfer agenda}
{disp 11,27,%c_menu,4. }
{disp 12,27,%c_menu,5. }
{disp 13,27,%c_menu,6. }
{disp 14,27,%c_menu,7. }
{setv cmd_str,box_make 17 23 19 60 %c_pbox}
{call parse}
{:clect}
{disp 18,24,%c_pmpt, }
{disp 18,27,%c_pmpt,Your Choice: }
{disp ,,%c_pmpt, ^h^h}
{setg 600,mnu_x,l}
{gets-h cmd,1,mnu_x}
{comp cmd,1} {ifco mnu_1}
{comp cmd,2} {ifco mnu_2}
{comp cmd,3} {ifco mnu_3}
{comp cmd,4} {ifco mnu_4}
{goto clect}
{:mnu_1}
{disp 18,24,%c_pmpt, }
{disp 18,27,%c_pmpt,BBS Name to Mark: }
{gets cmd,8,clect}
{leng %cmd}
{comp _len,3}
{ifco-L mnu_1}
{rope %_hom%%_fon,mnu_1}
{:gto_loop}
{read line}
{inst line,%cmd}
{ifco ,gto_loop}
{rclo}
{mark %cmd}
{incr count}
{disp %count,1,%c_bbs,Marked: %cmd}
{disp 24,1,%c_sbar, CS-MAC Agenda Summary Bar }
{disp 24,34,%c_sbar,%count BBSes Marked}
{goto mnu_1}
{:mnu_2}
{disp 18,24,%c_pmpt, }
{disp 18,27,%c_pmpt,Start Dial Time (hh:mm): }
{gets hold,5,clect}
{leng %hold}
{comp _len,5}
{ifco-E ,mnu_2}
{subs test,3,1,%hold}
{comp test,:}
{ifco ,mnu_2}
{disp 24,56,%c_sbar,Holding Until %hold^m}
{setv mt,n}
{goto clect}
{:mnu_3}
{setv mt,n}
{macl action.mac,alf}
{:mnu_4}
your menu additions go here
{goto clect}
{:mnu_x}
{setv cmd_str,box_fill 3 23 19 60 00}
{call parse}
{disp %row,%col}
{:esc} {comp count} {ifco no_bar}
{comp count,0} {ifco no_bar}
{disp 24,1,%c_sbar, CS-MAC Agenda Summary Bar }
{disp 24,31,%c_sbar,%count BBSes Marked^m}
{comp hold} {ifco no_bar}
{disp 24,56,%c_sbar,Holding Until %hold^m}
{:no_bar}
{setv count}
{setv c_mtit}
{setv c_mbox}
{setv c_menu}
{setv c_pbox}
{setv c_pmpt}
{setv c_sbar}
{setv c_bbs}
{macl %_mac%,do_agenda}
┌─────────────────────────┐
│ Routine to draw a box │
└─────────────────────────┘
* Thanks to Jim Rahfeldt for speeding these routines to draw entire lines.
*
* This routine takes five arguments: start_row = %arg1
* start_col = %arg2
* end_row = %arg3
* end_col = %arg4
* box_color = %arg5
{:box_make}
{setv dlen,%arg4} ;preserve ending column value
{decr dlen} {decr dlen,%arg2} ;compute dlen = line length - 2
{subs dashes,1,%dlen,──────────────────────────────────────────────────────────────────────────────}
{disp %arg1,%arg2,%arg5,┌%dashes┐}
{:bumper}
{incr arg1}
{comp arg1,%arg3}
{ifco bottom}
{disp %arg1,%arg2,%arg5,│}
{disp %arg1,%arg4,%arg5,│}
{goto bumper}
{:bottom}
{disp %arg1,%arg2,%arg5,└%dashes┘}
{setv dlen} {setv dashes} ;free subroutine variable space
{setv arg0}
{setv arg1}
{setv arg2}
{setv arg3}
{setv arg4}
{setv arg5}
{retu}
┌─────────────────────────┐
│ Routine to fill a box │
└─────────────────────────┘
* This routine takes five arguments: start_row = %arg1
* start_col = %arg2
* end_row = %arg3
* end_col = %arg4
* fill_color= %arg5
{:box_fill}
{incr arg4} {decr arg4,%arg2} ;compute actual line length
{subs filler,1,%arg4, }
{:boxer}
{disp %arg1,%arg2,%arg5,%filler}
{incr %arg1}
{comp arg1,%arg3}
{ifco-LE boxer}
{setv filler} ;free subroutine variable space
{setv arg0}
{setv arg1}
{setv arg2}
{setv arg3}
{setv arg4}
{setv arg5}
{retu}
┌─────────────────┐
│ Parse Routine │
└─────────────────┘
* This routine parses a %cmd_str% variable into "space delimited"
* arguments. %arg0 is the routine to be called after :parse.
* Subsequent arguments %arg1, %arg2, %arg3, etc.
{:parse}
{inst %cmd_str%, }
{ifco ,eparse}
{setv pos,%_pos}
{decr pos}
{subs arg%pcount,1,%pos,%cmd_str}
{incr pos,2}
{subs cmd_str,%pos,255,%cmd_str}
{incr pcount}
{goto parse}
{:eparse}
{setv arg%pcount,%cmd_str}
{setv cmd_str}
{setv pcount,0}
{goto %arg0}
┌──────────────────────┐
│ Modem Config Macro │
└──────────────────────┘
*
* The general purpose of this macro is to provide initial setup
* of a modem.
*
* This macro reads a file called MODEM.DAT
*
* CS-MAC.MAC can send configuration strings to your modem
* CS-MAC.MAC can modify COMMO.SET with the modem initialization
* string recommended in MODEM.DAT
*
* MODEM.DAT is of this general form:
*
* Modemmake: US Robotics Courier HST
* Configure: AT^M~~AT&F^M~~~
* Configure: ATX6~&B1~&H1~&R2~S7=60~S11=55^M~~
* Configure: AT^M~~AT&W^M
* Init'lize: ATZ^M
*
* MODEM.DAT may be made by translating a DATASTORM TECHNOLOGIES, INC.
* file called MODEMS.DAT. The translation is made by the :x_late
* routine later in this macro file.
*
***********************************************************************
* *
* MODEMS.DAT COPYRIGHT (C) 1991, 1992 DATASTORM TECHNOLOGIES, INC. *
* *
* This file is used by PCINSTAL to configure PROCOMM PLUS 2.01 for *
* specific modems. PLEASE DO NOT MODIFY!! Issue Date: 12/2/92 *
* *
***********************************************************************
*
* This COMMO macro is at early stages of development. Your suggestions
* for improvement will be taken seriously.
{:modem}{setv row,%_row}
{setv col,%_col}
{call intro}
{sete-p0 e_modem}
{ifex %_hom%modem.dat,,no_file}
{rope %_hom%modem.dat,no_hit}
{comp oops} {ifco go_m}
{disp 9,25,1e,▌ Manufacturer "%temp%" not found ▐}
{:go_m} {setv temp}
{inpu temp,Enter Search criteria here}
{disp 9,25,07, }
{comp temp}
{ifco e_modem}
{setv count,1}
{clea}
{disp 1,55,0e,Searching for: }
{disp 1,70,0f,%temp}
{setv col,1}
{setv row,1}
{setv ncol,4}
{:next_m}
{disp %row,%col,87, Searching ... }
{read line}
{inst line,%temp}
{ifco label,next_m}
{:label}{inst line,modemmake:}
{ifco ,next_m}
{subs 10,12,52,%line}
{inst 10,%temp}
{ifco ,next_m}
{subs line,11,34,%line}
{disp %row,%col,07, }
{disp %row,%col,0e,%count. }
{disp %row,%ncol,07,%line}
{incr count}
{setv row,%count}
{comp count,25}
{ifco-l next_m}
{setv col,40}
{setv ncol,43}
{decr row,22}
{goto next_m}
{:no_hit}
{disp %row,%col,07, }
{comp count,1}
{ifco-g model_c}
{setv oops,y}
{goto modem}
{:model_c}
{setv cntr}
{inpu cntr,Which Number? [PgUp] sees behind box}
{comp cntr} {ifco modem}
{comp cntr,%count}
{ifco-ge model_c}
{comp cntr,0} {ifco model_c}
{setv count,1}
{clea}
{disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
{rope %_hom%modem.dat,e_modem}
{:next_n}
{read line}
{inst line,%temp}
{ifco chek,next_n}
{:chek} {inst line,modemmake:}
{ifco ,next_n}
{subs 10,12,52,%line}
{inst 10,%temp}
{ifco ,next_n}
{comp cntr,%count}
{ifco this_one}
{incr count}
{goto next_n}
{:this_one}
{setv count,1}
{setv cntr,1}
{wope-a %_hom%modem.set}
{writ}
{writ ***********************************************************************}
{writ * *}
{writ * CS-MAC.MAC has a macro which scans MODEM.DAT. Data below has been *}
{writ * selected from MODEM.DAT to best configure your COMMO/Modem combo. *}
{writ * *}
{writ ***********************************************************************}
{writ}
{writ %line}
{setv modem,%line}
{writ}
{setv cnfg,y}
{sete-p0 e_modem}
{disp 2,1,07,%modem%}
{inpu cnfg,Send Config to your Modem now?}
{:dsp_lp}
{inst line,configure}
{ifco ,no_send}
{subs line,12,70,%line}
{writ Configuration Line %count: %line%}
{:do_cnfg}
{incr count}
{inst cnfg,y}
{ifco ,no_send}
{send ~~~~~%line}
{:no_send}
{inst line,init'lize}
{ifco ,no_init}
{subs line,12,70,%line}
{setv init, ^(set _modini,%line^) From MODEM.DAT & CS-MAC.MAC}
{writ}
{writ %init%}
{writ}
{setv mod,y}
{:no_init}
{read line}
{comp line}
{ifco e_modem}
{goto dsp_lp}
{:e_modem}
{clea}
{wclo}
{rclo}
{comp mod} {ifco nonote}
{disp 1,4,07,***********************************************************************}
{disp 2,4,07,* CS-MAC.MAC has written to a file named *}
{disp 2,45,07,%_hom%MODEM.SET}
{disp 3,4,07,***********************************************************************^j^m}
{disp 7,4,07,***********************************************************************}
{disp 8,4,07,* If you wish, the new INIT can be substituted in your COMMO.SET *}
{disp 9,4,07,***********************************************************************^j^m}
{sete-p0 nonote}
{inpu mod,Modify COMMO.SET?}
{inst mod,y} {ifco ,nonote}
{exec-n copy %_hom%commo.set %_hom%commoset.bak}
{rope %_hom%commoset.bak,nonote}
{wope %_hom%commo.set}
{:set_loop}
{read line}
{inst line,_modini}
{ifco insert}
{writ %line}
{goto set_loop}
{:insert}
{writ}
{inst line,^(}
{setv pos,%_pos} {incr pos}
{subs line,%pos,80,%line}
{inst line,^)}
{setv pos,%_pos} {decr pos}
{subs l1,1,%pos,%line}
{incr pos,2}
{subs l2,%pos,80,%line}
{setv line, %l1% %l2%}
{setv l1}
{setv l2}
{writ %line}
{writ}
{writ ***********************************************************************}
{writ * CS-MAC.MAC has a macro which scans MODEM.DAT. Data below has been *}
{writ * selected from MODEM.DAT to best configure your COMMO/Modem combo. *}
{writ ***********************************************************************}
{writ}
{writ %modem}
{writ}
{writ %init}
{goto set_loop}
{:nonote}
{setv 10}
{setv mod}
{setv ncol}
{setv cntr}
{setv oops}
{setv init}
{setv modem}
{disp %row,%col}
{setv row}
{setv col}
{macl %_mac}
{:intro}{clea}
{disp 3,4,07,***********************************************************************}
{disp 4,4,07,* CS-MAC.MAC can search MODEM.DAT just like a PCBoard (Z)ippy scan. *}
{disp 5,4,07,* Enter a portion of manufacture or model or feature name to get a *}
{disp 6,4,07,* list (e.i. "HST", "v.32", "Robotics", "Turbo", "Speed", "Zyxel") *}
{disp 7,4,07,***********************************************************************}
{disp 16,4,07,***********************************************************************}
{disp 17,4,07,* *}
{disp 18,4,07,* CS-MAC.MAC standing ready to scan MODEM.DAT to configure COMMO. *}
{disp 19,4,07,* *}
{disp 20,4,07,***********************************************************************}
{retu}
{:no_file}
{disp 16,4,07,***********************************************************************}
{disp 17,4,07,* *}
{disp 18,4,07,* MODEM.DAT must be in your Commo Home directory: ( *}
{disp 19,4,07,* *}
{disp 20,4,07,***********************************************************************}
{disp 18,56,70, %_hom% }
{disp 18,,07,)}
{disp %row,%col}
{macl %_mac}
*
*─────────────────────────────────────────────────────────────────────────────
*
* {macl modem.mac,x_late} in your COMMO.MAC to start.
*
* This macro routine translates a file called MODEMS.DAT which is provided
* to support ProComm Plus. The resulting file is called MODEM.DAT.
{:x_late}
{setv row,%_row}
{setv col,%_col}
{sete-p0 e_modem}
{ifex %_hom%modems.dat,,no_fils}
{rope %_hom%modems.dat,no_hits}
{wope %_hom%modem.dat}
{:loop} {read line}
{inst line,initstring} {ifco add_in}
{inst line,transmit} {ifco add_cf}
{inst line,modem "} {ifco add_mo}
{goto loop}
{:add_in}
{setv pos,%_pos}
{incr pos,12}
{subs line,%pos,80,%line}
{inst line,"}
{setv pos,%_pos} {decr pos}
{subs line,1,%pos,%line}
{setv line,Init'lize: %line}
{writ %line}
{goto loop}
{:add_cf}
{setv pos,%_pos}
{incr pos,10}
{subs line,%pos,80,%line}
{inst line,"}
{setv pos,%_pos} {decr pos}
{subs line,1,%pos,%line}
{setv line,Configure: %line}
{writ %line}
{goto loop}
{:add_mo}
{writ}
{setv pos,%_pos}
{incr pos,7}
{subs line,%pos,80,%line}
{inst line,"}
{setv pos,%_pos} {decr pos}
{subs line,1,%pos,%line}
{setv line,Modemmake: %line}
{writ %line}
{goto loop}
{:no_hits}
{wclo}
{rclo}
{disp %row,%col}
{macl %_mac}
{:no_fils}
{disp 16,4,07,***********************************************************************}
{disp 17,4,07,* *}
{disp 18,4,07,* MODEMS.DAT must be in your Commo Home directory: ( *}
{disp 19,4,07,* *}
{disp 20,4,07,***********************************************************************}
{disp 18,57,70, %_hom% }
{disp 18,,07, )}
{disp %row,%col}
{macl %_mac}
┌────────────────────────────────────────┐
│ Routine to strip comments from .MACs │
└────────────────────────────────────────┘
* This routine opens a .MAC file that you specify, reads it
* line by line, deletes lines that have an asterisk within the first
* three characters, and removes comments following a semi-colon.
* The new file has a file extension of .CFS
*
* The purpose of this routine is to minimize RAM usage by
* shortening MAC files.
{:strip}
{sete-p0 e_strip}
{setv file,%_hom%}
{:re_in}{inpu file,name of .MAC file to strip}
{inst %file,.} {ifco ,nodot} {setv pos,%_pos} {decr pos}
{subs file,1,%pos,%file} {setv pos}
{:nodot}{ifex %file%.mac,,re_in} ;make sure file exists
{clea}
{disp 3,1,,Stripping %file%.MAC into %file%.CFS^m^j}
{disp ,,,Line: }
{rope %file%.mac,e_strip} ;open .MAC to read
{wope %file%.cfs} ;open .CFS to write
{setv count,0}
{:s_loop}
{incr count}
{disp ,7,,%count}
{read line}
{comp line} {ifco no_com} ;write empty lines
{subs temp,1,3,%line} ;look at first three chars
{inst temp,*} {ifco s_loop} ; if a * skip the line
{subs temp,1,11,%line} ;look at first 11 chars
{inst temp,^(} {ifco ,no_com} ;look for a left curley
{subs line,%_pos,255,%line} ;delete leading whitespace
{inst line,;} {ifco ,no_com} ;look for a semicolon
{setv pos,%_pos} {decr pos} ;get semicolon position
{subs temp,%pos,255,%line} ;what follows semicolon?
{inst temp,^)} {ifco no_com} ; if a right curly, write!
{inst temp,)} {ifco no_com} ; if a right paren, write!
{subs line,1,%pos,%line} ;otherwise, delete comment
{:no_com}
{writ %line} ;xxx.MAC --> xxx.CFS file
{goto s_loop} ;read next line
{:e_strip}
{setv count}
{wclo} ;close .CFS file
{disp 6,1,,%file.mac has been stripped into %file.cfs^m^j}
{exec-w10 dir %file.*}
{macl %_mac%,ret%ret} ;reload base.MAC
┌──────────────────────────────────┐
│ Menu driven .CFG file Routines │
└──────────────────────────────────┘
* These macro routines are designed for easy expansion and upgrading.
* After a user has run CS-MAC once, future upgrades will build on the
* initial configuration file.
* This macro also copes when a user skips versions .... the resulting
* .CFG file will have all (and only) new variable definitions appended.
* The CS-MAC user won't need to edit old, unchanged data.
{:new_user}
{call welcome}
{sete-p0 upgrade}
{call make_cfg} ;make default .cfg file
{:upgrade}
{sete-p0 ver_loop}
{call thanks}
{setv ver_ck,%ver} ;set var to check .cfg version
{:ver_loop}
{decr ver_ck} ;start looking for older .cfg
{leng %ver_ck}
{comp %_len,1} {ifco ,no_pad} ;pad single digit version name
{setv ver_ck,0%ver_ck} ; with a leading zero
{:no_pad}
{ifex %_hom%cs-mac%ver_ck.cfg,appnd} ;looking for old .cfg file
{comp ver_ck,06} {ifco ,ver_loop} ;if version = 06
{setv ver_ck} {goto f_loop} ;use CS-MAC.CFG (default)
{:appnd}
{wope-a %_hom%cs-mac%ver_ck.cfg} ;open old .cfg in append
{call %ver_ck} ;add new default variables
{:f_loop}
{sete-p0 bail_out}
{rope %_hom%cs-mac%ver_ck.cfg,ready} ;open old cs-macxx.cfg to read
{wope %_hom%cs-mac%ver.cfg} ;open newest version cs-mac.cfg
{writ * CS-MAC%ver.CFG} ;Header for newest .CFG file
{writ * %_dat% %_tim%}
{writ}
{disp 9,22,,Remember ... Alt-Y will erase input field}
{:ug_loop}
{read line}
{inst line,*} {ifco write} ;keep old default headers
{comp line} {ifco write} ;write blank lines
{inst line,;} {ifco ,no_pmt} ;use semicolon for prompts
{setv pos,%_pos} {incr pos}
{subs prompt,%pos,30,%line}
{inst line, } ;use two spaces to end variable
{setv pos,%_pos} {decr pos} ; to allow space in name, etc.
{subs line,1,%pos,%line}
{:no_pmt}
{inst line,,} {ifco ,ug_loop} ;is this a variable definition?
{setv pos,%_pos} {decr pos}
{subs var,1,%pos,%line}
{incr pos,2}
{subs valu,%pos,40,%line}
{inpu valu,%var = %prompt} ;setv according to .cfg
{setv pad, }
{leng %var%,%valu}
{setv pad_l,40}
{decr pad_l,%_len}
{subs pad,1,%pad_l,%pad}
{writ %var%,%valu%%pad%;%prompt}
{goto ug_loop} ;loop until .cfg all read
{:write}{writ %line} {goto ug_loop}
{:bail_out}
{rclo}
{wclo}
{exec-n del %_hom%cs-mac%ver.cfg}
{goto commo}
{:ready}
{sete-p0 commo}
{wclo}
{disp 9,20,, }
{disp 9,1,,%_hom%cs-mac%ver%.cfg has been written.}
{disp 10,1,,It will be read into your COMMO startup.^j^j^m}
{paus 10}
{:commo}{setv var} {setv valu}
{setv pos} {setv prompt}
{setv pad} {setv pad_l}
{setv ver_ck}
{wclo}
{macl %_mac%,start}
{:welcome}
{sete-p0 w_esc}
{ifex %_hom%how,,no_how}
{rope %_hom%how,end_w}
{setv count,1}
{stat n}
{:w_lop}{read line}
{disp ,,, %line^m^j}
{incr count}
{comp count,20}
{ifco-l w_lop}
{disp ,,,^m^j Press Spacebar to continue ... }
{setl 60,w_esc}
{look }
{:w_esc}{setv count,1}
{disp ,,,^m ^m}
{goto w_lop}
{:end_w}{sete-p0 no_how}
{disp ,,,^m^j Press Spacebar to continue ... }
{setl 60,w_lop}
{look }
{disp ,,,^m ^m}
{:no_how}
{stat y}
{clea}
{disp ,,, Welcome to the CS-MAC series!^m^j}
{disp ,,, A default config file (CS-MAC.CFG) has been written for you ... ^m^j}
{retu}
{:thanks}
{disp ,,,^j^j^m}
{disp ,,, Thank you for using the CS-MAC series.^m^j}
{disp ,,, You will now be prompted to confirm or change the setting^m^j}
{disp ,,, of variables for your *PERSONAL* %hom%CS-MAC%ver%.CFG file.^m^j}
{retu}
{:make_cfg}
{wope %_hom%cs-mac.cfg}
{writ * CS-MACxx Default Version %ver}
{writ}
{writ * The config file feature of the CS-MAC series}
{writ * is designed to make future upgrades easier.}
{writ}
{writ * An empty line or a line with a "*" in it will be ignored}
{writ * during variable definition. These are comment lines.}
{writ}
{writ * The order of "setv" items is unimportant.}
{writ}
{writ * Each variable setting line in this .CFG file has}
{writ * this form variable,value ;comment here}
{writ}
{writ name,Chuck Seyboldt ;your logon name}
{writ sig,Chuck∙S ;your signature}
{writ v_ph,414-250-0512 ;your Voice Phone Number}
{writ d_ph,207-761-4782 ;your Data Phone Number}
{writ b_day,04/23/65 ;your Birthdate}
{writ auto,n ;"y" for Autopilot ON}
{writ xpert,n ;"y" for complex DOORWAY toggle}
{writ ramdr,d: ;your RAMDrive}
{writ bu_dr,b: ;Backup drive for .MACs}
{writ dosdir,c:\dos ;your DOS dir}
{writ ins_dir,c:\co\ins ;dir for docs & instructions}
{writ lst_dir,c:\doc ;dir for BBS file list storage}
{writ savedir,c:\co\sav ;dir for capture files}
{writ utildir,c:\util ;dir for utility programs}
{writ ext_ed,c:\util\qedit.exe ;drive:\path\external_editor}
{writ ext_li,c:\util\list.com ;drive:\path\external_lister}
{writ pk_zip,c:\util\pkzip.exe ;drive:\path\ZIP_program}
{writ pk_un,c:\util\pkunzip.exe ;drive:\path\UNZIP_program}
{writ prot,z ;file trans protocol (z,y,x)}
{writ mprot,z ;mail trans protocol (z,y,x)}
{writ qwkdr,c:\qwk ;dir for .QWK files}
{writ repdr,c:\qwk ;dir for .REP files}
{writ reader,c:\jr\jabber.exe ;your mail reader program}
{writ tagfile,c:\jr\taglines.tag ;filename for your taglines}
{writ qrdr,qwk ;.QWK packet rename routine}
{writ znr,znr ;.ZNS packet rename routine}
{writ handle,cboldt ;handle for Internet use}
{writ znrdr,c:\znr ;dir for ZIPNEWS reader}
{writ znpak,c:\qwk ;dir for ZIPNEWS packets}
{writ cap,%%savedir\%%_mon%%%%_day.cap ;capture filename}
{:07} {writ}
{writ shh, ;if "y", quiets speech}
{writ color,y ;Answer to ANSI graphics? prompt}
{writ fast, q ns ;"quick non-stop" modifiers}
{writ random_t,30 ;Max 60...# of lines in tagfile}
{writ ext_fl,c:\dos\commopns.exe ;Name of upload lister}
{writ ext_di,c:\util\phone.exe ;Name of external dialer}
{writ}
{writ * New variables will be appended based on the}
end ver {writ * latest CS-MACxx.CFG in your %_hom directory}
{:08} {writ}
(writ v9_var,version9 ;append later version vars here)
end ver (writ v9_v#2,version_9 ;follow this example format)
{:09} (writ)
(writ v10_var,version10 ;even later version!)
end ver (writ v10_v#2,version_10 ;more .cfg expansion)
{:10} (writ)
{wclo}
{retu}