/*
- * $Id: aecho.c,v 1.5.10.1 2003-07-21 05:50:53 didg Exp $
+ * $Id: aecho.c,v 1.5.10.1.4.1 2005-09-27 10:40:40 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
#endif /* ! SOCKLEN_T */
struct sockaddr_at target;
-int s, nsent = 0, nrecv = 0;
+int sock;
+unsigned int nsent = 0, nrecv = 0;
time_t totalms = 0, minms = -1, maxms = -1;
-static unsigned int pings = 0;
+unsigned int pings = 0;
void usage(char *);
void done()
{
- if ( nsent > 0 ) {
+ if ( nsent) {
printf( "\n----%d.%d AEP Statistics----\n",
ntohs( target.sat_addr.s_net ), target.sat_addr.s_node );
printf( "%d packets sent, %d packets received, %d%% packet loss\n",
nsent, nrecv, (( nsent - nrecv ) * 100 ) / nsent );
- if ( nrecv > 0 ) {
+ if ( nrecv ) {
printf( "round-trip (ms) min/avg/max = %ld/%ld/%ld\n",
minms, totalms / nrecv, maxms );
}
memcpy( p, &tv, sizeof( struct timeval ));
p += sizeof( struct timeval );
- if ( netddp_sendto( s, buf, p - buf, 0, (struct sockaddr *) &target,
+ if ( netddp_sendto( sock, buf, p - buf, 0, (struct sockaddr *) &target,
sizeof( struct sockaddr_at )) < 0 ) {
perror( "sendto" );
exit( 1 );
}
target.sat_port = port;
- if ((s = netddp_open(saddr.sat_addr.s_net || saddr.sat_addr.s_node ?
+ if ((sock = netddp_open(saddr.sat_addr.s_net || saddr.sat_addr.s_node ?
&saddr : NULL, NULL)) < 0) {
perror("ddp_open");
exit(1);
for (;;) {
satlen = sizeof( struct sockaddr_at );
- if (( cc = netddp_recvfrom( s, buf, sizeof( buf ), 0,
+ if (( cc = netddp_recvfrom( sock, buf, sizeof( buf ), 0,
(struct sockaddr *) &sat,
&satlen )) < 0 ) {
if ( errno == EINTR ) {
/*
- * $Id: cnid_index.c,v 1.1.2.5 2005-09-13 16:57:44 didg Exp $
+ * $Id: cnid_index.c,v 1.1.2.6 2005-09-27 10:40:40 didg Exp $
*
* All Rights Reserved. See COPYING.
*/
/* --------------- */
int didname(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
DBT *skey;
{
int len;
/* --------------- */
int devino(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
DBT *skey;
{
memset(skey, 0, sizeof(DBT));
/*
- * $Id: asingle.c,v 1.8.6.1.4.1 2005-02-06 10:16:00 didg Exp $
+ * $Id: asingle.c,v 1.8.6.1.4.2 2005-09-27 10:40:40 didg Exp $
*/
#ifdef HAVE_CONFIG_H
int single_open( singlefile, flags, fh, options )
char *singlefile;
- int flags, options;
+ int flags, options _U_;
struct FHeader *fh;
{
int rc;
* Unless I can't get the current date, in which case use time zero.
*/
if (( date_entry < 7 ) || ( date_entry > 8 )) {
- if (( time_seconds = time( NULL )) == -1 ) {
+ if (( time_seconds = time( NULL )) == (u_int32_t)-1 ) {
time_seconds = AD_DATE_START;
} else {
time_seconds = AD_DATE_FROM_UNIX(time_seconds);
int single_header_test(void)
{
- int cc;
+ ssize_t cc;
u_int32_t templong;
cc = read( single.filed, (char *)header_buf, sizeof( header_buf ));
- if ( cc < sizeof( header_buf )) {
+ if ( cc < (ssize_t)sizeof( header_buf )) {
perror( "Premature end of file :" );
return( -1 );
}
int single_read( fork, buffer, length )
int fork;
char *buffer;
- int length;
+ u_int32_t length;
{
u_int32_t entry_id;
char *buf_ptr;
/*
- * $Id: asingle.h,v 1.2 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: asingle.h,v 1.2.16.1 2005-09-27 10:40:40 didg Exp $
*/
#ifndef _ASINGLE_H
int single_close(int readflag);
int single_header_read(struct FHeader *fh, int version);
int single_header_test(void);
-int single_read(int fork, char *buffer, int length);
+int single_read(int fork, char *buffer, u_int32_t length);
#endif /* _ASINGLE_H */
/*
- * $Id: hqx.c,v 1.12.4.1.4.1 2005-02-06 10:16:00 didg Exp $
+ * $Id: hqx.c,v 1.12.4.1.4.2 2005-09-27 10:40:40 didg Exp $
*/
#ifdef HAVE_CONFIG_H
*/
int hqx_header_write( fh )
- struct FHeader *fh;
+ struct FHeader *fh _U_;
{
return( -1 );
}
/*
- * $Id: megatron.c,v 1.9 2002-04-29 01:52:49 morgana Exp $
+ * $Id: megatron.c,v 1.9.10.1 2005-09-27 10:40:40 didg Exp $
*/
#ifdef HAVE_CONFIG_H
struct FHeader fh;
int bufc;
int fork;
- int forkred;
+ unsigned int forkred;
/*
* If the source file is not stdin, make sure it exists and
* from unicode to iso8859_adapted code page
*/
-static size_t iso8859_adapted_push( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t iso8859_adapted_push( void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
int len = 0;
}
/* ------------------------ */
-static size_t iso8859_adapted_pull ( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t iso8859_adapted_pull ( void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
unsigned char *inptr;
return ret;
}
-static int check_adouble(DIR *curdir, char * path)
+static int check_adouble(DIR *curdir, char * path _U_)
{
DIR *adouble;
struct dirent* entry;
-dnl $Id: configure.in,v 1.179.2.3.2.37.2.4 2005-04-13 10:21:09 bfernhomberg Exp $
+dnl $Id: configure.in,v 1.179.2.3.2.37.2.5 2005-09-27 10:40:40 didg Exp $
dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
NETATALK_AC_CUPS
+dnl check if we can use attribute unused (gcc only) from ethereal
+AC_MSG_CHECKING(to see if we can add '__attribute__((unused))' to CFLAGS)
+if test x$GCC != x ; then
+ CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
+ AC_MSG_RESULT(yes)
+else
+ CFLAGS="-D_U_=\"\" $CFLAGS"
+ AC_MSG_RESULT(no)
+fi
+
dnl --------------------------------------------------------------------------
dnl FHS stuff has to be done last because it overrides other defaults
dnl --------------------------------------------------------------------------
/*
- * $Id: afp_asp.c,v 1.18.6.6 2004-05-04 15:38:23 didg Exp $
+ * $Id: afp_asp.c,v 1.18.6.6.2.1 2005-09-27 10:40:40 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
/* ---------------------- */
#ifdef SERVERTEXT
-static void afp_asp_getmesg (int sig)
+static void afp_asp_getmesg (int sig _U_)
{
readmessage(child);
asp_attention(child->handle, AFPATTN_MESG | AFPATTN_TIME(5));
/*
- * $Id: afp_config.c,v 1.22.6.9.2.2 2005-01-31 17:00:38 didg Exp $
+ * $Id: afp_config.c,v 1.22.6.9.2.3 2005-09-27 10:40:40 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
}
#ifdef USE_SRVLOC
-static void SRVLOC_callback(SLPHandle hslp, SLPError errcode, void *cookie) {
+static void SRVLOC_callback(SLPHandle hslp _U_, SLPError errcode, void *cookie) {
*(SLPError*)cookie = errcode;
}
FILE *fp;
char buf[LINESIZE + 1], *p, have_option = 0;
struct afp_options options;
- AFPConfig *config, *first = NULL; /* uninitialized, OK 310105 */
+ AFPConfig *config=NULL, *first = NULL;
status_reset();
/* if config file doesn't exist, load defaults */
/*
- * $Id: afp_dsi.c,v 1.27.2.3.2.4.2.1 2005-03-31 00:25:55 didg Exp $
+ * $Id: afp_dsi.c,v 1.27.2.3.2.4.2.2 2005-09-27 10:40:40 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
/* ---------------------- */
#ifdef SERVERTEXT
-static void afp_dsi_getmesg (int sig)
+static void afp_dsi_getmesg (int sig _U_)
{
readmessage(child.obj);
dsi_attention(child.obj->handle, AFPATTN_MESG | AFPATTN_TIME(5));
/*
- * $Id: appl.c,v 1.12.2.1.2.2.2.1 2005-02-06 10:16:00 didg Exp $
+ * $Id: appl.c,v 1.12.2.1.2.2.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int afp_addappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
}
int afp_rmvappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
}
int afp_getappl(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
char *p, *q;
/*
- * $Id: auth.c,v 1.44.2.3.2.15.2.3 2005-03-11 15:36:58 didg Exp $
+ * $Id: auth.c,v 1.44.2.3.2.15.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return AFP_OK;
}
-
static int afp_errpwdexpired(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf _U_, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
*rbuflen = 0;
return AFPERR_PWDEXPR;
}
-static int set_auth_switch(AFPObj *obj, int expired)
+static int set_auth_switch(int expired)
{
int i;
#endif /* ADMIN_GRP */
uuid = pwd->pw_uid;
- set_auth_switch(obj, expired);
+ set_auth_switch(expired);
obj->logout = logout;
/* ---------------------- */
int afp_zzz (obj, ibuf, ibuflen, rbuf, rbuflen ) /* Function 122 */
AFPObj *obj;
-char *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+char *ibuf _U_, *rbuf;
+unsigned int ibuflen _U_, *rbuflen;
{
u_int32_t retdata;
/* ---------------------- */
int afp_disconnect(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
u_int16_t type;
int afp_logout(obj, ibuf, ibuflen, rbuf, rbuflen)
AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+char *ibuf _U_, *rbuf _U_;
+int ibuflen _U_, *rbuflen _U_;
{
LOG(log_info, logtype_afpd, "logout %s", obj->username);
close_all_vol();
(ret == AFPERR_AUTHCONT) ? "continued" :
(ret ? "failed" : "succeeded"));
if ( ret == AFP_OK )
- set_auth_switch(obj, 0);
+ set_auth_switch(0);
return ret;
}
/* FPGetUserInfo */
int afp_getuserinfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
u_int8_t thisuser;
u_int32_t id;
} /* catsearch() */
/* -------------------------- */
-int catsearch_afp(AFPObj *obj, char *ibuf, int ibuflen,
+int catsearch_afp(AFPObj *obj _U_, char *ibuf, int ibuflen,
char *rbuf, int *rbuflen, int ext)
{
struct vol *vol;
/*
- * $Id: desktop.c,v 1.26.2.4.2.18.2.2 2005-02-10 01:23:10 didg Exp $
+ * $Id: desktop.c,v 1.26.2.4.2.18.2.3 2005-09-27 10:40:41 didg Exp $
*
* See COPYRIGHT.
*
int afp_opendt(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
u_int16_t vid;
}
int afp_closedt(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf _U_, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
*rbuflen = 0;
return( AFP_OK );
}
int afp_addicon(obj, ibuf, ibuflen, rbuf, rbuflen)
-AFPObj *obj;
+AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
#ifndef NO_DDP
return( AFP_OK );
}
-static u_char utag[] = { 0, 0, 0, 0 };
-static u_char ucreator[] = { 0, 0, 0, 0 };/* { 'U', 'N', 'I', 'X' };*/
-static u_char utype[] = { 0, 0, 0, 0 };/* { 'T', 'E', 'X', 'T' };*/
-static short usize = 256;
-static u_char uicon[] = {
+static const u_char utag[] = { 0, 0, 0, 0 };
+static const u_char ucreator[] = { 0, 0, 0, 0 };/* { 'U', 'N', 'I', 'X' };*/
+static const u_char utype[] = { 0, 0, 0, 0 };/* { 'T', 'E', 'X', 'T' };*/
+static const short usize = 256;
+static const u_char uicon[] = {
0x1F, 0xFF, 0xFC, 0x00, 0x10, 0x00, 0x06, 0x00,
0x10, 0x00, 0x05, 0x00, 0x10, 0x00, 0x04, 0x80,
0x10, 0x00, 0x04, 0x40, 0x10, 0x00, 0x04, 0x20,
};
int afp_geticoninfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
u_char fcreator[ 4 ], ih[ 12 ];
int afp_geticon(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
off_t offset;
}
/* ---------------------- */
-static char hexdig[] = "0123456789abcdef";
+static const char hexdig[] = "0123456789abcdef";
char *dtfile(const struct vol *vol, u_char creator[], char *ext )
{
static char path[ MAXPATHLEN + 1];
/* ----------------------------- */
int afp_addcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
/* -------------------- */
int afp_getcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
/* ----------------------- */
int afp_rmvcomment(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
/*
- * $Id: directory.c,v 1.71.2.4.2.15.2.7 2005-09-23 19:03:27 didg Exp $
+ * $Id: directory.c,v 1.71.2.4.2.15.2.8 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
static char temp[ MAXPATHLEN + 1];
/* not an UTF8 name */
- if (mtoUTF8(vol, path, strlen(path), temp, MAXPATHLEN) == -1) {
+ if (mtoUTF8(vol, path, strlen(path), temp, MAXPATHLEN) == (size_t)-1) {
afp_errno = AFPERR_PARAM;
return( NULL );
}
/* ----------------------------- */
int afp_setdirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
char *upath;
struct dir *dir;
- int bit, aint, isad = 1;
+ int bit, isad = 1;
int cdate, bdate;
int owner, group;
u_int16_t ashort, bshort;
}
int afp_createdir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct adouble ad;
struct vol *vol;
}
int afp_mapid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct passwd *pw;
struct group *gr;
}
int afp_mapname(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct passwd *pw;
struct group *gr;
variable DID support
*/
int afp_closedir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf _U_, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
#if 0
struct vol *vol;
* there's a pb again with case but move it to cname
*/
int afp_opendir(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *parentdir;
/*
- * $Id: enumerate.c,v 1.39.2.2.2.5 2004-06-20 15:10:14 bfernhomberg Exp $
+ * $Id: enumerate.c,v 1.39.2.2.2.5.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
};
#define SDBUFBRK 2048
-static int enumerate_loop(struct dirent *de, char *mname, void *data)
+static int enumerate_loop(struct dirent *de, char *mname _U_, void *data)
{
struct savedir *sd = data;
char *start, *end;
/* ----------------------------- */
static int enumerate(obj, ibuf, ibuflen, rbuf, rbuflen, ext )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-unsigned int ibuflen, *rbuflen;
+unsigned int ibuflen _U_, *rbuflen;
int ext;
{
static struct savedir sd = { 0, 0, 0, NULL, NULL, 0 };
/*
- * $Id: file.c,v 1.92.2.2.2.31.2.14 2005-05-26 11:49:55 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31.2.15 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* ----------------------------- */
int afp_createfile(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct adouble ad, *adp;
struct vol *vol;
}
int afp_setfilparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
/* -----------------------------------
*/
int afp_copyfile(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *s_vol, *d_vol;
struct dir *dir;
/* ------------------------------------ */
/* return a file id */
int afp_createid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct stat *st;
struct vol *vol;
/* ------------------------------
resolve a file id */
int afp_resolveid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
/* ------------------------------ */
int afp_deleteid(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct stat st;
struct vol *vol;
#define APPLETEMP ".AppleTempXXXXXX"
int afp_exchangefiles(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_ ;
+int ibuflen _U_, *rbuflen;
{
struct stat srcst, destst;
struct vol *vol;
/*
- * $Id: filedir.c,v 1.45.2.2.2.14.2.3 2005-06-02 12:49:41 didg Exp $
+ * $Id: filedir.c,v 1.45.2.2.2.14.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#endif
int afp_getfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct stat *st;
struct vol *vol;
}
int afp_setfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct stat *st;
struct vol *vol;
/* -------------------------------------------- */
int afp_rename(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *sdir;
/* ------------------------------- */
int afp_delete(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
/* ------------------------- */
int afp_moveandrename(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *sdir, *ddir;
/*
- * $Id: fork.c,v 1.51.2.2.2.10.2.3 2005-07-20 21:17:57 didg Exp $
+ * $Id: fork.c,v 1.51.2.2.2.10.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* ----------------------- */
int afp_openfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
struct dir *dir;
}
int afp_setforkparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen, *rbuflen;
{
struct ofork *ofork;
off_t size;
/* ---------------------- */
static int byte_lock(obj, ibuf, ibuflen, rbuf, rbuflen, is64 )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
int is64;
{
struct ofork *ofork;
* with dsi, should we check that reqcount < server quantum?
*/
static int read_fork(obj, ibuf, ibuflen, rbuf, rbuflen, is64)
-AFPObj *obj;
+AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
-int is64;
+int ibuflen _U_, *rbuflen;
+int is64;
{
struct ofork *ofork;
off_t offset, saveoff, reqcount, savereqcount;
/* ---------------------- */
int afp_flush(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
u_int16_t vid;
}
int afp_flushfork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct ofork *ofork;
u_int16_t ofrefnum;
}
int afp_closefork(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct ofork *ofork;
struct timeval tv;
static int write_fork(obj, ibuf, ibuflen, rbuf, rbuflen, is64)
AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
int is64;
{
struct ofork *ofork;
/* ---------------------------- */
int afp_getforkparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct ofork *ofork;
int buflen, ret;
/*
- * $Id: mangle.c,v 1.16.2.1.2.12.2.3 2005-02-14 16:01:54 didg Exp $
+ * $Id: mangle.c,v 1.16.2.1.2.12.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 2002. Joe Marcus Clarke (marcus@marcuscom.com)
* All Rights Reserved. See COPYRIGHT.
/* -------------------------------------------------------
* find the start of a utf8 character
*/
-static unsigned char *
-utf8_mangle_validate(unsigned char *path, size_t len)
+static char *
+utf8_mangle_validate(char *path, size_t len)
{
- unsigned char *p = path + len;
+ unsigned char *p = (unsigned char *)path + len;
int dec = 0;
/* char matches with 10xxxxxx ? */
id file/folder ID or 0
*/
-unsigned char *
-mangle(const struct vol *vol, unsigned char *filename, size_t filenamelen, unsigned char *uname, cnid_t id, int flags) {
- unsigned char *ext = NULL;
- unsigned char *m = NULL;
- static unsigned char mfilename[MAXPATHLEN + 1];
- unsigned char mangle_suffix[MANGLE_LENGTH + 1];
+char *
+mangle(const struct vol *vol _U_, char *filename, size_t filenamelen, char *uname, cnid_t id, int flags) {
+ char *ext = NULL;
+ char *m = NULL;
+ static char mfilename[MAXPATHLEN + 1];
+ char mangle_suffix[MANGLE_LENGTH + 1];
size_t ext_len = 0;
size_t maxlen;
int k;
/*
- * $Id: mangle.h,v 1.4.2.1.2.3.2.1 2005-01-31 19:50:37 didg Exp $
+ * $Id: mangle.h,v 1.4.2.1.2.3.2.2 2005-09-27 10:40:41 didg Exp $
*
*/
#define MANGLE_LENGTH 9 /* #ffffffff This really can't be changed. */
#define MAX_LENGTH MACFILELEN
-extern unsigned char *mangle __P((const struct vol *, unsigned char *, size_t, unsigned char *, cnid_t, int));
+extern char *mangle __P((const struct vol *, char *, size_t, char *, cnid_t, int));
extern char *demangle __P((const struct vol *, char *, cnid_t did));
extern char *demangle_osx __P((const struct vol *, char *, cnid_t did, cnid_t *fileid));
/*
- * $Id: messages.c,v 1.16.6.1.2.7 2004-02-14 00:30:50 didg Exp $
+ * $Id: messages.c,v 1.16.6.1.2.7.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
int afp_getsrvrmesg(obj, ibuf, ibuflen, rbuf, rbuflen)
AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
char *message;
u_int16_t type, bitmap;
/*
- * $Id: ofork.c,v 1.20.6.6.2.3 2005-07-21 17:00:09 didg Exp $
+ * $Id: ofork.c,v 1.20.6.6.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
const struct vol *vol;
struct ofork *s_of;
struct dir *olddir, *newdir;
-const char *oldpath, *newpath;
+const char *oldpath _U_, *newpath;
{
struct ofork *of, *next, *d_ofork;
/*
- * $Id: status.c,v 1.13.6.11.2.1 2005-01-31 19:50:38 didg Exp $
+ * $Id: status.c,v 1.13.6.11.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "afp_config.h"
#include "icon.h"
-static int maxstatuslen = 0;
+static size_t maxstatuslen = 0;
static void status_flags(char *data, const int notif, const int ipok,
- const unsigned char passwdbits, const int dirsrvcs)
+ const unsigned char passwdbits, const int dirsrvcs _U_)
{
u_int16_t status;
return sigoff;
}
-static int status_netaddress(char *data, int *servoffset,
+static size_t status_netaddress(char *data, int *servoffset,
const ASP asp, const DSI *dsi,
const struct afp_options *options)
{
/* handle DNS names */
if (options->fqdn && dsi) {
- int len = strlen(options->fqdn);
+ size_t len = strlen(options->fqdn);
if ( len + 2 + addresses_len < maxstatuslen - offset) {
*data++ = len +2;
*data++ = 0x04;
return (data - begin);
}
-static int status_directorynames(char *data, int *diroffset,
- const DSI *dsi,
+static size_t status_directorynames(char *data, int *diroffset,
+ const DSI *dsi _U_,
const struct afp_options *options)
{
char *begin = data;
*/
if (options->k5service && options->k5realm && options->fqdn) {
/* should k5princ be utf8 encoded? */
- u_int8_t len;
+ size_t len;
char *p = strchr( options->fqdn, ':' );
if (p)
*p = '\0';
+ strlen( options->fqdn )
+ strlen( options->k5realm );
len+=2; /* '/' and '@' */
- if ( len+2 > maxstatuslen - offset) {
+ if ( len > 255 || len+2 > maxstatuslen - offset) {
*data++ = 0;
LOG ( log_error, logtype_afpd, "status: could not set directory service list, no more room");
}
return (data - begin);
}
-static int status_utf8servername(char *data, int *nameoffset,
- const DSI *dsi,
+static size_t status_utf8servername(char *data, int *nameoffset,
+ const DSI *dsi _U_,
const struct afp_options *options)
{
char *Obj, *Type, *Zone;
{
ASP asp;
DSI *dsi;
- u_int8_t *status = NULL;
- int statuslen, c, sigoff;
+ char *status = NULL;
+ size_t statuslen;
+ int c, sigoff;
if (!(aspconfig || dsiconfig) || !options)
return;
/* this is the same as asp/dsi_getstatus */
int afp_getsrvrinfo(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj;
+char *ibuf _U_, *rbuf;
+int ibuflen _U_, *rbuflen;
{
AFPConfig *config = obj->config;
/*
- * $Id: switch.c,v 1.12 2002-11-15 10:59:11 srittau Exp $
+ * $Id: switch.c,v 1.12.8.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
#include "misc.h"
static int afp_null(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
LOG(log_info, logtype_afpd, "afp_null handle %d", *ibuf );
*rbuflen = 0;
/*
- * $Id: uam.c,v 1.24.6.7.2.3 2005-02-01 11:33:48 didg Exp $
+ * $Id: uam.c,v 1.24.6.7.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
#endif /* TRU64 */
/* --- papd-specific functions (just placeholders) --- */
-void append(void *pf, char *data, int len)
+void append(void *pf _U_, char *data _U_, int len _U_)
{
return;
}
/*
- * $Id: unix.c,v 1.43.2.1.2.10.2.2 2005-06-02 12:49:41 didg Exp $
+ * $Id: unix.c,v 1.43.2.1.2.10.2.3 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
* Note: the previous method, using access(), does not work correctly
* over NFS.
* FIXME what about ACL?
+ *
+ * dir parameter is used by AFS
*/
void accessmode( path, ma, dir, st )
char *path;
struct maccess *ma;
-struct dir *dir;
+struct dir *dir _U_;
struct stat *st;
{
/*
- * $Id: volume.c,v 1.51.2.7.2.33.2.8 2005-07-20 21:09:22 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.33.2.9 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return ret;
/* first part of the path. just forward to the next variable. */
- len = MIN(p - src, destlen);
+ len = MIN((size_t)(p - src), destlen);
if (len > 0) {
destlen -= len;
dest += len;
/* stuff up to next $ */
src = p + 2;
p = strchr(src, '$');
- len = p ? MIN(p - src, destlen) : destlen;
+ len = p ? MIN((size_t)(p - src), destlen) : destlen;
if (len > 0) {
strncpy(dest, src, len);
dest += len;
}
/* ----------------- */
-static int validupath_osx(const struct vol *vol, const char *name)
+static int validupath_osx(const struct vol *vol _U_, const char *name)
{
return strncasecmp(name,".Apple", 6) && strncasecmp(name,"._", 2);
}
/* ------------------------------- */
int afp_getsrvrparms(obj, ibuf, ibuflen, rbuf, rbuflen )
AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+char *ibuf _U_, *rbuf;
+int ibuflen _U_, *rbuflen;
{
struct timeval tv;
struct stat st;
int afp_openvol(obj, ibuf, ibuflen, rbuf, rbuflen )
AFPObj *obj;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct stat st;
char *volname;
/* ------------------------- */
int afp_closevol(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol, *ovol;
u_int16_t vid;
/* ------------------------- */
int afp_getvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
+AFPObj *obj _U_;
char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+int ibuflen _U_, *rbuflen;
{
struct vol *vol;
u_int16_t vid, bitmap;
/* ------------------------- */
int afp_setvolparams(obj, ibuf, ibuflen, rbuf, rbuflen )
-AFPObj *obj;
-char *ibuf, *rbuf;
-int ibuflen, *rbuflen;
+AFPObj *obj _U_;
+char *ibuf, *rbuf _U_;
+int ibuflen _U_, *rbuflen;
{
struct adouble ad;
struct vol *vol;
/*
- * $Id: atserv.h,v 1.2 2001-06-25 20:13:45 rufustfirefly Exp $
+ * $Id: atserv.h,v 1.2.16.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1992 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int (*ap_packet)();
};
-extern struct atserv atserv[];
-extern int atservNATSERV;
/*
- * $Id: config.c,v 1.13.6.5.2.3 2005-02-06 10:16:02 didg Exp $
+ * $Id: config.c,v 1.13.6.5.2.4 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int noallmulti( iface, av )
struct interface *iface;
- char **av;
+ char **av _U_;
{
/* Linux specific, no effect on other platforms */
iface->i_flags &= !IFACE_ALLMULTI;
/*ARGSUSED*/
int router( iface, av )
struct interface *iface;
- char **av;
+ char **av _U_;
{
/* make sure "-router" and "-dontroute" aren't both on the same line. */
if (iface->i_flags & IFACE_DONTROUTE) {
/*ARGSUSED*/
int dontroute( iface, av )
struct interface *iface;
- char **av;
+ char **av _U_;
{
/* make sure "-router" and "-dontroute" aren't both on the same line. */
if (iface->i_flags & IFACE_RSEED) {
/*ARGSUSED*/
int seed( iface, av )
struct interface *iface;
- char **av;
+ char **av _U_;
{
/*
* Check to be sure "-seed" is before "-zone". we keep the old
/*
- * $Id: main.c,v 1.17.8.6.2.1 2005-01-31 17:01:04 didg Exp $
+ * $Id: main.c,v 1.17.8.6.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int rtfd;
-struct atserv atserv[] = {
+static struct atserv atserv[] = {
{ "rtmp", 1, rtmp_packet }, /* 0 */
{ "nbp", 2, nbp_packet }, /* 1 */
{ "echo", 4, aep_packet }, /* 2 */
{ "zip", 6, zip_packet }, /* 3 */
};
-int atservNATSERV = elements( atserv );
+static int atservNATSERV = elements( atserv );
struct interface *interfaces = NULL, *ciface = NULL;
}
-static void as_timer(int sig)
+static void as_timer(int sig _U_)
{
struct sockaddr_at sat;
struct ziphdr zh;
/*
- * $Id: cnid_metad.c,v 1.1.4.15 2004-09-06 07:19:21 didg Exp $
+ * $Id: cnid_metad.c,v 1.1.4.15.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
static struct server srv[MAXSRV +1];
-static struct server *test_usockfn(char *dir, char *fn)
+static struct server *test_usockfn(char *dir, char *fn _U_)
{
int i;
for (i = 1; i <= MAXSRV; i++) {
/*
- * $Id: db_param.c,v 1.1.4.4.2.1 2004-12-21 13:36:12 didg Exp $
+ * $Id: db_param.c,v 1.1.4.4.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
static struct db_param params;
static int parse_err;
-static int usock_maxlen()
+static size_t usock_maxlen()
{
struct sockaddr_un addr;
return sizeof(addr.sun_path) - 1;
}
-static int make_pathname(char *path, char *dir, char *fn, int maxlen)
+static int make_pathname(char *path, char *dir, char *fn, size_t maxlen)
{
size_t len;
/*
- * $Id: dbd_getstamp.c,v 1.1.2.3 2004-02-07 19:46:08 didg Exp $
+ * $Id: dbd_getstamp.c,v 1.1.2.3.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
/* Return the unique stamp associated with this database */
-int dbd_getstamp(struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
+int dbd_getstamp(struct cnid_dbd_rqst *rqst _U_, struct cnid_dbd_rply *rply)
{
DBT key, data;
int rc;
/*
- * $Id: dbd_lookup.c,v 1.1.4.7 2004-02-07 19:46:08 didg Exp $
+ * $Id: dbd_lookup.c,v 1.1.4.7.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
int dbd_lookup(struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply)
{
- char *buf;
+ unsigned char *buf;
DBT key, devdata, diddata;
char dev[CNID_DEV_LEN];
char ino[CNID_INO_LEN];
/*
- * $Id: dbd_update.c,v 1.1.4.12 2004-03-21 23:04:07 lenneis Exp $
+ * $Id: dbd_update.c,v 1.1.4.12.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
{
DBT key,pkey, data;
int rc;
- char *buf;
+ unsigned char *buf;
int notfound = 0;
char getbuf[CNID_HEADER_LEN + MAXPATHLEN +1];
#ifdef DEBUG
/*
- * $Id: dbif.c,v 1.1.4.15.2.2 2005-09-13 16:57:45 didg Exp $
+ * $Id: dbif.c,v 1.1.4.15.2.3 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
}
/* --------------- */
-int dbif_open(struct db_param *dbp, int do_truncate)
+int dbif_open(struct db_param *dbp _U_, int do_truncate)
{
int ret;
int i;
/*
- * $Id: pack.c,v 1.1.4.9 2004-02-07 19:46:08 didg Exp $
+ * $Id: pack.c,v 1.1.4.9.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
/* --------------- */
int didname(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
DBT *skey;
{
int len;
/* --------------- */
int devino(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
DBT *skey;
{
memset(skey, 0, sizeof(DBT));
differ from make_cnid_data in that we never return NULL, rqst->name cannot
ever cause start[] to overflow because name length is checked in libatalk. */
-char *pack_cnid_data(struct cnid_dbd_rqst *rqst)
+unsigned char *pack_cnid_data(struct cnid_dbd_rqst *rqst)
{
- static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
- char *buf = start +CNID_LEN;
+ static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+ unsigned char *buf = start +CNID_LEN;
u_int32_t i;
pack_devino(buf, rqst->dev, rqst->ino);
/*
- * $Id: pack.h,v 1.1.4.3 2004-01-21 21:28:42 lenneis Exp $
+ * $Id: pack.h,v 1.1.4.3.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
#define CNID_DBD_HEADER_LEN (CNID_DBD_DEVINO_LEN + CNID_DBD_DID_LEN)
#endif
-extern char *pack_cnid_data __P((struct cnid_dbd_rqst *));
+extern unsigned char *pack_cnid_data __P((struct cnid_dbd_rqst *));
#ifdef DEBUG
extern char *stringify_devino __P((dev_t dev, ino_t ino));
/*
- * $Id: usockfd.c,v 1.1.4.4 2004-09-06 07:19:21 didg Exp $
+ * $Id: usockfd.c,v 1.1.4.4.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
int usockfd_check(int sockfd, unsigned long ndelay)
{
int fd;
- int size;
+ socklen_t size;
fd_set readfds;
struct timeval tv;
int ret;
/*
- * $Id: headers.c,v 1.9.10.1.2.1 2005-02-06 10:16:02 didg Exp $
+ * $Id: headers.c,v 1.9.10.1.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int ch_for( in, out )
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start, *stop, *p, *q, c;
int linelength, crlflength;
}
int ch_title( in, out )
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start, *stop, *p, *q, c;
int linelength, crlflength;
int ch_creator( in, out )
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start, *stop, *p, *q, c;
int linelength, crlflength;
}
int ch_endcomm( in, out )
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start;
int linelength, crlflength;
}
int ch_starttranslate(in,out)
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start;
int linelength, crlflength;
}
int ch_endtranslate(in,out)
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start;
int linelength, crlflength;
}
int ch_translateone(in,out)
- struct papfile *in, *out;
+ struct papfile *in, *out _U_;
{
char *start;
int linelength, crlflength;
/*
- * $Id: magics.c,v 1.11.6.2.2.1 2005-02-06 10:16:02 didg Exp $
+ * $Id: magics.c,v 1.11.6.2.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int cm_psquery( in, out, sat )
struct papfile *in, *out;
- struct sockaddr_at *sat;
+ struct sockaddr_at *sat _U_;
{
struct papd_comment *comment;
char *start;
int cm_psadobe( in, out, sat )
struct papfile *in, *out;
- struct sockaddr_at *sat;
+ struct sockaddr_at *sat _U_;
{
char *start;
int linelength, crlflength;
int cm_psswitch( in, out, sat )
struct papfile *in, *out;
- struct sockaddr_at *sat;
+ struct sockaddr_at *sat _U_;
{
char *start, *stop, *p;
int linelength, crlflength;
/*
- * $Id: print_cups.c,v 1.1.2.1.2.1 2005-01-11 23:00:40 didg Exp $
+ * $Id: print_cups.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright 2004 Bjoern Fernhomberg.
*
*/
static const char * /* O - Password or NULL */
-cups_passwd_cb(const char *prompt) /* I - Prompt */
+cups_passwd_cb(const char *prompt _U_) /* I - Prompt */
{
/*
* Always return NULL to indicate that no password is available...
/*
- * $Id: uam.c,v 1.9.6.4 2004-02-14 00:30:51 didg Exp $
+ * $Id: uam.c,v 1.9.6.4.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
}
/* Crap to support uams which call this afpd function */
-int uam_afpserver_option(void *private, const int what, void *option,
- int *len)
+int uam_afpserver_option(void *private _U_, const int what _U_, void *option _U_,
+ int *len _U_)
{
return(0);
}
/* --- helper functions for plugin uams --- */
-struct passwd *uam_getname(void *dummy, char *name, const int len)
+struct passwd *uam_getname(void *dummy _U_, char *name, const int len)
{
struct passwd *pwent;
char *user;
/*
- * $Id: uams_dhx_pam.c,v 1.24.6.5 2004-06-24 01:20:12 bfernhomberg Exp $
+ * $Id: uams_dhx_pam.c,v 1.24.6.5.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
static int PAM_conv (int num_msg,
const struct pam_message **msg,
struct pam_response **resp,
- void *appdata_ptr) {
+ void *appdata_ptr _U_) {
int count = 0;
struct pam_response *reply;
};
-static int dhx_setup(void *obj, char *ibuf, int ibuflen,
+static int dhx_setup(void *obj, char *ibuf, int ibuflen _U_,
char *rbuf, int *rbuflen)
{
u_int16_t sessid;
}
/* -------------------------------- */
-static int login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
+static int login(void *obj, char *username, int ulen, struct passwd **uam_pwd _U_,
char *ibuf, int ibuflen,
char *rbuf, int *rbuflen)
{
/* -------------------------------- */
static int pam_logincont(void *obj, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
+ char *ibuf, int ibuflen _U_,
char *rbuf, int *rbuflen)
{
char *hostname;
/* change pw for dhx needs a couple passes to get everything all
* right. basically, it's like the login/logincont sequence */
static int pam_changepw(void *obj, char *username,
- struct passwd *pwd, char *ibuf, int ibuflen,
+ struct passwd *pwd _U_, char *ibuf, int ibuflen,
char *rbuf, int *rbuflen)
{
BIGNUM *bn1, *bn2, *bn3;
/*
- * $Id: uams_dhx_passwd.c,v 1.18.6.6 2004-03-18 02:56:32 bfernhomberg Exp $
+ * $Id: uams_dhx_passwd.c,v 1.18.6.6.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#endif /* TRU64 */
/* dhx passwd */
-static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
+static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd _U_,
+ char *ibuf, int ibuflen _U_,
char *rbuf, int *rbuflen)
{
unsigned char iv[] = "CJalbert";
}
static int passwd_logincont(void *obj, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
+ char *ibuf, int ibuflen _U_,
char *rbuf, int *rbuflen)
{
#ifdef SHADOWPW
/*
- * $Id: uams_guest.c,v 1.12.6.2 2004-02-14 02:47:15 didg Exp $
+ * $Id: uams_guest.c,v 1.12.6.2.2.1 2005-09-27 10:40:41 didg Exp $
*
* (c) 2001 (see COPYING)
*/
/* login and login_ext are almost the same */
static int noauth_login(void *obj, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+ char *ibuf _U_, int ibuflen _U_,
+ char *rbuf _U_, int *rbuflen)
{
struct passwd *pwent;
char *guest, *username;
return( AFP_OK );
}
-static int noauth_login_ext(void *obj, char *uname, struct passwd **uam_pwd,
+static int noauth_login_ext(void *obj, char *uname _U_, struct passwd **uam_pwd,
char *ibuf, int ibuflen,
char *rbuf, int *rbuflen)
{
/*
- * $Id: uams_pam.c,v 1.15.2.1.2.5 2004-02-14 02:47:15 didg Exp $
+ * $Id: uams_pam.c,v 1.15.2.1.2.5.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
static int PAM_conv (int num_msg,
const struct pam_message **msg,
struct pam_response **resp,
- void *appdata_ptr)
+ void *appdata_ptr _U_)
{
struct pam_response *reply;
int count;
};
static int login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+ char *ibuf, int ibuflen _U_,
+ char *rbuf _U_, int *rbuflen _U_)
{
struct passwd *pwd;
int err, PAM_error;
}
/* change passwd */
-static int pam_changepw(void *obj, char *username,
- struct passwd *pwd, char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+static int pam_changepw(void *obj _U_, char *username,
+ struct passwd *pwd _U_, char *ibuf, int ibuflen _U_,
+ char *rbuf _U_, int *rbuflen _U_)
{
char pw[PASSWDLEN + 1];
pam_handle_t *lpamh;
/*
- * $Id: uams_passwd.c,v 1.19.2.1.2.9 2004-06-15 00:52:09 bfernhomberg Exp $
+ * $Id: uams_passwd.c,v 1.19.2.1.2.9.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+ char *rbuf _U_, int *rbuflen _U_)
{
char *p;
struct passwd *pwd;
/*
- * $Id: uams_randnum.c,v 1.12.6.4 2004-10-08 00:54:40 bfernhomberg Exp $
+ * $Id: uams_randnum.c,v 1.12.6.4.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
/* handle ~/.passwd. courtesy of shirsch@ibm.net. */
static __inline__ int home_passwd(const struct passwd *pwd,
- const char *path, const int pathlen,
- char *passwd, const int len,
+ const char *path, const int pathlen _U_,
+ unsigned char *passwd, const int len,
const int set)
{
struct stat st;
#define unhex(x) (isdigit(x) ? (x) - '0' : toupper(x) + 10 - 'A')
static int afppasswd(const struct passwd *pwd,
const char *path, const int pathlen,
- char *passwd, int len,
+ unsigned char *passwd, int len,
const int set)
{
u_int8_t key[DES_KEY_SZ*2];
* depending upon whether or not the password is in ~/.passwd
* or in a global location */
static int randpass(const struct passwd *pwd, const char *file,
- char *passwd, const int len, const int set)
+ unsigned char *passwd, const int len, const int set)
{
int i;
uid_t uid = geteuid();
/* randnum sends an 8-byte number and uses the user's password to
* check against the encrypted reply. */
-static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
+static int rand_login(void *obj, char *username, int ulen, struct passwd **uam_pwd _U_,
+ char *ibuf _U_, int ibuflen _U_,
char *rbuf, int *rbuflen)
{
/* check encrypted reply. we actually setup the encryption stuff
* here as the first part of randnum and rand2num are identical. */
static int randnum_logincont(void *obj, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+ char *ibuf, int ibuflen _U_,
+ char *rbuf _U_, int *rbuflen)
{
u_int16_t sessid;
* and sends it back as part of the reply.
*/
static int rand2num_logincont(void *obj, struct passwd **uam_pwd,
- char *ibuf, int ibuflen,
+ char *ibuf, int ibuflen _U_,
char *rbuf, int *rbuflen)
{
u_int16_t sessid;
* NOTE: an FPLogin must already have completed successfully for this
* to work.
*/
-static int randnum_changepw(void *obj, const char *username,
+static int randnum_changepw(void *obj, const char *username _U_,
struct passwd *pwd, char *ibuf,
- int ibuflen, char *rbuf, int *rbuflen)
+ int ibuflen _U_, char *rbuf _U_, int *rbuflen _U_)
{
char *passwdfile;
int err, len;
/*
- * $Id: cnid.h,v 1.9.6.6.2.1 2005-01-30 20:56:21 didg Exp $
+ * $Id: cnid.h,v 1.9.6.6.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 2003 the Netatalk Team
* Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
void *_private; /* back-end speficic data */
cnid_t (*cnid_add)(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len, cnid_t hint);
+ char *name, const size_t, cnid_t hint);
int (*cnid_delete)(struct _cnid_db *cdb, cnid_t id);
- cnid_t (*cnid_get)(struct _cnid_db *cdb, const cnid_t did, char *name,
- const int len);
+ cnid_t (*cnid_get)(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t);
cnid_t (*cnid_lookup)(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len);
+ char *name, const size_t);
cnid_t (*cnid_nextid)(struct _cnid_db *cdb);
- char *(*cnid_resolve)(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len);
+ char *(*cnid_resolve)(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len);
int (*cnid_update)(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len);
+ const cnid_t did, char *name, const size_t len);
void (*cnid_close)(struct _cnid_db *cdb);
- int (*cnid_getstamp)(struct _cnid_db *cdb, void *buffer, const int len);
+ int (*cnid_getstamp)(struct _cnid_db *cdb, void *buffer, const size_t len);
};
typedef struct _cnid_db cnid_db;
struct _cnid_db *cnid_open(const char *volpath, mode_t mask, char *type, int flags);
cnid_t cnid_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len, cnid_t hint);
+ char *name, const size_t len, cnid_t hint);
int cnid_delete(struct _cnid_db *cdb, cnid_t id);
-cnid_t cnid_get (struct _cnid_db *cdb, const cnid_t did, char *name,const int len);
+cnid_t cnid_get (struct _cnid_db *cdb, const cnid_t did, char *name,const size_t len);
-int cnid_getstamp(struct _cnid_db *cdb, void *buffer, const int len);
+int cnid_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len);
cnid_t cnid_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len);
+ char *name, const size_t len);
-char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len);
+char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len);
int cnid_update (struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len);
+ const cnid_t did, char *name, const size_t len);
+
+cnid_t cnid_rebuild_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
+ char *name, const size_t len, cnid_t hint);
+
/* This function closes a CNID database and frees all resources assigned to it. */
void cnid_close(struct _cnid_db *db);
#endif
-/*
- * $Log: cnid.h,v $
- * Revision 1.9.6.6.2.1 2005-01-30 20:56:21 didg
- *
- * Olaf Hering at suse.de warning fixes.
- *
- * Revision 1.9.6.6 2004/02/22 18:36:37 didg
- *
- * small clean up
- *
- * Revision 1.9.6.5 2004/01/14 23:15:19 lenneis
- * Check if we can get a DB stamp sucessfully in afs_openvol and fail
- * the open if not.
- *
- * Revision 1.9.6.4 2004/01/10 07:19:31 bfernhomberg
- * add cnid_init prototype
- *
- * Revision 1.9.6.3 2004/01/03 22:42:55 didg
- *
- * better errors handling in afpd for dbd cnid.
- *
- * Revision 1.9.6.2 2004/01/03 22:21:09 didg
- *
- * add nodev volume option (always use 0 for device number).
- *
- * Revision 1.9.6.1 2003/09/09 16:42:20 didg
- *
- * big merge for db frontend and unicode.
- *
- * Revision 1.9.4.2 2003/06/11 15:29:11 rlewczuk
- * Removed obsolete parameter from cnid_add. Spotted by Didier.
- *
- * Revision 1.9.4.1 2003/05/29 07:53:19 rlewczuk
- * Selectable CNIDs. Some refactoring. Propably needs more of refactoring, mainly
- * a well designed API (current API is just an old cnid_* API enclosed in VMT).
- *
- */
-
u_int32_t attn_quantum, datasize, server_quantum;
u_int16_t serverID, clientID;
- u_int8_t *status, commands[DSI_CMDSIZ], data[DSI_DATASIZ];
- int statuslen;
+ char *status;
+ u_int8_t commands[DSI_CMDSIZ], data[DSI_DATASIZ];
+ size_t statuslen;
size_t datalen, cmdlen;
size_t read_count, write_count;
int asleep; /* client won't reply AFP 0x7a ? */
const char * /*host*/, const char * /*address*/,
const int /*port*/, const int /*proxy*/,
const u_int32_t /* server quantum */));
-extern void dsi_setstatus __P((DSI *, u_int8_t *, const int));
+extern void dsi_setstatus __P((DSI *, char *, const size_t));
/* in dsi_getsess.c */
extern DSI *dsi_getsession __P((DSI *, server_child *, const int));
/* cnid_add.c */
extern cnid_t cnid_cdb_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int, cnid_t));
-extern int cnid_cdb_getstamp __P((struct _cnid_db *, void *, const int ));
+ char *, const size_t, cnid_t));
+extern int cnid_cdb_getstamp __P((struct _cnid_db *, void *, const size_t ));
/* cnid_get.c */
-extern cnid_t cnid_cdb_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_cdb_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t ));
+extern cnid_t cnid_cdb_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_cdb_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t ));
extern cnid_t cnid_cdb_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int));
+ char *, const size_t));
/* cnid_update.c */
extern int cnid_cdb_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
- const cnid_t, char *, int));
+ const cnid_t, char *, size_t));
/* cnid_delete.c */
extern int cnid_cdb_delete __P((struct _cnid_db *, const cnid_t));
/*
- * $Id: cnid_cdb_add.c,v 1.1.4.6.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_add.c,v 1.1.4.6.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
buf[CNID_DEV_LEN + CNID_INO_LEN - 8] = ino;
}
-char *make_cnid_data(const struct stat *st,const cnid_t did,
- const char *name, const int len)
+unsigned char *make_cnid_data(const struct stat *st,const cnid_t did,
+ const char *name, const size_t len)
{
- static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
- char *buf = start +CNID_LEN;
+ static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+ unsigned char *buf = start +CNID_LEN;
u_int32_t i;
if (len > MAXPATHLEN)
#endif
extern int cnid_cdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len);
+ const cnid_t did, char *name, const size_t len);
/* --------------- */
int db_stamp(void *buffer, size_t size)
/* ------------------------ */
cnid_t cnid_cdb_add(struct _cnid_db *cdb, const struct stat *st,
- const cnid_t did, char *name, const int len,
+ const cnid_t did, char *name, const size_t len,
cnid_t hint)
{
CNID_private *db;
/* cnid_cbd_getstamp */
/*-----------------------*/
-int cnid_cdb_getstamp(struct _cnid_db *cdb, void *buffer, const int len)
+int cnid_cdb_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len)
{
DBT key, data;
int rc;
/*
- * $Id: cnid_cdb_get.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_get.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
/* Return CNID for a given did/name. */
cnid_t cnid_cdb_get(struct _cnid_db *cdb, const cnid_t did, char *name,
- const int len)
+ const size_t len)
{
char start[CNID_DID_LEN + MAXPATHLEN + 1], *buf;
CNID_private *db;
/*
- * $Id: cnid_cdb_lookup.c,v 1.1.4.5.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_lookup.c,v 1.1.4.5.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
/* This returns the CNID corresponding to a particular file. It will
* also fix up the various databases if there's a problem. */
cnid_t cnid_cdb_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len)
+ char *name, const size_t len)
{
- char *buf;
+ unsigned char *buf;
CNID_private *db;
DBT key, devdata, diddata;
char dev[CNID_DEV_LEN];
/*
- * $Id: cnid_cdb_open.c,v 1.1.4.10 2004-03-22 04:38:51 bfernhomberg Exp $
+ * $Id: cnid_cdb_open.c,v 1.1.4.10.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
/* --------------- */
static int didname(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
DBT *skey;
{
int len;
/* --------------- */
static int devino(dbp, pkey, pdata, skey)
-DB *dbp;
-const DBT *pkey, *pdata;
+DB *dbp _U_;
+const DBT *pkey _U_, *pdata;
DBT *skey;
{
memset(skey, 0, sizeof(DBT));
/*
- * $Id: cnid_cdb_private.h,v 1.1.4.7 2004-03-22 04:38:51 bfernhomberg Exp $
+ * $Id: cnid_cdb_private.h,v 1.1.4.7.2.1 2005-09-27 10:40:41 didg Exp $
*/
#ifndef LIBATALK_CDB_PRIVATE_H
buf[CNID_DEV_LEN + CNID_INO_LEN - 8] = ino;
}
-static __inline__ char *make_cnid_data(const struct stat *st,
+static __inline__ unsigned char *make_cnid_data(const struct stat *st,
const cnid_t did,
- const char *name, const int len)
+ const char *name, const size_t len)
{
- static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
- char *buf = start +CNID_LEN;
+ static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+ unsigned char *buf = start +CNID_LEN;
u_int32_t i;
if (len > MAXPATHLEN)
return start;
}
#else
-extern char *make_cnid_data __P((const struct stat *,const cnid_t ,
- const char *, const int ));
+extern unsigned char *make_cnid_data __P((const struct stat *,const cnid_t ,
+ const char *, const size_t ));
#endif
#endif /* atalk/cnid/cnid_private.h */
/*
- * $Id: cnid_cdb_resolve.c,v 1.1.4.2 2003-10-21 16:23:54 didg Exp $
+ * $Id: cnid_cdb_resolve.c,v 1.1.4.2.2.1 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include "cnid_cdb_private.h"
/* Return the did/name pair corresponding to a CNID. */
-char *cnid_cdb_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len) {
+char *cnid_cdb_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len) {
CNID_private *db;
DBT key, data;
int rc;
/*
- * $Id: cnid_cdb_update.c,v 1.1.4.4.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_cdb_update.c,v 1.1.4.4.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
* handle the did/name data, there are a bunch of functions to get
* and set the various fields. */
int cnid_cdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len
+ const cnid_t did, char *name, const size_t len
/*, const char *info, const int infolen*/)
{
- char *buf;
+ unsigned char *buf;
CNID_private *db;
DBT key, pkey, data;
int rc;
/*
- * $Id: cnid.c,v 1.1.4.11.2.2 2005-01-31 17:01:16 didg Exp $
+ * $Id: cnid.c,v 1.1.4.11.2.3 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 2003 the Netatalk Team
* Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
/* --------------- */
cnid_t cnid_add(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len, cnid_t hint)
+ char *name, const size_t len, cnid_t hint)
{
cnid_t ret;
/* --------------- */
-cnid_t cnid_get(struct _cnid_db *cdb, const cnid_t did, char *name,const int len)
+cnid_t cnid_get(struct _cnid_db *cdb, const cnid_t did, char *name,const size_t len)
{
cnid_t ret;
}
/* --------------- */
-int cnid_getstamp(struct _cnid_db *cdb, void *buffer, const int len)
+int cnid_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len)
{
cnid_t ret;
time_t t;
/* --------------- */
cnid_t cnid_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len)
+ char *name, const size_t len)
{
cnid_t ret;
}
/* --------------- */
-char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len)
+char *cnid_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len)
{
char *ret;
/* --------------- */
int cnid_update (struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len)
+ const cnid_t did, char *name, const size_t len)
{
int ret;
/* cnid_add.c */
extern cnid_t cnid_db3_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int, cnid_t));
+ char *, const size_t, cnid_t));
/* cnid_get.c */
-extern cnid_t cnid_db3_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_db3_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t ));
+extern cnid_t cnid_db3_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_db3_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t ));
extern cnid_t cnid_db3_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int));
+ char *, const size_t));
/* cnid_update.c */
extern int cnid_db3_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
- const cnid_t, char *, int));
+ const cnid_t, char *, size_t));
/* cnid_delete.c */
extern int cnid_db3_delete __P((struct _cnid_db *, const cnid_t));
/*
- * $Id: cnid_db3_add.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_add.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
DBT rootinfo_key, rootinfo_data;
DB_TXN *tid;
int rc;
- int flag;
cnid_t hint,id;
memset(&rootinfo_key, 0, sizeof(rootinfo_key));
/* ------------------------ */
cnid_t cnid_db3_add(struct _cnid_db *cdb, const struct stat *st,
- const cnid_t did, char *name, const int len,
+ const cnid_t did, char *name, const size_t len,
cnid_t hint)
{
CNID_private *db;
/*
- * $Id: cnid_db3_get.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_get.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include "cnid_db3_private.h"
/* Return CNID for a given did/name. */
-cnid_t cnid_db3_get(struct _cnid_db *cdb, const cnid_t did, char *name,
- const int len)
+cnid_t cnid_db3_get(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t len)
{
char start[CNID_DID_LEN + MAXPATHLEN + 1], *buf;
CNID_private *db;
/*
- * $Id: cnid_db3_lookup.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_lookup.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
/* This returns the CNID corresponding to a particular file. It will
* also fix up the various databases if there's a problem. */
-cnid_t cnid_db3_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len)
+cnid_t cnid_db3_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const size_t len)
{
- char *buf;
+ unsigned char *buf;
CNID_private *db;
DBT key, devdata, diddata;
int devino = 1, didname = 1;
/*
- * $Id: cnid_db3_private.h,v 1.1.4.3 2003-10-30 09:38:47 bfernhomberg Exp $
+ * $Id: cnid_db3_private.h,v 1.1.4.3.2.1 2005-09-27 10:40:41 didg Exp $
*/
#ifndef LIBATALK_CNID_PRIVATE_H
#endif /* __inline__ */
/* construct db_cnid data. NOTE: this is not re-entrant. */
-static __inline__ char *make_cnid_data(const struct stat *st,
+static __inline__ unsigned char *make_cnid_data(const struct stat *st,
const cnid_t did,
- const char *name, const int len)
+ const char *name, const size_t len)
{
- static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
- char *buf = start;
+ static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+ unsigned char *buf = start;
u_int32_t i;
if (len > MAXPATHLEN)
/*
- * $Id: cnid_db3_resolve.c,v 1.1.4.2 2003-10-21 16:23:54 didg Exp $
+ * $Id: cnid_db3_resolve.c,v 1.1.4.2.2.1 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include "cnid_db3_private.h"
/* Return the did/name pair corresponding to a CNID. */
-char *cnid_db3_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len) {
+char *cnid_db3_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len) {
CNID_private *db;
DBT key, data;
int rc;
/*
- * $Id: cnid_db3_update.c,v 1.1.4.2.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid_db3_update.c,v 1.1.4.2.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
* handle the did/name data, there are a bunch of functions to get
* and set the various fields. */
int cnid_db3_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len
+ const cnid_t did, char *name, const size_t len
/*, const char *info, const int infolen*/)
{
CNID_private *db;
/*
- * $Id: cnid_dbd.c,v 1.1.4.18.2.2 2005-02-06 10:16:03 didg Exp $
+ * $Id: cnid_dbd.c,v 1.1.4.18.2.3 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
}
/* ---------------------- */
-struct _cnid_db *cnid_dbd_open(const char *dir, mode_t mask)
+struct _cnid_db *cnid_dbd_open(const char *dir, mode_t mask _U_)
{
CNID_private *db = NULL;
struct _cnid_db *cdb = NULL;
/* ---------------------- */
cnid_t cnid_dbd_add(struct _cnid_db *cdb, const struct stat *st,
- const cnid_t did, char *name, const int len,
- cnid_t hint)
+ const cnid_t did, char *name, const size_t len,
+ cnid_t hint _U_)
{
CNID_private *db;
struct cnid_dbd_rqst rqst;
rqst.name = name;
rqst.namelen = len;
+ rply.namelen = 0;
if (transmit(db, &rqst, &rply) < 0) {
errno = CNID_ERR_DB;
return CNID_INVALID;
}
/* ---------------------- */
-cnid_t cnid_dbd_get(struct _cnid_db *cdb, const cnid_t did, char *name,
- const int len)
+cnid_t cnid_dbd_get(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t len)
{
CNID_private *db;
struct cnid_dbd_rqst rqst;
rqst.name = name;
rqst.namelen = len;
+ rply.namelen = 0;
if (transmit(db, &rqst, &rply) < 0) {
errno = CNID_ERR_DB;
return CNID_INVALID;
}
/* ---------------------- */
-char *cnid_dbd_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, u_int32_t len)
+char *cnid_dbd_resolve(struct _cnid_db *cdb, cnid_t *id, void *buffer, size_t len)
{
CNID_private *db;
struct cnid_dbd_rqst rqst;
}
/* ---------------------- */
-int cnid_dbd_getstamp(struct _cnid_db *cdb, void *buffer, const int len)
+int cnid_dbd_getstamp(struct _cnid_db *cdb, void *buffer, const size_t len)
{
CNID_private *db;
int ret;
/* ---------------------- */
cnid_t cnid_dbd_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did,
- char *name, const int len)
+ char *name, const size_t len)
{
CNID_private *db;
struct cnid_dbd_rqst rqst;
rqst.name = name;
rqst.namelen = len;
+ rply.namelen = 0;
if (transmit(db, &rqst, &rply) < 0) {
errno = CNID_ERR_DB;
return CNID_INVALID;
/* ---------------------- */
int cnid_dbd_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len)
+ const cnid_t did, char *name, const size_t len)
{
CNID_private *db;
struct cnid_dbd_rqst rqst;
rqst.name = name;
rqst.namelen = len;
+ rply.namelen = 0;
if (transmit(db, &rqst, &rply) < 0) {
errno = CNID_ERR_DB;
return -1;
rqst.op = CNID_DBD_OP_DELETE;
rqst.cnid = id;
+ rply.namelen = 0;
if (transmit(db, &rqst, &rply) < 0) {
errno = CNID_ERR_DB;
return -1;
}
}
+
struct _cnid_module cnid_dbd_module = {
"dbd",
{NULL, NULL},
/*
- * $Id: cnid_dbd.h,v 1.1.4.3.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_dbd.h,v 1.1.4.3.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
extern struct _cnid_db *cnid_dbd_open __P((const char *, mode_t));
extern void cnid_dbd_close __P((struct _cnid_db *));
extern cnid_t cnid_dbd_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int, cnid_t));
-extern cnid_t cnid_dbd_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_dbd_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t ));
-extern int cnid_dbd_getstamp __P((struct _cnid_db *, void *, const int ));
+ char *, const size_t, cnid_t));
+extern cnid_t cnid_dbd_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_dbd_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t ));
+extern int cnid_dbd_getstamp __P((struct _cnid_db *, void *, const size_t ));
extern cnid_t cnid_dbd_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int));
+ char *, const size_t));
extern int cnid_dbd_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
- const cnid_t, char *, int));
+ const cnid_t, char *, size_t));
extern int cnid_dbd_delete __P((struct _cnid_db *, const cnid_t));
#endif /* include/atalk/cnid_dbd.h */
/*
- * $Id: cnid_last.c,v 1.1.4.1.2.2 2005-02-06 10:16:03 didg Exp $
+ * $Id: cnid_last.c,v 1.1.4.1.2.3 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
/* ------------------------ */
cnid_t cnid_last_add(struct _cnid_db *cdb, const struct stat *st,
- const cnid_t did, char *name, const int len, cnid_t hint)
+ const cnid_t did _U_, char *name _U_, const size_t len _U_, cnid_t hint _U_)
{
/* FIXME: it relies on fact, that this is never called twice for the same file/dir. */
-int cnid_last_delete(struct _cnid_db *cdb, const cnid_t id)
+int cnid_last_delete(struct _cnid_db *cdb _U_, const cnid_t id _U_)
{
return CNID_INVALID;
}
/* Return CNID for a given did/name. */
-cnid_t cnid_last_get(struct _cnid_db *cdb, const cnid_t did, char *name, const int len)
+cnid_t cnid_last_get(struct _cnid_db *cdb _U_, const cnid_t did _U_, char *name _U_, const size_t len _U_)
{
/* FIXME: it relies on fact, that this is never called twice for the same file/dir. */
/* Propably we should look through DID tree. */
/* */
-cnid_t cnid_last_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len)
+cnid_t cnid_last_lookup(struct _cnid_db *cdb _U_, const struct stat *st _U_, const cnid_t did _U_,
+ char *name _U_, const size_t len _U_)
{
/* FIXME: this function doesn't work in [last] scheme ! */
/* Should be never called or CNID should be somewhat refactored again. */
return cdb;
}
-struct _cnid_db *cnid_last_open(const char *dir, mode_t mask)
+struct _cnid_db *cnid_last_open(const char *dir, mode_t mask _U_)
{
struct _cnid_db *cdb;
};
/* Return the did/name pair corresponding to a CNID. */
-char *cnid_last_resolve(struct _cnid_db *cdb, cnid_t * id, void *buffer, u_int32_t len)
+char *cnid_last_resolve(struct _cnid_db *cdb _U_, cnid_t * id _U_, void *buffer _U_, size_t len _U_)
{
/* FIXME: frankly, it does not work. As get, add and other functions. */
return NULL;
}
-int cnid_last_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len
- /*, const char *info, const int infolen */ )
+int cnid_last_update(struct _cnid_db *cdb _U_, const cnid_t id _U_, const struct stat *st _U_,
+ const cnid_t did _U_, char *name _U_, const size_t len _U_)
{
return 0;
}
extern struct _cnid_db *cnid_last_open __P((const char *, mode_t));
extern void cnid_last_close __P((struct _cnid_db *));
extern cnid_t cnid_last_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int, cnid_t));
-extern cnid_t cnid_last_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_last_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
-extern cnid_t cnid_last_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
+ char *, const size_t, cnid_t));
+extern cnid_t cnid_last_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_last_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t));
+extern cnid_t cnid_last_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const size_t));
extern int cnid_last_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
- const cnid_t, char *, int));
+ const cnid_t, char *, size_t));
extern int cnid_last_delete __P((struct _cnid_db *, const cnid_t));
#endif /* include/atalk/cnid_last.h */
/* cnid_add.c */
extern cnid_t cnid_tdb_add __P((struct _cnid_db *, const struct stat *, const cnid_t,
- char *, const int, cnid_t));
+ char *, const size_t, cnid_t));
/* cnid_get.c */
-extern cnid_t cnid_tdb_get __P((struct _cnid_db *, const cnid_t, char *, const int));
-extern char *cnid_tdb_resolve __P((struct _cnid_db *, cnid_t *, void *, u_int32_t));
-extern cnid_t cnid_tdb_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const int));
+extern cnid_t cnid_tdb_get __P((struct _cnid_db *, const cnid_t, char *, const size_t));
+extern char *cnid_tdb_resolve __P((struct _cnid_db *, cnid_t *, void *, size_t));
+extern cnid_t cnid_tdb_lookup __P((struct _cnid_db *, const struct stat *, const cnid_t, char *, const size_t));
/* cnid_update.c */
extern int cnid_tdb_update __P((struct _cnid_db *, const cnid_t, const struct stat *,
- const cnid_t, char *, int));
+ const cnid_t, char *, size_t));
/* cnid_delete.c */
extern int cnid_tdb_delete __P((struct _cnid_db *, const cnid_t));
/* construct db_cnid data. NOTE: this is not re-entrant. */
static __inline__ char *make_tdb_data(const struct stat *st,
const cnid_t did,
- const char *name, const int len)
+ const char *name, const size_t len)
{
static char start[TDB_HEADER_LEN + MAXPATHLEN + 1];
char *buf = start;
/*
- * $Id: cnid_tdb_add.c,v 1.1.2.1.2.2 2005-01-31 17:01:16 didg Exp $
+ * $Id: cnid_tdb_add.c,v 1.1.2.1.2.3 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
/* ------------------------ */
cnid_t cnid_tdb_add(struct _cnid_db *cdb, const struct stat *st,
- const cnid_t did, char *name, const int len, cnid_t hint)
+ const cnid_t did, char *name, const size_t len, cnid_t hint)
{
const struct stat *lstp;
cnid_t id;
/*
- * $Id: cnid_tdb_get.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_get.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include "cnid_tdb.h"
/* Return CNID for a given did/name. */
-cnid_t cnid_tdb_get(struct _cnid_db *cdb, const cnid_t did, char *name, const int len)
+cnid_t cnid_tdb_get(struct _cnid_db *cdb, const cnid_t did, char *name, const size_t len)
{
char start[TDB_DID_LEN + MAXPATHLEN + 1], *buf;
struct _cnid_tdb_private *db;
/*
- * $Id: cnid_tdb_lookup.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_lookup.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include "cnid_tdb.h"
#include <atalk/logger.h>
-cnid_t cnid_tdb_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const int len)
+cnid_t cnid_tdb_lookup(struct _cnid_db *cdb, const struct stat *st, const cnid_t did, char *name, const size_t len)
{
char *buf;
struct _cnid_tdb_private *db;
/*
- * $Id: cnid_tdb_update.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_update.c,v 1.1.2.1.2.2 2005-09-27 10:40:41 didg Exp $
*/
#ifdef HAVE_CONFIG_H
#include <atalk/logger.h>
int cnid_tdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const int len
+ const cnid_t did, char *name, const size_t len
/*, const char *info, const int infolen */ )
{
struct _cnid_tdb_private *db;
/*
- * $Id: dsi_init.c,v 1.3.14.1 2004-04-27 22:45:37 didg Exp $
+ * $Id: dsi_init.c,v 1.3.14.1.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
return dsi;
}
-void dsi_setstatus(DSI *dsi, u_int8_t *status, const int slen)
+void dsi_setstatus(DSI *dsi, char *status, const size_t slen)
{
dsi->status = status;
dsi->statuslen = slen;
/*
- * $Id: dsi_stream.c,v 1.11.6.5.2.1 2005-01-31 19:50:53 didg Exp $
+ * $Id: dsi_stream.c,v 1.11.6.5.2.2 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1998 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
* write raw data. return actual bytes read. checks against EINTR
* aren't necessary if all of the signals have SA_RESTART
* specified. */
-size_t dsi_stream_write(DSI *dsi, void *data, const size_t length, int mode)
+size_t dsi_stream_write(DSI *dsi, void *data, const size_t length, int mode _U_)
{
size_t written;
ssize_t len;
/*
- * $Id: dsi_write.c,v 1.3.14.2 2004-05-04 14:26:14 didg Exp $
+ * $Id: dsi_write.c,v 1.3.14.2.2.1 2005-09-27 10:40:41 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
/* initialize relevant things for dsi_write. this returns the amount
* of data in the data buffer. the interface has been reworked to allow
* for arbitrary buffers. */
-size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen)
+size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen _U_)
{
#ifdef TIMER_ON_READ
const struct itimerval none = {{0, 0}, {0, 0}};
/* ------------------------ */
-size_t mb_generic_push( int (*char_func)(unsigned char *, ucs2_t), void *cd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft)
+size_t mb_generic_push( int (*char_func)(unsigned char *, ucs2_t), void *cd _U_, char **inbuf,
+ size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
{
int len = 0;
unsigned char *tmpptr = (unsigned char *) *outbuf;
/* ------------------------ */
-size_t mb_generic_pull ( int (*char_func)(ucs2_t *, const unsigned char *), void *cd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft)
+size_t mb_generic_pull ( int (*char_func)(ucs2_t *, const unsigned char *), void *cd _U_,
+ char **inbuf, size_t *inbytesleft,char **outbuf, size_t *outbytesleft)
{
ucs2_t temp;
unsigned char *inptr;
return 0;
}
-static size_t mac_hebrew_push( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t mac_hebrew_push( void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
unsigned char c = 0;
return 0;
}
-static size_t mac_hebrew_pull ( void *cd, char **inbuf, size_t *inbytesleft,
+static size_t mac_hebrew_pull ( void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
ucs2_t temp;
the following functions implement the builtin character sets in Netatalk
*************************************************************************/
-static size_t ascii_pull(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t ascii_pull(void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
ucs2_t curchar;
return 0;
}
-static size_t ascii_push(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t ascii_push(void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
int ir_count=0;
}
-static size_t iconv_copy(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t iconv_copy(void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
int n;
};
/* ------------------------ */
-static size_t utf8_pull(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t utf8_pull(void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
ucs2_t uc = 0;
}
/* ------------------------ */
-static size_t utf8_push(void *cd, char **inbuf, size_t *inbytesleft,
+static size_t utf8_push(void *cd _U_, char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
ucs2_t uc=0;
/*
- * $Id: server_ipc.c,v 1.1.4.1.2.2 2004-07-01 01:27:34 didg Exp $
+ * $Id: server_ipc.c,v 1.1.4.1.2.2.2.1 2005-09-27 10:40:41 didg Exp $
*
* All rights reserved. See COPYRIGHT.
*
}
/* ----------------- */
-int server_ipc_child(void *obj)
+int server_ipc_child(void *obj _U_)
{
/* close input */
close(pipe_fd[0]);
}
/* ----------------- */
-int server_ipc_parent(void *obj)
+int server_ipc_parent(void *obj _U_)
{
return pipe_fd[0];
}