add routines to put number in buffer.

master
leitner 24 years ago
parent 2e8427998a
commit 1a3d6ebe8e

@ -47,6 +47,11 @@ extern void buffer_seek(buffer* b,unsigned int len);
extern int buffer_copy(buffer* out,buffer* in); extern int buffer_copy(buffer* out,buffer* in);
int buffer_putulong(buffer *b,unsigned long l);
int buffer_put8long(buffer *b,unsigned long l);
int buffer_putxlong(buffer *b,unsigned long l);
int buffer_putlong(buffer *b,unsigned long l);
extern buffer *buffer_0; extern buffer *buffer_0;
extern buffer *buffer_0small; extern buffer *buffer_0small;
extern buffer *buffer_1; extern buffer *buffer_1;

@ -0,0 +1,8 @@
#include "buffer.h"
#include "fmt.h"
int buffer_put8long(buffer *b,unsigned long l) {
char buf[FMT_8LONG];
return buffer_put(b,buf,fmt_8long(buf,l));
}

@ -0,0 +1,8 @@
#include "buffer.h"
#include "fmt.h"
int buffer_putlong(buffer *b,unsigned long l) {
char buf[FMT_ULONG];
return buffer_put(b,buf,fmt_long(buf,l));
}

@ -0,0 +1,8 @@
#include "buffer.h"
#include "fmt.h"
int buffer_putulong(buffer *b,unsigned long l) {
char buf[FMT_ULONG];
return buffer_put(b,buf,fmt_ulong(buf,l));
}

@ -0,0 +1,8 @@
#include "buffer.h"
#include "fmt.h"
int buffer_putxlong(buffer *b,unsigned long l) {
char buf[FMT_XLONG];
return buffer_put(b,buf,fmt_xlong(buf,l));
}

@ -0,0 +1,5 @@
#include <sys/socket.h>
int socket_listen(int s,unsigned int backlog) {
return listen(s, backlog);
}
Loading…
Cancel
Save