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
/* 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) {
/*
* 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
*/
/*
- * 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.
/* 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 */
} 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,
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));
}
/*
* 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.
/* 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) {
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");
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");
}
}
}
-/* 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.
*/
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
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 :-)
*/
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);
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);
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
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
* 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.
}
}
- /* 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 */
/*
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.
#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
/* 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];
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;
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.) */
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
}
/* 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;
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 */
/* 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;
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),
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.
/* 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) */
}
}
- /* 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) {
#include <string.h>
#include <unistd.h>
-/* Defailt input buffer size */
+/* Default input buffer size */
#define IBUFSIZ 2048
/* Default output buffer size */
/* 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 */
* 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:
/*
* 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>
}
/* 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) {
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))
*
* 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
/*
* 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)
{
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 */
/* 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)
{
/* 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.
*/
/* 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'.
/*
* 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()
* 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.
*
* 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>
#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)
{
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;
}
/* 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) {
/*
* 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,
*/
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:
* 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
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++;
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] = '~';
}
//----- 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
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
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("--");
* (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>.
*
"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" \
/*
* 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
*
*/
/*
* 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
*
*/
/* 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.
*/
*
*/
-/* 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.
*/
/*
* 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)
{
* 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>
* 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
* 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.
*/
*
* 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
#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.
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)
/*
- * 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.
/* 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>
*
/*
* Utility routines.
*
- * Connect to host at port using address resolusion from getaddrinfo
+ * Connect to host at port using address resolution from getaddrinfo
*
*/
/*
* 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).
/*
* 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).
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] )
const char *err_msg;
/*
- * Obtain password entry and change privilages
+ * Obtain password entry and change privileges
*/
pas = getpwnam(user);
if (pas == 0) {
ForkJob(user, line, mailFd, SENDMAIL, SENDMAIL_ARGS, NULL);
}
#else
-/* crond whithout sendmail */
+/* crond without sendmail */
static void RunJob(const char *user, CronLine * line)
{
struct passwd *pas;
/*
- * Obtain password entry and change privilages
+ * Obtain password entry and change privileges
*/
if ((pas = getpwnam(user)) == 0) {
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>>.
/* 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
*/
#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. */
/*======================================================================*/
#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. */
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 */
* 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:
* /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.
*
*
# 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
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",
*
> $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.
*
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;
}
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;
#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
* 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.
*/
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;
}
* 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
*/
/*
* 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>
*
/* 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
}
-/* 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)
* 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
/* 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
}
-/* 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)
{
*
* 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
*
* 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
}
-/* 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;
/* serverpacket.c
*
- * Constuct and send DHCP server packets
+ * Construct and send DHCP server packets
*
* Russ Dill <Russ.Dill@asu.edu> July 2001
*
/* 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
#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
* 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 $
*/
*
* (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 */
* 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.
*
* 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.
*/
/*
- * The eval commmand.
+ * The eval command.
*/
static int
* 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
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
*/
/* $NetBSD: miscbltin.c,v 1.31 2002/11/24 22:35:41 christos Exp $ */
/*
- * Miscelaneous builtins.
+ * Miscellaneous builtins.
*/
#undef rflag
/* 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). */
* 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.
* - 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)
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 /. */
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;
/* 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;
/* 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>
putchar('\007');
}
-/* Move back one charactor */
+/* Move back one character */
/* special for slow terminal */
static void input_backward(int num)
{
#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 */
}
-/* Move forward one charactor */
+/* Move forward one character */
static void input_forward(void)
{
if (cursor < len)
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)
{
#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 */
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 */
* 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
*/
/*
- * 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.
* (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
* 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)
* <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
*
*/
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'. */
/* 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
#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;
*
* 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
/*
* 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)
{
* 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.