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" {
#endif
AUTOLIB(bin)
/*
#pragma lib "libbin.a"
#pragma src "/sys/src/libbin"

View file

@ -4,6 +4,8 @@
extern "C" {
#endif
AUTOLIB(bio)
#include <sys/types.h> /* for off_t */
#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 src "/sys/src/libcomplete"
@ -16,3 +23,8 @@ struct Completion{
Completion* complete(char *dir, char *s);
void freecompletion(Completion*);
#if defined(__cplusplus)
}
#endif
#endif

View file

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

View file

@ -4,6 +4,8 @@
extern "C" {
#endif
AUTOLIB(draw)
typedef struct Cachefont Cachefont;
typedef struct Cacheinfo Cacheinfo;
typedef struct Cachesubf Cachesubf;
@ -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

View file

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

View file

@ -4,6 +4,8 @@
extern "C" {
#endif
AUTOLIB(frame)
typedef struct Frbox Frbox;
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" {
#endif
AUTOLIB(html)
/*
#pragma lib "libhtml.a"
#pragma src "/sys/src/libhtml"

View file

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

View file

@ -4,6 +4,7 @@
extern "C" {
#endif
AUTOLIB(ip)
/*
#pragma src "/sys/src/libip"
#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 lib "libString.a"
*/
AUTOLIB(String)
/* extensible Strings */
typedef struct String {
@ -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

View file

@ -8,6 +8,8 @@ extern "C" {
#pragma src "/sys/src/libsec"
*/
AUTOLIB(sec)
#ifndef _MPINT
typedef struct mpint mpint;
#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.
*
@ -351,8 +359,6 @@ struct Regdesc
uint format; /* print format: 'x', 'X', 'f', 'z', 'Z' */
};
Regdesc* regdesc(char*);
enum
{
/* machine types */
@ -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.
@ -525,3 +531,7 @@ struct ps_prochandle
};
extern int machdebug;
#if defined(__cplusplus)
}
#endif
#endif

View file

@ -4,6 +4,8 @@
extern "C" {
#endif
AUTOLIB(mp)
/*
#pragma src "/sys/src/libmp"
#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 Muxrpc Muxrpc;
typedef struct Muxqueue Muxqueue;
@ -52,3 +60,7 @@ void *_muxqrecv(Muxqueue*);
void _muxqhangup(Muxqueue*);
void *_muxnbqrecv(Muxqueue*);
#if defined(__cplusplus)
}
#endif
#endif

View file

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

View file

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

View file

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

View file

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