Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
This commit is contained in:
parent
4c8b0dd973
commit
aff114c33d
@ -475,7 +475,7 @@ static void parse_config_file(void)
|
||||
|
||||
/* Encountering configuration lines prior to seeing a
|
||||
* section header is treated as an error. This is how
|
||||
* the old code worked, but it may not be desireable.
|
||||
* the old code worked, but it may not be desirable.
|
||||
* We may want to simply ignore such lines in case they
|
||||
* are used in some future version of busybox. */
|
||||
if (!section) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mini dpkg implementation for busybox.
|
||||
* This is not meant as a replacemnt for dpkg
|
||||
* This is not meant as a replacement for dpkg
|
||||
*
|
||||
* Written By Glenn McGrath with the help of others
|
||||
* Copyright (C) 2001 by Glenn McGrath
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Known difference between busybox dpkg and the official dpkg that i dont
|
||||
* Known difference between busybox dpkg and the official dpkg that i don't
|
||||
* consider important, its worth keeping a note of differences anyway, just to
|
||||
* make it easier to maintain.
|
||||
* - The first value for the Confflile: field isnt placed on a new line.
|
||||
@ -86,7 +86,7 @@ common_node_t *package_hashtable[PACKAGE_HASH_PRIME + 1];
|
||||
|
||||
/* Currently it doesnt store packages that have state-status of not-installed
|
||||
* So it only really has to be the size of the maximum number of packages
|
||||
* likely to be installed at any one time, so there is a bit of leaway here */
|
||||
* likely to be installed at any one time, so there is a bit of leeway here */
|
||||
#define STATUS_HASH_PRIME 8191
|
||||
typedef struct status_node_s {
|
||||
unsigned int package:14; /* has to fit PACKAGE_HASH_PRIME */
|
||||
@ -94,7 +94,7 @@ typedef struct status_node_s {
|
||||
} status_node_t;
|
||||
status_node_t *status_hashtable[STATUS_HASH_PRIME + 1];
|
||||
|
||||
/* Even numbers are for 'extras', like ored dependecies or null */
|
||||
/* Even numbers are for 'extras', like ored dependencies or null */
|
||||
enum edge_type_e {
|
||||
EDGE_NULL = 0,
|
||||
EDGE_PRE_DEPENDS = 1,
|
||||
@ -148,7 +148,7 @@ void make_hash(const char *key, unsigned int *start, unsigned int *decrement, co
|
||||
for(i = 1; i < len; i++) {
|
||||
/* shifts the ascii based value and adds it to previous value
|
||||
* shift amount is mod 24 because long int is 32 bit and data
|
||||
* to be shifted is 8, dont want to shift data to where it has
|
||||
* to be shifted is 8, don't want to shift data to where it has
|
||||
* no effect*/
|
||||
hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24));
|
||||
}
|
||||
@ -392,7 +392,7 @@ int search_package_hashtable(const unsigned int name, const unsigned int version
|
||||
/*
|
||||
* This function searches through the entire package_hashtable looking
|
||||
* for a package which provides "needle". It returns the index into
|
||||
* the package_hashtable for the provining package.
|
||||
* the package_hashtable for the providing package.
|
||||
*
|
||||
* needle is the index into name_hashtable of the package we are
|
||||
* looking for.
|
||||
@ -489,7 +489,7 @@ void add_split_dependencies(common_node_t *parent_node, const char *whole_line,
|
||||
/* Skip leading ' ' or '(' */
|
||||
version += strspn(field2, " ");
|
||||
version += strspn(version, "(");
|
||||
/* Calculate length of any operator charactors */
|
||||
/* Calculate length of any operator characters */
|
||||
offset_ch = strspn(version, "<=>");
|
||||
/* Determine operator */
|
||||
if (offset_ch > 0) {
|
||||
@ -636,7 +636,7 @@ unsigned int get_status(const unsigned int status_node, const int num)
|
||||
for (i = 1; i < num; i++) {
|
||||
/* skip past a word */
|
||||
status_string += strcspn(status_string, " ");
|
||||
/* skip past the seperating spaces */
|
||||
/* skip past the separating spaces */
|
||||
status_string += strspn(status_string, " ");
|
||||
}
|
||||
len = strcspn(status_string, " \n\0");
|
||||
@ -955,13 +955,13 @@ void write_status_file(deb_file_t **deb_file)
|
||||
fclose(new_status_file);
|
||||
|
||||
|
||||
/* Create a seperate backfile to dpkg */
|
||||
/* Create a separate backfile to dpkg */
|
||||
if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) {
|
||||
struct stat stat_buf;
|
||||
if (stat("/var/lib/dpkg/status", &stat_buf) == 0) {
|
||||
bb_error_msg_and_die("Couldnt create backup status file");
|
||||
}
|
||||
/* Its ok if renaming the status file fails becasue status
|
||||
/* Its ok if renaming the status file fails because status
|
||||
* file doesnt exist, maybe we are starting from scratch */
|
||||
bb_error_msg("No status file found, creating new one");
|
||||
}
|
||||
@ -971,10 +971,10 @@ void write_status_file(deb_file_t **deb_file)
|
||||
}
|
||||
}
|
||||
|
||||
/* This function returns TRUE if the given package can statisfy a
|
||||
/* This function returns TRUE if the given package can satisfy a
|
||||
* dependency of type depend_type.
|
||||
*
|
||||
* A pre-depends is statisfied only if a package is already installed,
|
||||
* A pre-depends is satisfied only if a package is already installed,
|
||||
* which a regular depends can be satisfied by a package which we want
|
||||
* to install.
|
||||
*/
|
||||
@ -1085,7 +1085,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
|
||||
for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
|
||||
int status_num = 0;
|
||||
int number_of_alternatives = 0;
|
||||
const edge_t * root_of_alternatives;
|
||||
const edge_t * root_of_alternatives = NULL;
|
||||
const common_node_t *package_node = package_hashtable[i];
|
||||
|
||||
/* If the package node does not exist then this
|
||||
@ -1118,7 +1118,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
/* This code is tested only for EDGE_DEPENDS, sine I
|
||||
/* This code is tested only for EDGE_DEPENDS, since I
|
||||
* have no suitable pre-depends available. There is no
|
||||
* reason that it shouldn't work though :-)
|
||||
*/
|
||||
@ -1211,7 +1211,7 @@ char **create_list(const char *filename)
|
||||
char *line = NULL;
|
||||
int count = 0;
|
||||
|
||||
/* dont use [xw]fopen here, handle error ourself */
|
||||
/* don't use [xw]fopen here, handle error ourself */
|
||||
list_stream = fopen(filename, "r");
|
||||
if (list_stream == NULL) {
|
||||
return(NULL);
|
||||
@ -1385,7 +1385,7 @@ void remove_package(const unsigned int package_num, int noisy)
|
||||
bb_error_msg_and_die("script failed, prerm failure");
|
||||
}
|
||||
|
||||
/* Create a list of files to remove, and a seperate list of those to keep */
|
||||
/* Create a list of files to remove, and a separate list of those to keep */
|
||||
sprintf(list_name, "/var/lib/dpkg/info/%s.list", package_name);
|
||||
remove_files = create_list(list_name);
|
||||
|
||||
@ -1480,7 +1480,7 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
|
||||
tar_handle = init_handle();
|
||||
tar_handle->src_fd = ar_handle->src_fd;
|
||||
|
||||
/* We dont care about data.tar.* or debian-binary, just control.tar.* */
|
||||
/* We don't care about data.tar.* or debian-binary, just control.tar.* */
|
||||
#ifdef CONFIG_FEATURE_DEB_TAR_GZ
|
||||
ar_handle->accept = llist_add_to(NULL, "control.tar.gz");
|
||||
#endif
|
||||
@ -1502,7 +1502,7 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
|
||||
tar_handle = init_handle();
|
||||
tar_handle->src_fd = ar_handle->src_fd;
|
||||
|
||||
/* We dont care about control.tar.* or debian-binary, just data.tar.* */
|
||||
/* We don't care about control.tar.* or debian-binary, just data.tar.* */
|
||||
#ifdef CONFIG_FEATURE_DEB_TAR_GZ
|
||||
ar_handle->accept = llist_add_to(NULL, "data.tar.gz");
|
||||
#endif
|
||||
|
@ -632,7 +632,7 @@ static void copy_block(char *buf, unsigned len, int header)
|
||||
* However the F&G algorithm may be faster for some highly redundant
|
||||
* files if the parameter max_chain_length (described below) is too large.
|
||||
*
|
||||
* ACKNOWLEDGEMENTS
|
||||
* ACKNOWLEDGMENTS
|
||||
*
|
||||
* The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
|
||||
* I found it in 'freeze' written by Leonid Broukhis.
|
||||
|
@ -66,7 +66,7 @@ extern void data_extract_all(archive_handle_t *archive_handle)
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle hard links seperately
|
||||
/* Handle hard links separately
|
||||
* We identified hard links as regular files of size 0 with a symlink */
|
||||
if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) {
|
||||
/* hard link */
|
||||
|
@ -13,7 +13,7 @@
|
||||
/*
|
||||
Size and speed optimizations by Manuel Novoa III (mjn3@codepoet.org).
|
||||
|
||||
More efficient reading of huffman codes, a streamlined read_bunzip()
|
||||
More efficient reading of Huffman codes, a streamlined read_bunzip()
|
||||
function, and various other tweaks. In (limited) tests, approximately
|
||||
20% faster than bzcat on x86 and about 10% faster on arm.
|
||||
|
||||
@ -49,10 +49,10 @@
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
/* Constants for huffman coding */
|
||||
/* Constants for Huffman coding */
|
||||
#define MAX_GROUPS 6
|
||||
#define GROUP_SIZE 50 /* 64 would have been more efficient */
|
||||
#define MAX_HUFCODE_BITS 20 /* Longest huffman code allowed */
|
||||
#define MAX_HUFCODE_BITS 20 /* Longest Huffman code allowed */
|
||||
#define MAX_SYMBOLS 258 /* 256 literals + RUNA + RUNB */
|
||||
#define SYMBOL_RUNA 0
|
||||
#define SYMBOL_RUNB 1
|
||||
@ -70,7 +70,7 @@
|
||||
/* Other housekeeping constants */
|
||||
#define IOBUF_SIZE 4096
|
||||
|
||||
/* This is what we know about each huffman coding group */
|
||||
/* This is what we know about each Huffman coding group */
|
||||
struct group_data {
|
||||
/* We have an extra slot at the end of limit[] for a sentinal value. */
|
||||
int limit[MAX_HUFCODE_BITS+1],base[MAX_HUFCODE_BITS],permute[MAX_SYMBOLS];
|
||||
@ -92,7 +92,7 @@ typedef struct {
|
||||
unsigned int *dbuf, dbufSize;
|
||||
/* These things are a bit too big to go on the stack */
|
||||
unsigned char selectors[32768]; /* nSelectors=15 bits */
|
||||
struct group_data groups[MAX_GROUPS]; /* huffman coding tables */
|
||||
struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */
|
||||
/* For I/O error handling */
|
||||
jmp_buf jmpbuf;
|
||||
} bunzip_data;
|
||||
@ -172,10 +172,10 @@ static int get_next_block(bunzip_data *bd)
|
||||
if(k&(1<<(15-j))) symToByte[symTotal++]=(16*i)+j;
|
||||
}
|
||||
}
|
||||
/* How many different huffman coding groups does this block use? */
|
||||
/* How many different Huffman coding groups does this block use? */
|
||||
groupCount=get_bits(bd,3);
|
||||
if (groupCount<2 || groupCount>MAX_GROUPS) return RETVAL_DATA_ERROR;
|
||||
/* nSelectors: Every GROUP_SIZE many symbols we select a new huffman coding
|
||||
/* nSelectors: Every GROUP_SIZE many symbols we select a new Huffman coding
|
||||
group. Read in the group selector list, which is stored as MTF encoded
|
||||
bit runs. (MTF=Move To Front, as each value is used it's moved to the
|
||||
start of the list.) */
|
||||
@ -189,13 +189,13 @@ static int get_next_block(bunzip_data *bd)
|
||||
for(;j;j--) mtfSymbol[j] = mtfSymbol[j-1];
|
||||
mtfSymbol[0]=selectors[i]=uc;
|
||||
}
|
||||
/* Read the huffman coding tables for each group, which code for symTotal
|
||||
/* Read the Huffman coding tables for each group, which code for symTotal
|
||||
literal symbols, plus two run symbols (RUNA, RUNB) */
|
||||
symCount=symTotal+2;
|
||||
for (j=0; j<groupCount; j++) {
|
||||
unsigned char length[MAX_SYMBOLS],temp[MAX_HUFCODE_BITS+1];
|
||||
int minLen, maxLen, pp;
|
||||
/* Read huffman code lengths for each symbol. They're stored in
|
||||
/* Read Huffman code lengths for each symbol. They're stored in
|
||||
a way similar to mtf; record a starting value for the first symbol,
|
||||
and an offset from the previous value for everys symbol after that.
|
||||
(Subtracting 1 before the loop and then adding it back at the end is
|
||||
@ -228,12 +228,12 @@ static int get_next_block(bunzip_data *bd)
|
||||
}
|
||||
/* Calculate permute[], base[], and limit[] tables from length[].
|
||||
*
|
||||
* permute[] is the lookup table for converting huffman coded symbols
|
||||
* permute[] is the lookup table for converting Huffman coded symbols
|
||||
* into decoded symbols. base[] is the amount to subtract from the
|
||||
* value of a huffman symbol of a given length when using permute[].
|
||||
* value of a Huffman symbol of a given length when using permute[].
|
||||
*
|
||||
* limit[] indicates the largest numerical value a symbol with a given
|
||||
* number of bits can have. This is how the huffman codes can vary in
|
||||
* number of bits can have. This is how the Huffman codes can vary in
|
||||
* length: each code with a value>limit[length] needs another bit.
|
||||
*/
|
||||
hufGroup=bd->groups+j;
|
||||
@ -275,7 +275,7 @@ static int get_next_block(bunzip_data *bd)
|
||||
base[minLen]=0;
|
||||
}
|
||||
/* We've finished reading and digesting the block header. Now read this
|
||||
block's huffman coded symbols from the file and undo the huffman coding
|
||||
block's Huffman coded symbols from the file and undo the Huffman coding
|
||||
and run length encoding, saving the result into dbuf[dbufCount++]=uc */
|
||||
|
||||
/* Initialize symbol occurrence counters and symbol Move To Front table */
|
||||
@ -286,7 +286,7 @@ static int get_next_block(bunzip_data *bd)
|
||||
/* Loop through compressed symbols. */
|
||||
runPos=dbufCount=symCount=selector=0;
|
||||
for(;;) {
|
||||
/* Determine which huffman coding group to use. */
|
||||
/* Determine which Huffman coding group to use. */
|
||||
if(!(symCount--)) {
|
||||
symCount=GROUP_SIZE-1;
|
||||
if(selector>=nSelectors) return RETVAL_DATA_ERROR;
|
||||
@ -294,7 +294,7 @@ static int get_next_block(bunzip_data *bd)
|
||||
base=hufGroup->base-1;
|
||||
limit=hufGroup->limit-1;
|
||||
}
|
||||
/* Read next huffman-coded symbol. */
|
||||
/* Read next Huffman-coded symbol. */
|
||||
/* Note: It is far cheaper to read maxLen bits and back up than it is
|
||||
to read minLen bits and then an additional bit at a time, testing
|
||||
as we go. Because there is a trailing last block (with file CRC),
|
||||
@ -383,7 +383,7 @@ got_huff_bits:
|
||||
byteCount[uc]++;
|
||||
dbuf[dbufCount++] = (unsigned int)uc;
|
||||
}
|
||||
/* At this point, we've read all the huffman-coded symbols (and repeated
|
||||
/* At this point, we've read all the Huffman-coded symbols (and repeated
|
||||
runs) for this block from the input stream, and decoded them into the
|
||||
intermediate buffer. There are dbufCount many decoded bytes in dbuf[].
|
||||
Now undo the Burrows-Wheeler transform on dbuf.
|
||||
@ -439,7 +439,7 @@ static int read_bunzip(bunzip_data *bd, char *outbuf, int len)
|
||||
|
||||
/* We will always have pending decoded data to write into the output
|
||||
buffer unless this is the very first call (in which case we haven't
|
||||
huffman-decoded a block into the intermediate buffer yet). */
|
||||
Huffman-decoded a block into the intermediate buffer yet). */
|
||||
|
||||
if (bd->writeCopies) {
|
||||
/* Inside the loop, writeCopies means extra copies (beyond 1) */
|
||||
@ -495,7 +495,7 @@ decode_next_byte:
|
||||
}
|
||||
}
|
||||
|
||||
/* Refill the intermediate buffer by huffman-decoding next block of input */
|
||||
/* Refill the intermediate buffer by Huffman-decoding next block of input */
|
||||
/* (previous is just a convenient unused temp variable here) */
|
||||
previous=get_next_block(bd);
|
||||
if(previous) {
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Defailt input buffer size */
|
||||
/* Default input buffer size */
|
||||
#define IBUFSIZ 2048
|
||||
|
||||
/* Default output buffer size */
|
||||
|
@ -892,7 +892,7 @@ static int inflate_get_next_window(void)
|
||||
/* Doesnt get here */
|
||||
}
|
||||
|
||||
/* Initialise bytebuffer, be carefull not to overfill the buffer */
|
||||
/* Initialise bytebuffer, be careful not to overfill the buffer */
|
||||
extern void inflate_init(unsigned int bufsize)
|
||||
{
|
||||
/* Set the bytebuffer size, default is same as gunzip_wsize */
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* FIXME:
|
||||
* In privelidged mode if uname and gname map to a uid amd gid then use the
|
||||
* In privileged mode if uname and gname map to a uid and gid then use the
|
||||
* mapped value instead of the uid/gid values in tar header
|
||||
*
|
||||
* References:
|
||||
|
@ -2,11 +2,11 @@
|
||||
/*
|
||||
* Mini tar implementation for busybox
|
||||
*
|
||||
* Modifed to use common extraction code used by ar, cpio, dpkg-deb, dpkg
|
||||
* Modified to use common extraction code used by ar, cpio, dpkg-deb, dpkg
|
||||
* Glenn McGrath <bug1@optushome.com.au>
|
||||
*
|
||||
* Note, that as of BusyBox-0.43, tar has been completely rewritten from the
|
||||
* ground up. It still has remnents of the old code lying about, but it is
|
||||
* ground up. It still has remnants of the old code lying about, but it is
|
||||
* very different now (i.e., cleaner, less global variables, etc.)
|
||||
*
|
||||
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
||||
@ -796,7 +796,7 @@ int tar_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Setup an array of filenames to work with */
|
||||
/* TODO: This is the same as in ar, seperate function ? */
|
||||
/* TODO: This is the same as in ar, separate function ? */
|
||||
while (optind < argc) {
|
||||
char *filename_ptr = last_char_is(argv[optind], '/');
|
||||
if (filename_ptr) {
|
||||
|
@ -65,7 +65,7 @@ static const char sep1752[] = {
|
||||
|
||||
static int julian;
|
||||
|
||||
/* leap year -- account for gregorian reformation in 1752 */
|
||||
/* leap year -- account for Gregorian reformation in 1752 */
|
||||
#define leap_year(yr) \
|
||||
((yr) <= 1752 ? !((yr) % 4) : \
|
||||
(!((yr) % 4) && ((yr) % 100)) || !((yr) % 400))
|
||||
|
@ -27,7 +27,7 @@
|
||||
*
|
||||
* Original version majorly reworked for SUSv3 compliance, bug fixes, and
|
||||
* size optimizations. Changes include:
|
||||
* 1) Now correctly distingusishes between errors and actual file differences.
|
||||
* 1) Now correctly distinguishes between errors and actual file differences.
|
||||
* 2) Proper handling of '-' args.
|
||||
* 3) Actual error checking of i/o.
|
||||
* 4) Accept SUSv3 -l option. Note that we use the slightly nicer gnu format
|
||||
|
@ -70,7 +70,7 @@ static int cmpfunc(const void *a, const void *b)
|
||||
/*
|
||||
* parse_lists() - parses a list and puts values into startpos and endpos.
|
||||
* valid list formats: N, N-, N-M, -M
|
||||
* more than one list can be seperated by commas
|
||||
* more than one list can be separated by commas
|
||||
*/
|
||||
static void parse_lists(char *lists)
|
||||
{
|
||||
@ -79,7 +79,7 @@ static void parse_lists(char *lists)
|
||||
char *junk;
|
||||
int s = 0, e = 0;
|
||||
|
||||
/* take apart the lists, one by one (they are seperated with commas */
|
||||
/* take apart the lists, one by one (they are separated with commas */
|
||||
while ((ltok = strsep(&lists, ",")) != NULL) {
|
||||
|
||||
/* it's actually legal to pass an empty list */
|
||||
|
@ -42,7 +42,7 @@
|
||||
/* Input parsing code is always bulky - used heavy duty libc stuff as
|
||||
much as possible, missed out a lot of bounds checking */
|
||||
|
||||
/* Default input handling to save suprising some people */
|
||||
/* Default input handling to save surprising some people */
|
||||
|
||||
static struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
|
||||
*
|
||||
* Size reduction. Removed floating point dependency. Added error checking
|
||||
* on output. Output stats on 0-sized filesystems if specificly listed on
|
||||
* on output. Output stats on 0-sized filesystems if specifically listed on
|
||||
* the command line. Properly round *-blocks, Used, and Available quantities.
|
||||
*/
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
|
||||
*
|
||||
* Because of behavioral differences, implemented configureable SUSv3
|
||||
* Because of behavioral differences, implemented configurable SUSv3
|
||||
* or 'fancy' gnu-ish behaviors. Also, reduced size and fixed bugs.
|
||||
* 1) In handling '\c' escape, the previous version only suppressed the
|
||||
* trailing newline. SUSv3 specifies _no_ output after '\c'.
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
/*
|
||||
* Modified by Vladimir Oleynik <andersen@codepoet.org> (C) 2003
|
||||
* - corretion "-" option usage
|
||||
* - correct "-" option usage
|
||||
* - multiple "-u unsetenv" support
|
||||
* - GNU long option support
|
||||
* - save errno after exec failed before bb_perror_msg()
|
||||
|
@ -9,24 +9,24 @@
|
||||
* Copyright (c) 2000 Edward Betts <edward@debian.org>.
|
||||
* Aug 2003 Vladimir Oleynik - reduced 464 bytes.
|
||||
*
|
||||
* this program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the gnu general public license as published by
|
||||
* the free software foundation; either version 2 of the license, or
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* this program is distributed in the hope that it will be useful,
|
||||
* but without any warranty; without even the implied warranty of
|
||||
* merchantability or fitness for a particular purpose. see the gnu
|
||||
* general public license for more details.
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* you should have received a copy of the gnu general public license
|
||||
* along with this program; if not, write to the free software
|
||||
* foundation, inc., 59 temple place, suite 330, boston, ma 02111-1307 usa
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
/* This program evaluates expressions. Each token (operator, operand,
|
||||
* parenthesis) of the expression must be a seperate argument. The
|
||||
* parenthesis) of the expression must be a separate argument. The
|
||||
* parser used is a reasonably general one, though any incarnation of
|
||||
* it is language-specific. It is especially nice for expressions.
|
||||
*
|
||||
|
@ -30,7 +30,7 @@
|
||||
* is _not_ the same. Erik apparently made this change almost 3 years
|
||||
* ago to avoid failing when no utmp was available. However, the
|
||||
* correct course of action wrt SUSv3 for a failing getlogin() is
|
||||
* a dianostic message and an error return.
|
||||
* a diagnostic message and an error return.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define FLAG_CHECK 2
|
||||
#define FLAG_WARN 4
|
||||
|
||||
/* This might be usefull elsewhere */
|
||||
/* This might be useful elsewhere */
|
||||
static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
|
||||
unsigned char hash_length)
|
||||
{
|
||||
|
@ -784,7 +784,7 @@ static int istrue(var *v) {
|
||||
return (v->string && *(v->string)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/* temporary varables allocator. Last allocated should be first freed */
|
||||
/* temporary variables allocator. Last allocated should be first freed */
|
||||
static var *nvalloc(int n) {
|
||||
|
||||
nvblock *pb = NULL;
|
||||
@ -1386,7 +1386,7 @@ static node *mk_splitter(char *s, tsplitter *spl) {
|
||||
}
|
||||
|
||||
/* use node as a regular expression. Supplied with node ptr and regex_t
|
||||
* storage space. Return ptr to regex (if result points to preg, it shuold
|
||||
* storage space. Return ptr to regex (if result points to preg, it should
|
||||
* be later regfree'd manually
|
||||
*/
|
||||
static regex_t *as_regex(node *op, regex_t *preg) {
|
||||
|
@ -210,7 +210,7 @@ static char *copy_parsing_slashn(const char *string, int len)
|
||||
/*
|
||||
* index_of_next_unescaped_regexp_delim - walks left to right through a string
|
||||
* beginning at a specified index and returns the index of the next regular
|
||||
* expression delimiter (typically a forward * slash ('/')) not preceeded by
|
||||
* expression delimiter (typically a forward * slash ('/')) not preceded by
|
||||
* a backslash ('\').
|
||||
*/
|
||||
static int index_of_next_unescaped_regexp_delim(const char delimiter,
|
||||
|
12
editors/vi.c
12
editors/vi.c
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
static const char vi_Version[] =
|
||||
"$Id: vi.c,v 1.35 2004/03/31 11:12:51 andersen Exp $";
|
||||
"$Id: vi.c,v 1.36 2004/04/14 17:51:09 andersen Exp $";
|
||||
|
||||
/*
|
||||
* To compile for standalone use:
|
||||
@ -45,7 +45,7 @@ static const char vi_Version[] =
|
||||
* An "ex" line oriented mode- maybe using "cmdedit"
|
||||
*/
|
||||
|
||||
//---- Feature -------------- Bytes to immplement
|
||||
//---- Feature -------------- Bytes to implement
|
||||
#ifdef STANDALONE
|
||||
#define vi_main main
|
||||
#define CONFIG_FEATURE_VI_COLON // 4288
|
||||
@ -641,7 +641,7 @@ static Byte *get_address(Byte *p, int *b, int *e) // get two colon addrs, if pre
|
||||
p = get_one_address(p, b);
|
||||
while (isblnk(*p))
|
||||
p++;
|
||||
if (*p == ',') { // is there a address seperator
|
||||
if (*p == ',') { // is there a address separator
|
||||
p++;
|
||||
while (isblnk(*p))
|
||||
p++;
|
||||
@ -1452,7 +1452,7 @@ static Byte *new_screen(int ro, int co)
|
||||
screen = (Byte *) xmalloc(screensize);
|
||||
// initialize the new screen. assume this will be a empty file.
|
||||
screen_erase();
|
||||
// non-existant text[] lines start with a tilde (~).
|
||||
// non-existent text[] lines start with a tilde (~).
|
||||
for (li = 1; li < ro - 1; li++) {
|
||||
screen[(li * co) + 0] = '~';
|
||||
}
|
||||
@ -2528,7 +2528,7 @@ static int file_write(Byte * fn, Byte * first, Byte * last)
|
||||
|
||||
//----- Terminal Drawing ---------------------------------------
|
||||
// The terminal is made up of 'rows' line of 'columns' columns.
|
||||
// classicly this would be 24 x 80.
|
||||
// classically this would be 24 x 80.
|
||||
// screen coordinates
|
||||
// 0,0 ... 0,79
|
||||
// 1,0 ... 1,79
|
||||
@ -3222,7 +3222,7 @@ key_cmd_mode:
|
||||
case 'f': // f- forward to a user specified char
|
||||
last_forward_char = get_one_char(); // get the search char
|
||||
//
|
||||
// dont seperate these two commands. 'f' depends on ';'
|
||||
// dont separate these two commands. 'f' depends on ';'
|
||||
//
|
||||
//**** fall thru to ... 'i'
|
||||
case ';': // ;- look at rest of line for last forward char
|
||||
|
@ -89,7 +89,7 @@ static char *cur_file; /* the current file we are reading */
|
||||
static void print_line(const char *line, int linenum, char decoration)
|
||||
{
|
||||
#ifdef CONFIG_FEATURE_GREP_CONTEXT
|
||||
/* possibly print the little '--' seperator */
|
||||
/* possibly print the little '--' separator */
|
||||
if ((lines_before || lines_after) && last_line_printed &&
|
||||
last_line_printed < linenum - 1) {
|
||||
puts("--");
|
||||
|
@ -5,7 +5,7 @@
|
||||
* (C) 2002,2003 by Vladimir Oleynik <dzo@simtreas.ru>
|
||||
*
|
||||
* Special thanks
|
||||
* - Mark Whitley and Glenn McGrath for stimul to rewrote :)
|
||||
* - Mark Whitley and Glenn McGrath for stimulus to rewrite :)
|
||||
* - Mike Rendell <michael@cs.mun.ca>
|
||||
* and David MacKenzie <djm@gnu.ai.mit.edu>.
|
||||
*
|
||||
|
@ -1009,7 +1009,7 @@
|
||||
"Options:\n" \
|
||||
"\t-c FILE\t\tSpecifies configuration file. (default httpd.conf)\n" \
|
||||
USAGE_HTTPD_STANDALONE("\t-p PORT\tServer port (default 80)\n") \
|
||||
USAGE_HTTPD_SETUID("\t-u USER\tSet uid to USER after listening privilegies port\n") \
|
||||
USAGE_HTTPD_SETUID("\t-u USER\tSet uid to USER after listening privileges port\n") \
|
||||
USAGE_HTTPD_BASIC_AUTH("\t-r REALM\tAuthentication Realm for Basic Authentication\n") \
|
||||
USAGE_HTTPD_AUTH_MD5("\t-m PASS\t\tCrypt PASS with md5 algorithm\n") \
|
||||
"\t-e STRING\tHtml encode STRING\n" \
|
||||
|
@ -2,8 +2,8 @@
|
||||
/*
|
||||
* Utility routines.
|
||||
*
|
||||
* create raw socket for icmp (IPv6 version) protocol test permision
|
||||
* and drop root privilegies if running setuid
|
||||
* create raw socket for icmp (IPv6 version) protocol test permission
|
||||
* and drop root privileges if running setuid
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
/*
|
||||
* Utility routines.
|
||||
*
|
||||
* create raw socket for icmp protocol test permision
|
||||
* and drop root privilegies if running setuid
|
||||
* create raw socket for icmp protocol test permission
|
||||
* and drop root privileges if running setuid
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
/* Seems silly to copyright a global variable. ;-) Oh well.
|
||||
*
|
||||
* At least one applet (cmp) returns a value different from the typical
|
||||
* EXIT_FAILURE values (1) when an error occurs. So, make it configureable
|
||||
* EXIT_FAILURE values (1) when an error occurs. So, make it configurable
|
||||
* by the applet. I suppose we could use a wrapper function to set it, but
|
||||
* that too seems silly.
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* A number of standard utilites can accept multiple command line args
|
||||
/* A number of standard utilities can accept multiple command line args
|
||||
* of '-' for stdin, according to SUSv3. So we encapsulate the check
|
||||
* here to save a little space.
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
/*
|
||||
* Return TRUE if a fileName is a directory.
|
||||
* Nonexistant files return FALSE.
|
||||
* Nonexistent files return FALSE.
|
||||
*/
|
||||
int is_directory(const char *fileName, const int followLinks, struct stat *statBuf)
|
||||
{
|
||||
|
@ -31,8 +31,8 @@
|
||||
* sure that (flags & FILEUTILS_RECUR) is non-zero. Newly created
|
||||
* intermediate directories will have at least u+wx perms.
|
||||
*
|
||||
* To set specific permisions on 'path', pass the appropriate 'mode'
|
||||
* val. Otherwise, pass -1 to get default permisions.
|
||||
* To set specific permissions on 'path', pass the appropriate 'mode'
|
||||
* val. Otherwise, pass -1 to get default permissions.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -28,7 +28,7 @@
|
||||
* reasons for failure which don't set the streams error indicator,
|
||||
* SUSv3 lists EILSEQ, EINVAL, and ENOMEM.
|
||||
*
|
||||
* In some cases, it would be desireable to have a group of *printf()
|
||||
* In some cases, it would be desirable to have a group of *printf()
|
||||
* functions available that _always_ set the stream error indicator on
|
||||
* failure. That would allow us to defer error checking until applet
|
||||
* exit. Unfortunately, there is no standard way of setting a streams
|
||||
@ -38,7 +38,7 @@
|
||||
* free to send patches for stdio implementations where the following
|
||||
* fails.
|
||||
*
|
||||
* NOTE: None of this is threadsafe. As busybox is a nonthreaded app,
|
||||
* NOTE: None of this is thread safe. As busybox is a non-threaded app,
|
||||
* that isn't currently an issue.
|
||||
*/
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
*
|
||||
* Some example bugs as of March 12, 2003...
|
||||
* 1) fputc() doesn't set the error indicator on failure.
|
||||
* 2) freopen() doesn't maintain the same stream object, contary to
|
||||
* 2) freopen() doesn't maintain the same stream object, contrary to
|
||||
* standards. This makes it useless in its primary role of
|
||||
* reassociating stdin/stdout/stderr.
|
||||
* 3) printf() often fails to correctly format output when conversions
|
||||
@ -123,7 +123,7 @@
|
||||
#error dietlibc is currently not supported. Please see the commented source.
|
||||
|
||||
#else /* some other lib */
|
||||
/* Please see the comments for the above supported libaries for examples
|
||||
/* Please see the comments for the above supported libraries for examples
|
||||
* of what is required to support your stdio implementation.
|
||||
*/
|
||||
#error Your stdio library is currently not supported. Please see the commented source.
|
||||
|
@ -43,8 +43,8 @@ static int valid_name(const struct dirent *d)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* test mode = 1 is the same as offical run_parts
|
||||
* test_mode = 2 means to fail siliently on missing directories
|
||||
/* test mode = 1 is the same as official run_parts
|
||||
* test_mode = 2 means to fail silently on missing directories
|
||||
*/
|
||||
|
||||
extern int run_parts(char **args, const unsigned char test_mode, char **env)
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
* Rexec program for system have fork() as vfork() with foregound option
|
||||
* Rexec program for system have fork() as vfork() with foreground option
|
||||
*
|
||||
* Copyright (C) Vladimir N. Oleynik <dzo@simtreas.ru>
|
||||
* Copyright (C) 2003 Russ Dill <Russ.Dill@asu.edu>
|
||||
*
|
||||
* daemon() portion taken from uclibc:
|
||||
* daemon() portion taken from uClibc:
|
||||
*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* warn_ingoring_args implementations for busybox
|
||||
* warn_ignoring_args implementation for busybox
|
||||
*
|
||||
* Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Utility routines.
|
||||
*
|
||||
* Connect to host at port using address resolusion from getaddrinfo
|
||||
* Connect to host at port using address resolution from getaddrinfo
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
/*
|
||||
* Define GR_SCALE_DYNAMIC if you want grp to dynamically scale its read buffer
|
||||
* so that lines of any length can be used. On very very small systems,
|
||||
* you may want to leave this undefined becasue it will make the grp functions
|
||||
* you may want to leave this undefined because it will make the grp functions
|
||||
* somewhat larger (because of the inclusion of malloc and the code necessary).
|
||||
* On larger systems, you will want to define this, because grp will _not_
|
||||
* deal with long lines gracefully (they will be skipped).
|
||||
|
@ -28,7 +28,7 @@
|
||||
/*
|
||||
* Define GR_SCALE_DYNAMIC if you want grp to dynamically scale its read buffer
|
||||
* so that lines of any length can be used. On very very small systems,
|
||||
* you may want to leave this undefined becasue it will make the grp functions
|
||||
* you may want to leave this undefined because it will make the grp functions
|
||||
* somewhat larger (because of the inclusion of malloc and the code necessary).
|
||||
* On larger systems, you will want to define this, because grp will _not_
|
||||
* deal with long lines gracefully (they will be skipped).
|
||||
|
@ -96,7 +96,7 @@ extern int login_main(int argc, char **argv)
|
||||
break;
|
||||
case 'f':
|
||||
/*
|
||||
* username must be a seperate token
|
||||
* username must be a separate token
|
||||
* (-f root, *NOT* -froot). --marekm
|
||||
*/
|
||||
if ( optarg != argv[optind-1] )
|
||||
|
@ -310,7 +310,7 @@ static int ChangeUser(const char *user)
|
||||
const char *err_msg;
|
||||
|
||||
/*
|
||||
* Obtain password entry and change privilages
|
||||
* Obtain password entry and change privileges
|
||||
*/
|
||||
pas = getpwnam(user);
|
||||
if (pas == 0) {
|
||||
@ -1020,7 +1020,7 @@ static void EndJob(const char *user, CronLine * line)
|
||||
ForkJob(user, line, mailFd, SENDMAIL, SENDMAIL_ARGS, NULL);
|
||||
}
|
||||
#else
|
||||
/* crond whithout sendmail */
|
||||
/* crond without sendmail */
|
||||
|
||||
static void RunJob(const char *user, CronLine * line)
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ ChangeUser(const char *user, short dochdir)
|
||||
struct passwd *pas;
|
||||
|
||||
/*
|
||||
* Obtain password entry and change privilages
|
||||
* Obtain password entry and change privileges
|
||||
*/
|
||||
|
||||
if ((pas = getpwnam(user)) == 0) {
|
||||
|
@ -1563,7 +1563,7 @@ static int expand_expression(char *output, unsigned int outsize,
|
||||
void *info,
|
||||
const char *devname,
|
||||
const regmatch_t *ex, unsigned int numexp)
|
||||
/* [SUMMARY] Expand enviroment variables and regular subexpressions in string.
|
||||
/* [SUMMARY] Expand environment variables and regular subexpressions in string.
|
||||
<output> The output expanded expression is written here.
|
||||
<length> The size of the output buffer.
|
||||
<input> The input expression. This may equal <<output>>.
|
||||
|
@ -222,7 +222,7 @@ static const char *ata1_cfg_str[] = { /* word 0 in ATA-1 mode */
|
||||
/* word 1: number of logical cylinders */
|
||||
#define LCYLS_MAX 0x3fff /* maximum allowable value */
|
||||
|
||||
/* word 2: specific configureation
|
||||
/* word 2: specific configuration
|
||||
* (a) require SET FEATURES to spin-up
|
||||
* (b) require spin-up to fully reply to IDENTIFY DEVICE
|
||||
*/
|
||||
|
@ -282,11 +282,11 @@ extern int insmod_ng_main( int argc, char **argv);
|
||||
#ifndef MODUTILS_MODULE_H
|
||||
static const int MODUTILS_MODULE_H = 1;
|
||||
|
||||
#ident "$Id: insmod.c,v 1.116 2004/04/06 11:56:26 andersen Exp $"
|
||||
#ident "$Id: insmod.c,v 1.117 2004/04/14 17:51:22 andersen Exp $"
|
||||
|
||||
/* This file contains the structures used by the 2.0 and 2.1 kernels.
|
||||
We do not use the kernel headers directly because we do not wish
|
||||
to be dependant on a particular kernel version to compile insmod. */
|
||||
to be dependent on a particular kernel version to compile insmod. */
|
||||
|
||||
|
||||
/*======================================================================*/
|
||||
@ -503,7 +503,7 @@ int delete_module(const char *);
|
||||
#ifndef MODUTILS_OBJ_H
|
||||
static const int MODUTILS_OBJ_H = 1;
|
||||
|
||||
#ident "$Id: insmod.c,v 1.116 2004/04/06 11:56:26 andersen Exp $"
|
||||
#ident "$Id: insmod.c,v 1.117 2004/04/14 17:51:22 andersen Exp $"
|
||||
|
||||
/* The relocatable object is manipulated using elfin types. */
|
||||
|
||||
@ -2597,8 +2597,8 @@ new_process_module_arguments(struct obj_file *f, int argc, char **argv)
|
||||
str = alloca(r - q + 1);
|
||||
memcpy(str, q, r - q);
|
||||
|
||||
/* I don't know if it is usefull, as the previous case
|
||||
doesn't null terminate the string ??? */
|
||||
/* I don't know if it is useful, as the previous case
|
||||
doesn't nul terminate the string ??? */
|
||||
str[r - q] = '\0';
|
||||
|
||||
/* Keep next fields */
|
||||
|
@ -40,7 +40,7 @@
|
||||
* foo=`httpd -d $foo` # decode "Hello%20World" as "Hello World"
|
||||
* bar=`httpd -e "<Hello World>"` # encode as "<Hello World>"
|
||||
* Note that url encoding for arguments is not the same as html encoding for
|
||||
* presenation. -d decodes a url-encoded argument while -e encodes in html
|
||||
* presentation. -d decodes a url-encoded argument while -e encodes in html
|
||||
* for page display.
|
||||
*
|
||||
* httpd.conf has the following format:
|
||||
@ -55,7 +55,7 @@
|
||||
* /adm:toor:PaSsWd # or user toor, pwd PaSsWd on urls starting with /adm/
|
||||
* .au:audio/basic # additional mime type for audio.au files
|
||||
*
|
||||
* A/D may be as a/d or allow/deny - first char case unsensitive
|
||||
* A/D may be as a/d or allow/deny - first char case insensitive
|
||||
* Deny IP rules take precedence over allow rules.
|
||||
*
|
||||
*
|
||||
@ -127,7 +127,7 @@ static const char home[] = "./";
|
||||
# define cont_l_fmt "%ld"
|
||||
#endif
|
||||
|
||||
// Note: bussybox xfuncs are not used because we want the server to keep running
|
||||
// Note: busybox xfuncs are not used because we want the server to keep running
|
||||
// if something bad happens due to a malformed user request.
|
||||
// As a result, all memory allocation after daemonize
|
||||
// is checked rigorously
|
||||
@ -260,7 +260,7 @@ static HttpdConfig *config;
|
||||
static const char request_GET[] = "GET"; /* size algorithic optimize */
|
||||
|
||||
static const char* const suffixTable [] = {
|
||||
/* Warning: shorted equalent suffix in one line must be first */
|
||||
/* Warning: shorted equivalent suffix in one line must be first */
|
||||
".htm.html", "text/html",
|
||||
".jpg.jpeg", "image/jpeg",
|
||||
".gif", "image/gif",
|
||||
@ -775,7 +775,7 @@ static char *decodeString(char *orig, int flag_plus_to_space)
|
||||
*
|
||||
> $Function: addEnv()
|
||||
*
|
||||
* $Description: Add an enviornment variable setting to the global list.
|
||||
* $Description: Add an environment variable setting to the global list.
|
||||
* A NAME=VALUE string is allocated, filled, and added to the list of
|
||||
* environment settings passed to the cgi execution script.
|
||||
*
|
||||
@ -1380,7 +1380,7 @@ static int checkPermIP(void)
|
||||
return cur->allow_deny == 'A'; /* Allow/Deny */
|
||||
}
|
||||
|
||||
/* if uncofigured, return 1 - access from all */
|
||||
/* if unconfigured, return 1 - access from all */
|
||||
return !config->flg_deny_all;
|
||||
}
|
||||
|
||||
@ -1765,7 +1765,7 @@ static int miniHttpd(int server)
|
||||
while (1) {
|
||||
readfd = portfd;
|
||||
|
||||
/* Now wait INDEFINATELY on the set of sockets! */
|
||||
/* Now wait INDEFINITELY on the set of sockets! */
|
||||
if (select(server + 1, &readfd, 0, 0, 0) > 0) {
|
||||
if (FD_ISSET(server, &readfd)) {
|
||||
int on;
|
||||
@ -1990,7 +1990,7 @@ int httpd_main(int argc, char *argv[])
|
||||
#ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY
|
||||
server = openServer();
|
||||
# ifdef CONFIG_FEATURE_HTTPD_SETUID
|
||||
/* drop privilegies */
|
||||
/* drop privileges */
|
||||
if(uid > 0)
|
||||
setuid(uid);
|
||||
# endif
|
||||
|
@ -56,7 +56,7 @@
|
||||
* server program full path name
|
||||
* server program arguments maximum of MAXARGS (20)
|
||||
*
|
||||
* RPC services unsuported
|
||||
* RPC services unsupported
|
||||
*
|
||||
* Comment lines are indicated by a `#' in column 1.
|
||||
*/
|
||||
@ -345,7 +345,7 @@ more:
|
||||
sep->se_family = AF_UNIX;
|
||||
} else {
|
||||
if (strncmp(cp_ptr, "rpc/", 4) == 0) {
|
||||
syslog(LOG_ERR, "%s: rpc services not suported",
|
||||
syslog(LOG_ERR, "%s: rpc services not supported",
|
||||
sep->se_service);
|
||||
goto more;
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
* By Jordan Crouse <jordan@cosmicpenguin.net>
|
||||
* Stephan Linz <linz@li-pro.net>
|
||||
*
|
||||
* This is a complete reimplentation of the ipcalc program
|
||||
* from Redhat. I didn't look at their source code, but there
|
||||
* This is a complete reimplementation of the ipcalc program
|
||||
* from Red Hat. I didn't look at their source code, but there
|
||||
* is no denying that this is a loving reimplementation
|
||||
*/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* nameif.c - Naming Interfaces based on MAC address for busybox.
|
||||
*
|
||||
* Writen 2000 by Andi Kleen.
|
||||
* Written 2000 by Andi Kleen.
|
||||
* Busybox port 2002 by Nick Fedchik <nick@fedchik.org.ua>
|
||||
* Glenn McGrath <bug1@optushome.com.au>
|
||||
*
|
||||
@ -47,7 +47,7 @@
|
||||
/* take from linux/sockios.h */
|
||||
#define SIOCSIFNAME 0x8923 /* set interface name */
|
||||
|
||||
/* Octets in one ethernet addr, from <linux/if_ether.h> */
|
||||
/* Octets in one Ethernet addr, from <linux/if_ether.h> */
|
||||
#define ETH_ALEN 6
|
||||
|
||||
#ifndef ifr_newname
|
||||
|
@ -82,7 +82,7 @@ static void init_packet(struct dhcpMessage *packet, char type)
|
||||
}
|
||||
|
||||
|
||||
/* Add a paramater request list for stubborn DHCP servers. Pull the data
|
||||
/* Add a parameter request list for stubborn DHCP servers. Pull the data
|
||||
* from the struct in options.c. Don't do bounds checking here because it
|
||||
* goes towards the head of the packet. */
|
||||
static void add_requests(struct dhcpMessage *packet)
|
||||
|
@ -4,7 +4,7 @@
|
||||
* simple helper functions.
|
||||
*
|
||||
* Russ Dill <Russ.Dill@asu.edu> 2001-2003
|
||||
* Rewrited by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
|
||||
* Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* common.h
|
||||
*
|
||||
* Russ Dill <Russ.Dill@asu.edu> Soptember 2001
|
||||
* Rewrited by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
|
||||
* Russ Dill <Russ.Dill@asu.edu> September 2001
|
||||
* Rewritten by Vladimir Oleynik <dzo@simtreas.ru> (C) 2003
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -113,7 +113,7 @@ uint16_t checksum(void *addr, int count)
|
||||
}
|
||||
|
||||
|
||||
/* Constuct a ip/udp header for a packet, and specify the source and dest hardware address */
|
||||
/* Construct a ip/udp header for a packet, and specify the source and dest hardware address */
|
||||
int raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
|
||||
uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Functions to assist in the writing and removing of pidfiles.
|
||||
*
|
||||
* Russ Dill <Russ.Dill@asu.edu> Soptember 2001
|
||||
* Russ Dill <Russ.Dill@asu.edu> September 2001
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -2,7 +2,7 @@
|
||||
*
|
||||
* Functions to assist in the writing and removing of pidfiles.
|
||||
*
|
||||
* Russ Dill <Russ.Dill@asu.edu> Soptember 2001
|
||||
* Russ Dill <Russ.Dill@asu.edu> September 2001
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -132,7 +132,7 @@ static void fill_options(char *dest, uint8_t *option, struct dhcp_option *type_p
|
||||
}
|
||||
|
||||
|
||||
/* put all the paramaters into an environment */
|
||||
/* put all the parameters into an environment */
|
||||
static char **fill_envp(struct dhcpMessage *packet)
|
||||
{
|
||||
int num_options = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* serverpacket.c
|
||||
*
|
||||
* Constuct and send DHCP server packets
|
||||
* Construct and send DHCP server packets
|
||||
*
|
||||
* Russ Dill <Russ.Dill@asu.edu> July 2001
|
||||
*
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* signalpipe.c
|
||||
*
|
||||
* Signal pipe infastructure. A reliable way of delivering signals.
|
||||
* Signal pipe infrastructure. A reliable way of delivering signals.
|
||||
*
|
||||
* Russ Dill <Russ.Dill@asu.edu> Decemeber 2003
|
||||
* Russ Dill <Russ.Dill@asu.edu> December 2003
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -816,7 +816,7 @@ progressmeter(int flag)
|
||||
#endif
|
||||
|
||||
/* Original copyright notice which applies to the CONFIG_FEATURE_WGET_STATUSBAR stuff,
|
||||
* much of which was blatently stolen from openssh. */
|
||||
* much of which was blatantly stolen from openssh. */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -850,7 +850,7 @@ progressmeter(int flag)
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: wget.c,v 1.73 2004/04/08 10:27:11 bug1 Exp $
|
||||
* $Id: wget.c,v 1.74 2004/04/14 17:51:24 andersen Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* (C) Eero Tamminen <oak at welho dot com>
|
||||
*
|
||||
* Rewroted by Vladimir Oleynik (C) 2002 <dzo@simtreas.ru>
|
||||
* Rewritten by Vladimir Oleynik (C) 2002 <dzo@simtreas.ru>
|
||||
*/
|
||||
|
||||
/* Original code Copyrights */
|
||||
@ -133,7 +133,7 @@ static unsigned long Hertz;
|
||||
* is the kernel clock tick rate. One of these units is called a jiffy.
|
||||
* The HZ value used in the kernel may vary according to hacker desire.
|
||||
* According to Linus Torvalds, this is not true. He considers the values
|
||||
* in /proc as being in architecture-dependant units that have no relation
|
||||
* in /proc as being in architecture-dependent units that have no relation
|
||||
* to the kernel clock tick rate. Examination of the kernel source code
|
||||
* reveals that opinion as wishful thinking.
|
||||
*
|
||||
|
26
shell/ash.c
26
shell/ash.c
@ -174,7 +174,7 @@ static const char not_found_msg[] = "%s: not found";
|
||||
* We enclose jmp_buf in a structure so that we can declare pointers to
|
||||
* jump locations. The global variable handler contains the location to
|
||||
* jump to when an exception occurs, and the global variable exception
|
||||
* contains a code identifying the exeception. To implement nested
|
||||
* contains a code identifying the exception. To implement nested
|
||||
* exception handlers, the user should save the value of handler on entry
|
||||
* to an inner scope, set handler to point to a jmploc structure for the
|
||||
* inner scope, and restore handler on exit from the scope.
|
||||
@ -2702,7 +2702,7 @@ static const struct builtincmd bltin = {
|
||||
*/
|
||||
|
||||
/*
|
||||
* The eval commmand.
|
||||
* The eval command.
|
||||
*/
|
||||
|
||||
static int
|
||||
@ -7228,7 +7228,7 @@ forkshell(struct job *jp, union node *n, int mode)
|
||||
* the interactive program catches interrupts, the user doesn't want
|
||||
* these interrupts to also abort the loop. The approach we take here
|
||||
* is to have the shell ignore interrupt signals while waiting for a
|
||||
* forground process to terminate, and then send itself an interrupt
|
||||
* foreground process to terminate, and then send itself an interrupt
|
||||
* signal if the child process was terminated by an interrupt signal.
|
||||
* Unfortunately, some programs want to do a bit of cleanup and then
|
||||
* exit on interrupt; unless these processes terminate themselves by
|
||||
@ -11932,7 +11932,7 @@ static int vpcmp(const void *, const void *);
|
||||
static struct var **findvar(struct var **, const char *);
|
||||
|
||||
/*
|
||||
* Initialize the varable symbol tables and import the environment
|
||||
* Initialize the variable symbol tables and import the environment
|
||||
*/
|
||||
|
||||
|
||||
@ -12539,7 +12539,7 @@ letcmd(int argc, char **argv)
|
||||
/* $NetBSD: miscbltin.c,v 1.31 2002/11/24 22:35:41 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Miscelaneous builtins.
|
||||
* Miscellaneous builtins.
|
||||
*/
|
||||
|
||||
#undef rflag
|
||||
@ -12911,14 +12911,14 @@ ulimitcmd(int argc, char **argv)
|
||||
|
||||
/* This is my infix parser/evaluator. It is optimized for size, intended
|
||||
* as a replacement for yacc-based parsers. However, it may well be faster
|
||||
* than a comparable parser writen in yacc. The supported operators are
|
||||
* than a comparable parser written in yacc. The supported operators are
|
||||
* listed in #defines below. Parens, order of operations, and error handling
|
||||
* are supported. This code is threadsafe. The exact expression format should
|
||||
* are supported. This code is thread safe. The exact expression format should
|
||||
* be that which POSIX specifies for shells. */
|
||||
|
||||
/* The code uses a simple two-stack algorithm. See
|
||||
* http://www.onthenet.com.au/~grahamis/int2008/week02/lect02.html
|
||||
* for a detailed explaination of the infix-to-postfix algorithm on which
|
||||
* for a detailed explanation of the infix-to-postfix algorithm on which
|
||||
* this is based (this code differs in that it applies operators immediately
|
||||
* to the stack instead of adding them to a queue to end up with an
|
||||
* expression). */
|
||||
@ -12948,7 +12948,7 @@ ulimitcmd(int argc, char **argv)
|
||||
* parens and then checking that all binary ops and right parens are
|
||||
* preceded by a valid expression (NUM_TOKEN).
|
||||
*
|
||||
* Note: It may be desireable to replace Aaron's test for whitespace with
|
||||
* Note: It may be desirable to replace Aaron's test for whitespace with
|
||||
* ctype's isspace() if it is used by another busybox applet or if additional
|
||||
* whitespace chars should be considered. Look below the "#include"s for a
|
||||
* precompiler test.
|
||||
@ -12974,7 +12974,7 @@ ulimitcmd(int argc, char **argv)
|
||||
* - realize comma separated - expr, expr
|
||||
* - realise ++expr --expr expr++ expr--
|
||||
* - realise expr ? expr : expr (but, second expr calculate always)
|
||||
* - allow hexdecimal and octal numbers
|
||||
* - allow hexadecimal and octal numbers
|
||||
* - was restored loses XOR operator
|
||||
* - remove one goto label, added three ;-)
|
||||
* - protect $((num num)) as true zero expr (Manuel`s error)
|
||||
@ -12989,7 +12989,7 @@ ulimitcmd(int argc, char **argv)
|
||||
typedef unsigned char operator;
|
||||
|
||||
/* An operator's token id is a bit of a bitfield. The lower 5 bits are the
|
||||
* precedence, and 3 high bits are an ID unique accross operators of that
|
||||
* precedence, and 3 high bits are an ID unique across operators of that
|
||||
* precedence. The ID portion is so that multiple operators can have the
|
||||
* same precedence, ensuring that the leftmost one is evaluated first.
|
||||
* Consider * and /. */
|
||||
@ -13098,7 +13098,7 @@ typedef struct ARITCH_VAR_NUM {
|
||||
long contidional_second_val;
|
||||
char contidional_second_val_initialized;
|
||||
char *var; /* if NULL then is regular number,
|
||||
else is varable name */
|
||||
else is variable name */
|
||||
} v_n_t;
|
||||
|
||||
|
||||
@ -13356,7 +13356,7 @@ extern long arith (const char *expr, int *perrcode)
|
||||
|
||||
/* Stack of integers */
|
||||
/* The proof that there can be no more than strlen(startbuf)/2+1 integers
|
||||
* in any given correct or incorrect expression is left as an excersize to
|
||||
* in any given correct or incorrect expression is left as an exercise to
|
||||
* the reader. */
|
||||
v_n_t *numstack = alloca(((datasizes)/2)*sizeof(v_n_t)),
|
||||
*numstackptr = numstack;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Termios command line History and Editting.
|
||||
* Termios command line History and Editing.
|
||||
*
|
||||
* Copyright (c) 1986-2003 may safely be consumed by a BSD or GPL license.
|
||||
* Written by: Vladimir Oleynik <dzo@simtreas.ru>
|
||||
@ -259,7 +259,7 @@ static inline void beep(void)
|
||||
putchar('\007');
|
||||
}
|
||||
|
||||
/* Move back one charactor */
|
||||
/* Move back one character */
|
||||
/* special for slow terminal */
|
||||
static void input_backward(int num)
|
||||
{
|
||||
@ -429,7 +429,7 @@ static void parse_prompt(const char *prmt_ptr)
|
||||
#endif
|
||||
|
||||
|
||||
/* draw promt, editor line, and clear tail */
|
||||
/* draw prompt, editor line, and clear tail */
|
||||
static void redraw(int y, int back_cursor)
|
||||
{
|
||||
if (y > 0) /* up to start y */
|
||||
@ -466,7 +466,7 @@ static void input_backspace(void)
|
||||
}
|
||||
|
||||
|
||||
/* Move forward one charactor */
|
||||
/* Move forward one character */
|
||||
static void input_forward(void)
|
||||
{
|
||||
if (cursor < len)
|
||||
|
@ -2646,7 +2646,7 @@ void update_ifs_map(void)
|
||||
mapset(ifs, 2); /* also flow through if quoted */
|
||||
}
|
||||
|
||||
/* most recursion does not come through here, the exeception is
|
||||
/* most recursion does not come through here, the exception is
|
||||
* from builtin_source() */
|
||||
int parse_stream_outer(struct in_str *inp, int flag)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@
|
||||
#define WAITCORE(s) (((s)&0200)!=0)
|
||||
|
||||
/*
|
||||
* library and system defintions
|
||||
* library and system definitions
|
||||
*/
|
||||
typedef void xint; /* base type of jmp_buf, for not broken compilers */
|
||||
|
||||
|
@ -59,7 +59,7 @@ static char lfile[MAXPATHLEN];
|
||||
static const char *logFilePath = __LOG_FILE;
|
||||
|
||||
#ifdef CONFIG_FEATURE_ROTATE_LOGFILE
|
||||
/* max size of message file bevor being rotated */
|
||||
/* max size of message file before being rotated */
|
||||
static int logFileSize = 200 * 1024;
|
||||
|
||||
/* number of rotated message files */
|
||||
|
@ -475,7 +475,7 @@ check_aix_label( void )
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* must display the following acknowledgment:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 09.11.91 - made the first rudimetary functions
|
||||
* 09.11.91 - made the first rudimentary functions
|
||||
*
|
||||
* 10.11.91 - updated, does checking, no repairs yet.
|
||||
* Sent out to the mailing-list for testing.
|
||||
@ -53,7 +53,7 @@
|
||||
* (Russell King). He made them for ARM. It would seem
|
||||
* that the ARM is powerful enough to do this in C whereas
|
||||
* i386 and m64k must use assembly to get it fast >:-)
|
||||
* This should make minix fsck systemindependent.
|
||||
* This should make minix fsck system-independent.
|
||||
* (janl@math.uio.no, Nicolai Langfeldt)
|
||||
*
|
||||
* 04.11.96 - Added minor fixes from Andreas Schwab to avoid compiler
|
||||
@ -73,7 +73,7 @@
|
||||
* unless you can be sure nobody is writing to it (and remember that the
|
||||
* kernel can write to it when it searches for files).
|
||||
*
|
||||
* Usuage: fsck [-larvsm] device
|
||||
* Usage: fsck [-larvsm] device
|
||||
* -l for a listing of all the filenames
|
||||
* -a for automatic repairs (not implemented)
|
||||
* -r for repairs (interactive) (not implemented)
|
||||
|
@ -37,7 +37,7 @@
|
||||
* <misiek@misiek.eu.org>)
|
||||
* Ported to Busybox - Alfred M. Szmidt <ams@trillian.itslinux.org>
|
||||
* Removed --version/-V and --help/-h in
|
||||
* Removed prase_error(), using bb_error_msg() from Busybox instead
|
||||
* Removed parse_error(), using bb_error_msg() from Busybox instead
|
||||
* Replaced our_malloc with xmalloc and our_realloc with xrealloc
|
||||
*
|
||||
*/
|
||||
@ -99,7 +99,7 @@ const char *normalize(const char *arg)
|
||||
return BUFFER;
|
||||
}
|
||||
|
||||
/* Each character in arg may take upto four characters in the result:
|
||||
/* Each character in arg may take up to four characters in the result:
|
||||
For a quote we need a closing quote, a backslash, a quote and an
|
||||
opening quote! We need also the global opening and closing quote,
|
||||
and one extra character for '\0'. */
|
||||
@ -278,7 +278,7 @@ void set_shell(const char *new_shell)
|
||||
|
||||
|
||||
/* Exit codes:
|
||||
* 0) No errors, succesful operation.
|
||||
* 0) No errors, successful operation.
|
||||
* 1) getopt(3) returned an error.
|
||||
* 2) A problem with parameter parsing for getopt(1).
|
||||
* 3) Internal error, out of memory
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <unistd.h>
|
||||
#include "busybox.h"
|
||||
|
||||
/* Copied from linux/rtc.h to eliminate the kernel dependancy */
|
||||
/* Copied from linux/rtc.h to eliminate the kernel dependency */
|
||||
struct linux_rtc_time {
|
||||
int tm_sec;
|
||||
int tm_min;
|
||||
|
@ -49,7 +49,7 @@
|
||||
*
|
||||
* Usage: mkfs [-c | -l filename ] [-v] [-nXX] [-iXX] device [size-in-blocks]
|
||||
*
|
||||
* -c for readablility checking (SLOW!)
|
||||
* -c for readability checking (SLOW!)
|
||||
* -l for getting a list of bad blocks from a file.
|
||||
* -n for namelength (currently the kernel only uses 14 or 30)
|
||||
* -i for number of inodes
|
||||
@ -602,7 +602,7 @@ static inline void setup_tables(void)
|
||||
|
||||
/*
|
||||
* Perform a test of a block; return the number of
|
||||
* blocks readable/writeable.
|
||||
* blocks readable/writable.
|
||||
*/
|
||||
static inline long do_check(char *buffer, int try, unsigned int current_block)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@
|
||||
* major adjustments to option parsing, and some serious
|
||||
* dieting all around.
|
||||
*
|
||||
* 1999-11-06 mtab suppport is back - andersee
|
||||
* 1999-11-06 mtab support is back - andersee
|
||||
*
|
||||
* 2000-01-12 Ben Collins <bcollins@debian.org>, Borrowed utils-linux's
|
||||
* mount to add loop support.
|
||||
|
Loading…
Reference in New Issue
Block a user