1: #ifndef lint
   2: static char sccsid[] = "@(#)lcmd.c	3.24 4/24/85";
   3: #endif
   4: 
   5: /*
   6:  * Copyright (c) 1983 Regents of the University of California,
   7:  * All rights reserved.  Redistribution permitted subject to
   8:  * the terms of the Berkeley Software License Agreement.
   9:  */
  10: 
  11: #include "defs.h"
  12: #include "value.h"
  13: #include "lcmd.h"
  14: 
  15: int l_alias();
  16: int l_close();
  17: int l_cursormodes();
  18: int l_debug();
  19: int l_echo();
  20: int l_escape();
  21: int l_foreground();
  22: int l_iostat();
  23: int l_label();
  24: int l_list();
  25: int l_nline();
  26: int l_select();
  27: int l_shell();
  28: int l_source();
  29: int l_terse();
  30: int l_time();
  31: int l_unalias();
  32: int l_unset();
  33: int l_variable();
  34: int l_window();
  35: int l_write();
  36: 
  37: struct lcmd_arg arg_alias[];
  38: struct lcmd_arg arg_cursormodes[];
  39: struct lcmd_arg arg_debug[];
  40: struct lcmd_arg arg_echo[];
  41: struct lcmd_arg arg_escape[];
  42: struct lcmd_arg arg_foreground[];
  43: struct lcmd_arg arg_label[];
  44: struct lcmd_arg arg_nline[];
  45: struct lcmd_arg arg_close[];
  46: struct lcmd_arg arg_select[];
  47: struct lcmd_arg arg_shell[];
  48: struct lcmd_arg arg_source[];
  49: struct lcmd_arg arg_terse[];
  50: struct lcmd_arg arg_time[];
  51: struct lcmd_arg arg_unalias[];
  52: struct lcmd_arg arg_unset[];
  53: struct lcmd_arg arg_window[];
  54: struct lcmd_arg arg_write[];
  55: struct lcmd_arg arg_null[] = 0;
  56: 
  57: struct lcmd_tab lcmd_tab[] = {
  58:     "alias",    1,  l_alias,    arg_alias,
  59:     "close",    2,  l_close,    arg_close,
  60:     "cursormodes",  2,  l_cursormodes,  arg_cursormodes,
  61:     "debug",    1,  l_debug,    arg_debug,
  62:     "echo",     2,  l_echo,     arg_echo,
  63:     "escape",   2,  l_escape,   arg_escape,
  64:     "foreground",   1,  l_foreground,   arg_foreground,
  65:     "iostat",   1,  l_iostat,   arg_null,
  66:     "label",    2,  l_label,    arg_label,
  67:     "list",     2,  l_list,     arg_null,
  68:     "nlines",   1,  l_nline,    arg_nline,
  69:     "select",   2,  l_select,   arg_select,
  70:     "shell",    2,  l_shell,    arg_shell,
  71:     "source",   2,  l_source,   arg_source,
  72:     "terse",    2,  l_terse,    arg_terse,
  73:     "time",     2,  l_time,     arg_time,
  74:     "unalias",  3,  l_unalias,  arg_unalias,
  75:     "unset",    3,  l_unset,    arg_unset,
  76:     "variable", 1,  l_variable, arg_null,
  77:     "window",   2,  l_window,   arg_window,
  78:     "write",    2,  l_write,    arg_write,
  79:     0
  80: };
  81: 
  82: struct lcmd_tab *
  83: lcmd_lookup(name)
  84: char *name;
  85: {
  86:     register struct lcmd_tab *p;
  87: 
  88:     for (p = lcmd_tab; p->lc_name != 0; p++)
  89:         if (str_match(name, p->lc_name, p->lc_minlen))
  90:             return p;
  91:     return 0;
  92: }
  93: 
  94: dosource(filename)
  95: char *filename;
  96: {
  97:     if (cx_beginfile(filename) < 0)
  98:         return -1;
  99:     p_start();
 100:     err_end();
 101:     cx_end();
 102:     return 0;
 103: }
 104: 
 105: dolongcmd(buffer, arg, narg)
 106: char *buffer;
 107: struct value *arg;
 108: int narg;
 109: {
 110:     if (cx_beginbuf(buffer, arg, narg) < 0)
 111:         return -1;
 112:     p_start();
 113:     err_end();
 114:     cx_end();
 115:     return 0;
 116: }

Defined functions

dosource defined in line 94; used 2 times
lcmd_lookup defined in line 82; used 2 times

Defined variables

arg_alias defined in line 37; used 1 times
  • in line 58
arg_close defined in line 45; used 1 times
  • in line 59
arg_cursormodes defined in line 38; used 1 times
  • in line 60
arg_debug defined in line 39; used 1 times
  • in line 61
arg_echo defined in line 40; used 1 times
  • in line 62
arg_escape defined in line 41; used 1 times
  • in line 63
arg_foreground defined in line 42; used 1 times
  • in line 64
arg_label defined in line 43; used 1 times
  • in line 66
arg_nline defined in line 44; used 1 times
  • in line 68
arg_null defined in line 55; used 3 times
arg_select defined in line 46; used 1 times
  • in line 69
arg_shell defined in line 47; used 1 times
  • in line 70
arg_source defined in line 48; used 1 times
  • in line 71
arg_terse defined in line 49; used 1 times
  • in line 72
arg_time defined in line 50; used 1 times
  • in line 73
arg_unalias defined in line 51; used 1 times
  • in line 74
arg_unset defined in line 52; used 1 times
  • in line 75
arg_window defined in line 53; used 1 times
  • in line 77
arg_write defined in line 54; used 1 times
  • in line 78
lcmd_tab defined in line 57; used 1 times
  • in line 88
sccsid defined in line 2; never used
Last modified: 1985-04-25
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1596
Valid CSS Valid XHTML 1.0 Strict