//--------------------------------------------------------------------------- uchar putVal(op_t &x, uchar mode, uchar warn) { char str[MAXSTR]; uint32 sv_bufsize = bufsize; char *sv_bufbeg = bufbeg, *sv_ptr = get_output_ptr(); init_output_buffer(str, sizeof(str)); { flags_t sv_uFlag = uFlag; uFlag = 0; OutValue(x, mode); uFlag = sv_uFlag; } out_zero(); init_output_buffer(sv_bufbeg, sv_bufsize); set_output_ptr(sv_ptr); if ( warn) out_tagon(COLOR_ERROR ); { register size_t i; if ( !warn) i = tag_strlen(str ); else i = tag_remove(str, str, 0); if ( chkOutLine(str, i)) return(0 ); } if ( warn) out_tagoff(COLOR_ERROR ); return(1); }
//--------------------------------------------------------------------------- uchar putVal(const op_t &x, uchar mode, uchar warn) { char *ptr = get_output_ptr(); { flags_t sv_uFlag = uFlag; uFlag = 0; OutValue(x, mode); uFlag = sv_uFlag; } char str[MAXSTR]; char *end = set_output_ptr(ptr); size_t len = end - ptr; qstrncpy(str, ptr, qmin(len+1, sizeof(str))); if ( warn ) out_tagon(COLOR_ERROR); if ( warn ) len = tag_remove(str, str, 0); else len = tag_strlen(str); if ( chkOutLine(str, len) ) return 0; if ( warn ) out_tagoff(COLOR_ERROR); return 1; }
//---------------------------------------------------------------------- char outName(ea_t from, int n, ea_t ea, uval_t off, uchar *rbad) { char buf[MAXSTR]; if ( get_name_expr(from, n, ea + off, off, buf, sizeof(buf)) <= 0 ) { if ( loadpass >= 0) QueueMark(Q_noName, cmd.ea ); return(0); } if ( chkOutLine(buf, tag_strlen(buf)) ) { *rbad = 1; return(0); } return(1); }
//---------------------------------------------------------------------- uchar putShort(ushort value, uchar wsym) { char *p = get_output_ptr(); out_tagon(COLOR_ERROR); if ( wsym ) OutChar(wsym); OutLong(value, #ifdef __debug__ debugmode ? 16 : #endif 10); out_tagoff(COLOR_ERROR); char tmpstr[32]; char *end = set_output_ptr(p); size_t len = end - p; qstrncpy(tmpstr, p, qmin(len+1, sizeof(tmpstr))); return chkOutLine(tmpstr, tag_strlen(tmpstr)); }
//---------------------------------------------------------------------- uchar putShort(ushort value, uchar wsym) { char tmpstr[32]; register char *p = get_output_ptr(); out_tagon(COLOR_ERROR); if ( wsym) OutChar(wsym ); OutLong(value, #ifdef __debug__ debugmode ? 16 : #endif 10); out_tagoff(COLOR_ERROR); register size_t len = get_output_ptr() - p; memcpy(tmpstr, p, len); tmpstr[len] ='\0'; *p = '\0'; set_output_ptr(p); return(chkOutLine(tmpstr, tag_strlen(tmpstr))); }