home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2884 < prev    next >
Encoding:
Internet Message Format  |  1991-03-01  |  25.1 KB

  1. From: guido@cwi.nl (Guido van Rossum)
  2. Newsgroups: alt.sources
  3. Subject: STDWIN official patch # 5
  4. Message-ID: <3048@charon.cwi.nl>
  5. Date: 28 Feb 91 13:29:33 GMT
  6.  
  7. Archive-name: stdwin0.9/patch05
  8.  
  9. This is STDWIN official patch # 5.  You haven't missed patches 1-4 or
  10. the original posting of STDWIN in alt.sources: it was only installed
  11. on wuarchive.wustl.edu (in pub), at patchlevel 4 (the patchlevel is
  12. the third digit of the version number, e.g. 0.9.4).
  13.  
  14. So far I have received only 5 messages asking that I post STDWIN to
  15. alt.sources.  Given the size (almost a Megabyte) and the flames I got
  16. for posting Python, I won't post it unless I get a lot more fan mail.
  17. In the mean time, try to find a friend with ftp access!
  18.  
  19. If you have ftp'ed STDWIN version 0.9.4 from wuarchive, this patch
  20. brings you up-to-date to version 0.9.5.  A following message contains
  21. the original STDWIN report, which you can install as Doc/paper.ms for
  22. completeness.  Finally, there is a message containing some shell
  23. commands to remove some files that were inadvertently distributed with
  24. 0.9.4 and to move a few files around to more convenient places.
  25.  
  26. If you have applied the temporary patch to 0.9.4 for Ports/x11/general.c
  27. that I put out here, unpatch it first (or restore general.c.orig)
  28. since this patch will attempt to redo that patch (but different).
  29.  
  30. I will install 0.9.5 and uninstall 0.9.4 on wuarchive as soon as I
  31. can get to it.  Users in Europe: 0.9.5 will be available from
  32. hp4nl.nluug.nl from tomorrow afternoon.
  33.  
  34. Good luck!
  35.  
  36. --Guido van Rossum <guido@cwi.nl>
  37.  
  38.         *************************************
  39.         * NOTE: use "patch -p <thismessage" *
  40.         *************************************
  41.  
  42. Prereq: 4
  43. *** ../0.9.4/H/patchlevel.h    Thu Feb 21 13:39:20 1991
  44. --- H/patchlevel.h    Thu Feb 28 10:42:39 1991
  45. ***************
  46. *** 1 ****
  47. ! #define PATCHLEVEL 4
  48. --- 1 ----
  49. ! #define PATCHLEVEL 5
  50. *** ../0.9.4/README    Wed Jan  2 14:51:42 1991
  51. --- README    Thu Feb 28 12:57:44 1991
  52. ***************
  53. *** 1,7 ****
  54.   STDWIN INSTALLATION GUIDE
  55.   -------------------------
  56.   
  57. ! [last edit: Jan 2 1991]
  58.   
  59.   
  60.   What Is STDWIN
  61. --- 1,7 ----
  62.   STDWIN INSTALLATION GUIDE
  63.   -------------------------
  64.   
  65. ! [last edit: Feb 28 1991]
  66.   
  67.   
  68.   What Is STDWIN
  69. ***************
  70. *** 10,35 ****
  71.   STDWIN (STanDard Window INterface) is a simple windowing interface for
  72.   which multiple implementations exist; currently, programs using STDWIN
  73.   can be made to run on Unix (using either alphanumeric terminals or the
  74. ! X11 Window System, Release 3 or 4), on the Apple Macintosh (using THINK
  75. ! C 4.0), or on MS-DOS with a dumb display (using Microsoft C).  If you
  76. ! insist, I also have two versions for the Atari ST that need some dusting
  77. ! off.
  78.   
  79.   For a longer introduction, read the (slightly outdated) file Doc/ABOUT.
  80.   
  81.   
  82.   Where To Get STDWIN
  83.   ===================
  84.   
  85. ! This is a preliminary version.  If you insist, you can get the latest
  86. ! version by e-mail from me (Guido van Rossum, <guido@cwi.nl>), but it is
  87. ! usually easier to fetch it by anonymous ftp.  I regularly put a recent,
  88. ! working version on a dutch anonymous ftp site named hp4nl.nluug.nl (IP
  89. ! address 192.16.202.2), in the file "pub/windows/stdwin.tar.Z".  Don't
  90. ! forget to issue the ftp command "type image" before attempting to get
  91. ! the file (it's in compressed tar format).
  92.   
  93.   
  94.   Getting Started Right Now
  95.   =========================
  96.   
  97. --- 10,48 ----
  98.   STDWIN (STanDard Window INterface) is a simple windowing interface for
  99.   which multiple implementations exist; currently, programs using STDWIN
  100.   can be made to run on Unix (using either alphanumeric terminals or the
  101. ! X11 Window System), on the Apple Macintosh (using THINK C or MPW), or
  102. ! on MS-DOS with a dumb display (using Microsoft C).  If you insist, I
  103. ! also have two versions for the Atari ST that need some dusting off.
  104.   
  105.   For a longer introduction, read the (slightly outdated) file Doc/ABOUT.
  106. + For more information on the Macintosh version, read Ports/mac/README,
  107. + for MS-DOS, read Ports/msdos/README.
  108.   
  109. + This is version 0.9.5.  It is still a beta test version.
  110.   
  111.   Where To Get STDWIN
  112.   ===================
  113.   
  114. ! I regularly put the latest STDWIN distribution on two anonymous ftp
  115. ! sites.  As the filename shows, to unpack this you need the programs
  116. ! uncompress and tar.
  117.   
  118. +     site        hp4nl.nluug.nl (IP address 192.16.202.2)
  119. +     directory    pub/windows
  120. +     file        stdwin*.tar.Z (the * is the version, e.g. 0.9.5)
  121.   
  122. +     site        wuarchive.wustl.edu
  123. +     directory    pub
  124. +     file        stdwin*.tar.Z (the * is the version, e.g. 0.9.5)
  125. + Don't forget to specify binary file transfer mode!  ("type binary")
  126. + I can also e-mail you a voluminous bunch of shar files but please try
  127. + finding a friend with ftp access first -- it's much more convenient
  128. + for all concerned.
  129.   Getting Started Right Now
  130.   =========================
  131.   
  132. ***************
  133. *** 41,49 ****
  134.       DEC VAX, DECstation        Ultrix 2.2 or 3.0
  135.       Sun3, Sun4            SunOS 4.0 or 4.1
  136.       Silicon Graphics Personal IRIS    IRIX 3.2 or 3.3
  137.   
  138.   (For other OS versions on these or similar machines, give it a try
  139. ! anyway, it may work as well.)  To build STDWIN for X11 on such systems:
  140.   
  141.       cd Conf
  142.       ./mkmf                # answer all questions with yes
  143. --- 54,65 ----
  144.       DEC VAX, DECstation        Ultrix 2.2 or 3.0
  145.       Sun3, Sun4            SunOS 4.0 or 4.1
  146.       Silicon Graphics Personal IRIS    IRIX 3.2 or 3.3
  147. +     Harris HCX-7 (tahoe)        BSD 4.3
  148.   
  149.   (For other OS versions on these or similar machines, give it a try
  150. ! anyway, it may work as well, especially if there is a program called
  151. ! "arch" or "machine" that prints the machine type.)  To build STDWIN
  152. ! for X11 on such systems:
  153.   
  154.       cd Conf
  155.       ./mkmf                # answer all questions with yes
  156. ***************
  157. *** 96,105 ****
  158.               directory to the compiler in a "-I" option.
  159.   
  160.       Tools/        Subroutines used by various ports and
  161. !             applications; not STDWIN-specific.  (Actually,
  162. !             most of these are not used by the standard
  163. !             ports; only strdup.c is needed and even that
  164. !             may be in your standard C library.)
  165.   
  166.       Gen/        (Almost) generic versions of some STDWIN
  167.               functions, used by more than one port.  (Some
  168. --- 112,120 ----
  169.               directory to the compiler in a "-I" option.
  170.   
  171.       Tools/        Subroutines used by various ports and
  172. !             applications; not STDWIN-specific.
  173. !             (This has now been truncated to the bare
  174. !             minimum.)
  175.   
  176.       Gen/        (Almost) generic versions of some STDWIN
  177.               functions, used by more than one port.  (Some
  178. ***************
  179. *** 107,114 ****
  180.               fail.)
  181.   
  182.       Ports/        Source for various ports.
  183.   
  184. !     Ports/x11/    Port to X11, for R3 or R4; uses Xlib only.
  185.       Ports/alfa/    Port for alphanumeric displays using termcap/terminfo.
  186.       Ports/vtrm/    VTRM (virtual terminal) package used by Ports/alfa.
  187.       Ports/atrm/    Amoeba support or verion for VTRM (old).
  188. --- 122,130 ----
  189.               fail.)
  190.   
  191.       Ports/        Source for various ports.
  192. +             Note: not all subdirectories are distributed!
  193.   
  194. !     Ports/x11/    Port to X11 R4; uses Xlib only.
  195.       Ports/alfa/    Port for alphanumeric displays using termcap/terminfo.
  196.       Ports/vtrm/    VTRM (virtual terminal) package used by Ports/alfa.
  197.       Ports/atrm/    Amoeba support or verion for VTRM (old).
  198. ***************
  199. *** 135,141 ****
  200.               Unfortunately this is terribly out of date.
  201.   
  202.       Doc/ABOUT    Blurb to be sent to prospective users.
  203. !     Doc/paper/    The original paper (CWI report CS-R8817) (*troff -ms).
  204.       (etc)
  205.   
  206.       Conf/        Configuration scripts and prototype Makefiles.
  207. --- 151,157 ----
  208.               Unfortunately this is terribly out of date.
  209.   
  210.       Doc/ABOUT    Blurb to be sent to prospective users.
  211. !     Doc/paper.ms    The original paper (CWI report CS-R8817) (*troff -ms).
  212.       (etc)
  213.   
  214.       Conf/        Configuration scripts and prototype Makefiles.
  215. *** ../0.9.4/Appls/dpv/dpvcontrol.c    Tue Oct 30 17:38:11 1990
  216. --- Appls/dpv/dpvcontrol.c    Thu Feb 28 10:42:40 1991
  217. ***************
  218. *** 48,57 ****
  219.       char *device;    /* Required device, or NULL if N/A */
  220.       char *command;    /* Shell command to execute */
  221.   } printitems[MAXNPRINT]= {
  222.       {"Typeset on Harris",        "har",    "lpr -Phar -n %s"},
  223.       {"Harris emulation on Agfa",    "har",    "toagfa %s"},
  224.       {"Print on PostScript",        "psc",    "lpr -Ppsc -n %s"},
  225. !     {"Print on Agfa",        "psc",    "lpr -Phqpsc -n %s"},
  226.   };
  227.   
  228.   int nprint;
  229. --- 48,60 ----
  230.       char *device;    /* Required device, or NULL if N/A */
  231.       char *command;    /* Shell command to execute */
  232.   } printitems[MAXNPRINT]= {
  233. +     /* XXX This is extremely site-dependent */
  234.       {"Typeset on Harris",        "har",    "lpr -Phar -n %s"},
  235.       {"Harris emulation on Agfa",    "har",    "toagfa %s"},
  236. +     {"Print on ${PRINTER-psc}",    "psc",    "lpr -P${PRINTER-psc} -n %s"},
  237. +     {"Print on Oce",        "psc",    "lpr -Poce -n %s"},
  238.       {"Print on PostScript",        "psc",    "lpr -Ppsc -n %s"},
  239. !     {"Print on Agfa",        "psc",    "lpr -Pagfa -n %s"},
  240.   };
  241.   
  242.   int nprint;
  243. *** ../0.9.4/Appls/klok/bsdsetdate.c    Thu Sep  6 10:02:54 1990
  244. --- Appls/klok/bsdsetdate.c    Thu Feb 28 10:42:41 1991
  245. ***************
  246. *** 1,6 ****
  247. --- 1,9 ----
  248.   /* Set the date and time -- 4.3 BSD Unix version */
  249.   
  250. + #ifndef sun
  251. + /* This is not needed on SunOS 4.03 (what about higher SunOS'es?). */
  252.   #include <time.h>
  253. + #endif
  254.   #include <sys/time.h>
  255.   
  256.   #define isleap(y) ((y)%4 == 0 && ((y)%100 != 0 || (y)%400 == 0))
  257. *** ../0.9.4/Appls/klok/klok.c    Tue Oct 30 17:38:46 1990
  258. --- Appls/klok/klok.c    Thu Feb 28 10:42:41 1991
  259. ***************
  260. *** 801,807 ****
  261.   #endif
  262.       
  263.       /* Create the window */
  264. -     wsetmaxwinsize(400, 400);
  265.       wsetdefwinsize(120, 120);
  266.       win = wopen(title == NULL ? progname : title, drawproc);
  267.       wmenuattach(win, mp);
  268. --- 801,806 ----
  269. *** ../0.9.4/Appls/test/bike.c    Tue Oct 30 17:41:13 1990
  270. --- Appls/test/bike.c    Thu Feb 28 10:34:59 1991
  271. ***************
  272. *** 131,137 ****
  273.       int argc;
  274.       char **argv;
  275.   {
  276. !     winitnew(&argc, &argv);
  277.       calculate();
  278.       wsetdefwinsize(HSCALE + 4*wcharwidth('0'), (NFRONT+1) * VSTEP);
  279.       win = wopen("Bike", drawproc);
  280. --- 131,137 ----
  281.       int argc;
  282.       char **argv;
  283.   {
  284. !     winitargs(&argc, &argv);
  285.       calculate();
  286.       wsetdefwinsize(HSCALE + 4*wcharwidth('0'), (NFRONT+1) * VSTEP);
  287.       win = wopen("Bike", drawproc);
  288. *** ../0.9.4/Appls/test/bits.c    Tue Oct 30 17:41:24 1990
  289. --- Appls/test/bits.c    Thu Feb 28 10:34:58 1991
  290. ***************
  291. *** 34,40 ****
  292.       int argc;
  293.       char **argv;
  294.   {
  295. !     winitnew(&argc, &argv);
  296.       setup();
  297.       mainloop();
  298.       wdone();
  299. --- 34,40 ----
  300.       int argc;
  301.       char **argv;
  302.   {
  303. !     winitargs(&argc, &argv);
  304.       setup();
  305.       mainloop();
  306.       wdone();
  307. *** ../0.9.4/Appls/test/charset.c    Tue Oct 30 17:41:44 1990
  308. --- Appls/test/charset.c    Thu Feb 28 10:34:58 1991
  309. ***************
  310. *** 14,20 ****
  311.       int *which= &minchar;
  312.       int i;
  313.       
  314. !     winitnew(&argc, &argv);
  315.       
  316.       for (i= 1; i < argc; ++i) {
  317.           if (isnumeric(argv[i])) {
  318. --- 14,20 ----
  319.       int *which= &minchar;
  320.       int i;
  321.       
  322. !     winitargs(&argc, &argv);
  323.       
  324.       for (i= 1; i < argc; ++i) {
  325.           if (isnumeric(argv[i])) {
  326. *** ../0.9.4/Appls/test/dklok.c    Tue Oct 30 17:42:05 1990
  327. --- Appls/test/dklok.c    Thu Feb 28 10:34:57 1991
  328. ***************
  329. *** 107,113 ****
  330.       int argc;
  331.       char **argv;
  332.   {
  333. !     winitnew(&argc, &argv);
  334.       setup();
  335.       mainloop();
  336.       wdone();
  337. --- 107,113 ----
  338.       int argc;
  339.       char **argv;
  340.   {
  341. !     winitargs(&argc, &argv);
  342.       setup();
  343.       mainloop();
  344.       wdone();
  345. *** ../0.9.4/Appls/test/faced.c    Tue Oct 30 17:42:15 1990
  346. --- Appls/test/faced.c    Thu Feb 28 10:34:57 1991
  347. ***************
  348. *** 35,41 ****
  349.   {
  350.       FILE *fp;
  351.       
  352. !     winitnew(&argc, &argv);
  353.       
  354.       if (argc > 1) {
  355.           fp= fopen(argv[1], "r");
  356. --- 35,41 ----
  357.   {
  358.       FILE *fp;
  359.       
  360. !     winitargs(&argc, &argv);
  361.       
  362.       if (argc > 1) {
  363.           fp= fopen(argv[1], "r");
  364. *** ../0.9.4/Appls/test/hello.c    Tue Oct 30 17:42:40 1990
  365. --- Appls/test/hello.c    Thu Feb 28 10:34:56 1991
  366. ***************
  367. *** 30,36 ****
  368.       char **argv;
  369.   {
  370.       WINDOW *win;
  371. !     winitnew(&argc, &argv);
  372.       win= wopen("Hello", drawproc);
  373.       
  374.       if (win != 0) {
  375. --- 30,36 ----
  376.       char **argv;
  377.   {
  378.       WINDOW *win;
  379. !     winitargs(&argc, &argv);
  380.       win= wopen("Hello", drawproc);
  381.       
  382.       if (win != 0) {
  383. *** ../0.9.4/Appls/test/magic.c    Tue Oct 30 17:43:24 1990
  384. --- Appls/test/magic.c    Thu Feb 28 10:34:55 1991
  385. ***************
  386. *** 222,228 ****
  387.   {
  388.       EVENT e;
  389.       
  390. !     winitnew(&argc, &argv);
  391.       init();
  392.       wsetdefwinsize(origleft + (DEFSIZE+2)*colwidth,
  393.               origtop + (DEFSIZE+2)*rowheight);
  394. --- 222,228 ----
  395.   {
  396.       EVENT e;
  397.       
  398. !     winitargs(&argc, &argv);
  399.       init();
  400.       wsetdefwinsize(origleft + (DEFSIZE+2)*colwidth,
  401.               origtop + (DEFSIZE+2)*rowheight);
  402. *** ../0.9.4/Appls/test/multiwin.c    Tue Oct 30 17:43:45 1990
  403. --- Appls/test/multiwin.c    Thu Feb 28 10:34:54 1991
  404. ***************
  405. *** 57,63 ****
  406.       int inew, iquit;
  407.       int stop= 0;
  408.       
  409. !     winitnew(&argc, &argv);
  410.       
  411.       mp= wmenucreate(1, "File");
  412.       inew= wmenuadditem(mp, "New", 'N');
  413. --- 57,63 ----
  414.       int inew, iquit;
  415.       int stop= 0;
  416.       
  417. !     winitargs(&argc, &argv);
  418.       
  419.       mp= wmenucreate(1, "File");
  420.       inew= wmenuadditem(mp, "New", 'N');
  421. *** ../0.9.4/Appls/test/test0.c    Mon Jun  6 23:19:31 1988
  422. --- Appls/test/test0.c    Thu Feb 28 10:34:53 1991
  423. ***************
  424. *** 6,12 ****
  425.       int argc;
  426.       char **argv;
  427.   {
  428. !     winitnew(&argc, &argv);
  429.       wdone();
  430.       exit(0);
  431.   }
  432. --- 6,12 ----
  433.       int argc;
  434.       char **argv;
  435.   {
  436. !     winitargs(&argc, &argv);
  437.       wdone();
  438.       exit(0);
  439.   }
  440. *** ../0.9.4/Appls/test/test1.c    Mon Jun  6 23:19:02 1988
  441. --- Appls/test/test1.c    Thu Feb 28 10:34:53 1991
  442. ***************
  443. *** 7,13 ****
  444.       char **argv;
  445.   {
  446.       WINDOW *win;
  447. !     winitnew(&argc, &argv);
  448.       win= wopen("Basic test", (void (*)()) 0);
  449.       wclose(win);
  450.       wdone();
  451. --- 7,13 ----
  452.       char **argv;
  453.   {
  454.       WINDOW *win;
  455. !     winitargs(&argc, &argv);
  456.       win= wopen("Basic test", (void (*)()) 0);
  457.       wclose(win);
  458.       wdone();
  459. *** ../0.9.4/Appls/test/test2.c    Tue Oct 30 17:44:00 1990
  460. --- Appls/test/test2.c    Thu Feb 28 10:34:52 1991
  461. ***************
  462. *** 14,20 ****
  463.       char **argv;
  464.   {
  465.       WINDOW *win;
  466. !     winitnew(&argc, &argv);
  467.       win= wopen("Hello test", drawproc);
  468.       for (;;) {
  469.           EVENT e;
  470. --- 14,20 ----
  471.       char **argv;
  472.   {
  473.       WINDOW *win;
  474. !     winitargs(&argc, &argv);
  475.       win= wopen("Hello test", drawproc);
  476.       for (;;) {
  477.           EVENT e;
  478. *** ../0.9.4/Appls/test/test3.c    Tue Oct 30 17:44:13 1990
  479. --- Appls/test/test3.c    Thu Feb 28 10:34:52 1991
  480. ***************
  481. *** 18,24 ****
  482.       WINDOW *win;
  483.       int width, height;
  484.       
  485. !     winitnew(&argc, &argv);
  486.       if (argc >= 3) {
  487.           int h= atoi(argv[1]), v= atoi(argv[2]);
  488.           wsetdefwinpos(h, v);
  489. --- 18,24 ----
  490.       WINDOW *win;
  491.       int width, height;
  492.       
  493. !     winitargs(&argc, &argv);
  494.       if (argc >= 3) {
  495.           int h= atoi(argv[1]), v= atoi(argv[2]);
  496.           wsetdefwinpos(h, v);
  497. *** ../0.9.4/Appls/test/test4.c    Tue Oct 30 17:44:28 1990
  498. --- Appls/test/test4.c    Thu Feb 28 10:34:52 1991
  499. ***************
  500. *** 20,26 ****
  501.       int width, height;
  502.       int stop= 0;
  503.       
  504. !     winitnew(&argc, &argv);
  505.       if (argc >= 3) {
  506.           int h= atoi(argv[1]), v= atoi(argv[2]);
  507.           wsetdefwinpos(h, v);
  508. --- 20,26 ----
  509.       int width, height;
  510.       int stop= 0;
  511.       
  512. !     winitargs(&argc, &argv);
  513.       if (argc >= 3) {
  514.           int h= atoi(argv[1]), v= atoi(argv[2]);
  515.           wsetdefwinpos(h, v);
  516. *** ../0.9.4/Appls/test/test5.c    Tue Oct 30 17:44:42 1990
  517. --- Appls/test/test5.c    Thu Feb 28 10:34:52 1991
  518. ***************
  519. *** 46,52 ****
  520.       char **argv;
  521.   {
  522.       WINDOW *win;
  523. !     winitnew(&argc, &argv);
  524.       win= wopen("Hello test", drawproc);
  525.       for (;;) {
  526.           EVENT e;
  527. --- 46,52 ----
  528.       char **argv;
  529.   {
  530.       WINDOW *win;
  531. !     winitargs(&argc, &argv);
  532.       win= wopen("Hello test", drawproc);
  533.       for (;;) {
  534.           EVENT e;
  535. *** ../0.9.4/Appls/test/testpollevent.c    Tue Oct 30 17:45:09 1990
  536. --- Appls/test/testpollevent.c    Thu Feb 28 10:34:51 1991
  537. ***************
  538. *** 11,17 ****
  539.   {
  540.       WINDOW *win;
  541.       
  542. !     winitnew(&argc, &argv);
  543.       win = wopen("Test poll event", drawproc);
  544.       for (;;) {
  545.           if (wpollevent(&ev)) {
  546. --- 11,17 ----
  547.   {
  548.       WINDOW *win;
  549.       
  550. !     winitargs(&argc, &argv);
  551.       win = wopen("Test poll event", drawproc);
  552.       for (;;) {
  553.           if (wpollevent(&ev)) {
  554. *** ../0.9.4/Appls/tetris/tetris.c    Tue Oct 30 17:46:09 1990
  555. --- Appls/tetris/tetris.c    Thu Feb 28 10:34:51 1991
  556. ***************
  557. *** 726,732 ****
  558.       
  559.       time(&t);
  560.       srand((short)t ^ (short)(t>>16));
  561. !     winitnew(&argc, &argv);
  562.       if (wlineheight() == 1) {
  563.           alfa = 1;
  564.           sqwidth = 2;
  565. --- 726,732 ----
  566.       
  567.       time(&t);
  568.       srand((short)t ^ (short)(t>>16));
  569. !     winitargs(&argc, &argv);
  570.       if (wlineheight() == 1) {
  571.           alfa = 1;
  572.           sqwidth = 2;
  573. *** ../0.9.4/Ports/mac/README    Wed Aug  8 16:05:18 1990
  574. --- Ports/mac/README    Thu Feb 28 13:49:37 1991
  575. ***************
  576. *** 1,92 ****
  577. ! [Last modified on Fri Apr 14 15:02:38 MET DST 1989 by guido]
  578.   
  579. ! Getting STDWIN to work on the Macintosh
  580.   
  581. ! Revised edition for THINK C 3.01
  582.   
  583. ! The following instructions assume you are using THINK C 3.01.  In fact
  584. ! the code was once carefully tweaked to work with MPW as well as with
  585. ! LightspeedC (most of the development was originally done under MPW, then
  586. ! it was ported to LightspeedC 2.15), but this property may be lost.  It
  587. ! shouldn't be too hard to fix this, however.  (In case you wondered how
  588. ! the sources manage to do '#ifdef macintosh' and '#ifdef LSC', read the
  589. ! file "configure.h" which defines them.)
  590.   
  591. ! Turn off the <MacHeaders.h> option; the sources know exactly what files
  592. ! to include.
  593.   
  594. ! Create two projects, stdwin.Proj and textedit.Proj.  (Actually, you may
  595. ! use the character `pi' (option-p) instead of Proj, but since I can't
  596. ! type that in this ASCII file, I will use Proj here.)  These will be
  597. ! the libraries you must include in other projects that use STDWIN.
  598. ! There are two libraries because together they are too big to fit in one
  599. ! segment.  To stdwin.Proj, add all files from the following directories:
  600. ! tools, gen, mac.  To textedit.Proj, add all files from the directory
  601. ! textedit.  The two projects should be together in a directory
  602. ! (=Folder), and the source directories (also the 'h' directory full of
  603. ! include files) should be subdirectories of this directory.
  604.   
  605. ! In case you got this together with the Unix sources, here's an
  606. ! exhaustive list of the files that go into each project:
  607.   
  608. ! Into stdwin.Proj:
  609. !     From gen:
  610. !         textbrk.c
  611. !     From tools:
  612. !         strdup.c
  613. !         getopt.c (*)
  614. !         memcpy.c (*)
  615. !     From mac:
  616. !         about.c
  617. !         argcargv.c
  618. !         caret.c
  619. !         cursor.c
  620. !         dialog.c
  621. !         dprintf.c
  622. !         draw.c
  623. !         event.c
  624. !         fullpath.c
  625. !         menu.c
  626. !         pstring.c
  627. !         scrap.c
  628. !         scroll.c
  629. !         stdwin.c
  630. !         timer.c
  631.   
  632. ! Into textedit.Proj:
  633. !     From textedit:
  634. !         editwin.c
  635. !         textdbg.c
  636. !         textedit.c
  637. !         textlow.c
  638. ! (*) These files are not used by STDWIN but by some demo and test
  639. ! applications; you may leave them out of the library and add them to the
  640. ! individual projects that need them.
  641. ! "Make" each project (don't attempt to link).
  642. ! To create a test application, a primitive editor called "miniedit", make
  643. ! a third project called miniedit.Proj, and add to it:
  644. ! - the projects you just created: stdwin.Proj and textedit.Proj
  645. ! - the LightspeedC libraries stdio, strings, unix, storage, storageu
  646. !   and MacTraps
  647. ! - the source file miniedit.c from the test subdirectory.
  648. ! You may have to fiddle the segmentation to keep the segments from
  649. ! overflowing.
  650. ! Running this project should create a simple text editor.  It supports
  651. ! multiple windows, cut and paste, and search and replace using regular
  652. ! expressions.  (This program has no relation with the MiniEdit demo from
  653. ! Inside Mac and the LightspeedC version thereof.  It uses a
  654. ! nearly-public-domain regular expression package by Henry Spencer, which
  655. ! I slightly modified to allow multi-line matching.)
  656. ! Other single-file test programs from the same directory: bits.c (a
  657. ! toy bitmap editor); faced.c (a slightly more powerful bitmap editor)
  658. ! hello.c (a hello-world program); and klok.c (an analog clock; note that
  659. ! it needs the math library).  In fact these examples (except of course
  660. ! miniedit) can do without using the textedit project.
  661. ! Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
  662. ! guido@cwi.nl or mcvax!guido or guido%cwi.nl@uunet.uu.net
  663. --- 1,35 ----
  664. ! Using STDWIN on the Mac
  665.   
  666. ! This assumes THINK C 4.0.  I believe you can make it work for THINK C
  667. ! 3.0, check for the symbol THINK_C_3_0 (especially in H/stdwconf.h).
  668. ! It also works for MPW 2.0, see ../mac_mpw.
  669.   
  670. ! Copy the files from the following directories to the Mac:
  671. !     H
  672. !     Tools
  673. !     Gen
  674. !     Ports/mac
  675. !     Packs/textedit
  676. !     Appls/miniedit (for testing)
  677.   
  678. ! Make two projects, stdwin.<pi> and textedit.<pi> (<pi> is the letter
  679. ! pi, Option-p).  All of STDWIN together is too big for one segment, and
  680. ! the textedit module is not used by all applications.
  681.   
  682. ! Project stdwin.<pi> receives all sources from Tools, Gen and
  683. ! Ports/mac; textedit.<pi> receives those from Packs/textedit.
  684.   
  685. ! Turn off <MacHeaders>; the sources know exactly which files to include.
  686. ! (To speed up compilation you can rename "macwin.h" and precompile it,
  687. ! placing the output in "macwin.h".  This is completely optional.)
  688.   
  689. ! Compile the sources in each project.  Don't attempt to link.
  690.   
  691. ! To test, make a project miniedit.<pi> and add all sources from
  692. ! Appls/miniedit.  Add the ANSI and MacTraps libraries and the
  693. ! stdwin.<pi> and textedit.<pi> projects you just created.  (Probably
  694. ! everything in its own segment.)  You now have a simple editor with
  695. ! regular expression search facility.  Study the source to learn more
  696. ! about using stdwin.
  697.   
  698. ! Good luck!
  699. *** ../0.9.4/Ports/mac/about.c    Thu Feb 21 13:39:40 1991
  700. --- Ports/mac/about.c    Thu Feb 28 12:48:31 1991
  701. ***************
  702. *** 16,22 ****
  703.      Also see your THINK C licence.
  704.   */
  705.   char *about_message=
  706. !     "STDWIN version 0.9.4 (using THINK C 4.0)\r\r\
  707.   Copyright \251 1988, 1989, 1990 Stichting Mathematisch Centrum, \
  708.   Amsterdam\r\
  709.   Written by Guido van Rossum (guido@cwi.nl)\r\
  710. --- 16,22 ----
  711.      Also see your THINK C licence.
  712.   */
  713.   char *about_message=
  714. !     "STDWIN version 0.9.5 (using THINK C 4.0)\r\r\
  715.   Copyright \251 1988, 1989, 1990 Stichting Mathematisch Centrum, \
  716.   Amsterdam\r\
  717.   Written by Guido van Rossum (guido@cwi.nl)\r\
  718. *** ../0.9.4/Ports/x11/amtimer.c    Thu Oct 18 13:58:38 1990
  719. --- Ports/x11/amtimer.c    Thu Feb 28 10:42:42 1991
  720. ***************
  721. *** 143,149 ****
  722.       }
  723.   }
  724.   
  725. ! semaphore *_wsema; /* Global, used by winitnew() */
  726.   
  727.   /* Interface to specify the semaphore used by XamBlock().
  728.      *** This must be called before calling winit[new]() !!! ***
  729. --- 143,149 ----
  730.       }
  731.   }
  732.   
  733. ! semaphore *_wsema; /* Global, used by winit() */
  734.   
  735.   /* Interface to specify the semaphore used by XamBlock().
  736.      *** This must be called before calling winit[new]() !!! ***
  737. *** ../0.9.4/Ports/x11/general.c    Tue Feb 19 10:47:59 1991
  738. --- Ports/x11/general.c    Thu Feb 28 10:42:43 1991
  739. ***************
  740. *** 173,179 ****
  741.      You can also set the environment variable RESOURCE_NAME. */
  742.   
  743.   
  744. ! XrmDatabase db = NULL; /* Passed between wargs() and winit() */
  745.   
  746.   /* Part one of the initialization -- process command line arguments */
  747.   
  748. --- 173,180 ----
  749.      You can also set the environment variable RESOURCE_NAME. */
  750.   
  751.   
  752. ! static XrmDatabase db = NULL; /* Passed between wargs() and winit() */
  753. ! static int wargs_called; /* Set when wargs is called */
  754.   
  755.   /* Part one of the initialization -- process command line arguments */
  756.   
  757. ***************
  758. *** 185,190 ****
  759. --- 186,195 ----
  760.       char **argv= *pargv;
  761.       char *value;
  762.       
  763. +     if (wargs_called)
  764. +         _wfatal("wargs: called more than once");
  765. +     wargs_called = 1;
  766. +     
  767.       /* Get the program name (similar to basename(argv[0])) */
  768.       
  769.       if (*pargc > 0 && argv[0] != NULL && argv[0][0] != EOS) {
  770. ***************
  771. *** 254,260 ****
  772.   
  773.       /* Call wargs() with dummy arguments if not already called */
  774.   
  775. !     if (db == NULL) {
  776.           static char* def_args[]= {"stdwin", (char*)NULL};
  777.           int argc= 1;
  778.           char **argv= def_args;
  779. --- 259,265 ----
  780.   
  781.       /* Call wargs() with dummy arguments if not already called */
  782.   
  783. !     if (!wargs_called) {
  784.           static char* def_args[]= {"stdwin", (char*)NULL};
  785.           int argc= 1;
  786.           char **argv= def_args;
  787. *** ../0.9.4/Ports/x11/window.c    Tue Feb 19 10:48:05 1991
  788. --- Ports/x11/window.c    Thu Feb 28 10:42:44 1991
  789. ***************
  790. *** 256,261 ****
  791. --- 256,265 ----
  792.               else if (flags & (WidthValue|HeightValue))
  793.                   sizehints.flags |= USSize;
  794.               
  795. + #if 1
  796. +             /* XXX This doesn't compile in R3.
  797. +                It's safe to take it out. */
  798. +             
  799.               /* Derive the gravity hint from the geometry */
  800.               
  801.               if ((flags & XNegative) || (flags & YNegative)) {
  802. ***************
  803. *** 272,278 ****
  804.                       sizehints.win_gravity =
  805.                           SouthWestGravity;
  806.               }
  807. !             
  808.               /* XXX Do we need a resource to specify the min
  809.                  size (or base size), max size and size
  810.                  increment?  Better to let the application
  811. --- 276,282 ----
  812.                       sizehints.win_gravity =
  813.                           SouthWestGravity;
  814.               }
  815. ! #endif            
  816.               /* XXX Do we need a resource to specify the min
  817.                  size (or base size), max size and size
  818.                  increment?  Better to let the application
  819. *** /dev/null    Thu Feb 28 13:09:24 1991
  820. --- Doc/README    Thu Feb 28 12:56:16 1991
  821. ***************
  822. *** 0 ****
  823. --- 1,12 ----
  824. + Unfortunately the documentation for STDWIN is in a sorry state.
  825. + There is nothing here that even remotely resembles a user manual;
  826. + "paper.ms" comes closest to a full description.
  827. + ABOUT        the old STDWIN blurb that I used to mail out
  828. + paper.ms    the original STDWIN report
  829. + seldoc.ms    describes using X11 Selections and Cut Buffers in STDWIN
  830. + macros.ms    macrose used by seldoc.ms
  831. + vtrmdoc.ms    describes the VTRM package used by ../Ports/alfa
  832. + man/        manpages for dpv, packages and X11 stdwin
  833. + --Guido
  834. *** /dev/null    Thu Feb 28 13:09:24 1991
  835. --- Ports/msdos/README    Thu Feb 28 11:30:38 1991
  836. ***************
  837. *** 0 ****
  838. --- 1,4 ----
  839. + Sorry, there is no real STDWIN port for MS-DOS yet.  What you can is
  840. + to port the alfa version with the help of the file "ptrm.c" in this
  841. + directory, which is a substitute (using the MS-DOS console driver) for
  842. + the VTRM module used by the alfa version for all its tty I/O.
  843.