mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-19 13:40:59 +08:00
Make local functions static.
This commit is contained in:
parent
784d802ea2
commit
de149cdbaf
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1993, 1997, 1998, 2000 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
|
||||
@ -23,7 +23,7 @@
|
||||
#include <dirent.h>
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
test (const char *name)
|
||||
{
|
||||
DIR *dirp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -84,7 +84,7 @@ do_test (int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
do_cleanup (void)
|
||||
{
|
||||
remove (tmpname);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void *
|
||||
static void *
|
||||
sub1 (void *arg)
|
||||
{
|
||||
/* Nothing. */
|
||||
|
@ -86,7 +86,7 @@ static testcase fcvt_tests[] =
|
||||
{ -1.0, 0, 0, "" }
|
||||
};
|
||||
|
||||
void
|
||||
static void
|
||||
output_error (const char *name, double value, int ndigit,
|
||||
const char *exp_p, int exp_decpt, int exp_sign,
|
||||
char *res_p, int res_decpt, int res_sign)
|
||||
@ -101,7 +101,7 @@ output_error (const char *name, double value, int ndigit,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
output_r_error (const char *name, double value, int ndigit,
|
||||
const char *exp_p, int exp_decpt, int exp_sign, int exp_return,
|
||||
char *res_p, int res_decpt, int res_sign, int res_return)
|
||||
@ -115,7 +115,7 @@ output_r_error (const char *name, double value, int ndigit,
|
||||
++error_count;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test (testcase tests[], efcvt_func efcvt, const char *name)
|
||||
{
|
||||
int no = 0;
|
||||
@ -136,7 +136,7 @@ test (testcase tests[], efcvt_func efcvt, const char *name)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test_r (testcase tests[], efcvt_r_func efcvt_r, const char *name)
|
||||
{
|
||||
int no = 0;
|
||||
@ -160,7 +160,7 @@ test_r (testcase tests[], efcvt_r_func efcvt_r, const char *name)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
special (void)
|
||||
{
|
||||
int decpt, sign, res;
|
||||
|
@ -48,7 +48,7 @@ static const struct a_test the_tests[] =
|
||||
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
run_a_test (int id, const struct a_test * t)
|
||||
{
|
||||
static const char * last_pattern = 0;
|
||||
|
@ -36,7 +36,7 @@
|
||||
goto fail; \
|
||||
} while (0)
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (int argc, char *argv[])
|
||||
{
|
||||
const char *builddir;
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
const int family[3] = { AF_INET, AF_INET6, AF_UNIX };
|
||||
|
@ -208,7 +208,7 @@ struct test_case_struct
|
||||
static int testit (struct test_case_struct *tc);
|
||||
static int tests;
|
||||
|
||||
void
|
||||
static void
|
||||
command_line_test (const char *words)
|
||||
{
|
||||
wordexp_t we;
|
||||
|
@ -27,14 +27,14 @@
|
||||
int flag;
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
thrfct (sigval_t arg)
|
||||
{
|
||||
flag = 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (int argc, char *argv[])
|
||||
{
|
||||
char name[] = "/tmp/aio2.XXXXXX";
|
||||
|
@ -26,14 +26,14 @@
|
||||
int flag;
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
thrfct (sigval_t arg)
|
||||
{
|
||||
flag = 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (int argc, char *argv[])
|
||||
{
|
||||
char name[] = "/tmp/aio3.XXXXXX";
|
||||
@ -74,7 +74,7 @@ do_test (int argc, char *argv[])
|
||||
printf ("aio_suspend failed: %m\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (flag != 0)
|
||||
{
|
||||
puts ("thread created, should not have happened");
|
||||
|
@ -31,13 +31,13 @@
|
||||
volatile sig_atomic_t flag;
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
sighandler (const int signo)
|
||||
{
|
||||
flag = signo;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
wait_flag (void)
|
||||
{
|
||||
while (flag == 0)
|
||||
@ -56,7 +56,7 @@ wait_flag (void)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (int argc, char *argv[])
|
||||
{
|
||||
char name[] = "/tmp/aio4.XXXXXX";
|
||||
|
@ -31,13 +31,13 @@
|
||||
volatile sig_atomic_t flag;
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
callback (sigval_t s)
|
||||
{
|
||||
flag = s.sival_int;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
wait_flag (void)
|
||||
{
|
||||
while (flag == 0)
|
||||
@ -56,7 +56,7 @@ wait_flag (void)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (int argc, char *argv[])
|
||||
{
|
||||
char name[] = "/tmp/aio5.XXXXXX";
|
||||
|
@ -28,7 +28,7 @@
|
||||
/* We expect to run at least 10 seconds. */
|
||||
#define TIMEOUT 15
|
||||
|
||||
int
|
||||
static int
|
||||
clock_test (clockid_t cl)
|
||||
{
|
||||
struct timespec old_ts;
|
||||
@ -101,7 +101,7 @@ clock_test (clockid_t cl)
|
||||
return result;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
clockid_t cl;
|
||||
|
@ -122,7 +122,7 @@ worker (int write_now)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
int fd;
|
||||
|
@ -4,13 +4,13 @@
|
||||
#include <setjmp.h>
|
||||
#include <alloca.h>
|
||||
|
||||
void
|
||||
static void
|
||||
sub5 (jmp_buf buf)
|
||||
{
|
||||
longjmp (buf, 1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
test (int x)
|
||||
{
|
||||
jmp_buf buf;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1997, 1998, 2000 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
|
||||
@ -23,7 +23,7 @@
|
||||
static jmp_buf env;
|
||||
static int last_value = -1, lose = 0;
|
||||
|
||||
void
|
||||
static void
|
||||
jump (int val)
|
||||
{
|
||||
longjmp (env, val);
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
int win = 0;
|
||||
|
||||
void
|
||||
static void
|
||||
handler (int sig)
|
||||
{
|
||||
printf ("Received signal %d (%s).\n", sig, strsignal(sig));
|
||||
|
@ -4023,7 +4023,8 @@ sprint_double_type sprint_doubles[] =
|
||||
int required_precision = 13;
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
int matches(register char *result, register const char *desired)
|
||||
static int
|
||||
matches (register char *result, register const char *desired)
|
||||
#else
|
||||
int matches(result, desired)
|
||||
register char *result; register const char *desired;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define MAX_STRINGS 256
|
||||
#define MAX_LINE_SIZE 32
|
||||
|
||||
int
|
||||
static int
|
||||
compare (const void *p1, const void *p2)
|
||||
{
|
||||
return strverscmp (*((char **) p1), *((char **) p2));
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
volatile int gotit = 0;
|
||||
|
||||
void
|
||||
static void
|
||||
alarm_handler (int signal)
|
||||
{
|
||||
gotit = 1;
|
||||
|
@ -35,7 +35,7 @@ static const struct
|
||||
{"16:30:46 2000-2-29", 0, {46, 30,16, 29, 1, 100, 0, 0, 0}}
|
||||
};
|
||||
|
||||
void
|
||||
static void
|
||||
report_date_error (int err)
|
||||
{
|
||||
switch(err)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
|
||||
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
|
||||
|
||||
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
|
||||
@ -52,7 +52,7 @@ static const struct test_times tests[] =
|
||||
/* This string will be used for `putenv' calls. */
|
||||
char envstring[100];
|
||||
|
||||
void
|
||||
static void
|
||||
print_tzvars (void)
|
||||
{
|
||||
printf ("tzname[0]: %s\n", tzname[0]);
|
||||
@ -62,7 +62,7 @@ print_tzvars (void)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
check_tzvars (const char *name, int dayl, int timez, const char *const tznam[])
|
||||
{
|
||||
int i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user