The Mudcat Café TM
Thread #69826   Message #1188249
Posted By: HuwG
19-May-04 - 02:00 AM
Thread Name: BS: Need help from a computer nerd
Subject: RE: BS: Need help from a computer nerd
The listing seems to be a piece of a "diff" file, intended to amend an existing file in a code archive system such as SourceSafe or VCS. Essentially, one runs a utility such as the GNU "diff" program to compare a programmer's amended code with the original, unmodified source code. The output will be fragments of code, plus various markers and instructions to the archive program, to indicate where insertions, amendments and deletions are to go to update the original file in the archive.

In the code you gave given, the lines encapsulated in double-"at" characters are these markers / instructions e.g.

@@ -440,6 +485,9 @@

The lines preceded by plus-signs indicate that they are to be inserted into the code e.g.

+
+ escrow_key(key);
+

Stripped of these archive indicators, the remainder is 'C' code. You can manually remove the diff stuff to produce a clean fragment of code, but without the rest of the program from the archive (and of course, suitable compiler, libraries and linker) you won't get very far with it.