add buffer_putnlflush
This commit is contained in:
parent
eb31b3eb62
commit
75a033e481
1
CHANGES
1
CHANGES
@ -2,6 +2,7 @@
|
|||||||
fixed several bugs in test/uudecode.c
|
fixed several bugs in test/uudecode.c
|
||||||
add uninstall target
|
add uninstall target
|
||||||
add uint16_read API like the uint32_read one
|
add uint16_read API like the uint32_read one
|
||||||
|
add buffer_putnlflush
|
||||||
|
|
||||||
0.12:
|
0.12:
|
||||||
add textcode api for uuencode/uudecode, base64, quoted printable,
|
add textcode api for uuencode/uudecode, base64, quoted printable,
|
||||||
|
1
buffer.h
1
buffer.h
@ -26,6 +26,7 @@ extern int buffer_putsalign(buffer* b,const char* x);
|
|||||||
extern int buffer_putsflush(buffer* b,const char* x);
|
extern int buffer_putsflush(buffer* b,const char* x);
|
||||||
|
|
||||||
extern int buffer_putspace(buffer* b);
|
extern int buffer_putspace(buffer* b);
|
||||||
|
extern int buffer_putnlflush(buffer* b); /* put \n and flush */
|
||||||
|
|
||||||
#define buffer_PUTC(s,c) \
|
#define buffer_PUTC(s,c) \
|
||||||
( ((s)->a != (s)->p) \
|
( ((s)->a != (s)->p) \
|
||||||
|
7
buffer/buffer_putnlflush.c
Normal file
7
buffer/buffer_putnlflush.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "str.h"
|
||||||
|
#include "buffer.h"
|
||||||
|
|
||||||
|
int buffer_putspace(buffer* b) {
|
||||||
|
static char nl='\n';
|
||||||
|
return buffer_putflush(b,&nl,1);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user