/* issue a AXIOM command to the buffer associated with a page */ void issue_spadcommand(HyperDocPage *page, TextNode *command, int immediate, int type) { char *buf; int ret_val; ret_val = connect_spad(); if (ret_val == NotConnected || ret_val == SpadBusy) return; if (page->sock == NULL) start_user_buffer(page); ret_val = send_int(page->sock, TestLine); if (ret_val == -1) { page->sock = NULL; clear_execution_marks(page->depend_hash); issue_spadcommand(page, command, immediate, type); return; } issue_dependent_commands(page, command, type); ret_val = send_int(page->sock, ReceiveInputLine); buf = print_to_string(command); if (immediate) { buf[strlen(buf) + 1] = '\0'; buf[strlen(buf)] = '\n'; } if (type == Spadsrc) send_pile(page->sock, buf); else send_string(page->sock, buf); mark_as_executed(page, command, type); gIsEndOfOutput = 0; }
void verify_record(void) { int i; for (i=0;i<input_file_count;i++){ send_lisp_command("(|clearCmdCompletely|)"); send_lisp_command("(setq |$testingSystem| T)"); send_lisp_command("(setq |$printLoadMsgs| NIL)"); send_lisp_command("(setq |$BreakMode| '|resume|)"); sprintf(buf_for_record_commands,"(|verifyRecordFile| '\"%s\")",input_file_list[i]); fprintf(stderr,"%s\n",buf_for_record_commands); send_lisp_command(buf_for_record_commands); } if (kill_spad) { i = connect_spad(); if (i != NotConnected && i != SpadBusy) send_int(spad_socket, KillLispSystem); } }
void ht2_input(void) { HashTable *table; HashEntry *entry; int i; bsdSignal(SIGUSR2, SIG_IGN,RestartSystemCalls); gWindow = alloc_hd_window(); init_group_stack(); table = gWindow->fPageHashTable; make_input_file_list(); for (i = 0; i < table->size; i++) for (entry = table->table[i]; entry != NULL; entry = entry->next) make_the_input_file((UnloadedPage *) entry->data); if (kill_spad){ i = connect_spad(); if (i != NotConnected && i != SpadBusy) send_int(spad_socket, KillLispSystem); } }