Bsoft 2.1.4
Bernard's software package
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>

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

Function Documentation

◆ delete_a_character()

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

◆ main()

int main ( int  argc,
char **  argv 
)

◆ replace_a_character()

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

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
}

◆ verbose

int verbose
extern