libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

commit 62fa1579c132a96b51caca15ad65e0daba9b1c8d
parent c9664b1bccd3e65497502704fede2ad26423c12f
Author: Kris Maglione <kris@suckless.org>
Date:   Wed, 16 Jun 2010 17:28:37 -0400

Fix occurrences of abbreviated type names in man pages.

Diffstat:
include/ixp.h | 17++++++++---------
include/ixp_local.h | 3+--
lib/libixp/client.c | 34+++++++++++++++++-----------------
lib/libixp/message.c | 7+++++--
lib/libixp/request.c | 4++--
lib/libixp/rpc.c | 14+++++++-------
man/ixp_fcall2msg.3 | 4++--
man/ixp_freestat.3 | 8++++++--
man/ixp_pending_write.3 | 2+-
man/ixp_pfcall.3 | 10+++++-----
man/ixp_srv_walkandclone.3 | 2+-
man/ixp_stat.3 | 4++--
12 files changed, 57 insertions(+), 52 deletions(-)

diff --git a/include/ixp.h b/include/ixp.h @@ -1,5 +1,4 @@ -/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com> - * Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> +/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail> * See LICENSE file for license details. */ @@ -211,13 +210,6 @@ enum IxpDMode { # define DMSETGID P9_DMSETGID #endif -#ifdef IXP_P9_STRUCTS -# define IxpFcall Fcall -# define IxpFid Fid -# define IxpQid Qid -# define IxpStat Stat -#endif - typedef struct IxpMap IxpMap; typedef struct Ixp9Conn Ixp9Conn; typedef struct Ixp9Req Ixp9Req; @@ -502,6 +494,13 @@ union IxpFcall { }; #endif +#ifdef IXP_P9_STRUCTS +typedef IxpFcall Fcall; +typedef IxpFid Fid; +typedef IxpQid Qid; +typedef IxpStat Stat; +#endif + struct IxpConn { IxpServer* srv; void* aux; /* Arbitrary pointer, to be used by handlers. */ diff --git a/include/ixp_local.h b/include/ixp_local.h @@ -1,5 +1,4 @@ #define IXP_NO_P9_ -#define IXP_P9_STRUCTS #include <ixp.h> #include <stdbool.h> @@ -94,7 +93,7 @@ void* ixp_maprm(IxpMap*, ulong); /* mux.c */ void muxfree(IxpClient*); void muxinit(IxpClient*); -Fcall* muxrpc(IxpClient*, Fcall*); +IxpFcall* muxrpc(IxpClient*, IxpFcall*); /* timer.c */ long ixp_nexttimer(IxpServer*); diff --git a/lib/libixp/client.c b/lib/libixp/client.c @@ -63,8 +63,8 @@ putfid(IxpCFid *f) { } static int -dofcall(IxpClient *c, Fcall *fcall) { - Fcall *ret; +dofcall(IxpClient *c, IxpFcall *fcall) { + IxpFcall *ret; ret = muxrpc(c, fcall); if(ret == nil) @@ -148,7 +148,7 @@ allocmsg(IxpClient *c, int n) { IxpClient* ixp_mountfd(int fd) { IxpClient *c; - Fcall fcall; + IxpFcall fcall; c = emallocz(sizeof *c); c->fd = fd; @@ -226,7 +226,7 @@ static IxpCFid* walk(IxpClient *c, const char *path) { IxpCFid *f; char *p; - Fcall fcall; + IxpFcall fcall; int n; p = estrdup(path); @@ -281,7 +281,7 @@ walkdir(IxpClient *c, char *path, const char **rest) { static int clunk(IxpCFid *f) { IxpClient *c; - Fcall fcall; + IxpFcall fcall; int ret; c = f->client; @@ -311,7 +311,7 @@ clunk(IxpCFid *f) { int ixp_remove(IxpClient *c, const char *path) { - Fcall fcall; + IxpFcall fcall; IxpCFid *f; int ret; @@ -328,7 +328,7 @@ ixp_remove(IxpClient *c, const char *path) { } static void -initfid(IxpCFid *f, Fcall *fcall) { +initfid(IxpCFid *f, IxpFcall *fcall) { f->open = 1; f->offset = 0; f->iounit = fcall->ropen.iounit; @@ -366,7 +366,7 @@ initfid(IxpCFid *f, Fcall *fcall) { IxpCFid* ixp_create(IxpClient *c, const char *path, uint perm, uchar mode) { - Fcall fcall; + IxpFcall fcall; IxpCFid *f; char *tpath;; @@ -400,7 +400,7 @@ done: IxpCFid* ixp_open(IxpClient *c, const char *path, uchar mode) { - Fcall fcall; + IxpFcall fcall; IxpCFid *f; f = walk(c, path); @@ -440,11 +440,11 @@ ixp_close(IxpCFid *f) { return clunk(f); } -static Stat* +static IxpStat* _stat(IxpClient *c, ulong fid) { IxpMsg msg; - Fcall fcall; - Stat *stat; + IxpFcall fcall; + IxpStat *stat; fcall.hdr.type = TStat; fcall.hdr.fid = fid; @@ -484,9 +484,9 @@ _stat(IxpClient *c, ulong fid) { * F<ixp_mount>, F<ixp_open> */ -Stat* +IxpStat* ixp_stat(IxpClient *c, const char *path) { - Stat *stat; + IxpStat *stat; IxpCFid *f; f = walk(c, path); @@ -498,14 +498,14 @@ ixp_stat(IxpClient *c, const char *path) { return stat; } -Stat* +IxpStat* ixp_fstat(IxpCFid *fid) { return _stat(fid->client, fid->fid); } static long _pread(IxpCFid *f, char *buf, long count, int64_t offset) { - Fcall fcall; + IxpFcall fcall; int n, len; len = 0; @@ -578,7 +578,7 @@ ixp_pread(IxpCFid *fid, void *buf, long count, int64_t offset) { static long _pwrite(IxpCFid *f, const void *buf, long count, int64_t offset) { - Fcall fcall; + IxpFcall fcall; int n, len; len = 0; diff --git a/lib/libixp/message.c b/lib/libixp/message.c @@ -62,6 +62,9 @@ ixp_message(char *data, uint length, uint mode) { * These functions free malloc(3) allocated data in the members * of the passed structures and set those members to nil. They * do not free the structures themselves. + * + * See also: + * S<IxpFcall>, S<IxpStat> */ void ixp_freestat(IxpStat *s) { @@ -217,7 +220,7 @@ ixp_pfcall(IxpMsg *msg, IxpFcall *fcall) { * F<IxpMsg>, F<ixp_pfcall> */ uint -ixp_fcall2msg(IxpMsg *msg, Fcall *fcall) { +ixp_fcall2msg(IxpMsg *msg, IxpFcall *fcall) { uint32_t size; msg->end = msg->data + msg->size; @@ -239,7 +242,7 @@ ixp_fcall2msg(IxpMsg *msg, Fcall *fcall) { } uint -ixp_msg2fcall(IxpMsg *msg, Fcall *fcall) { +ixp_msg2fcall(IxpMsg *msg, IxpFcall *fcall) { msg->pos = msg->data + SDWord; msg->mode = MsgUnpack; ixp_pfcall(msg, fcall); diff --git a/lib/libixp/request.c b/lib/libixp/request.c @@ -21,7 +21,7 @@ static void handlereq(Ixp9Req *r); * See also: * F<ixp_respond>, F<ixp_serve9conn> */ -void (*ixp_printfcall)(Fcall*); +void (*ixp_printfcall)(IxpFcall*); static int min(int a, int b) { @@ -118,7 +118,7 @@ destroyfid(Ixp9Conn *p9conn, ulong fid) { static void handlefcall(IxpConn *c) { - Fcall fcall = {0}; + IxpFcall fcall = {0}; Ixp9Conn *p9conn; Ixp9Req *req; diff --git a/lib/libixp/rpc.c b/lib/libixp/rpc.c @@ -52,7 +52,7 @@ freemuxrpc(IxpRpc *r) } static int -sendrpc(IxpRpc *r, Fcall *f) +sendrpc(IxpRpc *r, IxpFcall *f) { int ret; IxpClient *mux; @@ -79,10 +79,10 @@ sendrpc(IxpRpc *r, Fcall *f) return ret; } -static Fcall* +static IxpFcall* muxrecv(IxpClient *mux) { - Fcall *f; + IxpFcall *f; f = nil; thread->lock(&mux->rlock); @@ -99,7 +99,7 @@ fail: } static void -dispatchandqlock(IxpClient *mux, Fcall *f) +dispatchandqlock(IxpClient *mux, IxpFcall *f) { int tag; IxpRpc *r2; @@ -141,11 +141,11 @@ electmuxer(IxpClient *mux) mux->muxer = nil; } -Fcall* -muxrpc(IxpClient *mux, Fcall *tx) +IxpFcall* +muxrpc(IxpClient *mux, IxpFcall *tx) { IxpRpc r; - Fcall *p; + IxpFcall *p; initrpc(mux, &r); if(sendrpc(&r, tx) < 0) diff --git a/man/ixp_fcall2msg.3 b/man/ixp_fcall2msg.3 @@ -8,9 +8,9 @@ ixp_fcall2msg, ixp_msg2fcall .nf #include <ixp.h> - uint ixp_fcall2msg(IxpMsg *msg, Fcall *fcall); + uint ixp_fcall2msg(IxpMsg *msg, IxpFcall *fcall); - uint ixp_msg2fcall(IxpMsg *msg, Fcall *fcall); + uint ixp_msg2fcall(IxpMsg *msg, IxpFcall *fcall); .fi .SH DESCRIPTION diff --git a/man/ixp_freestat.3 b/man/ixp_freestat.3 @@ -8,9 +8,9 @@ ixp_freestat, ixp_freefcall .nf #include <ixp.h> - void ixp_freestat(Stat *s); + void ixp_freestat(IxpStat *s); - void ixp_freefcall(Fcall *fcall); + void ixp_freefcall(IxpFcall *fcall); .fi .SH DESCRIPTION @@ -19,6 +19,10 @@ These functions free malloc(3) allocated data in the members of the passed structures and set those members to nil. They do not free the structures themselves. +.SH SEE ALSO +.P +IxpFcall(3), IxpStat(3) + .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net) .\" cmdline: txt2tags -o- ixp_freestat.man3 diff --git a/man/ixp_pending_write.3 b/man/ixp_pending_write.3 @@ -10,7 +10,7 @@ ixp_pending_write, ixp_pending_pushfid, ixp_pending_clunk, ixp_pending_flush, ix void ixp_pending_write(IxpPending *pending, char *dat, long ndat); - void ixp_pending_pushfid(IxpPending *pending, Fid *fid); + void ixp_pending_pushfid(IxpPending *pending, IxpFid *fid); bool ixp_pending_clunk(Ixp9Req *req); diff --git a/man/ixp_pfcall.3 b/man/ixp_pfcall.3 @@ -8,15 +8,15 @@ ixp_pfcall, ixp_pqid, ixp_pqids, ixp_pstat, ixp_sizeof_stat .nf #include <ixp.h> - void ixp_pfcall(IxpMsg *msg, Fcall *fcall); + void ixp_pfcall(IxpMsg *msg, IxpFcall *fcall); - void ixp_pqid(IxpMsg *msg, Qid *qid); + void ixp_pqid(IxpMsg *msg, IxpQid *qid); - void ixp_pqids(IxpMsg *msg, uint16_t *num, Qid qid\fI[]\fR, uint max); + void ixp_pqids(IxpMsg *msg, uint16_t *num, IxpQid qid\fI[]\fR, uint max); - void ixp_pstat(IxpMsg *msg, Stat *stat); + void ixp_pstat(IxpMsg *msg, IxpStat *stat); - uint16_t ixp_sizeof_stat(Stat *stat); + uint16_t ixp_sizeof_stat(IxpStat *stat); .fi .SH DESCRIPTION diff --git a/man/ixp_srv_walkandclone.3 b/man/ixp_srv_walkandclone.3 @@ -10,7 +10,7 @@ ixp_srv_walkandclone, ixp_srv_readdir, ixp_srv_verifyfile, IxpLookupFn void ixp_srv_walkandclone(Ixp9Req *req, IxpLookupFn lookup); - void ixp_srv_readdir(Ixp9Req *req, IxpLookupFn lookup, void (*dostat)(Stat *, IxpFileId *)); + void ixp_srv_readdir(Ixp9Req *req, IxpLookupFn lookup, void (*dostat)(IxpStat *, IxpFileId *)); bool ixp_srv_verifyfile(IxpFileId *file, IxpLookupFn lookup); diff --git a/man/ixp_stat.3 b/man/ixp_stat.3 @@ -8,9 +8,9 @@ ixp_stat, ixp_fstat, IxpStat, IxpQid, IxpQType, IxpDMode .nf #include <ixp.h> - Stat *ixp_stat(IxpClient *c, const char *path); + IxpStat *ixp_stat(IxpClient *c, const char *path); - Stat *ixp_fstat(IxpCFid *fid); + IxpStat *ixp_fstat(IxpCFid *fid); typedef struct IxpStat IxpStat; struct IxpStat {