great include cleanup

This commit is contained in:
leitner
2025-01-20 18:40:47 +00:00
parent def61cd5ce
commit cf32aafe8a
125 changed files with 194 additions and 186 deletions

View File

@@ -1,9 +1,9 @@
#include "likely.h"
#include <libowfat/compiler.h>
#include <sys/types.h>
#include <stdlib.h>
#include "safemult.h"
#include "array.h"
#include "byte.h"
#include <libowfat/safemult.h>
#include <libowfat/array.h>
#include <libowfat/byte.h>
#if 0
static array x;
@@ -46,26 +46,26 @@
void* array_allocate(array* x,uint64 membersize,int64 pos) {
uint64 wanted;
if (__unlikely(x->allocated<0)) return 0; /* array is failed */
if (__unlikely(pos+1<1)) return 0;
if (unlikely(x->allocated<0)) return 0; /* array is failed */
if (unlikely(pos+1<1)) return 0;
/* second case of overflow: pos*membersize too large */
if (__unlikely(!umult64(membersize,pos+1,&wanted))) return 0;
if (unlikely(!umult64(membersize,pos+1,&wanted))) return 0;
if (wanted > (uint64)x->initialized) {
if (__unlikely(wanted >= (uint64)x->allocated)) {
if (unlikely(wanted >= (uint64)x->allocated)) {
/* round up a little */
if (membersize<8)
wanted=(wanted+127)&(-128ll); /* round up to multiple of 128 */
else
wanted=(wanted+4095)&(-4096ll); /* round up to 4k pages */
if (__unlikely(wanted<128)) return 0; /* overflow during rounding */
if (unlikely(wanted<128)) return 0; /* overflow during rounding */
if (sizeof(size_t) != sizeof(int64) && __unlikely((size_t)(wanted) != wanted))
if (sizeof(size_t) != sizeof(int64) && unlikely((size_t)(wanted) != wanted))
return 0;
{
char* tmp=realloc(x->p,wanted);
if (__unlikely(!tmp)) return 0;
if (unlikely(!tmp)) return 0;
x->p=tmp;
}
x->allocated=wanted;

View File

@@ -1,4 +1,4 @@
#include "array.h"
#include <libowfat/array.h>
int64 array_bytes(const array* const x) {
if (x->allocated<0) return -1;

View File

@@ -1,5 +1,5 @@
#include "array.h"
#include "byte.h"
#include <libowfat/array.h>
#include <libowfat/byte.h>
void array_cat(array* to,const array* const from) {
if (from->allocated<0) {

View File

@@ -1,4 +1,4 @@
#include "array.h"
#include <libowfat/array.h>
void array_cat0(array* to) {
static char zero;

View File

@@ -1,5 +1,5 @@
#include "array.h"
#include "byte.h"
#include <libowfat/array.h>
#include <libowfat/byte.h>
void array_catb(array* to,const char* from,uint64 len) {
long l;

View File

@@ -1,4 +1,4 @@
#include "array.h"
#include <libowfat/array.h>
void array_cate(array* to,const array* const from,int64 pos,int64 stop) {
if (pos<0 || stop<pos) {

View File

@@ -1,5 +1,5 @@
#include "array.h"
#include "str.h"
#include <libowfat/array.h>
#include <libowfat/str.h>
void array_cats(array* to,const char* from) {
array_catb(to,from,str_len(from));

View File

@@ -1,5 +1,5 @@
#include "array.h"
#include "str.h"
#include <libowfat/array.h>
#include <libowfat/str.h>
void array_cats0(array* to,const char* from) {
array_catb(to,from,str_len(from)+1);

View File

@@ -1,5 +1,5 @@
#include "byte.h"
#include "array.h"
#include <libowfat/array.h>
#include <libowfat/byte.h>
int array_equal(const array* const x,const array* const y) {
if (x->initialized!=y->initialized) return 0;

View File

@@ -1,5 +1,5 @@
#include <stdlib.h>
#include "array.h"
#include <libowfat/array.h>
void array_fail(array* x) {
if (x->p) free(x->p);

View File

@@ -1,6 +1,6 @@
#include "likely.h"
#include "safemult.h"
#include "array.h"
#include <libowfat/compiler.h>
#include <libowfat/safemult.h>
#include <libowfat/array.h>
#if 0
static array x;
@@ -17,9 +17,9 @@
void* array_get(const array* const x,uint64 membersize,int64 pos) {
uint64 wanted;
if (__unlikely(pos+1<1)) return 0;
if (__unlikely(!umult64(membersize,pos,&wanted))) return 0;
if (unlikely(pos+1<1)) return 0;
if (unlikely(!umult64(membersize,pos,&wanted))) return 0;
if (__unlikely((int64)wanted >= x->allocated || wanted>=x->initialized)) return 0;
if (unlikely((int64)wanted >= x->allocated || wanted>=x->initialized)) return 0;
return (void*)(x->p+pos*membersize);
}

View File

@@ -1,4 +1,4 @@
#include "array.h"
#include <libowfat/array.h>
int64 array_length(const array* const x,uint64 membersize) {
if (x->allocated<0) return -1;

View File

@@ -1,5 +1,5 @@
#include <stdlib.h>
#include "array.h"
#include <libowfat/array.h>
void array_reset(array* x) {
if (x->p) free(x->p);

View File

@@ -1,4 +1,4 @@
#include "array.h"
#include <libowfat/array.h>
void* array_start(const array* const x) {
return x->p;

View File

@@ -1,4 +1,4 @@
#include "array.h"
#include <libowfat/array.h>
void array_trunc(array* x) {
x->initialized=0;

View File

@@ -1,12 +1,12 @@
#include "likely.h"
#include "safemult.h"
#include "array.h"
#include <libowfat/compiler.h>
#include <libowfat/safemult.h>
#include <libowfat/array.h>
/* I'm not sure I understand what this function is good for */
void array_truncate(array* x,uint64 membersize,int64 len) {
uint64 wanted;
if (__unlikely(len<0)) return;
if (__unlikely(!umult64(membersize,len,&wanted))) return;
if (__unlikely(wanted > x->initialized)) return;
if (unlikely(len<0)) return;
if (unlikely(!umult64(membersize,len,&wanted))) return;
if (unlikely(wanted > x->initialized)) return;
x->initialized=wanted;
}

View File

@@ -1,11 +1,10 @@
#include "likely.h"
#include <stdlib.h>
#ifndef _WIN32
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#endif
#include "iarray.h"
#include <libowfat/iarray.h>
#ifdef __dietlibc__
#include <sys/atomic.h>
#else

View File

@@ -4,7 +4,7 @@
#else
#include <unistd.h>
#endif
#include "iarray.h"
#include <libowfat/iarray.h>
static void freechain(iarray_page* p,size_t pagesize) {
while (p) {

View File

@@ -1,4 +1,4 @@
#include "iarray.h"
#include <libowfat/iarray.h>
void* iarray_get(iarray* ia,size_t pos) {
size_t index;

View File

@@ -1,4 +1,4 @@
#include "iarray.h"
#include <libowfat/iarray.h>
void iarray_init(iarray* ia,size_t elemsize) {
size_t i;

View File

@@ -1,4 +1,4 @@
#include "iarray.h"
#include <libowfat/iarray.h>
size_t iarray_length(iarray* ia) {
return ia->len;

View File

@@ -1,6 +1,5 @@
#include "byte.h"
#include "buffer.h"
#include "scan.h"
#include <libowfat/byte.h>
#include <libowfat/buffer.h>
#include <string.h> /* for memccpy */

View File

@@ -1,6 +1,5 @@
#include "byte.h"
#include "buffer.h"
#include "scan.h"
#include <libowfat/byte.h>
#include <libowfat/buffer.h>
ssize_t buffer_get_token_pred(buffer* b,char* x,size_t len,
string_predicate p) {

View File

@@ -1,5 +1,5 @@
#include "buffer.h"
#include "fmt.h"
#include <libowfat/buffer.h>
#include <libowfat/fmt.h>
int buffer_put8long(buffer *b,unsigned long l) {
char buf[FMT_8LONG];

View File

@@ -1,5 +1,5 @@
#include "buffer.h"
#include "fmt.h"
#include <libowfat/buffer.h>
#include <libowfat/fmt.h>
int buffer_putlong(buffer *b,signed long l) {
char buf[FMT_LONG];

View File

@@ -1,5 +1,5 @@
#include "buffer.h"
#include "fmt.h"
#include <libowfat/buffer.h>
#include <libowfat/fmt.h>
int buffer_putlonglong(buffer *b,signed long long l) {
char buf[FMT_LONG];

View File

@@ -1,5 +1,5 @@
#include "buffer.h"
#include "fmt.h"
#include <libowfat/buffer.h>
#include <libowfat/fmt.h>
int buffer_putulong(buffer *b,unsigned long l) {
char buf[FMT_ULONG];

View File

@@ -1,5 +1,5 @@
#include "buffer.h"
#include "fmt.h"
#include <libowfat/buffer.h>
#include <libowfat/fmt.h>
int buffer_putulonglong(buffer *b,unsigned long long l) {
char buf[FMT_ULONG];

View File

@@ -1,5 +1,5 @@
#include "buffer.h"
#include "fmt.h"
#include <libowfat/buffer.h>
#include <libowfat/fmt.h>
int buffer_putxlong(buffer *b,unsigned long l) {
char buf[FMT_XLONG];

View File

@@ -1,4 +1,4 @@
#include "case.h"
#include <libowfat/case.h>
int case_diffb(register const void* S,register size_t len,register const void* T)
{

View File

@@ -1,4 +1,4 @@
#include "case.h"
#include <libowfat/case.h>
int case_diffs(register const char *s,register const char *t)
{

View File

@@ -1,4 +1,4 @@
#include "case.h"
#include <libowfat/case.h>
void case_lowerb(void *S,size_t len) {
char* s=(char*)S;

View File

@@ -1,4 +1,4 @@
#include "case.h"
#include <libowfat/case.h>
void case_lowers(char *s) {
unsigned char x;

View File

@@ -1,4 +1,4 @@
#include "case.h"
#include <libowfat/case.h>
/* str_start returns 1 if the b is a prefix of a, 0 otherwise */
int case_starts(const char* a, const char* b) {

5
fmt.h
View File

@@ -260,6 +260,11 @@ size_t fmt_netstring(char* dest,const char* src,size_t len) noexcept;
att_write(1)
size_t fmt_escapecharxml(char* dest,uint32_t ch) noexcept;
/* XML escaping but only for necessary codepoints.
* Others emitted as UTF-8 */
att_write(1)
size_t fmt_xmlescape(char* dest,uint32_t ch) noexcept;
/* HTML escaping is the same as XML escaping. */
att_write(1)
size_t fmt_escapecharhtml(char* dest,uint32_t ch) noexcept;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_8long(char *dest,unsigned long i) {
register unsigned long len,tmp;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_8longlong(char *dest,unsigned long long i) {
register unsigned long len;

View File

@@ -1,15 +1,21 @@
#include "fmt.h"
#include <libowfat/fmt.h>
static size_t asn1derlengthbytesneeded(unsigned long long l) {
size_t needed;
for (needed=1; (l>>=8)>0; ++needed) ;
return needed;
}
/* write int in least amount of bytes, return number of bytes */
/* as used in ASN.1 length */
size_t fmt_asn1derlength(char* dest,unsigned long long l) {
/* encoding is either l%128 or (0x80+number of bytes,bytes) */
size_t needed=(sizeof l),i;
size_t i;
if (l<128) {
if (dest) *dest=l&0x7f;
return 1;
}
for (i=1; i<needed; ++i)
for (i=1; i<sizeof l; ++i)
if (!(l>>(i*8)))
break;
if (dest) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
/* write int in least amount of bytes, return number of bytes */
/* as used in ASN.1 DER tag */

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_double(char *dest, double d,int maxlen,int prec) {
union {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
#ifdef UNITTEST
#include "fmt_tohex.c"

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
#ifdef UNITTEST
#undef UNITTEST

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_escapecharquotedprintableutf8(char* dest,uint32_t ch) {
char buf[FMT_UTF8];

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_escapecharxml(char* dest,uint32_t ch) {
char a[FMT_LONG], b[FMT_XLONG+1];

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
/* "foo" -> "foo "
* append padlen-srclen spaces after dest, if that is >= 0. Truncate

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "byte.h"
#include <libowfat/fmt.h>
#include <libowfat/byte.h>
#include <time.h>
static unsigned int fmt_2digits(char* dest,int i) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_human(char* dest,unsigned long long l) {
char unit;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_humank(char* dest,unsigned long long l) {
char unit;

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "byte.h"
#include <libowfat/fmt.h>
#include <libowfat/byte.h>
#include <time.h>
static unsigned int fmt_2digits(char* dest,int i) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_long(char *dest,long int i) {
if (i<0) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_longlong(char *dest,signed long long int i) {
if (i<0) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_minus(char *dest,int i) {
if (i<0) {

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "rangecheck.h"
#include <libowfat/fmt.h>
#include <libowfat/rangecheck.h>
#include <string.h>
size_t fmt_netstring(char* dest,const char* src,size_t len) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
/* "foo" -> " foo"
* write padlen-srclen spaces, if that is >= 0. Then copy srclen

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_pb_double(char* dest,size_t fieldno,double d) {
size_t n=fmt_pb_tag(dest,fieldno,1);

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_pb_float(char* dest,size_t fieldno,float f) {
size_t n=fmt_pb_tag(dest,fieldno,5);

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_pb_int(char* dest,size_t fieldno,unsigned long long l) {
size_t n=fmt_pb_tag(dest,fieldno,0);

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_pb_sint(char* dest,size_t fieldno,signed long long l) {
size_t n=fmt_pb_tag(dest,fieldno,0);

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "rangecheck.h"
#include <libowfat/fmt.h>
#include <libowfat/rangecheck.h>
size_t fmt_pb_string(char* dest,size_t fieldno,const char* s,size_t l) {
size_t n=fmt_pb_tag(dest,fieldno,2);

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_pb_tag(char* dest,size_t fieldno,unsigned char type) {
if (type>5 || (fieldno >> (sizeof(fieldno)*8-3))) return 0;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_pb_type0_sint(char* dest,signed long long l) {
return fmt_varint(dest,(l << 1) ^ (l >> (sizeof(l)*8-1)));

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "compiletimeassert.h"
#include <libowfat/fmt.h>
#include <libowfat/compiletimeassert.h>
size_t fmt_pb_type1_double(char* dest,double d) {
union {

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "uint64.h"
#include <libowfat/fmt.h>
#include <libowfat/uint64.h>
size_t fmt_pb_type1_fixed64(char* dest,uint64_t l) {
if (dest) uint64_pack(dest,l);

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "rangecheck.h"
#include <libowfat/fmt.h>
#include <libowfat/rangecheck.h>
#include <string.h>
size_t fmt_pb_type2_string(char* dest,const char* s,size_t l) {

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "uint32.h"
#include <libowfat/fmt.h>
#include <libowfat/uint32.h>
size_t fmt_pb_type5_fixed32(char* dest,uint32_t l) {
if (dest) uint32_pack(dest,l);

View File

@@ -1,5 +1,5 @@
#include "fmt.h"
#include "compiletimeassert.h"
#include <libowfat/fmt.h>
#include <libowfat/compiletimeassert.h>
size_t fmt_pb_type5_float(char* dest,float f) {
union {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_plusminus(char *dest,int i) {
if (i) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_str(char *out,const char *in) {
register char* s=out;

View File

@@ -1,5 +1,5 @@
#include <stdarg.h>
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_strm_internal(char* dest, ...) {
size_t n;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_strn(char *out,const char *in,size_t limit) {
register char* s=out;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
char fmt_tohex(char c) {
return (char)(c>=10?c-10+'a':c+'0');

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_ulong(char *dest,unsigned long i) {
register unsigned long len,tmp,len2;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_ulong0(char *dest,unsigned long i,size_t pad) {
register unsigned int len;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
size_t fmt_ulonglong(char *dest,unsigned long long int i) {
register unsigned long len;

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
/* write int in least amount of bytes, return number of bytes */
/* as used in varints from Google protocol buffers */

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
#include "haveinline.h"
static inline char tohex(char c) {

View File

@@ -1,4 +1,4 @@
#include "fmt.h"
#include <libowfat/fmt.h>
static inline char tohex(char c) {
return (char)(c>=10?c-10+'a':c+'0');

View File

@@ -1,6 +1,6 @@
#include "fmt.h"
#include <libowfat/fmt.h>
/* This is NOT fmt_escapexml, which will escape everything, whether it
/* This is NOT fmt_escapecharxml, which will escape everything, whether it
* needs escaping or not. This will only escape what needs escaping, and
* reject invalid inputs */
size_t fmt_xmlescape(char* dest,uint32_t ch) {

View File

@@ -1,7 +1,7 @@
#include "io_internal.h"
#include <iarray.h>
#include <libowfat/iarray.h>
#include <time.h>
#include "fmt.h"
#include <libowfat/fmt.h>
#include <sys/time.h>
unsigned int io_debugstring(int64 s,char* buf,unsigned int bufsize) {

View File

@@ -29,7 +29,7 @@
#endif
#ifdef __dietlibc__
#include "fmt.h"
#include <libowfat/fmt.h>
#include <write12.h>
#endif

View File

@@ -2,12 +2,12 @@
#define my_extern extern
#endif
#include "libowfat/io.h"
#include "libowfat/array.h"
#include "libowfat/iarray.h"
#include <libowfat/io.h>
#include <libowfat/array.h>
#include <libowfat/iarray.h>
#ifdef __MINGW32__
#include <winsock2.h>
#include "socket.h"
#include <libowfat/socket.h>
my_extern HANDLE io_comport;
#else
#include "haveepoll.h"

View File

@@ -1,5 +1,5 @@
#include "iob.h"
#include "array.h"
#include <libowfat/iob.h>
#include <libowfat/array.h>
typedef struct iob_entry {
enum { FROMBUF, FROMFILE } type;

View File

@@ -13,7 +13,7 @@ typedef struct {
#define IOPAUSE_READ 1
#define IOPAUSE_WRITE 4
#include "taia.h"
#include <libowfat/taia.h>
extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);

View File

@@ -12,7 +12,7 @@ typedef struct pollfd iopause_fd;
#define IOPAUSE_READ POLLIN
#define IOPAUSE_WRITE POLLOUT
#include "taia.h"
#include <libowfat/taia.h>
extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);

2
ip4.h
View File

@@ -6,6 +6,8 @@
extern "C" {
#endif
#include <stddef.h>
size_t scan_ip4(const char *src,char ip[4]);
size_t fmt_ip4(char *dest,const char ip[4]);

View File

@@ -1,3 +1,5 @@
// no longer needed. Use likely and unlikely from libowfat/compiler.h
#ifdef __dietlibc__
#include <sys/cdefs.h>
#else

View File

@@ -4,7 +4,7 @@
/* for ssize_t */
#include <sys/types.h>
#include "stralloc.h"
#include <libowfat/stralloc.h>
#ifdef __cplusplus
extern "C" {

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
size_t scan_8int(const char* src,unsigned int* dest) {
/* make a copy of src so we can return the number of bytes we progressed */

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
#ifdef UNITTEST
#undef UNITTEST

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
size_t scan_8longlong(const char *src,unsigned long long *dest) {
/* make a copy of src so we can return the number of bytes we progressed */

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
size_t scan_8longn(const char *src,size_t n,unsigned long *dest) {
/* make a copy of src so we can return the number of bytes we progressed */

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
size_t scan_8short(const char* src,unsigned short* dest) {
/* make a copy of src so we can return the number of bytes we progressed */

View File

@@ -1,5 +1,4 @@
#include "scan.h"
#include <ctype.h>
#include <libowfat/scan.h>
/* Return the number of leading chars in s that are in charset, but no
* more than limit */

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
#ifdef __GNUC__
static inline int isdigit(int c) { return (c>='0' && c<='9'); }

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
int scan_fromhex(unsigned char c) {
c=(unsigned char)(c-'0');

View File

@@ -2,9 +2,9 @@
#ifdef __dietlibc__
#define __deprecated__
#endif
#include "scan.h"
#include "byte.h"
#include "case.h"
#include <libowfat/scan.h>
#include <libowfat/byte.h>
#include <libowfat/case.h>
#include <time.h>
#include <stdlib.h>

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
static const unsigned int maxint = ((unsigned int)-1)>>1;

View File

@@ -2,9 +2,7 @@
#ifdef __dietlibc__
#define __deprecated__
#endif
#include "scan.h"
#include "byte.h"
#include "case.h"
#include <libowfat/scan.h>
#include <time.h>
#include <stdlib.h>

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
#ifdef UNITTEST
#undef UNITTEST

View File

@@ -1,4 +1,4 @@
#include "scan.h"
#include <libowfat/scan.h>
static const unsigned long maxlong = ((unsigned long)-1)>>1;

Some files were not shown because too many files have changed in this diff Show More