mirror of https://github.com/rfivet/uemacs.git
clean up line dependencies.
This commit is contained in:
parent
4bba6e7417
commit
93f2a6d691
|
@ -11,6 +11,10 @@
|
||||||
* modified by Petri Kutvonen
|
* modified by Petri Kutvonen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "line.h"
|
||||||
|
|
||||||
|
|
||||||
#define MAXCOL 500
|
#define MAXCOL 500
|
||||||
#define MAXROW 500
|
#define MAXROW 500
|
||||||
|
|
||||||
|
|
36
line.h
36
line.h
|
@ -25,23 +25,23 @@ struct line {
|
||||||
#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c))
|
#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c))
|
||||||
#define llength(lp) ((lp)->l_used)
|
#define llength(lp) ((lp)->l_used)
|
||||||
|
|
||||||
extern void lfree(struct line *lp);
|
void lfree( struct line *lp) ;
|
||||||
extern void lchange(int flag);
|
void lchange( int flag) ;
|
||||||
extern int insspace(int f, int n);
|
int insspace( int f, int n) ;
|
||||||
extern int linstr(char *instr);
|
int linstr( char *instr) ;
|
||||||
extern int linsert(int n, int c);
|
int linsert( int n, int c) ;
|
||||||
extern int lowrite(int c);
|
int lowrite( int c) ;
|
||||||
extern int lover(char *ostr);
|
int lover( char *ostr) ;
|
||||||
extern int lnewline(void);
|
int lnewline( void) ;
|
||||||
extern int ldelete(long n, int kflag);
|
int ldelete( long n, int kflag) ;
|
||||||
extern int ldelchar(long n, int kflag);
|
int ldelchar( long n, int kflag) ;
|
||||||
extern int lgetchar(unicode_t *);
|
int lgetchar( unicode_t *) ;
|
||||||
extern char *getctext(void);
|
char *getctext( void) ;
|
||||||
extern int putctext(char *iline);
|
int putctext( char *iline) ;
|
||||||
extern int ldelnewline(void);
|
int ldelnewline( void) ;
|
||||||
extern void kdelete(void);
|
void kdelete( void) ;
|
||||||
extern int kinsert(int c);
|
int kinsert( int c) ;
|
||||||
extern int yank(int f, int n);
|
int yank( int f, int n) ;
|
||||||
extern struct line *lalloc(int); /* Allocate a line. */
|
struct line *lalloc( int) ; /* Allocate a line. */
|
||||||
|
|
||||||
#endif /* LINE_H_ */
|
#endif /* LINE_H_ */
|
||||||
|
|
7
utf8.h
7
utf8.h
|
@ -3,10 +3,11 @@
|
||||||
|
|
||||||
typedef unsigned int unicode_t;
|
typedef unsigned int unicode_t;
|
||||||
|
|
||||||
unsigned utf8_to_unicode(char *line, unsigned index, unsigned len, unicode_t *res);
|
unsigned utf8_to_unicode( char *line, unsigned index, unsigned len,
|
||||||
unsigned unicode_to_utf8(unsigned int c, char *utf8);
|
unicode_t *res) ;
|
||||||
|
unsigned unicode_to_utf8( unsigned int c, char *utf8) ;
|
||||||
|
|
||||||
static inline int is_beginning_utf8(unsigned char c)
|
static inline int is_beginning_utf8( unsigned char c)
|
||||||
{
|
{
|
||||||
return (c & 0xc0) != 0x80;
|
return (c & 0xc0) != 0x80;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue