17 #include <sys/types.h> 20 #if defined(__AIX__) || defined(__FreeBSD__) || defined(__DragonFly__) 23 #include <sys/fcntl.h> 26 #if defined(OSV5) || defined(linux) || defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__) 30 #if defined(linux) || defined(__DragonFly__) || defined(macosx) 35 #if (defined(solaris) && defined( __LP64__ )) || defined(__s390x__) || defined(FreeBSD) 74 void do_int(
int,
int,
int,
int);
94 char libbif_version[] =
"Libbif Version $Revision$";
104 #define EXCEL_VERS 0x2 105 #define WORKSHEET 0x10 198 printf(
"Error opening file %s\n",
name);
235 int fd,
val,row,column;
239 short s_row,s_column;
241 s_column=(short)column;
249 intrec.
hi_row=(char)s_row&0xff;
250 intrec.
lo_row=(char)(s_row>>8)&0xff;
252 intrec.
lo_column=(char)(s_column>>8)&0xff;
267 do_float(
int fd,
double value,
int row,
int column)
277 short s_row,s_column;
278 unsigned char *sptr,*dptr;
280 s_column=(short)column;
288 floatrec.
hi_row=(char)(s_row&0xff);
289 floatrec.
lo_row=(char)((s_row>>8)&0xff);
290 floatrec.
hi_column=(char)(s_column&0xff);
291 floatrec.
lo_column=(char)((s_column>>8)&0xff);
292 sptr =(
unsigned char *) &value;
293 dptr =(
unsigned char *) &floatrec.
data;
339 printf(
"Excel output not supported on this architecture.\n");
350 do_label(
int fd,
char *
string,
int row,
int column)
360 short s_row,s_column;
365 s_column=(short)column;
374 labelrec.
hi_row=(char)(s_row&0xff);
375 labelrec.
lo_row=(char)((s_row>>8)&0xff);
376 labelrec.
hi_column=(char)(s_column&0xff);
377 labelrec.
lo_column=(char)((s_column>>8)&0xff);
400 char buf[]={0x0a,0x00,0x00,0x00};
413 long long foo = 0x0102030405060708LL;
414 long foo1 = 0x012345678;
415 unsigned char *
c,c1,c2,c3,c4,c5,c6,c7,c8;
416 c=(
unsigned char *)&foo;
431 if( (c1==0x08) && (c2==0x07) && (c3==0x06) && (c4==0x05) &&
432 (c5==0x04) && (c6==0x03) && (c7==0x02) && (c8==0x01) )
435 if( (c1==0x01) && (c2==0x02) && (c3==0x03) && (c4==0x04) &&
436 (c5==0x05) && (c6==0x06) && (c7==0x07) && (c8==0x08) )
439 if( (c1==0x04) && (c2==0x03) && (c3==0x02) && (c4==0x01) &&
440 (c5==0x08) && (c6==0x07) && (c7==0x06) && (c8==0x05) )
442 c=(
unsigned char *)&foo1;
448 if( (c1==0x34) && (c2==0x12) && (c3==0x78) && (c4==0x56))
do_float(int fd, double value, int row, int column)
do_int(int fd, int val, int row, int column)
do_label(int fd, char *string, int row, int column)
int open(const char *pathname, int flags, mode_t mode)
ssize_t write(int fd, const void *buf, size_t count)
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]