| version 1.4, 2000/08/22 05:04:18 |
version 1.6, 2000/12/13 10:54:09 |
|
|
| * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
* OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY |
| * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
| * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
| * $OpenXM: OpenXM_contrib2/asir2000/io/spexpr.c,v 1.3 2000/08/21 08:31:39 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/spexpr.c,v 1.5 2000/11/08 08:02:51 noro Exp $ |
| */ |
*/ |
| #include "ca.h" |
#include "ca.h" |
| #include "al.h" |
#include "al.h" |
| Line 87 int fortran_output; |
|
| Line 87 int fortran_output; |
|
| #define PRINTUI printui |
#define PRINTUI printui |
| #define PRINTGF2MAT printgf2mat |
#define PRINTGF2MAT printgf2mat |
| #define PRINTGFMMAT printgfmmat |
#define PRINTGFMMAT printgfmmat |
| |
#define PRINTBYTEARRAY printbytearray |
| #define PRINTERR printerr |
#define PRINTERR printerr |
| #define PRINTLF printlf |
#define PRINTLF printlf |
| #define PRINTLOP printlop |
#define PRINTLOP printlop |
| Line 102 static char *buf; |
|
| Line 103 static char *buf; |
|
| extern char DFORMAT[BUFSIZ]; |
extern char DFORMAT[BUFSIZ]; |
| extern int hex_output; |
extern int hex_output; |
| extern int fortran_output; |
extern int fortran_output; |
| |
extern int double_output; |
| |
|
| #define TAIL while ( *OUT ) OUT++; |
#define TAIL while ( *OUT ) OUT++; |
| #define PUTS(s) strcat(OUT,s) |
#define PUTS(s) strcat(OUT,s) |
| Line 125 extern int fortran_output; |
|
| Line 127 extern int fortran_output; |
|
| #define PRINTUI sprintui |
#define PRINTUI sprintui |
| #define PRINTGF2MAT sprintgf2mat |
#define PRINTGF2MAT sprintgf2mat |
| #define PRINTGFMMAT sprintgfmmat |
#define PRINTGFMMAT sprintgfmmat |
| |
#define PRINTBYTEARRAY sprintbytearray |
| #define PRINTERR sprinterr |
#define PRINTERR sprinterr |
| #define PRINTLF sprintlf |
#define PRINTLF sprintlf |
| #define PRINTLOP sprintlop |
#define PRINTLOP sprintlop |
|
|
| void PRINTUI(); |
void PRINTUI(); |
| void PRINTGF2MAT(); |
void PRINTGF2MAT(); |
| void PRINTGFMMAT(); |
void PRINTGFMMAT(); |
| |
void PRINTBYTEARRAY(); |
| void PRINTERR(); |
void PRINTERR(); |
| void PRINTCPLX(); |
void PRINTCPLX(); |
| void PRINTLM(); |
void PRINTLM(); |
|
|
| PRINTLF(vl,(F)p); break; |
PRINTLF(vl,(F)p); break; |
| case O_GFMMAT: |
case O_GFMMAT: |
| PRINTGFMMAT(vl,(GFMMAT)p); break; |
PRINTGFMMAT(vl,(GFMMAT)p); break; |
| |
case O_BYTEARRAY: |
| |
PRINTBYTEARRAY(vl,(BYTEARRAY)p); break; |
| default: |
default: |
| break; |
break; |
| } |
} |
|
|
| } |
} |
| break; |
break; |
| case N_R: |
case N_R: |
| TAIL PRINTF(OUT,"%g",BDY((Real)q)); |
TAIL PRINTF(OUT,double_output?"%f":"%g",BDY((Real)q)); |
| break; |
break; |
| case N_A: |
case N_A: |
| PUTS("("); PRINTR(ALG,(R)BDY((Alg)q)); PUTS(")"); |
PUTS("("); PRINTR(ALG,(R)BDY((Alg)q)); PUTS(")"); |
|
|
| } |
} |
| PUTS("]\n"); |
PUTS("]\n"); |
| } |
} |
| |
} |
| |
|
| |
void PRINTBYTEARRAY(vl,array) |
| |
VL vl; |
| |
BYTEARRAY array; |
| |
{ |
| |
int len,i; |
| |
unsigned int t; |
| |
unsigned char *b; |
| |
|
| |
len = array->len; |
| |
b =array->body; |
| |
PUTS("|"); |
| |
for ( i = 0; i < len-1; i++ ) { |
| |
TAIL PRINTF(OUT,"%02x ",b[i]); |
| |
} |
| |
TAIL PRINTF(OUT,"%02x",b[i]); |
| |
PUTS("|"); |
| } |
} |
| |
|
| void PRINTERR(vl,e) |
void PRINTERR(vl,e) |