]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed includes, defines and copyrights.
authorMartin Mares <mj@ucw.cz>
Mon, 11 Dec 2000 22:12:13 +0000 (22:12 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 11 Dec 2000 22:12:13 +0000 (22:12 +0000)
57 files changed:
charset/charconv.c
charset/debug.c
charset/setnames.c
charset/strlen.c
charset/test.c
charset/tocat.c
charset/tolower.c
charset/tosig.c
charset/toupper.c
charset/unaccent.c
charset/unicode.h
charset/utf8.c
lib/alloc.c
lib/alloc_str.c
lib/charmap.h
lib/chartype.h
lib/config.h
lib/ctmatch.c
lib/db-emul.c
lib/db-rebuild.c
lib/db-test.c
lib/db.c
lib/db.h
lib/db_internal.h
lib/fastbuf.c
lib/fb-file.c
lib/fb-mem.c
lib/lfs.h
lib/lib.h
lib/lists.c
lib/lists.h
lib/log.c
lib/log.h
lib/log2.c
lib/md5.c
lib/md5.h
lib/md5hex.c
lib/mmap.c
lib/pagecache.c
lib/pagecache.h
lib/patimatch.c
lib/patmatch.c
lib/patmatch.h
lib/pool.c
lib/pools.h
lib/prime.c
lib/random.c
lib/realloc.c
lib/regex.c
lib/str_ctype.c
lib/str_upper.c
lib/temp.c
lib/timer.c
lib/url.c
lib/url.h
lib/wildmatch.c
lib/wordsplit.c

index 7ef6c8947351db428f9b988f4857463fa6e5825c..7cae74929d3be3b570b8c68ca9024e30fec2bb01 100644 (file)
@@ -7,13 +7,10 @@
  *     of the GNU General Public License.
  */
 
+#include "lib/lib.h"
 #include "charset/charconv.h"
 #include "charset/chartable.h"
 
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
 void
 conv_init(struct conv_context *c)
 {
index f67ea8c79a5fc9d8543fbaaf375b6088c716bdad..738d1d41c6af355e1748da6078fbba3e61a8ace0 100644 (file)
@@ -1,11 +1,9 @@
 /*
  *     The UniCode Library -- Debugging Support Functions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-
 #include "lib/lib.h"
 #include "charset/unicode.h"
 
index 67e0de75a6474d02d584b040620eb0e7d3960c98..e9665971f9422614c2b5707bb727c866c18f06ba 100644 (file)
@@ -7,11 +7,10 @@
  *     of the GNU General Public License.
  */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "lib/lib.h"
-#include "charconv.h"
+#include "charset/charconv.h"
+
+#include <string.h>
 
 char *cs_names[] = {
        "US-ASCII",
index b1f282b15d12f0b5275b778bd7ffe861405a3b8e..1aad35ccdd23ed0fc6d57622e417d17fcf2d8cb8 100644 (file)
@@ -1,9 +1,10 @@
 /*
  *     The UniCode Library -- String Length
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 
 uns
index b5fcb58b08e20ea79193dd7ae64c196510c51d87..8b8e8d875609cf511303cc3276b6e1208df45ea8 100644 (file)
@@ -1,10 +1,10 @@
+#include "lib/lib.h"
+#include "charset/unicode.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
-#include "lib/lib.h"
-#include "charset/unicode.h"
-
 int main(void)
 {
   byte buf[256];
index c12c6226fd89d06b0867c74c2c8cff0461ce0329..d9e6915c7f2d8309ad04eb83f8bb0df35c4e9bf3 100644 (file)
@@ -1,8 +1,9 @@
 /*
  *     The UniCode Library -- Category Table
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 #include "charset/U-cat.h"
index 84271e5f41f0def9761325b2420e2333c46cd259..88389f8a877cb61d5e350a98db35e714f1fab837 100644 (file)
@@ -1,8 +1,9 @@
 /*
  *     The UniCode Library -- Lowercase Table
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 #include "charset/U-lower.h"
index 0395eb97894d2a2a1df662b8318cced301b62054..3cece27da8d8c7cb00bfb499bd979b889eddab76 100644 (file)
@@ -1,8 +1,9 @@
 /*
  *     The UniCode Library -- Signaturing Table
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 #include "charset/U-sig.h"
index 43210349cd8051ffc7cb5f812674c33147912ad2..ffb113f6f5ca78bf5daab448cc27a39ffcb64754 100644 (file)
@@ -1,8 +1,9 @@
 /*
  *     The UniCode Library -- Uppercase Table
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 #include "charset/U-upper.h"
index 3ccdbe7fa2a0556e4a7fe7fd303928c42d1e6521..c91724615a3b13d40c8a9fa6c31cce3893415689 100644 (file)
@@ -1,8 +1,9 @@
 /*
  *     The UniCode Library -- Unaccenting Table
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 #include "charset/U-unacc.h"
index 36336c8e3e2585b5d58c138f769d017fe2dd367c..61617c08f93de95975681ccd19456548c966cca3 100644 (file)
@@ -1,13 +1,12 @@
 /*
  *     The UniCode Library
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
 #ifndef _UNICODE_H
 #define _UNICODE_H
 
-#include "lib/config.h"
 #include "lib/chartype.h"
 
 extern byte *_U_cat[], *_U_sig[];
index 1258f73615dddb3d24e33a9ae17d4989d16bf952..5d9b3adda759a34197bf181d44a9842e92917263 100644 (file)
@@ -1,9 +1,10 @@
 /*
  *     The UniCode Library -- UTF-8 Functions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/lib.h"
 #include "charset/unicode.h"
 
 uns
index 127e63cabfcd4ead9b62e5d4206b3e4aa63aee1f..bec45d9b590f691050aa7722cc746af63c91c640 100644 (file)
@@ -1,14 +1,13 @@
 /*
  *     Sherlock Library -- Memory Allocation
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 2000 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 
+#include <stdlib.h>
+
 void *
 xmalloc(uns size)
 {
index 0153887e252bcd001a633d7ff5f98e70e626914a..baf5f5adf94cfc844da495e49de1b95dd6055e58 100644 (file)
@@ -1,14 +1,13 @@
 /*
  *     Sherlock Library -- String Allocation
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "lib/lib.h"
 
+#include <string.h>
+
 byte *
 stralloc(byte *s)
 {
index 037fd60e27e98f2230754543ee95c4a4d8a88ae1..ab9eb6c75acdde0e074000832e5b08c9da3cbe49 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Character Code Map (UTF-8 Version)
  *
- *     (c) 1998 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1998 Martin Mares <mj@ucw.cz>
  */
 
 /* Syntax: CHAR(code, uppercase, unaccented_version, accent_code, category) */
index 16118b9fa64c730a710a9060181ada4ce2f0060d..4111eb11eb0a0b15e3d33b0ac9b9f58c8bcf7c6d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Character Types
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _SHERLOCK_CHARTYPE_H
index 9b867f7b465bdbf82c4ee9daca9315a21702ed31..68d688a8b5776405c3e2916b1b1dd24cb5358c3d 100644 (file)
 
 /* Features */
 
-/* FIXME: Prune */
-#define SHERLOCK_CONFIG_REF_WEIGHTS    /* Weighed references */
 #define SHERLOCK_CONFIG_LARGE_DB       /* Support for DB files >4GB */
 #define SHERLOCK_CONFIG_LFS            /* Large files on 32-bit systems */
 #undef  SHERLOCK_CONFIG_LFS_LIBC       /* LFS supported directly by libc */
-#undef  SHERLOCK_CONFIG_LONG_TAGS      /* Section tags are 32-bit */
-#undef  SHERLOCK_CONFIG_SPLIT_GATHERER /* Don't merge documents from different sections */
 
 /* Types */
 
index 269ab83df1d8121e3383c7e55db8d0ab05033248..4c2687b9b3cdefa113b8bf33540810971d2867c5 100644 (file)
@@ -1,11 +1,9 @@
 /*
  *     Sherlock Library -- Content-Type Pattern Matching
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-
 #include "lib/lib.h"
 #include "lib/chartype.h"
 
index f6cc65ca5f06895460a8b82f0d655f88b724dab7..a8d88743820800f87b95737342ef40bc638f0284 100644 (file)
@@ -1,16 +1,16 @@
 /*
  *     Sherlock Library -- SDBM emulator at top of GDBM
  *
- *     (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+#include "lib/db.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "lib/lib.h"
-#include "lib/db.h"
-
 #include <gdbm.h>
 
 struct sdbm {
index 3ab673fcdaedc8126a6647e1ae1d5062c577c9ba..17493bc1ad974ae7ef4a27640567b7d89abc24ac 100644 (file)
@@ -4,6 +4,8 @@
  *     (c) 2000 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
+#include "lib/db.c"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -11,8 +13,6 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include "lib/db.c"
-
 int
 main(int argc, char **argv)
 {
index 99139eb30d96c54a1e06a619f005fa8e5958efd6..dabbbaa7a22803131ab358a53363ca0de4fa3ec7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Database Manager -- Tests and Benchmarks
  *
- *     (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
 #if 1
index c33ca6f54768ea6ac5eff8944e5c97d768ff8cb7..84eaef189c865bb4fc499480ebc28bf0b30fc9a0 100644 (file)
--- a/lib/db.c
+++ b/lib/db.c
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Fast Database Management Routines
  *
- *     (c) 1999--2000 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999--2000 Martin Mares <mj@ucw.cz>
  */
 
 /*
  *     and we assume it's sorted.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
 #include "lib/lib.h"
 #include "lib/lfs.h"
 #include "lib/pagecache.h"
 #include "lib/db.h"
 #include "lib/db_internal.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
 struct sdbm *
 sdbm_open(struct sdbm_options *o)
 {
index cd24b90831cb9f5eda80d6a6ef8b5d59130e004e..6b409ef4350cdbcf6f4f70bbd8d16024a95b0a6b 100644 (file)
--- a/lib/db.h
+++ b/lib/db.h
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Fast Database Management Routines
  *
- *     (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _SHERLOCK_DB_H
index 7a72a83caa54b6ac744332c478f6cc049905c31c..e54d711454a353105ba2ba92578328bc6d94baba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Fast Database Management Routines -- Internal Declarations
  *
- *     (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
 #define SDBM_NUM_FREE_PAGE_POOLS 32
index 42506f763e385715028bf973b2eade7d30dcf74d..1be1b576b1f3696baf729bb92817d802f294d66f 100644 (file)
@@ -4,12 +4,12 @@
  *     (c) 1997--2000 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 #include "lib/fastbuf.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+
 void bclose(struct fastbuf *f)
 {
   bflush(f);
index 07b4ec5ddf2d5f79343c979468d60053717724f2..d89522ef53c982ba6bf3cf6303fbfe55c4178af2 100644 (file)
@@ -4,15 +4,15 @@
  *     (c) 1997--2000 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+#include "lib/fastbuf.h"
+#include "lib/lfs.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 
-#include "lib/lib.h"
-#include "lib/fastbuf.h"
-#include "lib/lfs.h"
-
 static int
 bfd_refill(struct fastbuf *f)
 {
index f582e2e3f9cc5f4a733a9f756a693ed20d1b9043..e83e2ebc69145c8f40c36fa8865f035470c8f738 100644 (file)
@@ -4,12 +4,12 @@
  *     (c) 1997--2000 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 #include "lib/fastbuf.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+
 struct memstream {
   unsigned blocksize;
   unsigned uc;
index f12f5ef37e99e1014df6ec3cfbf2f7a46bf5163c..7a63597fe3c1a086139517698a7c4b2972eb8a2a 100644 (file)
--- a/lib/lfs.h
+++ b/lib/lfs.h
@@ -1,12 +1,15 @@
 /*
  *     Sherlock Library -- Large File Support
  *
- *     (c) 1999--2000 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999--2000 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _SHERLOCK_LFS_H
 #define _SHERLOCK_LFS_H
 
+#include <fcntl.h>
+#include <unistd.h>
+
 #ifdef SHERLOCK_CONFIG_LFS
 
 #ifdef SHERLOCK_CONFIG_LFS_LIBC
index 57e8ef82a18184ccc2b4eb4940772677063f7653..2fb56d95e552a8a6a2beba1e9e3c5507a8174da1 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -1,7 +1,13 @@
 /*
  *     Sherlock Library -- Miscellaneous Functions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997--2000 Martin Mares <mj@ucw.cz>
+ */
+
+/*
+ *  This file should be included as the very first include in all
+ *  source files, especially before all OS includes since it sets
+ *  up libc feature macros.
  */
 
 #ifndef _SHERLOCK_LIB_H
@@ -9,6 +15,14 @@
 
 #include "lib/config.h"
 
+/* Tell libc we're going to use all extensions available */
+
+#define _GNU_SOURCE
+
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
 /* Ugly structure handling macros */
 
 #define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i)
@@ -72,47 +86,6 @@ int match_ct_patt(byte *, byte *);
 
 int log2(u32);
 
-/* obj.c */
-
-/* FIXME: What to do with this? */
-
-struct odes {                          /* Object description */
-  struct oattr *attrs;
-  struct mempool *pool;
-};
-
-struct oattr {                         /* Object attribute */
-  struct oattr *next, *same;
-  byte attr;
-  byte val[1];
-};
-
-void obj_dump(struct odes *);
-struct odes *obj_fload(FILE *, byte *);
-struct odes *obj_new(void);
-struct odes *obj_load(byte *);
-void obj_fwrite(FILE *, struct odes *);
-void obj_write(byte *, struct odes *);
-void obj_free(struct odes *);
-struct oattr *find_attr(struct odes *, uns);
-struct oattr *find_attr_last(struct odes *, uns);
-uns del_attr(struct odes *, struct oattr *);
-byte *find_aval(struct odes *, uns);
-struct oattr *set_attr(struct odes *, uns, byte *);
-struct oattr *set_attr_num(struct odes *, uns, uns);
-struct oattr *add_attr(struct odes *, struct oattr *, uns, byte *);
-struct oattr *prepend_attr(struct odes *, uns, byte *);
-
-/* oname.c */
-
-/* FIXME: Kill? */
-
-#define OID_MIN 0x10000                /* Values less than this have special meaning */
-
-oid_t new_oid(uns);
-void mk_obj_name(byte *, oid_t, byte *);
-int dump_obj_to_file(byte *, oid_t, struct odes *, int);
-
 /* wordsplit.c */
 
 int wordsplit(byte *, byte **, uns);
index 9f783de9daf03d0e60d972c219cecc1be7e5bec7..eb9967b538f5b18f9dc4f2eaafda0078e6a49a4e 100644 (file)
@@ -1,10 +1,10 @@
 /*
  *     Sherlock Library -- Linked Lists
  *
- *     (c) 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997--1999 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
+#include "lib/lib.h"
 
 #define _SHERLOCK_LISTS_C
 #include "lib/lists.h"
index 48b7de99c0dd01c58d2ef15125c1bd38b8c269a3..0c0ab0f6069b6c57c01832626ae4559c93c07579 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Linked Lists
  *
- *     (c) 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997--1999 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _SHERLOCK_LISTS_H
index 994522dcf6aea825777c233cba7926b3c2558d17..86f8607ef7e46fd3dbc18b7e637a424cdd1f3dd4 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -1,9 +1,11 @@
 /*
  *     Sherlock Library -- Logging
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -11,8 +13,6 @@
 #include <unistd.h>
 #include <sys/time.h>
 
-#include "lib/lib.h"
-
 static byte *progname = "???";
 static pid_t pid;
 
index fdd0ace2010f4b2b3fce06bde423922fb4fabd80..e33c77c722104e57105993d9adb26d8b5da0aa43 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Logging
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
 #define L_DEBUG "<0>"
index da6cf8ec9f991bfb5ace50a901765e5c9924a02e..2d2764e92c5f803cdea43fece8c58071b40f5b4f 100644 (file)
@@ -1,11 +1,9 @@
 /*
  *     Sherlock Library -- Binary Logarithm
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-
 #include "lib/lib.h"
 
 #undef log2
index 32d2602020395b0d28e8c7b4940328118f02a2af..8bccf00480a26b7720250c872a1c4363474279cc 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
  * will fill a supplied 16-byte array with the digest.
  */
 
-#include <string.h>            /* for memcpy() */
+#include "lib/lib.h"
 #include "lib/md5.h"
 
+#include <string.h>            /* for memcpy() */
+
 #ifndef HIGHFIRST
 #define byteReverse(buf, len)  /* Nothing */
 #else
index 53a40c272069375f98a3e1ec0b5fe10a62d18763..7be26a770d5bd3a47fdcc3f00cbc65959af04a3c 100644 (file)
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -1,11 +1,7 @@
 #ifndef MD5_H
 #define MD5_H
 
-#ifdef __alpha
-typedef unsigned int uint32;
-#else
-typedef unsigned long uint32;
-#endif
+typedef u32 uint32;
 
 struct MD5Context {
        uint32 buf[4];
index 2b8d2d88d0ecb380ab6bd1a0117cdb152290aba1..08ce0e8a33d9bfe1c5ec802250c4062cd54a968a 100644 (file)
@@ -1,17 +1,14 @@
 /*
  *     Sherlock Library -- MD5 Binary <-> Hex Conversions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-
 #include "lib/lib.h"
 #include "lib/chartype.h"
 
+#include <stdio.h>
+
 void
 md5_to_hex(byte *s, byte *d)
 {
index 46f5cd3add76ef0b9d8643fe415fdd45076eca34..62101f8d66a210c16225765c48cfc48e83f13e4f 100644 (file)
@@ -1,17 +1,17 @@
 /*
  *     Sherlock Library -- Mapping of Files
  *
- *     (c) 1999 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-#include "lib/lib.h"
-
 #ifndef MAP_FAILED
 #define MAP_FAILED ((void *)-1L)
 #endif
index 9420ab3128a21c229c7eed6a52f19bbe9550e929..5acbca4b437e539a37faf813adc6908cc4eda145 100644 (file)
@@ -1,19 +1,19 @@
 /*
  *     Sherlock Library -- File Page Cache
  *
- *     (c) 1999--2000 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999--2000 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+#include "lib/pagecache.h"
+#include "lib/lfs.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 
-#include "lib/lib.h"
-#include "lib/pagecache.h"
-#include "lib/lfs.h"
-
 struct page_cache {
   list free_pages;                     /* LRU queue of free non-dirty pages */
   list locked_pages;                   /* List of locked pages (starts with dirty ones) */
index 23ad46ac387ca8d0e97e62f373edd03196a4eb8f..698177f0e026765e47c476d87de740eeb60d27b4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- File Page Cache
  *
- *     (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _SHERLOCK_PAGECACHE_H
index e799f6947455fecce1a41bb4f39b9c0e5014dc27..40a61756ad78b0034a2c54b836fd138f57ae91c5 100644 (file)
@@ -1,12 +1,9 @@
 /*
  *     Sherlock Library -- Shell-Like Case-Insensitive Pattern Matching (currently only '?' and '*')
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "lib/lib.h"
 #include "lib/chartype.h"
 
index df73de57696babca58acecb32e763991e591ee94..837ae1a1c6bbf1e77f05db37de2d33bfeee927d1 100644 (file)
@@ -1,12 +1,9 @@
 /*
  *     Sherlock Library -- Shell-Like Pattern Matching (currently only '?' and '*')
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "lib/lib.h"
 
 #define Convert(x) (x)
index 2aaef12be0fb811b23f310698812a5761438e2d8..b787427e5b6022a036d9e1bd7dce2ebb74610230 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Generic Shell-Like Pattern Matching (currently only '?' and '*')
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
 int
index 623f0517490e09c8e57bddc40b49e7f9578ec8d2..a7d6f5b0fd0b1c65faef6afe2d3fbc1efa5620f4 100644 (file)
@@ -1,15 +1,14 @@
 /*
  *     Sherlock Library -- Memory Pools (One-Time Allocation)
  *
- *     (c) 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997--1999 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 #include "lib/pools.h"
 
+#include <stdlib.h>
+
 struct memchunk {
   struct memchunk *next;
   byte data[0];
index 981dc3eb3123c1ae69f4cedcf779aa78370396db..95c8e17f9325a8112acac5a6b97c83e667567e45 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Memory Pools
  *
- *     (c) 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997--1999 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef POOL_ALIGN
index 877442dad8dfa973df4dfb1522413b5becf8da0c..56bcc87ef050573467861b416523a150718fdc3c 100644 (file)
@@ -1,12 +1,9 @@
 /*
  *     Sherlock Library -- Prime Number Tests
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 
 static int                             /* Sequential search */
@@ -61,7 +58,9 @@ nextprime(uns x)                      /* Returns some prime greater than X, usually the next one or
     }
 }
 
-#ifdef PRIME_DEBUG
+#ifdef TEST
+
+#include <stdio.h>
 
 int
 main(int argc, char **argv)
index 57516fd2f89bae94afa1d079e558c4f65987c685..eb3e706a39e6972d18707216ea9d1044a215ba4e 100644 (file)
@@ -1,14 +1,13 @@
 /*
  *     Sherlock Library -- Unbiased Range Correction for random()
  *
- *     (c) 1998 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1998 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 
+#include <stdlib.h>
+
 uns
 random_max(uns max)
 {
index 3ee75aa8c3caeb983259c43b1ff19bf785e60cf5..6829c71fb46b8588832c86bb75a45695bf3df6b4 100644 (file)
@@ -1,14 +1,13 @@
 /*
  *     Sherlock Library -- Memory Re-allocation
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "lib/lib.h"
 
+#include <stdlib.h>
+
 void *
 xrealloc(void *old, uns size)
 {
index 2df8fd043027e421c1c2eaaca86ad873656db83d..d321172a603d564419028c4f5271a147ca894d0d 100644 (file)
@@ -1,16 +1,16 @@
 /*
  *     Sherlock Library -- Regular Expressions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <regex.h>
 
-#include "lib/lib.h"
-
 #define INITIAL_MEM 1024               /* Initial space allocated for each pattern */
 
 struct regex {
index 45d7191d94c30230a73d61a376f9bbc7abdb483c..0f715e94d781256dd76428a98854b34f256c7a35 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Character Classes
  *
- *     (c) 1998 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1998 Martin Mares <mj@ucw.cz>
  */
 
 #include "lib/chartype.h"
index fa99e3660cea30ead1a54dccbfebafba9a10a84c..627aa0b202ef480145354f7b7e33c60408f23b48 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Uppercase Map
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
 #include "lib/chartype.h"
index 175977e9c8151d52ac2ea841a17196bdb865b414..600f317b15808c8f18b9461e46f966abc9258f99 100644 (file)
@@ -1,16 +1,16 @@
 /*
  *     Sherlock Library -- Temporary Files
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
 
-#include "lib/lib.h"
-
 u32
 temprand(uns key)
 {
index 802945187c4b2fbd0582924117fa2e00fbea13b6..7aacaf686b35625e62eff917119ab544de116836 100644 (file)
@@ -1,15 +1,15 @@
 /*
  *     Sherlock Library -- Execution Timing
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
+#include "lib/lib.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/time.h>
 
-#include "lib/lib.h"
-
 static struct timeval last_tv;
 
 uns
index e3f431ad4c61dc825a39095d3cdc59a27eb57ba3..ac7fd8b7e6ede31514564628c6537d9fea38a51a 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1,17 +1,17 @@
 /*
  *     Sherlock Library -- URL Functions (according to RFC 1738 and 1808)
  *
- *     (c) 1997--1999 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997--1999 Martin Mares <mj@ucw.cz>
  */
 
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
 #include "lib/lib.h"
 #include "lib/url.h"
 #include "lib/chartype.h"
 
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
 /* Escaping and de-escaping */
 
 static uns
index 07363f2e67d47e30cd0a2a79264072bf1abbb25e..e36b46a65b35bebdafc646cb769343db5010b57f 100644 (file)
--- a/lib/url.h
+++ b/lib/url.h
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- URL Functions
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
 #define MAX_URL_SIZE 1024
index 9bccae19f158333e53ddb3fb9754982463a7950c..ba2592f3313b9623baeb0aa74d41d3481ee648c1 100644 (file)
@@ -6,13 +6,13 @@
  *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-#include <string.h>
-
 #include "lib/lib.h"
 #include "lib/pools.h"
 #include "lib/wildmatch.h"
 
+#include <stdio.h>
+#include <string.h>
+
 #define MAX_STATES 32          /* Must be <= 32, state 0 is reserved, state 1 is initial */
 #define MAX_CACHED 256         /* Maximum number of cached DFA states */
 #define HASH_SIZE 512          /* Number of entries in DFA hash table (at least MAX_CACHED+MAX_STATES) */
index e79812d18a7bd352ed3bb6a045fdf98745abbd29..b07b4309c231b4df5ede157493e58cb9020d27ee 100644 (file)
@@ -1,11 +1,9 @@
 /*
  *     Sherlock Library -- Word Splitting
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@ucw.cz>
  */
 
-#include <stdio.h>
-
 #include "lib/lib.h"
 #include "lib/chartype.h"