cmd1.c File Reference

#include "config.h"
#include "ctype.h"
#include "vi.h"
#include "regexp.h"

Include dependency graph for cmd1.c:

Go to the source code of this file.

Defines

#define NCOLORS   7

Functions

void cmd_mark (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_write (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_shell (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_global (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_file (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_edit (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_next (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_xit (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_args (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_cd (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_map (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_set (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_tag (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_version (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_mkexrc (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_digraph (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
static char * parse_errmsg (REG char *text)
void cmd_errlist (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_make (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void cmd_color (MARK frommark, MARK tomark, CMD cmd, int bang, char *extra)
void savecolor (int fd)

Variables

static char errfile [256]
static long errline
static int errfd = -2
static char bytes [NCOLORS]
struct {
   char *   f_name
   FILE *   f_fp
   int   f_type
   char *   word
   int   type
   int   val
   char *   name
   CMD   code
   void(*   fn )()
   ARGT   argt
   char *   name
   char *   nm
   char   type
   char   flags
   char *   value
   const char *   name
   signed char   fat_bits
   int   tracks
   unsigned short   heads
   unsigned short   sectors
   device_t *   dev
   int   nr_partitions
   int   free_regions
   int   used_regions
   int   sectors
   int   nr_regions
   int   biosdrive
   region_t   regions [NR_REGIONS]
   int   this_month
   int   feb
   int   sept
   int   days_in_month
   int   dow_first
   int   o_file
   int   o_field
   WINDOW *   win
   char   erase
   char   kill
   char   werase
   unsigned   baudr
   int   speedcode
   u16_t   vendor
   u16_t   device
words []


Define Documentation

#define NCOLORS   7
 

Definition at line 1473 of file cmd1.c.

Referenced by cmd_color(), and savecolor().


Function Documentation

void cmd_args MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 648 of file cmd1.c.

References addch, arg, args, col(), COLS, FALSE, nargs, strlen(), TRUE, and width.

Referenced by cmd_next().

void cmd_cd MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 743 of file cmd1.c.

References chdir, getenv(), MODIFIED, msg, perror(), and tstflag.

void cmd_color MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 1540 of file cmd1.c.

References addch, exrefresh(), msg, NCOLORS, qaddch, qaddstr(), REG, and words.

void cmd_digraph MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 1160 of file cmd1.c.

References do_digraph().

void cmd_edit MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 455 of file cmd1.c.

References CMD_VISUAL, cursor, doexcmd(), init, isspace, L, MARK_AT_LINE, MODE_VI, msg, origname, prevline, prevorig, strcmp, strcpy(), tmpabort(), and tmpstart().

Referenced by v_switch().

void cmd_errlist MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 1307 of file cmd1.c.

References beep(), BLKSIZE, BLK::c, close, endline, ERRLIST, errmsg, if(), L, lseek, msg, nlines, O_RDONLY, offset, open, parse_errmsg(), tmpblk, and tread.

Referenced by cmd_make(), and v_errlist().

void cmd_file MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 406 of file cmd1.c.

References CMD_FILE, L, markline, MODIFIED, msg, nlines, NOTEDITED, origname, READONLY, setflag, storename(), strcpy(), and tstflag.

Referenced by v_status().

void cmd_global MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 311 of file cmd1.c.

References ChangeText, CMD_GLOBAL, CMD_VGLOBAL, cursor, doexcmd(), doingglobal, fetchline(), L, MARK_AT_LINE, markline, msg, nlines, parseptrn(), re, regcomp, regexec, rptlines, strcpy(), and TRUE.

void cmd_make MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 1427 of file cmd1.c.

References addch, buf, close, CMD_CC, cmd_errlist(), ERRLIST, MARK_UNSET, MODE_COLON, MODE_EX, MODE_VI, MODIFIED, msg, o_cc, o_make, qaddstr(), REDIRECT, resume_curses(), sprintf(), suspend_curses(), system(), and tstflag.

void cmd_map MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 779 of file cmd1.c.

References CMD_ABBR, ctrl, dumpkey(), FALSE, fnames, key, NFKEYS, TRUE, WHEN_EX, WHEN_VICMD, WHEN_VIINP, and WHEN_VIREP.

void cmd_mark MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 141 of file cmd1.c.

References isascii, islower, mark, and msg.

void cmd_mkexrc MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 1116 of file cmd1.c.

References close, creat, EXRC, FALSE, FILEPERMS, msg, savecolor(), savedigs(), savemaps(), saveopts(), and TRUE.

void cmd_next MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 536 of file cmd1.c.

References argno, args, cmd_args(), CMD_NEXT, CMD_PREVIOUS, CMD_REWIND, j, msg, nargs, tmpabort(), and tmpstart().

void cmd_set MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 896 of file cmd1.c.

References changes, dumpopts(), FALSE, setopts(), strcmp, and TRUE.

void cmd_shell MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 254 of file cmd1.c.

References CMD_BANG, CMD_SHELL, filter(), L, MODE_COLON, MODE_EX, MODE_VI, MODIFIED, msg, o_shell, o_warn, origname, resume_curses(), strcpy(), strlen(), suspend_curses(), system(), TRUE, and tstflag.

void cmd_tag MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 920 of file cmd1.c.

References BLKSIZE, BLK::c, close, cmp, cursor, FALSE, linespec(), MARK_FIRST, MARK_UNSET, msg, o_magic, O_RDONLY, open, origname, rpclose(), rpipe, sprintf(), strcmp, strncpy(), TAGS, tmpabort(), tmpblk, tmpstart(), and tread.

Referenced by v_tag().

void cmd_version MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 1090 of file cmd1.c.

References COPYING, msg, and VERSION.

void cmd_write MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 164 of file cmd1.c.

References access, append(), CMD_WRITE, creat, FALSE, fetchline(), FILEPERMS, filter(), L, lseek, MARK_FIRST, MARK_LAST, markline, msg, O_APPEND, O_WRONLY, open, REG, strlen(), tmpsave(), TRUE, and twrite.

Referenced by filter().

void cmd_xit MARK  frommark,
MARK  tomark,
CMD  cmd,
int  bang,
char *  extra
 

Definition at line 596 of file cmd1.c.

References argno, changes, clrflag, CMD_QUIT, CMD_WQUIT, FALSE, MODE_QUIT, MODIFIED, msg, nargs, o_autowrite, setflag, tmpabort(), tmpend(), and tstflag.

Referenced by v_xit().

static char* parse_errmsg REG char *  text  )  [static]
 

Definition at line 1190 of file cmd1.c.

References atol(), errmsg, isalnum, L, and REG.

Referenced by cmd_errlist().

void savecolor int  fd  ) 
 

Definition at line 1693 of file cmd1.c.

References NCOLORS, strcat(), strcpy(), strlen(), twrite, and words.

Referenced by cmd_mkexrc().


Variable Documentation

char bytes[NCOLORS] [static]
 

Definition at line 1486 of file cmd1.c.

Referenced by _rm_leading_zeros(), do_copy(), do_new_kmess(), do_vcopy(), do_vdevio(), do_x86_vm(), doread(), dowrite(), dp_nic2user(), dp_pio16_nic2user(), dp_pio16_user2nic(), dp_pio8_nic2user(), dp_pio8_user2nic(), dp_user2nic(), ec_nic2user(), ec_user2nic(), el3_write_fifo(), getline(), holes_dmp(), leaveDrive(), main(), mem2user(), mem_nic2user(), mem_user2nic(), new_mem(), pio_nic2user(), pio_user2nic(), print_memory(), read_block(), regular(), rw_seg(), tar(), test39e(), tmpsave(), and user2mem().

int errfd = -2 [static]
 

Definition at line 1175 of file cmd1.c.

Referenced by run_job().

char errfile[256] [static]
 

Definition at line 1173 of file cmd1.c.

long errline [static]
 

Definition at line 1174 of file cmd1.c.

int type
 

Definition at line 1491 of file cmd1.c.

Referenced by _install(), ack_get_instruction(), ack_get_operand(), bas_get_C_expression(), bas_get_instruction(), bas_get_operand(), cache_reply(), compose_reply(), directory(), dns_ttl(), do_isabridge(), do_pcibridge(), do_select(), DOascii(), DObinary(), DOrretr(), DOrstor(), doSIZE(), doSTAT(), doTYPE(), dpl_partitions(), english(), eth_arrive(), execute(), forbidden(), fsize(), FTPinit(), get_env_conf(), get_system_type(), getanswer(), getfp(), getinfo(), gnu_get_instruction(), gnu_get_operand(), icmp_rate_limit(), insert_vlan_hdr(), install(), ip_send(), isbuiltin(), list_part_types(), ListHosts(), m_modify(), main(), maketree(), mark_npartition(), mkcell(), mktmp(), mpartition(), nm_print(), node0(), node1(), node2(), node3(), node4(), parsefield(), pr_rr(), print(), print_capabilities(), print_qrr(), puff(), re_compile(), read_conf(), record_bar(), record_bars(), recvfile(), refresh_cache(), route_packets(), select_callback(), select_reevaluate(), sendfile(), servdhcp(), set_var(), setstate(), tcp_extract_tcpopt(), update_bridge4dev_io(), virtual_copy(), writeit(), and zap().

int val
 

Definition at line 1492 of file cmd1.c.

Referenced by _do_sub(), _doscan(), _sqt(), atan2(), backtrace(), bc_divide(), bget4(), bitoff(), biton(), bits(), ceil(), deflate(), display(), do_scoop_up(), dp_confaddr(), dsp_ioctl(), dump_stack(), english(), env_parse(), env_prefix(), ether_line(), evalvar(), factor(), fill(), floor(), fmod(), get_reg(), getescape(), inet_addr(), inet_aton(), inet_network(), inflate_fast(), initopts(), long_val(), main(), make_off(), make_ulg(), mayhave(), mdbtrace(), monparams_dmp(), num2long(), number(), offset(), options(), outnum(), Pass2(), pathconf(), rcki(), read4(), read_core(), reg_addr(), rl_pci_conf(), sbm_err(), sbx_err(), sqrt(), st_hash(), string2long(), unary(), and update_conf().

char* word
 

Definition at line 1490 of file cmd1.c.

struct { ... } words[] [static]
 


Generated on Fri Apr 14 23:02:52 2006 for minix by  doxygen 1.4.6