49cb564d14
* par is kept at -Np0 ```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
55 lines
1.4 KiB
Diff
55 lines
1.4 KiB
Diff
diff -up plib-1.8.5/src/ssg/ssgParser.cxx~ plib-1.8.5/src/ssg/ssgParser.cxx
|
|
--- a/src/ssg/ssgParser.cxx~ 2008-03-11 03:06:23.000000000 +0100
|
|
+++ b/src/ssg/ssgParser.cxx 2012-11-01 15:33:12.424483374 +0100
|
|
@@ -57,18 +57,16 @@ void _ssgParser::error( const char *form
|
|
char msgbuff[ 255 ];
|
|
va_list argp;
|
|
|
|
- char* msgptr = msgbuff;
|
|
- if (linenum)
|
|
- {
|
|
- msgptr += sprintf ( msgptr,"%s, line %d: ",
|
|
- path, linenum );
|
|
- }
|
|
-
|
|
va_start( argp, format );
|
|
- vsprintf( msgptr, format, argp );
|
|
+ vsnprintf( msgbuff, sizeof(msgbuff), format, argp );
|
|
va_end( argp );
|
|
|
|
- ulSetError ( UL_WARNING, "%s", msgbuff ) ;
|
|
+ if (linenum)
|
|
+ {
|
|
+ ulSetError ( UL_WARNING, "%s, line %d: %s", path, linenum, msgbuff ) ;
|
|
+ } else {
|
|
+ ulSetError ( UL_WARNING, "%s", msgbuff ) ;
|
|
+ }
|
|
}
|
|
|
|
|
|
@@ -78,18 +76,16 @@ void _ssgParser::message( const char *fo
|
|
char msgbuff[ 255 ];
|
|
va_list argp;
|
|
|
|
- char* msgptr = msgbuff;
|
|
- if (linenum)
|
|
- {
|
|
- msgptr += sprintf ( msgptr,"%s, line %d: ",
|
|
- path, linenum );
|
|
- }
|
|
-
|
|
va_start( argp, format );
|
|
- vsprintf( msgptr, format, argp );
|
|
+ vsnprintf( msgbuff, sizeof(msgbuff), format, argp );
|
|
va_end( argp );
|
|
|
|
- ulSetError ( UL_DEBUG, "%s", msgbuff ) ;
|
|
+ if (linenum)
|
|
+ {
|
|
+ ulSetError ( UL_DEBUG, "%s, line %d: %s", path, linenum, msgbuff ) ;
|
|
+ } else {
|
|
+ ulSetError ( UL_DEBUG, "%s", msgbuff ) ;
|
|
+ }
|
|
}
|
|
|
|
// Opens the file and does a few internal calculations based on the spec.
|