home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / editor / tvx_edit.arc / TVX_CFG.C < prev    next >
C/C++ Source or Header  |  1986-03-17  |  17KB  |  701 lines

  1.  
  2. /* -------------------------- tvx_cfg.c --------------------------- */
  3. #include "tvx_defs.ic"
  4.  
  5. #define BL remark("")
  6.  
  7.     char synofr[20] =    /* from table */
  8.       {' ',13,']',000,000,000,000,000,000,000,00,00,00,00,00,00,00,00,00,00};
  9.     char synoto[20] =        /* translate to table */
  10.       {'r','d','{',00,000,0,000,00,00,000,00,00,00,00,00,00,00,00,00,00};
  11.     char funkey = 0;        /* leading char for function key */
  12.     char funchar[50] =    /* code sent by function key */
  13.       {
  14.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  15.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  16.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  17.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  18.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  19.       };
  20.     char funcmd[50] =    /* equivalent command */
  21.       {
  22.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  23.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  24.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  25.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  26.     000, 000, 000, 000, 000, 000, 000, 000, 000, 000,
  27.       };
  28.  
  29. /* define standard command set */
  30.  
  31.     char lexsym[LEXVALUES+1] = { E0, 'r', 'l', 'd', 'u',
  32.       4, 21, 8, 'k', 'i', 11, '"', '\'', ',', '.', 'f', 6, 'p',
  33.       'b', 'e', 2, 'v', 'o', '/', 's', 'g', 23, 25, 24, ';', '&',
  34.       'm', ':', '=', 7, 9, '{', 'a', 16, '?', 'h', 20, 'c', 'j', 't',
  35.       'n', 14, 15, 5, 18, '#', '*', '(', ')','~' };
  36.  
  37.  
  38.     char autoin, dsplin, scroll, xcases, warplm, wildch, funesc, cut_mode;
  39.     char rp[80];
  40.  
  41.     FILE *f, *fopen();
  42.     char cupper(), clower();
  43.  
  44.   main()
  45.   {
  46.  
  47.     SLOW int i, val, retcode;
  48.  
  49.     cls();
  50.     remark("Standard TVX define a configuration file -- Version 2/27/86");
  51.     BL;
  52.     for (;;)
  53.       {
  54.     prompt("Enter name of file to save configuration in: ");
  55.     reply(rp,79);
  56.     if ((f = fopen(rp,FILEWRITE)) == 0)
  57.         continue;
  58.     else
  59.         break;
  60.       }
  61.  
  62.  
  63.     cls();
  64.     shoset();
  65.     BL;
  66.     for (;;)
  67.       {
  68.     BL;
  69.     prompt("Use standard command definitions? (y/n) ");
  70.     lreply(rp,10);
  71.     if (*rp == 'y')
  72.       {
  73.         goto LEXDONE;
  74.       }
  75.     else if (*rp == 'n')
  76.         break;
  77.       }
  78.  
  79. CMDAGAIN:
  80.     retcode = 1;        /* start with things ok */
  81.     for (;;)
  82.       {
  83.     short_cls();
  84.     shoset();
  85.     if (retcode < 0)
  86.         remark("Invalid value supplied for new command.  Try again!");
  87.     if ((retcode = set()) == 0)
  88.         break;
  89.       }
  90.     short_cls();
  91.     shoset();
  92.     remark("");
  93.     prompt("Are you finished setting commands? (y/n) ");
  94.     ureply(rp,2);
  95.     if (*rp != 'Y')
  96.     goto CMDAGAIN;
  97.     
  98.  
  99.     
  100.  
  101. LEXDONE:
  102.     for (i=0 ; i <= LEXVALUES ; ++i)    /* write out lex symbols */
  103.       {
  104.     fputc(lexsym[i],f);        /* write to file */
  105.       }
  106.     syno();
  107.     funkeys();
  108.  
  109.     cls();
  110.     prompt("Use autoindent (n default) (y/n): ");
  111.     lreply(rp,10);
  112.     if (*rp == 'y')
  113.     fputc(1,f);
  114.     else 
  115.     fputc(0,f);
  116.  
  117.     BL;
  118.     prompt("Home display line: (1-66, 16 default): ");
  119.     rdint(&val);
  120.     if (val > 66 || val <= 0)
  121.     fputc(16,f);
  122.     else
  123.         fputc(val,f);
  124.  
  125.     BL;
  126.     prompt("Scroll window (0 default): ");
  127.     rdint(&val);
  128.     if (val > 24)
  129.     val = 0;
  130.     fputc(val,f);
  131.  
  132.     BL;
  133.     prompt("Find case (e=exact,a=any, any default): "); 
  134.     lreply(rp,10);
  135.     if (*rp == 'e')
  136.         fputc(1,f);
  137.     else
  138.         fputc(0,f);
  139.  
  140.     BL;
  141.  
  142.     prompt("Auto line wrap width (0 default): ");
  143.     rdint(&val);
  144.     if (val > 79)
  145.     val = 0;
  146.     fputc(val,f);
  147.  
  148.     BL;
  149.     prompt("Use wild cards (y default) (y/n)? ");
  150.     lreply(rp,10);
  151.     if (*rp == 'n')
  152.     fputc(0,f);
  153.     else 
  154.     fputc(1,f);
  155.  
  156.     BL;
  157.     prompt("Use BACKUP.LOG file (n default) (y/n)? ");
  158.     lreply(rp,10);
  159.     if (*rp == 'y')
  160.         fputc(1,f);
  161.     else
  162.         fputc(0,f);
  163.     
  164.     BL;
  165. prompt("Use 'cut mode' (killed lines to save buffer too)? (n default) (y/n)? ");
  166.     lreply(rp,10);
  167.     if (*rp == 'y')
  168.         fputc(1,f);
  169.     else
  170.         fputc(0,f);
  171.  
  172. #ifdef MSDOS
  173.     BL;
  174.     remark("The editor can recognize Ctrl-z as EOF, or it can ignore ^Z and");
  175.     remark("just use the standard MS-DOS end of file mark.");
  176.     prompt("Should the editor recognize Ctrl-Z as EOF? (n default) (y/n) ");
  177.     lreply(rp,10);
  178.     if (*rp == 'y')
  179.         fputc(1,f);
  180.     else
  181.         fputc(0,f);
  182. #endif
  183. #ifdef GEMDOS
  184.     fputc(1,f);        /* use ^Z on gemdos by default */
  185. #endif
  186.  
  187.     cls();
  188.     remark("Configuration file created.");
  189.     fclose(f);
  190.   }
  191.  
  192. /* =============================>>> SHOSET  <<<============================= */
  193.   shoset()
  194.   {  /* show repeat buffer, help if available */
  195.  
  196.     static char rp[2];
  197.     FAST int i;
  198.     SLOW char *cp, *msg;
  199.     SLOW int fields, oldtty, hnum;
  200.     SLOW unsigned tmp;
  201.  
  202.     struct help_msg 
  203.       {
  204.     char *hmsg;
  205.     char Vmsg;
  206.       };
  207.  
  208.     static struct help_msg cmddes[] =    /* messages for help */
  209.       {
  210.     {"nApnd to sv buff", VSAPPEND},    {" Buffer beg     ",    VTOP},
  211.     {" File beg",         VFBEGIN},    {"nChange chars   ",    VCHANGE},
  212.     {"nDown line      ", VDOWNLINE},{"nDown column",    VDOWNCOL},
  213.     {" Buffer end     ", VBOTTOM},    {"nEdit rpt buffer",    VEDITRPT},
  214.     {"nFind",            VSEARCH},    {" Find cross-buff",    VNEXT},
  215.     {" Get save buffer", VGET},    {" Unkill lastline",    VUNKILL},
  216.     {"nHalf page      ", VHALFP},    {"nInsert (to ESC)",    VINSERT},
  217.     {" Jump back",         VJUMP},    {"nKill character ",    VDELNEXT},
  218.     {"nKill line      ", VKILLALL},    {"nLeft",        VLEFT},
  219.     {" Memory status  ", VMEMORY},    {"nNote location  ",    VNOTELOC},
  220.     {"nReset loc",         VRETNOTE},    {"nOpen line      ",    VOPENLINE},
  221.     {" Call Opr system", VSYSTEM},    {"nPage",        VFLIP},
  222.     {" Print screen   ", VPRINTS},    {"nRight          ",    VRIGHT},
  223.     {" Restore rpt buf", VSTORERPT},{"nSave lines     ",    VSAVE},
  224.     {"nTidy, fill text", VTIDY},    {" Abort",        VABORT},
  225.     {"nUp             ", VUPLINE},    {"nUp column      ",    VUPCOL},
  226.     {" Verify screen",   VVERIFY},    {"nWrite buffer   ",    VWPAGE},
  227.     {" Exit, end edit ", VQUIT},    {"nYank file",        VYANK},
  228.     {"nDel prev char  ", VDELLAST},    {"nFind again     ",    VSAGAIN},
  229.     {" Del last",         VREMOVE},    {" Change last    ",    VRMVINS},
  230.     {" Del to line beg", VKILLPREV},{" Del to line end",    VKILLREST},
  231.     {" Line begining  ", VBEGLINE},    {" Line end       ",    VENDLINE},
  232.     {"nWord right",         VMVWORD},    {"nWord left      ",    VMVBWORD},
  233.     {"nRepeat again   ", VXREPEAT},    {"nk Exec rpt k n times",VEXECRPT},
  234.     {"n p Set param p ", VSETPARS},    {" Help           ",    VHELP},
  235.     {" Insert find pat",     VINSPAT},{"nChange case      ",VFOLDCASE},
  236.     {"/",0}            /* last variable entry */
  237.       };
  238.  
  239. remark("Commands settable by this program:  (n => count allowed):");
  240.     for (hnum = fields = 0  ; ; ++hnum )
  241.       {
  242.     prompt("   ");
  243.     cp = cmddes[hnum].hmsg;
  244.     if (*cp == '/')    /* end of variable list */
  245.         break;
  246.     else
  247.         shocout(*cp);    /* show n or blank */
  248.     msg = ++cp;        /* where message is, skipping 'n' field */
  249.     while (*cp)        /* ship to lex value */
  250.         ++cp;
  251.     i = cmddes[hnum].Vmsg;        /* get the lexical index */
  252.     shocout(cupper(lexsym[i]));    /* show the command */
  253.     if (lexsym[i] >= ' ')
  254.         shocout(' ');    /* skip space for no '^' */
  255.  
  256.     shocout(' ');        /* space to separate */
  257.     prompt(msg);        /* and show the message */
  258.     if (++fields == 3)    /* bump fields, see if need newline */
  259.       {
  260.         fields = 0;
  261.         remark("");
  262.       }
  263.       }
  264.     remark("");
  265. remark("Note: <> repeat, @ command file, and ESCAPE cannot be changed.");
  266.   }
  267.  
  268. /* =============================>>> SHOCOUT <<<============================= */
  269.   shocout(c)
  270.   char c;
  271.   {
  272.  
  273.     if (c < ' ')
  274.       {
  275.     printf("^%c",c + '@');
  276.       }
  277.     else
  278.     printf("%c",c);
  279.   }
  280.  
  281. /* ===============================>>> FUNKEYS <<<========================*/
  282.   funkeys()
  283.   {
  284.  
  285.     SLOW int j,i,val;
  286.     SLOW int fun;
  287.  
  288. FAGAIN:
  289.     cls();
  290.     remark("You may now define up to 49 function keys to be translated to");
  291.     remark("commands OR letters.  This translation will take place before");
  292.     remark("the editor gets the character at any level  -- thus the translation");
  293.     remark("will apply equally to command mode and insert mode.  The translation");
  294.     remark("assumes each function key generates a 2 character sequence.  The");
  295.     remark("first character is an 'escape' character that must be the same for");
  296.     remark("each key.  If the 'escape' character is really ESC, then you must");
  297.     remark("also define one function key to have ESC as its translation value.");
  298.     remark("When asked for the function key, simply press the key, followed by");
  299.     remark("RETURN.  Enter either the character or decimal value of the translation.");
  300.  
  301.     for (i = 0 ; i < 50 ; ++i)
  302.       {
  303.     funchar[i] = funcmd[i] = 0;
  304.       }
  305.  
  306.     BL;
  307.     prompt("Do you want to define any function keys? (y/n) ");
  308.     lreply(rp,10);
  309.     if (*rp == 'n')
  310.     goto WTFUN;
  311.  
  312.     BL;
  313.     remark("Now, please press ANY function key so the program can identify");
  314.     prompt("the 'function key escape' code (followed by a RETURN): ");
  315.     reply(rp,10);
  316.     funesc = *rp;        /* this should be the escape char */
  317.     if (funesc == 27)
  318.       {
  319.     BL;
  320.     remark("IMPORTANT:  You MUST define a function key to send an ESCAPE (decimal 27).");
  321.     remark("If you don't, then you won't be able to end insert mode or repeat loops.");
  322.     remark("The program doesn't have logic to make sure you do this, so don't forget!");
  323.     BL;
  324.       }
  325.  
  326.     for (i = 0 ; i < 50 ; ++i)
  327.       {
  328. FUNAGAIN:
  329.     prompt("Press function key to define (RETURN only to exit): ");
  330.      rp[1] = 0;
  331.     reply(rp,10);
  332.     fun = rp[1];
  333.     if (rp[1] == 0)
  334.         break;
  335.     for (j = 0 ; j < 50 ; ++j)
  336.       {
  337.         if (fun == funchar[j])
  338.           {
  339.         remark("That's been used already, try again.");
  340.         goto FUNAGAIN;
  341.           }
  342.       }
  343.     funchar[i] = fun;
  344.     prompt("Now enter the character/command it gets translated to: ");
  345.     reply(rp,10);
  346.     val = getval(rp);
  347.     funcmd[i] = val;
  348.       }
  349.  
  350.     cls();
  351. remark("Functions have been defined. You can start over if you made any mistakes.");
  352.     remark("");
  353.     prompt("Are they ok? (y/n) ");
  354.     lreply(rp,10);
  355.     if (*rp == 'n')
  356.     goto FAGAIN;
  357.  
  358. WTFUN:
  359.     for (i = 0 ; i < 50 ; ++i)
  360.       {
  361.     fputc(funchar[i],f);
  362.       }
  363.     for (i = 0 ; i < 50 ; ++i)
  364.       {
  365.     fputc(funcmd[i],f);
  366.       }
  367.     fputc(funesc,f);
  368.   }
  369.   
  370.  
  371. /* ===============================>>> GETVAL <<<========================*/
  372.   getval(str)
  373.   char *str;
  374.   {
  375.     /* return one byte value */
  376.  
  377.     if (*str >= '0' && *str <= '9')
  378.     return (atoi(str));
  379.     else
  380.     return (*str & 0377);
  381.   }
  382.  
  383. /* ===============================>>> SET <<<========================*/
  384.   set()
  385.   {
  386.     /* set newlex[indx] to a new value */
  387.  
  388.     SLOW int val,i, oldi;
  389.  
  390. SAGAIN:
  391. prompt("Enter current command to change (key or decimal value, RETURN to exit) ");
  392.     reply(rp,10);
  393.     val = clower(getval(rp));
  394.  
  395.     if (val == 0)
  396.       {
  397.     return 0;
  398.       }
  399.     for (oldi = 1 ; oldi <= LEXVALUES ; ++oldi)
  400.       {
  401.     if (val == lexsym[oldi])
  402.       {
  403.         goto HAVEIT;
  404.       }
  405.       }
  406.     
  407.     return -1;    
  408.     
  409. HAVEIT:
  410.     prompt("Enter NEW command (key or decimal value, RETURN to exit) ");
  411.     reply(rp,10);
  412.     val = clower(getval(rp));
  413.     if (val == 0 || val == '@' || val == 27 || val == '<' || val == '>')
  414.     return -1;
  415.     for (i = 1 ; i <= LEXVALUES ; ++i)
  416.       {
  417.     if (val == lexsym[i])
  418.       {
  419.         return -1;        /* duplicate */
  420.       }
  421.       }
  422.     lexsym[oldi] = val;
  423.     return 1;
  424.   }
  425.  
  426. /* ===============================>>> SYNO <<<========================*/
  427.   syno()
  428.   {
  429.  
  430.     SLOW int j, i, valfrom, valto, found;
  431.     
  432. SAGAIN:
  433.     cls();
  434.     remark("You may now define up to 19 synonyms.  For example, you might");
  435.     remark("want to define a space to be a synonym for right, or RETURN");
  436.     remark("the same as down.  You must use unused values, however.  You");
  437.     remark("can't use a existing command as a synonym.  You may enter the");
  438.     remark("character followed by a RETURN, or the decimal value of the key.");
  439.  
  440.     for (i = 0 ; i < 20 ; ++i)
  441.       {
  442.     synofr[i] = synoto[i] = 0;
  443.       }
  444.  
  445.     for (i = 0 ; i < 19 ; ++i)
  446.       {
  447. SYNAGAIN:
  448.     BL;
  449.     prompt("Enter the new synonym (RETURN when done): ");
  450.     reply(rp,10);
  451.     valfrom = getval(rp);
  452.     if (valfrom == 0)
  453.         break;
  454.     for (j = 1 ; j <= LEXVALUES ; ++j)
  455.       {
  456.         if (lexsym[j] == valfrom)
  457.           {
  458.         remark("That is already a command! Try again.");
  459.         goto SYNAGAIN;
  460.           }
  461.       }
  462.     prompt("Enter the equivalent command: ");
  463.     reply(rp,10);
  464.     valto = getval(rp);
  465.     for (j = 1, found = FALSE ; j <= LEXVALUES ; ++j)
  466.       {
  467.         if (lexsym[j] == valto)
  468.             found = TRUE;
  469.       }
  470.     if (!found)
  471.       {
  472.         remark("That is not a defined command. Try again.");
  473.         goto SYNAGAIN;
  474.       }
  475.  
  476.     synofr[i] = valfrom;
  477.     synoto[i] = valto;
  478.       }
  479.     cls();
  480.  
  481. remark("Synonyms have been defined. You can start over if you made any mistakes.");
  482.     remark("");
  483.     prompt("Are they ok? (y/n) ");
  484.     lreply(rp,10);
  485.     if (*rp == 'n')
  486.     goto SAGAIN;
  487.  
  488.     for (i = 0 ; i < 20 ; ++i)
  489.         fputc(synofr[i],f);
  490.     for (i = 0 ; i < 20 ; ++i)
  491.         fputc(synoto[i],f);
  492.  
  493.   }
  494.  
  495. /* ===============================>>> CLS <<<========================*/
  496.   cls()
  497.   {
  498.     int i;
  499.     for (i = 0 ; i < 25 ; ++i)
  500.     remark("");
  501.   }
  502.  
  503. /* ===============================>>> short_CLS <<<========================*/
  504.   short_cls()
  505.   {
  506.     int i;
  507.     for (i = 0 ; i < 10 ; ++i)
  508.     remark("");
  509.   }
  510.  
  511. #define EXTENDED    /* my own extended lib functions */
  512. /* #define STANDARD    /* the set of standard functions i use */
  513. #define LOCAL static    /* make all local globals, i think */
  514.  
  515. #ifdef EXTENDED
  516. /*=============================>>> CLOWER  <<<================================*/
  517.   char clower(ch)
  518.   char ch;
  519.   {
  520.     return ((ch >='A' && ch<='Z') ? ch + ' ' : ch);
  521.   }
  522.  
  523. /*=============================>>> CUPPER  <<<================================*/
  524.   char cupper(ch)
  525.   char ch;
  526.   {
  527.     return ((ch >= 'a' && ch <= 'z') ? ch - ' ' : ch);
  528.   }
  529.  
  530. /* =========================>>> LOWER  <<<==============================*/
  531.   lower(str)
  532.   char str[];
  533.   {
  534.     SLOW int i;
  535.  
  536.     for (i=0 ; str[i] ; ++i)
  537.     str[i]=clower(str[i]);
  538.  
  539.   }
  540.  
  541. /*=============================>>> PROMPT <<<================================*/
  542.   prompt(msg)
  543.   char msg[];
  544.   {
  545.     printf("%s",msg);
  546.   }
  547.  
  548.  
  549. /*=============================>>> REMARK <<<================================*/
  550.   remark(msg)
  551.   char msg[];
  552.   {
  553.     printf("%s\n",msg);
  554.   }
  555.  
  556. /*=============================>>> UPPER  <<<================================*/
  557.   upper(str)
  558.   char str[];
  559.   {
  560.     static int i;
  561.  
  562.     for (i=0 ; str[i] ; ++i)
  563.     str[i]=cupper(str[i]);
  564.   }
  565.  
  566.  
  567. /*=============================>>> LREPLY <<<================================*/
  568.   lreply(msg,maxc)
  569.   char msg[];
  570.   int maxc;
  571.   {
  572.     reply(msg,maxc);
  573.     lower(msg);
  574.   }
  575.  
  576. /*=============================>>> UREPLY <<<================================*/
  577.   ureply(msg,maxc)
  578.   char msg[];
  579.   int maxc;
  580.   {
  581.     reply(msg,maxc);
  582.     upper(msg);
  583.   }
  584.  
  585. /*=============================>>> REPLY <<<================================*/
  586.   reply(msg,maxc)
  587.   char msg[];
  588.   int maxc;
  589.   {
  590. #ifdef UNIX
  591.     gets(msg);
  592. #else
  593.     mreply(msg,maxc);
  594. #endif
  595.   }
  596.  
  597. /*=============================>>> RDINT <<<================================*/
  598.   rdint(val)
  599.   int *val;
  600.   {
  601.     char chrrep[12];
  602.     reply(chrrep,11);
  603.     *val = atoi(chrrep);
  604.   }
  605. #endif
  606. #ifndef UNIX
  607. /*=============================>>> MREPLY <<<================================*/
  608.   mreply(msg,maxc)
  609.   char msg[];
  610.   int maxc;
  611.   {
  612. #define CBS 8        /* Backspace */
  613. #define CDL1 21        /* ^U */
  614. #define CDL2 24        /* ^X */
  615. #define CABORT 3    /* ^C */
  616. #define CRET 13        /* cr */
  617. #define BACKSPACE 8
  618.  
  619.     static char ch, rp;
  620.     static int i;
  621.  
  622.  
  623.     for (i = 0 ; i < maxc ; )    /* i -> next char */
  624.       {
  625.     ch = ttrd_();     /* read the character */
  626.     if (ch == CBS)        /* back space */
  627.       {
  628.         if (i > 0)        /* must be something to delete */
  629.           {
  630.         --i;        /* wipe out char */
  631.         ttwt_(BACKSPACE); ttwt_(' '); ttwt_(BACKSPACE);
  632.         if (msg[i] < ' ')    /* double echo ^ chrs */
  633.           {
  634.             ttwt_(BACKSPACE); ttwt_(' '); ttwt_(BACKSPACE);
  635.           }
  636.           }
  637.       }
  638. #ifdef USE_WIPE
  639.     else if (ch == CDL1 || ch == CDL2)    /* wipe whole line */
  640.       {
  641.         i = 0;        /* set for loop ++ */
  642.         remark("#");
  643.         prompt("Re-enter? ");
  644.       }
  645. #endif
  646.     else if (ch == CABORT)
  647.       {
  648.         remark("^C");
  649.         prompt("Exit to operating system - are you sure? (y/n) ");
  650.         rp = ttrd_();
  651.         if (rp == 'y' || rp =='Y')
  652.          {
  653.         remark("y");
  654.         exit(0);
  655.          }
  656.         remark("n");
  657.         msg[i] = 0;
  658.         prompt("Re-enter? "); prompt(msg);        /* re-echo */
  659.       }
  660.     else if (ch == CRET)        /* ret, so done */
  661.       {
  662.         remark("");
  663.         msg[i] = 0;
  664.         return;
  665.       }
  666.     else
  667.       {
  668.         msg[i++] = ch;
  669.         msg[i] = 0;            /* always 0 terminate */
  670.         if (ch < ' ')
  671.           {
  672.         ch += '@';
  673.         ttwt_('^');
  674.           }
  675.         ttwt_(ch);            /* echo char */
  676.       }
  677.       } /* end for */
  678.  
  679.     remark("");
  680.   }
  681.  
  682. /*=============================>>> ttrd_ <<<================================*/
  683.   ttrd_()
  684.   {
  685. #ifdef MSDOS
  686.     return (bdos(7,-1) & 0377);
  687. #endif
  688. #ifdef GEMDOS
  689.     return (gemdos(7) & 0377);
  690. #endif
  691.   }
  692.  
  693. /*=============================>>> ttwt_ <<<================================*/
  694.   ttwt_(c)
  695.   char c;
  696.   {
  697.     fprintf(stderr,"%c",c);
  698.   }
  699. #endif
  700. /* -------------------------- tvx_cfg.c --------------------------- */
  701.