@DATABASE cmp.guide
@AUTHOR ALeX Kazik
@(C) 1997 ALeX Kazik
@$VER: cmp.guide V1.0
@FONT Xhelvetica.font 13
@SMARTWRAP

@NODE MAIN "cmp © 1997 ALeX Kazik"
@NEXT MAIN
@FONT Xcourier.font 13
@{CODE}
@{JCENTER}




@{FG Highlight}
@{b}cmp@{ub} V1.0
written by @{b}ALeX Kazik@{ub} in 1997
@{FG Text}



@{" Introduction " link E.intro} @{" Einführung   " link D.intro}
@{"    Copyright " link E.copyr} @{" Rechtliches  " link D.copyr}
@{"        Usage " link E.usage} @{" Benutzung    " link D.usage}
@{"   Parameters " link E.param} @{" Parameter    " link D.param}
@{"       Output " link E.outpu} @{" Ausgabe      " link D.outpu}
@{"       Author " link E.autho} @{" Autor        " link D.autho}







Special thanks to: Andreas Mayer-Gürr, for proof-reading and testing.
@{APEN 0}This guide is designed for V40.
@ENDNODE

@NODE dump "Example/Beispiel"
@NEXT dump
@PREV dump
@FONT Xcourier.font 13
@{CODE}
@{JCENTER}


0010: 00000002 0000@{FG Highlight}0A40@{FG Text} ......@{FG Highlight}.@@{FG Text}  00000002 0000@{FG Highlight}099B@{FG Text} ......@{FG Highlight}..@{FG Text}
0018: 0000@{FG Highlight}0CBF@{FG Text} 0000@{FG Highlight}0106@{FG Text} ..@{FG Highlight}.¿@{FG Text}..@{FG Highlight}..@{FG Text}  0000@{FG Highlight}01B6@{FG Text} 0000@{FG Highlight}0017@{FG Text} ..@{FG Highlight}.¶@{FG Text}..@{FG Highlight}..@{FG Text}
0020: 000003E9 0000@{FG Highlight}0A40@{FG Text} ...é..@{FG Highlight}.@@{FG Text}  000003E9 0000@{FG Highlight}099B@{FG Text} ...é..@{FG Highlight}..@{FG Text}
0028: @{FG Highlight}2C780004 2A4F226E ,x..*O"n  48E77EFE 24482400 Hç~þ$H$.@{FG Text}
0030: @{FG Highlight}01144AA9@{FG Text} 00@{FG Highlight}AC6652 ..J©@{FG Text}.@{FG Highlight}¬fR  49F90000@{FG Text} 00@{FG Highlight}002C78 Iù..@{FG Text}.@{FG Highlight}.,x@{FG Text}
0038: @{FG Highlight}41E9005C 2F084EAE Aé.\\/.N®  000447F9 000005AC ..Gù...¬@{FG Text}

@ENDNODE

@NODE D.intro "Einführung"
@PREV MAIN


@{b}cmp@{ub} ist ein Programm, welches Dateien in zwei Verzeichnissen (oder Bäumen)
vergleicht. Dies kann sehr nützlich sein, um z.B. bei einem Backup zu untersuchen,
welche Dateien sich geändert haben bzw. hinzugekommen sind.


@{b}cmp@{ub} ist auch in der Lage, zwei Dateien zu vergleichen, und die Unterschiede
darzustellen (Hex-Dump).


Mit @{b}cmp@{ub} und dem device-handler (AmiNet:disk/misc/dev_hdl37_2.lha) können Sie
auch Disketten und Festplatten Byte für Byte vergleichen.


@{FG Highlight}Systemvoraussetzung:@{FG Text} AmigaOS 2.04 oder höher.


@{FG Highlight}Installation:@{FG Text} Kopieren Sie das Programm und die Dokumentation
dahin, wo es Ihnen am liebsten ist.


@ENDNODE

@NODE D.copyr "Rechtliches"


  @{FG Highlight}Copyright © 1997 by ALeX Kazik@{FG Text}


@{b}cmp@{ub} ist ein FreeWare Programm und darf ohne Profit kopiert werden
(max. Diskettenpreis + Porto). @{b}cmp@{ub} darf nur unverändert, komplett und
mit Copyright-Notiz weitergegeben werden. Das Programm
darf ohne schriftliche Genehmigung des
Autors nicht in kommerziellen Programmen benutzt werden.




  @{FG Highlight}Keine Garantie:@{FG Text}


Es wird keine Garantie dafür übernommen, daß das Programm 100%ig zuverlässig
arbeitet. Sie benutzen es auf eigene Gefahr. Es wird keine Haftung
für eventuelle Schäden durch die Benutzung von @{b}cmp@{ub} übernommen.


@ENDNODE

@NODE D.usage "Benutzung"


Durch die ersten beiden Parameter muß @{b}cmp@{ub} übergeben werden, was verglichen werden soll.
Die Parameter können sein:

   @{b}»@{ub}	zwei Dateien: in diesem Fall werden die beiden Dateien verglichen.

   @{b}»@{ub}	eine Datei und ein Verzeichnis: in diesem Fall wird die Datei mit einer
gleichnamigen Datei in dem Verzeichnis verglichen. Dies wird ab jetzt wie der Vergleich
zweier Dateien angesehen, im Gegensatz zum Vergleich zweier Verzeichnisse.

   @{b}»@{ub}	zwei Verzeichnisse oder Pattern: in diesem Fall werden alle Dateien (evtl.
auf die das Pattern paßt) mit gleichnamigen Dateien im zweiten Verzeichnis, und umgekehrt,
verglichen.


Hinweis: Eine Datei kann @{u}nicht@{uu} mit einem Pattern verglichen werden.



Bei einem Vergleich können die acht folgenden Ereignisse eintreten:

  @{FG Highlight}Q@{FG Text}:	Die beiden Dateien sind gleich (e@{FG Highlight}q@{FG Text}ual).

  @{FG Highlight}L@{FG Text}:	Die beiden Dateien unterscheiden sich in der Länge (@{FG Highlight}l@{FG Text}ength).

  @{FG Highlight}C@{FG Text}:	Die beiden Dateien sind gleich lang, unterscheiden sich aber im Inhalt (@{FG Highlight}c@{FG Text}ontents).

  @{FG Highlight}D@{FG Text}:	Die beiden Dateien unterscheiden sich in Länge und Inhalt (@{FG Highlight}d@{FG Text}ifferent).

  @{FG Highlight}A@{FG Text}:	Eine Datei/Verzeichnis im Verzeichnis (-Baum) B gibt es nicht in @{FG Highlight}A@{FG Text}.

  @{FG Highlight}B@{FG Text}:	Eine Datei/Verzeichnis im Verzeichnis (-Baum) A gibt es nicht in @{FG Highlight}B@{FG Text}.

  @{FG Highlight}W@{FG Text}:	Es wurde versucht eine Datei mit einem Verzeichnis zu vergleichen (object @{FG Highlight}w@{FG Text}rong type).

  @{FG Highlight}E@{FG Text}:	Es trat ein sonstiger Fehler auf, z.B. ein Lesefehler (@{FG Highlight}e@{FG Text}rror).



Hier werden nun die wichtigsten Parameter angesprochen, die genaue Benutzung entnehmen
Sie bitte der folgenden Seite. Alle Parameter sind @{b}fett @{ub} und GROß geschrieben.


Für @{b}cmp@{ub} ist eine erweiterte Hilfe verfügbar: Rufen Sie @{b}cmp@{ub} (in einem CLI) mit dem
Parameter "?" auf und geben bei der folgenden Aufforderung noch ein "?" ein.


Die Ausgabe von @{b}cmp@{ub} ergibt sich wie folgt:

   Wenn die beiden Dateien inhaltlich unterschieden werden sollen (C,D) und eine Ausgabe des
Unterschiedes gewünscht wird, gibt ein Hex-Dump die unterschiedlichen Zeilen
aus. Die Unterschiede werden weiß dargestellt (@{"Beispiel" link dump}). Dieser Hex-Dump kann durch die
Option @{b}DUMP@{ub} ein- und ausgeschaltet werden. Bei einem Vergleich zweier Dateien ist der
Hex-Dump standardmäßig eingeschaltet.

   Ein Hex-Dump kann mit CTRL-D abgebrochen werden, der Vergleich wird aber fortgesetzt.

   Wenn die Option @{b}DUMP@{ub} ausgeschaltet ist, werden die Dateien, die sich
in der Länge unterscheiden @{u}nicht@{uu} auf verschiedene Inhalte hin
untersucht. Siehe auch @{b}CHECKD@{ub}.


   Nach der Hex-Dump-Ausgabe (falls eingeschaltet) wird der Dateiname
und das Ergebnis in Klartext ausgegeben. Der Text ist je nach Ergebnis
einer der folgenden:

  @{FG Highlight}Q@{FG Text}:	@{i}[kein Text] @{ui}

  @{FG Highlight}L@{FG Text}:	Difference in length

  @{FG Highlight}C@{FG Text}:	Difference in contents

  @{FG Highlight}D@{FG Text}:	Difference in length&contents

  @{FG Highlight}A,B,W,E@{FG Text}:  Die entsprechenden Fehlermeldungen (siehe oben), ab Workbench 2.1 lokalisiert.


Die Ausgabe kann über die Option @{b}LFORMAT@{ub} vollständig den Wünschen
des Benutzers angepaßt werden.


Nach Beendigung von @{b}cmp@{ub} wird der Rückgabewert wie folgt gesetzt:

    @{FG Highlight}0@{FG Text}:	Alle Dateien sind gleich.

    @{FG Highlight}5@{FG Text}:	Eine oder mehrere Dateien sind unterschiedlich (@{FG Highlight}LCD@{FG Text}).

  @{FG Highlight}10@{FG Text}:	Eine oder mehrere Dateien wurden nicht gefunden / sind vom falschen Typ (@{FG Highlight}ABW@{FG Text}).

  @{FG Highlight}15@{FG Text}:	Ein sonstiger Fehler trat auf (@{FG Highlight}E@{FG Text}).

  @{FG Highlight}20@{FG Text}:	Ein schwerer Fehler trat auf / der Vergleich wurde abgebrochen.


Die Werte 5-15 werden @{u}nur@{uu} gesetzt, wenn auch die Ausgabe gemacht wird (siehe @{b}SHOW@{ub}).


Mit Hilfe der Option @{b}SHOW@{ub} kann spezifiziert werden, welche Meldungen
ausgegeben werden sollen.


Durch die Option @{b}ABORT@{ub} kann @{b}cmp@{ub} mitgeteilt werden, bei welchen
Ereignissen der Vergleich abgebrochen werden soll.


Bei einem Vergleich zweier Verzeichnisse kann mit der Option @{b}ALL@{ub} das
rekursive Durchsuchen beider Verzeichnisbäume aktiviert werden.


Normalerweise werden Links auf Verzeichnisse komplett ignoriert. Lesen Sie
hierzu @{b}HLINK@{ub} und @{b}SLINK@{ub}.


Die genaue Syntax der einzelnen Optionen entnehmen Sie bitte der folgenden Seite.


@ENDNODE

@NODE D.param "Parameter"


Die Syntax für die Benutzung von @{b}cmp@{ub} ist:

@{CODE}
@{b}cmp A/A,B/A,ALL/S,SHOW/K,ABORT/K,DUMP/N,CHECKD/S,ONLYA/S,HLINK/S,SLINK/S,LFORMAT/F@{ub}
@{PARD}

Rufen Sie @{b}cmp@{ub} mit "?" als Parameter auf, bekommen Sie die obige
Syntaxzeile angezeigt und können dann noch Ihre Parameter angeben. Wenn Sie an
dieser Stelle noch ein "?" eingeben, bekommen sie die erweiterte Hilfe
angezeigt.


@{b}A/A@{ub}: Die erste Datei/Verzeichnis/Pattern (siehe Benutzung).


@{b}B/A@{ub}: Die zweite Datei/Verzeichnis/Pattern (siehe Benutzung).


@{b}ALL/S@{ub}: Die beiden Verzeichnisse werden rekursiv verglichen.


@{b}SHOW/K@{ub}: Welche Ausgaben gemacht werden bzw. unterdrückt werden sollen.
Anzugeben ist ein String, der alle zu machenden Ausgaben enthält. Die Ausgaben
werden durch das Ergebnis-Kürzel (@{FG Highlight}QLCDABWE@{FG Text}) spezifiziert.
Die Bedeutung der einzelnen Kürzel ist im Kapitel Benutzung beschrieben. Ein vorangestelltes
"@{b}~@{ub}" negiert die Eingabe. Standardmäßig wird alles angezeigt.


@{b}ABORT/K@{ub}: Bei welchen Ergebnissen abgebrochen werden soll. Die Angaben
entsprechen denen bei @{b}SHOW@{ub}. Standardmäßig wird @{u}nie@{uu} abgebrochen.


@{b}DUMP/N@{ub}: Ob ein Hex-Dump ausgegeben werden soll. Bei einer positiven Zahl werden
max. @{b}DUMP@{ub} unterschiedliche Zeilen ausgegeben. Gleiche Zeilen werden
@{u}nie@{uu} angezeigt. Durch die Angabe einer negativen Zahl werden alle Unterschiede ausgegeben.
Bei einer Angabe von 0 wird der Hex-Dump ausgeschaltet.
Bei einem Vergleich zweier Dateien ist die Standardeinstellung -1, sonst 0.

Ein Hex-Dump kann durch CTRL-D abgebrochen werden, der Vergleich wird
aber fortgesetzt.


@{b}CHECKD/S@{ub}: Wenn zwei zu vergleichende Dateien eine unterschiedliche Länge haben,
wird standardmäßig @{u}nicht@{uu} untersucht, ob der Inhalt (bis zur Längendifferenz)
gleich ist. Mit dieser Option kann dies angeschaltet werden, macht aber meistens
keinen Sinn und kostet nur Zeit. Diese Option wird automatisch aktiviert, wenn
@{b}DUMP@{ub} ungleich 0 ist.


@{b}ONLYA/S@{ub}: Im Normalfall werden bei einem Vergleich zweier Verzeichnisse alle
Dateien (Verzeichnisse) in dem 1. Baum mit dem 2., und umgekehrt, verglichen.
Bei eingeschalteter Option wird nur das 1. Verzeichnis durchsucht und mit dem 2.
verglichen. Dateien/Verzeichnisse, die im 2. Verzeichnis auftauchen, aber nicht im 1.,
werden nicht angezeigt/durchsucht.


@{b}HLINK/S@{ub}: Da es durch Links möglich ist, eine zyklische Struktur zu erzeugen,
die bei einem Vergleich nicht bemerkt wird, würde @{b}cmp@{ub} im "Kreis" laufen,
und @{u}nie@{uu} enden. Deswegen werden Hardlinks auf Verzeichnisse normalerweise
@{u}nicht@{uu} verfolgt. Mit dieser Option kann das Verfolgen von Hardlinks auf
Verzeichnisse aktiviert werden.

Links auf Dateien werden untersucht.


@{b}SLINK/S@{ub}: Wie @{b}HLINK@{ub}, ob Softlinks auf Verzeichnisse verfolgt werden sollen.


@{b}LFORMAT/F@{ub}: Dies ist wohl die umfangreichste Option von @{b}cmp@{ub}.
Mit ihr kann das Aussehen der Ausgabe bestimmt werden. Allerdings nicht das
Aussehen des Hex-Dumps. Wie dies genau funktioniert, lesen Sie auf der folgenden Seite.


@ENDNODE

@NODE D.outpu "Ausgabe"


Die Ausgabe kann durch die Option @{b}LFORMAT@{ub} verändert werden.


Der Rest der Parameter von @{b}cmp@{ub} wird automatisch als @{b}LFORMAT@{ub} interpretiert.
Es ist also nicht nötig, @{b}LFORMAT@{ub} anzugeben und es ist auch nicht nötig,
den Parameter in Anführungszeichen einzufassen.


Folgende Optionen werden in der Ausgabe unterstützt:

  @{FG Highlight}%n@{FG Text}	Name

  @{FG Highlight}%p@{FG Text}	Pfad (@{FG Highlight}QLCD@{FG Text}: ab Vergleich, @{FG Highlight}ABWE@{FG Text}: absolut)

  @{FG Highlight}%t@{FG Text}	Pfad (@{FG Highlight}QLCD@{FG Text}: ab Vergleich, @{FG Highlight}ABWE@{FG Text}: mit vorangestelltem "@{b}A:@{ub}"/"@{b}B:@{ub}")


  @{FG Highlight}%P@{FG Text}	Pfad + Name (siehe @{FG Highlight}%p@{FG Text})

  @{FG Highlight}%T@{FG Text}	Pfad + Name (siehe @{FG Highlight}%t@{FG Text})


  @{FG Highlight}%e@{FG Text}	Fehler als Text

  @{FG Highlight}%E@{FG Text}	Fehler als Nummer

  @{FG Highlight}%r@{FG Text}	Ergebnis (@{FG Highlight}QLCDABWE@{FG Text})

  @{FG Highlight}%%@{FG Text}	"@{b}%@{ub}"


  @{FG Highlight}*n@{FG Text}, @{FG Highlight}*N@{FG Text}	Eine neue Zeile wird eingefügt

  @{FG Highlight}*e@{FG Text}, @{FG Highlight}*E@{FG Text}	Ein ESC-Zeichen wird eingefügt

  @{FG Highlight}**@{FG Text}    	"@{b}*@{ub}"


Den Ergebnissen werden folgende Fehlernummern/Texte zugewiesen:

  @{FG Highlight}Q@{FG Text}:	700	""

  @{FG Highlight}L@{FG Text}:	701	"Difference in length"

  @{FG Highlight}C@{FG Text}:	702	"Difference in contents"

  @{FG Highlight}D@{FG Text}:	703	"Difference in length&contents"

  @{FG Highlight}A@{FG Text}:	704	Fehlermeldung 205: Objekt nicht gefunden

  @{FG Highlight}B@{FG Text}:	705	Fehlermeldung 205: Objekt nicht gefunden

  @{FG Highlight}W@{FG Text}:	212	Fehlermeldung 212: Objekt ist nicht vom geforderten Typ

  @{FG Highlight}E@{FG Text}:	xxx	Fehlermeldung xxx


Wie in C üblich, können die Optionen noch spezifiziert werden. Dies geschieht durch
das Einfügen von Format-Optionen zwischen "@{b}%@{ub}" und der Option.

Eine Zahl gibt an, wieviele Zeichen lang diese Option dargestellt werden soll.
Wenn die Zahl negativ ist, erfolgt die Ausgabe linksbündig, sonst rechtsbündig.

Mit der vorangestellten Format-Option "@{b}!@{ub}" wird die Ausgabe auf die
Breite der folgenden Zahl gekürzt. Im Falle von @{FG Highlight}%p@{FG Text},@{FG Highlight}%t@{FG Text},@{FG Highlight}%P@{FG Text},@{FG Highlight}%T@{FG Text} wird links
abgeschnitten, bei @{FG Highlight}%n@{FG Text},@{FG Highlight}%e@{FG Text} rechts. Bei @{FG Highlight}%E@{FG Text},@{FG Highlight}%r@{FG Text} wird diese Option ignoriert.


@ENDNODE

@NODE D.autho "Autor"
@NEXT D.autho
@FONT Xcourier.font 13
@{CODE}
@{JCENTER}

Wenn Sie irgendwelche Fragen, Anregungen, Wünsche oder Bug-Reports haben, schreiben Sie mir:
(Ich liebe es, Mail zu bekommen!)


              ALeX  Kazik              
          Stapenhorststr.  81          
            33615 Bielefeld            
                Germany                

E-Mail: @{FG Highlight}akazik@TechFak.Uni-Bielefeld.DE@{FG Text}







@{JRIGHT}
                              ###### ##      ####  ##   ##       
                             ##   ## ##     ##  ##  ## ##        
                             #### ## ##     ######   ###         
                             ## #### ##     ##      ## ##        
                             ##   ## ######  ####  ##   ##       

@ENDNODE

@NODE E.intro "Introduction"
@PREV MAIN


@{b}cmp@{ub} is a program, which compares files in two directories (or trees).
That can be very useful, e.g. to examine in a backup, which
files have been changed or rather are new.


With @{b}cmp@{ub} it is also possible to compare two files, and
display the differences (hex-dump).


With @{b}cmp@{ub} and the device-handler (AmiNet:disk/misc/dev_hdl37_2.lha)
you can also compare disks/harddisks byte for byte.


@{FG Highlight}System requirements:@{FG Text} AmigaOS 2.04 or better.


@{FG Highlight}Installation:@{FG Text} Just copy the program and the
documentation wherever you want.


@ENDNODE

@NODE E.copyr "Copyright"


  @{FG Highlight}Copyright © 1997 by ALeX Kazik@{FG Text}


@{b}cmp@{ub} is a FreeWare program. The package may not be altered in any way
and cannot be used for commercial purposes without the prior written
permission of the author. The copyright message should be preserved.




  @{FG Highlight}No warranty:@{FG Text}


No responsibility or liability will be accepted for any damage that may
appear to have resulted from use of this program. All use is at your own
risk. The software is provided "as is" without any warranty implied or
otherwise to the fitness or accuracy of the software and documentation.
The  documentation is  believed  to be correct but the author reserves the
right to update the software and/or documentation without notice.


@ENDNODE

@NODE E.usage "Usage"


With the first two parameters you have to say @{b}cmp@{ub}, what should be
compared. The parameters can be:

   @{b}»@{ub}	two files: in this case the two files will be compared.

   @{b}»@{ub}	a file and a directory: in this case the file will be compared
with a equal called file in the directory. From now on, this will be the same like
the comparison of two files, in contrast to the comparison of two
directories.

   @{b}»@{ub}	two directories or patterns: in this case all files (possibly
matching the pattern) will be compared with equal called files in the
2nd directory and the other way round.


Notice: A file could @{u}not@{uu} be compared with a pattern.



A comparison can have one of the eight following results:

  @{FG Highlight}Q@{FG Text}:	The two files are e@{FG Highlight}q@{FG Text}ual.

  @{FG Highlight}L@{FG Text}:	The two files are different in @{FG Highlight}l@{FG Text}ength.

  @{FG Highlight}C@{FG Text}:	The two files have the same length, but they are different in @{FG Highlight}c@{FG Text}ontents.

  @{FG Highlight}D@{FG Text}:	The two files have @{FG Highlight}d@{FG Text}ifferent length and contents.

  @{FG Highlight}A@{FG Text}:	A file/directory in the directory (-tree) B does not exist in @{FG Highlight}A@{FG Text}.

  @{FG Highlight}B@{FG Text}:	A file/directory in the directory (-tree) A does not exist in @{FG Highlight}B@{FG Text}.

  @{FG Highlight}W@{FG Text}:	It was tried to compare a file with a directory (object @{FG Highlight}w@{FG Text}rong type).

  @{FG Highlight}E@{FG Text}:	Another @{FG Highlight}e@{FG Text}rror has occured, e.g. a read error.


Only the most important parameters will be mentioned here, the detailed usage of the parameters is described
on the following page. All parameters are written @{b}bold@{ub} and BIG.


For @{b}cmp@{ub} is an extended help available: Call @{b}cmp@{ub} (in a CLI) with
parameter "?" and enter at the following request another "?".


The output from @{b}cmp@{ub} results like this:

   If the two files should be compared in difference (C,D) and an output of the
difference is desired, a hex-dump of the different lines will be displayed. The
differences will be marked white (@{"example" link dump}). The hex-dump can be
switched on/off with the option @{b}DUMP@{ub}. For a comparison of two files, the
hex-dump will be switched on by default.

   A hex-dump can be aborted with CTRL-D, but the comparison will be continued.

   If the option @{b}DUMP@{ub} is switched off, the files, which have different
length will @{u}not@{uu} be compared whether they have different contents.
Also see @{b}CHECKD@{ub}.


   After the hex-dump-output (if switched on) the filename and the result will
be displayed in plain text. The text is, depending on the result, one of the following:

  @{FG Highlight}Q@{FG Text}:	@{i}[no text]@{ui}

  @{FG Highlight}L@{FG Text}:	Difference in length

  @{FG Highlight}C@{FG Text}:	Difference in contents

  @{FG Highlight}D@{FG Text}:	Difference in length&contents

  @{FG Highlight}A,B,W,E@{FG Text}:  The corresponding error messages (see
above), since workbench 2.1 localized.


The output can be adjusted completely with the option @{b}LFORMAT@{ub} to the
wishes of the user.


After completion of @{b}cmp@{ub} the returncode will be set as follows:

    @{FG Highlight}0@{FG Text}:	All files are equal.

    @{FG Highlight}5@{FG Text}:	One or more files are different (@{FG Highlight}LCD@{FG Text}).

  @{FG Highlight}10@{FG Text}:	One or more files could not be found / are of wrong type (@{FG Highlight}ABW@{FG Text}).

  @{FG Highlight}15@{FG Text}:	Another error had occured (@{FG Highlight}E@{FG Text}).

  @{FG Highlight}20@{FG Text}:	A serious error occured / the comparison would be aborted.


The values 5-15 will be @{u}only@{uu} set, if the output will be made (see @{b}SHOW@{ub}).


With the option @{b}SHOW@{ub} you can specify, which messages should be displayed.


With the option @{b}ABORT@{ub} you can say @{b}cmp@{ub}, on which results the
comparison should be aborted.


With the option @{b}ALL@{ub} you can switch on, that @{b}cmp@{ub} should recursively
compare the two directories.


Normally, links to directories will be completely ignored. For this, read @{b}HLINK@{ub} and @{b}SLINK@{ub}.


For more detailes about the syntax of the options, please read the next page.


@ENDNODE

@NODE E.param "Parameters"


The syntax for the usage of @{b}cmp@{ub} is:

@{CODE}
@{b}cmp A/A,B/A,ALL/S,SHOW/K,ABORT/K,DUMP/N,CHECKD/S,ONLYA/S,HLINK/S,SLINK/S,LFORMAT/F@{ub}
@{PARD}

When you start @{b}cmp@{ub} with parameter "?", the above shown syntaxline
will be shown to you and you can still enter your parameters. If you enter at this
moment another "?", the extended help will be displayed to you.


@{b}A/A@{ub}: The first file/directory/pattern (see usage).


@{b}B/A@{ub}: The second file/directory/pattern (see usage).


@{b}ALL/S@{ub}: The two directories will be compared recursively.


@{b}SHOW/K@{ub}: Which outputs should be made or rather should be suppressed. The
(to be given) parameter is a string, which contains the outputs. The outputs
will be specified with the results (@{FG Highlight}QLCDABWE@{FG Text}). The
meaning of the individual results is described in the part usage. A leading
"@{b}~@{ub}" negates the input. By default, everything will be displayed.


@{b}ABORT/K@{ub}: On which results the comparison should be aborted. The
details are corresponding to the details of @{b}SHOW@{ub}. By default, it will
be @{u}never@{uu} aborted.


@{b}DUMP/N@{ub}: Whether a hex-dump should be displayed. In case of a positive number, max.
@{b}DUMP@{ub} different lines will be displayed. Equal lines will be @{u}never@{uu} 
displayed. In case of a negative number, all different lines will be displayed.
In case of zero, the hex-dump will be disabled. When comparing two files,
@{b}DUMP@{ub} will be set to -1, by default. Otherwise to 0.

A hex-dump can be aborted with CTRL-D, but the comparison will be continued.


@{b}CHECKD/S@{ub}: If two compared files are different in length, by default they will be
@{u}not@{uu} checked, whether they are different in contents (up to the length
difference). With this option you can activate this feature, which mostly
makes no sense and only costs time. If the @{b}DUMP@{ub} option is different
from 0, it will be activated automatically.


@{b}ONLYA/S@{ub}: Normally, comparing two directories, all files (directories) in the 1st
tree will be compared with the 2nd and the other way. If this option
is activated, only the 1st directory will be searched and compared with the 2nd.
Files/directories, which are in the 2nd directory but not in the 1st one, will not
be displayed/searched.


@{b}HLINK/S@{ub}: With links it is possible to build a cyclic structure, which
will be not recognized during a comparison, and will make @{b}cmp@{ub} running
in a loop forever. Because of this, normally @{b}cmp@{ub} will @{u}not@{uu} follow hardlinks
to directories. Activating this option, it is possible to follow hardlinks to
directories.

Links to files will be checked.


@{b}SLINK/S@{ub}: Like @{b}HLINK@{ub}, whether softlinks to directories should be followed.


@{b}LFORMAT/F@{ub}: This is the probably most extensive option of @{b}cmp@{ub}.
With it, the look of the output can be changed. But not the look of the hex-dump. How it
exactly works, you can read on the following page.


@ENDNODE

@NODE E.outpu "Output"


The output can be changed by the option @{b}LFORMAT@{ub}.


The rest of the parameters from @{b}cmp@{ub} will be automatically interpreted
as @{b}LFORMAT@{ub}. Therefore it is not necessary, to enter @{b}LFORMAT@{ub} and it is
also not necessary, to quote the option.


The following options are supported in the output:

  @{FG Highlight}%n@{FG Text}	Name

  @{FG Highlight}%p@{FG Text}	Path (@{FG Highlight}QLCD@{FG Text}: relative to base, @{FG Highlight}ABWE@{FG Text}: absolut)

  @{FG Highlight}%t@{FG Text}	Path (@{FG Highlight}QLCD@{FG Text}: relative to base, @{FG Highlight}ABWE@{FG Text}: with a leading "@{b}A:@{ub}"/"@{b}B:@{ub}")


  @{FG Highlight}%P@{FG Text}	Path + Name (see @{FG Highlight}%p@{FG Text})

  @{FG Highlight}%T@{FG Text}	Path + Name (see @{FG Highlight}%t@{FG Text})


  @{FG Highlight}%e@{FG Text}	Error as text

  @{FG Highlight}%E@{FG Text}	Error as number

  @{FG Highlight}%r@{FG Text}	Result (@{FG Highlight}QLCDABWE@{FG Text})

  @{FG Highlight}%%@{FG Text}	"@{b}%@{ub}"


  @{FG Highlight}*n@{FG Text}, @{FG Highlight}*N@{FG Text}	A new line will be inserted

  @{FG Highlight}*e@{FG Text}, @{FG Highlight}*E@{FG Text}	An ESC character will be inserted

  @{FG Highlight}**@{FG Text}    	"@{b}*@{ub}"


The results have the following error numbers/texts:

  @{FG Highlight}Q@{FG Text}:	700	""

  @{FG Highlight}L@{FG Text}:	701	"Difference in length"

  @{FG Highlight}C@{FG Text}:	702	"Difference in contents"

  @{FG Highlight}D@{FG Text}:	703	"Difference in length&contents"

  @{FG Highlight}A@{FG Text}:	704	Errormessage 205: Object not found

  @{FG Highlight}B@{FG Text}:	705	Errormessage 205: Object not found

  @{FG Highlight}W@{FG Text}:	212	Errormessage 212: Object wrong type

  @{FG Highlight}E@{FG Text}:	xxx	Errormessage xxx


Like in C usual, it is possible to specify the options. This will
be done by inserting format options between "@{b}%@{ub}" and the option.

A number says, how much characters long the option should be displayed.
If the number is negative, the output is left justified, otherwise right.

With a leading "@{b}!@{ub}" as format option, the output will be
truncated to the specified width of the following number.
In case of @{FG Highlight}%p@{FG Text},@{FG Highlight}%t@{FG Text},@{FG Highlight}%P@{FG Text},@{FG Highlight}%T@{FG Text} the
output will be cut of left, using @{FG Highlight}%n@{FG Text},@{FG Highlight}%e@{FG Text} right.
In case of @{FG Highlight}%E@{FG Text},@{FG Highlight}%r@{FG Text} this option will be ignored.


@ENDNODE

@NODE E.autho "Author"
@NEXT E.autho
@FONT Xcourier.font 13
@{CODE}
@{JCENTER}

If you have any questions, suggestions, wishes or bug reports please contact me:
(I like receiving mail!)


              ALeX  Kazik              
          Stapenhorststr.  81          
            33615 Bielefeld            
                Germany                

E-Mail: @{FG Highlight}akazik@TechFak.Uni-Bielefeld.DE@{FG Text}







@{JRIGHT}
                              ###### ##      ####  ##   ##       
                             ##   ## ##     ##  ##  ## ##        
                             #### ## ##     ######   ###         
                             ## #### ##     ##      ## ##        
                             ##   ## ######  ####  ##   ##       

@ENDNODE
