SCP: Added the capability for EXAMINE command output to be written directly to a socket.
This commit is contained in:
parent
f5cd5439f5
commit
e768629009
34 changed files with 185 additions and 20 deletions
|
@ -180,6 +180,11 @@ return (SCPE_OK);
|
|||
status = error code
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -488,6 +488,11 @@ static int32 DAsm(char *S, const uint32 *val, const int32 useZ80Mnemonics, const
|
|||
status = error code
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym(FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw) {
|
||||
char disasm_result[128];
|
||||
int32 ch = val[0] & 0x7f;
|
||||
|
|
|
@ -418,6 +418,10 @@ t_stat parse_instruction_word (char *cptr, t_value *val)
|
|||
/*
|
||||
* Печать машинной инструкции с мнемоникой.
|
||||
*/
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
void besm6_fprint_cmd (FILE *of, uint32 cmd)
|
||||
{
|
||||
int reg, opcode, addr;
|
||||
|
|
|
@ -289,6 +289,11 @@ static const struct fnc_op fop[] = {
|
|||
|
||||
/* Print opcode field for FO, SF */
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
void fprint_op (FILE *of, uint32 inst, uint32 op)
|
||||
{
|
||||
int32 i, nfirst;
|
||||
|
|
|
@ -214,6 +214,11 @@ static const int32 opc_val[] = {
|
|||
status = space needed
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
void fprint_opr (FILE *of, int32 inst, int32 class)
|
||||
{
|
||||
int32 i, j, sp;
|
||||
|
|
|
@ -430,6 +430,11 @@ static const int32 vtab[] = {
|
|||
|
||||
#define FMTASC(x) ((x) < 040)? "<%03o>": "%c", (x)
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -182,6 +182,11 @@ const char *opcode[64] = {
|
|||
|
||||
/* Print an address from three characters */
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
void fprint_addr (FILE *of, t_value *dig)
|
||||
{
|
||||
int32 addr, xa;
|
||||
|
|
|
@ -279,6 +279,11 @@ struct opc opcode[] = {
|
|||
|
||||
/* Print an address from five characters */
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
void fprint_addr (FILE *of, int32 spc, t_value *dig, t_bool flg)
|
||||
{
|
||||
int32 i, idx;
|
||||
|
|
|
@ -590,6 +590,11 @@ static const t_uint64 opc_v[] = {
|
|||
return = status code
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -289,6 +289,11 @@ static int ebcdic_to_ascii (int ch)
|
|||
return '?';
|
||||
}
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw)
|
||||
{
|
||||
int32 ch, OP, F, TAG, INDIR, DSPLC, IR, eaddr;
|
||||
|
|
|
@ -278,6 +278,11 @@ static const uint32 opc_val[] = {
|
|||
if < 0, number of extra bytes retired
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -300,6 +300,11 @@ static const uint32 opc_val[] = {
|
|||
|
||||
/* Print an RX specifier */
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_addr (FILE *of, t_addr addr, uint32 rx, uint32 ea1,
|
||||
uint32 ea2)
|
||||
{
|
||||
|
|
|
@ -222,6 +222,11 @@ static const char opcode[] = "ZBYRIDNMPEUTHCAS";
|
|||
|
||||
static const char hex_decode[] = "0123456789FGJKQW";
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
void lgp_fprint_addr (FILE *st, DEVICE *dptr, t_addr addr)
|
||||
{
|
||||
if ((dptr == sim_devices[0]) &&
|
||||
|
|
|
@ -637,6 +637,10 @@ static const int32 dev_val[] = {
|
|||
Outputs:
|
||||
return = error code
|
||||
*/
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_addr (FILE *of, t_addr addr, int32 ind, int32 mode,
|
||||
int32 disp, t_bool ext, int32 cflag)
|
||||
|
|
|
@ -414,6 +414,11 @@ static const int32 opc_val[] = {
|
|||
status = space needed?
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
int32 fprint_opr (FILE *of, int32 inst, int32 class, int32 sp)
|
||||
{
|
||||
int32 i, j;
|
||||
|
|
|
@ -696,6 +696,10 @@ static const char *devnam[NUMDEV] = {
|
|||
|
||||
#define FMTASC(x) ((x) < 040)? "<%03o>": "%c", (x)
|
||||
#define SIXTOASC(x) ((x) + 040)
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
|
|
|
@ -493,6 +493,11 @@ static const char r50_to_asc[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ$._0123456789";
|
|||
count = -number of extra words retired
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
int32 fprint_spec (FILE *of, t_addr addr, int32 spec, t_value nval,
|
||||
int32 flag, int32 iflag)
|
||||
{
|
||||
|
|
|
@ -880,6 +880,11 @@ static const int32 opc_val[] = {
|
|||
status = space needed?
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
int32 fprint_opr (FILE *of, int32 inst, int32 class, int32 sp)
|
||||
{
|
||||
int32 i, j;
|
||||
|
|
|
@ -524,6 +524,11 @@ static const int32 fop_val[] = {
|
|||
status = space needed
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
int32 fprint_opr (FILE *of, int32 inst, int32 class, int32 sp)
|
||||
{
|
||||
int32 i, j;
|
||||
|
|
|
@ -137,6 +137,10 @@ t_stat sim_load (FILE *fi, char *cptr, char *fnam, int flag)
|
|||
* The t_addr type must be 32 bit, the upper half contains the segment, the lower
|
||||
* half contains the offset. If the upper half is NIL, it is a word address
|
||||
*/
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
void pdq3_fprint_addr (FILE *st, DEVICE *dptr, t_addr addr)
|
||||
{
|
||||
if (ADDR_ISWORD(addr))
|
||||
|
|
|
@ -252,6 +252,11 @@ return (SCPE_OK);
|
|||
status = error code
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -301,6 +301,11 @@ const char *sim_stop_messages[] = {
|
|||
#define DATA_B(x) (x&0xff)
|
||||
#define DATA_W(x) (x&0xffff)
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
static t_stat _fsymea(FILE* of,t_addr addr,int ea, int oplen,t_value* rest)
|
||||
{
|
||||
int eamod = EAMOD_FIELD(ea);
|
||||
|
|
|
@ -473,6 +473,8 @@ static const char *chname[] = {
|
|||
inst = mask bits
|
||||
*/
|
||||
|
||||
#define fprintf Fprintf /* Use scp.c provided fprintf function */
|
||||
|
||||
void fprint_reg (FILE *of, int32 inst)
|
||||
{
|
||||
int32 i, j, sp;
|
||||
|
|
|
@ -117,6 +117,11 @@ if (flag == 1) return ssem_dump(fi);
|
|||
return ssem_load_dmp(fi);
|
||||
}
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
/* Utility routine - prints number in decimal */
|
||||
|
||||
t_stat ssem_fprint_decimal (FILE *of, uint32 inst)
|
||||
|
|
|
@ -98,6 +98,11 @@ const OPMAP opmap_orig [] = {
|
|||
{ 0000000, NULL, NULL }
|
||||
};
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym_orig (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -729,6 +729,11 @@ const char* regname[] = {
|
|||
if < 0, number of extra bytes retired
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr exta, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
|
@ -202,6 +202,11 @@ static const char r50_to_asc[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ$._0123456789";
|
|||
count = -number of extra words retired
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
int32 fprint_spec (FILE *of, t_addr addr, int32 spec, int32 nval)
|
||||
{
|
||||
int32 reg, mode;
|
||||
|
|
|
@ -494,6 +494,11 @@ const uint32 opval[] = {
|
|||
if < 0, number of extra bytes retired
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
49
scp.c
49
scp.c
|
@ -462,6 +462,7 @@ UNIT *sim_clock_queue = QUEUE_LIST_END;
|
|||
int32 sim_interval = 0;
|
||||
int32 sim_switches = 0;
|
||||
FILE *sim_ofile = NULL;
|
||||
TMLN *sim_oline = NULL;
|
||||
SCHTAB *sim_schrptr = FALSE;
|
||||
SCHTAB *sim_schaptr = FALSE;
|
||||
DEVICE *sim_dfdev = NULL;
|
||||
|
@ -6266,7 +6267,7 @@ for (rptr = lowr; rptr <= highr; rptr++) {
|
|||
return reason;
|
||||
}
|
||||
else
|
||||
fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1);
|
||||
Fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1);
|
||||
}
|
||||
last_val = val;
|
||||
val_start = idx;
|
||||
|
@ -6289,7 +6290,7 @@ for (rptr = lowr; rptr <= highr; rptr++) {
|
|||
return reason;
|
||||
}
|
||||
else
|
||||
fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, highs);
|
||||
Fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, highs);
|
||||
}
|
||||
}
|
||||
return SCPE_OK;
|
||||
|
@ -6351,8 +6352,8 @@ int32 rdx;
|
|||
if (rptr == NULL)
|
||||
return SCPE_IERR;
|
||||
if (rptr->depth > 1)
|
||||
fprintf (ofile, "%s[%d]:\t", rptr->name, idx);
|
||||
else fprintf (ofile, "%s:\t", rptr->name);
|
||||
Fprintf (ofile, "%s[%d]:\t", rptr->name, idx);
|
||||
else Fprintf (ofile, "%s:\t", rptr->name);
|
||||
if (!(flag & EX_E))
|
||||
return SCPE_OK;
|
||||
GET_RADIX (rdx, rptr->radix);
|
||||
|
@ -6362,13 +6363,13 @@ else if (!(rptr->flags & REG_VMIO) ||
|
|||
(fprint_sym (ofile, rdx, &val, NULL, sim_switches | SIM_SW_REG) > 0)) {
|
||||
fprint_val (ofile, val, rdx, rptr->width, rptr->flags & REG_FMT);
|
||||
if (rptr->fields) {
|
||||
fprintf (ofile, "\t");
|
||||
Fprintf (ofile, "\t");
|
||||
fprint_fields (ofile, val, val, rptr->fields);
|
||||
}
|
||||
}
|
||||
if (flag & EX_I)
|
||||
fprintf (ofile, "\t");
|
||||
else fprintf (ofile, "\n");
|
||||
Fprintf (ofile, "\t");
|
||||
else Fprintf (ofile, "\n");
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
@ -6552,7 +6553,7 @@ int32 rdx;
|
|||
if (sim_vm_fprint_addr)
|
||||
sim_vm_fprint_addr (ofile, dptr, addr);
|
||||
else fprint_val (ofile, addr, dptr->aradix, dptr->awidth, PV_LEFT);
|
||||
fprintf (ofile, ":\t");
|
||||
Fprintf (ofile, ":\t");
|
||||
if (!(flag & EX_E))
|
||||
return (1 - dptr->aincr);
|
||||
|
||||
|
@ -6562,8 +6563,8 @@ if ((reason = fprint_sym (ofile, addr, sim_eval, uptr, sim_switches)) > 0) {
|
|||
reason = 1 - dptr->aincr;
|
||||
}
|
||||
if (flag & EX_I)
|
||||
fprintf (ofile, "\t");
|
||||
else fprintf (ofile, "\n");
|
||||
Fprintf (ofile, "\t");
|
||||
else Fprintf (ofile, "\n");
|
||||
return reason;
|
||||
}
|
||||
|
||||
|
@ -8044,7 +8045,7 @@ if (!stream)
|
|||
if (width > MAX_WIDTH)
|
||||
width = MAX_WIDTH;
|
||||
sprint_val (dbuf, val, radix, width, format);
|
||||
if (fputs (dbuf, stream) == EOF)
|
||||
if (Fprintf (stream, "%s", dbuf) < 0)
|
||||
return SCPE_IOERR;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
@ -9445,7 +9446,7 @@ for (i = fields-1; i >= 0; i--) { /* print xlation, transition
|
|||
continue;
|
||||
if ((bitdefs[i].width == 1) && (bitdefs[i].valuenames == NULL)) {
|
||||
int off = ((after >> bitdefs[i].offset) & 1) + (((before ^ after) >> bitdefs[i].offset) & 1) * 2;
|
||||
fprintf(stream, "%s%c ", bitdefs[i].name, debug_bstates[off]);
|
||||
Fprintf(stream, "%s%c ", bitdefs[i].name, debug_bstates[off]);
|
||||
}
|
||||
else {
|
||||
const char *delta = "";
|
||||
|
@ -9458,15 +9459,15 @@ for (i = fields-1; i >= 0; i--) { /* print xlation, transition
|
|||
if (value > beforevalue)
|
||||
delta = "^";
|
||||
if (bitdefs[i].valuenames)
|
||||
fprintf(stream, "%s=%s%s ", bitdefs[i].name, delta, bitdefs[i].valuenames[value]);
|
||||
Fprintf(stream, "%s=%s%s ", bitdefs[i].name, delta, bitdefs[i].valuenames[value]);
|
||||
else
|
||||
if (bitdefs[i].format) {
|
||||
fprintf(stream, "%s=%s", bitdefs[i].name, delta);
|
||||
fprintf(stream, bitdefs[i].format, value);
|
||||
fprintf(stream, " ");
|
||||
Fprintf(stream, "%s=%s", bitdefs[i].name, delta);
|
||||
Fprintf(stream, bitdefs[i].format, value);
|
||||
Fprintf(stream, " ");
|
||||
}
|
||||
else
|
||||
fprintf(stream, "%s=%s0x%X ", bitdefs[i].name, delta, value);
|
||||
Fprintf(stream, "%s=%s0x%X ", bitdefs[i].name, delta, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9772,6 +9773,20 @@ if (sim_deb && (dptr->dctrl & reason)) {
|
|||
}
|
||||
}
|
||||
|
||||
int Fprintf (FILE *f, const char* fmt, ...)
|
||||
{
|
||||
int ret = 0;
|
||||
va_list args;
|
||||
|
||||
va_start (args, fmt);
|
||||
if (sim_oline)
|
||||
tmxr_linemsgvf (sim_oline, fmt, args);
|
||||
else
|
||||
ret = vfprintf (f, fmt, args);
|
||||
va_end (args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Hierarchical help presentation
|
||||
*
|
||||
|
|
1
scp.h
1
scp.h
|
@ -143,6 +143,7 @@ t_stat sim_decode_quoted_string (const char *iptr, uint8 *optr, uint32 *osize);
|
|||
char *sim_encode_quoted_string (const uint8 *iptr, uint32 size);
|
||||
void fprint_buffer_string (FILE *st, const uint8 *buf, uint32 size);
|
||||
t_value strtotv (const char *cptr, const char **endptr, uint32 radix);
|
||||
int Fprintf (FILE *f, const char* fmt, ...);
|
||||
t_stat fprint_val (FILE *stream, t_value val, uint32 rdx, uint32 wid, uint32 fmt);
|
||||
t_stat sim_print_val (t_value val, uint32 radix, uint32 width, uint32 format);
|
||||
char *read_line (char *cptr, int32 size, FILE *stream);
|
||||
|
|
|
@ -337,6 +337,11 @@ static const char *opcode[] = {
|
|||
return = status code
|
||||
*/
|
||||
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
|
||||
UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
12
sim_tmxr.c
12
sim_tmxr.c
|
@ -3850,15 +3850,22 @@ return;
|
|||
|
||||
void tmxr_linemsgf (TMLN *lp, const char *fmt, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
va_start (arglist, fmt);
|
||||
tmxr_linemsgvf (lp, fmt, arglist);
|
||||
va_end (arglist);
|
||||
}
|
||||
|
||||
void tmxr_linemsgvf (TMLN *lp, const char *fmt, va_list arglist)
|
||||
{
|
||||
char stackbuf[STACKBUFSIZE];
|
||||
int32 bufsize = sizeof(stackbuf);
|
||||
char *buf = stackbuf;
|
||||
va_list arglist;
|
||||
int32 i, len;
|
||||
|
||||
buf[bufsize-1] = '\0';
|
||||
while (1) { /* format passed string, args */
|
||||
va_start (arglist, fmt);
|
||||
#if defined(NO_vsnprintf)
|
||||
#if defined(HAS_vsprintf_void)
|
||||
|
||||
|
@ -3880,7 +3887,6 @@ while (1) { /* format passed string, arg
|
|||
len = vsnprintf (buf, bufsize-1, fmt, arglist);
|
||||
#endif /* HAS_vsnprintf_void */
|
||||
#endif /* NO_vsnprintf */
|
||||
va_end (arglist);
|
||||
|
||||
/* If the formatted result didn't fit into the buffer, then grow the buffer and try again */
|
||||
|
||||
|
|
|
@ -224,6 +224,7 @@ t_stat tmxr_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw);
|
|||
void tmxr_msg (SOCKET sock, const char *msg);
|
||||
void tmxr_linemsg (TMLN *lp, const char *msg);
|
||||
void tmxr_linemsgf (TMLN *lp, const char *fmt, ...);
|
||||
void tmxr_linemsgvf (TMLN *lp, const char *fmt, va_list args);
|
||||
void tmxr_fconns (FILE *st, TMLN *lp, int32 ln);
|
||||
void tmxr_fstats (FILE *st, TMLN *lp, int32 ln);
|
||||
t_stat tmxr_set_log (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
|
|
|
@ -1949,6 +1949,10 @@ t_stat sim_load (FILE *fileref, char *cptr, char *fnam, int flag)
|
|||
status = error code
|
||||
for M6800
|
||||
*/
|
||||
/* Use scp.c provided fprintf function */
|
||||
#define fprintf Fprintf
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val, UNIT *uptr, int32 sw)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue