ack/mach/sparc/ce/back.src/do_open.c

25 lines
427 B
C
Raw Normal View History

1991-09-20 18:14:05 +00:00
#include "header.h"
open_back( filename)
char *filename;
{
1993-11-10 12:57:16 +00:00
if ( filename == (char *) 0) {
1991-09-20 18:14:05 +00:00
codefile= STDOUT;
1993-11-10 12:57:16 +00:00
#ifdef __solaris__
fprint(codefile, ".section \".text\"\n");
#endif
return 1;
}
1991-09-27 14:58:31 +00:00
#ifndef sys_close
1993-11-10 12:57:16 +00:00
if ( sys_open( filename, OP_WRITE, &codefile)) {
1991-09-27 14:58:31 +00:00
#else
2022-07-17 10:58:48 +00:00
if ((codefile = fopen(filename, "wb")) != NULL) {
1993-11-10 12:57:16 +00:00
#endif
#ifdef __solaris__
fprint(codefile, ".section \".text\"\n");
1991-09-27 14:58:31 +00:00
#endif
1993-11-10 12:57:16 +00:00
return 1;
}
return 0;
1991-09-20 18:14:05 +00:00
}