mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtlogin: Change to ANSI function definitions
This commit is contained in:
parent
806257b154
commit
2d60124e03
10 changed files with 45 additions and 79 deletions
|
@ -697,9 +697,7 @@ checkEntry (Xauth *auth)
|
|||
static int doWrite;
|
||||
|
||||
static
|
||||
writeAuth (file, auth)
|
||||
FILE *file;
|
||||
Xauth *auth;
|
||||
writeAuth (FILE *file, Xauth *auth)
|
||||
{
|
||||
if (debugLevel >= 15) { /* normally too verbose */
|
||||
Debug ("writeAuth: doWrite = %d\n", doWrite);
|
||||
|
@ -864,10 +862,7 @@ DefineSelf (int fd, FILE *file, Xauth *auth)
|
|||
* for this fd and add them to the selfhosts list.
|
||||
*/
|
||||
static void
|
||||
DefineSelf (fd, file, auth)
|
||||
int fd;
|
||||
FILE *file;
|
||||
Xauth *auth;
|
||||
DefineSelf (int fd, FILE *file, Xauth *auth)
|
||||
{
|
||||
char buf[2048];
|
||||
struct ifconf ifc;
|
||||
|
@ -940,8 +935,7 @@ DefineSelf (fd, file, auth)
|
|||
* for this fd and add them to the selfhosts list.
|
||||
*/
|
||||
static void
|
||||
DefineSelf (fd, file, auth)
|
||||
int fd;
|
||||
DefineSelf (int fd, int file, int auth)
|
||||
{
|
||||
register int n;
|
||||
int len;
|
||||
|
@ -984,9 +978,7 @@ DefineSelf (fd, file, auth)
|
|||
|
||||
|
||||
static void
|
||||
setAuthNumber (auth, name)
|
||||
Xauth *auth;
|
||||
char *name;
|
||||
setAuthNumber (Xauth *auth, char *name)
|
||||
{
|
||||
char *colon;
|
||||
char *dot, *number;
|
||||
|
|
|
@ -1287,7 +1287,8 @@ CloseOnFork( void )
|
|||
}
|
||||
#endif
|
||||
|
||||
CloseOnFork ()
|
||||
int
|
||||
CloseOnFork (void)
|
||||
{
|
||||
int fd;
|
||||
|
||||
|
@ -1296,6 +1297,8 @@ CloseOnFork ()
|
|||
close (fd);
|
||||
FD_ZERO (&CloseMask);
|
||||
max = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pidFd;
|
||||
|
|
|
@ -92,13 +92,11 @@ from the X Consortium.
|
|||
static char auth_name[256];
|
||||
static int auth_name_len;
|
||||
|
||||
int MitInitAuth (name_len, name)
|
||||
#if NeedWidePrototypes
|
||||
unsigned int name_len;
|
||||
int MitInitAuth (unsigned int name_len, char *name)
|
||||
#else
|
||||
unsigned short name_len;
|
||||
int MitInitAuth (unsigned short name_len, char *name)
|
||||
#endif /* NeedWidePrototypes */
|
||||
char *name;
|
||||
{
|
||||
if (name_len > 256)
|
||||
name_len = 256;
|
||||
|
@ -107,14 +105,13 @@ int MitInitAuth (name_len, name)
|
|||
return(0);
|
||||
}
|
||||
|
||||
Xauth *
|
||||
MitGetAuth (namelen, name)
|
||||
#if NeedWidePrototypes
|
||||
unsigned int namelen;
|
||||
Xauth *
|
||||
MitGetAuth (unsigned int namelen, char *name)
|
||||
#else
|
||||
unsigned short namelen;
|
||||
Xauth *
|
||||
MitGetAuth (unsigned short namelen, char *name)
|
||||
#endif /* NeedWidePrototypes */
|
||||
char *name;
|
||||
{
|
||||
Xauth *new;
|
||||
new = (Xauth *) malloc (sizeof (Xauth));
|
||||
|
|
|
@ -96,8 +96,7 @@ from the X Consortium.
|
|||
/* given an XdmcpNetaddr, returns the socket protocol family used,
|
||||
e.g., AF_INET */
|
||||
|
||||
int NetaddrFamily(netaddrp)
|
||||
XdmcpNetaddr netaddrp;
|
||||
int NetaddrFamily(XdmcpNetaddr netaddrp)
|
||||
{
|
||||
#ifdef STREAMSCONN
|
||||
short family = *(short *)netaddrp;
|
||||
|
@ -112,9 +111,7 @@ int NetaddrFamily(netaddrp)
|
|||
and sets *lenp to the length of the address
|
||||
or 0 if not using TCP or UDP. */
|
||||
|
||||
char * NetaddrPort(netaddrp, lenp)
|
||||
XdmcpNetaddr netaddrp;
|
||||
int *lenp; /* return */
|
||||
char * NetaddrPort(XdmcpNetaddr netaddrp, int *lenp)
|
||||
{
|
||||
#ifdef STREAMSCONN
|
||||
*lenp = 2;
|
||||
|
@ -136,9 +133,7 @@ char * NetaddrPort(netaddrp, lenp)
|
|||
/* given an XdmcpNetaddr, returns a pointer to the network address
|
||||
and sets *lenp to the length of the address */
|
||||
|
||||
char * NetaddrAddress(netaddrp, lenp)
|
||||
XdmcpNetaddr netaddrp;
|
||||
int *lenp; /* return */
|
||||
char * NetaddrAddress(XdmcpNetaddr netaddrp, int *lenp)
|
||||
{
|
||||
#ifdef STREAMSCONN
|
||||
*lenp = 4;
|
||||
|
@ -175,10 +170,7 @@ char * NetaddrAddress(netaddrp, lenp)
|
|||
sets *len to the number of bytes in addr.
|
||||
Returns the X protocol family used, e.g., FamilyInternet */
|
||||
|
||||
int ConvertAddr (saddr, len, addr)
|
||||
XdmcpNetaddr saddr;
|
||||
int *len; /* return */
|
||||
char **addr; /* return */
|
||||
int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr)
|
||||
{
|
||||
int retval;
|
||||
|
||||
|
@ -229,9 +221,7 @@ int ConvertAddr (saddr, len, addr)
|
|||
return retval;
|
||||
}
|
||||
|
||||
addressEqual (a1, len1, a2, len2)
|
||||
XdmcpNetaddr a1, a2;
|
||||
int len1, len2;
|
||||
addressEqual (XdmcpNetaddr a1, int len1, XdmcpNetaddr a2, int len2)
|
||||
{
|
||||
int partlen1, partlen2;
|
||||
char *part1, *part2;
|
||||
|
@ -261,9 +251,7 @@ addressEqual (a1, len1, a2, len2)
|
|||
|
||||
#ifdef DEBUG
|
||||
/*ARGSUSED*/
|
||||
PrintSockAddr (a, len) /* Debugging routine */
|
||||
struct sockaddr *a;
|
||||
int len;
|
||||
PrintSockAddr (struct sockaddr *a, int len)
|
||||
{
|
||||
unsigned char *t, *p;
|
||||
|
||||
|
|
|
@ -257,12 +257,12 @@ catchAlrm( int arg )
|
|||
longjmp (pingTime, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
FileNameCompare (a, b)
|
||||
#if defined(__STDC__)
|
||||
const void *a, *b;
|
||||
static int
|
||||
FileNameCompare (const char *a, const char *b)
|
||||
#else
|
||||
char *a, *b;
|
||||
static int
|
||||
FileNameCompare (char *a, char *b)
|
||||
#endif
|
||||
{
|
||||
return strcoll (*(char **)a, *(char **)b);
|
||||
|
|
|
@ -105,7 +105,7 @@ extern int chooserFd;
|
|||
extern FD_TYPE WellKnownSocketsMask;
|
||||
extern int WellKnownSocketsMax;
|
||||
|
||||
CreateWellKnownSockets ()
|
||||
CreateWellKnownSockets (void)
|
||||
{
|
||||
struct sockaddr_in sock_addr;
|
||||
char *name, *localHostname();
|
||||
|
@ -154,9 +154,7 @@ CreateWellKnownSockets ()
|
|||
FD_SET (chooserFd, &WellKnownSocketsMask);
|
||||
}
|
||||
|
||||
GetChooserAddr (addr, lenp)
|
||||
char *addr;
|
||||
int *lenp;
|
||||
GetChooserAddr (char *addr, int *lenp)
|
||||
{
|
||||
struct sockaddr_in in_addr;
|
||||
int len;
|
||||
|
|
|
@ -980,7 +980,7 @@ static char localHostbuf[256];
|
|||
static int gotLocalHostname;
|
||||
|
||||
char *
|
||||
localHostname ()
|
||||
localHostname (void)
|
||||
{
|
||||
if (!gotLocalHostname)
|
||||
{
|
||||
|
|
|
@ -1676,7 +1676,7 @@ SetDefaultDt(Widget w)
|
|||
* the logo to display in logo_pixmap
|
||||
**************************************************************************/
|
||||
void
|
||||
SetDtLabelAndIcon()
|
||||
SetDtLabelAndIcon(void)
|
||||
{
|
||||
static XmString blanks = NULL;
|
||||
int i;
|
||||
|
|
|
@ -732,7 +732,7 @@ LogError( unsigned char *fmt, ...)
|
|||
***************************************************************************/
|
||||
|
||||
void
|
||||
CloseCatalog()
|
||||
CloseCatalog(void)
|
||||
{
|
||||
catclose(nl_fd);
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ CloseCatalog()
|
|||
***************************************************************************/
|
||||
|
||||
void
|
||||
OpenCatalog()
|
||||
OpenCatalog(void)
|
||||
{
|
||||
static int initialized = 0;
|
||||
char *nlspath, *newnlspath;
|
||||
|
|
|
@ -122,14 +122,13 @@ XdmPrintArray8Hex(const char *s, ARRAY8Ptr a)
|
|||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
XdmInitAuth (name_len, name)
|
||||
#if NeedWidePrototypes
|
||||
unsigned int name_len;
|
||||
void
|
||||
XdmInitAuth (unsigned int name_len, char *name)
|
||||
#else
|
||||
unsigned short name_len;
|
||||
void
|
||||
XdmInitAuth (unsigned short name_len, char *name)
|
||||
#endif /* NeedWidePrototypes */
|
||||
char *name;
|
||||
{
|
||||
if (name_len > 256)
|
||||
name_len = 256;
|
||||
|
@ -147,10 +146,7 @@ XdmInitAuth (name_len, name)
|
|||
*/
|
||||
|
||||
Xauth *
|
||||
XdmGetAuthHelper (namelen, name, includeRho)
|
||||
unsigned short namelen;
|
||||
char *name;
|
||||
int includeRho;
|
||||
XdmGetAuthHelper (unsigned short namelen, char *name, int includeRho)
|
||||
{
|
||||
Xauth *new;
|
||||
new = (Xauth *) malloc (sizeof (Xauth));
|
||||
|
@ -192,28 +188,24 @@ XdmGetAuthHelper (namelen, name, includeRho)
|
|||
return new;
|
||||
}
|
||||
|
||||
Xauth *
|
||||
XdmGetAuth (namelen, name)
|
||||
#if NeedWidePrototypes
|
||||
unsigned int namelen;
|
||||
Xauth *
|
||||
XdmGetAuth (unsigned int namelen, char *name)
|
||||
#else
|
||||
unsigned short namelen;
|
||||
Xauth *
|
||||
XdmGetAuth (unsigned short namelen, char *name)
|
||||
#endif /* NeedWidePrototypes */
|
||||
char *name;
|
||||
{
|
||||
return XdmGetAuthHelper (namelen, name, TRUE);
|
||||
}
|
||||
|
||||
#ifdef XDMCP
|
||||
|
||||
void XdmGetXdmcpAuth (pdpy,authorizationNameLen, authorizationName)
|
||||
struct protoDisplay *pdpy;
|
||||
#if NeedWidePrototypes
|
||||
unsigned int authorizationNameLen;
|
||||
void XdmGetXdmcpAuth (struct protoDisplay *pdpy, unsigned int authorizationNameLen, char *authorizationName)
|
||||
#else
|
||||
unsigned short authorizationNameLen;
|
||||
void XdmGetXdmcpAuth (struct protoDisplay *pdpy, unsigned short authorizationNameLen, char *authorizationName)
|
||||
#endif /* NeedWidePrototypes */
|
||||
char *authorizationName;
|
||||
{
|
||||
Xauth *fileauth, *xdmcpauth;
|
||||
|
||||
|
@ -264,8 +256,7 @@ void XdmGetXdmcpAuth (pdpy,authorizationNameLen, authorizationName)
|
|||
'A' <= c && c <= 'F' ? c - 'A' + 10 : -1)
|
||||
|
||||
static
|
||||
HexToBinary (key)
|
||||
char *key;
|
||||
HexToBinary (char *key)
|
||||
{
|
||||
char *out, *in;
|
||||
int top, bottom;
|
||||
|
@ -294,9 +285,7 @@ HexToBinary (key)
|
|||
* routine accepts either plain ascii strings for keys, or hex-encoded numbers
|
||||
*/
|
||||
|
||||
XdmGetKey (pdpy, displayID)
|
||||
struct protoDisplay *pdpy;
|
||||
ARRAY8Ptr displayID;
|
||||
XdmGetKey (struct protoDisplay *pdpy, ARRAY8Ptr displayID)
|
||||
{
|
||||
FILE *keys;
|
||||
char line[1024], id[1024], key[1024];
|
||||
|
@ -335,9 +324,8 @@ XdmGetKey (pdpy, displayID)
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
XdmCheckAuthentication (pdpy, displayID, authenticationName, authenticationData)
|
||||
struct protoDisplay *pdpy;
|
||||
ARRAY8Ptr displayID, authenticationName, authenticationData;
|
||||
XdmCheckAuthentication (struct protoDisplay *pdpy, ARRAY8Ptr displayID,
|
||||
ARRAY8Ptr authenticationName, ARRAY8Ptr authenticationData)
|
||||
{
|
||||
XdmAuthKeyPtr incoming;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue