home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume28 / ticktalk / part01 next >
Text File  |  1992-02-13  |  36KB  |  1,324 lines

  1. Newsgroups: comp.sources.misc
  2. From: art@Cayman.COM (Art Mellor)
  3. Subject:  v28i035:  ticktalk - display time in English, French or Afrikaans, Part01/01
  4. Message-ID: <1992Feb10.221732.24128@sparky.imd.sterling.com>
  5. X-Md4-Signature: b9fa12213822603df88fdfdbfe22db12
  6. Date: Mon, 10 Feb 1992 22:17:32 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: art@Cayman.COM (Art Mellor)
  10. Posting-number: Volume 28, Issue 35
  11. Archive-name: ticktalk/part01
  12. Environment: UNIX, X11, tty
  13.  
  14. Ticktalk is a program to display the time in words in various languages.
  15. Currently the only languages supported are:
  16.     English
  17.     French        (thanks to Kaveh Kardan)
  18.     Afrikaans    (thanks to Linda Matthew)
  19.  
  20. I am making this program available in hopes of extending the capabilities
  21. to include as many languages as possible (see the README discussion as to 
  22. how to add languages if you are interested).
  23.  
  24. This will give you 3 programs:
  25.     1. ticktalk
  26.         This program displays the time to the terminal
  27.     2. xticktalk
  28.         This program puts up an X window and displays the time
  29.     3. testtalk
  30.         This program prints all possible times (this is for testing,
  31.         you can delete it if you're not adding languages)
  32.  
  33. Both xticktalk and ticktalk take a number of optional arguments:
  34.     -help        Print help strings
  35.     -version    Get version of program
  36.     -before        Print "Twenty To One" rather than "Twelve Forty"
  37.     -approximate    Round to nearest 5 minutes
  38.     -noampm        Don't indicate am or pm (when appropriate)
  39.     -english    Print time in English (default)
  40.     -french        Print time in French
  41.     -afrikaans    Print time in Afrikaans
  42.  
  43. The ticktalk version with no additional arguments prints the current
  44. time in words in the selected language to stdout, but if given 2 arguments 
  45. representing hour and minute (as numbers) it will print that time to
  46. stdout. E.g.
  47.     % ticktalk 1 0
  48.     One O'Clock am
  49.  
  50. The xticktalk version takes additional arguments:
  51.     -update secs    The number of seconds to wait between updates (def 30)
  52.     X Options    Standard X windows options (e.g. -fn, -display, etc.)
  53.  
  54. Problems, complaints and compliments to: art@cayman.com
  55. If you want to be added to a mailing list to receive updates as new languages
  56. are added, send me mail and I will add you.
  57.  
  58. Art Mellor
  59. -------------------------------------------------------------------------------
  60. #! /bin/sh
  61. # This is a shell archive.  Remove anything before this line, then feed it
  62. # into a shell via "sh file" or similar.  To overwrite existing files,
  63. # type "sh file -c".
  64. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  65. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  66. # Contents:  README Makefile bundle ticktalk.c xticktalk.xbm
  67. # Wrapped by kent@sparky on Mon Feb 10 16:07:13 1992
  68. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  69. echo If this archive is complete, you will see the following message:
  70. echo '          "shar: End of archive 1 (of 1)."'
  71. if test -f 'README' -a "${1}" != "-c" ; then 
  72.   echo shar: Will not clobber existing file \"'README'\"
  73. else
  74.   echo shar: Extracting \"'README'\" \(3905 characters\)
  75.   sed "s/^X//" >'README' <<'END_OF_FILE'
  76. XREADME for ticktalk:
  77. X
  78. XTicktalk is a program to display the time in words in various languages.
  79. XCurrently the only languages supported are:
  80. X    English
  81. X    French        (thanks to Kaveh Kardan)
  82. X    Afrikaans    (thanks to Linda Matthew)
  83. XBut I am making this program available in hopes of extending the capabilities
  84. Xto include as many languages as possible (see below how to add languages
  85. Xif you are interested).
  86. X
  87. XTo build:
  88. X    1. unshar the file (you've probably already done this):
  89. X        % sh file
  90. X    2. Take a quick look at the Makefile and change things as
  91. X       necessary.
  92. X    3. set things up for the build:
  93. X        % make clean
  94. X    4. build 'em:
  95. X        % make all
  96. X
  97. XThis will give you 3 programs:
  98. X    1. ticktalk
  99. X        This program displays the time to the terminal
  100. X    2. xticktalk
  101. X        This program puts up an X window and displays the time
  102. X    3. testtalk
  103. X        This program prints all possible times (this is for testing,
  104. X        you can delete it if you're not adding languages)
  105. XTo run:
  106. X    % ticktalk
  107. X    % xticktalk
  108. X      (this one looks best with large fonts, e.g. :
  109. X    -fn -bitstream-charter-medium-r-normal--33-240-100-100-p-183-iso8859-1)
  110. X
  111. XBoth programs take a number of optional arguments:
  112. X    -help        Print help strings
  113. X    -version    Get version of program
  114. X    -before        Print "Twenty To One" rather than "Twelve Forty"
  115. X    -approximate    Round to nearest 5 minutes
  116. X    -noampm        Don't indicate am or pm (when appropriate)
  117. X    -english    Print time in English (default)
  118. X    -french        Print time in French
  119. X    -afrikaans    Print time in Afrikaans
  120. X
  121. XThe ticktalk version with no additional arguments prints the current
  122. Xtime in words in the selected language to stdout, but if given 2 arguments 
  123. Xrepresenting hour and minute (as numbers) it will print that time to
  124. Xstdout. E.g.
  125. X    % ticktalk 1 0
  126. X    One O'Clock am
  127. X
  128. XThe xticktalk version takes additional arguments:
  129. X    -update secs    The number of seconds to wait between updates (def 30)
  130. X    X Options    Standard X windows options (e.g. -fn, -display, etc.)
  131. X
  132. X-------------------------------------------------------------------------------
  133. XProblems, complaints and compliments to: art@cayman.com
  134. XIf you want to be added to a mailing list to receive updates as new languages
  135. Xare added, send me mail and I will add you.
  136. X-------------------------------------------------------------------------------
  137. X
  138. XDo you know another language? Do you want to be famous and go down in history
  139. Xas having added that language to this program? Here's how to do it for language
  140. X'Newlanguage':
  141. X
  142. X
  143. X0. Now really, are you fluent? Please don't try to remember high school
  144. X    language class - I don't want to be flooded with flames from
  145. X    native speakers telling me the program is wrong :-)
  146. X1. Take a look at how 'Time2WordEnglish' and 'Number2WordEnglish' work.
  147. X2. Write the routine 'Time2WordNewlanguage' (you will probably need to
  148. X    also write 'Number2WordNewlanguage' to do this).
  149. X    Don't forget to do the right things for approximate and before flags.
  150. X3. Add a #define NEWLANGUAGE n to the file
  151. X4. Add the language to the list in 'Usage'
  152. X5. Add the flag -newlanguage to 'ProcessArgs'
  153. X6. Add case to 'Time2Word' for 'NEWLANGUAGE'
  154. X7. Use 'make testtalk' to test your code.
  155. X    % make testtalk
  156. X    % testtalk -newlanguage hour min
  157. X   will allow you to test individual times
  158. X    % testtalk -newlanguage
  159. X   will print all possible times to stdout. Redirect to a file or pipe
  160. X   to more to verify everything looks ok. Don't forget to test with
  161. X   the -before and -approximate flags!
  162. X8. Send me 'Time2WordNewlanguage' and 'Number2WordNewlanguage' and I will
  163. X   integrate your changes into the latest version and send out an update.
  164. X   Please also indicate your fluency: native,lived there,other
  165. X    My email address is art@cayman.com (617/494-1999)
  166. X
  167. X   PLEASE DON'T SEND DIFFS! I am not archiving old versions so what you
  168. X    diff against and what I have may not be the same.
  169. X
  170. XIf anyone knows how to easily add languages that use different character
  171. Xsets, please let me know (or better yet, add one and send me the code).
  172. END_OF_FILE
  173.   if test 3905 -ne `wc -c <'README'`; then
  174.     echo shar: \"'README'\" unpacked with wrong size!
  175.   fi
  176.   # end of 'README'
  177. fi
  178. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  179.   echo shar: Will not clobber existing file \"'Makefile'\"
  180. else
  181.   echo shar: Extracting \"'Makefile'\" \(3101 characters\)
  182.   sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  183. X#
  184. X# Important constants
  185. X#
  186. X
  187. X# If you don't have gcc, then comment out next 2 lines and uncomment the
  188. X# the 2 lines after them (and then go get gcc :-)
  189. X#CC = gcc
  190. X#CFLAGS = -g -O
  191. XCC = cc
  192. XCFLAGS = -O
  193. X
  194. XDEPENDFILE = depends
  195. XPRINTER = ch
  196. XMV = mv
  197. X
  198. X#
  199. X# Individual programs
  200. X#
  201. X
  202. XTICKTALK = ticktalk
  203. XTICKTALK_C = ticktalk.c
  204. XTICKTALK_H = 
  205. XTICKTALK_O = $(TICKTALK_C:.c=.o)
  206. X
  207. XXTICKTALK = xticktalk
  208. XXTICKTALK_C = ticktalk.c
  209. XXTICKTALK_H = 
  210. XXTICKTALK_O = xticktalk.o
  211. XXLIBS = -lXaw -lXmu -lXt -lXext -lX11
  212. X# Uncomment the following two lines if you are using OpenWindows
  213. X# XINCLUDEFLAGS = -I/usr/openwin/include
  214. X# XLIBRARYFLAGS = -L/usr/openwin/lib
  215. X
  216. XTESTTALK = testtalk
  217. XTESTTALK_C = ticktalk.c
  218. XTESTTALK_H = 
  219. XTESTTALK_O = testtalk.o
  220. X
  221. X#
  222. X# All the programs
  223. X#
  224. X
  225. XALL = $(TICKTALK) $(XTICKTALK) $(TESTTALK)
  226. XALL_C = $(TICKTALK_C) $(XTICKTALK_C) $(TESTTALK_C)
  227. XALL_H = $(TICKTALK_H) $(XTICKTALK_H) $(TESTTALK_H)
  228. XALL_O = $(TICKTALK_O) $(XTICKTALK_O) $(TESTTALK_O)
  229. X
  230. X#
  231. X# Help user with what this file contains
  232. X#
  233. X
  234. Xhelp: always
  235. X    @echo "make [target], where [target] is one of:"
  236. X    @echo "  help - print this message"
  237. X    @echo "  deps - make the dependicies file"
  238. X    @echo "  clean - rm object files and temporary files"
  239. X    @echo "  clobber - do a clean and then remove executables"
  240. X    @echo "  tags - make tags for all the source files"
  241. X    @echo ""
  242. X    @echo "  ticktalk.sh - make a bundle file to send to someone"
  243. X    @echo "  all - make all the following programs:"
  244. X    @echo "    ticktalk - a program to print the time in words"
  245. X    @echo "    xticktalk - a program to display the time in words"
  246. X    @echo "    testtalk - program to test ticktalk"
  247. X    @echo ""
  248. X    @echo " Printing source use (prints to $(PRINTER)):"
  249. X    @echo "  print-ticktalk - print the source to ticktalk"
  250. X    @echo "  print-xticktalk - print the source to xticktalk"
  251. X    @echo "  print-testtalk - print the source to testtalk"
  252. X
  253. X#
  254. X# Individual programs
  255. X#
  256. X
  257. X$(TICKTALK): $(TICKTALK_O)
  258. X    $(CC) -o $(TICKTALK) $(TICKTALK_O)
  259. X$(TICKTALK_O): $(TICKTALK_C)
  260. X    $(CC) $(CFLAGS) -c -DTEXT $(TICKTALK_C)
  261. Xprint-ticktalk: always
  262. X    lpscript -t4 -F Makefile $(TICKTALK_H) $(TICKTALK_C) | lpr -P$(PRINTER) 
  263. X
  264. X$(XTICKTALK): $(XTICKTALK_O)
  265. X    $(CC) -o $(XTICKTALK) $(XTICKTALK_O) $(XLIBRARYFLAGS) $(XLIBS)
  266. X$(XTICKTALK_O): $(TICKTALK_C)
  267. X    $(CC) $(CFLAGS) -c $(XINCLUDEFLAGS) $(TICKTALK_C)
  268. X    $(MV) $(TICKTALK_O) $(XTICKTALK_O)
  269. Xprint-xticktalk: always
  270. X    lpscript -t4 -F Makefile $(XTICKTALK_H) $(XTICKTALK_C) | lpr -P$(PRINTER) 
  271. X
  272. X$(TESTTALK): $(TESTTALK_O)
  273. X    $(CC) -o $(TESTTALK) $(TESTTALK_O)
  274. X$(TESTTALK_O): $(TICKTALK_C)
  275. X    $(CC) $(CFLAGS) -DTEST -c $(TICKTALK_C)
  276. X    $(MV) $(TICKTALK_O) $(TESTTALK_O)
  277. Xprint-testtalk: always
  278. X    lpscript -t4 -F Makefile $(TESTTALK_H) $(TESTTALK_C) | lpr -P$(PRINTER) 
  279. X
  280. Xticktalk.sh: $(TICKTALK_C) README bundle Makefile xticktalk.xbm
  281. X    bundle README Makefile $(TICKTALK_C) bundle xticktalk.xbm > ticktalk.sh
  282. X
  283. X#
  284. X# For every file
  285. X#
  286. X
  287. Xall: $(ALL)
  288. X
  289. Xdeps: always
  290. X    $(CC) $(CFLAGS) -M $(ALL_C) > $(DEPENDFILE)
  291. X
  292. Xclean: always
  293. X    rm -f $(ALL_O) $(DEPENDFILE) core *~ .*~
  294. X    touch $(DEPENDFILE)
  295. X    $(MAKE) deps
  296. X
  297. Xclobber: clean    
  298. X    rm -f $(ALL) ticktalk.sh
  299. X
  300. Xtags: always
  301. X    etags -t $(ALL_H) $(ALL_C)
  302. X
  303. Xalways:
  304. X
  305. Xinclude $(DEPENDFILE)
  306. END_OF_FILE
  307.   if test 3101 -ne `wc -c <'Makefile'`; then
  308.     echo shar: \"'Makefile'\" unpacked with wrong size!
  309.   fi
  310.   # end of 'Makefile'
  311. fi
  312. if test -f 'bundle' -a "${1}" != "-c" ; then 
  313.   echo shar: Will not clobber existing file \"'bundle'\"
  314. else
  315.   echo shar: Extracting \"'bundle'\" \(218 characters\)
  316.   sed "s/^X//" >'bundle' <<'END_OF_FILE'
  317. X#!/bin/sh
  318. X# bundle: group files into distribution package
  319. X
  320. Xecho '#!/bin/sh'
  321. Xecho '# To unbundle, sh this file. E.g. % sh file'
  322. Xfor i do
  323. X    echo "echo $i 1>&2"
  324. X    echo "cat >$i <<'End of $i'"
  325. X    cat $i
  326. X    echo "End of $i"
  327. Xdone
  328. END_OF_FILE
  329.   if test 218 -ne `wc -c <'bundle'`; then
  330.     echo shar: \"'bundle'\" unpacked with wrong size!
  331.   fi
  332.   # end of 'bundle'
  333. fi
  334. if test -f 'ticktalk.c' -a "${1}" != "-c" ; then 
  335.   echo shar: Will not clobber existing file \"'ticktalk.c'\"
  336. else
  337.   echo shar: Extracting \"'ticktalk.c'\" \(19104 characters\)
  338.   sed "s/^X//" >'ticktalk.c' <<'END_OF_FILE'
  339. X/*
  340. X  ticktalk
  341. X  
  342. X  A clock that displays time in various languages
  343. X  
  344. X  History -
  345. X  
  346. X  01/20/92: Art Mellor
  347. X  Released Version 1.0
  348. X  01/20/92: Kaveh Kardan
  349. X  Added before mode for french and fixed some typos
  350. X  01/07/91: Kaveh Kardan
  351. X  Added approximate mode to french and made some corrections.
  352. X  01/02/91: Alan Steele (neptune@fenchurch.mit.edu)
  353. X  Added code to imbed icon in application
  354. X  12/31/91: Art Mellor
  355. X  Added -noampm flag at request of Dave Baker (dvb@inmet.inmet.com)
  356. X  12/31/91: Linda Matthew (linder@watson.ibm.com), Art Mellor
  357. X  Added Afrikaans (Linda language, Art coding) v0.4
  358. X  12/27/91:    Art Mellor
  359. X  Added TEXT,TEST mode
  360. X  Added -update,-before,-approximate,-help flags
  361. X  12/26/91:    Art Mellor
  362. X  Changed French to runtime option
  363. X  11/29/91:    Kaveh Kardan (kaveh%taarna%icule@larry.mcrcim.mcgill.edu)
  364. X  Added French version as compile time option
  365. X  5/6/91:     Art Mellor (art@cayman.com)
  366. X  Initial version
  367. X*/
  368. X
  369. X/*
  370. X  There are 3 types of compiles:
  371. X
  372. X  For X windows - has no defines of TEST or TEXT
  373. X  For testing - has TEST and TEXT defined
  374. X  For text output - has TEXT defined
  375. X*/
  376. X
  377. X#ifdef TEST
  378. X#    define TEXT
  379. X#endif TEST
  380. X
  381. X#include <stdio.h>
  382. X#include <time.h>
  383. X#include <ctype.h>
  384. X
  385. X#ifndef TEXT
  386. X#    include <X11/Intrinsic.h>
  387. X#    include <X11/StringDefs.h>
  388. X#    include <X11/Shell.h>
  389. X#    include <X11/Xaw/Label.h>
  390. X#    include "xticktalk.xbm"
  391. X#else
  392. X#    define FALSE            0
  393. X#    define TRUE                (!FALSE)
  394. X#endif !TEXT
  395. X
  396. X#define MAX_TIMESTRING        256        /* size of strings */
  397. X#define MAXARGS                10        /* for X widgets */
  398. X
  399. X/* These are all the languages defined */
  400. X#define ENGLISH        0
  401. X#define FRENCH        1
  402. X#define AFRIKAANS    2
  403. X
  404. Xint timeOut = 30;                    /* how often to update X clock display */
  405. Xint language = -1;                    /* language chosen by user */
  406. Xint before = FALSE;                    /* use "before" syntax when min > 30 */
  407. Xint approximate = FALSE;            /* round to nearest 5 minutes */
  408. Xint noampm = FALSE;                    /* don't put am/pm on the end */
  409. X#ifdef TEXT
  410. Xint hour = -1, minute = -1;            /* optional args for TEXT/TEST modes */
  411. X#endif TEXT
  412. X
  413. Xchar *programName;                    /* store argv[0] here for error messages */
  414. X#define VERSION_MAJOR 1                /* version numbers */
  415. X#define VERSION_MINOR 0
  416. Xchar versionString[MAX_TIMESTRING];
  417. X
  418. X/*
  419. X  Call this routine to help unclued users
  420. X*/
  421. Xvoid Usage()
  422. X{
  423. X  static char *usageStrings[] = {
  424. X    " [-help] [-version] [-before] [-<language>] [-approximate] \\\n",
  425. X    "        [-noampm] ",
  426. X#ifdef TEXT
  427. X    "[hour(0-23) min(0-59)]\n",
  428. X#else
  429. X    "[-update secs] [X Options]\n",
  430. X#endif TEXT
  431. X    "  where <language> is one of the following:\n",
  432. X    "    english | french | afrikaans\n",
  433. X    (char *)0};
  434. X  char **uPtr = usageStrings;
  435. X  
  436. X  fprintf(stderr,"usage: %s ", programName);
  437. X  while(*uPtr){
  438. X    fprintf(stderr, "%s", *uPtr);
  439. X    uPtr++;
  440. X  }
  441. X}
  442. X
  443. X/*
  444. X  Call this routine to explain things in more detail
  445. X*/
  446. Xvoid PrintHelp()
  447. X{
  448. X  static char *helpStrings[] = {
  449. X    "Options:\n",
  450. X    "-help           Print this text\n",
  451. X    "-version        Print the current version and exit\n",
  452. X    "-before         Print time after the half hour as relative to next hour\n",
  453. X    "                  (not appropriate for some languages)\n",
  454. X    "-approximate    Round time off to nearest 5 minutes\n",
  455. X    "-<language>     The language to print the time in\n",
  456. X    "-noampm         Don't put am/pm on the time string (if present otherwise)\n",
  457. X#ifdef TEXT
  458. X    "hour min        Print the time corresponding to hour:min\n",
  459. X#ifdef TEST
  460. X    "With no arguments all time values are printed to stdout for verification\n",
  461. X#else
  462. X    "With no arguments prints the current time to stdout\n",
  463. X#endif TEST
  464. X#else
  465. X    "-update secs    How frequently to update the display\n",
  466. X    "X Options       Standard X windows options\n",
  467. X#endif TEXT
  468. X    (char *)0};
  469. X  char **hPtr = helpStrings;
  470. X  
  471. X  Usage();
  472. X  while(*hPtr){
  473. X    fprintf(stderr, "  %s", *hPtr);
  474. X    hPtr++;
  475. X  }
  476. X}
  477. X
  478. X/*
  479. X  Handle the args to the function
  480. X*/
  481. Xvoid ProcessArgs(argc, argv)
  482. Xint argc;
  483. Xchar *argv[];
  484. X{
  485. X  programName = argv[0];
  486. X  sprintf(versionString,"%s v%d.%d",programName,VERSION_MAJOR,VERSION_MINOR);
  487. X  
  488. X  argv++;
  489. X  while(--argc){
  490. X    if(**argv != '-'){
  491. X      break;
  492. X    }
  493. X    if(strcmp("-english", *argv) == 0){
  494. X      if(language != -1){
  495. X        Usage();
  496. X        exit(-1);
  497. X      }
  498. X      language = ENGLISH;
  499. X    }
  500. X    else if(strcmp("-french", *argv) == 0){
  501. X      if(language != -1){
  502. X        Usage();
  503. X        exit(-1);
  504. X      }
  505. X      language = FRENCH;
  506. X    }
  507. X    else if(strcmp("-afrikaans", *argv) == 0){
  508. X      if(language != -1){
  509. X        Usage();
  510. X        exit(-1);
  511. X      }
  512. X      language = AFRIKAANS;
  513. X    }
  514. X    else if(strcmp("-version", *argv) == 0){
  515. X      printf("%s (bugs/enhancements to art@cayman.com)\n", versionString);
  516. X      exit(0);
  517. X    }
  518. X    else if(strcmp("-before", *argv) == 0){
  519. X      before = TRUE;
  520. X    }
  521. X    else if(strcmp("-help", *argv) == 0){
  522. X      PrintHelp();
  523. X      exit(0);
  524. X    }
  525. X    else if(strcmp("-approximate", *argv) == 0){
  526. X      approximate = TRUE;
  527. X    }
  528. X    else if(strcmp("-noampm", *argv) == 0){
  529. X      noampm = TRUE;
  530. X    }
  531. X#ifndef TEXT
  532. X    else if(strcmp("-update", *argv) == 0){
  533. X      --argc; argv++;
  534. X      if(!argc || !IsNumber(*argv) || ((timeOut = atoi(*argv)) <= 0)){
  535. X        Usage();
  536. X        exit(-1);
  537. X      }
  538. X    }
  539. X#endif !TEXT
  540. X    else{
  541. X      Usage();
  542. X      exit(-1);
  543. X    }
  544. X    argv++;
  545. X  }
  546. X  
  547. X  /* Default to English */
  548. X  if(language == -1){
  549. X    language = ENGLISH;
  550. X  }
  551. X
  552. X  if(argc == 0){
  553. X    return;
  554. X  }
  555. X#ifdef TEXT
  556. X  else if(argc == 2){
  557. X    if(IsNumber(argv[0]) && IsNumber(argv[1])){
  558. X      hour = atoi(argv[0]);
  559. X      minute = atoi(argv[1]);
  560. X      if((hour < 24) && (minute < 60)){
  561. X        return;
  562. X      }
  563. X    }
  564. X  }
  565. X#endif TEXT
  566. X  
  567. X  Usage();
  568. X  exit(-1);
  569. X}
  570. X
  571. X#ifndef TEXT
  572. X/*
  573. X  Stuff timeString into the widget label
  574. X*/
  575. XSetLabelString(label, timeString)
  576. XWidget label;
  577. Xchar *timeString;
  578. X{
  579. X  Arg args[MAXARGS];
  580. X  int nargs;
  581. X  
  582. X  nargs = 0;
  583. X  XtSetArg(args[nargs],XtNlabel,timeString); nargs++;
  584. X  XtSetValues(label, args, nargs);
  585. X}
  586. X
  587. X/*
  588. X  Callback to set the time string every so often
  589. X*/
  590. XXtTimerCallbackProc CheckTime(label, ignored)
  591. XWidget label;
  592. XXtIntervalId *ignored;
  593. X{
  594. X  char timeString[MAX_TIMESTRING];
  595. X  
  596. X  GetTimeString(language, timeString);
  597. X  SetLabelString(label, timeString);
  598. X  XtAddTimeOut(timeOut * 1000, CheckTime, (caddr_t)label);
  599. X}
  600. X
  601. Xvoid CreateIcon(shell)
  602. XWidget shell;
  603. X{
  604. X  Pixmap icon_pixmap = (Pixmap) 0;
  605. X  Arg arg;
  606. X  
  607. X  /* User sets iconPixmap resource, converter does the right thing.. */
  608. X  XtSetArg(arg, XtNiconPixmap, &icon_pixmap);
  609. X  XtGetValues(shell, &arg, 1);
  610. X  if (icon_pixmap == (Pixmap) 0) {
  611. X    XtSetArg(arg, XtNiconPixmap,
  612. X             XCreateBitmapFromData(
  613. X              XtDisplay(shell), XtScreen(shell)->root,
  614. X              xticktalk_bits, xticktalk_width, xticktalk_height));
  615. X    XtSetValues(shell, &arg, 1);
  616. X  }
  617. X}
  618. X
  619. Xmain(argc, argv)
  620. Xint argc;
  621. Xchar *argv[];
  622. X{
  623. X  Widget shell, label;
  624. X  Arg args[MAXARGS];
  625. X  int nargs, i;
  626. X  
  627. X  /* Create shell and process X options */
  628. X  shell = XtInitialize(argv[0], versionString,
  629. X                       NULL, 0, &argc, argv);
  630. X  nargs = 0;
  631. X  XtSetArg(args[nargs],XtNallowShellResize,True); nargs++;
  632. X  XtSetValues(shell,args,nargs);
  633. X  
  634. X  /* Process remaining args */
  635. X  ProcessArgs(argc, argv);
  636. X  
  637. X  /* Create icon */
  638. X  CreateIcon(shell);
  639. X
  640. X  /* Make the label */
  641. X  nargs = 0;
  642. X  label = XtCreateManagedWidget("label", labelWidgetClass, shell,
  643. X                                args, nargs);
  644. X  
  645. X  /* Set the timer going */
  646. X  CheckTime((caddr_t)label, (XtIntervalId *)NULL);
  647. X  
  648. X  /* Put 'em up */
  649. X  XtRealizeWidget(shell);
  650. X  XtMainLoop();
  651. X}
  652. X#else
  653. X
  654. Xmain(argc, argv)
  655. Xint argc;
  656. Xchar *argv[];
  657. X{
  658. X  int h, m, len, longest = 0;
  659. X  char timeString[MAX_TIMESTRING], longTime[MAX_TIMESTRING];
  660. X  
  661. X  /* Process args */
  662. X  ProcessArgs(argc, argv);
  663. X  
  664. X  if(hour != -1){
  665. X    Time2Word(language, hour, minute, timeString);
  666. X    printf("%s\n", timeString);
  667. X    exit(0);
  668. X  }
  669. X#ifdef TEST
  670. X  for(h = 0, m = 0; !((h == 23) && (m == 59));){
  671. X    Time2Word(language, h, m, timeString);
  672. X    printf("%s\n", timeString);
  673. X    if((len = strlen(timeString)) > longest){
  674. X      strcpy(longTime, timeString);
  675. X      longest = len;
  676. X    }
  677. X    m = (m + 1)%60;
  678. X    if(m == 0){
  679. X      h++;
  680. X    }
  681. X  }
  682. X  printf("Longest: %s @ %d characters\n", longTime, longest);
  683. X#else
  684. X  GetTimeString(language, timeString);
  685. X  printf("%s\n", timeString);
  686. X#endif TEST
  687. X  exit(0);
  688. X}
  689. X
  690. X#endif !TEXT
  691. X
  692. X/*
  693. X  Increment the hour (based on 12 hour clock with am/pm flag)
  694. X  AM/PM changes at the 11/12 border
  695. X*/
  696. Xvoid TimeIncrement(hPtr, pmPtr)
  697. Xint *hPtr, *pmPtr;
  698. X{
  699. X  if(*hPtr == 11){
  700. X    *pmPtr = !*pmPtr;
  701. X  }
  702. X  *hPtr = *hPtr%12 + 1;
  703. X}
  704. X
  705. X/*
  706. X  Is this string all digits?
  707. X*/
  708. XIsNumber(str)
  709. Xchar *str;
  710. X{
  711. X  char *ptr = str;
  712. X  
  713. X  while(*ptr && isdigit(*ptr)) ptr++;
  714. X  return(*ptr == '\0');
  715. X}
  716. X
  717. X/*
  718. X  Stuff the current time in as a string in specified language
  719. X*/
  720. XGetTimeString(tongue, string)
  721. Xint tongue;
  722. Xchar *string;
  723. X{
  724. X  long t;
  725. X  struct tm *timeVal;
  726. X  
  727. X  t = time(0);
  728. X  timeVal = localtime(&t);
  729. X  Time2Word(tongue, timeVal->tm_hour, timeVal->tm_min, string);
  730. X}
  731. X
  732. X/*
  733. X  Convert the specified time into a string in the specified language
  734. X*/
  735. XTime2Word(tongue, hour, minutes, word)
  736. Xint tongue, hour, minutes;
  737. Xchar *word;
  738. X{
  739. X  switch(tongue){
  740. X  case ENGLISH:
  741. X    return Time2WordEnglish(hour, minutes, word);
  742. X  case FRENCH:
  743. X    return Time2WordFrench(hour, minutes, word);
  744. X  case AFRIKAANS:
  745. X    return Time2WordAfrikaans(hour, minutes, word);
  746. X  default:
  747. X    fprintf(stderr, "Unknown language: %d\n", tongue);
  748. X    Usage();
  749. X    exit(-1);
  750. X  }
  751. X}
  752. X
  753. X/*****************************************************************************
  754. X  English Time Routines
  755. X *****************************************************************************/
  756. X
  757. X/*
  758. X  Converts a number from 0 to 59 into an english string equivalent
  759. X*/
  760. XNumber2WordEnglish(number, word)
  761. Xint number;
  762. Xchar *word;
  763. X{
  764. X  static char *underTwenty[] = {
  765. X    "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven",
  766. X    "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen",
  767. X    "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"
  768. X      };
  769. X  static char *overNineteen[] = {
  770. X    "", "Teen", "Twenty", "Thirty", "Forty", "Fifty"
  771. X      };
  772. X  int guzzinto, remainder;
  773. X  
  774. X  *word = '\0';
  775. X
  776. X  if ((number < 0) || (number > 59)){
  777. X    return FALSE;
  778. X  }
  779. X  
  780. X  if (number < 20){
  781. X    strcat(word, underTwenty[number]);
  782. X    return TRUE;
  783. X  }
  784. X  
  785. X  guzzinto = number/10;
  786. X  remainder = number%10;
  787. X  
  788. X  strcat(word, overNineteen[guzzinto]);
  789. X  
  790. X  if(remainder != 0){
  791. X    strcat(word, "-");
  792. X    strcat(word, underTwenty[remainder]);
  793. X  }
  794. X  
  795. X  return TRUE;
  796. X}
  797. X
  798. X/*
  799. X  Turns 24 hour time (with minutes) into english representation
  800. X*/
  801. XTime2WordEnglish(hour, minutes, word)
  802. Xint hour, minutes;
  803. Xchar *word;
  804. X{
  805. X  int pm, rounded = 0;
  806. X  char hourWord[MAX_TIMESTRING], minuteWord[MAX_TIMESTRING];
  807. X  
  808. X  *word = '\0';
  809. X  
  810. X  pm = (hour > 11);
  811. X  
  812. X  if (pm) {
  813. X    hour -= 12;
  814. X  }
  815. X  if (hour == 0){
  816. X    hour = 12;
  817. X  }
  818. X  
  819. X  /* Round to nearest 5 minutes */
  820. X  if(approximate){
  821. X    if((rounded = minutes%5) >= 3){
  822. X      minutes += (5 - rounded);
  823. X      /* If round to next hour, handle correctly */
  824. X      if(minutes == 60){
  825. X        minutes = 0;
  826. X        TimeIncrement(&hour, &pm);
  827. X      }
  828. X    }
  829. X    else if(rounded > 0){
  830. X      minutes -= rounded;
  831. X    }
  832. X    
  833. X    strcat(word, rounded?"About ":"");
  834. X  }
  835. X  
  836. X  Number2WordEnglish(hour, hourWord);
  837. X  Number2WordEnglish(minutes, minuteWord);
  838. X  
  839. X  /*
  840. X    Try to do some cute things with the time
  841. X    */
  842. X  if(minutes == 0){
  843. X    if(hour == 12){
  844. X      strcat(word, pm?"Noon":"Midnight");
  845. X      return TRUE;
  846. X    }
  847. X    else{
  848. X      strcat(word, hourWord);
  849. X      strcat(word, " O'Clock");
  850. X    }
  851. X  }
  852. X  else if((minutes >= 1) && (minutes <= 9)){
  853. X    strcat(word, minuteWord);
  854. X    strcat(word, " Past ");
  855. X    strcat(word, hourWord);
  856. X  }
  857. X  else if(minutes == 15){
  858. X    strcat(word, "Quarter Past ");
  859. X    strcat(word, hourWord);
  860. X  }
  861. X  else if(minutes == 30){
  862. X    strcat(word, "Half Past ");
  863. X    strcat(word, hourWord);
  864. X  }
  865. X  else if(minutes == 45){
  866. X    strcat(word, "Quarter To ");
  867. X    TimeIncrement(&hour, &pm);
  868. X    Number2WordEnglish(hour, hourWord);
  869. X    strcat(word, hourWord);
  870. X  }
  871. X  else if((minutes > 30) && before){
  872. X    TimeIncrement(&hour, &pm);
  873. X    minutes = 60 - minutes;
  874. X    Number2WordEnglish(hour, hourWord);
  875. X    Number2WordEnglish(minutes, minuteWord);
  876. X    strcat(word, minuteWord);
  877. X    strcat(word, " To ");
  878. X    strcat(word, hourWord);
  879. X  }
  880. X  else{
  881. X    strcat(word, hourWord);
  882. X    strcat(word, " ");
  883. X    strcat(word, minuteWord);
  884. X  }
  885. X
  886. X  if(!noampm){
  887. X    strcat(word, pm?" pm":" am");
  888. X  }
  889. X  
  890. X  return TRUE;
  891. X}
  892. X
  893. X/*****************************************************************************
  894. X                      French Time Routines
  895. X*****************************************************************************/
  896. X
  897. XNumber2WordFrench(number, word)
  898. Xint number;
  899. Xchar *word;
  900. X{
  901. X  static char *underTwenty[] = {
  902. X    "Zero", "Un", "Deux", "Trois", "Quatre", "Cinq", "Six", "Sept",
  903. X    "Huit", "Neuf", "Dix", "Onze", "Douze", "Treize", "Quatorze",
  904. X    "Quinze", "Seize", "Dix-Sept", "Dix-Huit", "Dix-Neuf"
  905. X      };
  906. X  static char *overNineteen[] = {
  907. X    "", "", "Vingt", "Trente", "Quarante", "Cinquante"
  908. X      };
  909. X  int guzzinto, remainder;
  910. X  
  911. X  *word = '\0';
  912. X  
  913. X  if ((number < 0) || (number > 59)){
  914. X    return FALSE;
  915. X  }
  916. X  
  917. X  if (number < 20){
  918. X    strcat(word, underTwenty[number]);
  919. X    return TRUE;
  920. X  }
  921. X  
  922. X  guzzinto = number/10;
  923. X  remainder = number%10;
  924. X  
  925. X  strcpy(word, overNineteen[guzzinto]);
  926. X  
  927. X  if(remainder != 0){
  928. X    if (remainder == 1)
  929. X        {
  930. X          strcat(word, "-et-");
  931. X        }
  932. X    else
  933. X        {
  934. X          strcat(word, "-");
  935. X        }
  936. X    strcat(word, underTwenty[remainder]);
  937. X  }
  938. X  
  939. X  return TRUE;
  940. X}
  941. X
  942. X/*
  943. X  Turns 24 hour time (with minutes) into French representation
  944. X*/
  945. XTime2WordFrench(hour, minutes, word)
  946. Xint hour, minutes;
  947. Xchar *word;
  948. X{
  949. X  int pm, rounded = 0;
  950. X  char hourWord[MAX_TIMESTRING], minuteWord[MAX_TIMESTRING];
  951. X  
  952. X  /* leave hour in 24 hour format; it's the FRENCH way! */
  953. X  
  954. X  *word = '\0';
  955. X  
  956. X  if(approximate){
  957. X    if((rounded = minutes%5) >= 3){
  958. X      minutes += (5 - rounded);
  959. X      if(minutes == 60){
  960. X        minutes = 0;
  961. X        hour = (hour+1)%24;
  962. X      }
  963. X    }
  964. X    else if(rounded > 0){
  965. X      minutes -= rounded;
  966. X    }
  967. X    
  968. X    strcat(word, rounded?"Environ ":"");
  969. X  }
  970. X  
  971. X  if (hour == 0){
  972. X    strcpy(hourWord, "Minuit ");
  973. X  }
  974. X  else if (hour == 12){
  975. X    strcpy(hourWord, "Midi ");
  976. X  }
  977. X  else{
  978. X    Number2WordFrench(hour, hourWord);
  979. X  }
  980. X  if (!strcmp(hourWord, "Un")){
  981. X    strcpy(hourWord, "Une");
  982. X  }
  983. X  if (!strcmp(hourWord, "Vingt-et-Un")){
  984. X    strcpy(hourWord, "Vingt-et-Une");
  985. X  }
  986. X  Number2WordFrench(minutes, minuteWord);
  987. X  
  988. X  /*
  989. X    Try to do some cute things with the time
  990. X  */
  991. X  if(minutes == 0){
  992. X    if(hour == 12){
  993. X      strcat(word, "Midi");
  994. X    }
  995. X    else{
  996. X      strcat(word, hourWord);
  997. X      if (!strcmp(hourWord, "Une")){
  998. X        strcat(word, " Heure");
  999. X      }
  1000. X      else if (strcmp(hourWord, "Midi ") &&
  1001. X               strcmp(hourWord, "Minuit ")){
  1002. X        strcat(word, " Heures");
  1003. X      }
  1004. X    }
  1005. X  }
  1006. X  else if(minutes == 15){
  1007. X    strcat(word, hourWord);
  1008. X    if (!strcmp(hourWord, "Une")){
  1009. X      strcat(word, " Heure Et Quart");
  1010. X    }
  1011. X    else if (!strcmp(hourWord, "Midi ") || !strcmp(hourWord, "Minuit ")){
  1012. X      strcat(word, "Et Quart");
  1013. X    }
  1014. X    else{
  1015. X      strcat(word, " Heures Et Quart");
  1016. X    }
  1017. X  }
  1018. X  else if(minutes == 30){
  1019. X    strcat(word, hourWord);
  1020. X    if (!strcmp(hourWord, "Une")){
  1021. X      strcat(word, " Heure Et Demi");
  1022. X    }
  1023. X    else if (!strcmp(hourWord, "Midi ") || !strcmp(hourWord, "Minuit ")){
  1024. X      strcat(word, "Et Demi");
  1025. X    }
  1026. X    else{
  1027. X      strcat(word, " Heures Et Demi");
  1028. X    }
  1029. X  }
  1030. X  else if(minutes == 45){
  1031. X    hour++;
  1032. X    hour = hour%24;
  1033. X    if (hour == 0){
  1034. X      strcat(word, "Minuit Moins Le Quart");
  1035. X    }
  1036. X    else if (hour == 1){
  1037. X      strcat(word, "Une Heure Moins Le Quart");
  1038. X    }
  1039. X    else if (hour == 12){
  1040. X      strcat(word, "Midi Moins Le Quart");
  1041. X    }
  1042. X    else{
  1043. X      Number2WordFrench(hour, hourWord);
  1044. X      strcat(word, hourWord);
  1045. X      strcat(word, " Heures Moins Le Quart");
  1046. X    }
  1047. X  }
  1048. X  else if((minutes > 30) && before){
  1049. X        hour++;
  1050. X        hour = hour%24;
  1051. X    minutes = 60 - minutes;
  1052. X
  1053. X        if (hour == 0){
  1054. X            strcpy(hourWord, "Minuit ");
  1055. X        }
  1056. X        else if (hour == 12){
  1057. X            strcpy(hourWord, "Midi ");
  1058. X        }
  1059. X        else{
  1060. X            Number2WordFrench(hour, hourWord);
  1061. X        }
  1062. X        if (!strcmp(hourWord, "Un")){
  1063. X            strcpy(hourWord, "Une");
  1064. X        }
  1065. X        if (!strcmp(hourWord, "Vingt-et-Un")){
  1066. X            strcpy(hourWord, "Vingt-et-Une");
  1067. X        }
  1068. X        Number2WordFrench(minutes, minuteWord);
  1069. X
  1070. X    strcat(word, hourWord);
  1071. X
  1072. X        if (!strcmp(hourWord, "Une")){
  1073. X            strcat(word, " Heure");
  1074. X        }
  1075. X        else if (strcmp(hourWord, "Midi ") &&
  1076. X                 strcmp(hourWord, "Minuit ")){
  1077. X            strcat(word, " Heures");
  1078. X        }
  1079. X
  1080. X    if (strcmp(hourWord, "Midi ") &&
  1081. X            strcmp(hourWord, "Minuit "))
  1082. X            strcat(word, " Moins ");
  1083. X        else
  1084. X            strcat(word, "Moins ");
  1085. X
  1086. X    strcat(word, minuteWord);
  1087. X  }
  1088. X  else{
  1089. X    strcat(word, hourWord);
  1090. X    if (!strcmp(hourWord, "Une")){
  1091. X      strcat(word, " Heure ");
  1092. X    }
  1093. X    else if (strcmp(hourWord, "Midi ") &&
  1094. X             strcmp(hourWord, "Minuit ")){
  1095. X      strcat(word, " Heures ");
  1096. X    }
  1097. X    strcat(word, minuteWord);
  1098. X  }
  1099. X  
  1100. X  return TRUE;
  1101. X}
  1102. X
  1103. X/*****************************************************************************
  1104. X  Afrikaans Time Routines
  1105. X *****************************************************************************/
  1106. X
  1107. X/*
  1108. X  Converts a number from 0 to 59 into an afrikaans string equivalent
  1109. X*/
  1110. XNumber2WordAfrikaans(number, word)
  1111. Xint number;
  1112. Xchar *word;
  1113. X{
  1114. X  static char *underTwenty[] = {
  1115. X    "Nul", "Een", "Twee", "Drie", "Vier", "Vyf", "Ses", "Sewe",
  1116. X    "Agt", "Nege", "Tien", "Elf", "Twaalf", "Dertien", "Veertien",
  1117. X    "Vyftien", "Sestien", "Sewentien", "Agtien", "Neentien"
  1118. X      };
  1119. X  static char *overNineteen[] = {
  1120. X    "", "Tien", "Twintig", "Dertig", "Veertig", "Vyftig"
  1121. X      };
  1122. X  int guzzinto, remainder;
  1123. X  
  1124. X  *word = '\0';
  1125. X
  1126. X  if ((number < 0) || (number > 59)){
  1127. X    return FALSE;
  1128. X  }
  1129. X  
  1130. X  if (number < 20){
  1131. X    strcat(word, underTwenty[number]);
  1132. X    return TRUE;
  1133. X  }
  1134. X  
  1135. X  guzzinto = number/10;
  1136. X  remainder = number%10;
  1137. X  
  1138. X  if(remainder != 0){
  1139. X    strcat(word, underTwenty[remainder]);
  1140. X    strcat(word, "-en-");
  1141. X  }
  1142. X  strcat(word, overNineteen[guzzinto]);
  1143. X  
  1144. X  return TRUE;
  1145. X}
  1146. X
  1147. X/*
  1148. X  Turns 24 hour time (with minutes) into afrikaans representation
  1149. X*/
  1150. XTime2WordAfrikaans(hour, minutes, word)
  1151. Xint hour, minutes;
  1152. Xchar *word;
  1153. X{
  1154. X  int pm, rounded = 0;
  1155. X  char hourWord[MAX_TIMESTRING], minuteWord[MAX_TIMESTRING];
  1156. X  
  1157. X  *word = '\0';
  1158. X  
  1159. X  pm = (hour > 11);
  1160. X  
  1161. X  if (pm) {
  1162. X    hour -= 12;
  1163. X  }
  1164. X  if (hour == 0){
  1165. X    hour = 12;
  1166. X  }
  1167. X  
  1168. X  if(approximate){
  1169. X    if((rounded = minutes%5) >= 3){
  1170. X      minutes += (5 - rounded);
  1171. X      if(minutes == 60){
  1172. X        minutes = 0;
  1173. X        TimeIncrement(&hour, &pm);
  1174. X      }
  1175. X    }
  1176. X    else if(rounded > 0){
  1177. X      minutes -= rounded;
  1178. X    }
  1179. X    
  1180. X    strcat(word, rounded?"Ongeveer ":"");
  1181. X  }
  1182. X  
  1183. X  Number2WordAfrikaans(hour, hourWord);
  1184. X  Number2WordAfrikaans(minutes, minuteWord);
  1185. X  
  1186. X  /*
  1187. X    Try to do some cute things with the time
  1188. X  */
  1189. X  if(minutes == 0){
  1190. X    if(hour == 12){
  1191. X      strcat(word, pm?"Middag":"Middernag");
  1192. X      return TRUE;
  1193. X    }
  1194. X    else{
  1195. X      strcat(word, hourWord);
  1196. X      strcat(word, " Uur");
  1197. X    }
  1198. X  }
  1199. X  else if((minutes >= 1) && (minutes <= 9)){
  1200. X    strcat(word, minuteWord);
  1201. X    strcat(word, " Minute Oor ");
  1202. X    strcat(word, hourWord);
  1203. X  }
  1204. X  else if(minutes == 15){
  1205. X    strcat(word, "Kwart Oor ");
  1206. X    strcat(word, hourWord);
  1207. X  }
  1208. X  else if(minutes == 30){
  1209. X    strcat(word, "Half ");
  1210. X    TimeIncrement(&hour, &pm);
  1211. X    Number2WordAfrikaans(hour, hourWord);
  1212. X    strcat(word, hourWord);
  1213. X  }
  1214. X  else if(minutes == 45){
  1215. X    strcat(word, "Kwart Voor ");
  1216. X    TimeIncrement(&hour, &pm);
  1217. X    Number2WordAfrikaans(hour, hourWord);
  1218. X    strcat(word, hourWord);
  1219. X  }
  1220. X  else if((minutes > 30) && before){
  1221. X    TimeIncrement(&hour, &pm);
  1222. X    minutes = 60 - minutes;
  1223. X    Number2WordAfrikaans(hour, hourWord);
  1224. X    Number2WordAfrikaans(minutes, minuteWord);
  1225. X    strcat(word, minuteWord);
  1226. X    if(minutes%5){
  1227. X      strcat(word, " Minute");
  1228. X    }
  1229. X    strcat(word, " Voor ");
  1230. X    strcat(word, hourWord);
  1231. X  }
  1232. X  else{
  1233. X    strcat(word, hourWord);
  1234. X    strcat(word, " ");
  1235. X    strcat(word, minuteWord);
  1236. X  }
  1237. X  if(!noampm){
  1238. X    strcat(word, pm?" nm":" vm");
  1239. X  }
  1240. X  
  1241. X  return TRUE;
  1242. X}
  1243. X
  1244. END_OF_FILE
  1245.   if test 19104 -ne `wc -c <'ticktalk.c'`; then
  1246.     echo shar: \"'ticktalk.c'\" unpacked with wrong size!
  1247.   fi
  1248.   # end of 'ticktalk.c'
  1249. fi
  1250. if test -f 'xticktalk.xbm' -a "${1}" != "-c" ; then 
  1251.   echo shar: Will not clobber existing file \"'xticktalk.xbm'\"
  1252. else
  1253.   echo shar: Extracting \"'xticktalk.xbm'\" \(3290 characters\)
  1254.   sed "s/^X//" >'xticktalk.xbm' <<'END_OF_FILE'
  1255. X#define xticktalk_width 64
  1256. X#define xticktalk_height 64
  1257. Xstatic char xticktalk_bits[] = {
  1258. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1259. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1260. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
  1261. X   0x00, 0x00, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x03,
  1262. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
  1263. X   0x00, 0x20, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xff, 0x08,
  1264. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
  1265. X   0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xff, 0x23,
  1266. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0xf8, 0x03,
  1267. X   0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x90, 0xff, 0x23,
  1268. X   0x00, 0x00, 0xe0, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0xe0, 0x00,
  1269. X   0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x98, 0xff, 0x21,
  1270. X   0x00, 0x80, 0xff, 0x3f, 0x00, 0x1c, 0x00, 0x20, 0x00, 0xf0, 0x07, 0xfc,
  1271. X   0x01, 0x06, 0x00, 0x10, 0x00, 0xf8, 0x00, 0xe0, 0x03, 0x03, 0x00, 0x10,
  1272. X   0x00, 0x1e, 0x00, 0x00, 0x0f, 0x03, 0x00, 0x0c, 0x00, 0x0f, 0xc0, 0x00,
  1273. X   0x9e, 0x7f, 0xc0, 0x07, 0x80, 0x03, 0xc0, 0x00, 0x38, 0xc0, 0x7f, 0x00,
  1274. X   0xc0, 0x01, 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x00,
  1275. X   0xe0, 0x00, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x00, 0x00,
  1276. X   0x70, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x38, 0x00, 0xc0, 0x00,
  1277. X   0x80, 0x03, 0x00, 0x00, 0x18, 0x00, 0xc0, 0x00, 0x00, 0x03, 0x00, 0x00,
  1278. X   0x18, 0x00, 0xc0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1c, 0x00, 0xc0, 0x00,
  1279. X   0x00, 0x07, 0x00, 0x00, 0x0c, 0x00, 0xc0, 0x40, 0x00, 0x06, 0x00, 0x00,
  1280. X   0x0c, 0x00, 0xc0, 0x60, 0x00, 0x06, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x30,
  1281. X   0x00, 0x0e, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x18, 0x00, 0x0c, 0x00, 0x00,
  1282. X   0x06, 0x00, 0xc0, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x06,
  1283. X   0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, 0xc0, 0x03, 0x00, 0x0c, 0x00, 0x00,
  1284. X   0x06, 0x00, 0xc0, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
  1285. X   0x00, 0x0c, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
  1286. X   0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
  1287. X   0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
  1288. X   0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
  1289. X   0x00, 0x03, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
  1290. X   0x38, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
  1291. X   0xc0, 0x01, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
  1292. X   0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
  1293. X   0x70, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
  1294. X   0x00, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
  1295. X   0x0f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00,
  1296. X   0x00, 0xf0, 0x07, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x3f,
  1297. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00,
  1298. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1299. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1300. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  1301. END_OF_FILE
  1302.   if test 3290 -ne `wc -c <'xticktalk.xbm'`; then
  1303.     echo shar: \"'xticktalk.xbm'\" unpacked with wrong size!
  1304.   fi
  1305.   # end of 'xticktalk.xbm'
  1306. fi
  1307. echo shar: End of archive 1 \(of 1\).
  1308. cp /dev/null ark1isdone
  1309. MISSING=""
  1310. for I in 1 ; do
  1311.     if test ! -f ark${I}isdone ; then
  1312.     MISSING="${MISSING} ${I}"
  1313.     fi
  1314. done
  1315. if test "${MISSING}" = "" ; then
  1316.     echo You have the archive.
  1317.     rm -f ark[1-9]isdone
  1318. else
  1319.     echo You still must unpack the following archives:
  1320.     echo "        " ${MISSING}
  1321. fi
  1322. exit 0
  1323. exit 0 # Just in case...
  1324.