mirror of
https://github.com/rfivet/uemacs.git
synced 2024-11-16 09:36:29 -05:00
Align scope and parameter type for linsert and is_beginning_utf8.
This commit is contained in:
parent
83b323272d
commit
de04424e51
13
line.c
13
line.c
@ -32,6 +32,10 @@ int tabmask = 0x07 ; /* tabulator mask */
|
||||
|
||||
static int ldelnewline( void) ;
|
||||
|
||||
static inline int is_beginning_utf8( unsigned char c) {
|
||||
return (c & 0xc0) != 0x80;
|
||||
}
|
||||
|
||||
/* The editor holds deleted text chunks in the struct kill buffer. The
|
||||
* kill buffer is logically a stream of ascii characters, however
|
||||
* due to its unpredicatable size, it gets implemented as a linked
|
||||
@ -261,11 +265,11 @@ int linstr( char *instr) {
|
||||
int status = TRUE ;
|
||||
|
||||
if( instr != NULL) {
|
||||
char tmpc ;
|
||||
unicode_t tmpc ;
|
||||
|
||||
while( (tmpc = *instr++)) {
|
||||
while( (tmpc = *instr++ & 0xFF)) {
|
||||
status =
|
||||
(tmpc == '\n' ? lnewline() : linsert( 1, tmpc & 0xFF)) ;
|
||||
(tmpc == '\n' ? lnewline() : linsert( 1, tmpc)) ;
|
||||
|
||||
/* Insertion error? */
|
||||
if( status != TRUE) {
|
||||
@ -369,8 +373,7 @@ static int linsert_byte(int n, int c)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int linsert(int n, int c)
|
||||
{
|
||||
int linsert( int n, unicode_t c) {
|
||||
char utf8[6];
|
||||
int bytes, i ;
|
||||
|
||||
|
2
line.h
2
line.h
@ -38,7 +38,7 @@ void lfree( struct line *lp) ;
|
||||
void lchange( int flag) ;
|
||||
int insspace( int f, int n) ;
|
||||
int linstr( char *instr) ;
|
||||
int linsert( int n, int c) ;
|
||||
int linsert( int n, unicode_t c) ;
|
||||
int lover( char *ostr) ;
|
||||
int lnewline( void) ;
|
||||
int ldelete( long n, int kflag) ;
|
||||
|
Loading…
Reference in New Issue
Block a user