static int write_app_resources(GenCodeInfo genCodeInfo, ABObj project) { File codeFile; if (!genCodeInfo || !project) return (0); codeFile = genCodeInfo->code_file; abio_puts(codeFile, "\n"); abio_puts(codeFile, "/*\n"); abio_puts(codeFile, " * Application Resources\n"); abio_puts(codeFile, " */\n"); abio_puts(codeFile, "static XtResource resources[] = {\n"); abio_indent(codeFile); abio_puts(codeFile, "{\"session\", \"Session\", XtRString, sizeof(String),\n"); abio_indent(codeFile); abio_puts(codeFile, "XtOffsetOf(DtbAppResourceRec, session_file), XtRImmediate, (XtPointer)NULL}\n"); abio_outdent(codeFile); abio_puts(codeFile, "\n"); abmfP_write_user_struct_fields_seg(genCodeInfo); abio_outdent(codeFile); abio_puts(codeFile, "};\n"); return (0); }
static int write_app_resource_struct( GenCodeInfo genCodeInfo, ABObj project ) { File codeFile; if (!genCodeInfo || !project) return (0); codeFile = genCodeInfo->code_file; abio_puts(codeFile,"\n"); abmfP_write_c_comment(genCodeInfo, FALSE, "Structure to store values for Application Resources"); abio_puts(codeFile,"typedef struct {\n"); abio_indent(codeFile); abio_puts(codeFile,"char *session_file;\n"); abio_puts(codeFile,"\n"); abmfP_write_user_struct_fields_seg(genCodeInfo); abio_outdent(codeFile); abio_puts(codeFile, "} DtbAppResourceRec;\n"); abio_puts(codeFile,"\n"); return (0); }
static int write_option_desc_list(GenCodeInfo genCodeInfo, ABObj project) { File codeFile; if (!genCodeInfo || !project) return (0); codeFile = genCodeInfo->code_file; abio_puts(codeFile, "\n"); abio_puts(codeFile, "/*\n"); abio_puts(codeFile, " * command line options...\n"); abio_puts(codeFile, " */\n"); abio_puts(codeFile, "static XrmOptionDescRec optionDescList[] = {\n"); abio_indent(codeFile); abio_puts(codeFile, "{\"-session\", \"*session\", XrmoptionSepArg, (XPointer)NULL}\n"); abio_puts(codeFile, "\n"); abmfP_write_user_struct_fields_seg(genCodeInfo); abio_outdent(codeFile); abio_printf(codeFile, "};\n"); return (0); }