You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/cw/files/1.0.16-collision.patch

31 lines
1.2 KiB

--- a/src/cw.c
+++ b/src/cw.c
@@ -1336,7 +1336,7 @@ unsigned char is_cwfile(char *file){
s=strlen(buf);
if(buf[s]=='\n')s--;
if(buf[s]=='\r')s--;
- if(s>4&&!strncmp(buf,"#!",2)&&!strncmp(buf+(s-4),"/cw",3))return(1);
+ if(s>15&&!strncmp(buf,"#!",2)&&!strncmp(buf+(s-15),"/color-wrapper",14))return(1);
return(0);
}
/* sets left and right borders. */
--- a/src/cwu.c
+++ b/src/cwu.c
@@ -37,12 +37,12 @@ signed int main(signed int argc,char **argv){
if(argc>1&&!strcmp(argv[1],"-v"))
cwuexit(1,"cwu (color wrapper directive updater) v"VERSION);
if(argc<2)
- cwuexit(1,"syntax: cwu <definitions directory> <cw binary path>");
+ cwuexit(1,"syntax: cwu <definitions directory> <color-wrapper binary path>");
if(argc<3)cwuexit(1,"no path provided to update with.");
- if(strncmp(argv[2]+(strlen(argv[2])-3),"/cw",3))
- cwuexit(1,"cw binary path doesn't end with `/cw'.");
+ if(strncmp(argv[2]+(strlen(argv[2])-14),"/color-wrapper",14))
+ cwuexit(1,"cw binary path doesn't end with `/color-wrapper'.");
if(access(argv[2],X_OK))
- cwuexit(1,"cw binary does not exist or is not executable.");
+ cwuexit(1,"color-wrapper binary does not exist or is not executable.");
globcw(argv[1],argv[2]);
cwuexit(0,0);
exit(0);