[PLUG] Manually applying patches

Joe Pruett joey at clean.q7.com
Wed Nov 11 21:37:38 UTC 2009


>   I found an old patch file for mdbtools-0.5, but it calls source from a
> no-longer-existing cvs repository. I guess that my two options are to change
> that line to the local source directory or apply the patches manually.
>
>   The latter will not take long, but I'm having difficulty interpreting the
> .diff file contents. For example, the first patch is for mdbsql.h:
>
> RCS file: /cvsroot/mdbtools/mdbtools/include/mdbsql.h,v
> retrieving revision 1.4
> diff -r1.4 mdbsql.h
> 16a17
>> 	int max_rows;
> 42c43
> < char *g_input_ptr;
> ---
>> extern char *g_input_ptr;
> 61c62,63
> <
> ---
>> int mdbsql_run_query(MdbSQL *sql, char *mybuf);
>> void mdb_sql_set_maxrow(MdbSQL *sql,int aMaxrow);
>
>   I read the first change as adding at line 16 (making it then line 17), int
> max_rows. Then change line 42 (now 43) by removing char *g_input_ptr and
> adding extern char *g_input_ptr. Finally, row 61 is removed and the
> following two lines added. Is this correct?

yep, that is right.  you could also use the patch program to automatically 
make the changes for you.



More information about the PLUG mailing list