:100644 100644 0000000 0000000 M archive/software/cdcomp.c diff --git a/archive/software/cdcomp.c b/archive/software/cdcomp_patched.c index 612be52..bab6232 100644 --- a/archive/software/cdcomp.c +++ b/archive/software/cdcomp_patched.c @@ -46,6 +46,7 @@ /********************************************************************/ #include +#include #define TRUE 1 #define FALSE 0 @@ -296,44 +297,11 @@ short shortint; printf("\nEnter name of uncompressed output file: "); gets (outname); - if (host == 1 || host == 2 || host == 5) - { if ((outfile = fopen(outname,"wb"))==NULL) { printf("\ncan't open output file: %s\n",outname); exit(1); } - } - else if (host == 3 || host == 4) - { - if (output_format == 1) /* write PDS format blocks */ - { - if ((outfile=fopen(outname,"w", - "mrs=836",FOP,CTX,RECORD_TYPE))==NULL) - { - printf("\ncan't open output file: %s\n",outname); - exit(1); - } - } - else if (output_format == 2) /* write FITS format blocks */ - { - if ((outfile=fopen(outname,"w", - "mrs=2880",FOP,CTX,RECORD_TYPE))==NULL) - { - printf("\ncan't open output file: %s\n",outname); - exit(1); - } - } - else /* write 800 byte records */ - { - if ((outfile=fopen(outname,"w", - "mrs=800",FOP,CTX,RECORD_TYPE))==NULL) - { - printf("\ncan't open output file: %s\n",outname); - exit(1); - } - } - } return(host); /* In case its been updated */ } @@ -715,56 +683,8 @@ union /* this union is used to swap 16 and 32 bit integers */ int check_host() { -/* This subroutine checks the attributes of the host computer and - returns a host code number. -*/ -char hostname[80]; - -int swap,host,bits,var; -union - { - char ichar[2]; - short ilen; - } onion; - -if (sizeof(var) == 4) bits = 32; - else bits = 16; - -onion.ichar[0] = 1; -onion.ichar[1] = 0; - -if (onion.ilen == 1) swap = TRUE; -else swap = FALSE; - -if (bits == 16 && swap == TRUE) - { - host = 1; /* IBM PC host */ - strcpy(hostname, - "Type 1 - 16 bit integers with swapping, no var len support."); - } - -if (bits == 16 && swap == FALSE) - { - host = 2; /* Non byte swapped 16 bit host */ - strcpy(hostname, - "Type 2 - 16 bit integers without swapping, no var len support."); - } - -if (bits == 32 && swap == TRUE) - { host = 3; /* VAX host with var length support */ - strcpy(hostname, - "Type 3,4 - 32 bit integers with swapping."); - } - -if (bits == 32 && swap == FALSE) - { - host = 5; /* OTHER 32-bit host */ - strcpy(hostname, - "Type 5 - 32 bit integers without swapping, no var len support."); - } - -printf("%s\n",hostname); -return(host); + int host = -1; + return(host); } long swap_long(inval) /* swap 4 byte integer */ @@ -863,7 +783,6 @@ NODE *huff_tree(hist) /* Functions called */ void sort_freq(); NODE *new_node(); - char *malloc(); /*************************************************************************** Allocate the array of nodes from memory and initialize these with numbers @@ -946,7 +865,6 @@ NODE *new_node(value) { NODE *temp; /* Pointer to the memory block */ - char *malloc(); /* Memory allocation function */ /*************************************************************************** Allocate the memory and intialize the fields.