Robert P. Day removed 8 gazillion occurrences of "extern" on function

definitions.  (That should only be on prototypes.)
This commit is contained in:
Rob Landley
2006-03-06 20:47:33 +00:00
parent 1f5e25bf3e
commit dfba741457
168 changed files with 199 additions and 199 deletions

View File

@@ -28,7 +28,7 @@
#include <string.h>
#include "busybox.h"
extern int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv)
{
#ifndef CONFIG_FEATURE_FANCY_ECHO
#define eflag '\\'

View File

@@ -28,7 +28,7 @@
#include <string.h>
#include "libbb.h"
extern char *concat_path_file(const char *path, const char *filename)
char *concat_path_file(const char *path, const char *filename)
{
char *lc;

View File

@@ -28,7 +28,7 @@
#include "libbb.h"
extern char *concat_subpath_file(const char *path, const char *f)
char *concat_subpath_file(const char *path, const char *f)
{
if(f && *f == '.' && (!f[1] || (f[1] == '.' && !f[2])))
return NULL;

View File

@@ -62,7 +62,7 @@ out:
}
extern int bb_copyfd_size(int fd1, int fd2, const off_t size)
int bb_copyfd_size(int fd1, int fd2, const off_t size)
{
if (size) {
return(bb_full_fd_action(fd1, fd2, size));
@@ -70,7 +70,7 @@ extern int bb_copyfd_size(int fd1, int fd2, const off_t size)
return(0);
}
extern int bb_copyfd_eof(int fd1, int fd2)
int bb_copyfd_eof(int fd1, int fd2)
{
return(bb_full_fd_action(fd1, fd2, 0));
}

View File

@@ -25,7 +25,7 @@
/* try to open up the specified device */
extern int device_open(const char *device, int mode)
int device_open(const char *device, int mode)
{
int m, f, fd = -1;

View File

@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "libbb.h"
extern void bb_error_msg(const char *s, ...)
void bb_error_msg(const char *s, ...)
{
va_list p;

View File

@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "libbb.h"
extern void bb_error_msg_and_die(const char *s, ...)
void bb_error_msg_and_die(const char *s, ...)
{
va_list p;

View File

@@ -32,7 +32,7 @@
* Given any other file (or directory), find the mount table entry for its
* filesystem.
*/
extern struct mntent *find_mount_point(const char *name, const char *table)
struct mntent *find_mount_point(const char *name, const char *table)
{
struct stat s;
dev_t mountDevice;

View File

@@ -23,7 +23,7 @@
* Returns a list of all matching PIDs
* It is the caller's duty to free the returned pidlist.
*/
extern long* find_pid_by_name( const char* pidName)
long* find_pid_by_name( const char* pidName)
{
long* pidList;
int i=0;
@@ -42,7 +42,7 @@ extern long* find_pid_by_name( const char* pidName)
return pidList;
}
extern long *pidlist_reverse(long *pidList)
long *pidlist_reverse(long *pidList)
{
int i=0;
while (pidList[i] > 0 && ++i);

View File

@@ -26,7 +26,7 @@
#include <stdlib.h>
#include "libbb.h"
extern char *find_block_device(char *path)
char *find_block_device(char *path)
{
DIR *dir;
struct dirent *entry;

View File

@@ -45,14 +45,14 @@ char *bb_get_chunk_from_file(FILE *file, int *end)
}
/* Get line, including trailing /n if any */
extern char *bb_get_line_from_file(FILE *file)
char *bb_get_line_from_file(FILE *file)
{
int i;
return bb_get_chunk_from_file(file, &i);
}
/* Get line. Remove trailing /n */
extern char *bb_get_chomped_line_from_file(FILE *file)
char *bb_get_chomped_line_from_file(FILE *file)
{
int i;
char *c=bb_get_chunk_from_file(file, &i);

View File

@@ -24,7 +24,7 @@
#include "libbb.h"
extern void bb_herror_msg(const char *s, ...)
void bb_herror_msg(const char *s, ...)
{
va_list p;

View File

@@ -24,7 +24,7 @@
#include "libbb.h"
extern void bb_herror_msg_and_die(const char *s, ...)
void bb_herror_msg_and_die(const char *s, ...)
{
va_list p;

View File

@@ -30,7 +30,7 @@
* so, for example, to check if the kernel is greater than 2.2.11:
* if (get_kernel_revision() <= 2*65536+2*256+11) { <stuff> }
*/
extern int get_kernel_revision(void)
int get_kernel_revision(void)
{
struct utsname name;
char *s;

View File

@@ -13,7 +13,7 @@
#ifdef L_llist_add_to
/* Add data to the start of the linked list. */
extern llist_t *llist_add_to(llist_t *old_head, char *new_item)
llist_t *llist_add_to(llist_t *old_head, char *new_item)
{
llist_t *new_head;
@@ -27,7 +27,7 @@ extern llist_t *llist_add_to(llist_t *old_head, char *new_item)
#ifdef L_llist_add_to_end
/* Add data to the end of the linked list. */
extern llist_t *llist_add_to_end(llist_t *list_head, char *data)
llist_t *llist_add_to_end(llist_t *list_head, char *data)
{
llist_t *new_item;
@@ -50,7 +50,7 @@ extern llist_t *llist_add_to_end(llist_t *list_head, char *data)
#ifdef L_llist_free_one
/* Free the current list element and advance to the next entry in the list.
* Returns a pointer to the next element. */
extern llist_t *llist_free_one(llist_t *elm)
llist_t *llist_free_one(llist_t *elm)
{
llist_t *next = elm ? elm->link : NULL;
#if ENABLE_DMALLOC /* avoid warnings from dmalloc's error-free-null option */
@@ -64,7 +64,7 @@ extern llist_t *llist_free_one(llist_t *elm)
#ifdef L_llist_free
/* Recursively free all elements in the linked list. */
extern void llist_free(llist_t *elm)
void llist_free(llist_t *elm)
{
while ((elm = llist_free_one(elm)));
}

View File

@@ -244,7 +244,7 @@ obscure_msg(const char *old, const char *newval, const struct passwd *pwdp)
* check passwords.
*/
extern int obscure(const char *old, const char *newval, const struct passwd *pwdp)
int obscure(const char *old, const char *newval, const struct passwd *pwdp)
{
const char *msg = obscure_msg(old, newval, pwdp);

View File

@@ -29,7 +29,7 @@
#define FILEMODEBITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
extern int bb_parse_mode(const char *s, mode_t *current_mode)
int bb_parse_mode(const char *s, mode_t *current_mode)
{
static const mode_t who_mask[] = {
S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */

View File

@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "libbb.h"
extern void bb_perror_msg(const char *s, ...)
void bb_perror_msg(const char *s, ...)
{
va_list p;

View File

@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "libbb.h"
extern void bb_perror_msg_and_die(const char *s, ...)
void bb_perror_msg_and_die(const char *s, ...)
{
va_list p;

View File

@@ -23,7 +23,7 @@
#include <stddef.h>
#include <libbb.h>
extern void bb_perror_nomsg(void)
void bb_perror_nomsg(void)
{
/* Ignore the gcc warning about a null format string. */
bb_perror_msg(NULL);

View File

@@ -23,7 +23,7 @@
#include <stddef.h>
#include "libbb.h"
extern void bb_perror_nomsg_and_die(void)
void bb_perror_nomsg_and_die(void)
{
/* Ignore the gcc warning about a null format string. */
bb_perror_msg_and_die(NULL);

View File

@@ -24,7 +24,7 @@
#include <unistd.h>
#include "libbb.h"
extern void bb_xprint_and_close_file(FILE *file)
void bb_xprint_and_close_file(FILE *file)
{
bb_xfflush_stdout();
/* Note: Do not use STDOUT_FILENO here, as this is a lib routine
@@ -45,7 +45,7 @@ extern void bb_xprint_and_close_file(FILE *file)
* exits with default error code if an error occurs
*/
extern int bb_xprint_file_by_name(const char *filename)
int bb_xprint_file_by_name(const char *filename)
{
FILE *f;

View File

@@ -145,7 +145,7 @@ extern int bb_vfprintf(FILE * __restrict stream,
#endif
#ifdef L_bb_vprintf
extern int bb_vprintf(const char * __restrict format, va_list arg)
int bb_vprintf(const char * __restrict format, va_list arg)
{
return bb_vfprintf(stdout, format, arg);
}
@@ -167,7 +167,7 @@ extern int bb_fprintf(FILE * __restrict stream,
#endif
#ifdef L_bb_printf
extern int bb_printf(const char * __restrict format, ...)
int bb_printf(const char * __restrict format, ...)
{
va_list arg;
int rv;

View File

@@ -34,7 +34,7 @@ static int read_to_buf(const char *filename, void *buf)
}
extern procps_status_t * procps_scan(int save_user_arg0)
procps_status_t * procps_scan(int save_user_arg0)
{
static DIR *dir;
struct dirent *entry;

View File

@@ -25,7 +25,7 @@
#include "libbb.h"
extern char *pw_encrypt(const char *clear, const char *salt)
char *pw_encrypt(const char *clear, const char *salt)
{
static char cipher[128];
char *cp;

View File

@@ -30,7 +30,7 @@
#include <getopt.h>
#include "libbb.h"
extern int remove_file(const char *path, int flags)
int remove_file(const char *path, int flags)
{
struct stat path_stat;
int path_exists = 1;

View File

@@ -47,7 +47,7 @@ static int valid_name(const struct dirent *d)
* test_mode = 2 means to fail silently on missing directories
*/
extern int run_parts(char **args, const unsigned char test_mode, char **env)
int run_parts(char **args, const unsigned char test_mode, char **env)
{
struct dirent **namelist = 0;
struct stat st;

View File

@@ -25,7 +25,7 @@
/* Like strncpy but make sure the resulting string is always 0 terminated. */
extern char * safe_strncpy(char *dst, const char *src, size_t size)
char * safe_strncpy(char *dst, const char *src, size_t size)
{
dst[size-1] = '\0';
return strncpy(dst, src, size-1);

View File

@@ -23,7 +23,7 @@
#include <ctype.h>
#include "libbb.h"
extern const char *bb_skip_whitespace(const char *s)
const char *bb_skip_whitespace(const char *s)
{
while (isspace(*s)) {
++s;

View File

@@ -26,7 +26,7 @@
#if (__GLIBC__ < 2)
extern int vdprintf(int d, const char *format, va_list ap)
int vdprintf(int d, const char *format, va_list ap)
{
char buf[BUF_SIZE];
int len;

View File

@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "libbb.h"
extern void bb_verror_msg(const char *s, va_list p)
void bb_verror_msg(const char *s, va_list p)
{
fflush(stdout);
fprintf(stderr, "%s: ", bb_applet_name);

View File

@@ -26,7 +26,7 @@
#include "libbb.h"
extern void bb_vherror_msg(const char *s, va_list p)
void bb_vherror_msg(const char *s, va_list p)
{
if(s == 0)
s = "";

View File

@@ -25,7 +25,7 @@
#include <stdlib.h>
#include "libbb.h"
extern void bb_vperror_msg(const char *s, va_list p)
void bb_vperror_msg(const char *s, va_list p)
{
int err=errno;
if(s == 0) s = "";

View File

@@ -22,7 +22,7 @@
#include <libbb.h>
extern void bb_warn_ignoring_args(int n)
void bb_warn_ignoring_args(int n)
{
if (n) {
bb_perror_msg("ignoring all arguments");

View File

@@ -26,7 +26,7 @@
#ifndef DMALLOC
#ifdef L_xmalloc
extern void *xmalloc(size_t size)
void *xmalloc(size_t size)
{
void *ptr = malloc(size);
if (ptr == NULL && size != 0)
@@ -36,7 +36,7 @@ extern void *xmalloc(size_t size)
#endif
#ifdef L_xrealloc
extern void *xrealloc(void *ptr, size_t size)
void *xrealloc(void *ptr, size_t size)
{
ptr = realloc(ptr, size);
if (ptr == NULL && size != 0)
@@ -46,7 +46,7 @@ extern void *xrealloc(void *ptr, size_t size)
#endif
#ifdef L_xcalloc
extern void *xcalloc(size_t nmemb, size_t size)
void *xcalloc(size_t nmemb, size_t size)
{
void *ptr = calloc(nmemb, size);
if (ptr == NULL && nmemb != 0 && size != 0)
@@ -96,7 +96,7 @@ FILE *bb_xfopen(const char *path, const char *mode)
#endif
#ifdef L_xopen
extern int bb_xopen(const char *pathname, int flags)
int bb_xopen(const char *pathname, int flags)
{
int ret;
@@ -109,7 +109,7 @@ extern int bb_xopen(const char *pathname, int flags)
#endif
#ifdef L_xread
extern ssize_t bb_xread(int fd, void *buf, size_t count)
ssize_t bb_xread(int fd, void *buf, size_t count)
{
ssize_t size;
@@ -122,7 +122,7 @@ extern ssize_t bb_xread(int fd, void *buf, size_t count)
#endif
#ifdef L_xread_all
extern void bb_xread_all(int fd, void *buf, size_t count)
void bb_xread_all(int fd, void *buf, size_t count)
{
ssize_t size;
@@ -138,7 +138,7 @@ extern void bb_xread_all(int fd, void *buf, size_t count)
#endif
#ifdef L_xread_char
extern unsigned char bb_xread_char(int fd)
unsigned char bb_xread_char(int fd)
{
char tmp;
@@ -149,7 +149,7 @@ extern unsigned char bb_xread_char(int fd)
#endif
#ifdef L_xferror
extern void bb_xferror(FILE *fp, const char *fn)
void bb_xferror(FILE *fp, const char *fn)
{
if (ferror(fp)) {
bb_error_msg_and_die("%s", fn);
@@ -158,14 +158,14 @@ extern void bb_xferror(FILE *fp, const char *fn)
#endif
#ifdef L_xferror_stdout
extern void bb_xferror_stdout(void)
void bb_xferror_stdout(void)
{
bb_xferror(stdout, bb_msg_standard_output);
}
#endif
#ifdef L_xfflush_stdout
extern void bb_xfflush_stdout(void)
void bb_xfflush_stdout(void)
{
if (fflush(stdout)) {
bb_perror_msg_and_die(bb_msg_standard_output);

View File

@@ -13,7 +13,7 @@
#include "busybox.h"
extern long bb_xgetlarg(const char *arg, int base, long lower, long upper)
long bb_xgetlarg(const char *arg, int base, long lower, long upper)
{
long result;
char *endptr;

View File

@@ -13,7 +13,7 @@
#include <unistd.h>
#include "libbb.h"
extern char *xreadlink(const char *path)
char *xreadlink(const char *path)
{
static const int GROWBY = 80; /* how large we will grow strings by */