home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / acp / root.9 / usr / X / lib / wksh / olexamples / README / README
Encoding:
Text File  |  1998-08-19  |  3.4 KB  |  93 lines

  1. #    Copyright (c) 1991, 1992 UNIX System Laboratories, Inc.
  2. #    All Rights Reserved
  3.  
  4. #    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
  5. #    UNIX System Laboratories, Inc.
  6. #    The copyright notice above does not evidence any
  7. #    actual or intended publication of such source code.
  8.  
  9. #ident    "@(#)wksh:olexamples/README    1.3"
  10.  
  11.  
  12. This directory contains WKSH OPEN LOOK example scripts.  Here is a short
  13. explanation of the programs.  None of the programs is really robust
  14. enough to be a final product at this time, and some features of some
  15. programs are not implemented.  These are provided simply to show some
  16. typical WKSH programming techniques.  Also, some of these programs
  17. have hard-coded colors and fonts, which is not recommended for robust
  18. product quality programs (resource files should be used instead).
  19.  
  20. ammort
  21.         Calculates fixed-interest loan ammortization schedules.
  22. wcalc
  23.         A 4-function calculator with memory, square, square-root and
  24.         reciprocal.  Does the math by spawning calls to awk.
  25. wcalen
  26.         A simple calendar application.  Has "week at a glance", shows
  27.         current day's events by default, can view months.  Has the
  28.         ability to schedule recurring events ("Meeting every Tuesday").
  29.         Spawns calls to "cal" to figure out dates.  Stores
  30.         events in $HOME/calendar directory, one file per day.  Needs
  31.         some method to delete old entries after a certain amount of
  32.         time, and needs a search feature to be really usable.
  33. helloworld
  34.         The traditional UNIX System example program.
  35. lander
  36.         Play the game of "Luner Lander".  Land your luner module, and
  37.         if your velocity is less than 10 m/s you don't explode and die
  38.         a firey death.
  39. wkcmd, *.opts
  40.         The wkcmd script takes as one of its arguments one of the
  41.         *.opts files and provides a simple interface to a UNIX
  42.         command with options.  Other options files can be written
  43.         to provide other simple interfaces.  Basically, it parses
  44.         the options file to produce a property sheet, and when
  45.         requested will execute a UNIX command with the appropriate
  46.         options and show the results.  Because some UNIX System
  47.         commands are not well behaived in their use of options, this
  48.         does not always work out.  For example, on some systems
  49.         "wc -lc" works but "wc -l -c" does not.  Also, the options
  50.         files are for System V, ps(1) takes different options on
  51.         other systems, etc.
  52. procs
  53.         An example of creating an interface to a UNIX System command
  54.         (ps).
  55. sampler
  56.         Most widgets in haphazard fashion.
  57. timer
  58.         A simple stopwatch style program.
  59.  
  60. progguide*
  61.         The examples from the WKSH for OPEN LOOK Programmer's Guide, 
  62.         in the order that they are presented.  The number following
  63.         the string progguide indicates the Chapter 3 figure number.
  64.         So, progguide6 is Chapter 3 - Figure 6.
  65.  
  66. attach.c
  67.         This is a trivial example of a user-attachable command.
  68.         This will only work on systems with Dynamic Shared Objects,
  69.         like SunOs 4.1 or SVR4, but not SVR3 or earlier versions.
  70.  
  71.         On a SVR4 system, you can compile this into a shared
  72.         object by using the following command line:
  73.  
  74.             cc -G -K PIC -o libattach.so attach.c
  75.  
  76.         On SunOs 4.1 or later you make this a shared object
  77.         by doing:
  78.  
  79.             cc -c -PIC attach.c
  80.             ld -o libattach.so attach.o
  81.  
  82.         Then, from within WKSH, you can execute:
  83.  
  84.             libload ./libattach.so
  85.             cmdload argprint
  86.  
  87.         And then you can just start using argprint as a ksh
  88.         built-in command.
  89.  
  90.         Note that ./libattach.so is necessary because the dynamic
  91.         library commands need a "full" path to find the library
  92.         if it's not in /usr/lib or in your $LD_LIBRARY_PATH.
  93.