mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-05-13 07:03:33 +00:00
Remove K&R cruft.
This commit is contained in:
@@ -32,9 +32,7 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
@@ -47,7 +45,7 @@
|
||||
|
||||
#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
|
||||
|
||||
static int readname ();
|
||||
static int readname (char **, int *, FILE *);
|
||||
|
||||
#if ! defined ADDITIONAL_DEFAULT_SHELLS && defined __MSDOS__
|
||||
# define ADDITIONAL_DEFAULT_SHELLS \
|
||||
@@ -82,7 +80,7 @@ static int line_size = 0;
|
||||
Return NULL if there are no more entries. */
|
||||
|
||||
char *
|
||||
getusershell ()
|
||||
getusershell (void)
|
||||
{
|
||||
if (default_index > 0)
|
||||
{
|
||||
@@ -114,7 +112,7 @@ getusershell ()
|
||||
/* Rewind the shells file. */
|
||||
|
||||
void
|
||||
setusershell ()
|
||||
setusershell (void)
|
||||
{
|
||||
default_index = 0;
|
||||
if (shellstream)
|
||||
@@ -124,7 +122,7 @@ setusershell ()
|
||||
/* Close the shells file. */
|
||||
|
||||
void
|
||||
endusershell ()
|
||||
endusershell (void)
|
||||
{
|
||||
if (shellstream)
|
||||
{
|
||||
@@ -142,10 +140,7 @@ endusershell ()
|
||||
if some nonempty sequence was found, otherwise 0. */
|
||||
|
||||
static int
|
||||
readname (name, size, stream)
|
||||
char **name;
|
||||
int *size;
|
||||
FILE *stream;
|
||||
readname (char **name, int *size, FILE *stream)
|
||||
{
|
||||
int c;
|
||||
int name_index = 0;
|
||||
@@ -175,7 +170,8 @@ readname (name, size, stream)
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
main ()
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
char *s;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# getusershell.m4 serial 1
|
||||
dnl Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
# getusershell.m4 serial 2
|
||||
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
@@ -17,7 +17,6 @@ AC_DEFUN([gl_FUNC_GETUSERSHELL],
|
||||
# Prerequisites of lib/getusershell.c.
|
||||
AC_DEFUN([gl_PREREQ_GETUSERSHELL], [
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_CHECK_HEADERS_ONCE(stdlib.h)
|
||||
AC_CHECK_FUNCS_ONCE(isascii)
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user