home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume18 / xrotfont / part03 < prev    next >
Encoding:
Text File  |  1992-07-14  |  20.2 KB  |  750 lines

  1. Path: uunet!elroy.jpl.nasa.gov!swrinde!mips!msi!dcmartin
  2. From: mppa3@syma.sussex.ac.uk (Alan Richardson)
  3. Newsgroups: comp.sources.x
  4. Subject: v18i021: Xrotfont - draw rotated text, Part03/03
  5. Message-ID: <1992Jul14.152947.14780@msi.com>
  6. Date: 14 Jul 92 15:29:47 GMT
  7. References: <csx-18i019-xrotfont@uunet.UU.NET>
  8. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  9. Organization: Molecular Simulations, Inc.
  10. Lines: 736
  11. Approved: dcmartin@msi.com
  12. Originator: dcmartin@fascet
  13.  
  14. Submitted-by: Alan Richardson <mppa3@syma.sussex.ac.uk>
  15. Posting-number: Volume 18, Issue 21
  16. Archive-name: xrotfont/part03
  17.  
  18. #!/bin/sh
  19. # this is part.03 (part 3 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file main.c continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 3; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping main.c'
  37. else
  38. echo 'x - continuing file main.c'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'main.c' &&
  40. X
  41. /* xrotfont, Copyright (c) 1992 Alan Richardson (mppa3@uk.ac.sussex.syma)
  42. X *
  43. X * Permission to use, copy, modify, and distribute this software and its
  44. X * documentation ON A NONPROFIT BASIS is hereby granted, provided that
  45. X * the above copyright notice appear in all copies and that both that
  46. X * copyright notice and this permission notice appear in supporting
  47. X * documentation.  All work developed as a consequence of the use of
  48. X * this program should duly acknowledge such use. No representations are
  49. X * made about the suitability of this software for any purpose.  It is
  50. X * provided "as is" without express or implied warranty.
  51. X */
  52. X
  53. /* ***************************************************************************
  54. X   main.c -    the main controlling function
  55. X  
  56. X   Functions:  main()
  57. X   Date:       8/5/92  
  58. X
  59. X   Copyright   (c) 1992 Alan Richardson
  60. X
  61. X  ************************************************************************* */
  62. X
  63. X
  64. #include "all.h"
  65. X
  66. extern void nap();
  67. extern void proc_event();
  68. extern void paint_screen();
  69. extern void openwin();
  70. X
  71. /* the main procedure ... */
  72. main(argc,argv)
  73. X int argc;
  74. X char *argv[];
  75. {
  76. X /* value of pi ... */
  77. X pi=4*atan((double)1);
  78. X
  79. X /* window size ... */
  80. X W=500;
  81. X H=500;
  82. X
  83. X /* check command line options ... */
  84. X options(argc, argv);
  85. X
  86. X /* open the window ... */
  87. X openwin(argc,argv); 
  88. X
  89. X /* draw the screen ... */
  90. X paint_screen();
  91. X
  92. X /* event loop ... */
  93. X while(1)  /* loop for ever */
  94. X {
  95. X   proc_event();
  96. X   nap(200000);
  97. X }
  98. X
  99. }
  100. X
  101. X
  102. SHAR_EOF
  103. echo 'File main.c is complete' &&
  104. chmod 0644 main.c ||
  105. echo 'restore of main.c failed'
  106. Wc_c="`wc -c < 'main.c'`"
  107. test 1542 -eq "$Wc_c" ||
  108.     echo 'main.c: original size 1542, current size' "$Wc_c"
  109. rm -f _shar_wnt_.tmp
  110. fi
  111. # ============= misc.c ==============
  112. if test -f 'misc.c' -a X"$1" != X"-c"; then
  113.     echo 'x - skipping misc.c (File already exists)'
  114.     rm -f _shar_wnt_.tmp
  115. else
  116. > _shar_wnt_.tmp
  117. echo 'x - extracting misc.c (Text)'
  118. sed 's/^X//' << 'SHAR_EOF' > 'misc.c' &&
  119. /* ***************************************************************************
  120. X
  121. X   misc.c -    miscellaneous routines
  122. X
  123. X   Functions:  AllocNamedColor()
  124. X               nap()
  125. X
  126. X   Date:       8/5/92
  127. X
  128. X   Copyright   (c) 1992 Alan Richardson 
  129. X
  130. X   ************************************************************************ */
  131. X
  132. X
  133. #include "all.h"
  134. X
  135. void nap();
  136. long AllocNamedColor();
  137. X
  138. /* returns the pixel corresponding to a named colour */
  139. long AllocNamedColor(colname)
  140. X char *colname;
  141. {
  142. X long pixel;
  143. X XColor scrncol, excol;
  144. X
  145. X /* monochrome display ? ... */
  146. X if(mono) pixel=WhitePixel(dpy, screen);
  147. X
  148. X else
  149. X /* colour ... */
  150. X {
  151. X  if(XAllocNamedColor(dpy, DefaultColormap(dpy, screen), colname,
  152. X                      &scrncol, &excol))
  153. X     { pixel=scrncol.pixel; }
  154. X  else
  155. X     { pixel=WhitePixel(dpy, screen); }
  156. X }
  157. X
  158. X return pixel;
  159. }
  160. X
  161. X
  162. X
  163. /* routine to sleep for so many microseconds (at least) */
  164. #ifdef NO_USLEEP
  165. #include <sys/types.h>
  166. #include <sys/time.h>
  167. #endif
  168. X
  169. void nap (usecs)
  170. X unsigned long usecs;
  171. {
  172. X /* systems without the usleep function ... */
  173. #ifdef NO_USLEEP
  174. X struct timeval tv;
  175. X tv.tv_sec  = usecs / 1000000L;
  176. X tv.tv_usec = usecs % 1000000L;
  177. X (void) select (0, 0, 0, 0, &tv);
  178. X
  179. #else
  180. X usleep(usecs);
  181. X
  182. #endif
  183. }
  184. X
  185. SHAR_EOF
  186. chmod 0644 misc.c ||
  187. echo 'restore of misc.c failed'
  188. Wc_c="`wc -c < 'misc.c'`"
  189. test 1212 -eq "$Wc_c" ||
  190.     echo 'misc.c: original size 1212, current size' "$Wc_c"
  191. rm -f _shar_wnt_.tmp
  192. fi
  193. # ============= openwin.c ==============
  194. if test -f 'openwin.c' -a X"$1" != X"-c"; then
  195.     echo 'x - skipping openwin.c (File already exists)'
  196.     rm -f _shar_wnt_.tmp
  197. else
  198. > _shar_wnt_.tmp
  199. echo 'x - extracting openwin.c (Text)'
  200. sed 's/^X//' << 'SHAR_EOF' > 'openwin.c' &&
  201. /* ***************************************************************************
  202. X
  203. X   openwin.c - initialise X and open a window
  204. X
  205. X   Functions:  openwin()
  206. X
  207. X   Date:       8/5/92
  208. X
  209. X   Copyright   (c) 1992 Alan Richardson
  210. X
  211. X   ************************************************************************ */
  212. X
  213. #include "all.h"
  214. X
  215. extern void loadfont();
  216. extern void options();
  217. extern char *getenv();
  218. X
  219. void openwin();
  220. X
  221. /* initialise x11 and open a window */
  222. void openwin(argc,argv)
  223. X int argc;
  224. X char *argv[];
  225. {
  226. X GC cleargc;
  227. X XSetWindowAttributes attr;
  228. X
  229. X /* establish connection to display ... */
  230. X if(host==(char *)NULL)
  231. X {
  232. X /* get hostname from enviroment if not specified ... */
  233. X if((host=getenv("DISPLAY"))==NULL)
  234. X   {fprintf(stderr,"Can't connect to host\n");
  235. X    exit(); }
  236. X }
  237. X
  238. X /* open the display ... */
  239. X if((dpy=XOpenDisplay(host))==NULL)   
  240. X   {fprintf(stderr,"Can't open display\n");
  241. X    exit();}
  242. X
  243. X /* display hardware info ... */
  244. X screen=DefaultScreen(dpy);
  245. X depth=DefaultDepth(dpy,screen);
  246. X root=DefaultRootWindow(dpy);
  247. X
  248. X /* monochrome ? ... */
  249. X if(depth==1) mono=1;
  250. X else         mono=0;
  251. X
  252. X /* the events we're interested in ... */
  253. X attr.event_mask=ExposureMask|KeyPressMask;
  254. X
  255. X /* open the window ... */
  256. X gowin=XCreateWindow(dpy, root, 0, 0, W, H,
  257. X                     0, depth, InputOutput, DefaultVisual(dpy,screen),
  258. X                     CWEventMask, &attr);
  259. X
  260. X /* for debugging ... */
  261. X /* XSynchronize(dpy, True);*/
  262. X
  263. X /* window name ... */
  264. X XSetStandardProperties(dpy, gowin, "Rotated text",
  265. X                            NULL, NULL, argv, argc, 0); 
  266. X
  267. X /* create pixmap and set window background to it 
  268. X    - all drawing will be done in this pixmap, so that on Expose events
  269. X      all we need do is clear the window to restore the contents ... */
  270. X gopix=XCreatePixmap(dpy, gowin, W, H, depth);
  271. X
  272. X /* clear the pixmap ... */
  273. X cleargc=XCreateGC(dpy, gowin, NULL, 0);
  274. X XSetForeground(dpy, cleargc, BlackPixel(dpy, screen));
  275. X XFillRectangle(dpy, gopix, cleargc, 0, 0, W, H);
  276. X XFreeGC(dpy, cleargc);
  277. X
  278. X XSetWindowBackgroundPixmap(dpy, gowin, gopix);
  279. X
  280. X /* set the default font ... */
  281. X loadfont("fixed");
  282. X
  283. X /* make the window visible ... */
  284. X XMapWindow(dpy, gowin); 
  285. X
  286. }
  287. X
  288. SHAR_EOF
  289. chmod 0644 openwin.c ||
  290. echo 'restore of openwin.c failed'
  291. Wc_c="`wc -c < 'openwin.c'`"
  292. test 2155 -eq "$Wc_c" ||
  293.     echo 'openwin.c: original size 2155, current size' "$Wc_c"
  294. rm -f _shar_wnt_.tmp
  295. fi
  296. # ============= options.c ==============
  297. if test -f 'options.c' -a X"$1" != X"-c"; then
  298.     echo 'x - skipping options.c (File already exists)'
  299.     rm -f _shar_wnt_.tmp
  300. else
  301. > _shar_wnt_.tmp
  302. echo 'x - extracting options.c (Text)'
  303. sed 's/^X//' << 'SHAR_EOF' > 'options.c' &&
  304. /* ***************************************************************************
  305. X
  306. X   options.c - routines to interpret command line options
  307. X                and print a help message
  308. X
  309. X   Functions:  options()
  310. X               usage()
  311. X
  312. X   Date:       8/5/92
  313. X
  314. X   Copyright   (c) 1992 Alan Richardson 
  315. X
  316. X   ************************************************************************ */
  317. X
  318. X
  319. #include "all.h"
  320. X
  321. void options();
  322. void usage();
  323. X
  324. /* handle command line options */
  325. void options(argc, argv)
  326. X int argc;
  327. X char *argv[];
  328. {
  329. X int i;
  330. X
  331. X /* check command line arguments ... */
  332. X for (i=1; i<argc; i++)
  333. X { 
  334. X   /* which x-server ... */
  335. X   if(strcmp(argv[i],"-display")==0)
  336. X     { if(i==argc-1) usage(argc, argv);
  337. X       host=argv[++i]; }
  338. X
  339. X   else usage(argc, argv);
  340. X
  341. X }
  342. X
  343. }
  344. X
  345. X
  346. /* help message */
  347. void usage(argc, argv)
  348. X int argc;
  349. X char *argv[];
  350. {
  351. X fprintf(stderr,"usage: %s [options]\n",argv[0]);
  352. X fprintf(stderr,
  353. X   "         -display HOST:0.0                 : where to display window\n\n");
  354. X exit();
  355. }
  356. SHAR_EOF
  357. chmod 0644 options.c ||
  358. echo 'restore of options.c failed'
  359. Wc_c="`wc -c < 'options.c'`"
  360. test 983 -eq "$Wc_c" ||
  361.     echo 'options.c: original size 983, current size' "$Wc_c"
  362. rm -f _shar_wnt_.tmp
  363. fi
  364. # ============= paintscreen.c ==============
  365. if test -f 'paintscreen.c' -a X"$1" != X"-c"; then
  366.     echo 'x - skipping paintscreen.c (File already exists)'
  367.     rm -f _shar_wnt_.tmp
  368. else
  369. > _shar_wnt_.tmp
  370. echo 'x - extracting paintscreen.c (Text)'
  371. sed 's/^X//' << 'SHAR_EOF' > 'paintscreen.c' &&
  372. /* ***************************************************************************
  373. X
  374. X   paintscreen.c - routine to build up the window contents
  375. X                
  376. X   Functions:  paintscreen()
  377. X               
  378. X   Date:       8/5/92
  379. X
  380. X   Copyright   (c) 1992 Alan Richardson
  381. X
  382. X   ************************************************************************ */
  383. X
  384. X
  385. #include "all.h"
  386. X
  387. extern void drawtext();
  388. extern void rotatedtext();
  389. extern void loadfont();
  390. extern void hersheytext();
  391. X
  392. void paint_screen();
  393. X
  394. /* what to paint in the window */
  395. void paint_screen()
  396. {
  397. X loadfont("-adobe-courier-bold-o-normal--14-140-75-75-m-90-iso8859-1");
  398. X
  399. X drawtext("This is just XDrawImageString", 250, 20, CENTRE, "cyan");
  400. X drawtext("like you normally use ...", 250, 40, CENTRE, "cyan");
  401. X
  402. X loadfont("-adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1");
  403. X
  404. X rotatedtext("..but this is  ", 250, 170, RALLIGN, 0., "green");
  405. X rotatedtext("rotated  ", 250, 170, RALLIGN, -45., "green");
  406. X rotatedtext("snf text  ", 250, 170, RALLIGN, -90., "green");
  407. X rotatedtext("  painted", 250, 170, LALLIGN, 45., "green");
  408. X rotatedtext("  using XImages", 250, 170, LALLIGN, 0., "green");
  409. X
  410. X loadfont("Hershey-Gothic-English");
  411. X
  412. X hersheytext("This is", 250, 220, 30, CENTRE, 0., "yellow");
  413. X hersheytext("a Hershey", 250, 270, 50, CENTRE, 0., "yellow");
  414. X hersheytext("outline font", 250, 330, 70, CENTRE, 0., "yellow");
  415. X
  416. X loadfont("Hershey-Script-Complex");
  417. X
  418. X hersheytext("AND", 100, 430, 50, CENTRE, 45., "cyan");
  419. X hersheytext("SO", 200, 430, 50, CENTRE, 45., "cyan");
  420. X hersheytext("IS", 300, 430, 50, CENTRE, 45., "cyan");
  421. X hersheytext("THIS", 400, 430, 50, CENTRE, 45., "cyan");
  422. X
  423. X loadfont("fixed");
  424. X
  425. X rotatedtext("This would look good along the y-axis of a graph..",
  426. X                  20, 250, CENTRE, 90., "cyan");
  427. X
  428. X loadfont("Hershey-Plain-Simplex");
  429. X
  430. X hersheytext("..maybe this would too ?",
  431. X                  480, 250, 20, CENTRE, -90., "cyan");
  432. X
  433. }
  434. X
  435. SHAR_EOF
  436. chmod 0644 paintscreen.c ||
  437. echo 'restore of paintscreen.c failed'
  438. Wc_c="`wc -c < 'paintscreen.c'`"
  439. test 1908 -eq "$Wc_c" ||
  440.     echo 'paintscreen.c: original size 1908, current size' "$Wc_c"
  441. rm -f _shar_wnt_.tmp
  442. fi
  443. # ============= Makefile.std ==============
  444. if test -f 'Makefile.std' -a X"$1" != X"-c"; then
  445.     echo 'x - skipping Makefile.std (File already exists)'
  446.     rm -f _shar_wnt_.tmp
  447. else
  448. > _shar_wnt_.tmp
  449. echo 'x - extracting Makefile.std (Text)'
  450. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.std' &&
  451. # Makefile generated by imake - do not edit!
  452. # $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  453. #
  454. # The cpp used on this machine replaces all newlines and multiple tabs and
  455. # spaces in a macro expansion with a single space.  Imake tries to compensate
  456. # for this, but is not always successful.
  457. #
  458. X
  459. ###########################################################################
  460. # Makefile generated from "Imake.tmpl" and </tmp/IIf.a04747>
  461. # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  462. #
  463. # Platform-specific parameters may be set in the appropriate .cf
  464. # configuration files.  Site-wide parameters may be set in the file
  465. # site.def.  Full rebuilds are recommended if any parameters are changed.
  466. #
  467. # If your C preprocessor doesn't define any unique symbols, you'll need
  468. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  469. # "make Makefile", "make Makefiles", or "make World").
  470. #
  471. # If you absolutely can't get imake to work, you'll need to set the
  472. # variables at the top of each Makefile as well as the dependencies at the
  473. # bottom (makedepend will do this automatically).
  474. #
  475. X
  476. ###########################################################################
  477. # platform-specific configuration parameters - edit sol.cf to change
  478. X
  479. # platform:  $XConsortium: sun.cf,v 1.32 89/10/11 18:54:52 jim Exp $
  480. # operating system:  SunOS 4.0.3
  481. X
  482. ###########################################################################
  483. # site-specific configuration parameters - edit site.def to change
  484. X
  485. # site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  486. X
  487. X            SHELL = /bin/sh
  488. X
  489. X              TOP = .
  490. X      CURRENT_DIR = .
  491. X
  492. X               AR = ar cq
  493. X  BOOTSTRAPCFLAGS =
  494. X               CC = cc
  495. X
  496. X         COMPRESS = compress
  497. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  498. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  499. X          INSTALL = install
  500. X               LD = ld
  501. X             LINT = lint
  502. X      LINTLIBFLAG = -C
  503. X         LINTOPTS = -axz
  504. X               LN = ln -s
  505. X             MAKE = make
  506. X               MV = mv
  507. X               CP = cp
  508. X           RANLIB = ranlib
  509. X  RANLIBINSTFLAGS =
  510. X               RM = rm -f
  511. X     STD_INCLUDES =
  512. X  STD_CPP_DEFINES =
  513. X      STD_DEFINES =
  514. X EXTRA_LOAD_FLAGS =
  515. X  EXTRA_LIBRARIES =
  516. X             TAGS = ctags
  517. X
  518. X    SHAREDCODEDEF = -DSHAREDCODE
  519. X         SHLIBDEF = -DSUNSHLIB
  520. X
  521. X    PROTO_DEFINES =
  522. X
  523. X     INSTPGMFLAGS =
  524. X
  525. X     INSTBINFLAGS = -m 0755
  526. X     INSTUIDFLAGS = -m 4755
  527. X     INSTLIBFLAGS = -m 0664
  528. X     INSTINCFLAGS = -m 0444
  529. X     INSTMANFLAGS = -m 0444
  530. X     INSTDATFLAGS = -m 0444
  531. X    INSTKMEMFLAGS = -g kmem -m 2755
  532. X
  533. X          DESTDIR =
  534. X
  535. X     TOP_INCLUDES = -I$(INCROOT)
  536. X
  537. X      CDEBUGFLAGS = -O
  538. X        CCOPTIONS =
  539. X      COMPATFLAGS =
  540. X
  541. X         SOLTOP = $(TOP)/../Solbourne
  542. X       SOLOILIB = -L$(SOLTOP)/OI -lOI
  543. X      ALLINCLUDES = -I$(SOLTOP)/OI $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  544. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  545. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  546. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  547. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  548. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  549. X   LDCOMBINEFLAGS = -X -r
  550. X
  551. X        MACROFILE = sol.cf
  552. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  553. X
  554. X    IMAKE_DEFINES =
  555. X
  556. X         IRULESRC = $(CONFIGDIR)
  557. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  558. X
  559. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  560. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  561. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  562. X
  563. ###########################################################################
  564. # X Window System Build Parameters
  565. # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  566. X
  567. ###########################################################################
  568. # X Window System make variables; this need to be coordinated with rules
  569. # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  570. X
  571. X          PATHSEP = /
  572. X        USRLIBDIR = $(DESTDIR)/usr/lib
  573. X           BINDIR = $(DESTDIR)/usr/bin/X11
  574. X          INCROOT = $(DESTDIR)/usr/include
  575. X     BUILDINCROOT = $(TOP)
  576. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  577. X      BUILDINCTOP = ..
  578. X           INCDIR = $(INCROOT)/X11
  579. X           ADMDIR = $(DESTDIR)/usr/adm
  580. X           LIBDIR = $(USRLIBDIR)/X11
  581. X        CONFIGDIR = $(LIBDIR)/config
  582. X       LINTLIBDIR = $(USRLIBDIR)/lint
  583. X
  584. X          FONTDIR = $(LIBDIR)/fonts
  585. X         XINITDIR = $(LIBDIR)/xinit
  586. X           XDMDIR = $(LIBDIR)/xdm
  587. X           AWMDIR = $(LIBDIR)/awm
  588. X           TWMDIR = $(LIBDIR)/twm
  589. X           GWMDIR = $(LIBDIR)/gwm
  590. X          MANPATH = $(DESTDIR)/usr/man
  591. X    MANSOURCEPATH = $(MANPATH)/man
  592. X           MANDIR = $(MANSOURCEPATH)n
  593. X        LIBMANDIR = $(MANSOURCEPATH)3
  594. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  595. X
  596. X        SOXLIBREV = 4.2
  597. X          SOXTREV = 4.0
  598. X         SOXAWREV = 4.0
  599. X        SOOLDXREV = 4.0
  600. X         SOXMUREV = 4.0
  601. X        SOXEXTREV = 4.0
  602. X
  603. X       FONTCFLAGS = -t
  604. X
  605. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  606. X
  607. X            IMAKE = imake
  608. X           DEPEND = makedepend
  609. X              RGB = rgb
  610. X            FONTC = bdftosnf
  611. X        MKFONTDIR = mkfontdir
  612. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
  613. X
  614. X        CONFIGSRC = $(TOP)/config
  615. X        CLIENTSRC = $(TOP)/clients
  616. X          DEMOSRC = $(TOP)/demos
  617. X           LIBSRC = $(TOP)/lib
  618. X          FONTSRC = $(TOP)/fonts
  619. X       INCLUDESRC = $(TOP)/X11
  620. X        SERVERSRC = $(TOP)/server
  621. X          UTILSRC = $(TOP)/util
  622. X        SCRIPTSRC = $(UTILSRC)/scripts
  623. X       EXAMPLESRC = $(TOP)/examples
  624. X       CONTRIBSRC = $(TOP)/../contrib
  625. X           DOCSRC = $(TOP)/doc
  626. X           RGBSRC = $(TOP)/rgb
  627. X        DEPENDSRC = $(UTILSRC)/makedepend
  628. X         IMAKESRC = $(CONFIGSRC)
  629. X         XAUTHSRC = $(LIBSRC)/Xau
  630. X          XLIBSRC = $(LIBSRC)/X
  631. X           XMUSRC = $(LIBSRC)/Xmu
  632. X       TOOLKITSRC = $(LIBSRC)/Xt
  633. X       AWIDGETSRC = $(LIBSRC)/Xaw
  634. X       OLDXLIBSRC = $(LIBSRC)/oldX
  635. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  636. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  637. X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
  638. X     EXTENSIONSRC = $(TOP)/extensions
  639. X
  640. X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  641. X     EXTENSIONLIB =  -lXext
  642. X
  643. X          DEPXLIB = $(DEPEXTENSIONLIB)
  644. X             XLIB = $(EXTENSIONLIB) -lX11
  645. X
  646. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  647. X         XAUTHLIB =  -lXau
  648. X
  649. X        DEPXMULIB =
  650. X           XMULIB = -lXmu
  651. X
  652. X       DEPOLDXLIB =
  653. X          OLDXLIB = -loldX
  654. X
  655. X      DEPXTOOLLIB =
  656. X         XTOOLLIB = -lXt
  657. X
  658. X        DEPXAWLIB =
  659. X           XAWLIB = -lXaw
  660. X
  661. X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
  662. X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
  663. X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
  664. X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
  665. X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
  666. X
  667. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  668. X
  669. X         DEPLIBS1 = $(DEPLIBS)
  670. X         DEPLIBS2 = $(DEPLIBS)
  671. X         DEPLIBS3 = $(DEPLIBS)
  672. X
  673. ###########################################################################
  674. # Imake rules for building libraries, programs, scripts, and data files
  675. # rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
  676. X
  677. ###########################################################################
  678. # start of Imakefile
  679. X
  680. # Imakefile file for xrotfont,
  681. #   Copyright (c) 1992 Alan Richardson
  682. X
  683. # If your system doesn't have the `usleep()' function,
  684. #  add  -DNO_USLEEP  to  DEFINES
  685. X
  686. X           OBJS = main.o events.o openwin.o misc.o options.o \
  687. X                  paintscreen.o imagetext.o hersheytext.o
  688. X        DEFINES = 
  689. X    CDEBUGFLAGS = -O
  690. X
  691. xrotfont : $(OBJS)
  692. X         cc -o xrotfont $(OBJS) $(DEFINES) -lX11 -lm
  693. X
  694. $(OBJS) : all.h
  695. X
  696. ###########################################################################
  697. # common rules for all Makefiles - do not edit
  698. X
  699. emptyrule::
  700. X
  701. clean::
  702. X    $(RM_CMD) \#*
  703. X
  704. Makefile::
  705. X    -@if [ -f Makefile ]; then \
  706. X    echo "    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  707. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  708. X    else exit 0; fi
  709. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  710. X
  711. tags::
  712. X    $(TAGS) -w *.[ch]
  713. X    $(TAGS) -xw *.[ch] > TAGS
  714. X
  715. ###########################################################################
  716. # empty rules for directories that do not have SUBDIRS - do not edit
  717. X
  718. install::
  719. X    @echo "install in $(CURRENT_DIR) done"
  720. X
  721. install.man::
  722. X    @echo "install.man in $(CURRENT_DIR) done"
  723. X
  724. Makefiles::
  725. X
  726. includes::
  727. X
  728. ###########################################################################
  729. # dependencies generated by makedepend
  730. X
  731. SHAR_EOF
  732. chmod 0644 Makefile.std ||
  733. echo 'restore of Makefile.std failed'
  734. Wc_c="`wc -c < 'Makefile.std'`"
  735. test 8494 -eq "$Wc_c" ||
  736.     echo 'Makefile.std: original size 8494, current size' "$Wc_c"
  737. rm -f _shar_wnt_.tmp
  738. fi
  739. rm -f _shar_seq_.tmp
  740. echo You have unpacked the last part
  741. exit 0
  742. -- 
  743. Senior Systems Scientist        mail: dcmartin@msi.com
  744. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  745. 796 North Pastoria Avenue        at&t: 408/522-9236
  746. Sunnyvale, California 94086        fax: 407/732-0831
  747.