#! /bin/sh /usr/share/dpatch/dpatch-run ## 210-fix_const_warning.dpatch by Brian St. Pierre ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix "deprecated conversion from string constant to 'char*'" warning. @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nana~/src/I.c nana/src/I.c --- nana~/src/I.c 2012-05-15 09:46:43.340194953 -0400 +++ nana/src/I.c 2012-05-15 09:44:51.000000000 -0400 @@ -45,7 +45,7 @@ * changing this. */ -void _I_default_handler(char *exprn, char *file, int line) { +void _I_default_handler(const char *exprn, const char *file, int line) { fprintf(stderr, "%s:%d: %s failed; dumping core\n", file, line, exprn); fflush(stderr); abort(); diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nana~/src/I.h nana/src/I.h --- nana~/src/I.h 2012-05-15 09:46:50.048194718 -0400 +++ nana/src/I.h 2012-05-15 09:44:48.000000000 -0400 @@ -84,7 +84,7 @@ */ #ifndef I_DEFAULT_HANDLER /* define default handler */ -void _I_default_handler(char *expr, char *file, int line); +void _I_default_handler(const char *expr, const char *file, int line); #define I_DEFAULT_HANDLER(expr,file,line,param) \ _I_default_handler(expr,__FILE__,__LINE__)