Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator) (03/04/90)
Submitted-by: mrr@amanpt1.Newport.RI.US (Mark Rinfret) Posting-number: Volume 90, Issue 094 Archive-name: rexx/mrnbstime [ uuencoded binary enclosed. ...tad ] Here's a little tool I whipped up to assist in obtaining the current time from the National Bureau of Standards clock. It depends upon a term program such as VT100 R2.9 for modem support. Source, documentation and a working ARexx script are included. This offering is public domain - no restrictions on its use. Mark Rinfret #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 1)." # Contents: MRNBSTime.c MRNBSTime.uu MRNBSTime.vt100 ReadMe makefile # Wrapped by tadguy@xanth on Sat Mar 3 21:34:59 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'MRNBSTime.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'MRNBSTime.c'\" else echo shar: Extracting \"'MRNBSTime.c'\" \(3708 characters\) sed "s/^X//" >'MRNBSTime.c' <<'END_OF_FILE' X#include <stdio.h> X#include <stdlib.h> X#include <string.h> X#include <fcntl.h> X#include <time.h> X#include <exec/types.h> X#include <libraries/dosextens.h> X Xstatic int tz_hour_diff = 0; Xstatic int tz_minutes_diff = 0; X Xstatic char *monthNames[12] = { X "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Nov","Dec" X }; X Xint XConvertUTC(const char *s, int hourDiff, int minuteDiff, char *dosDate) X{ X#define EPOCH 40587 /* UNIX starts JD 2440587, */ X#define TIME "%05ld %03d %02d%02d%02d UTC" X int result = 0; X time_t now; X long julian; X int day_of_year; X int hour; X int min; X int sec; X struct tm *lt; X X if(sscanf(s,TIME, &julian, &day_of_year, &hour, &min, &sec) != 5) X { X fprintf(stderr,"Garbled time code: %s\n", s); X result = 1; X } X else { X now = (((julian - EPOCH) * 24 + hour) * 60 + min) * 60 + sec; X now += ((minuteDiff * 60) + (hourDiff * 3600)); X lt = localtime(&now); X sprintf(dosDate,"%d-%s-%d %02d:%02d:%02d", X lt->tm_mday, X monthNames[lt->tm_mon], X lt->tm_year, X lt->tm_hour, X lt->tm_min, X lt->tm_sec); X fprintf(stderr,"GMT time: %s\n", dosDate); X } X return result; X} X Xmain(argc, argv) X int argc; X char **argv; X{ X#define UTC_LENGTH 20 /* length of UTC string */ X int argn = 0; X int gotit = 0; X int leng; X int returnValue = 0; X char lastString[81]; X char timeString[81]; X X while (++argn < argc) { X if (strcmp(argv[argn], "-h") == 0) { X tz_hour_diff = atoi(argv[++argn]); X if (tz_hour_diff < -12 || tz_hour_diff > 12) { X fprintf(stderr,"%s: bad delta hours value!\n", argv[0]); X return 1; X } X } X else if (strcmp(argv[argn], "-m") == 0) { X tz_minutes_diff = atoi(argv[++argn]); X if (tz_minutes_diff < -59 || tz_minutes_diff > 59) { X fprintf(stderr,"%s: bad delta minutes value!\n", argv[0]); X return 1; X } X } X else if (*argv[argn] == '-') { Xusage: X fprintf(stderr, X "Usage: %s [-h <hours>] [-m <minutes>] [ <filename> ]\n", argv[0]); X fprintf(stderr, X "<hours> (+-12) and <minutes> (+-59) are your time delta from GMT.\n"); X fprintf(stderr, X "If <filename> is not given, standard input is assumed.\n"); X } X else { X if ( (argc - argn) > 1) goto usage; X if (! freopen(argv[argn], "r", stdin) ) { X fprintf(stderr,"%s: %s would not open for input!\n", X argv[0], argv[argn]); X return 1; X } X break; X } X } X /* Scan standard input (normally a pipe or file), looking for valid universal X * time code strings. Save the last one for conversion. X */ X while (gets(timeString)) { X leng = strlen(timeString); X if (leng >= UTC_LENGTH) { X if (strcmp(timeString+leng-3, "UTC") == 0) { X gotit = 1; X strcpy(lastString, timeString); X break; X } X } X } X if (gotit) { X if ((returnValue = X ConvertUTC(lastString, tz_hour_diff, tz_minutes_diff, timeString)) == 0) { X fprintf(stderr, "%s\n", timeString); X fexecl("Date","Date",timeString,NULL); X returnValue = wait(); X } X } X else { X fprintf(stderr,"No UTC strings found in input file!\n"); X returnValue = 1; X } X return returnValue; X} END_OF_FILE if test 3708 -ne `wc -c <'MRNBSTime.c'`; then echo shar: \"'MRNBSTime.c'\" unpacked with wrong size! fi # end of 'MRNBSTime.c' fi if test -f 'MRNBSTime.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'MRNBSTime.uu'\" else echo shar: Extracting \"'MRNBSTime.uu'\" \(16981 characters\) sed "s/^X//" >'MRNBSTime.uu' <<'END_OF_FILE' Xbegin 664 MRNBSTime XM```#\P`````````#``````````(```K2````^@````$```/I```*TD[Z$K!.R XM5?_H2.<@,B9M``@L;0`4=`!(;?_H2&W_[$AM__!(;?_T2&W_^$AZ`PPO"TZZ` XM!68,@`````5/[P`<9Q@O"TAZ`Q!(;('&3KH$@G0!3^\`#&```)X@+?_X(@#CS XMB-"!YXC0K?_P(@#IB)"!Y8C0K?_L(@#IB)"!Y8C0K?_H!H`N^[^`*T#__"(\4 XM```.$"`M``Q.NBJ.+P`@+0`0(@#IB)"!Y8@B']*`TZW__$AM__Q.NAL\)$`O$ XM$B\J``0O*@`(+RH`%"`J`!#E@$'L@`HO,`@`+RH`#$AZ`I$O#DZZ&>`O#DAZ1 XM`IU(;('&3KH#X$_O`#`@`DS?3`1.74YU3E7_7DCG/B`H+0`()&T`#'0`>@!\O XM`%*"M(1L``%`2'H"<R`"Y8`O,@@`3KH8=DJ`4$]F2%*"(`+E@"\R"`!.NAG0" XM*4"``@RL____](`"6$]M"@RL````#(`";QPO$DAZ`C9(;('&3KH#:'`!3^\`= XM#$S?!'Q.74YU8```WDAZ`C0@`N6`+S((`$ZZ&!A*@%!/9D)2@B`"Y8`O,@@`8 XM3KH9<BE`@`8,K/___\6`!EA/;0H,K````#N`!F\6+Q)(>@'W2&R!QDZZ`PIP9 XM`4_O``Q@H&```(8@`N6`('((``P0`"UF+"\22'H![4AL@<9.N@+B2'H"%TAL4 XM@<9.N@+62'H"3DA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T1@/B`#4H,@4K'J``1D"B!24I)P`!`08`@O# XM"DZZ`'A83QP`2(!(P+""9Q8@`U.#+PH0!DB`2,`O`$ZZ`E!03V`$8`#ZBDJM+ XM__AF1"`#4H,@4K'J``1D"B!24I)P`!`08`@O"DZZ`#!83QP`#```_V8*</],0 XMWTS\3EU.=2`#4X,O"A`&2(!(P"\`3KH"`%!/("W_^&#>2.<P,"1O`!0@"F<6D XM<``P*@`,)@!G#`@#``IF!@@#``-G"'#_3-\,#$YU(%*QZ@`$90``IDJJ``AF@ XM""\*3KH9?%A/,"H`#`)``*!G,$'L@9HF2'``,"L`#`*```!`(`R```!`(&8(M XM+PM.NA6P6$_7_````!9![(-2M\AEUB!*T?P````,,!`"0*__,(`O*@`0+RH`X XM"!`J``Y(@$C`+P!.N@Q2)`!/[P`,;B!*@F8$<`)@`G`$($K1_`````QR`#(0F XM@($P@'#_8`#_7"2J``@@0M'J``@E2``$(%)2DG``$!!@`/]"2.<\,BQO`"`D* XM;P`D)F\`*"@O`"PF/```!``0$DB`2,`J``R`````<F8.)#P``!``)CP```(`; XM8"@,A0```'=F""0\```3`6`8#(4```!A9@@D/```&0%@"'``3-],/$YU4HH0^ XM$DB`#$``*V8,$"H``4B`#$``8F<,$!)(@`Q``&)F"E**",,`!`B"``P0$DB`: XM#$``*V8:(`((@```)``(P@`!(`,"@/__^?\F``C#``L@#F<,+P(O#DZZ"8`HO XM`%!/2H1ME`R$````%&R,%T0`#C=#``P@"V""2.<`($'L@9HD2$IJ``QG&-7\9 XM````%D'L@U*UR&8(<`!,WP0`3G5@XD)J`!1"DD*J``1"J@`((`I@YDCG("`DB XM+P`,)&\`$`R"_____V<2(`IG#DIJ``QG"`@J``(`#&<(</],WP0$3G5*J@`(_ XM9@@O"DZZ%XQ83R!2L>H`"&80(&H`!+'J``ABV%*2)5(`!"!*T?P````,,!`(9 XM@``!,(`@2M'\````##`0",``##"`4Y(@4A""<``0`F"H("R#7DYU2&\`""\OX XM``AA!%!/3G5.5?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-]``$J`9AQ(YP`"+&R#DDZN9 XM_WQ,WT``)@`,@````,UF``#J2.<@`B0\```#[2(O``0L;(.23J[_XDS?0`0D( XM0"`*9@``I`@$``AF!G8!8```O$CG(`(D/````^XB+P`$+&R#DDZN_^),WT`$W XM)$!*@&862.<``BQL@Y).KO]\3-]``"8`8```ADCG``)P(4/Z`,`L;(.*3J[]3 XMV$S?0``L`&<42.<``B)&+&R#BDZN_F),WT``8#!(YS`"=@%!^@">)`@B"BQL@ XM@Y).KO_03-]`#$CG,`)V_W0`(@HL;(.23J[_ODS?0`Q@,"`$`H````4`#(``Q XM``4`9B!(YP`"(@HL;(.23J[_W$S?0`!V!2E#@[IP_TS?3'Q.=7(&(`).NA*R& XM)XH(`'(&(`).NA*F-X0(!`@$``MG%DCG,`)V`70`(@HL;(.23J[_ODS?0`P@C XM`F#"9&]S+FQI8G)A<GD```!(YS`@)"\`$$ZZ#^1R!B`"3KH28"1`U>R#FDJ", XM;0PP;(-2L<)O!$J29A`I?`````.#NG#_3-\$#$YU,"H`!$C``H`````##(``K XM```!9@PI?`````:#NG#_8-I(YS`")B\`)"0O`"`B$BQL@Y).KO_63-]`#"8`@ XM#(#_____9AA(YP`"+&R#DDZN_WQ,WT``*4"#NG#_8)X@`V":("\`!`R`````5 XM0&,.#(````!:8@8&@````"!.=4SO`P``!"`((B\`#+')9Q9C&-'!T\%@`A$A; XM4<G__`2!``$``&KT3G40V5')__P$@0`!``!J\DYU3.\#```$L\AG#'``$!BP7 XM&5;(__IF!'``3G5C!'`!3G5P_TYU2.<P,BQO`!A(YP`"<`!#^@#6+&R#BDZNS XM_=A,WT``*4"#OF8&3-],#$YU2.<``B!O`"`@:``D(&@`!"QL@[Y.KO^R3-]`E XM`"1`2H!G?DCG``)#^@"A(&H`-BQL@[Y.KO^@3-]``"0`9U!(YR`")#P```/M] XM(A<L;(.23J[_XDS?0`0F0$J`9S(@"^6`)@`@0RUH``@`I"U+`)Q(YR`")#P`: XM``/M0?H`5B((+&R#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(Q```1((6, XM&F!6*WP````P__QT`&`8(`+G@'(`$@/0@=""T((D``2"````,!8:<``0`T'L- XM@)D0,```2(`(```"9M1@'`1``"!GH%=`9Z)?0&>D4T!GCE5`9X170&>L8+(K% XM0O_X)#P``'W&#`,`+F9<%AH,`P`J9A18CB0N__Q*@FP&)#P``'W&%AI@,'0`& XM8!@@`N>`<@`2`]"!T(+0@B0`!((````P%AIP`!`#0>R`F1`P``!(@`@```)F( XMU`R"``!]QF<(*WP````@__PJ`@P#`&AF!@C$``=@%@P#`&QF!@C$``9@"@P#@ XM`$QF!@C$``@6&BM*``QP`!`#8``!CF```QH(!``'9PI8CB!N__PPAV`8"`0`: XM!F<*6(X@;O_\((=@"%B.(&[__""'=`!@``&H6(XD;O_\+PI.N@,()``,A0``\ XM?<983V<&M(5O`B0%8``!AEB.%B[__T'M_?@D2!"#=`%@``%R=`A@$`!$`$AV1 XM>'008`8(Q``$=`H,`P!89@A!^@*>(`A@!D'Z`J<@""M`_?0(!``&9PA8CBPN7 XM__Q@%`@$``1G"%B.+"[__&`&6(XL+O_\"`0`!&<*2H9L!D2&",0`!4'M__@DQ XM2`R%``!]QF8">@%*AF8$2H5G'"("(`9.N@6L(&W]]!4P"``B`B`&3KH%J"P`$ XM9N1![?_XD<HD"`@$``-G;@P#`&]F%$J"9PH,$@`P9PBTA6T$*@)2A6!4#`,`\ XM>&<&#`,`6&9(2H)G1`P2`#!G/K2%;!!![?WZL<ID"!4\`#!2@F#L"`0``&8<4 XM#*T````P__QF$B`"5("PK?_X;`@J+?_X585@RA4#%3P`,%2"M(5L$$'M_?BQD XMRF0(%3P`,%*"8.Q@3`1``"5G`/[(!$``,V<`_M@$0``+9P#^LE-`9P#^SEM`4 XM9P#^R%M`9P#^4%-`9P#^KE-`9P#^K%=`9P#^;%5`9P#^KE=`9P#^H&``_BH(# XM!``$9R@(!``%9P85/``M8!H(!``!9P85/``K8`X(!``"9P85/``@8`)3@E*"H XMWH((!```9@``D`RM````,/_\9D((!``$9SPP!`)``"9G-"!3L>L`!&0.(%-2B XMDQ":<``0*O__8`YP`!`:+P`O"TZZ`9)03PR`_____V<``,A3K?_X4X)@-"!3: XML>L`!&00(%-2DQ"M__]P`!`M__]@$'``$"W__R\`+PM.N@%84$\,@/____]G% XM``".4H<@+?_X4ZW_^+"";L`J`B`"4X)*@&<N(%.QZP`$9`X@4U*3$)IP`!`JU XM__]@#G``$!HO`"\+3KH!$E!/#(#_____9TA@R@@$``!G/"0%8"P@4['K``1DE XM#B!34I,0O``@<`!P(&`,2'@`("\+3KH`W%!/#(#_____9Q)2AR`M__A3K?_XP XML()NR&``^UAP_V``^UPP,3(S-#4V-S@Y04)#1$5&`#`Q,C,T-38W.#EA8F-DZ XM968`(&\`!"`(2AAF_%-(D<`@"$YU2.<`("1O``@@"F9$0>R!FB1(2FH`#&<F@ XM,"H`#`)``@AF'$AX__\O"DZZ`%H,@/____]03V8(</],WP0`3G75_````!9!K XM[(-2M<AEQG``8.A(>/__+PI.N@`L4$]@VDCG`"!![(&:)$@O"DZZ`;Y83]7\@ XM````%D'L@U*UR&7J3-\$`$YU2.<\("1O`!@H+P`<(`IG``&0-"H`#&<``8@(# XM`@`)9@`!@`@"``-F``%X($K1_`````PP$`)`[_TP@$JJ``AF'`R$_____V8(W XM<`!,WP0\3G4O"DZZ`L@T*@`,6$\(`@`.9C0@4K'J``AC'DAX``$@$I"J``0OB XM`!`J``Y(@$C`+P!.N@1,3^\`#"2J``@@:@`0T=(E2``$#(3_____9@1V`&`"[ XM%@0@$I"J``@J`#`"`D``H&=.#(3_____9R(@4E*2$(,@2M'\````##`0",``* XM#C"`-`!!^O\$*4B#PE*%#(3_____9PP,`P`*9P:ZJ@`0901X_V`,)5(`!'``M XM$`-@`/]*"`(`#F<P2H5G'"\%+RH`"!`J``Y(@$C`+P!.N@1VL(5/[P`,9EX@^ XM2M'\````##`0"(``#C"`#(3_____9A(DJ@`()6H`"``$<``0`V``_OI!^OZ&X XM*4B#PB!*T?P````,,!`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]HL;(.*3J[^8DS?0`!*K(/>9Q1(Z XMYP`"(FR#WBQL@XI.KOYB3-]``$JL@^)G%$CG``(B;(/B+&R#BDZN_F),WT``J XM2JR#YF<42.<``B)L@^8L;(.*3J[^8DS?0`!(YP`&+'@`!`@N``0!*6<02_H`K XM"$ZN_^)@!D*G\U].<RI?2JR#IF8\2JR#MF<T2.<``B`L@[(B;(.V+&R#BDZNU XM_RY,WT``2.<``B`L@Z[E@%B`(FR#JBQL@XI.KO\N3-]``&`D2.<``BQL@XI.? XMKO]\3-]``$CG``(B;(.F+&R#BDZN_H9,WT``2.<``B)L@Y(L;(.*3J[^8DS?, XM0``@`RYL@XY.=4S?``Q.=4CG("`D+P`,<@8@`DZZ`$HD0-7L@YI*@FT,,&R#K XM4K'";P1*DF80*7P````#@[IP_TS?!`1.=3`J``0"0(``9A)(YP`"(A(L;(.2^ XM3J[_W$S?0`!"DG``8-A(YW``-`'$P"8!2$/&P$A#0D/4@TA`P,%(0$)`T(),F XMWP`.3G4```/L`````0```````!)^`````0````$``!,J`````````_(```/J1 XM````UP`````````````##````Q````,4```#&````QP```,@```#)````R@`_ XM``,L```#,````S0`````04)#1$5&86)C9&5F.3@W-C4T,S(Q,``*"PP-#@\*E XM"PP-#@\)"`<&!00#`@$``````!\````<````'P```!X````?````'@```!\`" XM```?````'@```!\````>````'P`@("`@("`@("`P,#`P,"`@("`@("`@("`@) XM("`@("`@()!`0$!`0$!`0$!`0$!`0$`,#`P,#`P,#`P,0$!`0$!`0`D)"0D)5 XM"0$!`0$!`0$!`0$!`0$!`0$!`0$!0$!`0$!`"@H*"@H*`@("`@("`@("`@("Q XM`@("`@("`@)`0$!`(```````````````````````````````````````````P XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM``````````````````````````(````````!```````````````````$``$`( XM`````0``````````````````!``"``````$`````````````````````````( XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM`````````````````````````````````````````````````````````!0`4 XM```````````````#[`````L`````````"`````P````0````%````!@````<F XH````(````"0````H````+````#`````````#\@```^L````!```#\A@`Y X`` Xend Xsize 12100 END_OF_FILE if test 16981 -ne `wc -c <'MRNBSTime.uu'`; then echo shar: \"'MRNBSTime.uu'\" unpacked with wrong size! fi # end of 'MRNBSTime.uu' fi if test -f 'MRNBSTime.vt100' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'MRNBSTime.vt100'\" else echo shar: Extracting \"'MRNBSTime.vt100'\" \(4203 characters\) sed "s/^X//" >'MRNBSTime.vt100' <<'END_OF_FILE' X/* This VT100 AREXX macro will try to get the precise time by calling the X** National Bureau of Standards. It captures the time string, then calls X** the program "MRNBSTime" with the result. X** X** This macro requires VT100 R2.9 and ARexx 1.10. X**/ Xtrace OFF X Xif show("L", "rexxsupport.library") = 0 Xthen call addlib "rexxsupport.library", 0, -30, 0 X Xdo X portname = "REXX-VT100" X port = openport(portname) X X if Port = '0000 0000'x X then do X say "Couldn't open the port." X exit 20 X end X X "BAUD 1200" X X "FORWARD" portname /* Enable forwarding of received data. */ X if rc ~= 0 then exit X forwarding = 1 X X if dial("DT1-202-653-0351") = 0 /* Dial NBS. */ X then do X 'MSG "Dial failed."' X call cleanup 20 X end X X 'FORWARD' /* Disable forwarding of received data. */ X forwarding = 0 X X /* Note that this uses a file in RAM:. You might want to try using a named X * pipe (e.g. PIPE:NBSTIME) instead! X */ X X "CAPTURE RAM:zzzNBSTime.text" /* Capture time code text. */ X call delay 250 /* Collect approx. 5 seconds worth. */ X "CAPTURE" /* Close capture buffer. */ X X /* Set the system date. */ X address COMMAND 'MRNBSTime -h -5 RAM:zzzNBSTime.text' X X /* Unless you have an incredibly slow disk drive, your clock should now be X * within 1 second of the NBS time. Don't you just feel good all over? X */ X X 'MSG "Ohhh...it feels so good!"' X X call cleanup -1 X X /* X * Delete our temporary file. X */ X address COMMAND 'Delete RAM:zzzNBSTime.text' X Xend X Xexit 0 X X X/* Dial the specified number(s). If we get no connection we keep going till X** we get a connection. If we never get one then we return 0 for failure else X** we return 1 for success. X**/ Xdial: procedure expose port portname Xnumargs = arg() X Xmsgdata = "" Xdo i = 1 to numargs X 'SEND "AT' || arg(i) || '^M"' X if get_match(60, "CONNECT", "BUSY", "NO") = 2 X then leave Xend X Xif i > numargs Xthen return 0 /* Failure */ Xelse return 1 /* Success */ X X/* Get a match from the serial port via VT100. 1st arg is the maximum time X** we'll wait; subsequent args are "acceptable" match strings. We return the X** arg() index of the matched string so if we ever time out we'll return 1 X** (since that's the index of the max time arg). X**/ Xget_match: procedure expose port portname Xnumargs = arg() Xlongest = 0 Xdo i = 2 to numargs X longest = max(longest, length(arg(i))) Xend X Xmsgdata = "" Xmaxtime = arg(1) Xdo forever X msg = receive(maxtime) X if msg == "" X then return 1 X X msgdata = msgdata || msg X do i = 2 to numargs X ndx = index(msgdata, arg(i)) X if ndx > 0 X then leave X end X if i <= numargs X then return i X X if length(msgdata) > longest X then msgdata = right(msgdata, longest - 1) Xend X X X/* Don't use the AREXX waitpkt() function as that locks us up until something X** arrives at the port. Instead, use the AmigaDOS WAIT command or, if you have X** AREXX 1.10 or later, the AREXX delay() function. X**/ Xreceive: procedure expose port portname Xarg waittime X Xtime = 0 Xpacket = getpkt(portname) Xdo while packet = '0000 0000'x X if waittime ~= 0 X then do X if time > waittime X then return "" X/* address COMMAND "WAIT 1 SEC" /* AmigaDOS */ */ X call delay 50 /* AREXX 1.10 or above */ X time = time + 1 X end X else call waitpkt portname X packet = getpkt(portname) Xend Xmsg = getarg(packet) Xcall reply packet, 0 X Xretval = "" Xdo while length(msg) > 0 X parse var msg first '00'x msg X retval = retval || first Xend X Xreturn retval X Xcleanup: procedure expose port portname forwarding Xarg retc X Xif forwarding = 1 then 'FORWARD' /* Disable forwarding. */ X X/* Reply all packets queued up for us. */ X Xpacket = getpkt(portname) Xdo while packet ~= '0000 0000'x X call reply packet, 0 X packet = getpkt(portname) Xend X X/* This is the hangup code. Ick! Well, it does seem to work :-| */ X Xcall delay 50 X'SEND "+++"' /* Put modem in command mode. */ Xcall delay 50 X'SEND "+++"' /* Pay the insurance man. */ Xcall delay 50 X'SEND "ATH^M"' /* Drop carrier. */ Xcall delay 50 X'SEND "ATH^M"' /* Did you hear me? I said DROP CARRIER! */ X Xcall closeport port X Xif retc = -1 then return X Xexit retc X END_OF_FILE if test 4203 -ne `wc -c <'MRNBSTime.vt100'`; then echo shar: \"'MRNBSTime.vt100'\" unpacked with wrong size! fi # end of 'MRNBSTime.vt100' fi if test -f 'ReadMe' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ReadMe'\" else echo shar: Extracting \"'ReadMe'\" \(3912 characters\) sed "s/^X//" >'ReadMe' <<'END_OF_FILE' X02/19/90 MRNBSTime - Set your clock by the National Bureau of Standards X XThis program got its inspiration from a program named "nbstime", written by XWarren Tucker. The time conversion code is partly Warren's. I thought it Xwould be nice to have a similar capability on the Amiga. In keeping with Xthe "small and simple is better" philosophy, I didn't load it up with all Xof the serial I/O stuff. MRNBSTime gets its time value from an external Xfile (standard input or filename parameter). One would normally invoke XMRNBSTime from a terminal emulator script (as my example illustrates) or Xfrom an ARexx program which has access to a serial I/O resource (e.g. XLarry Phillips' SerMod package). In fact, I was so into the spirit of Xcooperating tasks that MRNBSTime calls the Amiga's Date command to set the Xnew system date. Of course, some might suggest that I was just too lazy to Xwrite the Aztec-AmigaDOS date conversion routines :-). Naw! Well... X XMRNBSTime is invoked from the CLI (or suitable scripting program). Its Xcommand-line options are: X X MRNBSTime [ options ] [ filename ] or, X MRNBSTime [ options ] < filename or, if you use AShell and PIP: X someprogram | MRNBSTime [ -d delta ] (pipe it in!) X XThe options (which are optional if you live in Greenwich) may be one or both of these: X X -h hours number of hours to add to GMT value (+- 12) X -m minutes number of minutes to add to GMT value (+- 59); X if specified, usually -30 or +30 X XThese delta parameters allow you to specify your timezone delta from GMT. XFor instance, if you're in Rhode Island, your delta value (now, anyways) is X-5. This could very well be derived from an environment variable (probably Xshould be). Some examples: X X French Polynesia -h -9 -m -30 X X New England -h -5 (Winter) (I wish they'd repeal this!) X -h -4 (Summer) X X California -h -8 X X Greenwich, GB (What are you looking for? :-) X X Iran -h 3 -m 30 X X Central Australia -h 9 -m 30 X X XThe contents of the input file look like this: X X* X47941 050 212218 UTC X* X47941 050 212219 UTC X* X47941 050 212220 UTC X* X^%$^#&Iax|+$^ XOK X XIt's quite alright to have some garbage in the file. As long as MRNBSTime Xcan recognize one good line, all is well. For the curious, the universal Xtime code fields break out to: X X Julian Date X Day in the year X Time (HHMMSS) (GMT) X UTC = Magic recognizer cookie X XThe auto-answer modem (1200 baud) for the National Bureau of Standards is Xat 202-653-0351. X XEnjoy! I am placing this program in the public domain. Do whatever you Xwant with it. One caveat: I will not be accountable for hugeamongous Xphone bills should you automate this and trust the supplied VT100 script to Xhang up properly. I have a hunch that the line would drop automatically Xafter some interval, but I haven't tried it. Be careful! X XOh, by the way... I created this using Manx Aztec C, V5.0. I modified the Xdeclaration of "fexecl" (in fcntl.h) to take a variable length parameter Xlist: X X int fexecl(char *file, char *arg0, ... ); X XThe Aztec includes are a little rough (new) and need a thorough grooming. X XThe VT100 script file requires VT100 release 2.9 and was originally written Xby Tony Sumrall as an example login script. To use the example Xapplication, do the following: X X 1. Copy MRNBSTime to a directory in your search path (e.g. C:). X X 2. Copy MRNBSTime.vt100 to your Rexx: directory. If you're on the West X Coast or some other foreign land, you'll want to add the appropriate X -d option to the script line that invokes the MRNBSTime. X X 3. Start the VT100 emulator. X X 4. Select "AREXX Macro" from the "Script" menu. X X 5. Type "MRNBSTime" into the script name requester. X X 6. Watch your Amiga become a time standard! :-) X X XMark Rinfret END_OF_FILE if test 3912 -ne `wc -c <'ReadMe'`; then echo shar: \"'ReadMe'\" unpacked with wrong size! fi # end of 'ReadMe' fi if test -f 'makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'makefile'\" else echo shar: Extracting \"'makefile'\" \(156 characters\) sed "s/^X//" >'makefile' <<'END_OF_FILE' X# Default Aztec C makefile X# XCFLAGS = -pa -so -bs X#CFLAGS = -pa -bs X# XPROGRAM=MRNBSTime X X$(PROGRAM): $(PROGRAM).o X ln -g -o $(PROGRAM) $(PROGRAM).o -lc X END_OF_FILE if test 156 -ne `wc -c <'makefile'`; then echo shar: \"'makefile'\" unpacked with wrong size! fi # end of 'makefile' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Mail submissions (sources or binaries) to <amiga@cs.odu.edu>. Mail comments to the moderator at <amiga-request@cs.odu.edu>. Post requests for sources, and general discussion to comp.sys.amiga.