file_differ Namespace Reference

Provide utilities for comparing two files and seeing their differences. More...


Functions

bool diff_files (const istring &_file1, const istring &_file2, const istring &_options, istring &_results, istring &_error)
 uses the "diff" program to compare _file1 and _file2.
void AddCRs (istring &_string)
 adds carriage returns "\r" to any newlines without them in the string


Detailed Description

Provide utilities for comparing two files and seeing their differences.

The file_differ executes a program named "diff". A program such as "diff.exe" or "diff.bat" be present in your path for the file_differ to work. This has been tested and used with the diff program installed as part of the cygwin package.


Function Documentation

void TEXTUAL_FUNCTION_STYLE file_differ::AddCRs ( istring _string  ) 

adds carriage returns "\r" to any newlines without them in the string

Definition at line 159 of file file_differ.cpp.

References istring::insert(), and istring::length().

bool TEXTUAL_FUNCTION_STYLE file_differ::diff_files ( const istring _file1,
const istring _file2,
const istring _options,
istring _results,
istring _error 
)

uses the "diff" program to compare _file1 and _file2.

the results of the comparison are stored in _results. parameters to the diff program can be provided in _options. if an error occurs false is returned and the _error string will contain a description of the error.

Definition at line 28 of file file_differ.cpp.

References BUFSIZE, NULL, istring::reset(), and istring::s().


Generated on Fri Nov 28 04:31:06 2008 for HOOPLE Libraries by  doxygen 1.5.1