/[xlog]/xlog/remote/sendtoxlog.c
ViewVC logotype

Diff of /xlog/remote/sendtoxlog.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by pa4tu, Sun May 4 12:06:07 2003 UTC revision 1.6 by pa4tu, Tue Aug 26 17:03:57 2003 UTC
# Line 29  Line 29 
29  /* definition of some strings to send over */  /* definition of some strings to send over */
30  #define DEMO1   "program:sendtoxlog\1version:1\1date:29 Jul 2001\1time:2214\1call:wa0eir"  #define DEMO1   "program:sendtoxlog\1version:1\1date:29 Jul 2001\1time:2214\1call:wa0eir"
31  #define DEMO2   "program:sendtoxlog\1version:1\1date:30 Dec 2001\1time:2214\1endtime:2220\  #define DEMO2   "program:sendtoxlog\1version:1\1date:30 Dec 2001\1time:2214\1endtime:2220\
32  \1call:pa4tu\1mhz:\1mode:rtty\1tx:579\1rx:569\1name:joop\1qth:houten\1notes:author of xlog\  \1call:pg4i\1mhz:14\1mode:cw\1tx:579\1rx:569\1name:joop\1qth:houten\1notes:this is DEMO2\
33  \1power:100W\1locator:JO22OB\1free1:testfree1\1free2:testfree2"  \1power:100W\1locator:JO22OB\1free1:testfree1\1free2:testfree2"
34  #define DEMO3   "program:sendtoxlog\1version:1\1call:wa0eir"  #define DEMO3   "program:sendtoxlog\1version:1\1call:f8fce"
35    #define DEMO4   "program:sendtoxlog\1version:1\1date:26 Aug 2003\1time:2214\1endtime:2220\
36    \1call:pg4i\1mhz:HAMLIB\1mode:HAMLIB\1tx:HAMLIB\1rx:569\1name:joop\1qth:houten\1notes:this is DEMO4\
37    \1power:HAMLIB\1locator:JO22OB\1free1:testfree1\1free2:testfree2"
38    
39  #include <stdlib.h>  #include <stdlib.h>
40  #include <stdio.h>  #include <stdio.h>
# Line 76  main (int argc, char *argv[]) Line 79  main (int argc, char *argv[])
79        fprintf (stdout,        fprintf (stdout,
80                 "Sendtoxlog, program which demonstrates how to send remote data to xlog.\n");                 "Sendtoxlog, program which demonstrates how to send remote data to xlog.\n");
81        fprintf (stdout,        fprintf (stdout,
82                 "        Usage: sendtoxlog [number], where number can be 1, 2 or 3 ...\n");                 "        Usage: sendtoxlog [number], where number can be 1, 2, 3 or 4 ...\n");
83        fprintf (stdout,        fprintf (stdout,
84                 "                 sendtoxlog 1, demonstrates date time and callsign\n");                 "                 sendtoxlog 1, demonstrates date time and callsign\n");
85        fprintf (stdout,        fprintf (stdout,
86                 "                 sendtoxlog 2, demonstrates all entries\n");                 "                 sendtoxlog 2, demonstrates all entries\n");
87        fprintf (stdout,        fprintf (stdout,
88                 "                 sendtoxlog 3, demonstrates only the callsign field\n");                 "                 sendtoxlog 3, demonstrates only the callsign field\n");
89          fprintf (stdout,
90                   "                 sendtoxlog 4, demonstrates hamlib capabilities\n");
91        exit (0);        exit (0);
92      }      }
93    if (strcmp (argv[1], "1") != 0 && strcmp (argv[1], "2") != 0    if (strcmp (argv[1], "1") != 0 && strcmp (argv[1], "2") != 0
94        && strcmp (argv[1], "3") != 0)        && strcmp (argv[1], "3") != 0 && strcmp (argv[1], "4") != 0)
95      {      {
96        fprintf (stdout, "Argument for sendtoxlog is '1', '2' or '3',");        fprintf (stdout, "Argument for sendtoxlog is '1', '2', '3' or 4,");
97        fprintf (stdout, "        type sendtoxlog for help.\n");        fprintf (stdout, "        type sendtoxlog for help.\n");
98        exit (1);        exit (1);
99      }      }
# Line 114  main (int argc, char *argv[]) Line 119  main (int argc, char *argv[])
119    /* demo 3 */    /* demo 3 */
120    if (strcmp (argv[1], "3") == 0)    if (strcmp (argv[1], "3") == 0)
121      sendtoxlog (DEMO3);      sendtoxlog (DEMO3);
122      /* demo 4 */
123      if (strcmp (argv[1], "4") == 0)
124        sendtoxlog (DEMO4);
125    
126  /*  /*
127   * WARNING: do not remove the message queue with   * WARNING: do not remove the message queue with

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26