-
- assert(pipe(filedes)!=-1); // forget it
-
- // 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
+
+ if (INLINEASM == ic->op)
+ return "inline";
+
+ tmpFile = tempfile();
+ assert(NULL != tmpFile);
+ if (NULL == tmpFile)
+ return ""; /* return empty line if temporary file creation failed */
+
+ addSetHead(&tmpfileSet, tmpFile);
+
+ /* stuff the temporary file with the readable icode */
+ icTab->iCodePrint(tmpFile, ic, icTab->printName);
+
+ /* now swallow it */
+ rewind(tmpFile);
+ fgets(verbalICode, sizeof(verbalICode), tmpFile);
+
+ /* clean up the mess, we'll return here for all icodes!!
+ * Actually the temporary file is only closed. It will be
+ * removed by rm_tmpfiles().
+ */
+ assert(!fclose(tmpFile));
+ deleteSetItem(&tmpfileSet, tmpFile);
+
+ /* kill the trailing NL */
+ if ('\n' == verbalICode[strlen(verbalICode) - 1])
+ verbalICode[strlen(verbalICode) - 1] = '\0';
+
+ /* and throw it up */