Skip to content

Commit

Permalink
Replaced many library with public-domain sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceg committed May 5, 2004
1 parent b034bf9 commit cbe7047
Show file tree
Hide file tree
Showing 80 changed files with 502 additions and 236 deletions.
1 change: 1 addition & 0 deletions CHANGES.idx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ in the next version.
-Updated ezmlmrc.fr. Thanks Jean-Marc Lasgouttes.
-Fixed bug in ezmlm-request when dealing with continuation lines.
Thanks Sami Farin.
-Replaced many library with public-domain sources.

ezmlm-idx-0.42, 20040114 (New maintainer: Bruce Guenter <bruceg@em.ca>)
=======================================================================
Expand Down
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1101,14 +1101,17 @@ make-load warn-auto.sh systype
chmod 755 load

lock.a: \
makelib lock_ex.o
./makelib lock.a lock_ex.o
makelib lock_ex.o lock_exnb.o
./makelib lock.a lock_ex.o lock_exnb.o

lock_ex.o: \
compile lock_ex.c lock_ex.c lock_ex.c lock_ex.c hasflock.h lock_ex.c \
lock.h lock_ex.c
compile lock_ex.c hasflock.h lock.h
./compile lock_ex.c

lock_exnb.o: \
compile lock_exnb.c hasflock.h lock.h
./compile lock_exnb.c

log.o: \
compile log.c substdio.h log.c readwrite.h log.c stralloc.h \
gen_alloc.h stralloc.h log.c log.h log.c now.h datetime.h now.h log.c \
Expand Down Expand Up @@ -1356,11 +1359,11 @@ stralloc.3
stralloc.a: \
makelib stralloc_eady.o stralloc_pend.o stralloc_copy.o \
stralloc_opys.o stralloc_opyb.o stralloc_cat.o stralloc_cats.o \
stralloc_catb.o stralloc_arts.o
stralloc_catb.o stralloc_arts.o stralloc_num.o
./makelib stralloc.a stralloc_eady.o stralloc_pend.o \
stralloc_copy.o stralloc_opys.o stralloc_opyb.o \
stralloc_cat.o stralloc_cats.o stralloc_catb.o \
stralloc_arts.o
stralloc_arts.o stralloc_num.o

stralloc_arts.o: \
compile stralloc_arts.c byte.h stralloc_arts.c str.h stralloc_arts.c \
Expand Down Expand Up @@ -1393,6 +1396,10 @@ gen_alloc.h stralloc.h stralloc_eady.c gen_allocdefs.h \
gen_allocdefs.h gen_allocdefs.h stralloc_eady.c
./compile stralloc_eady.c

stralloc_num.o: \
compile stralloc_num.c alloc.h stralloc.h
./compile stralloc_num.c

stralloc_opyb.o: \
compile stralloc_opyb.c stralloc.h gen_alloc.h stralloc.h \
stralloc_opyb.c byte.h stralloc_opyb.c
Expand Down
74 changes: 74 additions & 0 deletions REPLACED
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
alloc.c
alloc.h
alloc_re.c
byte.h
byte_chr.c
byte_copy.c
byte_cr.c
byte_diff.c
byte_rchr.c
byte_zero.c
case.h
case_diffb.c
case_diffs.c
case_lowerb.c
direntry.h1
direntry.h2
env.c
env.h
error.c
error.h
error_str.c
exit.h
ezmlm-list.c
ezmlm-make.1
ezmlm-make.c
Expand All @@ -10,8 +32,60 @@ ezmlm-send.c
ezmlm-sub.c
ezmlm-unsub.c
ezmlm-warn.c
fd.h
fd_copy.c
fd_move.c
find-systype.sh
fmt.h
fmt_uint.c
fmt_uint0.c
fmt_ulong.c
gen_alloc.h
gen_allocdefs.h
getopt.3
issub.c
lock.h
lock_ex.c
lock_exnb.c
open.h
open_append.h
open_read.h
open_trunc.c
open_write.c
qmail.c
qmail.h
scan.h
scan_ulong.c
seek.h
seek_set.c
sgetopt.c
str.h
str_chr.c
str_diff.c
str_len.c
str_rchr.c
str_start.c
stralloc.h
stralloc_cat.c
stralloc_catb.c
stralloc_cats.c
stralloc_copy.c
stralloc_eady.c
stralloc_num.c
stralloc_opyb.c
stralloc_opys.c
stralloc_pend.c
subgetopt.3
subgetopt.c
subgetopt.h
subscribe.c
subscribe.h
trycpp.c
trydrent.c
tryflock.c
trysgact.c
tryulong32.c
trywaitp.c
uint32.h1
uint32.h2
warn-auto.sh
2 changes: 2 additions & 0 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ issub.o
load
lock.a
lock_ex.o
lock_exnb.o
log.o
logmsg.o
make-compile
Expand Down Expand Up @@ -181,6 +182,7 @@ stralloc_catb.o
stralloc_cats.o
stralloc_copy.o
stralloc_eady.o
stralloc_num.o
stralloc_opyb.o
stralloc_opys.o
stralloc_pend.o
Expand Down
7 changes: 4 additions & 3 deletions alloc.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* Public domain, from daemontools-0.76. */

#include <stdlib.h>
#include "alloc.h"
#include "error.h"
extern char *malloc();
extern void free();

#define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
#define SPACE 4096 /* must be multiple of ALIGNMENT */
#define SPACE 2048 /* must be multiple of ALIGNMENT */

typedef union { char irrelevant[ALIGNMENT]; double d; } aligned;
static aligned realspace[SPACE / ALIGNMENT];
Expand Down
2 changes: 2 additions & 0 deletions alloc.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#ifndef ALLOC_H
#define ALLOC_H

Expand Down
2 changes: 2 additions & 0 deletions alloc_re.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include "alloc.h"
#include "byte.h"

Expand Down
2 changes: 2 additions & 0 deletions byte.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#ifndef BYTE_H
#define BYTE_H

Expand Down
2 changes: 2 additions & 0 deletions byte_chr.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include "byte.h"

unsigned int byte_chr(s,n,c)
Expand Down
2 changes: 2 additions & 0 deletions byte_copy.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include "byte.h"

void byte_copy(to,n,from)
Expand Down
2 changes: 2 additions & 0 deletions byte_cr.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include "byte.h"

void byte_copyr(to,n,from)
Expand Down
2 changes: 2 additions & 0 deletions byte_diff.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include "byte.h"

int byte_diff(s,n,t)
Expand Down
2 changes: 2 additions & 0 deletions byte_rchr.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include "byte.h"

unsigned int byte_rchr(s,n,c)
Expand Down
3 changes: 3 additions & 0 deletions byte_zero.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* Public domain, from djbdns-1.05. */
/* As per http://cr.yp.to/djbdns/res-disaster.html */

#include "byte.h"

void byte_zero(s,n)
Expand Down
15 changes: 9 additions & 6 deletions case.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/* Public domain, from djbdns-1.05. */
/* As per http://cr.yp.to/djbdns/res-disaster.html */

#ifndef CASE_H
#define CASE_H

extern void case_lowers();
extern void case_lowerb();
extern int case_diffs();
extern int case_diffb();
extern int case_starts();
extern int case_startb();
extern void case_lowers(char *);
extern void case_lowerb(char *,unsigned int);
extern int case_diffs(const char *,const char *);
extern int case_diffb(const char *,unsigned int,const char *);
extern int case_starts(const char *,const char *);
extern int case_startb(const char *,unsigned int,const char *);

#define case_equals(s,t) (!case_diffs((s),(t)))

Expand Down
8 changes: 4 additions & 4 deletions case_diffb.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Public domain, from djbdns-1.05. */
/* As per http://cr.yp.to/djbdns/res-disaster.html */

#include "case.h"

int case_diffb(s,len,t)
register char *s;
unsigned int len;
register char *t;
int case_diffb(register const char *s,register unsigned int len,register const char *t)
{
register unsigned char x;
register unsigned char y;
Expand Down
7 changes: 4 additions & 3 deletions case_diffs.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* Public domain, from djbdns-1.05. */
/* As per http://cr.yp.to/djbdns/res-disaster.html */

#include "case.h"

int case_diffs(s,t)
register char *s;
register char *t;
int case_diffs(register const char *s,register const char *t)
{
register unsigned char x;
register unsigned char y;
Expand Down
7 changes: 4 additions & 3 deletions case_lowerb.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* Public domain, from djbdns-1.05. */
/* As per http://cr.yp.to/djbdns/res-disaster.html */

#include "case.h"

void case_lowerb(s,len)
char *s;
unsigned int len;
void case_lowerb(char *s,unsigned int len)
{
unsigned char x;
while (len > 0) {
Expand Down
5 changes: 1 addition & 4 deletions case_startb.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include "case.h"

int case_startb(s,len,t)
register char *s;
unsigned int len;
register char *t;
int case_startb(const char *s,unsigned int len,const char *t)
{
register unsigned char x;
register unsigned char y;
Expand Down
4 changes: 1 addition & 3 deletions case_starts.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "case.h"

int case_starts(s,t)
register char *s;
register char *t;
int case_starts(const char *s,const char *t)
{
register unsigned char x;
register unsigned char y;
Expand Down
4 changes: 4 additions & 0 deletions direntry.h1
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* Public domain, from daemontools-0.76. */

#ifndef DIRENTRY_H
#define DIRENTRY_H

/* sysdep: -dirent */

#include <sys/types.h>
#include <sys/dir.h>
#define direntry struct direct
Expand Down
4 changes: 4 additions & 0 deletions direntry.h2
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/* Public domain, from daemontools-0.76. */

#ifndef DIRENTRY_H
#define DIRENTRY_H

/* sysdep: +dirent */

#include <sys/types.h>
#include <dirent.h>
#define direntry struct dirent
Expand Down
34 changes: 32 additions & 2 deletions error.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* Public domain, from daemontools-0.76. */

#include <errno.h>
#include "error.h"

Expand All @@ -17,7 +19,7 @@ ENOMEM;
-2;
#endif

int error_noent =
int error_noent =
#ifdef ENOENT
ENOENT;
#else
Expand Down Expand Up @@ -94,9 +96,37 @@ EACCES;
-13;
#endif

int error_nodevice =
#ifdef ENXIO
ENXIO;
#else
-14;
#endif

int error_proto =
#ifdef EPROTO
EPROTO;
#else
-15;
#endif

int error_isdir =
#ifdef EISDIR
EISDIR;
#else
-16;
#endif

int error_connrefused =
#ifdef ECONNREFUSED
ECONNREFUSED;
#else
-17;
#endif

int error_notdir =
#ifdef ENOTDIR
ENOTDIR;
#else
-14;
-18;
#endif
Loading

0 comments on commit cbe7047

Please sign in to comment.