aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-10-24 05:00:29 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-10-24 05:00:29 +0000
commit1e2799601614452a40df7862e6ca180ecb08c04d (patch)
tree153a573095afac8d8d0ea857759ecabd77fb28b7 /libbb
parent47f91d1f7fc06cf27e2a6c3c2ada99226ba50cb9 (diff)
downloadbusybox-w32-1e2799601614452a40df7862e6ca180ecb08c04d.tar.gz
busybox-w32-1e2799601614452a40df7862e6ca180ecb08c04d.tar.bz2
busybox-w32-1e2799601614452a40df7862e6ca180ecb08c04d.zip
Major rework of the directory structure and the entire build system.
-Erik git-svn-id: svn://busybox.net/trunk/busybox@3561 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Makefile78
-rw-r--r--libbb/ask_confirmation.c16
-rw-r--r--libbb/chomp.c16
-rw-r--r--libbb/concat_path_file.c25
-rw-r--r--libbb/copy_file.c1
-rw-r--r--libbb/copy_file_chunk.c16
-rw-r--r--libbb/copyfd.c2
-rw-r--r--libbb/device_open.c8
-rw-r--r--libbb/error_msg.c8
-rw-r--r--libbb/error_msg_and_die.c8
-rw-r--r--libbb/fgets_str.c28
-rw-r--r--libbb/find_mount_point.c8
-rw-r--r--libbb/find_pid_by_name.c14
-rw-r--r--libbb/find_root_device.c6
-rw-r--r--libbb/full_read.c8
-rw-r--r--libbb/full_write.c8
-rw-r--r--libbb/get_console.c9
-rw-r--r--libbb/get_last_path_component.c8
-rw-r--r--libbb/get_line_from_file.c9
-rw-r--r--libbb/gz_open.c23
-rw-r--r--libbb/herror_msg.c8
-rw-r--r--libbb/herror_msg_and_die.c9
-rw-r--r--libbb/inode_hash.c16
-rw-r--r--libbb/interface.c25
-rw-r--r--libbb/isdirectory.c9
-rw-r--r--libbb/kernel_version.c8
-rw-r--r--libbb/libbb.h326
-rw-r--r--libbb/loop.c8
-rw-r--r--libbb/messages.c5
-rw-r--r--libbb/mode_string.c16
-rw-r--r--libbb/module_syscalls.c4
-rw-r--r--libbb/mtab.c20
-rw-r--r--libbb/mtab_file.c12
-rw-r--r--libbb/my_getgrgid.c12
-rw-r--r--libbb/my_getgrnam.c13
-rw-r--r--libbb/my_getpwnam.c13
-rw-r--r--libbb/my_getpwnamegid.c12
-rw-r--r--libbb/my_getpwuid.c12
-rw-r--r--libbb/parse_mode.c16
-rw-r--r--libbb/parse_number.c16
-rw-r--r--libbb/perror_msg.c8
-rw-r--r--libbb/perror_msg_and_die.c8
-rw-r--r--libbb/print_file.c2
-rw-r--r--libbb/read_package_field.c23
-rw-r--r--libbb/recursive_action.c8
-rw-r--r--libbb/remove_file.c3
-rw-r--r--libbb/safe_read.c8
-rw-r--r--libbb/safe_strncpy.c8
-rw-r--r--libbb/syscalls.c4
-rw-r--r--libbb/syslog_msg_with_name.c8
-rw-r--r--libbb/time_string.c8
-rw-r--r--libbb/trim.c16
-rw-r--r--libbb/u_signal_names.c23
-rw-r--r--libbb/vdprintf.c8
-rw-r--r--libbb/verror_msg.c8
-rw-r--r--libbb/vherror_msg.c8
-rw-r--r--libbb/vperror_msg.c8
-rw-r--r--libbb/wfopen.c8
-rw-r--r--libbb/xfuncs.c8
-rw-r--r--libbb/xgethostbyname.c1
-rw-r--r--libbb/xregcomp.c16
61 files changed, 331 insertions, 720 deletions
diff --git a/libbb/Makefile b/libbb/Makefile
index a9ea76947..60c3dda97 100644
--- a/libbb/Makefile
+++ b/libbb/Makefile
@@ -1,11 +1,75 @@
1# Silly wrapper makefile. This Makefile is _not_ used by the build system for 1# Makefile for busybox
2# busybox, it is just to make working on libbb more conveinient. 2#
3# -Erik Andersen 3# Copyright (C) 2001 Erik Andersen <andersee@debian.org>
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
4 18
5all: 19
6 make -C .. libbb.a 20
21TOPDIR :=..
22L_TARGET := libbb.a
23
24LIBBB_MSRC=messages.c
25LIBBB_OBJ= full_version name_too_long omitting_directory not_a_directory \
26 memory_exhausted invalid_date invalid_option io_error dash_dash_help \
27 write_error too_few_args name_longer_than_foo unknown can_not_create_raw_socket
28LIBBB_MOBJS=$(patsubst %,%.o, $(LIBBB_OBJ))
29
30LIBBB_ARCSRC=unarchive.c
31LIBBB_ARCOBJ= archive_offset seek_sub_file extract_archive unarchive \
32 get_header_ar get_header_cpio get_header_tar deb_extract
33LIBBB_AROBJS=$(patsubst %,%.o, $(LIBBB_ARCOBJ))
34
35
36obj-y :=
37obj-n :=
38obj- :=
39
40obj-y += ask_confirmation.o chomp.o concat_path_file.o copy_file.o \
41 copy_file_chunk.o libc5.o device_open.o error_msg.o \
42 error_msg_and_die.o fgets_str.o find_mount_point.o find_pid_by_name.o \
43 find_root_device.o full_read.o full_write.o get_console.o \
44 get_last_path_component.o get_line_from_file.o gz_open.o human_readable.o \
45 isdirectory.o kernel_version.o loop.o mode_string.o module_syscalls.o mtab.o \
46 mtab_file.o my_getgrnam.o my_getgrgid.o my_getpwnam.o my_getpwnamegid.o \
47 my_getpwuid.o parse_mode.o parse_number.o perror_msg.o perror_msg_and_die.o \
48 print_file.o process_escape_sequence.o read_package_field.o recursive_action.o \
49 safe_read.o safe_strncpy.o syscalls.o syslog_msg_with_name.o time_string.o \
50 trim.o unzip.o vdprintf.o verror_msg.o vperror_msg.o wfopen.o xfuncs.o \
51 xgetcwd.o xreadlink.o xregcomp.o interface.o remove_file.o last_char_is.o \
52 copyfd.o vherror_msg.o herror_msg.o herror_msg_and_die.o xgethostbyname.o \
53 dirname.o make_directory.o create_icmp_socket.o u_signal_names.o arith.o \
54 simplify_path.o $(LIBBB_MOBJS) $(LIBBB_AROBJS)
55
56
57# Hand off to toplevel Rules.mak
58include $(TOPDIR)/Rules.mak
59
60$(LIBBB_MOBJS): $(LIBBB_MSRC)
61 $(CC) $(CFLAGS) -DBB_VER='"$(VERSION)"' -DBB_BT='"$(BUILDTIME)"' \
62 $(LIBBB_CFLAGS) -DL_$(patsubst %,%,$*) -c $< -o $*.o
63
64$(LIBBB_AROBJS): $(LIBBB_ARCSRC)
65 $(CC) $(CFLAGS) $(LIBBB_CFLAGS) -DL_$(patsubst %,%,$*) -c $< -o $*.o
66
67loop.o: loop.h
68
69loop.h: mk_loop_h.sh
70 @ $(SHELL) $< > $@
7 71
8clean: 72clean:
9 - rm -rf libbb.a 73 rm -f $(L_TARGET) *.o core
10 - find -name \*.o -exec rm -f {} \; 74
11 75
diff --git a/libbb/ask_confirmation.c b/libbb/ask_confirmation.c
index f2922379c..d4d943ad7 100644
--- a/libbb/ask_confirmation.c
+++ b/libbb/ask_confirmation.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/chomp.c b/libbb/chomp.c
index 111d4cf77..94404a98d 100644
--- a/libbb/chomp.c
+++ b/libbb/chomp.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c
index 86dd2fbbf..e62b99ef6 100644
--- a/libbb/concat_path_file.c
+++ b/libbb/concat_path_file.c
@@ -1,9 +1,28 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * busybox library eXtendet funcion 3 * Utility routines.
3 * 4 *
4 * concatenate path and file name to new allocation buffer, 5 * Copyright (C) many different people. If you wrote this, please
5 * not addition '/' if path name already have '/' 6 * acknowledge your work.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
6 * 17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */
23
24/* concatenate path and file name to new allocation buffer,
25 * not addition '/' if path name already have '/'
7*/ 26*/
8 27
9#include <string.h> 28#include <string.h>
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index d3902ffbe..a80e30b50 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -2,7 +2,6 @@
2/* 2/*
3 * Mini copy_file implementation for busybox 3 * Mini copy_file implementation for busybox
4 * 4 *
5 *
6 * Copyright (C) 2001 by Matt Kraai <kraai@alumni.carnegiemellon.edu> 5 * Copyright (C) 2001 by Matt Kraai <kraai@alumni.carnegiemellon.edu>
7 * 6 *
8 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/libbb/copy_file_chunk.c b/libbb/copy_file_chunk.c
index c440a6102..63d2ab173 100644
--- a/libbb/copy_file_chunk.c
+++ b/libbb/copy_file_chunk.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/copyfd.c b/libbb/copyfd.c
index aa938d105..22d8c3996 100644
--- a/libbb/copyfd.c
+++ b/libbb/copyfd.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) 1999-2001 Erik Andersen <andersee@debian.org> 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
diff --git a/libbb/device_open.c b/libbb/device_open.c
index 8e97ce6c5..30b33d7f0 100644
--- a/libbb/device_open.c
+++ b/libbb/device_open.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/error_msg.c b/libbb/error_msg.c
index c7d5fdb98..58308b6be 100644
--- a/libbb/error_msg.c
+++ b/libbb/error_msg.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/error_msg_and_die.c b/libbb/error_msg_and_die.c
index b950ee00c..67a79c375 100644
--- a/libbb/error_msg_and_die.c
+++ b/libbb/error_msg_and_die.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/fgets_str.c b/libbb/fgets_str.c
index 4943464d5..6588f9482 100644
--- a/libbb/fgets_str.c
+++ b/libbb/fgets_str.c
@@ -1,17 +1,23 @@
1/* vi: set sw=4 ts=4: */
1/* 2/*
2 * This program is free software; you can redistribute it and/or modify 3 * Utility routines.
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 * 4 *
7 * This program is distributed in the hope that it will be useful, 5 * Copyright (C) many different people. If you wrote this, please
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 6 * acknowledge your work.
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU Library General Public License for more details.
11 * 7 *
12 * You should have received a copy of the GNU General Public License 8 * This program is free software; you can redistribute it and/or modify
13 * along with this program; if not, write to the Free Software 9 * it under the terms of the GNU General Public License as published by
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 */ 21 */
16 22
17 23
diff --git a/libbb/find_mount_point.c b/libbb/find_mount_point.c
index 2d9481a69..1eb5dc942 100644
--- a/libbb/find_mount_point.c
+++ b/libbb/find_mount_point.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c
index 7f39dd41c..f183cc0bd 100644
--- a/libbb/find_pid_by_name.c
+++ b/libbb/find_pid_by_name.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
@@ -36,7 +30,7 @@
36 30
37 31
38/* For Erik's nifty devps device driver */ 32/* For Erik's nifty devps device driver */
39#ifdef BB_FEATURE_USE_DEVPS_PATCH 33#ifdef CONFIG_FEATURE_USE_DEVPS_PATCH
40#include <linux/devps.h> 34#include <linux/devps.h>
41 35
42/* find_pid_by_name() 36/* find_pid_by_name()
@@ -120,7 +114,7 @@ extern pid_t* find_pid_by_name( char* pidName)
120 return pidList; 114 return pidList;
121} 115}
122 116
123#else /* BB_FEATURE_USE_DEVPS_PATCH */ 117#else /* CONFIG_FEATURE_USE_DEVPS_PATCH */
124 118
125/* find_pid_by_name() 119/* find_pid_by_name()
126 * 120 *
@@ -187,7 +181,7 @@ extern pid_t* find_pid_by_name( char* pidName)
187 } 181 }
188 return pidList; 182 return pidList;
189} 183}
190#endif /* BB_FEATURE_USE_DEVPS_PATCH */ 184#endif /* CONFIG_FEATURE_USE_DEVPS_PATCH */
191 185
192/* END CODE */ 186/* END CODE */
193/* 187/*
diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c
index f8f68464d..0a3f1bc77 100644
--- a/libbb/find_root_device.c
+++ b/libbb/find_root_device.c
@@ -1,8 +1,9 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * Copyright (C) 2000,2001 by Lineo, inc. 3 * Utility routines.
4 * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
5 * 4 *
5 * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
6 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * Patched by a bunch of people. Feel free to acknowledge your work. 7 * Patched by a bunch of people. Feel free to acknowledge your work.
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
@@ -18,7 +19,6 @@
18 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */ 22 */
23 23
24#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/full_read.c b/libbb/full_read.c
index e9c4bbfc6..ccf26fc3d 100644
--- a/libbb/full_read.c
+++ b/libbb/full_read.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/full_write.c b/libbb/full_write.c
index dc9937fa3..a2c07fbc9 100644
--- a/libbb/full_write.c
+++ b/libbb/full_write.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/get_console.c b/libbb/get_console.c
index 3b36a59e7..04a6bd1a6 100644
--- a/libbb/get_console.c
+++ b/libbb/get_console.c
@@ -2,9 +2,8 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -19,10 +18,6 @@
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 21 */
27 22
28#include <stdio.h> 23#include <stdio.h>
diff --git a/libbb/get_last_path_component.c b/libbb/get_last_path_component.c
index f1ddfbde0..85c7609c9 100644
--- a/libbb/get_last_path_component.c
+++ b/libbb/get_last_path_component.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c
index 759481731..9035c0412 100644
--- a/libbb/get_line_from_file.c
+++ b/libbb/get_line_from_file.c
@@ -2,9 +2,8 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -19,10 +18,6 @@
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 21 */
27 22
28#include <stdio.h> 23#include <stdio.h>
diff --git a/libbb/gz_open.c b/libbb/gz_open.c
index ef30ff894..dbaf3bb02 100644
--- a/libbb/gz_open.c
+++ b/libbb/gz_open.c
@@ -1,3 +1,26 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) many different people. If you wrote this, please
6 * acknowledge your work.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */
23
1#include <sys/types.h> 24#include <sys/types.h>
2#include <sys/wait.h> 25#include <sys/wait.h>
3#include <signal.h> 26#include <signal.h>
diff --git a/libbb/herror_msg.c b/libbb/herror_msg.c
index f4210edad..1081a56b1 100644
--- a/libbb/herror_msg.c
+++ b/libbb/herror_msg.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdarg.h> 22#include <stdarg.h>
diff --git a/libbb/herror_msg_and_die.c b/libbb/herror_msg_and_die.c
index 0df5ed016..64482d859 100644
--- a/libbb/herror_msg_and_die.c
+++ b/libbb/herror_msg_and_die.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,11 +17,8 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
21/* vi: set sw=4 ts=4: */
27 22
28#include <stdarg.h> 23#include <stdarg.h>
29#include <stdlib.h> 24#include <stdlib.h>
diff --git a/libbb/inode_hash.c b/libbb/inode_hash.c
index 790af8f31..52c54cdc1 100644
--- a/libbb/inode_hash.c
+++ b/libbb/inode_hash.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/interface.c b/libbb/interface.c
index 484597c5f..e69be15e6 100644
--- a/libbb/interface.c
+++ b/libbb/interface.c
@@ -1,9 +1,21 @@
1/* 1/*
2 * stolen from net-tools-1.59 and stripped down for busybox by
3 * Erik Andersen <andersee@debian.org>
4 *
5 * Heavily modified by Manuel Novoa III Mar 12, 2001
6 *
7 * Pruned unused code using KEEP_UNUSED define.
8 * Added print_bytes_scaled function to reduce code size.
9 * Added some (potentially) missing defines.
10 * Improved display support for -a and for a named interface.
11 *
12 * -----------------------------------------------------------
13 *
2 * ifconfig This file contains an implementation of the command 14 * ifconfig This file contains an implementation of the command
3 * that either displays or sets the characteristics of 15 * that either displays or sets the characteristics of
4 * one or more of the system's networking interfaces. 16 * one or more of the system's networking interfaces.
5 * 17 *
6 * Version: $Id: interface.c,v 1.4 2001/07/19 22:28:02 andersen Exp $ 18 * Version: $Id: interface.c,v 1.5 2001/10/24 04:59:38 andersen Exp $
7 * 19 *
8 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> 20 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
9 * and others. Copyright 1993 MicroWalt Corporation 21 * and others. Copyright 1993 MicroWalt Corporation
@@ -22,17 +34,6 @@
22 * 10/1998 - Andi Kleen. Use interface list primitives. 34 * 10/1998 - Andi Kleen. Use interface list primitives.
23 * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu 35 * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu
24 * (default AF was wrong) 36 * (default AF was wrong)
25 * stolen from net-tools-1.59 and stripped down for busybox by
26 * Erik Andersen <andersee@debian.org>
27 */
28
29/*
30 * Heavily modified by Manuel Novoa III Mar 12, 2001
31 *
32 * Pruned unused code using KEEP_UNUSED define.
33 * Added print_bytes_scaled function to reduce code size.
34 * Added some (potentially) missing defines.
35 * Improved display support for -a and for a named interface.
36 */ 37 */
37 38
38/* #define KEEP_UNUSED */ 39/* #define KEEP_UNUSED */
diff --git a/libbb/isdirectory.c b/libbb/isdirectory.c
index 65f4fee00..3dfe10522 100644
--- a/libbb/isdirectory.c
+++ b/libbb/isdirectory.c
@@ -2,9 +2,8 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
6 * isn't something I'm going to worry about... If you wrote something 6 * Permission has been granted to redistribute this code under the GPL.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -19,10 +18,6 @@
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 21 */
27 22
28#include <stdio.h> 23#include <stdio.h>
diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c
index 09cd582c4..694af8e2c 100644
--- a/libbb/kernel_version.c
+++ b/libbb/kernel_version.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/libbb.h b/libbb/libbb.h
deleted file mode 100644
index 3ef0278f8..000000000
--- a/libbb/libbb.h
+++ /dev/null
@@ -1,326 +0,0 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Busybox main internal header file
4 *
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
21 * Permission has been granted to redistribute this code under the GPL.
22 *
23 */
24#ifndef __LIBBB_H__
25#define __LIBBB_H__ 1
26
27#include <stdio.h>
28#include <stdarg.h>
29#include <sys/stat.h>
30#include <sys/types.h>
31
32#include <netdb.h>
33
34#ifdef DMALLOC
35#include "dmalloc.h"
36#endif
37
38#include <features.h>
39
40#ifndef _BB_INTERNAL_H_
41#include "../busybox.h"
42#endif
43
44#if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__)
45/* libc5 doesn't define socklen_t */
46typedef unsigned int socklen_t;
47/* libc5 doesn't implement BSD 4.4 daemon() */
48extern int daemon (int nochdir, int noclose);
49/* libc5 doesn't implement strtok_r */
50char *strtok_r(char *s, const char *delim, char **ptrptr);
51#endif
52
53/* Some useful definitions */
54#define FALSE ((int) 0)
55#define TRUE ((int) 1)
56#define SKIP ((int) 2)
57
58/* for mtab.c */
59#define MTAB_GETMOUNTPT '1'
60#define MTAB_GETDEVICE '2'
61
62#define BUF_SIZE 8192
63#define EXPAND_ALLOC 1024
64
65static inline int is_decimal(int ch) { return ((ch >= '0') && (ch <= '9')); }
66static inline int is_octal(int ch) { return ((ch >= '0') && (ch <= '7')); }
67
68/* Macros for min/max. */
69#ifndef MIN
70#define MIN(a,b) (((a)<(b))?(a):(b))
71#endif
72
73#ifndef MAX
74#define MAX(a,b) (((a)>(b))?(a):(b))
75#endif
76
77
78
79extern void show_usage(void) __attribute__ ((noreturn));
80extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
81extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
82extern void perror_msg(const char *s, ...);
83extern void perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn));
84extern void vherror_msg(const char *s, va_list p);
85extern void herror_msg(const char *s, ...);
86extern void herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn));
87
88/* These two are used internally -- you shouldn't need to use them */
89extern void verror_msg(const char *s, va_list p);
90extern void vperror_msg(const char *s, va_list p);
91
92const char *mode_string(int mode);
93const char *time_string(time_t timeVal);
94int is_directory(const char *name, int followLinks, struct stat *statBuf);
95int isDevice(const char *name);
96
97int remove_file(const char *path, int flags);
98int copy_file(const char *source, const char *dest, int flags);
99int copy_file_chunk(FILE *src_file, FILE *dst_file, unsigned long long chunksize);
100char *buildName(const char *dirName, const char *fileName);
101int makeString(int argc, const char **argv, char *buf, int bufLen);
102char *getChunk(int size);
103char *chunkstrdup(const char *str);
104void freeChunks(void);
105ssize_t safe_read(int fd, void *buf, size_t count);
106int full_write(int fd, const char *buf, int len);
107int full_read(int fd, char *buf, int len);
108int recursive_action(const char *fileName, int recurse, int followLinks, int depthFirst,
109 int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData),
110 int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData),
111 void* userData);
112
113extern int parse_mode( const char* s, mode_t* theMode);
114
115extern int get_kernel_revision(void);
116
117extern int get_console_fd(char* tty_name);
118extern struct mntent *find_mount_point(const char *name, const char *table);
119extern void write_mtab(char* blockDevice, char* directory,
120 char* filesystemType, long flags, char* string_flags);
121extern void erase_mtab(const char * name);
122extern long atoi_w_units (const char *cp);
123extern pid_t* find_pid_by_name( char* pidName);
124extern char *find_real_root_device_name(const char* name);
125extern char *get_line_from_file(FILE *file);
126extern void print_file(FILE *file);
127extern int copyfd(int fd1, int fd2);
128extern int print_file_by_name(char *filename);
129extern char process_escape_sequence(const char **ptr);
130extern char *get_last_path_component(char *path);
131extern FILE *wfopen(const char *path, const char *mode);
132extern FILE *xfopen(const char *path, const char *mode);
133extern void chomp(char *s);
134extern void trim(char *s);
135extern struct BB_applet *find_applet_by_name(const char *name);
136void run_applet_by_name(const char *name, int argc, char **argv);
137
138#ifndef DMALLOC
139extern void *xmalloc (size_t size);
140extern void *xrealloc(void *old, size_t size);
141extern void *xcalloc(size_t nmemb, size_t size);
142extern char *xstrdup (const char *s);
143#endif
144extern char *xstrndup (const char *s, int n);
145extern char * safe_strncpy(char *dst, const char *src, size_t size);
146
147struct suffix_mult {
148 const char *suffix;
149 int mult;
150};
151
152extern unsigned long parse_number(const char *numstr,
153 const struct suffix_mult *suffixes);
154
155
156/* These parse entries in /etc/passwd and /etc/group. This is desirable
157 * for BusyBox since we want to avoid using the glibc NSS stuff, which
158 * increases target size and is often not needed embedded systems. */
159extern long my_getpwnam(const char *name);
160extern long my_getgrnam(const char *name);
161extern void my_getpwuid(char *name, long uid);
162extern void my_getgrgid(char *group, long gid);
163extern long my_getpwnamegid(const char *name);
164
165extern int device_open(char *device, int mode);
166
167extern int del_loop(const char *device);
168extern int set_loop(const char *device, const char *file, int offset, int *loopro);
169extern char *find_unused_loop_device (void);
170
171
172#if (__GLIBC__ < 2)
173extern int vdprintf(int d, const char *format, va_list ap);
174#endif
175
176int nfsmount(const char *spec, const char *node, int *flags,
177 char **extra_opts, char **mount_opts, int running_bg);
178
179void syslog_msg_with_name(const char *name, int facility, int pri, const char *msg);
180void syslog_msg(int facility, int pri, const char *msg);
181
182/* Include our own copy of struct sysinfo to avoid binary compatability
183 * problems with Linux 2.4, which changed things. Grumble, grumble. */
184struct sysinfo {
185 long uptime; /* Seconds since boot */
186 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
187 unsigned long totalram; /* Total usable main memory size */
188 unsigned long freeram; /* Available memory size */
189 unsigned long sharedram; /* Amount of shared memory */
190 unsigned long bufferram; /* Memory used by buffers */
191 unsigned long totalswap; /* Total swap space size */
192 unsigned long freeswap; /* swap space still available */
193 unsigned short procs; /* Number of current processes */
194 unsigned short pad; /* Padding needed for m68k */
195 unsigned long totalhigh; /* Total high memory size */
196 unsigned long freehigh; /* Available high memory size */
197 unsigned int mem_unit; /* Memory unit size in bytes */
198 char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
199};
200extern int sysinfo (struct sysinfo* info);
201
202enum {
203 KILOBYTE = 1024,
204 MEGABYTE = (KILOBYTE*1024),
205 GIGABYTE = (MEGABYTE*1024)
206};
207const char *make_human_readable_str(unsigned long size, unsigned long block_size, unsigned long display_unit);
208
209int ask_confirmation(void);
210int klogctl(int type, char * b, int len);
211
212char *xgetcwd(char *cwd);
213char *xreadlink(const char *path);
214char *concat_path_file(const char *path, const char *filename);
215char *last_char_is(const char *s, int c);
216
217extern long arith (const char *startbuf, int *errcode);
218
219typedef struct file_headers_s {
220 char *name;
221 char *link_name;
222 off_t size;
223 uid_t uid;
224 gid_t gid;
225 mode_t mode;
226 time_t mtime;
227 dev_t device;
228} file_header_t;
229file_header_t *get_header_ar(FILE *in_file);
230file_header_t *get_header_cpio(FILE *src_stream);
231file_header_t *get_header_tar(FILE *tar_stream);
232
233enum extract_functions_e {
234 extract_verbose_list = 1,
235 extract_list = 2,
236 extract_one_to_buffer = 4,
237 extract_to_stdout = 8,
238 extract_all_to_fs = 16,
239 extract_preserve_date = 32,
240 extract_data_tar_gz = 64,
241 extract_control_tar_gz = 128,
242 extract_unzip_only = 256,
243 extract_unconditional = 512,
244 extract_create_leading_dirs = 1024,
245 extract_quiet = 2048,
246 extract_exclude_list = 4096
247};
248char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers)(FILE *),
249 const int extract_function, const char *prefix, char **include_name, char **exclude_name);
250char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function,
251 const char *prefix, const char *filename);
252int read_package_field(const char *package_buffer, char **field_name, char **field_value);
253char *fgets_str(FILE *file, const char *terminating_string);
254
255extern int unzip(FILE *l_in_file, FILE *l_out_file);
256extern void gz_close(int gunzip_pid);
257extern FILE *gz_open(FILE *compressed_file, int *pid);
258
259extern struct hostent *xgethostbyname(const char *name);
260extern int create_icmp_socket(void);
261
262char *dirname (char *path);
263
264int make_directory (char *path, long mode, int flags);
265
266const char *u_signal_names(const char *str_sig, int *signo, int startnum);
267char *simplify_path(const char *path);
268
269#define CT_AUTO 0
270#define CT_UNIX2DOS 1
271#define CT_DOS2UNIX 2
272/* extern int convert(char *fn, int ConvType); */
273
274enum {
275 FILEUTILS_PRESERVE_STATUS = 1,
276 FILEUTILS_DEREFERENCE = 2,
277 FILEUTILS_RECUR = 4,
278 FILEUTILS_FORCE = 8,
279 FILEUTILS_INTERACTIVE = 16
280};
281
282extern const char *applet_name;
283extern const char * const full_version;
284extern const char * const name_too_long;
285extern const char * const omitting_directory;
286extern const char * const not_a_directory;
287extern const char * const memory_exhausted;
288extern const char * const invalid_date;
289extern const char * const invalid_option;
290extern const char * const io_error;
291extern const char * const dash_dash_help;
292extern const char * const write_error;
293extern const char * const too_few_args;
294extern const char * const name_longer_than_foo;
295extern const char * const unknown;
296extern const char * const can_not_create_raw_socket;
297
298#ifdef BB_FEATURE_DEVFS
299# define CURRENT_VC "/dev/vc/0"
300# define VC_1 "/dev/vc/1"
301# define VC_2 "/dev/vc/2"
302# define VC_3 "/dev/vc/3"
303# define VC_4 "/dev/vc/4"
304# define VC_5 "/dev/vc/5"
305# define SC_0 "/dev/tts/0"
306# define SC_1 "/dev/tts/1"
307# define VC_FORMAT "/dev/vc/%d"
308# define SC_FORMAT "/dev/tts/%d"
309#else
310# define CURRENT_VC "/dev/tty0"
311# define VC_1 "/dev/tty1"
312# define VC_2 "/dev/tty2"
313# define VC_3 "/dev/tty3"
314# define VC_4 "/dev/tty4"
315# define VC_5 "/dev/tty5"
316# define SC_0 "/dev/ttyS0"
317# define SC_1 "/dev/ttyS1"
318# define VC_FORMAT "/dev/tty%d"
319# define SC_FORMAT "/dev/ttyS%d"
320#endif
321
322/* The following devices are the same on devfs and non-devfs systems. */
323#define CURRENT_TTY "/dev/tty"
324#define CONSOLE_DEV "/dev/console"
325
326#endif /* __LIBBB_H__ */
diff --git a/libbb/loop.c b/libbb/loop.c
index 4754b8da1..36b13d6e6 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/messages.c b/libbb/messages.c
index 552c3ab5b..895cfdc2b 100644
--- a/libbb/messages.c
+++ b/libbb/messages.c
@@ -1,7 +1,7 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * Copyright (C) 2001 by Lineo, inc. 3 * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
4 * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> 4 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
19 * 19 *
20 */ 20 */
21 21
22#include "busybox.h"
22#include "libbb.h" 23#include "libbb.h"
23 24
24#ifdef L_full_version 25#ifdef L_full_version
diff --git a/libbb/mode_string.c b/libbb/mode_string.c
index 0a3d6e6f0..12dc17966 100644
--- a/libbb/mode_string.c
+++ b/libbb/mode_string.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/module_syscalls.c b/libbb/module_syscalls.c
index 8326f15ad..3b60649a8 100644
--- a/libbb/module_syscalls.c
+++ b/libbb/module_syscalls.c
@@ -2,8 +2,8 @@
2/* 2/*
3 * some system calls possibly missing from libc 3 * some system calls possibly missing from libc
4 * 4 *
5 * Copyright (C) 1999,2000,2001 by Lineo, inc. 5 * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
6 * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> 6 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
diff --git a/libbb/mtab.c b/libbb/mtab.c
index 28c9978ef..c521b1e05 100644
--- a/libbb/mtab.c
+++ b/libbb/mtab.c
@@ -1,4 +1,24 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
2#include <stdlib.h> 22#include <stdlib.h>
3#include <unistd.h> 23#include <unistd.h>
4#include <errno.h> 24#include <errno.h>
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c
index 56f8e06ab..267a13720 100644
--- a/libbb/mtab_file.c
+++ b/libbb/mtab_file.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
@@ -31,10 +25,10 @@
31 25
32/* Busybox mount uses either /proc/mounts or /dev/mtab to 26/* Busybox mount uses either /proc/mounts or /dev/mtab to
33 * get the list of currently mounted filesystems */ 27 * get the list of currently mounted filesystems */
34#if defined BB_FEATURE_MTAB_SUPPORT 28#if defined CONFIG_FEATURE_MTAB_SUPPORT
35const char mtab_file[] = "/etc/mtab"; 29const char mtab_file[] = "/etc/mtab";
36#else 30#else
37# if defined BB_FEATURE_USE_DEVPS_PATCH 31# if defined CONFIG_FEATURE_USE_DEVPS_PATCH
38 const char mtab_file[] = "/dev/mtab"; 32 const char mtab_file[] = "/dev/mtab";
39# else 33# else
40 const char mtab_file[] = "/proc/mounts"; 34 const char mtab_file[] = "/proc/mounts";
diff --git a/libbb/my_getgrgid.c b/libbb/my_getgrgid.c
index fabd4776c..27b671922 100644
--- a/libbb/my_getgrgid.c
+++ b/libbb/my_getgrgid.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,16 +17,12 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
29#include <string.h> 23#include <string.h>
30#include "../pwd_grp/pwd.h" 24#include "pwd.h"
31#include "../pwd_grp/grp.h" 25#include "grp.h"
32#include "libbb.h" 26#include "libbb.h"
33 27
34 28
diff --git a/libbb/my_getgrnam.c b/libbb/my_getgrnam.c
index e3226a275..dbacf5192 100644
--- a/libbb/my_getgrnam.c
+++ b/libbb/my_getgrnam.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,20 +17,15 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
29#include <string.h> 23#include <string.h>
30#include "../pwd_grp/pwd.h" 24#include "pwd.h"
31#include "../pwd_grp/grp.h" 25#include "grp.h"
32#include "libbb.h" 26#include "libbb.h"
33 27
34 28
35
36/* returns a gid given a group name */ 29/* returns a gid given a group name */
37long my_getgrnam(const char *name) 30long my_getgrnam(const char *name)
38{ 31{
diff --git a/libbb/my_getpwnam.c b/libbb/my_getpwnam.c
index ae73ae7f1..90277040e 100644
--- a/libbb/my_getpwnam.c
+++ b/libbb/my_getpwnam.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,20 +17,15 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
29#include <string.h> 23#include <string.h>
30#include "../pwd_grp/pwd.h" 24#include "pwd.h"
31#include "../pwd_grp/grp.h" 25#include "grp.h"
32#include "libbb.h" 26#include "libbb.h"
33 27
34 28
35
36/* returns a uid given a username */ 29/* returns a uid given a username */
37long my_getpwnam(const char *name) 30long my_getpwnam(const char *name)
38{ 31{
diff --git a/libbb/my_getpwnamegid.c b/libbb/my_getpwnamegid.c
index fb3d148ce..9c45580b5 100644
--- a/libbb/my_getpwnamegid.c
+++ b/libbb/my_getpwnamegid.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,16 +17,12 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
29#include <string.h> 23#include <string.h>
30#include "../pwd_grp/pwd.h" 24#include "pwd.h"
31#include "../pwd_grp/grp.h" 25#include "grp.h"
32#include "libbb.h" 26#include "libbb.h"
33 27
34 28
diff --git a/libbb/my_getpwuid.c b/libbb/my_getpwuid.c
index 46c7a884a..49bc8fb49 100644
--- a/libbb/my_getpwuid.c
+++ b/libbb/my_getpwuid.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,16 +17,12 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
29#include <string.h> 23#include <string.h>
30#include "../pwd_grp/pwd.h" 24#include "pwd.h"
31#include "../pwd_grp/grp.h" 25#include "grp.h"
32#include "libbb.h" 26#include "libbb.h"
33 27
34 28
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c
index 30d2f21cf..ba34ea929 100644
--- a/libbb/parse_mode.c
+++ b/libbb/parse_mode.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/parse_number.c b/libbb/parse_number.c
index c90511dca..755a357ad 100644
--- a/libbb/parse_number.c
+++ b/libbb/parse_number.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/perror_msg.c b/libbb/perror_msg.c
index 18c71ab1c..8c57b0d16 100644
--- a/libbb/perror_msg.c
+++ b/libbb/perror_msg.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c
index 9d304a26b..9004925cc 100644
--- a/libbb/perror_msg_and_die.c
+++ b/libbb/perror_msg_and_die.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/print_file.c b/libbb/print_file.c
index bfedc5eff..a6df14ed9 100644
--- a/libbb/print_file.c
+++ b/libbb/print_file.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) 1999-2001 Erik Andersen <andersee@debian.org> 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
diff --git a/libbb/read_package_field.c b/libbb/read_package_field.c
index f561df831..ac5f80167 100644
--- a/libbb/read_package_field.c
+++ b/libbb/read_package_field.c
@@ -1,3 +1,26 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) many different people. If you wrote this, please
6 * acknowledge your work.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */
23
1#include <stdlib.h> 24#include <stdlib.h>
2#include <string.h> 25#include <string.h>
3#include "libbb.h" 26#include "libbb.h"
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c
index 6672db17f..e87ab9860 100644
--- a/libbb/recursive_action.c
+++ b/libbb/recursive_action.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/remove_file.c b/libbb/remove_file.c
index 3b84680c4..988b09124 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -2,10 +2,8 @@
2/* 2/*
3 * Mini remove_file implementation for busybox 3 * Mini remove_file implementation for busybox
4 * 4 *
5 *
6 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu> 5 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7 * 6 *
8 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 9 * the Free Software Foundation; either version 2 of the License, or
@@ -19,7 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */ 20 */
24 21
25#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/safe_read.c b/libbb/safe_read.c
index dbf4aa7e4..b6d6d742f 100644
--- a/libbb/safe_read.c
+++ b/libbb/safe_read.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c
index 55ec79802..0c5cf12ef 100644
--- a/libbb/safe_strncpy.c
+++ b/libbb/safe_strncpy.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <string.h> 22#include <string.h>
diff --git a/libbb/syscalls.c b/libbb/syscalls.c
index 426a14aa1..383eb6ab9 100644
--- a/libbb/syscalls.c
+++ b/libbb/syscalls.c
@@ -2,8 +2,8 @@
2/* 2/*
3 * some system calls possibly missing from libc 3 * some system calls possibly missing from libc
4 * 4 *
5 * Copyright (C) 1999,2000,2001 by Lineo, inc. 5 * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
6 * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> 6 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
diff --git a/libbb/syslog_msg_with_name.c b/libbb/syslog_msg_with_name.c
index 5dadcc433..6474da459 100644
--- a/libbb/syslog_msg_with_name.c
+++ b/libbb/syslog_msg_with_name.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/time_string.c b/libbb/time_string.c
index 076529006..d103a02f8 100644
--- a/libbb/time_string.c
+++ b/libbb/time_string.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/trim.c b/libbb/trim.c
index 76b87ca1c..cb673cac3 100644
--- a/libbb/trim.c
+++ b/libbb/trim.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>
diff --git a/libbb/u_signal_names.c b/libbb/u_signal_names.c
index 623b10312..aee1db07c 100644
--- a/libbb/u_signal_names.c
+++ b/libbb/u_signal_names.c
@@ -1,3 +1,26 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Utility routines.
4 *
5 * Copyright (C) many different people. If you wrote this, please
6 * acknowledge your work.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */
23
1#include <signal.h> 24#include <signal.h>
2#include <ctype.h> 25#include <ctype.h>
3#include <string.h> 26#include <string.h>
diff --git a/libbb/vdprintf.c b/libbb/vdprintf.c
index 8c3e32a7a..0f250ae69 100644
--- a/libbb/vdprintf.c
+++ b/libbb/vdprintf.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c
index b34821561..21cde2047 100644
--- a/libbb/verror_msg.c
+++ b/libbb/verror_msg.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/vherror_msg.c b/libbb/vherror_msg.c
index 44f6ebd28..67db17fe4 100644
--- a/libbb/vherror_msg.c
+++ b/libbb/vherror_msg.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdarg.h> 22#include <stdarg.h>
diff --git a/libbb/vperror_msg.c b/libbb/vperror_msg.c
index ca9361e45..7da5bae0a 100644
--- a/libbb/vperror_msg.c
+++ b/libbb/vperror_msg.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/wfopen.c b/libbb/wfopen.c
index 8b074d2f7..f58ec90c0 100644
--- a/libbb/wfopen.c
+++ b/libbb/wfopen.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index eb93bf139..291bfafd6 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -2,9 +2,7 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
6 * isn't something I'm going to worry about... If you wrote something
7 * here, please feel free to acknowledge your work.
8 * 6 *
9 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -19,10 +17,6 @@
19 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 20 */
27 21
28#include <stdio.h> 22#include <stdio.h>
diff --git a/libbb/xgethostbyname.c b/libbb/xgethostbyname.c
index be56f2ed1..b71979701 100644
--- a/libbb/xgethostbyname.c
+++ b/libbb/xgethostbyname.c
@@ -2,7 +2,6 @@
2/* 2/*
3 * Mini xgethostbyname implementation. 3 * Mini xgethostbyname implementation.
4 * 4 *
5 *
6 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu>. 5 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu>.
7 * 6 *
8 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
diff --git a/libbb/xregcomp.c b/libbb/xregcomp.c
index 6f5e2f0cb..07cf779d1 100644
--- a/libbb/xregcomp.c
+++ b/libbb/xregcomp.c
@@ -2,27 +2,23 @@
2/* 2/*
3 * Utility routines. 3 * Utility routines.
4 * 4 *
5 * Copyright (C) tons of folks. Tracking down who wrote what 5 * Copyright (C) many different people. If you wrote this, please
6 * isn't something I'm going to worry about... If you wrote something 6 * acknowledge your work.
7 * here, please feel free to acknowledge your work.
8 * 7 *
9 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 11 * (at your option) any later version.
13 * 12 *
14 * This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful, but
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 16 * General Public License for more details.
18 * 17 *
19 * You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * 21 * USA
23 * Based in part on code from sash, Copyright (c) 1999 by David I. Bell
24 * Permission has been granted to redistribute this code under the GPL.
25 *
26 */ 22 */
27 23
28#include <stdio.h> 24#include <stdio.h>