applied Benjamin Riefenstahl's patches for building on Windows

This commit is contained in:
vdvo
2002-05-27 16:45:32 +00:00
parent a80a9680fe
commit 79fe4b68df
15 changed files with 76 additions and 113 deletions

View File

@@ -17,17 +17,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#if !(defined( __BORLANDC__ ) || defined( __WIN32__ ))
#include "config.h" /* Created by ./configure script */
#include "support.h" /* Needs to be before internal.h */
#include "internal.h" /* Needs to be before cole */
#include "cole.h"
#else
#include "config.h.in" /* Created by ./configure script */
#include "support.h" /* Needs to be before internal.h */
#include "internal.h" /* Needs to be before cole */
#include "cole.h.in"
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -108,6 +101,8 @@ void dump_file(COLEDIRENT *cde, void *_info)
COLEFILE *cf;
COLERRNO err;
(void) _info; /*UNUSED*/
cf = cole_fopen_direntry(cde, &err);
/* Ouput Header */

View File

@@ -17,17 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#if !(defined( __BORLANDC__ ) || defined( __WIN32__ ))
#include "config.h" /* Created by ./configure script */
#include "support.h" /* Needs to be before internal.h */
#include "internal.h" /* Needs to be before cole */
#include "cole.h"
#else
#include "config.h.in" /* Created by ./configure script */
#include "support.h" /* Needs to be before internal.h */
#include "internal.h" /* Needs to be before cole */
#include "cole.h.in"
#include <dir.h>
#if defined(WIN32)
#include <direct.h> /* _chdrive() */
#endif
@@ -38,7 +33,7 @@
#define PRGNAME "pptHtml"
#if !(defined( __WIN32__ ) || defined( __BORLANDC__ ))
#if defined(VERSION)
#define PRGVER VERSION
#else
#define PRGVER "0.4"
@@ -82,24 +77,13 @@ int main (int argc, char **argv)
else
{
strncpy(filename, argv[1], 124);
#if defined( __WIN32__ ) || defined( __BORLANDC__ )
#if 1 && defined(WIN32)
if( 0 != filename[0] && ':' == filename[1] )
{
char *ptr = strchr(filename, ':');
if (ptr)
{
int len;
char new_drive[MAXPATH];
fnsplit(filename, new_drive, 0, 0, 0);
if (new_drive[0] >= 'a')
setdisk(new_drive[0] - 'a');
else
setdisk(new_drive[0] - 'A');
ptr++; /* Get past the colon */
len = strlen(ptr);
memmove(filename, ptr, len);
filename[len] = 0;
}
}
_chdrive(tolower((unsigned char)filename[0]) - 'a' + 1);
/* cut the drive from the filename */
memmove(filename,filename+2,strlen(filename+2)+1);
}
#endif
cfs = cole_mount (filename, &colerrno);
if (cfs == NULL)
@@ -139,6 +123,8 @@ void dump_file(COLEDIRENT *cde, void *_info)
COLEFILE *cf;
COLERRNO err;
(void) _info; /*UNUSED*/
cf = cole_fopen_direntry(cde, &err);
/* Ouput Header */