diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-02 15:02:49 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-02 15:02:49 +0100 |
commit | b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73 (patch) | |
tree | 4361edef0d42d5bf5ac984ef72b4fac35426eae7 /nx-X11/extras/rman/contrib/gzip.patch | |
parent | 0d5a83e986f39982c0924652a3662e60b1f23162 (diff) | |
download | nx-libs-b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73.tar.gz nx-libs-b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73.tar.bz2 nx-libs-b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73.zip |
massive reduction of unneeded files
Diffstat (limited to 'nx-X11/extras/rman/contrib/gzip.patch')
-rw-r--r-- | nx-X11/extras/rman/contrib/gzip.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/nx-X11/extras/rman/contrib/gzip.patch b/nx-X11/extras/rman/contrib/gzip.patch deleted file mode 100644 index d10666b6a..000000000 --- a/nx-X11/extras/rman/contrib/gzip.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- rman.c.~1~ Wed Nov 20 13:33:52 1996 -+++ rman.c Fri Oct 24 00:10:56 1997 -@@ -3583,6 +3583,43 @@ - } - free(sobuf); - } -+ } else { -+#define GZIP "/bin/gzip" -+ char * gz = malloc(strlen(p)+3+1); -+ sprintf(gz, "%s.gz", p); -+ if (stat(gz, &fileinfo)==0) { -+ /* first, figure out how big */ -+ char * cmd = malloc(strlen(gz) + strlen(GZIP) + 7 + 1); -+ char buffer[512]; -+ unsigned long compr, uncomp; -+ FILE * proc; -+ sprintf(cmd, "%s -l \"%s\"", GZIP, gz); -+ proc = popen(cmd, "r"); -+ fgets(buffer, sizeof buffer, proc); /* label line */ -+ fgets(buffer, sizeof buffer, proc); /* length line */ -+ sscanf(buffer, "%lu %lu", &compr, &uncomp); -+ fclose(proc); -+ /* Boy, don't you wish stat would do that? */ -+ sobuf = malloc(uncomp + 1); -+ if (sobuf!=NULL) { -+ /* suck in entire file, as above */ -+ sprintf(cmd, "%s -dc \"%s\"", GZIP, gz); -+ proc = popen(cmd, "r"); -+ if (proc!=NULL) { -+ if(fread(sobuf, 1, uncomp, proc)) { -+ sobuf[uncomp]='\0'; -+ for (q=sobuf; (q=strstr(q," \\}"))!=NULL; q+=3) *q='\n'; -+ source_subfile(sobuf); -+ err = 0; -+ } -+ fclose(proc); -+ } -+ free(sobuf); -+ } -+ free(cmd); -+ } -+ free(gz); -+ - } - - if (err) { |