mirror of https://github.com/rfivet/uemacs.git
Revise header files formatting.
Finish tagging BBINDABLE functions. Modify forward-character to handle combined Unicode. Bump up version number and set default program name as 'ue'.
This commit is contained in:
parent
50b727bf7f
commit
b4d69118f5
2
basic.h
2
basic.h
|
@ -2,7 +2,7 @@
|
|||
#ifndef _BASIC_H_
|
||||
#define _BASIC_H_
|
||||
|
||||
# include "names.h"
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
/* $overlap is the size of the line overlap when kbd calls page forw/back
|
||||
if 0, page will move by 2/3 of the window size (1/3 page overlap)
|
||||
|
|
4
bind.h
4
bind.h
|
@ -1,9 +1,8 @@
|
|||
/* bind.h -- bindable functions dealing with name and key bindings */
|
||||
|
||||
#ifndef _BIND_H_
|
||||
#define _BIND_H_
|
||||
|
||||
#include "names.h"
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
/* Bindable uEMACS functions */
|
||||
BINDABLE( apro) ;
|
||||
|
@ -19,5 +18,4 @@ int startup( const char *fname) ;
|
|||
const char *transbind( char *skey) ; /* by string representation of key */
|
||||
|
||||
#endif
|
||||
|
||||
/* end of bind.h */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#ifndef _BINDABLE_H_
|
||||
#define _BINDABLE_H_
|
||||
|
||||
#include "names.h"
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
/* functions that can be bound to keys or procedure names */
|
||||
BBINDABLE( ctlxe) ;
|
||||
|
|
4
buffer.h
4
buffer.h
|
@ -2,8 +2,8 @@
|
|||
#ifndef _BUFFER_H_
|
||||
#define _BUFFER_H_
|
||||
|
||||
#include "line.h"
|
||||
#include "names.h"
|
||||
#include "line.h" /* line_p */
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
/* Text is kept in buffers. A buffer header, described below, exists for
|
||||
every buffer in the system. The buffers are kept in a big list, so that
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
/* defines.h -- */
|
||||
|
||||
#ifndef __DEFINES_H__
|
||||
#define __DEFINES_H__
|
||||
|
||||
|
||||
/* Must define one of
|
||||
USG | BSD
|
||||
*/
|
||||
|
@ -16,5 +14,4 @@
|
|||
#define NSTRING 128 /* # of bytes, string buffers */
|
||||
|
||||
#endif
|
||||
|
||||
/* end of defines.h */
|
||||
|
|
|
@ -45,5 +45,6 @@ extern int chg_width, chg_height ;
|
|||
void sizesignal( int signr) ;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of display.h */
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* estruct.h -- */
|
||||
|
||||
#ifndef _ESTRUCT_H_
|
||||
#define _ESTRUCT_H_
|
||||
|
||||
|
@ -11,7 +10,6 @@
|
|||
* modified by Petri Kutvonen
|
||||
*/
|
||||
|
||||
|
||||
#ifdef MSDOS
|
||||
# undef MSDOS
|
||||
#endif
|
||||
|
@ -45,7 +43,7 @@
|
|||
#else
|
||||
# define BSD 0 /* UNIX BSD 4.2 and ULTRIX */
|
||||
# define USG 1 /* UNIX system V */
|
||||
#endif /*autoconf */
|
||||
#endif /*autoconf || BSD || SYSV */
|
||||
|
||||
#define MSDOS 0 /* MS-DOS */
|
||||
|
||||
|
@ -77,19 +75,15 @@
|
|||
#define VISMAC 0 /* update display during keyboard macros */
|
||||
|
||||
#ifndef AUTOCONF
|
||||
|
||||
# define COLOR 1 /* color commands and windows */
|
||||
# define FILOCK 0 /* file locking under unix BSD 4.2 */
|
||||
|
||||
#else
|
||||
|
||||
# define COLOR MSDOS
|
||||
# ifdef SVR4
|
||||
# define FILOCK 1
|
||||
# else
|
||||
# define FILOCK BSD
|
||||
# endif
|
||||
|
||||
#endif /* Autoconf. */
|
||||
|
||||
#define CLEAN 0 /* de-alloc memory on exit */
|
||||
|
@ -138,5 +132,4 @@ void cexit( int status) ;
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* end of estruct.h */
|
||||
|
|
2
eval.h
2
eval.h
|
@ -5,7 +5,6 @@
|
|||
#include "names.h"
|
||||
|
||||
#define DEBUGM 1 /* $debug triggers macro debugging */
|
||||
|
||||
#if DEBUGM
|
||||
int mdbugout( char *fmt, ...) ;
|
||||
#endif
|
||||
|
@ -29,5 +28,4 @@ BINDABLE( setvar) ;
|
|||
BINDABLE( writemsg) ;
|
||||
|
||||
#endif
|
||||
|
||||
/* end of eval.h */
|
||||
|
|
1
exec.h
1
exec.h
|
@ -61,5 +61,4 @@ BINDABLE( cbuf39) ;
|
|||
BINDABLE( cbuf40) ;
|
||||
|
||||
#endif
|
||||
|
||||
/* end of exec.h */
|
||||
|
|
11
execute.h
11
execute.h
|
@ -1,20 +1,19 @@
|
|||
/* execute.h -- */
|
||||
#ifndef _EXECUTE_H_
|
||||
#define _EXECUTE_H_
|
||||
|
||||
#define CFENCE 1 /* fence matching in CMODE */
|
||||
|
||||
|
||||
#include "names.h" /* key code */
|
||||
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
extern int gasave ; /* global ASAVE size */
|
||||
extern int gacount ; /* count until next ASAVE */
|
||||
|
||||
|
||||
int execute( unsigned keycode, int f, int n) ;
|
||||
void kbd_loop( void) ;
|
||||
|
||||
#define CFENCE 1 /* fence matching in CMODE */
|
||||
#if CFENCE
|
||||
BINDABLE( getfence) ;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of execute.h */
|
||||
|
|
6
file.h
6
file.h
|
@ -1,10 +1,9 @@
|
|||
/* file.h -- file centric commands */
|
||||
|
||||
#ifndef _FILE_H_
|
||||
#define _FILE_H_
|
||||
|
||||
#include "buffer.h"
|
||||
#include "names.h"
|
||||
#include "buffer.h" /* bname_t */
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
extern boolean restflag ; /* restricted use? */
|
||||
boolean resterr( void) ; /* restricted error message */
|
||||
|
@ -25,5 +24,4 @@ void unqname( char *name) ;
|
|||
int writeout( const char *fn) ;
|
||||
|
||||
#endif
|
||||
|
||||
/* end of file.h */
|
||||
|
|
2
fileio.h
2
fileio.h
|
@ -1,3 +1,4 @@
|
|||
/* fileio.h -- file primitives */
|
||||
#ifndef _FILEIO_H_
|
||||
#define _FILEIO_H_
|
||||
|
||||
|
@ -33,3 +34,4 @@ fio_code ffropen( const char *fn) ;
|
|||
fio_code ffwopen( const char *fn) ;
|
||||
|
||||
#endif
|
||||
/* end of fileio.h */
|
||||
|
|
7
flook.h
7
flook.h
|
@ -1,5 +1,8 @@
|
|||
#include "retcode.h"
|
||||
/* flook.h -- */
|
||||
#ifndef _FLOOK_H_
|
||||
#define _FLOOK_H_
|
||||
|
||||
#include "retcode.h" /* boolean */
|
||||
|
||||
#define rcfname pathname[ 0]
|
||||
#define hlpfname pathname[ 1]
|
||||
|
@ -10,3 +13,5 @@ extern const char *pathname[] ;
|
|||
boolean fexist( const char *fname) ;
|
||||
char *flook( const char *fname, boolean hflag) ;
|
||||
|
||||
#endif
|
||||
/* end of flook.h */
|
||||
|
|
6
input.h
6
input.h
|
@ -1,7 +1,8 @@
|
|||
/* input.h -- */
|
||||
#ifndef _INPUT_H_
|
||||
#define _INPUT_H_
|
||||
|
||||
#include "names.h"
|
||||
#include "names.h" /* nbind_p */
|
||||
|
||||
typedef enum {
|
||||
STOP, PLAY, RECORD
|
||||
|
@ -28,7 +29,7 @@ int newmlarg( char **outbufref, const char *prompt, int size) ;
|
|||
int newmlargt( char **outbufref, const char *prompt, int size) ;
|
||||
int ectoc( int c) ;
|
||||
|
||||
/* Get a command name from the command line or interactively */
|
||||
/* Get a command binding from the command line or interactively */
|
||||
nbind_p getname( void) ;
|
||||
|
||||
int tgetc( void) ;
|
||||
|
@ -37,3 +38,4 @@ int getcmd( void) ;
|
|||
int getstring( const char *prompt, char *buf, int nbuf, int eolchar) ;
|
||||
|
||||
#endif
|
||||
/* end of input.h */
|
||||
|
|
11
isa.h
11
isa.h
|
@ -1,11 +1,7 @@
|
|||
/* isa.h -- isletter, islower, isupper, flipcase */
|
||||
|
||||
#ifndef __ISA_H__
|
||||
#define __ISA_H__
|
||||
|
||||
#define NATIONL 0 /* if 1, interpret [,],\,{,},| as characters P.K. */
|
||||
|
||||
|
||||
#ifdef islower
|
||||
# undef islower
|
||||
#endif
|
||||
|
@ -14,6 +10,7 @@
|
|||
# undef isupper
|
||||
#endif
|
||||
|
||||
#define NATIONL 0 /* if 1, interpret [,],\,{,},| as characters P.K. */
|
||||
#if NATIONL
|
||||
# define LASTUL ']'
|
||||
# define LASTLL '}'
|
||||
|
@ -26,7 +23,8 @@
|
|||
#define islower(c) isxlower((0xFF & (c)))
|
||||
#define isupper(c) isxupper((0xFF & (c)))
|
||||
|
||||
#define __isxletter(c) (('a' <= c && LASTLL >= c) || ('A' <= c && LASTUL >= c) || (192<=c /* && c<=255 */))
|
||||
#define __isxletter(c) (('a' <= c && LASTLL >= c) || \
|
||||
('A' <= c && LASTUL >= c) || (192<=c /* && c<=255 */))
|
||||
#define isxlower(c) (('a' <= c && LASTLL >= c) || (224 <= c && 252 >= c))
|
||||
#define isxupper(c) (('A' <= c && LASTUL >= c) || (192 <= c && 220 >= c))
|
||||
|
||||
|
@ -39,6 +37,5 @@
|
|||
#define DIFCASE 0x20 /* ASCII 'a' - 'A' */
|
||||
#define flipcase( c) ((c) ^ DIFCASE) /* Toggle the case of a letter. */
|
||||
|
||||
#endif /* __ISA_H__ */
|
||||
|
||||
#endif
|
||||
/* end of isa.h */
|
||||
|
|
48
line.c
48
line.c
|
@ -84,22 +84,20 @@ char *getkill( void) {
|
|||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move the cursor backwards by "n" characters. If "n" is less than zero call
|
||||
* "forwchar" to actually do the move. Otherwise compute the new cursor
|
||||
* location. Error if you try and move out of the buffer. Set the flag if the
|
||||
* line pointer for dot changes.
|
||||
|
||||
/* Move the cursor backwards by "n" characters. If "n" is less than zero
|
||||
call "forwchar" to actually do the move. Otherwise compute the new
|
||||
cursor location. Error if you try and move out of the buffer. Set the
|
||||
flag if the line pointer for dot changes.
|
||||
*/
|
||||
boolean backchar( int f, int n) {
|
||||
assert( f == TRUE || (f == FALSE && n == 1)) ;
|
||||
BBINDABLE( backchar) {
|
||||
assert( f == TRUE || n == 1) ;
|
||||
if( n < 0)
|
||||
return forwchar( f, -n) ;
|
||||
|
||||
while( n--) {
|
||||
if( curwp->w_doto == 0) { /* at beginning of line */
|
||||
line_p lp ;
|
||||
|
||||
lp = lback( curwp->w_dotp) ;
|
||||
line_p lp = lback( curwp->w_dotp) ;
|
||||
if( lp == curbp->b_linep) /* at beginning of buffer */
|
||||
return FALSE ;
|
||||
|
||||
|
@ -107,9 +105,7 @@ boolean backchar( int f, int n) {
|
|||
curwp->w_doto = llength( lp) ;
|
||||
curwp->w_flag |= WFMOVE ;
|
||||
} else {
|
||||
unsigned pos ;
|
||||
|
||||
pos = curwp->w_doto -= 1 ;
|
||||
unsigned pos = curwp->w_doto -= 1 ;
|
||||
if( pos > 0)
|
||||
curwp->w_doto -= utf8_revdelta( (unsigned char *) &( (curwp->w_dotp)->l_text[ pos]), pos) ;
|
||||
}
|
||||
|
@ -118,14 +114,14 @@ boolean backchar( int f, int n) {
|
|||
return TRUE ;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move the cursor forwards by "n" characters. If "n" is less than zero call
|
||||
* "backchar" to actually do the move. Otherwise compute the new cursor
|
||||
* location, and move ".". Error if you try and move off the end of the
|
||||
* buffer. Set the flag if the line pointer for dot changes.
|
||||
|
||||
/* Move the cursor forwards by "n" characters. If "n" is less than zero
|
||||
call "backchar" to actually do the move. Otherwise compute the new
|
||||
cursor location, and move ".". Error if you try and move off the end of
|
||||
the buffer. Set the flag if the line pointer for dot changes.
|
||||
*/
|
||||
boolean forwchar( int f, int n) {
|
||||
assert( f == TRUE || (f == FALSE && n == 1)) ;
|
||||
BBINDABLE( forwchar) {
|
||||
assert( f == TRUE || n == 1) ;
|
||||
if( n < 0)
|
||||
return backchar( f, -n) ;
|
||||
|
||||
|
@ -140,10 +136,18 @@ boolean forwchar( int f, int n) {
|
|||
curwp->w_flag |= WFMOVE ;
|
||||
} else {
|
||||
unicode_t unc ;
|
||||
unsigned bytes ;
|
||||
|
||||
bytes = utf8_to_unicode( curwp->w_dotp->l_text, curwp->w_doto, len, &unc) ;
|
||||
curwp->w_doto += utf8_to_unicode( curwp->w_dotp->l_text,
|
||||
curwp->w_doto, len, &unc) ;
|
||||
/* check if next char is null width unicode */
|
||||
while( curwp->w_doto != len) {
|
||||
unsigned bytes = utf8_to_unicode( curwp->w_dotp->l_text,
|
||||
curwp->w_doto, len, &unc) ;
|
||||
if( utf8_width( unc) == 0)
|
||||
curwp->w_doto += bytes ;
|
||||
else
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
23
line.h
23
line.h
|
@ -1,19 +1,17 @@
|
|||
/* line.h -- line centric interface */
|
||||
|
||||
#ifndef _LINE_H_
|
||||
#define _LINE_H_
|
||||
|
||||
#include "names.h"
|
||||
#include "utf8.h"
|
||||
|
||||
/*
|
||||
* All text is kept in circularly linked lists of "struct line" structures.
|
||||
* These begin at the header line (which is the blank line beyond the end
|
||||
* of the buffer). This line is pointed to by the "struct buffer". Each
|
||||
* line contains a number of bytes in the line (the "used" size), the size
|
||||
* of the text array, and the text. The end of line is not stored as a
|
||||
* byte; it's implied. Future additions will include update hints, and a
|
||||
* list of marks into the line.
|
||||
/* All text is kept in circularly linked lists of "struct line" structures.
|
||||
These begin at the header line (which is the blank line beyond the end
|
||||
of the buffer). This line is pointed to by the "struct buffer". Each
|
||||
line contains a number of bytes in the line (the "used" size), the size
|
||||
of the text array, and the text. The end of line is not stored as a
|
||||
byte; it's implied. Future additions will include update hints, and a
|
||||
list of marks into the line.
|
||||
*/
|
||||
typedef struct line {
|
||||
struct line *l_fp ; /* Forward link to the next line */
|
||||
|
@ -34,8 +32,8 @@ extern int tabwidth ; /* Map to $tab, default to 8, can be set to [1, .. */
|
|||
char *getkill( void) ;
|
||||
|
||||
/* Bindable functions */
|
||||
boolean backchar( int f, int n) ;
|
||||
boolean forwchar( int f, int n) ;
|
||||
BBINDABLE( backchar) ;
|
||||
BBINDABLE( forwchar) ;
|
||||
BINDABLE( insspace) ;
|
||||
BINDABLE( yank) ;
|
||||
|
||||
|
@ -56,6 +54,5 @@ line_p lalloc( int minsize) ; /* Allocate a line of at least minsize chars. */
|
|||
|
||||
boolean rdonly( void) ; /* Read Only error message */
|
||||
|
||||
#endif /* _LINE_H_ */
|
||||
|
||||
#endif
|
||||
/* end of line.h */
|
||||
|
|
5
lock.h
5
lock.h
|
@ -1,18 +1,15 @@
|
|||
/* lock.h -- */
|
||||
|
||||
#ifndef _LOCK_H_
|
||||
#define _LOCK_H_
|
||||
|
||||
#include "estruct.h"
|
||||
|
||||
#if BSD | SVR4
|
||||
|
||||
int lockchk( const char *fname) ;
|
||||
int lockrel( void) ;
|
||||
int lock( const char *fname) ;
|
||||
int unlock( const char *fname) ;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of lock.h */
|
||||
|
|
4
mlout.h
4
mlout.h
|
@ -1,5 +1,4 @@
|
|||
/* mlout.h -- message line output interface */
|
||||
|
||||
#ifndef __MLOUT_H__
|
||||
#define __MLOUT_H__
|
||||
|
||||
|
@ -10,6 +9,5 @@ extern void (*mloutfmt)( const char *, ...) ;
|
|||
void mloutstr( const char *str) ;
|
||||
boolean mloutfail( const char *msg) ; /* output with BELL and return FALSE */
|
||||
|
||||
#endif /* __MLOUT_H__ */
|
||||
|
||||
#endif
|
||||
/* end of mlout.h */
|
||||
|
|
4
pklock.h
4
pklock.h
|
@ -1,17 +1,13 @@
|
|||
/* pklock.h -- */
|
||||
|
||||
#ifndef _PKLOCK_H_
|
||||
#define _PKLOCK_H_
|
||||
|
||||
#include "estruct.h"
|
||||
|
||||
#if (FILOCK && BSD) || SVR4
|
||||
|
||||
char *dolock( const char *fname) ;
|
||||
char *undolock( const char *fname) ;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* end of pklock.h */
|
||||
|
|
48
random.c
48
random.c
|
@ -1,12 +1,10 @@
|
|||
/* random.c -- implements random.h */
|
||||
#include "random.h"
|
||||
|
||||
/* random.c
|
||||
*
|
||||
* This file contains the command processing functions for a number of
|
||||
* random commands. There is no functional grouping here, for sure.
|
||||
*
|
||||
* Modified by Petri Kutvonen
|
||||
/* This file contains the command processing functions for a number of
|
||||
random commands. There is no functional grouping here, for sure.
|
||||
|
||||
Modified by Petri Kutvonen
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -212,14 +210,15 @@ boolean setccol( int pos) {
|
|||
return col >= pos;
|
||||
}
|
||||
|
||||
/*
|
||||
* Twiddle the two characters on either side of dot. If dot is at the end of
|
||||
* the line twiddle the two characters before it. Return with an error if dot
|
||||
* is at the beginning of line; it seems to be a bit pointless to make this
|
||||
* work. This fixes up a very common typo with a single stroke. Normally bound
|
||||
* to "C-T". This always works within a line, so "WFEDIT" is good enough.
|
||||
|
||||
/* Twiddle the two characters on either side of dot. If dot is at the end
|
||||
of the line twiddle the two characters before it. Return with an error
|
||||
if dot is at the beginning of line; it seems to be a bit pointless to
|
||||
make this work. This fixes up a very common typo with a single stroke.
|
||||
Normally bound to "C-T". This always works within a line, so "WFEDIT"
|
||||
is good enough.
|
||||
*/
|
||||
boolean twiddle( int f, int n) {
|
||||
BBINDABLE( twiddle) {
|
||||
unicode_t c ;
|
||||
boolean eof_f = FALSE ;
|
||||
|
||||
|
@ -751,8 +750,8 @@ BINDABLE( delgmode) {
|
|||
return adjustmode( FALSE, TRUE) ;
|
||||
}
|
||||
|
||||
/*
|
||||
* change the editor mode status
|
||||
|
||||
/* change the editor mode status
|
||||
*
|
||||
* int kind; true = set, false = delete
|
||||
* int global; true = global flag, false = current buffer flag
|
||||
|
@ -859,21 +858,20 @@ static int iovstring( int f, int n, const char *prompt, int (*fun)( char *)) {
|
|||
return status ;
|
||||
}
|
||||
|
||||
/*
|
||||
* ask for and insert a string into the current
|
||||
* buffer at the current point
|
||||
*
|
||||
* int f, n; ignored arguments
|
||||
|
||||
/* ask for and insert a string into the current buffer at the current point
|
||||
|
||||
int f, n; ignored arguments
|
||||
*/
|
||||
BINDABLE( istring) {
|
||||
return iovstring( f, n, "insert-string<META>: ", linstr) ;
|
||||
}
|
||||
|
||||
/*
|
||||
* ask for and overwite a string into the current
|
||||
* buffer at the current point
|
||||
*
|
||||
* int f, n; ignored arguments
|
||||
|
||||
/* ask for and overwite a string into the current buffer at the current
|
||||
point
|
||||
|
||||
int f, n; ignored arguments
|
||||
*/
|
||||
BINDABLE( ovstring) {
|
||||
return iovstring( f, n, "overwrite-string<META>: ", lover) ;
|
||||
|
|
4
random.h
4
random.h
|
@ -1,5 +1,4 @@
|
|||
/* random.h -- various commands */
|
||||
|
||||
#ifndef _RANDOM_H_
|
||||
#define _RANDOM_H_
|
||||
|
||||
|
@ -23,7 +22,7 @@ boolean setccol( int pos) ;
|
|||
/* Bindable functions */
|
||||
BINDABLE( setfillcol) ;
|
||||
BINDABLE( showcpos) ;
|
||||
boolean twiddle( int f, int n) ;
|
||||
BBINDABLE( twiddle) ;
|
||||
BINDABLE( quote) ;
|
||||
BINDABLE( insert_tab) ;
|
||||
BINDABLE( detab) ;
|
||||
|
@ -44,5 +43,4 @@ BINDABLE( istring) ;
|
|||
BINDABLE( ovstring) ;
|
||||
|
||||
#endif
|
||||
|
||||
/* end of random.h */
|
||||
|
|
6
region.h
6
region.h
|
@ -4,9 +4,8 @@
|
|||
|
||||
#include "line.h"
|
||||
|
||||
/*
|
||||
* The starting position of a region, and the size of the region in
|
||||
* characters, is kept in a region structure. Used by the region commands.
|
||||
/* The starting position of a region, and the size of the region in
|
||||
characters, is kept in a region structure. Used by the region commands.
|
||||
*/
|
||||
typedef struct {
|
||||
line_p r_linep ; /* Origin struct line address. */
|
||||
|
@ -25,5 +24,4 @@ BINDABLE( upperregion) ;
|
|||
int getregion( region_p rp) ;
|
||||
|
||||
#endif
|
||||
|
||||
/* end of region.h */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* retcode.h -- */
|
||||
#ifndef __RETCODE_H__
|
||||
#define __RETCODE_H__
|
||||
|
||||
|
@ -5,6 +6,7 @@
|
|||
# error "FALSE shouldn't be defined"
|
||||
# undef FALSE
|
||||
#endif
|
||||
|
||||
#ifdef TRUE
|
||||
# error "TRUE shouldn't be defined"
|
||||
# undef TRUE
|
||||
|
@ -18,3 +20,4 @@ typedef enum {
|
|||
#define ABORT 2 /* 2, death, ^G, abort, etc. */
|
||||
|
||||
#endif
|
||||
/* end of retcode.h */
|
||||
|
|
16
search.h
16
search.h
|
@ -1,11 +1,9 @@
|
|||
/* search.h -- */
|
||||
|
||||
#ifndef _SEARCH_H_
|
||||
#define _SEARCH_H_
|
||||
|
||||
#define MAGIC 1 /* include regular expression matching? */
|
||||
|
||||
#include "line.h"
|
||||
#include "line.h" /* line_p */
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
typedef char spat_t[ 128] ; /* search pattern type */
|
||||
#define NPAT sizeof( spat_t) /* # of bytes, pattern */
|
||||
|
@ -29,12 +27,12 @@ extern spat_t rpat ; /* replacement pattern */
|
|||
int scanner( const char *patrn, int direct, int beg_or_end) ;
|
||||
|
||||
/* Bindable functions */
|
||||
BINDABLE( forwsearch) ;
|
||||
BINDABLE( forwhunt) ;
|
||||
BINDABLE( backsearch) ;
|
||||
BINDABLE( backhunt) ;
|
||||
BINDABLE( sreplace) ;
|
||||
BINDABLE( backsearch) ;
|
||||
BINDABLE( forwhunt) ;
|
||||
BINDABLE( forwsearch) ;
|
||||
BINDABLE( qreplace) ;
|
||||
BINDABLE( sreplace) ;
|
||||
|
||||
int eq( unsigned char bc, unsigned char pc) ;
|
||||
void savematch( void) ;
|
||||
|
@ -45,11 +43,11 @@ int boundary( line_p curline, int curoff, int dir) ;
|
|||
|
||||
void setprompt( char *tpat, unsigned tpat_size, char *prompt, char *apat) ;
|
||||
|
||||
#define MAGIC 1 /* include regular expression matching? */
|
||||
#if MAGIC
|
||||
void mcclear( void) ;
|
||||
void rmcclear( void) ;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* end of search.h */
|
||||
|
|
5
spawn.h
5
spawn.h
|
@ -1,6 +1,8 @@
|
|||
/* spawn.h -- various operating system access commands */
|
||||
#ifndef _SPAWN_H_
|
||||
#define _SPAWN_H_
|
||||
|
||||
#include "names.h"
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
/* Bindable functions */
|
||||
BINDABLE( spawncli) ;
|
||||
|
@ -12,4 +14,5 @@ BINDABLE( filter_buffer) ;
|
|||
|
||||
void rtfrmshell( void) ;
|
||||
|
||||
#endif
|
||||
/* end of spawn.h */
|
||||
|
|
12
terminal.h
12
terminal.h
|
@ -1,14 +1,12 @@
|
|||
/* terminal.h -- */
|
||||
#ifndef __TERMINAL_H__
|
||||
#define __TERMINAL_H__
|
||||
|
||||
|
||||
#include "defines.h" /* COLOR, SCROLLCODE */
|
||||
#include "retcode.h"
|
||||
#include "utf8.h"
|
||||
|
||||
|
||||
/*
|
||||
* The editor communicates with the display using a high level interface. A
|
||||
/* The editor communicates with the display using a high level interface. A
|
||||
* "TERM" structure holds useful variables, and indirect pointers to routines
|
||||
* that do useful operations. The low level get and put routines are here too.
|
||||
* This lets a terminal, in addition to having non standard commands, have
|
||||
|
@ -48,8 +46,9 @@ struct terminal {
|
|||
#endif
|
||||
};
|
||||
|
||||
/* TEMPORARY macros for terminal I/O (to be placed in a machine
|
||||
dependant place later) */
|
||||
/* TEMPORARY macros for terminal I/O (to be placed in a machine dependant
|
||||
place later)
|
||||
*/
|
||||
|
||||
#define TTopen (*term.t_open)
|
||||
#define TTclose (*term.t_close)
|
||||
|
@ -83,3 +82,4 @@ extern char sres[] ; /* Current screen resolution. */
|
|||
/* NORMAL, CGA, EGA, VGA */
|
||||
|
||||
#endif
|
||||
/* end of terminal.h */
|
||||
|
|
2
termio.h
2
termio.h
|
@ -1,3 +1,4 @@
|
|||
/* termio.h -- */
|
||||
#ifndef _TERMIO_H_
|
||||
#define _TERMIO_H_
|
||||
|
||||
|
@ -18,3 +19,4 @@ int ttgetc( void) ;
|
|||
int typahead( void) ;
|
||||
|
||||
#endif
|
||||
/* end of termio.h */
|
||||
|
|
6
utf8.h
6
utf8.h
|
@ -1,5 +1,6 @@
|
|||
#ifndef UTF8_H
|
||||
#define UTF8_H
|
||||
/* utf8.h -- */
|
||||
#ifndef _UTF8_H_
|
||||
#define _UTF8_H_
|
||||
|
||||
typedef unsigned int unicode_t ;
|
||||
|
||||
|
@ -10,3 +11,4 @@ unsigned utf8_revdelta( unsigned char *buf, unsigned pos) ;
|
|||
unsigned unicode_to_utf8( unicode_t c, char *utf8) ;
|
||||
|
||||
#endif
|
||||
/* end of utf8.h */
|
||||
|
|
7
util.h
7
util.h
|
@ -1,9 +1,10 @@
|
|||
/* util.h -- utility functions */
|
||||
#ifndef UTIL_H_
|
||||
# define UTIL_H_
|
||||
#ifndef _UTIL_H_
|
||||
#define _UTIL_H_
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
void mystrscpy( char *dst, const char *src, int size) ;
|
||||
|
||||
#endif /* UTIL_H_ */
|
||||
#endif
|
||||
/* end of util.h */
|
||||
|
|
12
version.h
12
version.h
|
@ -1,16 +1,18 @@
|
|||
#ifndef VERSION_H_
|
||||
#define VERSION_H_
|
||||
/* version.h -- name and version strings */
|
||||
#ifndef _VERSION_H_
|
||||
#define _VERSION_H_
|
||||
|
||||
#ifdef PROGRAM
|
||||
# define _QUOTE( s) #s
|
||||
# define QUOTE( s) _QUOTE( s)
|
||||
# define PROGRAM_NAME QUOTE(PROGRAM)
|
||||
#else
|
||||
# define PROGRAM_NAME "em"
|
||||
# define PROGRAM_NAME "ue"
|
||||
#endif
|
||||
|
||||
#define PROGRAM_NAME_UTF8 "µEMACS"
|
||||
|
||||
#define VERSION "4.2.4"
|
||||
#define VERSION "4.2.5"
|
||||
|
||||
#endif /* VERSION_H_ */
|
||||
#endif
|
||||
/* end of version.h */
|
||||
|
|
1
word.h
1
word.h
|
@ -21,5 +21,4 @@ BINDABLE( killpara) ;
|
|||
BINDABLE( wordcount) ;
|
||||
|
||||
#endif
|
||||
|
||||
/* end of word.h */
|
||||
|
|
Loading…
Reference in New Issue