mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-17 23:06:25 -05:00
Move variable related definition from estruct to eval, and ISRCH related ones to isearch.
This commit is contained in:
parent
01d108d56d
commit
58642eb97f
6
Makefile
6
Makefile
@ -142,9 +142,9 @@ display.o: display.c display.h buffer.h crypt.h line.h utf8.h estruct.h \
|
||||
ebind.o: ebind.c ebind.h basic.h bind.h edef.h buffer.h crypt.h line.h \
|
||||
utf8.h estruct.h retcode.h bindable.h eval.h exec.h file.h isearch.h \
|
||||
random.h region.h search.h spawn.h window.h defines.h word.h
|
||||
eval.o: eval.c eval.h estruct.h retcode.h basic.h bind.h edef.h buffer.h \
|
||||
crypt.h line.h utf8.h display.h exec.h flook.h input.h random.h search.h \
|
||||
termio.h version.h window.h defines.h
|
||||
eval.o: eval.c eval.h basic.h bind.h edef.h buffer.h crypt.h line.h \
|
||||
utf8.h estruct.h retcode.h display.h exec.h flook.h input.h random.h \
|
||||
search.h termio.h version.h window.h defines.h
|
||||
exec.o: exec.c exec.h buffer.h crypt.h line.h utf8.h bind.h edef.h \
|
||||
estruct.h retcode.h display.h eval.h file.h flook.h input.h window.h \
|
||||
defines.h
|
||||
|
35
estruct.h
35
estruct.h
@ -152,7 +152,9 @@
|
||||
|
||||
#endif /* Autoconf. */
|
||||
|
||||
#if 0
|
||||
#define ISRCH 1 /* Incremental searches like ITS EMACS */
|
||||
#endif
|
||||
#define WORDPRO 1 /* Advanced word processing features */
|
||||
#define APROP 1 /* Add code for Apropos command */
|
||||
#if 0
|
||||
@ -437,37 +439,4 @@ struct kill {
|
||||
char d_chunk[KBLOCK]; /* Deleted text. */
|
||||
};
|
||||
|
||||
/* When emacs' command interpetor needs to get a variable's name,
|
||||
* rather than it's value, it is passed back as a variable description
|
||||
* structure. The v_num field is a index into the appropriate variable table.
|
||||
*/
|
||||
struct variable_description {
|
||||
int v_type; /* Type of variable. */
|
||||
int v_num; /* Ordinal pointer to variable in list. */
|
||||
};
|
||||
|
||||
/*
|
||||
* Incremental search defines.
|
||||
*/
|
||||
#if ISRCH
|
||||
|
||||
#define CMDBUFLEN 256 /* Length of our command buffer */
|
||||
|
||||
#define IS_ABORT 0x07 /* Abort the isearch */
|
||||
#define IS_BACKSP 0x08 /* Delete previous char */
|
||||
#define IS_TAB 0x09 /* Tab character (allowed search char) */
|
||||
#define IS_NEWLINE 0x0D /* New line from keyboard (Carriage return) */
|
||||
#define IS_QUOTE 0x11 /* Quote next character */
|
||||
#define IS_REVERSE 0x12 /* Search backward */
|
||||
#define IS_FORWARD 0x13 /* Search forward */
|
||||
#define IS_VMSQUOTE 0x16 /* VMS quote character */
|
||||
#define IS_VMSFORW 0x18 /* Search forward for VMS */
|
||||
#define IS_QUIT 0x1B /* Exit the search */
|
||||
#define IS_RUBOUT 0x7F /* Delete previous character */
|
||||
|
||||
/* IS_QUIT is no longer used, the variable metac is used instead */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
16
eval.c
16
eval.c
@ -1,3 +1,4 @@
|
||||
/* eval.c -- implements eval.h */
|
||||
#include "eval.h"
|
||||
|
||||
/* eval.c
|
||||
@ -229,6 +230,17 @@ static struct {
|
||||
/* User variables */
|
||||
static struct user_variable uv[MAXVARS + 1];
|
||||
|
||||
/* When emacs' command interpetor needs to get a variable's name,
|
||||
* rather than it's value, it is passed back as a variable description
|
||||
* structure. The v_num field is a index into the appropriate variable table.
|
||||
*/
|
||||
struct variable_description {
|
||||
int v_type; /* Type of variable. */
|
||||
int v_num; /* Ordinal pointer to variable in list. */
|
||||
};
|
||||
|
||||
static void findvar( char *var, struct variable_description *vd, int size) ;
|
||||
static int svar( struct variable_description *var, char *value) ;
|
||||
|
||||
/*
|
||||
* putctext:
|
||||
@ -688,7 +700,7 @@ int setvar(int f, int n)
|
||||
* @vd: structure to hold type and pointer.
|
||||
* @size: size of variable array.
|
||||
*/
|
||||
void findvar(char *var, struct variable_description *vd, int size)
|
||||
static void findvar(char *var, struct variable_description *vd, int size)
|
||||
{
|
||||
int vnum; /* subscript in variable arrays */
|
||||
int vtype; /* type to return */
|
||||
@ -746,7 +758,7 @@ fvar:
|
||||
* @var: variable to set.
|
||||
* @value: value to set to.
|
||||
*/
|
||||
int svar(struct variable_description *var, char *value)
|
||||
static int svar(struct variable_description *var, char *value)
|
||||
{
|
||||
int vnum; /* ordinal number of var refrenced */
|
||||
int vtype; /* type of variable to set */
|
||||
|
4
eval.h
4
eval.h
@ -1,16 +1,12 @@
|
||||
#ifndef _EVAL_H_
|
||||
#define _EVAL_H_
|
||||
|
||||
#include "estruct.h"
|
||||
|
||||
void varinit( void) ;
|
||||
char *gtfun( char *fname) ;
|
||||
char *gtusr( char *vname) ;
|
||||
char *gtenv( char *vname) ;
|
||||
char *getkill( void) ;
|
||||
int setvar( int f, int n) ;
|
||||
void findvar( char *var, struct variable_description *vd, int size) ;
|
||||
int svar( struct variable_description *var, char *value) ;
|
||||
char *itoa( int i) ;
|
||||
int gettyp( char *token) ;
|
||||
char *getval( char *token) ;
|
||||
|
24
isearch.c
24
isearch.c
@ -36,6 +36,30 @@
|
||||
#include "search.h"
|
||||
#include "window.h"
|
||||
|
||||
/*
|
||||
* Incremental search defines.
|
||||
*/
|
||||
#if ISRCH
|
||||
|
||||
#define CMDBUFLEN 256 /* Length of our command buffer */
|
||||
|
||||
#define IS_ABORT 0x07 /* Abort the isearch */
|
||||
#define IS_BACKSP 0x08 /* Delete previous char */
|
||||
#define IS_TAB 0x09 /* Tab character (allowed search char) */
|
||||
#define IS_NEWLINE 0x0D /* New line from keyboard (Carriage return) */
|
||||
#define IS_QUOTE 0x11 /* Quote next character */
|
||||
#define IS_REVERSE 0x12 /* Search backward */
|
||||
#define IS_FORWARD 0x13 /* Search forward */
|
||||
#define IS_VMSQUOTE 0x16 /* VMS quote character */
|
||||
#define IS_VMSFORW 0x18 /* Search forward for VMS */
|
||||
#define IS_QUIT 0x1B /* Exit the search */
|
||||
#define IS_RUBOUT 0x7F /* Delete previous character */
|
||||
|
||||
/* IS_QUIT is no longer used, the variable metac is used instead */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static int isearch( int f, int n) ;
|
||||
static int checknext( char chr, char *patrn, int dir) ;
|
||||
static int scanmore( char *patrn, int dir) ;
|
||||
|
Loading…
Reference in New Issue
Block a user