URI: 
       tautolib - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 1a0954abb80f92cd9940a21f11dd8f3a84518579
   DIR parent 66ed321edf44a9465d011a3e54d60a6c32fc166f
  HTML Author: rsc <devnull@localhost>
       Date:   Tue,  4 Jan 2005 21:18:08 +0000
       
       autolib
       
       Diffstat:
         M include/bin.h                       |       2 ++
         M include/bio.h                       |       2 ++
         M include/complete.h                  |      12 ++++++++++++
         M include/disk.h                      |      17 +++++++++++++++--
         M include/draw.h                      |       4 +++-
         M include/flate.h                     |       2 ++
         M include/frame.h                     |       2 ++
         D include/fs.h                        |      42 -------------------------------
         M include/html.h                      |       1 +
         M include/httpd.h                     |       2 ++
         M include/ip.h                        |       1 +
         M include/libString.h                 |      11 +++++++++++
         M include/libsec.h                    |       2 ++
         M include/mach.h                      |      16 +++++++++++++---
         M include/mp.h                        |       2 ++
         M include/mux.h                       |      12 ++++++++++++
         M include/regexp9.h                   |       2 ++
         M include/thread.h                    |       5 ++++-
         M include/u.h                         |       5 +++++
         M include/venti.h                     |       3 +++
       
       20 files changed, 96 insertions(+), 49 deletions(-)
       ---
   DIR diff --git a/include/bin.h b/include/bin.h
       t@@ -4,6 +4,8 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(bin)
       +
        /*
        #pragma        lib        "libbin.a"
        #pragma        src        "/sys/src/libbin"
   DIR diff --git a/include/bio.h b/include/bio.h
       t@@ -4,6 +4,8 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(bio)
       +
        #include <sys/types.h>        /* for off_t */
        #include <fcntl.h>        /* for O_RDONLY, O_WRONLY */
        
   DIR diff --git a/include/complete.h b/include/complete.h
       t@@ -1,3 +1,10 @@
       +#ifndef _COMPLETE_H_
       +#define _COMPLETE_H_ 1
       +#if defined(__cplusplus)
       +extern "C" { 
       +#endif
       +
       +AUTOLIB(complete)
        /*
        #pragma        lib        "libcomplete.a"
        #pragma src "/sys/src/libcomplete"
       t@@ -16,3 +23,8 @@ struct Completion{
        
        Completion* complete(char *dir, char *s);
        void freecompletion(Completion*);
       +
       +#if defined(__cplusplus)
       +}
       +#endif
       +#endif
   DIR diff --git a/include/disk.h b/include/disk.h
       t@@ -1,6 +1,13 @@
       -#pragma src "/sys/src/libdisk"
       -#pragma lib "libdisk.a"
       +#ifndef _DISK_H_
       +#define _DISK_H_ 1
       +#if defined(__cplusplus)
       +extern "C" { 
       +#endif
        
       +
       +AUTOLIB(disk)
       +
       +#if 0
        /* SCSI interface */
        typedef struct Scsi Scsi;
        struct Scsi {
       t@@ -58,8 +65,14 @@ enum {
                Gdisk,
                Gguess,
        };
       +#endif
        
        /* proto file parsing */
        typedef void Protoenum(char *new, char *old, Dir *d, void *a);
        typedef void Protowarn(char *msg, void *a);
        int rdproto(char*, char*, Protoenum*, Protowarn*, void*);
       +
       +#if defined(__cplusplus)
       +}
       +#endif
       +#endif
   DIR diff --git a/include/draw.h b/include/draw.h
       t@@ -4,6 +4,8 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(draw)
       +
        typedef struct        Cachefont Cachefont;
        typedef struct        Cacheinfo Cacheinfo;
        typedef struct        Cachesubf Cachesubf;
       t@@ -338,7 +340,7 @@ extern int        writeimage(int, Image*, int);
        extern Image*        namedimage(Display*, char*);
        extern int        nameimage(Image*, char*, int);
        extern Image* allocimagemix(Display*, u32int, u32int);
       -extern int        drawsetlabel(Display*, char*);
       +extern int        drawsetlabel(char*);
        
        /*
         * Colors
   DIR diff --git a/include/flate.h b/include/flate.h
       t@@ -3,6 +3,8 @@
        #if defined(__cplusplus)
        extern "C" { 
        #endif
       +
       +AUTOLIB(flate)
        /*
        #pragma        lib        "libflate.a"
        #pragma        src        "/sys/src/libflate"
   DIR diff --git a/include/frame.h b/include/frame.h
       t@@ -4,6 +4,8 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(frame)
       +
        typedef struct Frbox Frbox;
        typedef struct Frame Frame;
        
   DIR diff --git a/include/fs.h b/include/fs.h
       t@@ -1,42 +0,0 @@
       -#ifndef _FS_H_
       -#define _FS_H_ 1
       -#ifdef __cplusplus
       -extern "C" {
       -#endif
       -
       -/*
       - * Simple user-level 9P client.
       - */
       -
       -typedef struct Fsys Fsys;
       -typedef struct Fid Fid;
       -
       -Fsys *fsinit(int);
       -Fsys *fsmount(int, char*);
       -
       -int fsversion(Fsys*, int, char*, int);
       -Fid *fsauth(Fsys*, char*);
       -Fid *fsattach(Fsys*, Fid*, char*, char*);
       -Fid *fsopen(Fsys*, char*, int);
       -int fsopenfd(Fsys*, char*, int);
       -long fsread(Fid*, void*, long);
       -long fsreadn(Fid*, void*, long);
       -long fswrite(Fid*, void*, long);
       -void fsclose(Fid*);
       -void fsunmount(Fsys*);
       -int fsrpc(Fsys*, Fcall*, Fcall*, void**);
       -Fid *fswalk(Fid*, char*);
       -struct Dir;        /* in case there's no lib9.h */
       -long fsdirread(Fid*, struct Dir**);
       -long fsdirreadall(Fid*, struct Dir**);
       -struct Dir *fsdirstat(Fsys*, char*);
       -struct Dir *fsdirfstat(Fid*);
       -int fsdirwstat(Fsys*, char*, struct Dir*);
       -int fsdirfwstat(Fid*, struct Dir*);
       -Fid *fsroot(Fsys*);
       -Fsys *nsmount(char*, char*);
       -
       -#ifdef __cplusplus
       -}
       -#endif
       -#endif
   DIR diff --git a/include/html.h b/include/html.h
       t@@ -4,6 +4,7 @@
        extern "C" {
        #endif
        
       +AUTOLIB(html)
        /*
         #pragma lib "libhtml.a"
         #pragma src "/sys/src/libhtml"
   DIR diff --git a/include/httpd.h b/include/httpd.h
       t@@ -3,6 +3,8 @@
        #if defined(__cplusplus)
        extern "C" { 
        #endif
       +
       +AUTOLIB(httpd)
        /*
        #pragma        lib        "libhttpd.a"
        #pragma        src        "/sys/src/libhttpd"
   DIR diff --git a/include/ip.h b/include/ip.h
       t@@ -4,6 +4,7 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(ip)
        /*
        #pragma        src        "/sys/src/libip"
        #pragma        lib        "libip.a"
   DIR diff --git a/include/libString.h b/include/libString.h
       t@@ -1,7 +1,14 @@
       +#ifndef _LIBSTRING_H_
       +#define _LIBSTRING_H_ 1
       +#if defined(__cplusplus)
       +extern "C" { 
       +#endif
       +
        /*
        #pragma        src        "/sys/src/libString"
        #pragma        lib        "libString.a"
        */
       +AUTOLIB(String)
        
        /* extensible Strings */
        typedef struct String {
       t@@ -44,3 +51,7 @@ extern char        *s_rdinstack(Sinstack*, String*);
        extern Sinstack        *s_allocinstack(char*);
        extern void        s_freeinstack(Sinstack*);
        #endif /* BGETC */
       +#if defined(__cplusplus)
       +}
       +#endif
       +#endif
   DIR diff --git a/include/libsec.h b/include/libsec.h
       t@@ -8,6 +8,8 @@ extern "C" {
        #pragma        src        "/sys/src/libsec"
        */
        
       +AUTOLIB(sec)
       +
        #ifndef _MPINT
        typedef struct mpint mpint;
        #endif
   DIR diff --git a/include/mach.h b/include/mach.h
       t@@ -1,3 +1,11 @@
       +#ifndef _MACH_H_
       +#define _MACH_H_ 1
       +#if defined(__cplusplus)
       +extern "C" { 
       +#endif
       +
       +AUTOLIB(mach)
       +
        /*
         * Architecture-dependent application data.
         * 
       t@@ -351,8 +359,6 @@ struct Regdesc
                uint                format;                /* print format: 'x', 'X', 'f', 'z', 'Z' */
        };
        
       -Regdesc*        regdesc(char*);
       -
        enum
        {
                /* machine types */
       t@@ -498,7 +504,7 @@ Fhdr*        findhdr(char*);
        
        Symbol*        flookupsym(Fhdr*, char*);
        Symbol*        ffindsym(Fhdr*, Loc, uint);
       -Symbol*        addsym(Fhdr*, Symbol*);
       +Symbol*        _addsym(Fhdr*, Symbol*);
        
        /*
         * Stack frame walking.
       t@@ -525,3 +531,7 @@ struct ps_prochandle
        };
        
        extern int machdebug;
       +#if defined(__cplusplus)
       +}
       +#endif
       +#endif
   DIR diff --git a/include/mp.h b/include/mp.h
       t@@ -4,6 +4,8 @@
        extern "C" {
        #endif
        
       +AUTOLIB(mp)
       +
        /*
        #pragma        src        "/sys/src/libmp"
        #pragma        lib        "libmp.a"
   DIR diff --git a/include/mux.h b/include/mux.h
       t@@ -1,3 +1,11 @@
       +#ifndef _MUX_H_
       +#define _MUX_H_ 1
       +#if defined(__cplusplus)
       +extern "C" { 
       +#endif
       +
       +AUTOLIB(mux)
       +
        typedef struct Mux Mux;
        typedef struct Muxrpc Muxrpc;
        typedef struct Muxqueue Muxqueue;
       t@@ -52,3 +60,7 @@ void *_muxqrecv(Muxqueue*);
        void _muxqhangup(Muxqueue*);
        void *_muxnbqrecv(Muxqueue*);
        
       +#if defined(__cplusplus)
       +}
       +#endif
       +#endif
   DIR diff --git a/include/regexp9.h b/include/regexp9.h
       t@@ -4,6 +4,8 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(regexp9)
       +
        #include <utf.h>
        
        typedef struct Resub                Resub;
   DIR diff --git a/include/thread.h b/include/thread.h
       t@@ -4,6 +4,8 @@
        extern "C" { 
        #endif
        
       +AUTOLIB(thread)
       +
        /*
         * basic procs and threads
         */
       t@@ -23,8 +25,9 @@ _Thread        *_threadwakeup(Rendez*);
        
        /*
         * daemonize
       - */
       + *
        void        threaddaemonize(void);
       + */
        
        /*
         * clumsy linker hack
   DIR diff --git a/include/u.h b/include/u.h
       t@@ -111,6 +111,11 @@ typedef short s16int;
        #undef _NEEDUINT
        #undef _NEEDULONG
        
       +/*
       + * Funny-named symbols to tip off 9l to autolink.
       + */
       +#define AUTOLIB(x)        static int __p9l_autolib_ ## x = 1;
       +
        #if defined(__cplusplus)
        }
        #endif
   DIR diff --git a/include/venti.h b/include/venti.h
       t@@ -3,6 +3,9 @@
        #ifdef __cplusplus
        extern "C" { 
        #endif
       +
       +AUTOLIB(venti)
       +
        /* XXX should be own library? */
        /*
         * Packets