Checked in some Alpha portability fixes.

This commit is contained in:
slidedraw
2002-05-10 16:08:58 +00:00
parent 9c1a133973
commit 2ff85e8b61
7 changed files with 27 additions and 40 deletions

View File

@@ -11,6 +11,7 @@ HEAD
of <FONT>
* Made rowspan and colspan attributes instead of content of <cell>
in XML output
* Added some Alpha portability fixes.
0.5 04/13/02
* Fixed some memory leaks

View File

@@ -28,6 +28,7 @@
#include "xlhtml.h"
static U16 HARD_MAX_ROWS = HARD_MAX_ROWS_97;
static char SectionName[2][12] = /* The section of the Excel Stream where the workbooks are kept */
{
@@ -611,9 +612,9 @@ void scan_file(COLEDIRENT *cde, void *_info)
printf("There are %d pages total.\n", sheet_count+1);
for (i=0; i<=sheet_count; i++)
{
printf("Page:%d Name:%s MaxRow:%ld MaxCol:%d\n", i,
printf("Page:%d Name:%s MaxRow:%ld MaxCol:%ld\n", i,
ws_array[i]->ws_title.str ? (char *)ws_array[i]->ws_title.str : "(Unknown Page)",
ws_array[i]->biggest_row, ws_array[i]->biggest_col);
(long)ws_array[i]->biggest_row, (long)ws_array[i]->biggest_col);
}
}
else if (Xtract)
@@ -628,9 +629,9 @@ void scan_file(COLEDIRENT *cde, void *_info)
printf("<p>There are %d pages total.</p>\n", sheet_count+1);
for (i=0; i<=sheet_count; i++)
{
printf("<p>Page:%d Name:%s MaxRow:%ld MaxCol:%d</p>\n", i,
printf("<p>Page:%d Name:%s MaxRow:%ld MaxCol:%ld</p>\n", i,
ws_array[i]->ws_title.str ? (char *)ws_array[i]->ws_title.str : "(Unknown Page)",
ws_array[i]->biggest_row, ws_array[i]->biggest_col);
(long)ws_array[i]->biggest_row, (long)ws_array[i]->biggest_col);
}
output_footer();
@@ -700,7 +701,7 @@ void SetupExtraction(void)
{
if (Ascii)
fprintf(stderr, "Error - Row not in range during extraction"
" (%d or %d not in [%ld..%ld])\n", xr1, xr2, ws_array[xp]->first_row, ws_array[xp]->biggest_row);
" (%d or %d not in [%ld..%ld])\n", xr1, xr2, (long)ws_array[xp]->first_row, (long)ws_array[xp]->biggest_row);
else
{
printf("Error - Row not in range during extraction.");
@@ -1496,7 +1497,7 @@ void main_line_processor(U16 opcode, U16 version, U32 count, U16 last, U8 data)
sprintf(temp, "%.15g", d / 100.0);
break;
case 2:
sprintf(temp, "%ld", (S32)n2);
sprintf(temp, "%ld", (long)n2);
break;
default:
d = (F64) n2;

View File

@@ -23,7 +23,6 @@
#define HARD_MAX_ROWS_95 0x3FFF /*!< Used in add_wb_array to prevent OOM */
#define HARD_MAX_COLS 256 /*!< Used in add_wb_array to prevent OOM */
static U16 HARD_MAX_ROWS = HARD_MAX_ROWS_97;
/**********************************
*
* Don't change anything below here...

View File

@@ -86,10 +86,10 @@ void OutputTableXML(void)
printf("\t\t\t<pagetitle>(Unknown Page)</pagetitle>\n");
}
printf( "\t\t\t<firstrow>%ld</firstrow>\n", ws_array[i]->first_row );
printf( "\t\t\t<lastrow>%ld</lastrow>\n", ws_array[i]->biggest_row );
printf( "\t\t\t<firstcol>%d</firstcol>\n", ws_array[i]->first_col );
printf( "\t\t\t<lastcol>%d</lastcol>\n", ws_array[i]->biggest_col );
printf( "\t\t\t<firstrow>%ld</firstrow>\n", (unsigned long)ws_array[i]->first_row );
printf( "\t\t\t<lastrow>%ld</lastrow>\n", (int) ws_array[i]->biggest_row );
printf( "\t\t\t<firstcol>%d</firstcol>\n", (long) ws_array[i]->first_col );
printf( "\t\t\t<lastcol>%d</lastcol>\n", (int)ws_array[i]->biggest_col );
printf( "\t\t\t<rows>\n" );
for (j=ws_array[i]->first_row; j<=ws_array[i]->biggest_row; j++)