switch to size_t and ssize_t
parent
0e190f60ab
commit
3004b518ef
@ -1,7 +1,7 @@
|
||||
#include "stralloc.h"
|
||||
#include "buffer.h"
|
||||
|
||||
int buffer_get_new_token_sa(buffer* b,stralloc* sa,const char* charset,unsigned long int setlen) {
|
||||
int buffer_get_new_token_sa(buffer* b,stralloc* sa,const char* charset,size_t setlen) {
|
||||
stralloc_zero(sa);
|
||||
return buffer_get_token_sa(b,sa,charset,setlen);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <buffer.h>
|
||||
|
||||
int buffer_getline(buffer* b,char* x,unsigned long int len) {
|
||||
ssize_t buffer_getline(buffer* b,char* x,size_t len) {
|
||||
return buffer_get_token(b,x,len,"\n",1);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "buffer.h"
|
||||
|
||||
void buffer_init_free(buffer* b,int (*op)(),int fd,
|
||||
char* y,unsigned long int ylen) {
|
||||
void buffer_init_free(buffer* b,ssize_t (*op)(),int fd,
|
||||
char* y,size_t ylen) {
|
||||
buffer_init(b,op,fd,y,ylen);
|
||||
b->todo=FREE;
|
||||
}
|
||||
|
@ -1,20 +1,22 @@
|
||||
#ifndef MMAP_H
|
||||
#define MMAP_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/* open file for reading, mmap whole file, close file, write length of
|
||||
* map in filesize and return pointer to map. */
|
||||
char* mmap_read(const char *filename,unsigned long* filesize);
|
||||
char* mmap_read(const char *filename,size_t* filesize);
|
||||
|
||||
/* open file for writing, mmap whole file privately (copy on write),
|
||||
* close file, write length of map in filesize and return pointer to
|
||||
* map. */
|
||||
char* mmap_private(const char *filename,unsigned long* filesize);
|
||||
char* mmap_private(const char *filename,size_t* filesize);
|
||||
|
||||
/* open file for writing, mmap whole file shared, close file, write
|
||||
* length of map in filesize and return pointer to map. */
|
||||
char* mmap_shared(const char *filename,unsigned long* filesize);
|
||||
char* mmap_shared(const char *filename,size_t* filesize);
|
||||
|
||||
/* unmap a mapped region */
|
||||
int mmap_unmap(char* mapped,unsigned long maplen);
|
||||
int mmap_unmap(char* mapped,size_t maplen);
|
||||
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue