mirror of git://sourceware.org/git/glibc.git
entered into RCS
This commit is contained in:
parent
fec8bd1c27
commit
d5a139218a
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -13,7 +13,7 @@ Library General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
/*
|
||||
|
|
@ -25,6 +25,7 @@ Cambridge, MA 02139, USA. */
|
|||
#define _LOCALE_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* These are the possibilities for the first argument to setlocale.
|
||||
Note that although they are bit masks, they cannot be OR'd together
|
||||
|
|
@ -86,10 +87,11 @@ struct lconv
|
|||
|
||||
|
||||
/* Set and/or return the current locale. */
|
||||
extern char *EXFUN(setlocale, (int __category, CONST char *__locale));
|
||||
extern char *setlocale __P ((int __category, __const char *__locale));
|
||||
|
||||
/* Return the numeric/monetary information for the current locale. */
|
||||
extern struct lconv *EXFUN(localeconv, (NOARGS));
|
||||
extern struct lconv *localeconv __P ((void));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* locale.h */
|
||||
|
|
|
|||
10
misc/nlist.h
10
misc/nlist.h
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -13,7 +13,7 @@ Library General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef _NLIST_H
|
||||
|
|
@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */
|
|||
#define _NLIST_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Structure describing a symbol-table entry. */
|
||||
struct nlist
|
||||
|
|
@ -31,6 +32,7 @@ struct nlist
|
|||
short int n_desc;
|
||||
unsigned long int n_value;
|
||||
};
|
||||
|
||||
#define N_NLIST_DECLARED
|
||||
#include <a.out.h>
|
||||
|
||||
|
|
@ -38,7 +40,9 @@ struct nlist
|
|||
/* Search the executable FILE for symbols matching those in NL,
|
||||
which is terminated by an element with a NULL `n_un.n_name' member,
|
||||
and fill in the elements of NL. */
|
||||
extern int EXFUN(nlist, (CONST char *__file, struct nlist *__nl));
|
||||
extern int nlist __P ((__const char *__file, struct nlist * __nl));
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* nlist.h */
|
||||
|
|
|
|||
11
misc/sgtty.h
11
misc/sgtty.h
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -13,7 +13,7 @@ Library General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef _SGTTY_H
|
||||
|
|
@ -22,12 +22,15 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Fill in *PARAMS with terminal parameters associated with FD. */
|
||||
extern int EXFUN(gtty, (int __fd, struct sgttyb *__params));
|
||||
extern int gtty __P ((int __fd, struct sgttyb * __params));
|
||||
|
||||
/* Set the terminal parameters associated with FD to *PARAMS. */
|
||||
extern int EXFUN(stty, (int __fd, CONST struct sgttyb *__params));
|
||||
extern int stty __P ((int __fd, __const struct sgttyb * __params));
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* sgtty.h */
|
||||
|
|
|
|||
28
pwd/pwd.h
28
pwd/pwd.h
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
|
|
@ -13,7 +13,7 @@ Library General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
/*
|
||||
|
|
@ -25,6 +25,8 @@ Cambridge, MA 02139, USA. */
|
|||
#define _PWD_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <gnu/types.h>
|
||||
|
||||
|
||||
|
|
@ -48,41 +50,43 @@ struct passwd
|
|||
|
||||
#ifdef __USE_GNU
|
||||
/* Return a new stream open on the password file. */
|
||||
extern FILE *EXFUN(__pwdopen, (NOARGS));
|
||||
extern FILE *__pwdopen __P ((void));
|
||||
|
||||
/* Read a password entry from STREAM, filling in P.
|
||||
Return the `struct passwd' of P if successful, NULL on failure. */
|
||||
extern struct passwd *EXFUN(__pwdread, (FILE *__stream, PTR __p));
|
||||
extern struct passwd *__pwdread __P ((FILE * __stream, __ptr_t __p));
|
||||
|
||||
/* Return a chunk of memory containing pre-initialized data for __pwdread. */
|
||||
extern PTR EXFUN(__pwdalloc, (NOARGS));
|
||||
extern __ptr_t __pwdalloc __P ((void));
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__USE_SVID) || defined(__USE_MISC)
|
||||
/* Rewind the password-file stream. */
|
||||
extern void EXFUN(setpwent, (NOARGS));
|
||||
extern void setpwent __P ((void));
|
||||
|
||||
/* Close the password-file stream. */
|
||||
extern void EXFUN(endpwent, (NOARGS));
|
||||
extern void endpwent __P ((void));
|
||||
|
||||
/* Read an entry from the password-file stream, opening it if necessary. */
|
||||
extern struct passwd *EXFUN(getpwent, (NOARGS));
|
||||
extern struct passwd *getpwent __P ((void));
|
||||
#endif
|
||||
|
||||
#ifdef __USE_SVID
|
||||
/* Read an entry from STREAM. */
|
||||
extern struct passwd *EXFUN(fgetpwent, (FILE *__stream));
|
||||
extern struct passwd *fgetpwent __P ((FILE * __stream));
|
||||
|
||||
/* Write the given entry onto the given stream. */
|
||||
extern int EXFUN(putpwent, (CONST struct passwd *__p, FILE *__f));
|
||||
extern int putpwent __P ((__const struct passwd * __p, FILE * __f));
|
||||
#endif
|
||||
|
||||
/* Search for an entry with a matching user ID. */
|
||||
extern struct passwd *EXFUN(getpwuid, (__uid_t __uid));
|
||||
extern struct passwd *getpwuid __P ((__uid_t __uid));
|
||||
|
||||
/* Search for an entry with a matching username. */
|
||||
extern struct passwd *EXFUN(getpwnam, (CONST char *__name));
|
||||
extern struct passwd *getpwnam __P ((__const char *__name));
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* pwd.h */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Library General Public License for more details.
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef _ALLOCA_H
|
||||
|
|
@ -23,13 +23,15 @@ Cambridge, MA 02139, USA. */
|
|||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Remove any previous definitions. */
|
||||
#undef __alloca
|
||||
#undef alloca
|
||||
|
||||
/* Allocate a block that will be freed when the calling function exits. */
|
||||
extern PTR EXFUN(__alloca, (size_t __size));
|
||||
extern PTR EXFUN(alloca, (size_t __size));
|
||||
extern __ptr_t __alloca __P ((size_t __size));
|
||||
extern __ptr_t alloca __P ((size_t __size));
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define __alloca(size) __builtin_alloca(size)
|
||||
|
|
@ -37,4 +39,6 @@ extern PTR EXFUN(alloca, (size_t __size));
|
|||
|
||||
#define alloca(size) __alloca(size)
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* alloca.h */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
/* Copyright (C) 1992 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <ansidecl.h>
|
||||
#include <string.h>
|
||||
|
||||
PTR
|
||||
DEFUN(memfrob, (s, n),
|
||||
PTR s AND size_t n)
|
||||
{
|
||||
register char *p = (char *) s;
|
||||
|
||||
while (n-- > 0)
|
||||
*p++ ^= 42;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
@ -29,14 +29,14 @@ DEFUN(strfry, (string), char *string)
|
|||
|
||||
if (!init)
|
||||
{
|
||||
srandom (time ((time_t *) NULL));
|
||||
srand (time ((time_t *) NULL));
|
||||
init = 1;
|
||||
}
|
||||
|
||||
len = strlen (string);
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
size_t j = random () % len;
|
||||
size_t j = rand () % len;
|
||||
char c = string[i];
|
||||
string[i] = string[j];
|
||||
string[j] = c;
|
||||
|
|
|
|||
Loading…
Reference in New Issue