home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / altsrc / articles / 11426 < prev    next >
Text File  |  1994-11-01  |  64KB  |  1,309 lines

  1. Newsgroups: alt.sources
  2. Path: wupost!psuvax1!news.ecn.bgu.edu!willis.cis.uab.edu!ddsw1!panix!news.mathworks.com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!uunet!zib-berlin.de!math.fu-berlin.de!fub!bitrot!thomas
  3. From: thomas@bitrot.in-berlin.de (Thomas Driemeyer)
  4. Subject: Re: grok - X/Motif database manager and UI builder, part 08/12
  5. Message-ID: <1994Oct31.213600.11052@bitrot.in-berlin.de>
  6. Organization: /usr/lib/news/organi[sz]ation
  7. References: <1994Oct31.212946.10228@bitrot.in-berlin.de>
  8. Date: Mon, 31 Oct 1994 21:36:00 GMT
  9. Lines: 1298
  10.  
  11. Submitted-by: thomas@bitrot
  12. Archive-name: grok/part08
  13.  
  14. #!/bin/sh
  15. # this is grok.shar.08 (part 8 of grok)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file doc/formedit.tex continued
  18. #
  19. if test ! -r _shar_seq_.tmp; then
  20.     echo 'Please unpack part 1 first!'
  21.     exit 1
  22. fi
  23. (read Scheck
  24.  if test "$Scheck" != 8; then
  25.     echo Please unpack part "$Scheck" next!
  26.     exit 1
  27.  else
  28.     exit 0
  29.  fi
  30. ) < _shar_seq_.tmp || exit 1
  31. if test ! -f _shar_wnt_.tmp; then
  32.     echo 'x - still skipping doc/formedit.tex'
  33. else
  34. echo 'x - continuing file doc/formedit.tex'
  35. sed 's/^X//' << 'SHAR_EOF' >> 'doc/formedit.tex' &&
  36. particular card, and it remains accessible if no card is chosen. This
  37. makes it a good place to place form switch buttons that would otherwise
  38. become unavailable when no card is displayed.
  39. X
  40. There are several types of fields. Not all of them store data in the
  41. database; some are decorative or display computed information.
  42. X
  43. \itmindent=2cm
  44. \itm{\bf Input}
  45. This is the main type of field. It displays an editable (unless turned
  46. off) string in the database, along with a label.
  47. Input fields should not be put into the static part of the canvas.
  48. X
  49. \itm{\bf Time}
  50. A variation of the Input field. The database representation is a number
  51. of seconds. It is displayed as a date, as a time, as both date and time,
  52. and as a duration. The first three assume the database string to be a
  53. number of seconds since January 1, 1970; the last simply assumes a
  54. number of seconds up to 86399 (one day minus 1 second). When a string
  55. is entered into a Time field, it is converted to the numeric representation,
  56. reformatted, and reprinted. Time fields are useful because they can be
  57. used in expressions for calculation; expressions always see the numeric
  58. database string.
  59. Time fields should not be put into the static part of the canvas.
  60. X
  61. \itm{\bf Note}
  62. A note is a multi-line Input field. It should be used only for multiline
  63. text input because it cannot be tabbed over, and because pressing Return
  64. when entering data into the card into a Note actually inserts a newline,
  65. rather than skipping to the next field as an Input-type field would.
  66. Note fields should not be put into the static part of the canvas.
  67. X
  68. \itm{\bf Choice}
  69. Unlike all other types, many choice fields reference the same database
  70. string. They all must have the same summary column, the same database
  71. column, and the same internal field name (these three are buttons in the
  72. form editor). They differ only in the Choice/flag code. grok always makes
  73. sure that only one of the choice fields with identical internal field names
  74. can be active at any time; the database string then matches the Choice/flag
  75. code of that field. Most attributes of a {\tt Choice} item, when changed,
  76. are copied to all other {\tt Choice} items that have the same internal name.
  77. Choice fields should not be put into the static part of the canvas.
  78. X
  79. \itm{\bf Label}
  80. Labels are purely decorative. They print an arbitrary one-line string at
  81. a position in the card. There is no associated database string. Labels
  82. are rarely needed because most of the other types come with their own
  83. built-in label parts. The label is static, expressions cannot be used.
  84. X
  85. \itm{\bf Print}
  86. Print fields are like Input fields, but no text can be entered. Unlike
  87. labels, they can display an expression specified in the Input Default
  88. button of the form editor. This can be used to display a running average
  89. or sum in cards, or display other computed information. There is no
  90. associated database string. Print fields are useful in both the static
  91. and card parts of the canvas.
  92. X
  93. \itm{\bf Flag}
  94. Flags are boolean database strings: the string either matches the
  95. predefined string ({\it true}), or it is empty ({\it false}). (In fact,
  96. a string that doesn't match is also considered {\it false}, but this is
  97. not part of the normal operation.) The string that constitutes {\it true}
  98. is specified with the Choice/flag code button in the form editor.
  99. X
  100. \itm{\bf Button}
  101. Buttons have an associated action expression that is executed when the
  102. button is pressed. This action could start a shell script, for example.
  103. Buttons are not associated with any database string, but the expression
  104. can access one. For example, a database of demo programs can have a
  105. button that executes the program. The returned string is executed, there
  106. is no need to use the {\tt system} keyword unless nesting is desired. Note
  107. that the action expression is the only type of expression that may
  108. contain {\tt switch} statements; see the Expression Grammar chapter for
  109. details. It is often a good idea to put buttons in the static part of
  110. the canvas.
  111. X
  112. \itm{\bf Chart}
  113. Charts display data as bar or line charts. The X axis is divided into
  114. one slot per row in the database; the Y axis depends on the values
  115. computed from those rows (X and Y may be exchanged). Each chart contains
  116. one or more {\it components}. A component computes values that is plotted
  117. in the chart; a chart may display more than one value. For example, an
  118. expense account chart may display a stacked bar chart consisting of
  119. different color-coded types of costs, each described by a component.
  120. There are many variations for configuring charts and their components.
  121. Charts should be put into the static part of the canvas.
  122. X
  123. \itmindent=2em
  124. Each field has a number of parameters that depend on the type. The most
  125. important is the internal field name. It must be unique, except for choice
  126. fields which are grouped by assigning common internal field names. If
  127. the field references a database string, the internal field name also
  128. names the database string. The internal field name can be used in
  129. expressions to read the database string. For example, suppose you have a
  130. database of backup tapes, you may have an {\tt Input} field with an
  131. internal field name {\it capacity}, and another {\tt Input} field named
  132. {\it used}. You could then add a {\tt Print} field whose Input Default
  133. expression is {\tt (\_capacity~-~\_used)}. The {\tt Print} field then
  134. displays the remaining free space on each tape, even though the database
  135. only contains total capacity and used capacity. Another {\tt Print}
  136. label may have an expression {\tt (sum(\_used))}, which displays a running
  137. total of all tapes' contents. {\tt sum} is one of a group of functions
  138. that loop over all cards rather than just referencing the current card;
  139. see the Expression Grammar chapter for details. It is also possible to
  140. reference a database field for which there is no field description in
  141. an expression; in this case, the field is referenced by number. Fields
  142. in the database are numbered left to right, beginning with 0.
  143. X
  144. The next button in the form editor is the database column. It needs to
  145. be specified only for field types that display the column and allow
  146. entry into the column. These fields are ``windows'' into the database;
  147. there is normally one field for each database column. All fields that
  148. do not reference a database column are merely decoration, no change of
  149. the database is possible through such a decorative field (although the
  150. decorative field may read the database, as {\tt Print} fields do). This
  151. relation between fields and database columns also serves to give a
  152. symbolic name to database columns; these symbolic names can be used in
  153. expressions by prefixing them with an underscore. (It is also possible
  154. to use the column number in expressions, but that is less convenient).
  155. X
  156. The main window has three parts, a summary, the static area, and the
  157. card.  The summary contains one line per card, while the card contains
  158. the entire card's information as defined with the form editor and the
  159. card canvas. The static part is optional and programmed in the same way
  160. as the card. The Summary column and Width in summary buttons in the
  161. form editor determine which fields also appear in the summary; this is
  162. a subset of the fields that reference a database column (decoration
  163. fields can not be put into the summary).  The two buttons specify the
  164. order in database column and the width in characters. Two blanks are
  165. inserted between fields in the summary automatically. The summary has a
  166. title; it can not be specified directly but is taken from the Label
  167. text of the field.
  168. X
  169. Here is a brief summary of all buttons in the form editor that specify
  170. a field in the card:
  171. X
  172. \itmindent=5cm
  173. \medskip
  174. \itm{\bf Field type}
  175. The type of a field is entered here. See above for a list of available
  176. types and what they do.
  177. X
  178. \itm{\bf Searchable}
  179. The main window contains a Search input button. It searches through all
  180. cards and puts all cards containing the search string into the summary.
  181. Fields that are not searchable are excluded from the search.
  182. X
  183. \itm{\bf Read only}
  184. The user cannot change the database string referenced by a field that
  185. is read-only. This is useful if there are two forms referencing the
  186. same database, one for you and one for the unwashed masses with lots
  187. of read-only flags set. The read-only flag can also be set for the
  188. entire database with the button near the top of the form editor window;
  189. setting that flag overrides all field read-only flags.
  190. X
  191. \itm{\bf Not sortable}
  192. The field will be omitted from the Sort pulldown in the main menu.
  193. X
  194. \itm{\bf Default sort}
  195. When the file is read in from disk, it is sorted by the field that has
  196. this flag on. Setting it in any field will clear the Default sort flag
  197. in all other items automatically. If no field has the Default sort flag,
  198. the file will not be sorted when it is read. It is possible but not
  199. recommended to have both the Default sort flag and the Not sortable flag
  200. on in the same field.
  201. X
  202. \itm{\bf Internal field name}
  203. All fields have an unique name. Choice names are not unique, choice fields
  204. are grouped by a common name. If the field references a database string,
  205. the internal field name also names the database column, which can then
  206. be accessed in expressions symbolically.
  207. X
  208. \itm{\bf Database column}
  209. If the field references a database column, this button says which one,
  210. 0 being the first column. If not, this button is grayed out. The column
  211. number must be unique, except for choice fields which are grouped by
  212. a common database column (and a common internal field name, too).
  213. X
  214. \itm{\bf Width in summary}
  215. If the width is nonzero, the database string referenced by the field will
  216. appear in the summary, with as many characters as specified. Two blanks
  217. are appended. The summary always uses monospaced Courier to make columns
  218. line up vertically.
  219. X
  220. \itm{\bf Summary column}
  221. If the width is nonzero, this value specifies the order of fields in
  222. summary lines. No two fields may have the same summary column number,
  223. but there may be gaps.
  224. X
  225. \itm{\bf Choice/flag code}
  226. The string that Flag and Choice fields store in the database, if active.
  227. No two Choice fields with the same internal name may have the same code.
  228. X
  229. \itm{\bf Shown as}
  230. If this string is set, it will be displayed in the summary in place of the
  231. choice/flag code. Basically, it is a mnemonic name for the choice/flag
  232. code that a user can understand.
  233. X
  234. \itm{\bf Time format}
  235. Time fields have four different formats, as described above. The format
  236. controls what gets printed into the card, and how user input is interpreted.
  237. X
  238. \itm{\bf Label text}
  239. All field types come with some kind of text string that is printed into
  240. the field in the card. This string is always literal, it cannot be an
  241. expression.
  242. X
  243. \itm{\bf Label justification}
  244. Labels can be centered, left-aligned, or right-aligned. This is not
  245. shown in the card canvas, press the Preview button to see the effect.
  246. X
  247. \itm{\bf Label font}
  248. The font used for the label. Five fonts are available.
  249. X
  250. \itm{\bf Max input length}
  251. The maximum number of characters than can be entered into an Input, Time,
  252. or Note field. The default is 100 for Input and Time fields, and 10000
  253. for Note fields. Always make sure that note fields have a sufficient
  254. maximum length. This number is passed to the Motif widget to limit
  255. input length, but does not lead to increased memory usage for the
  256. database.
  257. X
  258. \itm{\bf Input default}
  259. For Input, Time, Flag, and Choice fields, this field provides the defaults
  260. when a new card is added to the database. It can be an expression. For
  261. Print fields, the Input default specifies what gets printed into the inset
  262. area of the field; input default is actually a misnomer because Print
  263. field texts cannot be input and are evaluated whenever the database changes,
  264. not just when a new card is added. In general, Choice fields should always
  265. have a default. If the field has type Time, the input default expression
  266. should evaluate to a number of seconds, not to a string containing
  267. a date. For example, to make the Time field default to today, use
  268. (date), not {date}.
  269. X
  270. \itm{\bf Input justification}
  271. Input can be centered, left-aligned, or right-aligned. This is not
  272. shown in the card canvas, press the Preview button to see the effect.
  273. X
  274. \itm{\bf Input font}
  275. The font used for the input area. Five fonts are available. It is recommended
  276. to use Courier for Note fields (and, by extension, for Input and Time
  277. fields) because printing functions print notes using a fixed-width font.
  278. X
  279. \itm{\bf Grayed out if}
  280. If the named expression evaluates to {\it true}, the field is grayed
  281. out and cannot be used to alter the database. The expression is evaluated
  282. every time the database changes.
  283. X
  284. \itm{\bf Invisible if}
  285. If the named expression evaluates to {\it true}, the field is excluded
  286. from the card. The expression is evaluated only once, when the database
  287. is read from disk. This can be used to hide entries if the wrong user
  288. has read the database. Invisibility does not affect the summary.
  289. X
  290. \itm{\bf Read-only if}
  291. If the named expression evaluates to {\it true}, the field is read-only.
  292. The expression is evaluated only once, when the database is read from
  293. disk.
  294. X
  295. \itm{\bf Skip if}
  296. Normally, pressing Return in an Input or Time field advances the cursor
  297. to the next field (fields are ordered by their bottom left corner, in
  298. Y-major order). If the named expression of the next field evaluates to
  299. {\it true}, the field is skipped and the cursor is put elsewhere. This
  300. expression is evaluated every time return is pressed in the previous field.
  301. A constant expression such as {\tt true} is also useful.
  302. X
  303. \itm{\bf Action when pressed}
  304. If the button is pressed, this expression is evaluated. The result is
  305. ignored. Typically, the expression is the name of a shell script. The
  306. expression may use the {\tt switch} statement, which switches to another
  307. database and/or performs a query on all cards.
  308. X
  309. %%% \itm{\bf Action when added}
  310. %%% This button is not used yet.
  311. %%% \itmindent=2em
  312. %%% \medskip
  313. X
  314. \itm{\bf Chart flags}
  315. Not documented yet. This part of the menu is still under development.
  316. %<<<
  317. \itmindent=2em
  318. \medskip
  319. X
  320. Some of the above accept expressions. An expression begins with a
  321. parenthesis, a brace, or a dollar sign. Everything else is a literal
  322. string. Parentheses and braces are numeric and string expressions,
  323. respectively; a dollar sign followed by an environment variable is a
  324. shortcut for the same sequence enclosed in braces. The {\tt system}
  325. statement should be used sparingly, because some expressions (such
  326. as the grayed-out-if expression) are evaluated frequently. See the
  327. Expression Grammar section for details.
  328. X
  329. \subsection Buttons
  330. X
  331. There is a row of buttons in the form editor for various operations:
  332. X
  333. \itmindent=2.5cm
  334. \itm{\bf Queries}
  335. Starts up a window that allows entry of standard queries, as name/expression
  336. pairs. The name is what will appear in the Query pulldown in the main menu;
  337. the expression is what gets executed if the name is selected in the pulldown.
  338. When a name is selected, the expression is applied to all cards in the
  339. database, and those that return {\it true} are put into the summary. For
  340. example, assuming your database has an Input field with the internal name
  341. {\tt value}, the query expression {\tt (\_value\ >\ avg(\_value))} will
  342. select all cards whose value is above average.One of the queries can
  343. be selected as the default query that will be performed when the database
  344. is read from disk.
  345. X
  346. \itm{\bf Def Help}
  347. The main window has a help button in the lower left corner. This button
  348. pops up a help window with some generic info about grok. With the Def
  349. Help button, more text can be entered that will be appended to the generic
  350. help text. The text should explain the card, how to use it, and what the
  351. fields mean.
  352. X
  353. \itm{\bf Debug}
  354. This button checks the consistency of all fields, and reports conflicts
  355. such as non-unique internal names or redundant choice flags. At this time,
  356. expressions are not checked. If the Debug button reportrs nothing, the
  357. no problems were found. The Done button always does a debugging run first,
  358. and refuses to exit if errors were found.
  359. X
  360. \itm{\bf Preview}
  361. The card canvas shows the layout of fields in the card, as boxes that
  362. show additional information such as type, database column, flag/choice
  363. code, and summary column. This does not reflect the final card that the
  364. user will see very well; in particular, whether a label string fits into
  365. the field on the card canvas does not mean that the same label will fit
  366. into the final card. Preview shows precisely what the card will look like.
  367. X
  368. \itm{\bf Help}
  369. Print general help information.
  370. X
  371. \itm{\bf Cancel}
  372. Discards all operations done with the form editor since it was installed,
  373. and removes the form editor window after asking for confirmation.
  374. X
  375. \itm{\bf Done}
  376. Check all fields for consistency. If no problems are found, the form file
  377. is written. The file name is taken from the Form name button at the top
  378. of the form, with {\tt $\sim$/.grok} prepended and {\tt .gf} appended if
  379. appropriate.
  380. X
  381. \itm{\bf Add}
  382. Adds a new field to the card. Its type, parameters, and position on the
  383. card canvas are chosen based on the currently selected card, so it's a
  384. good idea to select a field that is similar to the new one before pressing
  385. Add. If the card canvas has no free space below the bottom field, the new
  386. field may be placed under the bottom field where it can't be seen; it is
  387. generally a good idea to start with a card canvas that is too large and
  388. resize it to the correct size after all fields have been added and positioned.
  389. X
  390. \itm{\bf Delete}
  391. Delete the currently selected field. There is no Undo function to get it
  392. back.
  393. \itmindent=2em
  394. SHAR_EOF
  395. echo 'File doc/formedit.tex is complete' &&
  396. chmod 0644 doc/formedit.tex ||
  397. echo 'restore of doc/formedit.tex failed'
  398. Wc_c="`wc -c < 'doc/formedit.tex'`"
  399. test 22869 -eq "$Wc_c" ||
  400.     echo 'doc/formedit.tex: original size 22869, current size' "$Wc_c"
  401. rm -f _shar_wnt_.tmp
  402. fi
  403. # ============= doc/grammar.tex ==============
  404. if test -f 'doc/grammar.tex' -a X"$1" != X"-c"; then
  405.     echo 'x - skipping doc/grammar.tex (File already exists)'
  406.     rm -f _shar_wnt_.tmp
  407. else
  408. > _shar_wnt_.tmp
  409. echo 'x - extracting doc/grammar.tex (Text)'
  410. sed 's/^X//' << 'SHAR_EOF' > 'doc/grammar.tex' &&
  411. %
  412. % grammar
  413. %
  414. \def\S{{\it s\ }}
  415. \def\N{{\it n\ }}
  416. \section Expression Grammar
  417. X
  418. Expressions are used for queries, for defaults of card items, and for
  419. printing expressions into cards. They are set in Database Edit mode; a
  420. normal user does not deal with expressions directly.
  421. X
  422. Expressions deal with two data types, {\it strings}\/ and {\it numbers}.
  423. Expressions or sub-expressions returning strings are enclosed in braces;
  424. expressions or sub-expressions returning numbers are enclosed in parentheses.
  425. There are many built-in operators and functions; most of them can be used
  426. only in either string or numeric context.
  427. X
  428. Numbers begin with a numerical digit or a period, and are in standard
  429. integer, floating-point, or exponential notation. String literals are
  430. enclosed in double quotes. Conversions from numbers to strings use the
  431. {\tt \%g} format (unless {\tt printf} is used); conversions from strings
  432. to numbers skips leading blanks and converts like {\tt atof}. Trailing
  433. non-numeric characters are ignored.
  434. X
  435. Expressions are interpreted, not compiled. This means that all parts of
  436. the expression are evaluated, {\tt ?:}, {\tt \&\&}, and {\tt $||$} do not
  437. short-circuit.
  438. X
  439. In the following tables, \N stands for a number ot a numerical expression,
  440. and \S stands for a literal string or a string expression. Note that some
  441. operators, such as {\tt ==} and {\tt date}, appear in both contexts.
  442. X
  443. \subsection Numerical Operations
  444. X
  445. Divisions by zero return $1$. Arithmetic operators
  446. use standard C precedences. Bitwise operations operate on 32 bits only.
  447. X
  448. \cleartabs
  449. \settabs \+ mmmmmmmmmmm & mmmm & mmmmmmmmmmmmmmmmmmmmmmmmm\cr
  450. \medskip
  451. \+   {\it Operator} & {\it Type} & {\it Operation}\cr
  452. \smallskip\hrule\smallskip
  453. \+   {\tt (} \N {\tt )} & \N & Number\cr
  454. \+   {\tt $\{$} \S {\tt $\}$} & \N & In number context, convert string to a number\cr
  455. \+   \N {\tt ?} \N {\tt :} \N & \N & If the first number is nonzero, return the second number;\cr
  456. \+   && otherwise, return the third number\cr
  457. \+   \N {\tt ,} \N & \N & Evaluate both numbers, return second\cr
  458. \+   {\tt -} \N & \N & Unary minus\cr
  459. \+   {\tt !} \N & \N & Unary boolean NOT\cr
  460. \+   $\sim$ \N & \N & Unary bitwise NOT\cr
  461. \+   \N {\tt +} \N & \N & Add two numbers\cr
  462. \+   \N {\tt -} \N & \N & Subtract two numbers\cr
  463. \+   \N {\tt *} \N & \N & Multiply two numbers\cr
  464. \+   \N {\tt /} \N & \N & Divide two numbers\cr
  465. \+   \N {\tt \%} \N & \N & Calculate modulo of two numbers\cr
  466. \+   \N {\tt \&} \N & \N & Calculate bitwise AND of two numbers\cr
  467. \+   \N {\tt \&\&} \N & \N & Calculate boolean AND of two numbers\cr
  468. \+   \N {\tt |} \N & \N & Calculate bitwise OR of two numbers\cr
  469. \+   \N {\tt ||} \N & \N & Calculate boolean OR of two numbers\cr
  470. \+   \N \^ \N & \N & Calculate bitwise XOR of two numbers\cr
  471. \+   \N {\tt <<} \N & \N & Calculate bitwise left shift\cr
  472. \+   \N {\tt >>} \N & \N & Calculate bitwise right shift\cr
  473. \+   \N {\tt ==} \N & \N & 1 if both numbers are equal, 0 otherwise\cr
  474. \+   \N {\tt !=} \N & \N & 1 if both numbers are not equal, 0 otherwise\cr
  475. \+   \N {\tt <} \N & \N & 1 if the first number is less than the second, 0 otherwise\cr
  476. \+   \N {\tt >} \N & \N & 1 if the first number is greater than the second, 0 otherwise\cr
  477. \+   \N {\tt <=} \N & \N & 1 if the first number is less than or equal to the second, 0 otherwise\cr
  478. \+   \N {\tt >=} \N & \N & 1 if the first number is greater than or equal to the second, 0 otherwise\cr
  479. \+   {\tt sqrt (} \N {\tt )} & \N & Square root of a number\cr
  480. \+   {\tt exp (} \N {\tt )} & \N & Exponential function, $e^n$\cr
  481. \+   {\tt log (} \N {\tt )} & \N & Decimal logarithm, $\log_{10} n$\cr
  482. \+   {\tt ln (} \N {\tt )} & \N & Natural logarithm, $\log_e n$\cr
  483. \+   {\tt pow (} \N, \N {\tt )} & \N & First number raised to the second, $n^m$\cr
  484. \+   {\tt sin (} \N {\tt )} & \N & Sine of a number, $\sin x$\cr
  485. \+   {\tt cos (} \N {\tt )} & \N & Cosine of a number, $\cos x$\cr
  486. \+   {\tt tan (} \N {\tt )} & \N & Tangent of a number, $\tan x$\cr
  487. \+   {\tt asin (} \N {\tt )} & \N & Arc sine of a number, $\sin^{-1} x$\cr
  488. \+   {\tt acos (} \N {\tt )} & \N & Arc cosine of a number, $\cos^{-1} x$\cr
  489. \+   {\tt atan (} \N {\tt )} & \N & Arctangent of a number, $\tan^{-1} x$\cr
  490. \+   {\tt atan2 (} \N, \N {\tt )} & \N & Quadrant-aligned arctangent\cr
  491. \+   {\tt len (} \S {\tt )} & \N & Length of a string\cr
  492. \+   {\tt bound (} \N, \N, \N {\tt )} & \N & The first number bounded by a minimum (second number) and\cr
  493. \+   && a maximum (third number)\cr
  494. \bigskip
  495. X
  496. \subsection String Operations
  497. X
  498. Note that string comparisons return strings, and must be enclosed in braces
  499. $\{\}$ if \&\& or || or other numerical operators are used on the result.
  500. X
  501. \medskip
  502. \+   {\it Operator} & {\it Type} & {\it Operation}\cr
  503. \smallskip\hrule\smallskip
  504. \+   {\tt $\{$} \S {\tt $\}$} & \S & String\cr
  505. \+   {\tt (} \N {\tt )} & \S & In string context, convert number to a string\cr
  506. \+   \S {\tt ;} \S & \S & Evaluate both strings, return second\cr
  507. \+   \S {\tt .} \S & \S & Concatenate strings\cr
  508. \+   \S {\tt ?} \S {\tt :} \S & \S & If the numeric value of the first string is nonzero, return the second string;\cr
  509. \+   && otherwise, return the third string\cr
  510. \+   \S {\tt ==} \S & \S & Return {\tt "1"} if the two strings match; otherwise, return {\tt "0"}\cr
  511. \+   \S {\tt !=} \S & \S & Return {\tt "1"} if the two strings do not match; otherwise, return {\tt "0"}\cr
  512. \+   \S {\tt <} \S & \S & Return {\tt "1"} if the first string is lexicographically less than the second\cr
  513. \+   && string; otherwise, return {\tt "0"}\cr
  514. \+   \S {\tt >} \S & \S & Return {\tt "1"} if the first string is lexicographically greater than the second\cr
  515. \+   && string; otherwise, return {\tt "0"}\cr
  516. \+   \S {\tt <=} \S & \S & Return {\tt "1"} if the first string is lexicographically less than or equal to the\cr
  517. \+   && second string; otherwise, return {\tt "0"}\cr
  518. \+   \S {\tt >=} \S & \S & Return {\tt "1"} if the first string is lexicographically greater than or equal to\cr
  519. \+   && the second string; otherwise, return {\tt "0"}\cr
  520. \+   {\tt chop (} \S {\tt )} & \S & Return the string with the trailing newline, if any, removed\cr
  521. \+   {\tt substr (} \S, \N, \N {\tt )} & \S & Return a substring of the first string. The first number is the start index\cr
  522. \+   && and the second the length. A negative index counts from the end.\cr
  523. \+   {\tt printf (} {\it args} {\tt )} & \S & Format and return a string; {\it args} is a comma-separated list of expressions.\cr
  524. \+   && Compound expressions must be enclosed in (~) or $\lbrace~\rbrace$.\cr
  525. \bigskip
  526. X
  527. \subsection Variables
  528. X
  529. Variables are letters {\tt a} through {\tt z} that can hold strings or
  530. numbers. When a variable is assigned to, the result of the assignment is
  531. returned. All variables are reset to the empty string (or 0) when a database
  532. is loaded from disk.
  533. X
  534. \medskip
  535. \+   {\it Operator} & {\it Type} & {\it Operation}\cr
  536. \smallskip\hrule\smallskip
  537. \+   {\it var} & \S,\N & Value of a variable\cr
  538. \+   {\it var} {\tt =} \S & \S & Assign string value to a variable\cr
  539. \+   {\it var} {\tt =} \N & \N & Assign numeric value to a variable\cr
  540. \+   {\it var} {\tt .=} \S & \S & Append string to a variable\cr
  541. \+   {\it var} {\tt +=} \N & \N & Add a number to a variable\cr
  542. \+   {\it var} {\tt -=} \N & \N & Subtract a number from a variable\cr
  543. \+   {\it var} {\tt *=} \N & \N & Multiply a variable by a number\cr
  544. \+   {\it var} {\tt /=} \N & \N & Divide a variable by a number\cr
  545. \+   {\it var} {\tt \%=} \N & \N & Assign modulo with a number to variable\cr
  546. \+   {\it var} {\tt \&=} \N & \N & Perform logical AND with a variable\cr
  547. \+   {\it var} {\tt |=} \N & \N & Perform logical OR with a variable\cr
  548. \+   {\it var} {\tt ++} & \N & Post-increment variable\cr
  549. \+   {\it var} {\tt --} & \N & Post-decrement variable\cr
  550. \+   {\tt ++} {\it var} & \N & Pre-increment variable\cr
  551. \+   {\tt --} {\it var} & \N & Pre-decrement variable\cr
  552. \bigskip
  553. X
  554. \subsection Database Access
  555. X
  556. Database rows (cards) can be accessed by providing an
  557. index in brackets. Without brackets, the current card ({\tt this}) is
  558. assumed. Database columns are named. The name must always be prefixed
  559. with an underscore (\_). In place of the name, the field can be selected
  560. with a column number (which must also be prefixed with an underscore),
  561. beginning at 0. Only fields that store data in the database can be
  562. accessed (types {\it Input}, {\it Time}, {\it Flag}, and {\it Choice});
  563. this excludes fields of type {\it Label}\/ and {\it Print}.
  564. X
  565. The {\tt avg}, {\tt dev}, {\tt min}, {\tt max}, and {\tt sum} operators
  566. differ from all other operators: they don't reference a field in the
  567. current or any single card, they operate on a field in all cards by
  568. accessing an entire column of the database.
  569. X
  570. The {\tt switch} statement is legal only in {\it Action when pressed}
  571. expressions for Button-type fields in the form editor. It does nothing
  572. except as action for a button in a card. It switches grok to a new
  573. form as if the Database pulldown had been used (see the Editing Forms
  574. chapter for details about the difference between {\it databases} and
  575. {\it forms}. The first argument is the new form name, the second argument
  576. is the query expression or search string that determines which cards
  577. are displayed in the summary initially. The possible combinations are:
  578. X
  579. \itm{\tt search("", "")}\hfill\break
  580. Does nothing.
  581. X
  582. \itm{\tt search("", "*")}\hfill\break
  583. Keep the current form, and put all cards in the summary.
  584. X
  585. \itm{\tt search("", "$\{$expr$\}$")}\hfill\break
  586. Keep the current form, and put all cards in the summary for which
  587. {\it expr} returns something other than 0 or the empty string.
  588. X
  589. \itm{\tt search("", "(expr)")}\hfill\break
  590. Equivalent to the previous, except that the returned string is converted
  591. to a number, which is checked for nonzero values.
  592. X
  593. \itm{\tt search("", "string")}\hfill\break
  594. Keep the current form, and put all cards in the summary whose searchable
  595. fields contain {\it string}.
  596. X
  597. \itm{\tt search("name", "")}\hfill\break
  598. Switch to form {\it name}, and display all cards in the summary.
  599. X
  600. \itm{\tt search("name", "xxx")}\hfill\break
  601. Switch to form {\it name}, and then perform a query. {\tt xxx} stands
  602. for any of the above query expressions.
  603. X
  604. Because short-circuiting doesn't work, {\tt switch} can't depend on a
  605. conditional, but its two arguments can. {\tt switch} returns the empty
  606. string, which means that the button won't execute a command as usual;
  607. if this is overridden by appending a semicolon and another string
  608. expression, the command is executed after the database switch. To execute
  609. a script before switching, prepend a {\tt system} statement and a
  610. semicolon to the {\tt switch} statement (the switch is done after the
  611. expression is completely evaluated). To switch back to the previous
  612. form, use the {\tt prevform} statement.
  613. X
  614. \medskip
  615. \+   {\it Operator} & {\it Type} & {\it Operation}\cr
  616. \smallskip\hrule\smallskip
  617. \+   {\it \_field} & \S,\N & A field from the database, of current card\cr
  618. \+   {\it \_field} {\tt [} \N {\tt ]}& \S,\N & A field from the database, from any card\cr
  619. \+   {\tt this} & \N & The number of the current card, 0 is first\cr
  620. \+   {\tt last} & \N & The number of the last card, 0 is first\cr
  621. \+   {\tt avg (} {\it \_field} {\tt )} & \N & Average of a field in all cards\cr
  622. \+   {\tt dev (} {\it \_field} {\tt )} & \N & Standard deviation of a field in all cards\cr
  623. \+   {\tt min (} {\it \_field} {\tt )} & \N & Minimum value of a field in all cards\cr
  624. \+   {\tt max (} {\it \_field} {\tt )} & \N & Maximum value of a field in all cards\cr
  625. \+   {\tt sum (} {\it \_field} {\tt )} & \N & Sum of a field in all cards\cr
  626. \+   {\tt dbase} & \S & The name of the accessed database file\cr
  627. \+   {\tt form} & \S & The name of the accessed form file\cr
  628. \+   {\tt prevform} & \S & The name of the previous accessed form file\cr
  629. \+   {\tt switch (} \S, \S {\tt )} & \S & Database switch and/or query; see above\cr
  630. \bigskip
  631. X
  632. \subsection Operating System Access
  633. X
  634. \+   {\it Operator} & {\it Type} & {\it Operation}\cr
  635. \smallskip\hrule\smallskip
  636. \+   {\tt system (} \S {\tt )} & \S & Execute a shell command and return the result as a string\cr
  637. \+   {\tt \$} {\it envvar} & \S & Return the value of the environment variable {\it envvar}\cr
  638. \+   {\tt host} & \S & The host name of the local host\cr
  639. \+   {\tt user} & \S & The user's login name\cr
  640. \+   {\tt uid} & \N & The user's numeric user ID\cr
  641. \+   {\tt gid} & \N & The user's numeric group ID\cr
  642. \+   {\tt access (} \S, \N {\tt )} & \N & 1 if the file name exists (if the number is 0), or if it can be accessed\cr
  643. \+   && for execution (1), writing (2), and/or reading (4). See access(3).\cr
  644. \+   {\tt beep} & \S & Ring the terminal bell, return a null string\cr
  645. \+   {\tt error (} {\it args} {\tt )} & \S & Format a string like printf, print it in a window, return a null string\cr
  646. \bigskip
  647. X
  648. \subsection Time Conversion
  649. X
  650. Dates and times are stored as number of seconds since
  651. January 1, 1970. Durations are stored as number of seconds. Note that
  652. this means thata time is a significantly larger number than a duration,
  653. even if both have the same hh:mm string representation. The representation
  654. depends on the date and time format selected in the Preferences menu.
  655. X
  656. \medskip
  657. \+   {\it Operator} & {\it Type} & {\it Operation}\cr
  658. \smallskip\hrule\smallskip
  659. \+   {\tt time} & \S & The current time as hh:mm or hh:mm[ap] string\cr
  660. \+   {\tt time (} \N {\tt )} & \S & Extract time part of the number, and format as hh:mm or hh:mm[ap] string\cr
  661. \+   {\tt date} & \S & Today's date as dd.mm.yy or mm/dd/yy string\cr
  662. \+   {\tt date (} \N {\tt )} & \S & Extract date part of the number, and format as dd.mm.yy or mm/dd/yy string\cr
  663. \+   {\tt duration (} \N {\tt )} & \S & Convert a number of seconds to a hh:mm string\cr
  664. \+   {\tt date} & \N & Current time in seconds since January 1, 1970\cr
  665. \+   {\tt year (} \N {\tt )} & \N & Extract the (four-digit) year from a time\cr
  666. \+   {\tt month (} \N {\tt )} & \N & Extract the month 1..12 from a time\cr
  667. \+   {\tt day (} \N {\tt )} & \N & Extract the day 1..31 from a time\cr
  668. \+   {\tt hour (} \N {\tt )} & \N & Extract the hour 0..23 from a time\cr
  669. \+   {\tt minute (} \N {\tt )} & \N & Extract the minute 0..59 from a time\cr
  670. \+   {\tt second (} \N {\tt )} & \N & Extract the second 0..59 from a time\cr
  671. \+   {\tt julian (} \N {\tt )} & \N & Extract the julian date 0..365 from a time\cr
  672. \+   {\tt leap (} \N {\tt )} & \N & 1 if the time is in a leap year, or 0 otherwise\cr
  673. \medskip
  674. SHAR_EOF
  675. chmod 0644 doc/grammar.tex ||
  676. echo 'restore of doc/grammar.tex failed'
  677. Wc_c="`wc -c < 'doc/grammar.tex'`"
  678. test 14408 -eq "$Wc_c" ||
  679.     echo 'doc/grammar.tex: original size 14408, current size' "$Wc_c"
  680. rm -f _shar_wnt_.tmp
  681. fi
  682. # ============= doc/macro.tex ==============
  683. if test -f 'doc/macro.tex' -a X"$1" != X"-c"; then
  684.     echo 'x - skipping doc/macro.tex (File already exists)'
  685.     rm -f _shar_wnt_.tmp
  686. else
  687. > _shar_wnt_.tmp
  688. echo 'x - extracting doc/macro.tex (Text)'
  689. sed 's/^X//' << 'SHAR_EOF' > 'doc/macro.tex' &&
  690. \font\sectionfont=cmbx10 scaled\magstep2
  691. \font\subsectionfont=cmbx10 scaled\magstep1
  692. \font\subsubsectionfont=cmbx10 scaled\magstephalf
  693. X
  694. \parskip=3mm
  695. \parindent=0mm
  696. X
  697. \def\tab#1{ \medskip \leftskip=1cm
  698. {\openup2pt\halign{
  699. ##\hfil & ##\hfil & ##\hfil\cr
  700. #1 }} \leftskip=0cm}
  701. X
  702. \def\itm#1{\hangindent\itmindent
  703. X    \setbox0=\hbox{#1\quad}%
  704. X    \ifdim\wd0<\itmindent \dimen0=\itmindent\advance\dimen0 -\wd0
  705. X    \else \dimen0=0pt\fi
  706. X    \unhbox0\hskip\dimen0}
  707. X
  708. \newdimen\itmindent \itmindent=2em
  709. X
  710. \def\section#1\par{%
  711. X    \vskip0pt plus .35\vsize\penalty-350%
  712. X    \vskip0pt plus-.35\vsize\vskip16pt plus5pt minus5pt\vskip\parskip
  713. X    \message{#1}%
  714. X    \noindent{\sectionfont\ignorespaces#1}\par\nobreak
  715. X    \write\mycontentsout{\medskip
  716. X       {\bf\ignorespaces#1\hfill\folio\noexpand\par}}%
  717. X    \vskip10pt plus4pt minus4pt\noindent}
  718. X
  719. \def\subsection#1\par{%
  720. X    \vskip0pt plus .25\vsize\penalty-250%
  721. X    \vskip0pt plus-.25\vsize\vskip9pt plus3pt minus3pt\vskip\parskip
  722. X    \noindent{\subsectionfont\ignorespaces#1}\par\nobreak
  723. X    \write\mycontentsout{%
  724. X       {\rm\qquad\ignorespaces#1\mycontentsleaders\folio\noexpand\par}}%
  725. X    \vskip6pt plus2pt minus2pt\noindent}
  726. X
  727. \def\subsubsection#1\par{%
  728. X    \vskip0pt plus .2\vsize\penalty-200%
  729. X    \vskip0pt plus-.2\vsize\vskip5pt plus2pt minus2pt\vskip\parskip
  730. X    \noindent{\subsubsectionfont\ignorespaces#1}\par\nobreak
  731. X    \write\mycontentsout{%
  732. X       {\rm\qquad\ignorespaces#1\mycontentsleaders\folio\noexpand\par}}%
  733. X    \vskip4pt plus1pt minus1pt\noindent}
  734. X
  735. \def\mycontentsleaders{{\rm\leaders\hbox to2em{\hss.\hss}\hfill}}
  736. X
  737. \newwrite\mycontentsout
  738. \openout\mycontentsout=\jobname.cont
  739. X
  740. \def\contents{%
  741. X    \vfill\break
  742. X    \mycontentspageno=\pageno
  743. X    \pageno=\contentspageno
  744. X    \message{Contents}
  745. X    \noindent{\sectionfont Contents}\par\nobreak
  746. X    \vskip10pt plus4pt minus4pt\noindent
  747. X    \immediate\closeout\mycontentsout
  748. X    \openin\mycontentsin=\jobname.cont
  749. X    \begingroup
  750. X      \parindent=0pt\parskip=3pt
  751. X      \catcode`@=11
  752. X      \def\myreadcontentsline{\ifeof\mycontentsin%
  753. X      \let\myreadcontentsline=\empty
  754. X      \else\read\mycontentsin to\mycontentsline\mycontentsline\fi
  755. X      \myreadcontentsline}%
  756. X      \myreadcontentsline
  757. X    \endgroup
  758. X    \closein\mycontentsin
  759. X    \openout\mycontentsout=jobname.cont
  760. X    \vfill\break
  761. X    \pageno=\mycontentspageno \advancepageno}
  762. X
  763. \newcount\contentspageno \contentspageno=-1
  764. \newcount\mycontentspageno
  765. \newread\mycontentsin
  766. SHAR_EOF
  767. chmod 0644 doc/macro.tex ||
  768. echo 'restore of doc/macro.tex failed'
  769. Wc_c="`wc -c < 'doc/macro.tex'`"
  770. test 2294 -eq "$Wc_c" ||
  771.     echo 'doc/macro.tex: original size 2294, current size' "$Wc_c"
  772. rm -f _shar_wnt_.tmp
  773. fi
  774. # ============= doc/main.tex ==============
  775. if test -f 'doc/main.tex' -a X"$1" != X"-c"; then
  776.     echo 'x - skipping doc/main.tex (File already exists)'
  777.     rm -f _shar_wnt_.tmp
  778. else
  779. > _shar_wnt_.tmp
  780. echo 'x - extracting doc/main.tex (Text)'
  781. sed 's/^X//' << 'SHAR_EOF' > 'doc/main.tex' &&
  782. %
  783. % grok documentation
  784. %
  785. \input macro.tex
  786. \input formedit.tex
  787. \input grammar.tex
  788. X
  789. \contents
  790. \bye
  791. SHAR_EOF
  792. chmod 0644 doc/main.tex ||
  793. echo 'restore of doc/main.tex failed'
  794. Wc_c="`wc -c < 'doc/main.tex'`"
  795. test 97 -eq "$Wc_c" ||
  796.     echo 'doc/main.tex: original size 97, current size' "$Wc_c"
  797. rm -f _shar_wnt_.tmp
  798. fi
  799. # ============= grok.1 ==============
  800. if test -f 'grok.1' -a X"$1" != X"-c"; then
  801.     echo 'x - skipping grok.1 (File already exists)'
  802.     rm -f _shar_wnt_.tmp
  803. else
  804. > _shar_wnt_.tmp
  805. echo 'x - extracting grok.1 (Text)'
  806. sed 's/^X//' << 'SHAR_EOF' > 'grok.1' &&
  807. .TH GROK 1L
  808. .SH NAME
  809. grok \- Desktop Database Manager and GUI Builder
  810. .SH SYNOPSIS
  811. .B grok
  812. [-h] [-d] [-v] [-t] [-T] [-f] [\fIform\fR \fIquery\fR]]
  813. .SH DESCRIPTION
  814. .B grok
  815. is a database manager that displays two-dimensional databases using a
  816. card file paradigm. A GUI builder is available to create user-defined
  817. applications. Grok comes with a number of pre-built applications such
  818. as a phone directory, todo lists, and a sample country database. The
  819. form to display (\fIphone\fR, \fItodo\fR, \fIcountries\fR, etc.) can
  820. be given as the first parameter. This manual page describes the command
  821. line options of
  822. .BR grok .
  823. For information on how to use
  824. .BR grok ,
  825. refer to the on-line help pages, and to the PostScript or TeX manual.
  826. .LP
  827. .SS OPTIONS
  828. .IP \-h
  829. List available options.
  830. .IP \-d
  831. Print fallback X resources and exit. The output can be appended directly
  832. to the ~/.Xdefaults file for modification of the geometry, color, and font
  833. defaults.
  834. .IP \-v
  835. Print the program version and patchlevel and exit.
  836. .IP \-t
  837. Requires specification of a form. Without a query string, prints all
  838. cards to stdout in the same format that is used for the summary window
  839. in interactive mode. If a query is also specified, print only cards that
  840. satisfy the query expression (see below). The form may have a default
  841. query built in.
  842. .IP \-T
  843. This option is equivalent to -t, but omits the header line.
  844. .IP \-f
  845. Don't fork on startup. This is useful for debugging.
  846. .IP form
  847. Specifies the database to display.
  848. .B Grok
  849. distinguishes forms and databases. Both always come in pairs. The form
  850. defines the representation of the cards and the database provides the raw
  851. data. If no form is specified, one can be chosen in interactive mode. The
  852. -t and -T options require a form argument.
  853. .IP query
  854. If the form has a built-in query, it is used to select which cards in the
  855. database to display initially. If there is no default query, all cards are
  856. displayed. The query argument can be used to override the default query.
  857. This option should always be quoted with single quotes to keep the shell
  858. from interpreting the query string.
  859. .LP
  860. There are different types of queries: '*' selects all cards, '/string'
  861. performs a case-insensitive string search, '{expr}' selects all cards for
  862. which the string expression returns a non-null, non-'f' string, and '(expr)'
  863. selects all cards for which the numerical expression returns nonzero. The
  864. leading '/' in string searches is optional. For a detailed description of
  865. query expressions, refer to the "Expression Grammar" item in the help
  866. pulldown, or to the PostScript user's manual.
  867. .LP
  868. In addition to these options,
  869. .B grok
  870. supports the usual X options such as -iconic. The -geometry option should
  871. not be used to preset a window size; grok determines and frequently adjusts
  872. its own size.
  873. .SH EXAMPLES
  874. .LP
  875. \fBgrok\fR
  876. .LP
  877. Start up grok with no form. The Database pulldown can be used to choose one.
  878. .LP
  879. \fBgrok phone\fR
  880. .LP
  881. Start up grok with the \fIphone\fR form. Perform that form's default query
  882. if it has one.
  883. .LP
  884. \fBgrok phone '/thomas'\fR
  885. .LP
  886. Start up grok with the \fIphone\fR form. Ignore the default query and
  887. select only cards that contain the word "thomas". Case is ignored.
  888. .LP
  889. \fBgrok -t phone '/thomas'\fR
  890. .LP
  891. Print all cards of the form \fIphone\fR to stdout that contain the string
  892. "thomas". Do not start the interactive user interface.
  893. .LP
  894. \fBgrok phone '{_group == "f" && _email}'\fR
  895. .LP
  896. Start up grok with the \fIphone\fR form. Ignore the default query and
  897. select only cards that describe friends that have an email address.
  898. .SH FILES
  899. .LP
  900. Below, GBIN and GLIB refer to the installation directories specified at
  901. the beginning of the Imakefile when the programs were compiled. They are
  902. /usr/local/bin and /usr/local/lib, respectively, by default.
  903. .IP *.gf 18
  904. Files ending with the extension .gf are assumed to contain
  905. .B grok
  906. forms.
  907. .IP *.db 18
  908. Unless the form specifies otherwise, the database that provides the raw
  909. data for a form has the same path and name as the form, but with the
  910. extension .db. Procedural databases have no extension.
  911. .IP . 18
  912. The current directory is searched first for form files.
  913. .IP ./grokdir 18
  914. The grokdir current directory is searched next for form files. This is
  915. done to allow
  916. .B grok
  917. to be started from the source distribution directory for evaluation.
  918. .IP ~/.grok 18
  919. By default, all forms and databases are stored here. By convention, all
  920. private forms and databases are stored here. This directory is searched
  921. after . and ./grokdir.
  922. .IP GLIB/grokdir 18
  923. This directory is searched last. It is supposed to contain forms visible
  924. to all users of a system. Only one user should have write permission.
  925. .IP ~/.grok/.grokrc 18
  926. Preferences and the current configuration of
  927. .B grok.
  928. .IP GBIN/grok
  929. The
  930. .B grok
  931. executable. This should be in the user's search path. Form files are set
  932. up so they can be "executed" by feeding themselves to
  933. .B grok,
  934. as long as
  935. .B grok
  936. is in the search path $PATH.
  937. .IP GLIB/grok.hlp
  938. All help texts used by the
  939. .B grok
  940. help system.
  941. .SS AUTHOR
  942. Thomas Driemeyer <thomas@bitrot.in-berlin.de>
  943. .LP
  944. Please send all complaints, comments, bug fixes, and porting experiences to
  945. me. Always include your
  946. .B grok
  947. version as reported by "grok -v" in your mail. New forms for inclusion in
  948. the distribution are welcome. Make sure that your email address is in the
  949. form's comment field, and that there is some help information attached to
  950. the form with the Def Help function.
  951. SHAR_EOF
  952. chmod 0644 grok.1 ||
  953. echo 'restore of grok.1 failed'
  954. Wc_c="`wc -c < 'grok.1'`"
  955. test 5427 -eq "$Wc_c" ||
  956.     echo 'grok.1: original size 5427, current size' "$Wc_c"
  957. rm -f _shar_wnt_.tmp
  958. fi
  959. # ============= grok.1cat ==============
  960. if test -f 'grok.1cat' -a X"$1" != X"-c"; then
  961.     echo 'x - skipping grok.1cat (File already exists)'
  962.     rm -f _shar_wnt_.tmp
  963. else
  964. > _shar_wnt_.tmp
  965. echo 'x - extracting grok.1cat (Text)'
  966. sed 's/^X//' << 'SHAR_EOF' > 'grok.1cat' &&
  967. X
  968. X
  969. X
  970. X     GGGGRRRROOOOKKKK((((1111LLLL))))                  UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                  GGGGRRRROOOOKKKK((((1111LLLL))))
  971. X
  972. X
  973. X
  974. X     NNNNAAAAMMMMEEEE
  975. X          grok - Desktop Database Manager and GUI Builder
  976. X
  977. X     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  978. X          ggggrrrrooookkkk [-h] [-d] [-v] [-t] [-T] [-f] [_f_o_r_m _q_u_e_r_y]]
  979. X
  980. X     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  981. X          ggggrrrrooookkkk is a database manager that displays two-dimensional
  982. X          databases using a card file paradigm. A GUI builder is
  983. X          available to create user-defined applications. Grok comes
  984. X          with a number of pre-built applications such as a phone
  985. X          directory, todo lists, and a sample country database. The
  986. X          form to display (_p_h_o_n_e, _t_o_d_o, _c_o_u_n_t_r_i_e_s, etc.) can be given
  987. X          as the first parameter. This manual page describes the
  988. X          command line options of ggggrrrrooookkkk.  For information on how to use
  989. X          ggggrrrrooookkkk, refer to the on-line help pages, and to the PostScript
  990. X          or TeX manual.
  991. X
  992. X        OOOOPPPPTTTTIIIIOOOONNNNSSSS
  993. X          -h   List available options.
  994. X
  995. X          -d   Print fallback X resources and exit. The output can be
  996. X               appended directly to the ~/.Xdefaults file for
  997. X               modification of the geometry, color, and font defaults.
  998. X
  999. X          -v   Print the program version and patchlevel and exit.
  1000. X
  1001. X          -t   Requires specification of a form. Without a query
  1002. X               string, prints all cards to stdout in the same format
  1003. X               that is used for the summary window in interactive
  1004. X               mode. If a query is also specified, print only cards
  1005. X               that satisfy the query expression (see below). The form
  1006. X               may have a default query built in.
  1007. X
  1008. X          -T   This option is equivalent to -t, but omits the header
  1009. X               line.
  1010. X
  1011. X          -f   Don't fork on startup. This is useful for debugging.
  1012. X
  1013. X          form Specifies the database to display.  GGGGrrrrooookkkk distinguishes
  1014. X               forms and databases. Both always come in pairs. The
  1015. X               form defines the representation of the cards and the
  1016. X               database provides the raw data. If no form is
  1017. X               specified, one can be chosen in interactive mode. The
  1018. X               -t and -T options require a form argument.
  1019. X
  1020. X          query
  1021. X               If the form has a built-in query, it is used to select
  1022. X               which cards in the database to display initially. If
  1023. X               there is no default query, all cards are displayed. The
  1024. X               query argument can be used to override the default
  1025. X               query.  This option should always be quoted with single
  1026. X
  1027. X
  1028. X
  1029. X     Page 1                                         (printed 10/24/94)
  1030. X
  1031. X
  1032. X
  1033. X
  1034. X
  1035. X
  1036. X     GGGGRRRROOOOKKKK((((1111LLLL))))                  UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                  GGGGRRRROOOOKKKK((((1111LLLL))))
  1037. X
  1038. X
  1039. X
  1040. X               quotes to keep the shell from interpreting the query
  1041. X               string.
  1042. X
  1043. X          There are different types of queries: '*' selects all cards,
  1044. X          '/string' performs a case-insensitive string search,
  1045. X          '{expr}' selects all cards for which the string expression
  1046. X          returns a non-null, non-'f' string, and '(expr)' selects all
  1047. X          cards for which the numerical expression returns nonzero.
  1048. X          The leading '/' in string searches is optional. For a
  1049. X          detailed description of query expressions, refer to the
  1050. X          "Expression Grammar" item in the help pulldown, or to the
  1051. X          PostScript user's manual.
  1052. X
  1053. X          In addition to these options, ggggrrrrooookkkk supports the usual X
  1054. X          options such as -iconic. The -geometry option should not be
  1055. X          used to preset a window size; grok determines and frequently
  1056. X          adjusts its own size.
  1057. X
  1058. X     EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  1059. X          ggggrrrrooookkkk
  1060. X
  1061. X          Start up grok with no form. The Database pulldown can be
  1062. X          used to choose one.
  1063. X
  1064. X          ggggrrrrooookkkk pppphhhhoooonnnneeee
  1065. X
  1066. X          Start up grok with the _p_h_o_n_e form. Perform that form's
  1067. X          default query if it has one.
  1068. X
  1069. X          ggggrrrrooookkkk pppphhhhoooonnnneeee ''''////tttthhhhoooommmmaaaassss''''
  1070. X
  1071. X          Start up grok with the _p_h_o_n_e form. Ignore the default query
  1072. X          and select only cards that contain the word "thomas". Case
  1073. X          is ignored.
  1074. X
  1075. X          ggggrrrrooookkkk ----tttt pppphhhhoooonnnneeee ''''////tttthhhhoooommmmaaaassss''''
  1076. X
  1077. X          Print all cards of the form _p_h_o_n_e to stdout that contain the
  1078. X          string "thomas". Do not start the interactive user
  1079. X          interface.
  1080. X
  1081. X          ggggrrrrooookkkk pppphhhhoooonnnneeee ''''{{{{____ggggrrrroooouuuupppp ======== """"ffff"""" &&&&&&&& ____eeeemmmmaaaaiiiillll}}}}''''
  1082. X
  1083. X          Start up grok with the _p_h_o_n_e form. Ignore the default query
  1084. X          and select only cards that describe friends that have an
  1085. X          email address.
  1086. X
  1087. X     FFFFIIIILLLLEEEESSSS
  1088. X          Below, GBIN and GLIB refer to the installation directories
  1089. X          specified at the beginning of the Imakefile when the
  1090. X          programs were compiled. They are /usr/local/bin and
  1091. X          /usr/local/lib, respectively, by default.
  1092. X
  1093. X
  1094. X
  1095. X     Page 2                                         (printed 10/24/94)
  1096. X
  1097. X
  1098. X
  1099. X
  1100. X
  1101. X
  1102. X     GGGGRRRROOOOKKKK((((1111LLLL))))                  UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                  GGGGRRRROOOOKKKK((((1111LLLL))))
  1103. X
  1104. X
  1105. X
  1106. X          *.gf              Files ending with the extension .gf are
  1107. X                            assumed to contain ggggrrrrooookkkk forms.
  1108. X
  1109. X          *.db              Unless the form specifies otherwise, the
  1110. X                            database that provides the raw data for a
  1111. X                            form has the same path and name as the
  1112. X                            form, but with the extension .db.
  1113. X                            Procedural databases have no extension.
  1114. X
  1115. X          .                 The current directory is searched first
  1116. X                            for form files.
  1117. X
  1118. X          ./grokdir         The grokdir current directory is searched
  1119. X                            next for form files. This is done to allow
  1120. X                            ggggrrrrooookkkk to be started from the source
  1121. X                            distribution directory for evaluation.
  1122. X
  1123. X          ~/.grok           By default, all forms and databases are
  1124. X                            stored here. By convention, all private
  1125. X                            forms and databases are stored here. This
  1126. X                            directory is searched after . and
  1127. X                            ./grokdir.
  1128. X
  1129. X          GLIB/grokdir      This directory is searched last. It is
  1130. X                            supposed to contain forms visible to all
  1131. X                            users of a system. Only one user should
  1132. X                            have write permission.
  1133. X
  1134. X          ~/.grok/.grokrc   Preferences and the current configuration
  1135. X                            of ggggrrrrooookkkk....
  1136. X
  1137. X          GBIN/grok         The ggggrrrrooookkkk executable. This should be in the
  1138. X                            user's search path. Form files are set up
  1139. X                            so they can be "executed" by feeding
  1140. X                            themselves to ggggrrrrooookkkk,,,, as long as ggggrrrrooookkkk is in
  1141. X                            the search path $PATH.
  1142. X
  1143. X          GLIB/grok.hlp     All help texts used by the ggggrrrrooookkkk help
  1144. X                            system.
  1145. X
  1146. X        AAAAUUUUTTTTHHHHOOOORRRR
  1147. X          Thomas Driemeyer <thomas@bitrot.in-berlin.de>
  1148. X
  1149. X          Please send all complaints, comments, bug fixes, and porting
  1150. X          experiences to me. Always include your ggggrrrrooookkkk version as
  1151. X          reported by "grok -v" in your mail. New forms for inclusion
  1152. X          in the distribution are welcome. Make sure that your email
  1153. X          address is in the form's comment field, and that there is
  1154. X          some help information attached to the form with the Def Help
  1155. X          function.
  1156. X
  1157. X
  1158. X
  1159. X
  1160. X
  1161. X     Page 3                                         (printed 10/24/94)
  1162. X
  1163. X
  1164. X
  1165. SHAR_EOF
  1166. chmod 0644 grok.1cat ||
  1167. echo 'restore of grok.1cat failed'
  1168. Wc_c="`wc -c < 'grok.1cat'`"
  1169. test 9089 -eq "$Wc_c" ||
  1170.     echo 'grok.1cat: original size 9089, current size' "$Wc_c"
  1171. rm -f _shar_wnt_.tmp
  1172. fi
  1173. # ============= grokdir/countries.db ==============
  1174. if test ! -d 'grokdir'; then
  1175.     echo 'x - creating directory grokdir'
  1176.     mkdir 'grokdir'
  1177. fi
  1178. if test -f 'grokdir/countries.db' -a X"$1" != X"-c"; then
  1179.     echo 'x - skipping grokdir/countries.db (File already exists)'
  1180.     rm -f _shar_wnt_.tmp
  1181. else
  1182. > _shar_wnt_.tmp
  1183. echo 'x - extracting grokdir/countries.db (Text)'
  1184. sed 's/^X//' << 'SHAR_EOF' > 'grokdir/countries.db' &&
  1185. Afghanistan:647500:647500:16095664:2.4:Kabul:afghani, 1 afghani (Af) = 100 puls
  1186. Albania:28750:27400:3285224:1.1:Tirane:lek, 1 lek (L) = 100 qintars
  1187. Algeria:2381740:2381740:26666921:2.5:Algiers:Algerian dinar, 1 Algerian dinar (DA) = 100 centimes
  1188. American Samoa:199:199:51115:3.9:Pago Pago:US currency is used
  1189. Andorra:450:450:54428:2.2:Andorra la Vella:French franc and Spanish peseta
  1190. Angola:1246700:1246700:8902076:2.7:Luanda:kwanza, 1 kwanza (Kz) = 100 lwei
  1191. Anguilla:91:91:6963:0.6:The Valley:East Caribbean dollar, 1 EC dollar (EC$) = 100 cents
  1192. Antarctica:14000000:14000000:0:0.0
  1193. Antigua and Barbuda:440:440:64110:0.4:Saint John's:East Caribbean dollar, 1 EC dollar (EC$) = 100 cents
  1194. Argentina:2766890:2736690:32901234:1.1:Buenos Aires:peso, 1 pesos = 100 centavos
  1195. Armenia:29800:28400:3415566:0.8:Yerevan:retaining ruble as currency
  1196. Aruba:193:193:64692:0.7:Oranjestad:Aruban florin, 1 Aruban florin (Af.) = 100 cents
  1197. Australia:7686850:7617930:17576354:1.4:Canberra:Australian dollar, 1 Australian dollar ($A) = 100 cents
  1198. Austria:83850:82730:7867541:0.7:Vienna:Austrian schilling, 1 Austrian schilling (S) = 100
  1199. Azerbaijan:86600:86100:7450787:1.6:Baku (Baky):retaining ruble as currency
  1200. Bahrain:620:620:551513:3.1:Manama:Bahraini dinar, 1 Bahraini dinar (BD) = 1000 fils
  1201. Bangladesh:144000:133910:119411711:2.4:Dhaka:taka, 1 taka (Tk) = 100 paise
  1202. Barbados:430:430:254934:0.1:Bridgetown:Barbadian dollars, 1 Barbadian dollar (Bds$) = 100 cents
  1203. Belarus:207600:207600:10373881:0.5:Mensk:retaining ruble as currency
  1204. Belgium:30510:30230:10016623:0.3:Brussels:Belgian franc, 1 Belgian franc (BF) = 100 centimes
  1205. Belize:22960:22800:229143:3.0:Belmopan:Belizean dollar, 1 Belizean dollar (Bz$) = 100 cents
  1206. Benin:112620:110620:4997599:3.3:Porto-Novo:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1207. Bermuda:50:50:60213:0.8:Hamilton:Bermudian dollar, 1 Bermudian dollar (Bd$) = 100 cents
  1208. Bhutan:47000:47000:1660167:2.3:Thimphu:ngultrum, 1 ngultrum (Nu) = 100 chetrum
  1209. Bolivia:1098580:1084390:7323048:2.3:La Paz (seat of government):boliviano, 1 boliviano ($B) = 100 centavos
  1210. Bosnia and Herzegovina:51233:51233:4364000:0.5:Sarajevo
  1211. Botswana:600370:585, 370:1292210:2.6:Gaborone:pula, 1 pula (P) = 100 thebe
  1212. Brazil:8511965:8456510:158202019:1.8:Brasilia:cruzeiro, 1 cruzeiro (Cr$) = 100 centavos
  1213. British Virgin Islands:150:150:12555:1.2:Road Town:US currency is used
  1214. Brunei:5770:5270:269319:2.9:Bandar Seri Begawan:Bruneian dollar, 1 Bruneian dollar (B$) = 100 cents
  1215. Bulgaria:110910:110550:8869161:0.5:Sofia:lev, 1 lev (Lv) = 100 stotinki
  1216. Burkina:274200:273800:9653672:3.1:Ouagadougou:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1217. Burma:678500:657740:42642418:1.9:Rangoon (Yangon):kyat, 1 kyat (K) = 100 pyas
  1218. Burundi:27830:25650:6022341:3.2:Bujumbura:Burundi franc, 1 Burundi franc (FBu) = 100 centimes
  1219. Cambodia:181040:176520:7295706:2.1:Phnom Penh:riel, 1 riel (CR) = 100 sen
  1220. Cameroon:475440:469440:12658439:3.3:Yaounde:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1221. Canada:9976140:9220970:27351509:1.3:Ottawa:Canadian dollar, 1 Canadian dollar (Can$) = 100 cents
  1222. Cape Verde:4030:4030:398276:3.0:Praia:Cape Verdean escudo, 1 Cape Verdean escudo (CVEsc) = 100
  1223. Cayman Islands:260:260:29139:4.4:George Town:Caymanian dollar, 1 Caymanian dollar (CI$) = 100 cents
  1224. Central African Republic:622980:622980:3029080:2.6:Bangui:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1225. Chad:1284000:1259200:5238908:2.1:N'Djamena:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1226. Chile:756950:748800:13528945:1.6:Santiago:Chilean peso, 1 Chilean peso (Ch$) = 100 centavos
  1227. China:9596960:9326410:1169619601:1.6:Beijing:yuan, 1 yuan (Y) = 10 jiao
  1228. Christmas Island:135:135:929:0.0:The Settlement:Australian dollar, 1 Australian dollar ($A) = 100 cents
  1229. Cocos Islands:14:14:597:0.5:West Island:Australian dollar, 1 Australian dollar ($A) = 100 cents
  1230. Colombia:1138910:1038700:34296941:1.9:Bogota:Colombian peso, 1 Colombian peso (Col$) = 100 centavos
  1231. Comoros:2170:2170:493853:3.5:Moroni:Comoran franc, 1 Comoran franc (CF) = 100 centimes
  1232. Congo:342000:341500:2376687:2.9:Brazzaville:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1233. Cook Islands:240:240:17977:0.5:Avarua:New Zealand dollar, 1 New Zealand dollar (NZ$) = 100
  1234. Costa Rica:51100:50660:3187085:2.4:San Jose:Costa Rican colon, 1 Costa Rican colon (C) = 100 centimos
  1235. Croatia:56538:56410:4784000:0.39:Zagreb:Croatian dinar(s)
  1236. Cuba:110860:110860:10846821:1.0:Havana:Cuban peso, 1 Cuban peso (Cu$) = 100 centavos
  1237. Cyprus:9250:9240:716492:1.0:Nicosia:Cypriot pound  and in Turkish area, Turkish lira
  1238. Czechoslovakia:127870:125460:15725680:0.2:Prague:koruna, 1 koruna (Kc) = 100 haleru
  1239. Denmark:43070:42370:5163955:0.2:Copenhagen:Danish krone, 1 Danish krone (DKr) = 100 re
  1240. Djibouti:22000:21980:390906:2.7:Djibouti:Djiboutian franc, 1 Djiboutian franc (DF) = 100 centimes
  1241. Dominica:750:750:87035:1.6:Roseau:East Caribbean dollar, 1 EC dollar (EC$) = 100 cents
  1242. Dominican Republic:48730:48380:7515892:1.9:Santo Domingo:Dominican peso, 1 Dominican peso (RD$) = 100 centavos
  1243. Ecuador:283560:276840:10933143:2.2:Quito:sucre, 1 sucre (S/) = 100 centavos
  1244. Egypt:1001450:995450:56368950:2.3:Cairo:Egyptian pound, 1 Egyptian pound (#E) = 100 piasters
  1245. El Salvador:21040:20720:5574279:2.2:San Salvador:Salvadoran colon, 1 Salvadoran colon (C) = 100 centavos
  1246. Equatorial Guinea:28050:28050:388799:2.6:Malabo:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1247. Estonia:45100:43200:1607349:0.7:Tallinn:kroon
  1248. Ethiopia:1221900:1101000:54270464:3.2:Addis Ababa:birr, 1 birr (Br) = 100 cents
  1249. Falkland Islands (Islas Malvinas):12170:12170:1900:0.2:Stanley:Falkland pound, 1 Falkland pound (#F) = 100 pence
  1250. Faroe Islands:1400:1400:48588:0.9:Torshavn:Danish krone, 1 Danish krone (DKr) = 100 ore
  1251. Fiji:18270:18270:749946:0.9:Suva:Fijian dollar, 1 Fijian dollar (F$) = 100 cents
  1252. Finland:337030:305470:5004273:0.3:Helsinki:markka, 1 markka (FMk) or Finmark = 100 pennia
  1253. France:547030:545630:57287258:0.5:Paris:French franc, 1 French franc (F) = 100 centimes
  1254. French Guiana:91000:89150:127505:4.6:Cayenne:French franc, 1 French franc (F) = 100 centimes
  1255. French Polynesia:3941:3660:205620:2.3:Papeete:Comptoirs Francais du Pacifique franc, 1 CFP franc (CFPF)
  1256. Gabon:267670:257670:1106355:1.5:Libreville:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1257. Gaza Strip:380:380:681026:3.6::new Israeli shekel, 1 new Israeli shekel (NIS) = 100 new
  1258. Georgia:69700:69700:5570978:0.8:T'bilisi (Tbilisi):retaining ruble as currency
  1259. Germany (Deutschland):356910:349520:80387283:0.5:Berlin:deutsche mark, 1 deutsche mark (DM) = 100 pfennige
  1260. Ghana:238540:230020:16185351:3.1:Accra:cedi, 1 cedi (C) = 100 pesewas
  1261. Gibraltar:6.5:6.5:29651:0.1:Gibraltar:Gibraltar pound, 1 Gibraltar pound (#G) = 100 pence
  1262. Greece:131940:130800:10064250:0.2:Athens:drachma, 1 drachma (Dr) = 100 lepta
  1263. Greenland:2175600:341700:57407:1.1:Nuuk (Godthab):Danish krone, 1 Danish krone (DKr) = 100 re
  1264. Grenada:340:340:83556:-0.3:Saint George's:East Caribbean dollar, 1 EC dollar (EC$) = 100 cents
  1265. Guadeloupe:1780:1760:409132:2.1:Basse-Terre:French franc, 1 French franc (F) = 100 centimes
  1266. Guam:541.3:541.3:142271:2.6:Agana:US currency is used
  1267. Guatemala:108890:108430:9784275:2.4:Guatemala:quetzal, 1 quetzal (Q) = 100 centavos
  1268. Guernsey:194:194:57949:0.6:Saint Peter Port:Guernsey pound, 1 Guernsey (#G) pound = 100 pence
  1269. Guinea:245860:245860:7783926:-1.5:Conakry:Guinean franc, 1 Guinean franc (FG) = 100 centimes
  1270. Guinea-Bissau:36120:28000:1047137:2.4:Bissau:Guinea-Bissauan peso, 1 Guinea-Bissauan peso (PG) = 100
  1271. Guyana:214970:196850:739431:-0.6:Georgetown:Guyanese dollar, 1 Guyanese dollar (G$) = 100 cents
  1272. Haiti:27750:27560:6431977:2.3:Port-au-Prince:gourde, 1 gourde (G) = 100 centimes
  1273. Vatican City:0.438:0.438:802:1.2:Vatican City:Vatican lira, 1 Vatican lira (VLit) = 100 centesimi
  1274. Honduras:112090:111890:5092776:2.8:Tegucigalpa:lempira, 1 lempira (L) = 100 centavos
  1275. Hong Kong:1040:990:5889095:0.6:Victoria:Hong Kong dollar, 1 Hong Kong dollar (HK$) = 100 cents
  1276. Hungary:93030:92340:10333327:-0.1:Budapest:forint, 1 forint (Ft) = 100 filler
  1277. Iceland:103000:100250:259012:0.9:Reykjavik:krona, 1 Icelandic krona (IKr) = 100 aurar
  1278. India:3287590:2973190:886362180:1.9:New Delhi:Indian rupee, 1 Indian rupee (Re) = 100 paise
  1279. Indonesia:1919440:1826440:195683531:1.7:Jakarta:Indonesian rupiah, 1 Indonesian rupiah (Rp) = 100 sen
  1280. Iran:1648000:1636000:61183138:3.5:Tehran:Iranian rial, 1 Iranian rial (IR) = 100 dinars
  1281. Iraq:436245:435292:18445847:3.7:Baghdad:Iraqi dinar, 1 Iraqi dinar (ID) = 1000 fils
  1282. Ireland:70280:68890:3521207:0.2:Dublin:Irish pound, 1 Irish pound (#Ir) = 100 pence
  1283. Israel:20770:20330:4748059:4.0:Israel proclaimed Jerusalem its capital:new Israeli shekel, 1 new Israeli shekel (NIS) = 100 new
  1284. Italy:301230:294, 020:57904628:0.2:Rome:Italian lira, 1 Italian lira (Lit) = 100 centesimi
  1285. Ivory Coast:322460:318000:13497153:3.9:Yamoussoukro:Communaute Financiere Africaine franc, 1 CFA franc (CFAF)
  1286. Jamaica:10990:10830:2506701:0.9:Kingston:Jamaican dollar, 1 Jamaican dollar (J$) = 100 cents
  1287. Japan:377835:374744:124460481:0.4:Tokyo:yen, 1 yen (Y) = 100 sen
  1288. Jersey:117:117:85026:0.8:Saint Helier:Jersey pound, 1 Jersey pound (#J) = 100 pence
  1289. Jordan:91880:91540:3557304:4.1:Amman:Jordanian dinar, 1 Jordanian dinar (JD) = 1000 fils
  1290. Kazakhstan:2717300:2669800:17103927:1.0:Alma-Ata (Almaty):retaining ruble as currency
  1291. Kenya:582650:569250:26164473:3.6:Nairobi:Kenyan shilling, 1 Kenyan shilling (KSh) = 100 cents
  1292. Kiribati:717:717:74788:2.1:Tarawa:Australian dollar, 1 Australian dollar ($A) = 100 cents
  1293. Korea, North:120540:120410:22227303:1.9:P'yongyang:North Korean won, 1 North Korean won (Wn) = 100 chon
  1294. Korea, South:98480:98190:44149199:1.1:Seoul:South Korean won, 1 South Korean won (W) = 100 chon
  1295. Kuwait:17820:17820:1378613:0.0:Kuwait:Kuwaiti dinar, 1 Kuwaiti dinar (KD) = 1000 fils
  1296. Kyrgyzstan:198500:191300:4567875:1.9:Bishkek (formerly Frunze):retaining ruble as currency
  1297. SHAR_EOF
  1298. true || echo 'restore of grokdir/countries.db failed'
  1299. fi
  1300. echo 'End of grok part 8'
  1301. echo 'File grokdir/countries.db is continued in part 9'
  1302. echo 9 > _shar_seq_.tmp
  1303. exit 0
  1304. -- 
  1305.  
  1306. --
  1307. Thomas Driemeyer       thomas@bitrot.in-berlin.de       voice: +49 30 8924936
  1308.                    Schweidnitzer Str. 6, 10709 Berlin
  1309.