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
|
||||
|
|
@ -41,55 +42,56 @@ Cambridge, MA 02139, USA. */
|
|||
|
||||
/* Structure giving information about numeric and monetary notation. */
|
||||
struct lconv
|
||||
{
|
||||
/* Numeric (non-monetary) information. */
|
||||
{
|
||||
/* Numeric (non-monetary) information. */
|
||||
|
||||
char *decimal_point; /* Decimal point character. */
|
||||
char *thousands_sep; /* Thousands separator. */
|
||||
/* Each element is the number of digits in each group;
|
||||
elements with higher indices are farther left.
|
||||
An element with value CHAR_MAX means that no further grouping is done.
|
||||
An element with value 0 means that the previous element is used
|
||||
for all groups farther left. */
|
||||
char *grouping;
|
||||
char *decimal_point; /* Decimal point character. */
|
||||
char *thousands_sep; /* Thousands separator. */
|
||||
/* Each element is the number of digits in each group;
|
||||
elements with higher indices are farther left.
|
||||
An element with value CHAR_MAX means that no further grouping is done.
|
||||
An element with value 0 means that the previous element is used
|
||||
for all groups farther left. */
|
||||
char *grouping;
|
||||
|
||||
/* Monetary information. */
|
||||
/* Monetary information. */
|
||||
|
||||
/* First three chars are a currency symbol from ISO 4217.
|
||||
Fourth char is the separator. Fifth char is '\0'. */
|
||||
char *int_curr_symbol;
|
||||
char *currency_symbol; /* Local currency symbol. */
|
||||
char *mon_decimal_point; /* Decimal point character. */
|
||||
char *mon_thousands_sep; /* Thousands separator. */
|
||||
char *mon_grouping; /* Like `grouping' element (above). */
|
||||
char *positive_sign; /* Sign for positive values. */
|
||||
char *negative_sign; /* Sign for negative values. */
|
||||
char int_frac_digits; /* Int'l fractional digits. */
|
||||
char frac_digits; /* Local fractional digits. */
|
||||
/* 1 if currency_symbol precedes a positive value, 0 if succeeds. */
|
||||
char p_cs_precedes;
|
||||
/* 1 iff a space separates currency_symbol from a positive value. */
|
||||
char p_sep_by_space;
|
||||
/* 1 if currency_symbol precedes a negative value, 0 if succeeds. */
|
||||
char n_cs_precedes;
|
||||
/* 1 iff a space separates currency_symbol from a negative value. */
|
||||
char n_sep_by_space;
|
||||
/* Positive and negative sign positions:
|
||||
0 Parentheses surround the quantity and currency_symbol.
|
||||
1 The sign string precedes the quantity and currency_symbol.
|
||||
2 The sign string succedes the quantity and currency_symbol.
|
||||
3 The sign string immediately precedes the currency_symbol.
|
||||
4 The sign string immediately succedes the currency_symbol. */
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
/* First three chars are a currency symbol from ISO 4217.
|
||||
Fourth char is the separator. Fifth char is '\0'. */
|
||||
char *int_curr_symbol;
|
||||
char *currency_symbol; /* Local currency symbol. */
|
||||
char *mon_decimal_point; /* Decimal point character. */
|
||||
char *mon_thousands_sep; /* Thousands separator. */
|
||||
char *mon_grouping; /* Like `grouping' element (above). */
|
||||
char *positive_sign; /* Sign for positive values. */
|
||||
char *negative_sign; /* Sign for negative values. */
|
||||
char int_frac_digits; /* Int'l fractional digits. */
|
||||
char frac_digits; /* Local fractional digits. */
|
||||
/* 1 if currency_symbol precedes a positive value, 0 if succeeds. */
|
||||
char p_cs_precedes;
|
||||
/* 1 iff a space separates currency_symbol from a positive value. */
|
||||
char p_sep_by_space;
|
||||
/* 1 if currency_symbol precedes a negative value, 0 if succeeds. */
|
||||
char n_cs_precedes;
|
||||
/* 1 iff a space separates currency_symbol from a negative value. */
|
||||
char n_sep_by_space;
|
||||
/* Positive and negative sign positions:
|
||||
0 Parentheses surround the quantity and currency_symbol.
|
||||
1 The sign string precedes the quantity and currency_symbol.
|
||||
2 The sign string succedes the quantity and currency_symbol.
|
||||
3 The sign string immediately precedes the currency_symbol.
|
||||
4 The sign string immediately succedes the currency_symbol. */
|
||||
char p_sign_posn;
|
||||
char n_sign_posn;
|
||||
};
|
||||
|
||||
|
||||
/* 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 */
|
||||
#endif /* locale.h */
|
||||
|
|
|
|||
26
misc/nlist.h
26
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,16 +21,18 @@ Cambridge, MA 02139, USA. */
|
|||
#define _NLIST_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Structure describing a symbol-table entry. */
|
||||
struct nlist
|
||||
{
|
||||
char *n_name;
|
||||
unsigned char n_type;
|
||||
char n_other;
|
||||
short int n_desc;
|
||||
unsigned long int n_value;
|
||||
};
|
||||
{
|
||||
char *n_name;
|
||||
unsigned char n_type;
|
||||
char n_other;
|
||||
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));
|
||||
|
||||
|
||||
#endif /* nlist.h */
|
||||
__END_DECLS
|
||||
|
||||
#endif /* nlist.h */
|
||||
|
|
|
|||
13
misc/sgtty.h
13
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));
|
||||
|
||||
|
||||
#endif /* sgtty.h */
|
||||
__END_DECLS
|
||||
|
||||
#endif /* sgtty.h */
|
||||
|
|
|
|||
48
pwd/pwd.h
48
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,20 +25,22 @@ Cambridge, MA 02139, USA. */
|
|||
#define _PWD_H 1
|
||||
#include <features.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <gnu/types.h>
|
||||
|
||||
|
||||
/* The passwd structure. */
|
||||
struct passwd
|
||||
{
|
||||
char *pw_name; /* Username. */
|
||||
char *pw_passwd; /* Password. */
|
||||
__uid_t pw_uid; /* User ID. */
|
||||
__gid_t pw_gid; /* Group ID. */
|
||||
char *pw_gecos; /* Real name. */
|
||||
char *pw_dir; /* Home directory. */
|
||||
char *pw_shell; /* Shell program. */
|
||||
};
|
||||
{
|
||||
char *pw_name; /* Username. */
|
||||
char *pw_passwd; /* Password. */
|
||||
__uid_t pw_uid; /* User ID. */
|
||||
__gid_t pw_gid; /* Group ID. */
|
||||
char *pw_gecos; /* Real name. */
|
||||
char *pw_dir; /* Home directory. */
|
||||
char *pw_shell; /* Shell program. */
|
||||
};
|
||||
|
||||
|
||||
#if defined(__USE_SVID) || defined(__USE_GNU)
|
||||
|
|
@ -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));
|
||||
|
||||
|
||||
#endif /* pwd.h */
|
||||
__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,18 +23,22 @@ 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)
|
||||
#endif /* GCC. */
|
||||
#endif /* GCC. */
|
||||
|
||||
#define alloca(size) __alloca(size)
|
||||
|
||||
#endif /* alloca.h */
|
||||
__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