| Bsoft 2.0.5 Bernard's software package

Functions | Variables
bfix.cpp File Reference

Program to fix end-of-line characters in ascii files. More...

`#include "utilities.h"`
`#include "options.h"`
`#include "timer.h"`
`#include <fstream>`

Go to the source code of this file.

## Functions
long | replace_a_character (unsigned char *buf, long size, int chin, int chout)
long | delete_a_character (unsigned char *buf, long size, int c)
int | main (int argc, char **argv)

## Variables
int | verbose
const char * | use []

## Detailed Description

Program to fix end-of-line characters in ascii files.

Author
  Bernard Heymann

Date
  Created: 19990206
  Modified: 20120306

Definition in file bfix.cpp.

## Function Documentation

## ◆ delete_a_character()

long delete_a_character | ( | unsigned char * | buf,
|  | long | size,
|  | int | c
| ) |  |

Definition at line 170 of file bfix.cpp.

## ◆ main()

int main | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 43 of file bfix.cpp.

## ◆ replace_a_character()

long replace_a_character | ( | unsigned char * | buf,
|  | long | size,
|  | int | chin,
|  | int | chout
| ) |  |

Definition at line 153 of file bfix.cpp.

## Variable Documentation

## ◆ use

const char* use[]

Initial value:
= {
" ",
"Usage: bfix [options] file.in file.out",
"--------------------------------------",
"Replaces single characters in a file.",
"If only one file name is given, the output is sent to stdout.",
"If a \".\" character is used for output, the input file name is used",
"(without the path).",
"Note: replace and delete are mutually exclusive - the last option wins",
" ",
"Actions:",
"-n Replace <cr> with <nl> (To UNIX style)",
"-c Replace <nl> with <cr> (To MAC style)",
"-replace 9,32 Replace all character values 9 with character values 32",
"-delete 13 Delete all character values 13",
" ",
"Parameters:",
"-verbose 7 Verbosity of output",
" ",
NULL
}

Definition at line 21 of file bfix.cpp.

## ◆ verbose

int verbose