diff options
author | dholland <dholland> | 2016-05-01 19:26:34 +0000 |
---|---|---|
committer | dholland <dholland> | 2016-05-01 19:26:34 +0000 |
commit | 150b8f9bffd6b0ff1a12749e4a99785c20528745 (patch) | |
tree | e8cc64629cb3047972feba1bff681126e1169768 /wm/afterstep/patches/patch-libAfterStep_asapp.c | |
parent | fdf53ca22fadeea54ae4790e30efd82dfd6e02fe (diff) | |
download | pkgsrc-150b8f9bffd6b0ff1a12749e4a99785c20528745.tar.gz |
Patch up broad misuse of <ctype.h> functions. Also patch some other
things found by the compiler, like broken printf formats. Not
complete, but a start.
Diffstat (limited to 'wm/afterstep/patches/patch-libAfterStep_asapp.c')
-rw-r--r-- | wm/afterstep/patches/patch-libAfterStep_asapp.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/wm/afterstep/patches/patch-libAfterStep_asapp.c b/wm/afterstep/patches/patch-libAfterStep_asapp.c new file mode 100644 index 00000000000..d26e3ac03ef --- /dev/null +++ b/wm/afterstep/patches/patch-libAfterStep_asapp.c @@ -0,0 +1,33 @@ +$NetBSD: patch-libAfterStep_asapp.c,v 1.1 2016/05/01 19:26:35 dholland Exp $ + +Use ctype.h correctly. + +--- libAfterStep/asapp.c~ 2009-10-05 16:32:59.000000000 +0000 ++++ libAfterStep/asapp.c +@@ -1208,7 +1208,7 @@ spawn_child( const char *cmd, int single + + while( display[i] ) ++i; + +- while( i > 0 && isdigit(display[--i]) ); ++ while( i > 0 && isdigit((unsigned char)display[--i]) ); + if( display[i] == '.' ) + display[i+1] = '\0' ; + /* +@@ -1288,7 +1288,7 @@ spawn_child( const char *cmd, int single + if( as_app_args.verbosity_level != OUTPUT_DEFAULT_THRESHOLD ) + ptr += sprintf( ptr, " -V %d", as_app_args.verbosity_level ); + LOCAL_DEBUG_OUT( "len = %d, cmdl = \"%s\" strlen = %d, locale = \"%s\", ptr-cmdl = %d", len, cmdl, (int)strlen(cmdl), as_app_args.locale, (int)(ptr-cmdl) ); +- if( as_app_args.locale && as_app_args.locale[0] && !isspace(as_app_args.locale[0])) ++ if( as_app_args.locale && as_app_args.locale[0] && !isspace((unsigned char)as_app_args.locale[0])) + ptr += sprintf( ptr, " -L %s", as_app_args.locale ); + + #ifdef DEBUG_TRACE_X +@@ -1314,7 +1314,7 @@ LOCAL_DEBUG_OUT( "len = %d, cmdl = \"%s\ + if( do_fork ) + { + int i = ptr-cmdl; +- while( --i >= 0 ) if( !isspace(cmdl[i]) ) break; ++ while( --i >= 0 ) if( !isspace((unsigned char)cmdl[i]) ) break; + do_fork = ( i < 0 || cmdl[i] != '&' ); + } + strcpy (ptr, do_fork?" &\n":"\n"); |