This commit is contained in:
rsc 2005-01-04 21:18:08 +00:00
parent 66ed321edf
commit 1a0954abb8
20 changed files with 96 additions and 49 deletions

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(bin)
/* /*
#pragma lib "libbin.a" #pragma lib "libbin.a"
#pragma src "/sys/src/libbin" #pragma src "/sys/src/libbin"

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(bio)
#include <sys/types.h> /* for off_t */ #include <sys/types.h> /* for off_t */
#include <fcntl.h> /* for O_RDONLY, O_WRONLY */ #include <fcntl.h> /* for O_RDONLY, O_WRONLY */

View file

@ -1,3 +1,10 @@
#ifndef _COMPLETE_H_
#define _COMPLETE_H_ 1
#if defined(__cplusplus)
extern "C" {
#endif
AUTOLIB(complete)
/* /*
#pragma lib "libcomplete.a" #pragma lib "libcomplete.a"
#pragma src "/sys/src/libcomplete" #pragma src "/sys/src/libcomplete"
@ -16,3 +23,8 @@ struct Completion{
Completion* complete(char *dir, char *s); Completion* complete(char *dir, char *s);
void freecompletion(Completion*); void freecompletion(Completion*);
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -1,6 +1,13 @@
#pragma src "/sys/src/libdisk" #ifndef _DISK_H_
#pragma lib "libdisk.a" #define _DISK_H_ 1
#if defined(__cplusplus)
extern "C" {
#endif
AUTOLIB(disk)
#if 0
/* SCSI interface */ /* SCSI interface */
typedef struct Scsi Scsi; typedef struct Scsi Scsi;
struct Scsi { struct Scsi {
@ -58,8 +65,14 @@ enum {
Gdisk, Gdisk,
Gguess, Gguess,
}; };
#endif
/* proto file parsing */ /* proto file parsing */
typedef void Protoenum(char *new, char *old, Dir *d, void *a); typedef void Protoenum(char *new, char *old, Dir *d, void *a);
typedef void Protowarn(char *msg, void *a); typedef void Protowarn(char *msg, void *a);
int rdproto(char*, char*, Protoenum*, Protowarn*, void*); int rdproto(char*, char*, Protoenum*, Protowarn*, void*);
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(draw)
typedef struct Cachefont Cachefont; typedef struct Cachefont Cachefont;
typedef struct Cacheinfo Cacheinfo; typedef struct Cacheinfo Cacheinfo;
typedef struct Cachesubf Cachesubf; typedef struct Cachesubf Cachesubf;
@ -338,7 +340,7 @@ extern int writeimage(int, Image*, int);
extern Image* namedimage(Display*, char*); extern Image* namedimage(Display*, char*);
extern int nameimage(Image*, char*, int); extern int nameimage(Image*, char*, int);
extern Image* allocimagemix(Display*, u32int, u32int); extern Image* allocimagemix(Display*, u32int, u32int);
extern int drawsetlabel(Display*, char*); extern int drawsetlabel(char*);
/* /*
* Colors * Colors

View file

@ -3,6 +3,8 @@
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
AUTOLIB(flate)
/* /*
#pragma lib "libflate.a" #pragma lib "libflate.a"
#pragma src "/sys/src/libflate" #pragma src "/sys/src/libflate"

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(frame)
typedef struct Frbox Frbox; typedef struct Frbox Frbox;
typedef struct Frame Frame; typedef struct Frame Frame;

View file

@ -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

View file

@ -4,6 +4,7 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(html)
/* /*
#pragma lib "libhtml.a" #pragma lib "libhtml.a"
#pragma src "/sys/src/libhtml" #pragma src "/sys/src/libhtml"

View file

@ -3,6 +3,8 @@
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
AUTOLIB(httpd)
/* /*
#pragma lib "libhttpd.a" #pragma lib "libhttpd.a"
#pragma src "/sys/src/libhttpd" #pragma src "/sys/src/libhttpd"

View file

@ -4,6 +4,7 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(ip)
/* /*
#pragma src "/sys/src/libip" #pragma src "/sys/src/libip"
#pragma lib "libip.a" #pragma lib "libip.a"

View file

@ -1,7 +1,14 @@
#ifndef _LIBSTRING_H_
#define _LIBSTRING_H_ 1
#if defined(__cplusplus)
extern "C" {
#endif
/* /*
#pragma src "/sys/src/libString" #pragma src "/sys/src/libString"
#pragma lib "libString.a" #pragma lib "libString.a"
*/ */
AUTOLIB(String)
/* extensible Strings */ /* extensible Strings */
typedef struct String { typedef struct String {
@ -44,3 +51,7 @@ extern char *s_rdinstack(Sinstack*, String*);
extern Sinstack *s_allocinstack(char*); extern Sinstack *s_allocinstack(char*);
extern void s_freeinstack(Sinstack*); extern void s_freeinstack(Sinstack*);
#endif /* BGETC */ #endif /* BGETC */
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -8,6 +8,8 @@ extern "C" {
#pragma src "/sys/src/libsec" #pragma src "/sys/src/libsec"
*/ */
AUTOLIB(sec)
#ifndef _MPINT #ifndef _MPINT
typedef struct mpint mpint; typedef struct mpint mpint;
#endif #endif

View file

@ -1,3 +1,11 @@
#ifndef _MACH_H_
#define _MACH_H_ 1
#if defined(__cplusplus)
extern "C" {
#endif
AUTOLIB(mach)
/* /*
* Architecture-dependent application data. * Architecture-dependent application data.
* *
@ -351,8 +359,6 @@ struct Regdesc
uint format; /* print format: 'x', 'X', 'f', 'z', 'Z' */ uint format; /* print format: 'x', 'X', 'f', 'z', 'Z' */
}; };
Regdesc* regdesc(char*);
enum enum
{ {
/* machine types */ /* machine types */
@ -498,7 +504,7 @@ Fhdr* findhdr(char*);
Symbol* flookupsym(Fhdr*, char*); Symbol* flookupsym(Fhdr*, char*);
Symbol* ffindsym(Fhdr*, Loc, uint); Symbol* ffindsym(Fhdr*, Loc, uint);
Symbol* addsym(Fhdr*, Symbol*); Symbol* _addsym(Fhdr*, Symbol*);
/* /*
* Stack frame walking. * Stack frame walking.
@ -525,3 +531,7 @@ struct ps_prochandle
}; };
extern int machdebug; extern int machdebug;
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(mp)
/* /*
#pragma src "/sys/src/libmp" #pragma src "/sys/src/libmp"
#pragma lib "libmp.a" #pragma lib "libmp.a"

View file

@ -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 Mux Mux;
typedef struct Muxrpc Muxrpc; typedef struct Muxrpc Muxrpc;
typedef struct Muxqueue Muxqueue; typedef struct Muxqueue Muxqueue;
@ -52,3 +60,7 @@ void *_muxqrecv(Muxqueue*);
void _muxqhangup(Muxqueue*); void _muxqhangup(Muxqueue*);
void *_muxnbqrecv(Muxqueue*); void *_muxnbqrecv(Muxqueue*);
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(regexp9)
#include <utf.h> #include <utf.h>
typedef struct Resub Resub; typedef struct Resub Resub;

View file

@ -4,6 +4,8 @@
extern "C" { extern "C" {
#endif #endif
AUTOLIB(thread)
/* /*
* basic procs and threads * basic procs and threads
*/ */
@ -23,8 +25,9 @@ _Thread *_threadwakeup(Rendez*);
/* /*
* daemonize * daemonize
*/ *
void threaddaemonize(void); void threaddaemonize(void);
*/
/* /*
* clumsy linker hack * clumsy linker hack

View file

@ -111,6 +111,11 @@ typedef short s16int;
#undef _NEEDUINT #undef _NEEDUINT
#undef _NEEDULONG #undef _NEEDULONG
/*
* Funny-named symbols to tip off 9l to autolink.
*/
#define AUTOLIB(x) static int __p9l_autolib_ ## x = 1;
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif

View file

@ -3,6 +3,9 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
AUTOLIB(venti)
/* XXX should be own library? */ /* XXX should be own library? */
/* /*
* Packets * Packets