James wrote:

> i want to make patches for my C programs, i know it involves using diff to
> make the patch, and patch to apply it but what do i do?

        diff <options> oldfile newfile

> i've read 'man diff' and it can output patches in various formats, does it
> matter which format i use (i don't think it does because patch works out the
> format when you use it)

You should use either context (-c) or unified (-u) format. The
advantage of these over the traditional and ed formats is that the
patch can still be applied if the line numbers have changed (e.g. due
to other parts of the file being changed). Also, the context and
unified formats are easier to read than the others.

The choice between context and unified formats is largely a matter of
taste, although more people seem to prefer unified than prefer
context.

> i assume you need an 'old' and a 'new' version of each file that needs patching.

Yep.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to