creating a patch file

From: Sammy (
Date: 03/06/01

I accidentally deleted the message I'm replying to, but I just wanted
to mention that windows coders who want to submit a patch can get the
necessary utilities by downloading djgpp (a good unix-like free
development envirnment for windows).

You can get djgpp at and it has a handy
form that will help you decide what you need (you don't need any
extras at all to get diff if I remember correctly).  The basic
development set should include diff and some other handy utilities
like patch and sed (grep is curiously missing).

After installing it you should have a bin/diff.exe where you installed
djgpp.  Add the directory to your path or put diff.exe in one of your
path directories.

Common uses of diff: (windows-style slash)

- Check for changes between two files:
> diff circle30bpl17\src\act.comm.c mymud\src\act.comm.c

- Create a patch file to update one file:
> diff -u circle30bpl17\src\act.comm.c \mymud\src\act.comm.c

- Create a patch file to update all changed files in a single
> diff -u circle30bpl17\src mymud\src

- Create a patch file to update a directory and any subdirectories:
(note that the windows version of patch doesn't seem to handle these
patches well)
> diff -ur circle30bpl17\src mymud\src

For an somewhat extensive mod like obuild or ascii pfiles, I like to
use diff -upP:

-u   Unified format (easier to read than the default contextual)
-p   Shows which function to look for (makes handpatching easier)
-P   If you've added any new files which weren't in the original
directory, the entire new file is added to the patch)

Online diff manual:

Hope this helps.  I'm going to expand on this some other time and try
to explain it in a little more detail.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/04/01 PST