Skip to content

Instantly share code, notes, and snippets.

@silenvx
Created December 16, 2013 01:07
Show Gist options
  • Save silenvx/7980902 to your computer and use it in GitHub Desktop.
Save silenvx/7980902 to your computer and use it in GitHub Desktop.
debug用
diff -Narup unzip60.orig/zipinfo.c unzip60/zipinfo.c
--- unzip60.orig/zipinfo.c 2009-02-09 02:04:30.000000000 +0900
+++ unzip60/zipinfo.c 2013-12-16 10:04:59.056161870 +0900
@@ -794,18 +794,26 @@ int zipinfo(__G) /* return PK-type err
if (!G.process_all_files) { /* check if specified on command line */
unsigned i;
- if (G.filespecs == 0)
+ if (G.filespecs == 0){
+ printf("1\n");
do_this_file = TRUE;
+ }
else { /* check if this entry matches an `include' argument */
+ printf("2\n");
do_this_file = FALSE;
- for (i = 0; i < G.filespecs; i++)
+ for (i = 0; i < G.filespecs; i++){
+ printf("3\n");
if (match(G.filename, G.pfnames[i], uO.C_flag WISEP)) {
+ printf("4\n");
do_this_file = TRUE;
- if (fn_matched)
+ if (fn_matched){
+ printf("5\n");
fn_matched[i] = TRUE;
+ }
break; /* found match, so stop looping */
}
}
+ }
if (do_this_file) { /* check if this is an excluded file */
for (i = 0; i < G.xfilespecs; i++)
if (match(G.filename, G.pxnames[i], uO.C_flag WISEP)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment