Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
fastforward
alloc_byte_repl.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File alloc_byte_repl.patch of Package fastforward
diff -rU3 fastforward-0.51.orig/alloc.h fastforward-0.51/alloc.h --- fastforward-0.51.orig/alloc.h 1998-05-19 16:25:42.000000000 +0000 +++ fastforward-0.51/alloc.h 2012-05-15 02:13:16.000000000 +0000 @@ -1,8 +1,17 @@ #ifndef ALLOC_H #define ALLOC_H -extern /*@null@*//*@out@*/char *alloc(); -extern void alloc_free(); -extern int alloc_re(); +#include <stdlib.h> + +static inline void *alloc(size_t n) { return malloc(n); } + +#define alloc_free(x) free(x) + +static inline int alloc_re(void *x, unsigned int m, unsigned int n) { + void *y = realloc(*((void **) x), n); + if (!y) return 0; + *((void **) x) = y; + return 1; +} #endif Nur in fastforward-0.51: build-stamp. diff -rU3 fastforward-0.51.orig/byte.h fastforward-0.51/byte.h --- fastforward-0.51.orig/byte.h 1998-05-19 16:25:42.000000000 +0000 +++ fastforward-0.51/byte.h 2012-05-15 02:06:08.000000000 +0000 @@ -1,12 +1,24 @@ #ifndef BYTE_H #define BYTE_H -extern unsigned int byte_chr(); -extern unsigned int byte_rchr(); -extern void byte_copy(); -extern void byte_copyr(); -extern int byte_diff(); -extern void byte_zero(); +#include <string.h> + +static inline unsigned int byte_chr(void *s, size_t n, int c) { + void *result = memchr(s, c, n); + if (!result) { return n; } + return result - s; +} + +static inline unsigned int byte_rchr(void *s, size_t n, int c) { + void *result = memrchr(s, c, n); + if (!result) { return n; } + return result - s; +} + +#define byte_copy(to,n,from) memcpy(to,from,n) +#define byte_copyr(to,n,from) memmove(to,from,n) +#define byte_diff(s,n,t) memcmp(s,t,n) +#define byte_zero(s,n) memset(s,0,n) #define byte_equal(s,n,t) (!byte_diff((s),(n),(t))) diff -rU3 fastforward-0.51.orig/Makefile fastforward-0.51/Makefile --- fastforward-0.51.orig/Makefile 1998-05-19 16:25:42.000000000 +0000 +++ fastforward-0.51/Makefile 2012-05-15 02:09:28.000000000 +0000 @@ -4,18 +4,6 @@ default: it -alloc.a: \ -makelib alloc.o alloc_re.o - ./makelib alloc.a alloc.o alloc_re.o - -alloc.o: \ -compile alloc.c alloc.h error.h - ./compile alloc.c - -alloc_re.o: \ -compile alloc_re.c alloc.h byte.h - ./compile alloc_re.c - auto-ccld.sh: \ conf-cc conf-ld warn-auto.sh ( cat warn-auto.sh; \ @@ -39,22 +27,6 @@ compile auto_qmail.c ./compile auto_qmail.c -byte_chr.o: \ -compile byte_chr.c byte.h - ./compile byte_chr.c - -byte_copy.o: \ -compile byte_copy.c byte.h - ./compile byte_copy.c - -byte_cr.o: \ -compile byte_cr.c byte.h - ./compile byte_cr.c - -byte_diff.o: \ -compile byte_diff.c byte.h - ./compile byte_diff.c - case.a: \ makelib case_lowerb.o ./makelib case.a case_lowerb.o @@ -142,11 +114,11 @@ fastforward: \ load fastforward.o slurpclose.o coe.o strset.o qmail.o auto_qmail.o \ -getopt.a cdb.a env.a strerr.a substdio.a stralloc.a alloc.a error.a \ +getopt.a cdb.a env.a strerr.a substdio.a stralloc.a error.a \ case.a str.a fs.a sig.a wait.a seek.a open.a fd.a ./load fastforward slurpclose.o coe.o strset.o qmail.o \ auto_qmail.o getopt.a cdb.a env.a strerr.a substdio.a \ - stralloc.a alloc.a error.a case.a str.a fs.a sig.a wait.a \ + stralloc.a error.a case.a str.a fs.a sig.a wait.a \ seek.a open.a fd.a fastforward.0: \ @@ -282,11 +254,11 @@ newaliases: \ load newaliases.o auto_qmail.o token822.o control.o cdbmss.o \ -cdbmake.a strerr.a getln.a substdio.a stralloc.a alloc.a error.a \ +cdbmake.a strerr.a getln.a substdio.a stralloc.a error.a \ str.a fs.a seek.a open.a case.a ./load newaliases auto_qmail.o token822.o control.o \ cdbmss.o cdbmake.a strerr.a getln.a substdio.a stralloc.a \ - alloc.a error.a str.a fs.a seek.a open.a case.a + error.a str.a fs.a seek.a open.a case.a newaliases.0: \ newaliases.1 @@ -300,10 +272,10 @@ newinclude: \ load newinclude.o auto_qmail.o token822.o control.o getln.a strerr.a \ -stralloc.a env.a alloc.a substdio.a error.a str.a fs.a open.a wait.a \ +stralloc.a env.a substdio.a error.a str.a fs.a open.a wait.a \ fd.a ./load newinclude auto_qmail.o token822.o control.o \ - getln.a strerr.a stralloc.a env.a alloc.a substdio.a \ + getln.a strerr.a stralloc.a env.a substdio.a \ error.a str.a fs.a open.a wait.a fd.a newinclude.0: \ @@ -329,10 +301,10 @@ ./compile open_trunc.c printforward: \ -load printforward.o cdb.a strerr.a substdio.a stralloc.a alloc.a \ +load printforward.o cdb.a strerr.a substdio.a stralloc.a \ error.a str.a ./load printforward cdb.a strerr.a substdio.a stralloc.a \ - alloc.a error.a str.a + error.a str.a printforward.0: \ printforward.1 @@ -344,10 +316,10 @@ ./compile printforward.c printmaillist: \ -load printmaillist.o getln.a strerr.a substdio.a stralloc.a alloc.a \ +load printmaillist.o getln.a strerr.a substdio.a stralloc.a \ error.a str.a ./load printmaillist getln.a strerr.a substdio.a \ - stralloc.a alloc.a error.a str.a + stralloc.a error.a str.a printmaillist.0: \ printmaillist.1 @@ -381,9 +353,9 @@ setforward: \ load setforward.o cdbmss.o cdbmake.a strerr.a substdio.a stralloc.a \ -alloc.a error.a str.a seek.a open.a case.a +error.a str.a seek.a open.a case.a ./load setforward cdbmss.o cdbmake.a strerr.a substdio.a \ - stralloc.a alloc.a error.a str.a seek.a open.a case.a + stralloc.a error.a str.a seek.a open.a case.a setforward.0: \ setforward.1 @@ -396,10 +368,10 @@ ./compile setforward.c setmaillist: \ -load setmaillist.o getln.a strerr.a substdio.a stralloc.a alloc.a \ +load setmaillist.o getln.a strerr.a substdio.a stralloc.a \ error.a str.a open.a ./load setmaillist getln.a strerr.a substdio.a stralloc.a \ - alloc.a error.a str.a open.a + error.a str.a open.a setmaillist.0: \ setmaillist.1 @@ -438,10 +410,9 @@ str.a: \ makelib str_len.o str_diff.o str_diffn.o str_cpy.o str_chr.o \ -str_rchr.o byte_chr.o byte_diff.o byte_copy.o byte_cr.o +str_rchr.o ./makelib str.a str_len.o str_diff.o str_diffn.o str_cpy.o \ - str_chr.o str_rchr.o byte_chr.o byte_diff.o byte_copy.o \ - byte_cr.o + str_chr.o str_rchr.o str_chr.o: \ compile str_chr.c str.h
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor