static void qmonRQSSetText(Widget tw, lList *rqs_list, lList **alpp) { char *text = NULL; DENTER(GUI_LAYER, "qmonRQSSetText"); if (rqs_list != NULL) { const char *filename = NULL; filename = spool_flatfile_write_list(alpp, rqs_list, RQS_fields, &qconf_rqs_sfi, SP_DEST_TMP, SP_FORM_ASCII, filename, false); text = qmonReadText(filename, alpp); unlink(filename); sge_free(&filename); if (text != NULL) { XmTextSetString(tw, text); XtFree(text); } else { XmTextSetString(tw, ""); } } DEXIT; }
lList* qmonReadFile(const char *filename) { char *text = NULL; lList *alp = NULL; DENTER(GUI_LAYER, "qmonReadFile"); text = qmonReadText(filename, &alp); /* insert file contents in browser */ qmonBrowserShow(text); /* free all allocated space and close */ XtFree(text); DRETURN(alp); }