switch (switch_val) {
case BZ_X_MAGIC_1:
s->state = BZ_X_MAGIC_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MAGIC_2:
s->state = BZ_X_MAGIC_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MAGIC_3:
s->state = BZ_X_MAGIC_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MAGIC_4:
s->state = BZ_X_MAGIC_4;
- if (get_bits(s, &s->blockSize100k, 8) == FALSE) {
+ if (! get_bits(s, &s->blockSize100k, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BLKHDR_1:
s->state = BZ_X_BLKHDR_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BLKHDR_2:
s->state = BZ_X_BLKHDR_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BLKHDR_3:
s->state = BZ_X_BLKHDR_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BLKHDR_4:
s->state = BZ_X_BLKHDR_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BLKHDR_5:
s->state = BZ_X_BLKHDR_5;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BLKHDR_6:
s->state = BZ_X_BLKHDR_6;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BCRC_1:
s->state = BZ_X_BCRC_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BCRC_2:
s->state = BZ_X_BCRC_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BCRC_3:
s->state = BZ_X_BCRC_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_BCRC_4:
s->state = BZ_X_BCRC_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
int tmp = s->blockRandomised;
const int ret = get_bits(s, &tmp, 1);
s->blockRandomised = tmp;
- if (ret == FALSE) {
+ if (! ret) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ORIGPTR_1:
s->state = BZ_X_ORIGPTR_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ORIGPTR_2:
s->state = BZ_X_ORIGPTR_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ORIGPTR_3:
s->state = BZ_X_ORIGPTR_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MAPPING_1:
for (i = 0; i < 16; i++) {
s->state = BZ_X_MAPPING_1;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
for (j = 0; j < 16; j++) {
case BZ_X_MAPPING_2:
s->state = BZ_X_MAPPING_2;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
/*--- Now the selectors ---*/
case BZ_X_SELECTOR_1:
s->state = BZ_X_SELECTOR_1;
- if (get_bits(s, &nGroups, 3) == FALSE) {
+ if (! get_bits(s, &nGroups, 3)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_SELECTOR_2:
s->state = BZ_X_SELECTOR_2;
- if (get_bits(s, &nSelectors, 15) == FALSE) {
+ if (! get_bits(s, &nSelectors, 15)) {
retVal = BZ_OK;
goto save_state_and_return;
}
while (1) {
case BZ_X_SELECTOR_3:
s->state = BZ_X_SELECTOR_3;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
for (t = 0; t < nGroups; t++) {
case BZ_X_CODING_1:
s->state = BZ_X_CODING_1;
- if (get_bits(s, &curr, 5) == FALSE) {
+ if (! get_bits(s, &curr, 5)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_CODING_2:
s->state = BZ_X_CODING_2;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_CODING_3:
s->state = BZ_X_CODING_3;
- if (get_bits(s, &uc, 1) == FALSE) {
+ if (! get_bits(s, &uc, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
nblock = 0;
- if (get_mtf_val_init() == FALSE) {
+ if (! get_mtf_val_init()) {
goto save_state_and_return;
}
case BZ_X_MTF_1:
s->state = BZ_X_MTF_1;
- if (get_bits(s, &zvec, zn) == FALSE) {
+ if (! get_bits(s, &zvec, zn)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MTF_2:
s->state = BZ_X_MTF_2;
- if (get_bits(s, &zj, 1) == FALSE) {
+ if (! get_bits(s, &zj, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
}
}
N = N * 2;
- if (get_mtf_val_init() == FALSE) {
+ if (! get_mtf_val_init()) {
goto save_state_and_return;
}
case BZ_X_MTF_3:
s->state = BZ_X_MTF_3;
- if (get_bits(s, &zvec, zn) == FALSE) {
+ if (! get_bits(s, &zvec, zn)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MTF_4:
s->state = BZ_X_MTF_4;
- if (get_bits(s, &zj, 1) == FALSE) {
+ if (! get_bits(s, &zj, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
}
nblock++;
- if (get_mtf_val_init() == FALSE) {
+ if (! get_mtf_val_init()) {
goto save_state_and_return;
}
case BZ_X_MTF_5:
s->state = BZ_X_MTF_5;
- if (get_bits(s, &zvec, zn) == FALSE) {
+ if (! get_bits(s, &zvec, zn)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_MTF_6:
s->state = BZ_X_MTF_6;
- if (get_bits(s, &zj, 1) == FALSE) {
+ if (! get_bits(s, &zj, 1)) {
retVal = BZ_OK;
goto save_state_and_return;
}
endhdr_2:
case BZ_X_ENDHDR_2:
s->state = BZ_X_ENDHDR_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ENDHDR_3:
s->state = BZ_X_ENDHDR_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ENDHDR_4:
s->state = BZ_X_ENDHDR_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ENDHDR_5:
s->state = BZ_X_ENDHDR_5;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_ENDHDR_6:
s->state = BZ_X_ENDHDR_6;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_CCRC_1:
s->state = BZ_X_CCRC_1;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((unsigned int)uc);
case BZ_X_CCRC_2:
s->state = BZ_X_CCRC_2;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_CCRC_3:
s->state = BZ_X_CCRC_3;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
case BZ_X_CCRC_4:
s->state = BZ_X_CCRC_4;
- if (get_bits(s, &uc, 8) == FALSE) {
+ if (! get_bits(s, &uc, 8)) {
retVal = BZ_OK;
goto save_state_and_return;
}
}
}
/* If the package from the status file wasnt handle above, do it now*/
- if (write_flag == FALSE) {
+ if (! write_flag) {
fprintf(new_status_file, "%s\n\n", control_buffer);
}
exclude_files = create_list(conffile_name);
/* Some directories cant be removed straight away, so do multiple passes */
- while (remove_file_array(remove_files, exclude_files) == TRUE);
+ while (remove_file_array(remove_files, exclude_files));
/* Create a list of all /var/lib/dpkg/info/<package> files */
remove_files = xmalloc(sizeof(char *) * 11);
exclude_files[0] = NULL;
/* Some directories cant be removed straight away, so do multiple passes */
- while (remove_file_array(remove_files, exclude_files) == TRUE);
+ while (remove_file_array(remove_files, exclude_files));
/* Create a list of all /var/lib/dpkg/info/<package> files */
remove_files = xmalloc(sizeof(char *) * 11);
fclose(out_file);
fclose(in_file);
- if (delete_old_file == TRUE) {
+ if (delete_old_file) {
if (unlink(delete_file_name) < 0) {
error_msg_and_die("Couldnt remove %s", delete_file_name);
}
}
}
- if (extract_flag == TRUE) {
+ if (extract_flag) {
buffer = extract_archive(src_stream, out_stream, file_entry, extract_function, prefix);
} else {
/* seek past the data entry */
free(file_entry);
}
return(buffer);
-}
\ No newline at end of file
+}
/* Read the directory/files and iterate over them one at a time */
while (*argv != NULL) {
- if (recursive_action(*argv++, TRUE, FALSE, FALSE,
+ if (! recursive_action(*argv++, TRUE, FALSE, FALSE,
writeFileToTarball, writeFileToTarball,
- (void*) &tbInfo) == FALSE) {
+ (void*) &tbInfo)) {
errorFlag = TRUE;
}
}
/* Hang up the tools, close up shop, head home */
close(tarFd);
- if (errorFlag == TRUE) {
+ if (errorFlag) {
error_msg("Error exit delayed from previous errors");
freeHardLinkInfo(&tbInfo.hlInfoHead);
return(FALSE);
exclude_count++;
}
- if (found == FALSE) {
+ if (! found) {
new_include_list = realloc(new_include_list, sizeof(char *) * (include_count + 2));
new_include_list[new_include_count] = include_list[include_count];
new_include_count++;
while (--argc > 0) {
if(!(strcmp(*++argv, "-"))) {
print_file(stdin);
- } else if (print_file_by_name(*argv) == FALSE) {
+ } else if (! print_file_by_name(*argv)) {
status = EXIT_FAILURE;
}
}
/* Ok, ready to do the deed now */
while (++optind < argc) {
- if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
- fileAction, fileAction, NULL) == FALSE) {
+ if (! recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
+ fileAction, fileAction, NULL)) {
return EXIT_FAILURE;
}
}
if (argc > optind && argc > 2 && argv[optind]) {
/* Parse the specified mode */
mode_t mode;
- if (parse_mode(argv[optind], &mode) == FALSE) {
+ if (! parse_mode(argv[optind], &mode)) {
error_msg_and_die( "unknown mode: %s", argv[optind]);
}
} else {
/* Ok, ready to do the deed now */
for (i = optind + 1; i < argc; i++) {
- if (recursive_action (argv[i], recursiveFlag, FALSE, FALSE, fileAction,
- fileAction, argv[optind]) == FALSE) {
+ if (! recursive_action (argv[i], recursiveFlag, FALSE, FALSE, fileAction,
+ fileAction, argv[optind])) {
return EXIT_FAILURE;
}
}
/* Ok, ready to do the deed now */
while (++optind < argc) {
- if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
- fileAction, fileAction, NULL) == FALSE) {
+ if (! recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
+ fileAction, fileAction, NULL)) {
return EXIT_FAILURE;
}
}
static int my_stat(struct dnode *cur)
{
#ifdef CONFIG_FEATURE_LS_FOLLOWLINKS
- if (follow_links == TRUE) {
+ if (follow_links) {
if (stat(cur->fullname, &cur->dstat)) {
perror_msg("%s", cur->fullname);
status = EXIT_FAILURE;
}
while (argc > 0) {
- fd = open(*argv, (create == FALSE) ? O_RDWR : O_RDWR | O_CREAT,
+ fd = open(*argv, create ? O_RDWR | O_CREAT : O_RDWR,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (fd < 0) {
- if (create == FALSE && errno == ENOENT) {
+ if (! create && errno == ENOENT) {
argc--;
argv++;
continue;
*/
static const char vi_Version[] =
- "$Id: vi.c,v 1.19 2001/11/17 07:14:06 andersen Exp $";
+ "$Id: vi.c,v 1.20 2001/12/20 23:12:47 kraai Exp $";
/*
* To compile for standalone use:
break;
if (strncasecmp((char *) p, "quit", cnt) == 0 ||
strncasecmp((char *) p, "q!", cnt) == 0) { // delete lines
- if (file_modified == TRUE && p[1] != '!') {
+ if (file_modified && p[1] != '!') {
psbs("No write since last change (:quit! overrides)");
} else {
editing = 0;
indicate_error(c);
break;
}
- if (file_modified == TRUE
+ if (file_modified
#ifdef CONFIG_FEATURE_VI_READONLY
- && vi_readonly == FALSE
- && readonly == FALSE
+ && ! vi_readonly
+ && ! readonly
#endif /* CONFIG_FEATURE_VI_READONLY */
) {
cnt = file_write(cfn, text, end - 1);
int sr;
sr= 0;
// don't edit, if the current file has been modified
- if (file_modified == TRUE && useforce != TRUE) {
+ if (file_modified && ! useforce) {
psbs("No write since last change (:edit! overrides)");
goto vc1;
}
" %dL, %dC", cfn,
(sr < 0 ? " [New file]" : ""),
#ifdef CONFIG_FEATURE_VI_READONLY
- ((vi_readonly == TRUE || readonly == TRUE) ? " [Read only]" : ""),
+ ((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
li, ch);
} else if (strncasecmp((char *) cmd, "file", i) == 0) { // what File is this
Hit_Return();
} else if ((strncasecmp((char *) cmd, "quit", i) == 0) || // Quit
(strncasecmp((char *) cmd, "next", i) == 0)) { // edit next file
- if (useforce == TRUE) {
+ if (useforce) {
// force end of argv list
if (*cmd == 'q') {
optind = save_argc;
goto vc1;
}
// don't exit if the file been modified
- if (file_modified == TRUE) {
+ if (file_modified) {
psbs("No write since last change (:%s! overrides)",
(*cmd == 'q' ? "quit" : "next"));
goto vc1;
#endif /* CONFIG_FEATURE_VI_READONLY */
" %dL, %dC", fn,
#ifdef CONFIG_FEATURE_VI_READONLY
- ((vi_readonly == TRUE || readonly == TRUE) ? " [Read only]" : ""),
+ ((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
li, ch);
if (ch > 0) {
file_modified = TRUE;
}
} else if (strncasecmp((char *) cmd, "rewind", i) == 0) { // rewind cmd line args
- if (file_modified == TRUE && useforce != TRUE) {
+ if (file_modified && ! useforce) {
psbs("No write since last change (:rewind! overrides)");
} else {
// reset the filenames to edit
fn = args;
}
#ifdef CONFIG_FEATURE_VI_READONLY
- if ((vi_readonly == TRUE || readonly == TRUE) && useforce == FALSE) {
+ if ((vi_readonly || readonly) && ! useforce) {
psbs("\"%s\" File is read only", fn);
goto vc3;
}
li = count_lines(q, r);
ch = r - q + 1;
// see if file exists- if not, its just a new file request
- if (useforce == TRUE) {
+ if (useforce) {
// if "fn" is not write-able, chmod u+w
// sprintf(syscmd, "chmod u+w %s", fn);
// system(syscmd);
forced = TRUE;
}
l = file_write(fn, q, r);
- if (useforce == TRUE && forced == TRUE) {
+ if (useforce && forced) {
// chmod u-w
// sprintf(syscmd, "chmod u-w %s", fn);
// system(syscmd);
// see if we can open the file
#ifdef CONFIG_FEATURE_VI_READONLY
- if (vi_readonly == TRUE) goto fi1; // do not try write-mode
+ if (vi_readonly) goto fi1; // do not try write-mode
#endif
fd = open((char *) fn, O_RDWR); // assume read & write
if (fd < 0) {
//----- 1. Try the standard terminal ESC sequence
sprintf((char *) cm1, CMrc, row + 1, col + 1);
cm= cm1;
- if (opti == FALSE) goto pc0;
+ if (! opti) goto pc0;
#ifdef CONFIG_FEATURE_VI_OPTIMIZE_CURSOR
//----- find the minimum # of chars to move cursor -------------
"%s line %d of %d --%d%%--",
(cfn != 0 ? (char *) cfn : "No file"),
#ifdef CONFIG_FEATURE_VI_READONLY
- ((vi_readonly == TRUE || readonly == TRUE) ? " [Read only]" : ""),
+ ((vi_readonly || readonly) ? " [Read only]" : ""),
#endif /* CONFIG_FEATURE_VI_READONLY */
- (file_modified == TRUE ? " [modified]" : ""),
+ (file_modified ? " [modified]" : ""),
cur, tot, percent);
}
cs= 0;
ce= columns-1;
sp = &screen[li * columns]; // start of screen line
- if (full_screen == TRUE) {
+ if (full_screen) {
// force re-draw of every single column from 0 - columns-1
goto re0;
}
if (ce > columns-1) ce= columns-1;
if (cs > ce) { cs= 0; ce= columns-1; }
// is there a change between vitual screen and buf
- if (changed == TRUE) {
+ if (changed) {
// copy changed part of buffer to virtual screen
memmove(sp+cs, buf+(cs+offset), ce-cs+1);
}
if (firstopt == 1) {
- if (recursive_action(".", TRUE, dereference, FALSE, fileAction,
- fileAction, NULL) == FALSE)
+ if (! recursive_action(".", TRUE, dereference, FALSE, fileAction,
+ fileAction, NULL))
status = EXIT_FAILURE;
} else {
for (i = 1; i < firstopt; i++) {
- if (recursive_action(argv[i], TRUE, dereference, FALSE, fileAction,
- fileAction, NULL) == FALSE)
+ if (! recursive_action(argv[i], TRUE, dereference, FALSE, fileAction,
+ fileAction, NULL))
status = EXIT_FAILURE;
}
}
}
}
- if (get_enter == TRUE) {
+ if (get_enter) {
/*
* Save memory by not exec-ing anything large (like a shell)
* before the user wants it. This is critical if swap is not
}
a++;
}
- if (foundIt == TRUE)
+ if (foundIt)
continue;
else {
/* Choke on an unknown action */
++didMalloc;
}
- if (followLinks == TRUE)
+ if (followLinks)
status = stat(fileName, statBuf);
else
status = lstat(fileName, statBuf);
}
break;
}
- if (exit_flag == TRUE) {
+ if (exit_flag) {
/* Check that the names are valid */
offset_value_end = offset;
name_length = offset_name_end - offset_name_start;
struct stat statbuf;
struct dirent *next;
- if (followLinks == TRUE)
+ if (followLinks)
status = stat(fileName, &statbuf);
else
status = lstat(fileName, &statbuf);
return FALSE;
}
- if ((followLinks == FALSE) && (S_ISLNK(statbuf.st_mode))) {
+ if (! followLinks && (S_ISLNK(statbuf.st_mode))) {
if (fileAction == NULL)
return TRUE;
else
return fileAction(fileName, &statbuf, userData);
}
- if (recurse == FALSE) {
+ if (! recurse) {
if (S_ISDIR(statbuf.st_mode)) {
if (dirAction != NULL)
return (dirAction(fileName, &statbuf, userData));
if (S_ISDIR(statbuf.st_mode)) {
DIR *dir;
- if (dirAction != NULL && depthFirst == FALSE) {
+ if (dirAction != NULL && ! depthFirst) {
status = dirAction(fileName, &statbuf, userData);
- if (status == FALSE) {
+ if (! status) {
perror_msg("%s", fileName);
return FALSE;
} else if (status == SKIP)
continue;
}
nextFile = concat_path_file(fileName, next->d_name);
- if (recursive_action(nextFile, TRUE, followLinks, depthFirst,
- fileAction, dirAction, userData) == FALSE) {
+ if (! recursive_action(nextFile, TRUE, followLinks, depthFirst,
+ fileAction, dirAction, userData)) {
status = FALSE;
}
free(nextFile);
}
closedir(dir);
- if (dirAction != NULL && depthFirst == TRUE) {
- if (dirAction(fileName, &statbuf, userData) == FALSE) {
+ if (dirAction != NULL && depthFirst) {
+ if (! dirAction(fileName, &statbuf, userData)) {
perror_msg("%s", fileName);
return FALSE;
}
}
- if (status == FALSE)
+ if (! status)
return FALSE;
} else {
if (fileAction == NULL)
#ifndef MODUTILS_MODULE_H
static const int MODUTILS_MODULE_H = 1;
-#ident "$Id: insmod.c,v 1.76 2001/12/14 16:08:17 kraai Exp $"
+#ident "$Id: insmod.c,v 1.77 2001/12/20 23:13:08 kraai 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
#ifndef MODUTILS_OBJ_H
static const int MODUTILS_OBJ_H = 1;
-#ident "$Id: insmod.c,v 1.76 2001/12/14 16:08:17 kraai Exp $"
+#ident "$Id: insmod.c,v 1.77 2001/12/20 23:13:08 kraai Exp $"
/* The relocatable object is manipulated using elfin types. */
strcpy(module_dir, _PATH_MODULES);
/* No module found under /lib/modules/`uname -r`, this
* time cast the net a bit wider. Search /lib/modules/ */
- if (recursive_action(module_dir, TRUE, FALSE, FALSE,
- check_module_name_match, 0, m_fullName) == FALSE)
+ if (! recursive_action(module_dir, TRUE, FALSE, FALSE,
+ check_module_name_match, 0, m_fullName))
{
if (m_filename[0] == '\0'
|| ((fp = fopen(m_filename, "r")) == NULL))
break;
case TS_SUB1: /* Subnegotiation */
case TS_SUB2: /* Subnegotiation */
- if (subneg(c) == TRUE)
+ if (subneg(c))
G.telstate = TS_0;
break;
}
* upon exit, so we can save a byte or two */
argv++;
}
- if (all_found == FALSE)
+ if (! all_found)
return EXIT_FAILURE;
}
#endif
umask(mask);
} else {
mask = ~mask & 0777;
- if (parse_mode(ap, &mask) == FALSE) {
+ if (! parse_mode(ap, &mask)) {
error("Illegal mode: %s", ap);
}
umask(~mask & 0777);
/*
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
* This file contains code for the times builtin.
- * $Id: ash.c,v 1.37 2001/12/06 03:37:38 aaronl Exp $
+ * $Id: ash.c,v 1.38 2001/12/20 23:13:19 kraai Exp $
*/
static int timescmd (int argc, char **argv)
{
goto cont;
str_found = add_quote_for_spec_chars(found);
if (type == FIND_FILE_ONLY ||
- (type == FIND_EXE_ONLY && is_execute(&st) == TRUE))
+ (type == FIND_EXE_ONLY && is_execute(&st)))
strcat(str_found, " ");
}
/* Add it to the list */
}
return;
}
- if (*lastWasTab == FALSE) {
+ if (! *lastWasTab) {
char *tmp;
int len_found;
next_command = command;
}
- if (expand_arguments(next_command) == FALSE) {
+ if (! expand_arguments(next_command)) {
free(command);
command = (char *) xcalloc(BUFSIZ, sizeof(char));
next_command = NULL;
}
}
- if (doFork == TRUE) {
+ if (doFork) {
#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
if (daemon(0, 1) < 0)
perror_msg_and_die("daemon");
fl.l_len = 1;
#ifdef CONFIG_FEATURE_IPC_SYSLOG
- if ((circular_logging == TRUE) && (buf != NULL)){
+ if ((circular_logging) && (buf != NULL)){
char b[1024];
va_start (arguments, fmt);
vsprintf (b, fmt, arguments);
"%s:%d",RemoteHost,RemotePort);
}
}
- if (local_logging == TRUE)
+ if (local_logging)
#endif
/* now spew out the message to wherever it is supposed to go */
message("%s %s %s %s\n", timestamp, LocalHostName, res, msg);
FD_SET (sock_fd, &fds);
#ifdef CONFIG_FEATURE_IPC_SYSLOG
- if (circular_logging == TRUE ){
+ if (circular_logging ){
ipcsyslog_init();
}
#endif
#ifdef CONFIG_FEATURE_REMOTE_LOG
- if (doRemoteLog == TRUE){
+ if (doRemoteLog){
init_RemoteLog();
}
#endif
#ifdef CONFIG_FEATURE_REMOTE_LOG
/* If they have not specified remote logging, then log locally */
- if (doRemoteLog == FALSE)
+ if (! doRemoteLog)
local_logging = TRUE;
#endif
umask(0);
- if (doFork == TRUE) {
+ if (doFork) {
#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
if (daemon(0, 1) < 0)
perror_msg_and_die("daemon");
char *lofile = NULL;
#endif
- if (fakeIt == FALSE)
+ if (! fakeIt)
{
#if defined CONFIG_FEATURE_MOUNT_LOOP
if (use_loop==TRUE) {
if (status == 0 || fakeIt==TRUE) {
#if defined CONFIG_FEATURE_MTAB_SUPPORT
- if (useMtab == TRUE) {
+ if (useMtab) {
erase_mtab(specialfile); // Clean any stale entries
write_mtab(specialfile, dir, filesystemtype, flags, mtab_opts);
}
f++;
}
#if defined CONFIG_FEATURE_MOUNT_LOOP
- if (gotone == FALSE && !strcasecmp("loop", options)) { /* loop device support */
+ if (! gotone && !strcasecmp("loop", options)) { /* loop device support */
use_loop = TRUE;
gotone = TRUE;
}
#endif
- if (*strflags && strflags != '\0' && gotone == FALSE) {
+ if (*strflags && strflags != '\0' && ! gotone) {
char *temp = strflags;
temp += strlen(strflags);
*temp++ = ',';
*temp++ = '\0';
}
- if (gotone == FALSE)
+ if (! gotone)
strcat(strflags, options);
if (comma) {
*comma = ',';
status = do_mount(blockDevice, directory, filesystemType,
flags | MS_MGC_VAL, string_flags,
useMtab, fakeIt, mtab_opts, mount_all);
- if (status == TRUE)
+ if (status)
break;
}
}
status = do_mount(blockDevice, directory, filesystemType,
flags | MS_MGC_VAL, string_flags,
useMtab, fakeIt, mtab_opts, mount_all);
- if (status == TRUE)
+ if (status)
break;
}
}
fakeIt, mtab_opts, mount_all);
}
- if (status == FALSE) {
- if (whineOnErrors == TRUE) {
+ if (! status) {
+ if (whineOnErrors) {
perror_msg("Mounting %s on %s failed", blockDevice, directory);
}
return (FALSE);
if (optind + 1 < argc)
directory = simplify_path(argv[optind + 1]);
- if (all == TRUE || optind + 1 == argc) {
+ if (all || optind + 1 == argc) {
struct mntent *m = NULL;
FILE *f = setmntent("/etc/fstab", "r");
fstabmount = TRUE;
perror_msg_and_die( "\nCannot read /etc/fstab");
while ((m = getmntent(f)) != NULL) {
- if (all == FALSE && optind + 1 == argc && (
+ if (! all && optind + 1 == argc && (
(strcmp(device, m->mnt_fsname) != 0) &&
(strcmp(device, m->mnt_dir) != 0) ) ) {
continue;
}
- if (all == TRUE && ( // If we're mounting 'all'
+ if (all && ( // If we're mounting 'all'
(strstr(m->mnt_opts, "noauto")) || // and the file system isn't noauto,
(strstr(m->mnt_type, "swap")) || // and isn't swap or nfs, then mount it
(strstr(m->mnt_type, "nfs")) ) ) {
continue;
}
- if (all == TRUE || flags == 0) { // Allow single mount to override fstab flags
+ if (all || flags == 0) { // Allow single mount to override fstab flags
flags = 0;
string_flags = string_flags_buf;
*string_flags = '\0';
string_flags, useMtab, fakeIt, extra_opts, TRUE, all))
rc = EXIT_FAILURE;
- if (all == FALSE)
+ if (! all)
break;
}
- if (fstabmount == TRUE)
+ if (fstabmount)
endmntent(f);
- if (all == FALSE && fstabmount == TRUE && m == NULL)
+ if (! all && fstabmount && m == NULL)
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
return rc;
status = umount(name);
#if defined CONFIG_FEATURE_MOUNT_LOOP
- if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9))
+ if (freeLoop && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9))
/* this was a loop device, delete it */
del_loop(blockDevice);
#endif
#if defined CONFIG_FEATURE_MOUNT_FORCE
- if (status != 0 && doForce == TRUE) {
+ if (status != 0 && doForce) {
status = umount2(blockDevice, MNT_FORCE);
if (status != 0) {
error_msg_and_die("forced umount of %s failed!", blockDevice);
}
}
#endif
- if (status != 0 && doRemount == TRUE && errno == EBUSY) {
+ if (status != 0 && doRemount && errno == EBUSY) {
status = mount(blockDevice, name, NULL,
MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
if (status == 0) {
}
if (status == 0) {
#if defined CONFIG_FEATURE_MTAB_SUPPORT
- if (useMtab == TRUE)
+ if (useMtab)
erase_mtab(name);
#endif
return (TRUE);
}
mtab_read();
- if (umountAll == TRUE) {
- if (umount_all() == TRUE)
+ if (umountAll) {
+ if (umount_all())
return EXIT_SUCCESS;
else
return EXIT_FAILURE;
}
if (realpath(*argv, path) == NULL)
perror_msg_and_die("%s", path);
- if (do_umount(path) == TRUE)
+ if (do_umount(path))
return EXIT_SUCCESS;
perror_msg_and_die("%s", *argv);
}