]> andersk Git - moira.git/blob - update/inst_001.c
do typed input on machine type
[moira.git] / update / inst_001.c
1 /*
2  *      $Source$
3  *      $Header$
4  */
5
6 #ifndef lint
7 static char *rcsid_inst_001_c = "$Header$";
8 #endif  lint
9
10 #include <stdio.h>
11 #include <gdb.h>
12 #include "kludge.h"
13
14 STRING instructions = { 0, 0 };
15 extern CONNECTION conn;
16 extern int have_instructions;
17 extern int code;
18
19 /*
20  * instruction sequence transmission:
21  * syntax:
22  *      >>> (STRING) "inst_001"
23  *      <<< (int)0
24  *      >>> (STRING) instructions
25  *      <<< (int)0
26  */
27
28 inst_001(str)
29      char *str;
30 {
31      if (send_ok())
32           lose("sending okay for inst_001");
33      code = receive_object(conn, (char *)&instructions, STRING_T);
34      if (code) {
35           report_error("reporting failure to receive instructions");
36           return;
37      }
38      have_instructions = 1;
39      if (send_ok())
40           lose("sending okay after instructions");
41 #ifdef DEBUG
42      printf("got instructions: %s\n", STRING_DATA(instructions));
43 #endif
44 }
This page took 0.040289 seconds and 5 git commands to generate.