add routines to put number in buffer.
parent
2e8427998a
commit
1a3d6ebe8e
@ -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…
Reference in New Issue