-
-#if defined __MINGW32__
- assert(_pipe(filedes, 256, O_BINARY)!=-1); // forget it
-#else
- assert(pipe(filedes)!=-1); // forget it
-#endif
-
- // stuff the pipe with the readable icode
- pipeStream=fdopen(filedes[1],"w");
- icTab->iCodePrint(pipeStream, ic, icTab->printName);
- // it really needs an extra push
- fflush(pipeStream);
- // now swallow it
- pipeStream=fdopen(filedes[0],"r");
- fgets(verbalICode, sizeof(verbalICode), pipeStream);
- // clean up the mess, we'll return here for all icodes!!
- assert(!close (filedes[0]));
- assert(!close (filedes[1]));
- // kill the trailing NL
- verbalICode[strlen(verbalICode)-1]='\0';
- // and throw it up
+
+ dbuf_init(&tmpBuf, 1024);
+
+ if (INLINEASM == ic->op)
+ dbuf_append (&tmpBuf, "inline", (sizeof "inline") - 1);
+ else {
+ /* stuff the temporary file with the readable icode */
+ icTab->iCodePrint(&tmpBuf, ic, icTab->printName);
+ }
+
+ /* null terminate the buffer */
+ dbuf_c_str(&tmpBuf);
+ verbalICode = dbuf_detach(&tmpBuf);
+
+ /* kill the trailing NL */
+ if ('\n' == verbalICode[strlen(verbalICode) - 1])
+ verbalICode[strlen(verbalICode) - 1] = '\0';
+
+ /* and throw it up */