From: <jh...@us...> - 2011-07-07 22:15:10
|
Revision: 1656 http://freedos.svn.sourceforge.net/freedos/?rev=1656&view=rev Author: jhall1 Date: 2011-07-07 22:15:04 +0000 (Thu, 07 Jul 2011) Log Message: ----------- wrapper program for Unzip - using Info-Zip's UzpMain API. also sets the TZ environment variable (if not already set.) **this is kind of a hack, but the Install program barfs if it calls UzpMain() repeatedly. works fine if it calls an external UzpMain.exe. So we'll do this for now, and see if can fix the UzpMain() call later. Maybe someone can help me? Added Paths: ----------- install/trunk/uzpmain.c Added: install/trunk/uzpmain.c =================================================================== --- install/trunk/uzpmain.c (rev 0) +++ install/trunk/uzpmain.c 2011-07-07 22:15:04 UTC (rev 1656) @@ -0,0 +1,30 @@ +/* uzpmain.c */ + +/* fake Unzip - using Info-Zip's UzpMain API */ + +#include <stdio.h> +#include <stdlib.h> + +#include <env.h> + +int UzpMain ( int argc, char **argv ); /* from Info-Zip's Unzip */ + +int +main (int argc, char **argv) +{ + int ret; + + /* wrapper to UzpMain */ + + /* set TZ env variable, if not already set */ + + if (getenv("TZ") == NULL) + { + setenv ("TZ", "PST8PDT", 1); /* env.h */ + } + + /* printf ("DEBUG: calling UzpMain() . . .\n"); */ + + ret = UzpMain (argc, argv); + exit (ret); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |