home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / vmsnet / sources / 433 < prev    next >
Encoding:
Internet Message Format  |  1992-11-04  |  47.9 KB

  1. Path: sparky!uunet!pipex!warwick!mrccrc!doc.ic.ac.uk!agate!netsys!decwrl!elroy.jpl.nasa.gov!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources
  2. Newsgroups: vmsnet.sources
  3. From: dyson@iowasp.physics.uiowa.edu (Rick Dyson)
  4. Subject: xv-2-21a changes to run on VMS, part 03/08
  5. Date: Wed, 04 Nov 1992 21:12:35 GMT
  6. Message-ID: <8981989@MVB.SAIC.COM>
  7. Lines: 1142
  8. Organization: Department of Physics and Astronomy, University of Iowa
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: dyson@iowasp.physics.uiowa.edu (Rick Dyson)
  12. Posting-number: Volume 3, Issue 235
  13. Archive-name: xv-2-21_vms_changes/part03
  14. Supersedes: xv-2-21_vms_changes: Volume 2, Issue 83-86
  15.  
  16. -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
  17. X`20`20`20`20TROFFMAN.STY`20-`20A`20LaTeX`20style`20file`20for`20the`20LaTeX
  18. V`20document.
  19. X
  20. XInstallation`20Instructions:
  21. X
  22. X`20`20`20`20`20`20`20`20Step`200:
  23. X`20`20`20`20`20`20`20`20`20`20`20`20You`20`20need`20`20to`20have`20installed
  24. V`20the`20DECWindows`20programmer`20kit
  25. X`20`20`20`20`20`20`20`20with`20`20the`20`20C`20`20language`20file`20selected.
  26. V`20`20You`20need`20a`20`20C`20`20compiler
  27. X`20`20`20`20`20`20`20`20compatible`20`20with`20`20the`20VAXC`20installed`20as
  28. V`20well,`20including`20the`20.h
  29. X`20`20`20`20`20`20`20`20files`20in`20`20Sys$Library.`20`20`20`20NOTE:`20`20It
  30. V`20has`20been`20reported`20that`20the
  31. X`20`20`20`20`20`20`20`20VAX`20C`20v2.4`20compiler`20`20will`20`20not`20`20work
  32. V`20with`20XV.`20`20A`20reason`20is`20not
  33. X`20`20`20`20`20`20`20`20available.`20`20Personal`20experience`20only`20extends
  34. V`20to`20v3.2-044...
  35. X
  36. X`20`20`20`20`20`20`20`20Step`201:
  37. X`20`20`20`20`20`20`20`20`20`20`20`20The`20first`20step`20in`20getting`20XV`20
  38. V`20(v2.21)`20`20running`20on`20your`20VMS
  39. X`20`20`20`20`20`20`20`20system`20is`20to`20get`20the`20Unix`20`20source`20`20f
  40. Viles`20`20on`20`20your`20disk`20in`20the
  41. X`20`20`20`20`20`20`20`20structure`20intended`20by`20the`20Unix`20environment.
  42. V`20`20`20This`20`20should`20`20be
  43. X`20`20`20`20`20`20`20`20like`20the`20following:
  44. X
  45. X`20`20`20`20`20`20`20`20`20`20`20`20`5BXV-2_21`5D---+---`5B.BITMAPS`5D
  46. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`7C
  47. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+---
  48. V`5B.DOCS`5D
  49. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`7C
  50. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+---
  51. V`5B.JPEG`5D
  52. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`7C
  53. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+---
  54. V`5B.TIFF`5D
  55. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`7C
  56. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20+---
  57. V`5B.UNSUPT`5D---`5B.VMS`5D
  58. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
  59. V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`5E
  60. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
  61. V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`7C
  62. X`20`20`20`20`20`20`20`20Some`20of`20this`20directory's`20contents`20are`20need
  63. Ved`20in`20top`20directory!
  64. X`20`20`20`20`20`20`20`20Move`20the`20`206`20unchanged`20files`20listed`20above
  65. V`20to`20the`20top`20directory.
  66. X`20`20`20`20`20`20`20`20Also`20move`20the`20`20TROFFMAN.STY`20`20to`20`20the
  67. V`20top`20directory`20for`20LaTeX's
  68. X`20`20`20`20`20`20`20`20use`20later.`20`20`20`20
  69. X
  70. X`20`20`20`20`20`20`20`20`20`20`20`20The`20original`20Unix`20compressed`20tar
  71. V`20file`20can`20be`20obtained`20from
  72. X`20`20`20`20`20`20`20`20export.lcs.mit.edu`20(make`20sure`20you`20get`20versio
  73. Vn`202.21!).`20`20`20If`20you
  74. X`20`20`20`20`20`20`20`20don't`20have`20the`20tools`20to`20decompress/detar`20i
  75. Vt,`20you`20will`20`20need`20to
  76. X`20`20`20`20`20`20`20`20ask`20`20`20around.`20`20`20`20Try`20`20looking`20`20f
  77. Vor`20`20them`20`20at`20`20cerritos.edu`20`20or
  78. X`20`20`20`20`20`20`20`20acfcluster.nyu.edu
  79. X
  80. X`20`20`20`20`20`20`20`20Step`202:
  81. X`20`20`20`20`20`20`20`20`20`20`20`20Patch`20`20in`20the`20VMS`20differences
  82. V`20to`20the`20original`20`20Unix`20`20code.
  83. X`20`20`20`20`20`20`20`20There`20are`20some`20minor`20patches`20to`20the`20XV
  84. V`20and`20the`20TIFF`20v3.0`20files
  85. X`20`20`20`20`20`20`20`20for`20XV`20to`20work`20properly`20on`20VMS.`20`20You
  86. V`20will`20`20need`20to`20execute`20the
  87. X`20`20`20`20`20`20`20`20XV_FIXUP_VMS.COM`20`20procedure`20`20to`20swap`20in
  88. V`20the`20VMS`20changes`20to`20the
  89. X`20`20`20`20`20`20`20`20source`20code.
  90. X
  91. X`20`20`20`20`20`20`20`20Step`203:
  92. X`20`20`20`20`20`20`20`20`20`20`20`20You`20are`20now`20`20ready`20`20to`20`20bu
  93. Vild`20the`20code.`20`20IF`20you`20DON'T`20have
  94. X`20`20`20`20`20`20`20`20MMS,`20go`20to`20Step`204.
  95. X
  96. X`20`20`20`20`20`20`20`20`20`20`20`20Since`20`20you`20`20have`20`20MMS,`20`20
  97. V`20`20you`20`20`20should`20`20look`20`20through`20`20the
  98. X`20`20`20`20`20`20`20`20DESCRIP.MMS`20file`20to`20check`20for`20`20any`20`20cu
  99. Vstomizing`20changes.`20`20Note
  100. X`20`20`20`20`20`20`20`20specifically`20the`20references`20to`20LZW,`20JPEG`20
  101. V`20and`20`20TIFF.`20`20`20This`20is
  102. X`20`20`20`20`20`20`20`20also`20true`20for`20the`20MAKEFILE.MMS`20in`20the`20
  103. V`20JPEG`20`20sub-directory`20and
  104. X`20`20`20`20`20`20`20`20the`20MAKEFILE.VMS`20file`20in`20the`20TIFF`20sub-dire
  105. Vctory.`20`20`20EXCEPT`20`20for
  106. X`20`20`20`20`20`20`20`20destinations`20of`20the`20binaries`20and`20root`20of
  107. V`20the`20directory`20tree,`20I
  108. X`20`20`20`20`20`20`20`20*think*`20it`20should`20work`20for`20everyone`20withou
  109. Vt`20any`20modifications.
  110. X
  111. X`20`20`20`20`20`20`20`20`20`20`20`20When`20you`20are`20satisfied`20that`20ever
  112. Vything`20is`20correct`20for`20your
  113. X`20`20`20`20`20`20`20`20site,`20just`20type
  114. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
  115. V`20`20`20`20`20`20`20`20`20`20`20`20`20MMS
  116. X`20`20`20`20`20`20`20`20and`20sit`20back`20and`20watch`20XV`20being`20built.
  117. V`20`20`20This`20may`20take`20quite`20a
  118. X`20`20`20`20`20`20`20`20while`20`20depending`20`20on`20`20your`20`20system's
  119. V`20speed/load.`20`20It`20may`20`20also
  120. X`20`20`20`20`20`20`20`20require`20`20that`20`20your`20system`20have`20it's`20v
  121. Virtual`20memory`20increased.
  122. X`20`20`20`20`20`20`20`20If`20you`20`20get`20`20an`20`20error`20message`20of
  123. V`20this`20type,`20see`20a`20system`20guru
  124. X`20`20`20`20`20`20`20`20for`20help!`20`20If`20it`20occurs,`20it`20will`20proba
  125. Vbly`20happen`20with`20the`20TIFF
  126. X`20`20`20`20`20`20`20`20code`20for`20FAX`20support.`20`20`20You`20can`20`20alw
  127. Vays`20undefine`20the`20HAVE_TIFF
  128. X`20`20`20`20`20`20`20`20symbol`20in`20the`20top`20Makefile`20and`20dump`20the
  129. V`20TIFF`20support.
  130. X
  131. X`20`20`20`20`20`20`20`20`20`20`20`20When`20you`20are`20successfully`20finished
  132. V,`20go`20to`20Step`205.
  133. X
  134. X`20`20`20`20`20`20`20`20Step`204:
  135. X`20`20`20`20`20`20`20`20`20`20`20`20If`20`20you`20`20don't`20`20have`20`20MMS
  136. V`20`20you`20`20will`20need`20to`20`20execute`20`20the
  137. X`20`20`20`20`20`20`20`20supplied`20`20command`20`20procedure`20`20to`20`20buil
  138. Vd`20`20the`20`20XV`20package.`20`20You
  139. X`20`20`20`20`20`20`20`20should`20look`20`20through`20`20the`20`20MAKE_XV.COM
  140. V`20`20file`20`20to`20check`20for`20any
  141. X`20`20`20`20`20`20`20`20customizing`20changes.`20`20Note`20specifically`20the
  142. V`20references`20to`20LZW,
  143. X`20`20`20`20`20`20`20`20JPEG,`20and`20TIFF.
  144. X
  145. X`20`20`20`20`20`20`20`20`20`20`20`20When`20you`20are`20satisfied`20that`20your
  146. V`20site`20changes`20are`20correct,
  147. X`20`20`20`20`20`20`20`20execute`20the`20MAKE_XV.COM`20and`20watch`20it`20`20bu
  148. Vild`20`20the`20`20package.`20`20If
  149. X`20`20`20`20`20`20`20`20there`20are`20any`20problems`20you`20will`20want`20to
  150. V`20`20delete`20`20the`20offending
  151. X`20`20`20`20`20`20`20`20.OBJ`20file`20so`20the`20command`20procedure`20will
  152. V`20try`20to`20`20build`20it`20again
  153. X`20`20`20`20`20`20`20`20instead`20of`20skipping`20to`20the`20next`20one.`20
  154. V`20This`20stuff`20`20is`20`20trickier
  155. X`20`20`20`20`20`20`20`20to`20'restart'`20it,`20so`20be`20careful`20if`20you
  156. V`20need`20do.
  157. X
  158. X`20`20`20`20`20`20`20`20Step`205:
  159. X`20`20`20`20`20`20`20`20`20`20`20`20If`20there`20were`20no`20errors,`20`20you
  160. V`20should`20be`20finished`20and`20would
  161. X`20`20`20`20`20`20`20`20just`20need`20to`20execute`20SETUP.COM`20to`20start
  162. V`20viewing`20images!!!
  163. X
  164. X`20`20`20`20`20`20`20`20Step`206:
  165. X
  166. X`20`20`20`20`20`20`20`20`20`20`20`20Send`20John`20Bradley`20a`20short`20note
  167. V`20telling`20him`20you`20love`20his`20XV
  168. X`20`20`20`20`20`20`20`20program`20`20on`20`20VMS`20`20machines.`20`20The`20VMS
  169. V`20part`20is`20crucial!`20`20:)`20This
  170. X`20`20`20`20`20`20`20`20will`20continue`20to`20inspire`20him`20to`20include
  171. V`20up`20to`20date`20VMS`20support
  172. X`20`20`20`20`20`20`20`20'out-of-the-box'`20and`20these`20VMS`20patchings`20can
  173. V`20slowly`20wither`20and
  174. X`20`20`20`20`20`20`20`20go`20away...
  175. X
  176. $ call unpack README.VMS;222 712654772 ""
  177. $!
  178. $ create 'f'
  179. X$!`20A`20VMS`20Command`20procedure`20to`20make`20the`20foreign`20symbol`20defi
  180. Vnitions`20for
  181. X$!`20XV`20programs.`20`20Keep`20this`20command`20proc`20in`20the`20same`20dire
  182. Vctory`20where`20the
  183. X$!`20binaries`20are`20kept`20and`20it`20will`20get`20the`20pointers`20setup
  184. V`20correctly.
  185. X$!
  186. X$`20Write`20Sys$Output`20"SETting`20UP`20XV`20(v`202.21a)..."
  187. X$`20THIS_PATH`20=`20F$Element`20(0,`20"`5D",`20F$Environment`20("PROCEDURE"))
  188. V`20+`20"`5D"
  189. X$`20BGGEN`20`20`20`20`20`20`20`20`20:==`20$`20'THIS_PATH'BGGEN.EXE
  190. X$`20DECOMPRESS`20`20`20`20:==`20$`20'THIS_PATH'DECOMPRESS.EXE
  191. X$`20VDCOMP`20`20`20`20`20`20`20`20:==`20$`20'THIS_PATH'VDCOMP.EXE
  192. X$`20XV`20`20`20`20`20`20`20`20`20`20`20`20:==`20$`20'THIS_PATH'XV.EXE
  193. X$!
  194. X$!`20`20Put`20the`20help`20library`20into`20the`20next`20available`20help`20li
  195. Vbrary`20slot
  196. X$!
  197. X$`20LIB`20=`20"Hlp$Library"
  198. X$`20X`20=`20F$Trnlnm`20(LIB,`20"Lnm$Process")
  199. X$`20If`20X`20.eqs.`20""`20Then`20GoTo`20INSERT
  200. X$`20If`20X`20.eqs.`20"''THIS_PATH'XV.HLB"`20Then`20GoTo`20EXIT
  201. X$`20BASE`20=`20LIB`20+`20"_"
  202. X$`20N`20=`201
  203. X$NEXTLIB:
  204. X$`20`20`20LIB`20:=`20'BASE''N'
  205. X$`20`20`20X`20=`20F$Trnlnm`20(LIB,`20"Lnm$Process")
  206. X$`20`20`20If`20X`20.eqs.`20""`20Then`20GoTo`20INSERT
  207. X$`20`20`20If`20X`20.eqs.`20"''THIS_PATH'XV.HLB"`20Then`20GoTo`20EXIT
  208. X$`20`20`20N`20=`20N`20+`201
  209. X$`20`20`20GoTo`20NEXTLIB
  210. X$INSERT:
  211. X$`20`20`20Define`20'LIB'`20'THIS_PATH'XV.HLB
  212. X$EXIT:
  213. X$`20`20`20Exit
  214. $ call unpack SETUP.COM;222 1497267484 ""
  215. $!
  216. $ create 'f'
  217. X-`201257,`201259
  218. X/
  219. $ call unpack VDCOMP.DIF;222 724051288 ""
  220. $!
  221. $ create 'f'
  222. X***`20vdcomp.c
  223. X---`20old:vdcomp.c
  224. X**************
  225. X***`201254,1262
  226. X`20`20
  227. X`20`20`7B
  228. X`20`20`20`20NODE`20*temp;`20`20`20`20`20`20`20`20`20/*`20Pointer`20to`20the
  229. V`20memory`20block`20*/
  230. X-`20#ifdef`20VMS
  231. X-`20`20`20char`20*malloc();
  232. X-`20#endif
  233. X`20`20
  234. X`20`20`20`20/*****************************************************************
  235. V*******
  236. X`20`20`20`20`20`20Allocate`20the`20memory`20and`20intialize`20the`20fields.
  237. X---`201254,1259`20-----
  238. X`20`20
  239. X`20`20`7B
  240. X`20`20`20`20NODE`20*temp;`20`20`20`20`20`20`20`20`20/*`20Pointer`20to`20the
  241. V`20memory`20block`20*/
  242. X`20`20
  243. X`20`20`20`20/*****************************************************************
  244. V*******
  245. X`20`20`20`20`20`20Allocate`20the`20memory`20and`20intialize`20the`20fields.
  246. X***`20xv.c
  247. X---`20old:xv.c
  248. X**************
  249. X***`20213,219
  250. X`20`20`20`20theImage`20=`20NULL;
  251. X`20`20`20`20LocalCmap`20=`200;
  252. X`20`20`20`20stdinflag`20=`200;
  253. X!`20`20`20autoclose`20=`201;`20
  254. X`20`20`20`20cmapInGam`20=`201;
  255. X`20`20`20`20cmapinstalled`20=`20showzoomcursor`20=`200;
  256. X`20`20
  257. X---`20213,219`20-----
  258. X`20`20`20`20theImage`20=`20NULL;
  259. X`20`20`20`20LocalCmap`20=`200;
  260. X`20`20`20`20stdinflag`20=`200;
  261. X!`20`20`20autoclose`20=`201;
  262. X`20`20`20`20cmapInGam`20=`201;
  263. X`20`20`20`20cmapinstalled`20=`20showzoomcursor`20=`200;
  264. X`20`20
  265. X**************
  266. X***`20422,429
  267. X`20`20`20`20`20`20
  268. X`20`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-close",4))`09/*`20close
  269. V`20*/
  270. X`20`20`20`20`20`20`20`20autoclose`20=`20!autoclose;
  271. X!`20`20`20`20`20
  272. X!`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-cmap",3))`09/*`20ctrlmap
  273. V`20*/
  274. X`20`20`20`20`20`20`20`20ctrlmap++;
  275. X`20`20`20`20`20`20
  276. X`20`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-crop",3))`20`20`20`20`20
  277. V`20`20`20/*`20autocrop`20*/
  278. X---`20422,428`20-----
  279. X`20`20`20`20`20`20
  280. X`20`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-close",4))`09/*`20close
  281. V`20*/
  282. X`20`20`20`20`20`20`20`20autoclose`20=`20!autoclose;
  283. X!`20`20`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-cmap",3))`09/*`20ctrl
  284. Vmap`20*/
  285. X`20`20`20`20`20`20`20`20ctrlmap++;
  286. X`20`20`20`20`20`20
  287. X`20`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-crop",3))`20`20`20`20`20
  288. V`20`20`20/*`20autocrop`20*/
  289. X**************
  290. X***`20924,930
  291. X`20`20`20`20`20`20rwcolor`20=`200;
  292. X`20`20`20`20`7D
  293. X`20`20
  294. X!`20`20`20XSelectInput(theDisp,`20rootW,`20ColormapChangeMask);
  295. X`20`20
  296. X`20`20`20`20/*`20Do`20The`20Thing...`20*/
  297. X`20`20`20`20MainLoop();
  298. X---`20923,929`20-----
  299. X`20`20`20`20`20`20rwcolor`20=`200;
  300. X`20`20`20`20`7D
  301. X`20`20
  302. X!`20/*`20`20XSelectInput(theDisp,`20rootW,`20ColormapChangeMask);`20*/
  303. X`20`20
  304. X`20`20`20`20/*`20Do`20The`20Thing...`20*/
  305. X`20`20`20`20MainLoop();
  306. X**************
  307. X***`201368,1375
  308. X`20`20`20`20`20`20Warning();
  309. X`20`20`20`20`20`20goto`20FAILED;
  310. X`20`20`20`20`7D
  311. X-`20
  312. X-`20`20`20`20`20
  313. X`20`20`20GOTIMAGE:
  314. X`20`20`20`20/*`20successfully`20read`20this`20picture.`20`20No`20failures`20fr
  315. Vom`20here`20on`20out`20*/
  316. X`20`20
  317. X---`201367,1372`20-----
  318. X`20`20`20`20`20`20Warning();
  319. X`20`20`20`20`20`20goto`20FAILED;
  320. X`20`20`20`20`7D
  321. X`20`20`20GOTIMAGE:
  322. X`20`20`20`20/*`20successfully`20read`20this`20picture.`20`20No`20failures`20fr
  323. Vom`20here`20on`20out`20*/
  324. X`20`20
  325. X**************
  326. X***`201424,1430
  327. X`20`20
  328. X`20`20`20`20/*`20expand:`20`20if`20expansion`20is`20negative,`20treat`20it`20a
  329. Vs`20a`20reciprocal`20*/
  330. X`20`20`20`20if`20(expand`20<`200.0)`20`7B`20eWIDE=(int)(pWIDE/-expand);`20`20e
  331. VHIGH=(int)(pHIGH/-expand);`20`7D
  332. X!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE=(int)(pWID
  333. VE*`20expand);`20`20eHIGH=(int)(pHIGH*`20expand);`20`7D
  334. X`20`20
  335. X`20`20`20`20if`20(eWIDE>maxWIDE`20`7C`7C`20eHIGH>maxHIGH)`20`7B
  336. X`20`20`20`20`20`20eWIDE`20=`20eWIDE`20/`20normFact;`20`20eHIGH`20=`20eHIGH`20/
  337. V`20normFact;
  338. X---`201421,1427`20-----
  339. X`20`20
  340. X`20`20`20`20/*`20expand:`20`20if`20expansion`20is`20negative,`20treat`20it`20a
  341. Vs`20a`20reciprocal`20*/
  342. X`20`20`20`20if`20(expand`20<`200.0)`20`7B`20eWIDE=(int)(pWIDE/-expand);`20`20e
  343. VHIGH=(int)(pHIGH/-expand);`20`7D
  344. X!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE=(int)(pWID
  345. VE*expand);`20`20eHIGH=(int)(pHIGH*expand);`20`7D
  346. X`20`20
  347. X`20`20
  348. X`20`20`20`20if`20(eWIDE>maxWIDE`20`7C`7C`20eHIGH>maxHIGH)`20`7B
  349. X**************
  350. X***`201426,1431
  351. X`20`20`20`20if`20(expand`20<`200.0)`20`7B`20eWIDE=(int)(pWIDE/-expand);`20`20e
  352. VHIGH=(int)(pHIGH/-expand);`20`7D
  353. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE=(int)(pW
  354. VIDE*`20expand);`20`20eHIGH=(int)(pHIGH*`20expand);`20`7D
  355. X`20`20
  356. X`20`20`20`20if`20(eWIDE>maxWIDE`20`7C`7C`20eHIGH>maxHIGH)`20`7B
  357. X`20`20`20`20`20`20eWIDE`20=`20eWIDE`20/`20normFact;`20`20eHIGH`20=`20eHIGH`20/
  358. V`20normFact;
  359. X`20`20`20`20`7D
  360. X---`201423,1429`20-----
  361. X`20`20`20`20if`20(expand`20<`200.0)`20`7B`20eWIDE=(int)(pWIDE/-expand);`20`20e
  362. VHIGH=(int)(pHIGH/-expand);`20`7D
  363. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE=(int)(pW
  364. VIDE*expand);`20`20eHIGH=(int)(pHIGH*expand);`20`7D
  365. X`20`20
  366. X+`20
  367. X`20`20`20`20if`20(eWIDE>maxWIDE`20`7C`7C`20eHIGH>maxHIGH)`20`7B
  368. X`20`20`20`20`20`20eWIDE`20=`20eWIDE`20/`20normFact;`20`20eHIGH`20=`20eHIGH`20/
  369. V`20normFact;
  370. X`20`20`20`20`7D
  371. X**************
  372. X***`201441,1447
  373. X`20`20`20`20`20`20/*`20handle`20case`20where`20they`20only`20specified`20width
  374. V`20*or*`20height`20*/
  375. X`20`20`20`20`20`20if`20((`20i`26WidthValue`20`26`26`20`7Ei`26HeightValue)`20
  376. V`7C`7C
  377. X`20`20`09(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20`7B
  378. X-`20
  379. X`20`20`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*
  380. V`20eWIDE)`20/`20pWIDE;`20`7D
  381. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eW
  382. VIDE`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  383. X`20`20
  384. X---`201439,1444`20-----
  385. X`20`20`20`20`20`20/*`20handle`20case`20where`20they`20only`20specified`20width
  386. V`20*or*`20height`20*/
  387. X`20`20`20`20`20`20if`20((`20i`26WidthValue`20`26`26`20`7Ei`26HeightValue)`20
  388. V`7C`7C
  389. X`20`20`09(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20`7B
  390. X`20`20`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*
  391. V`20eWIDE)`20/`20pWIDE;`20`7D
  392. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eW
  393. VIDE`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  394. X`20`20`20`20`20`20`20`20RANGE(eWIDE,1,maxWIDE);`20`20RANGE(eHIGH,1,maxHIGH);
  395. X**************
  396. X***`201444,1450
  397. X`20`20
  398. X`20`20`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*
  399. V`20eWIDE)`20/`20pWIDE;`20`7D
  400. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eW
  401. VIDE`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  402. X-`20
  403. X`20`20`20`20`20`20`20`20RANGE(eWIDE,1,maxWIDE);`20`20RANGE(eHIGH,1,maxHIGH);
  404. X`20`20`20`20`20`20`7D
  405. X`20`20
  406. X---`201441,1446`20-----
  407. X`20`20`09(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20`7B
  408. X`20`20`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*
  409. V`20eWIDE)`20/`20pWIDE;`20`7D
  410. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eW
  411. VIDE`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  412. X`20`20`20`20`20`20`20`20RANGE(eWIDE,1,maxWIDE);`20`20RANGE(eHIGH,1,maxHIGH);
  413. X`20`20`20`20`20`20`7D
  414. X`20`20`20`20`20`20if`20(rootMode`20==`20RM_TILE`20`7C`7C`20rootMode`20==`20RM_
  415. VIMIRROR)`20`7B
  416. X**************
  417. X***`201447,1453
  418. X`20`20
  419. X`20`20`20`20`20`20`20`20RANGE(eWIDE,1,maxWIDE);`20`20RANGE(eHIGH,1,maxHIGH);
  420. X`20`20`20`20`20`20`7D
  421. X-`20
  422. X`20`20`20`20`20`20if`20(rootMode`20==`20RM_TILE`20`7C`7C`20rootMode`20==`20RM_
  423. VIMIRROR)`20`7B
  424. X`20`20`20`20`20`20`20`20/*`20make`20picture`20size`20a`20divisor`20of`20the
  425. V`20rootW`20size.`20`20round`20down`20*/
  426. X`20`20`20`20`20`20`20`20i`20=`20(dispWIDE`20+`20eWIDE-1)`20/`20eWIDE;`20`20
  427. V`20eWIDE`20=`20(dispWIDE`20+`20i-1)`20/`20i;
  428. X---`201443,1448`20-----
  429. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eW
  430. VIDE`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  431. X`20`20`20`20`20`20`20`20RANGE(eWIDE,1,maxWIDE);`20`20RANGE(eHIGH,1,maxHIGH);
  432. X`20`20`20`20`20`20`7D
  433. X`20`20`20`20`20`20if`20(rootMode`20==`20RM_TILE`20`7C`7C`20rootMode`20==`20RM_
  434. VIMIRROR)`20`7B
  435. X`20`20`20`20`20`20`20`20/*`20make`20picture`20size`20a`20divisor`20of`20the
  436. V`20rootW`20size.`20`20round`20down`20*/
  437. X`20`20`20`20`20`20`20`20i`20=`20(dispWIDE`20+`20eWIDE-1)`20/`20eWIDE;`20`20
  438. V`20eWIDE`20=`20(dispWIDE`20+`20i-1)`20/`20i;
  439. X**************
  440. X***`201821,1827
  441. X`20`20
  442. X`20`20`20`20if`20(i`26WidthValue)`20`20eWIDE`20=`20w;
  443. X`20`20`20`20if`20(i`26HeightValue)`20eHIGH`20=`20h;
  444. X-`20
  445. X`20`20`20`20/*`20handle`20case`20where`20they`20only`20specified`20width`20*or
  446. V*`20height`20*/
  447. X`20`20`20`20if`20((`20i`26WidthValue`20`26`26`20`7Ei`26HeightValue)`20`7C`7C
  448. X`20`20`20`20`20`20`20`20(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20
  449. V`7B
  450. X---`201816,1821`20-----
  451. X`20`20
  452. X`20`20`20`20if`20(i`26WidthValue)`20`20eWIDE`20=`20w;
  453. X`20`20`20`20if`20(i`26HeightValue)`20eHIGH`20=`20h;
  454. X`20`20`20`20/*`20handle`20case`20where`20they`20only`20specified`20width`20*or
  455. V*`20height`20*/
  456. X`20`20`20`20if`20((`20i`26WidthValue`20`26`26`20`7Ei`26HeightValue)`20`7C`7C
  457. X`20`20`20`20`20`20`20`20(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20
  458. V`7B
  459. X**************
  460. X***`201825,1831
  461. X`20`20`20`20/*`20handle`20case`20where`20they`20only`20specified`20width`20*or
  462. V*`20height`20*/
  463. X`20`20`20`20if`20((`20i`26WidthValue`20`26`26`20`7Ei`26HeightValue)`20`7C`7C
  464. X`20`20`20`20`20`20`20`20(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20
  465. V`7B
  466. X-`20`20`20`20`20
  467. X`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*`20eWIDE
  468. V)`20/`20pWIDE;`20`7D
  469. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE
  470. V`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  471. X`20`20`20`20`7D
  472. X---`201819,1824`20-----
  473. X`20`20`20`20/*`20handle`20case`20where`20they`20only`20specified`20width`20*or
  474. V*`20height`20*/
  475. X`20`20`20`20if`20((`20i`26WidthValue`20`26`26`20`7Ei`26HeightValue)`20`7C`7C
  476. X`20`20`20`20`20`20`20`20(`7Ei`26WidthValue`20`26`26`20`20i`26HeightValue))`20
  477. V`7B
  478. X`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*`20eWIDE
  479. V)`20/`20pWIDE;`20`7D
  480. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE
  481. V`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  482. X`20`20`20`20`7D
  483. X***`20xvdir.c
  484. X---`20old:xvdir.c
  485. X**************
  486. X***`20531,536
  487. X`20`20`20`20`20`20`20`20/*`20figure`20out`20what`20type`20of`20file`20the`20be
  488. Vastie`20is`20*/
  489. X`20`20`20`20`20`20`20`20fnames`5Bi`5D`5B0`5D`20=`20C_REG;`20`20`20/*`20default
  490. V`20to`20normal`20file,`20if`20stat`20fails`20*/
  491. X`20`20
  492. X`20`20`20`20`20`20`20`20if`20(!nostat`20`26`26`20(stat(fnames`5Bi`5D+1,`20`26s
  493. Vt)==0))`20`7B
  494. X`20`20`09ftype`20=`20st.st_mode`20`26`20S_IFMT;`20`20`20/*`20mask`20off`20unin
  495. Vteresting`20bits`20*/
  496. X`20`20`09if`20`20`20`20`20`20(ftype`20==`20S_IFDIR)`20`20fnames`5Bi`5D`5B0`5D
  497. V`20=`20C_DIR;
  498. X---`20531,543`20-----
  499. X`20`20`20`20`20`20`20`20/*`20figure`20out`20what`20type`20of`20file`20the`20be
  500. Vastie`20is`20*/
  501. X`20`20`20`20`20`20`20`20fnames`5Bi`5D`5B0`5D`20=`20C_REG;`20`20`20/*`20default
  502. V`20to`20normal`20file,`20if`20stat`20fails`20*/
  503. X`20`20
  504. X+`20#ifdef`20VMS
  505. X+`20/*`20For`20VMS`20we`20will`20default`20all`20files`20EXCEPT`20directories
  506. V`20to`20avoid
  507. X+`20`20`20`20the`20high`20cost`20of`20the`20VAXC`20implementation`20of`20the
  508. V`20stat`20function.
  509. X+`20`20`20`20`20`20`20`20`20`20`20`20`20Suggested`20by`20Kevin`20Oberman`20(OB
  510. VERMAN@icdc.llnl.gov)`20*/
  511. X+`20
  512. X+`20`20`20`20`20`20`20if`20(strstr`20(fnames`5Bi`5D+1,`20".DIR")`20!=`20NULL)
  513. V`20fnames`5Bi`5D`5B0`5D`20=`20C_DIR;
  514. X+`20#else
  515. X`20`20`20`20`20`20`20`20if`20(!nostat`20`26`26`20(stat(fnames`5Bi`5D+1,`20`26s
  516. Vt)==0))`20`7B
  517. X`20`20`09ftype`20=`20st.st_mode`20`26`20S_IFMT;`20`20`20/*`20mask`20off`20unin
  518. Vteresting`20bits`20*/
  519. X`20`20`09if`20`20`20`20`20`20(ftype`20==`20S_IFDIR)`20`20fnames`5Bi`5D`5B0`5D
  520. V`20=`20C_DIR;
  521. X**************
  522. X***`20553,558
  523. X`20`20`09/*`20fprintf(stderr,"problems`20'stat-ing'`20files\n");*/
  524. X`20`20`09fnames`5Bi`5D`5B0`5D`20=`20C_REG;
  525. X`20`20`20`20`20`20`20`20`7D
  526. X`20`20`20`20`20`20`20`20i++;
  527. X`20`20`20`20`20`20`7D
  528. X`20`20`20`20`7D
  529. X---`20560,566`20-----
  530. X`20`20`09/*`20fprintf(stderr,"problems`20'stat-ing'`20files\n");*/
  531. X`20`20`09fnames`5Bi`5D`5B0`5D`20=`20C_REG;
  532. X`20`20`20`20`20`20`20`20`7D
  533. X+`20#endif`20/*`20VMS`20*/
  534. X`20`20`20`20`20`20`20`20i++;
  535. X`20`20`20`20`20`20`7D
  536. X`20`20`20`20`7D
  537. X***`20xvevent.c
  538. X---`20old:xvevent.c
  539. X**************
  540. X***`201111,1117
  541. X`20`20`09`20`20`20`20xwa->border_width);
  542. X`20`20`20`20`7D
  543. X`20`20
  544. X!`20#ifdef`20DXWM`20`20/*`20dxwm`20seems`20to`20*only*`20pay`20attention`20to
  545. V`20the`20hints`20*/
  546. X`20`20`20`20`7B
  547. X`20`20`20`20`20`20XSizeHints`20hints;
  548. X`20`20`20`20`20`20if`20(DEBUG)`20fprintf(stderr,"SWP:`20doing`20the`20DXWM`20t
  549. Vhing\n");
  550. X---`201111,1119`20-----
  551. X`20`20`09`20`20`20`20xwa->border_width);
  552. X`20`20`20`20`7D
  553. X`20`20
  554. X!`20/*`20Added`20by`20RLD`20to`20activate`20sizing`20buttons`20for`20VMS`201-M
  555. VAY-1992
  556. X!`20`20`20`20Though`20it`20still`20has`20the`20'creeping'`20window`20problem
  557. V`20*/
  558. X!`20#if`20defined(DXWM)`20`7C`7C`20defined(VMS)`20/*`20dxwm`20seems`20to`20*on
  559. Vly*`20pay`20attention`20to`20the`20hints`20*/
  560. X`20`20`20`20`7B
  561. X`20`20`20`20`20`20XSizeHints`20hints;
  562. X`20`20`20`20`20`20if`20(DEBUG)`20fprintf(stderr,"SWP:`20doing`20the`20DXWM`20t
  563. Vhing\n");
  564. X**************
  565. X***`201123,1128
  566. X`20`20`20`20`20`20`20`20XSetNormalHints(theDisp,`20mainW,`20`26hints);
  567. X`20`20`20`20`20`20`7D
  568. X`20`20
  569. X`20`20`20`20`20`20xwc.x`20-=`205;`20`20`20xwc.y`20-=`2025;`20`20`20`20/*`20EVI
  570. VL`20KLUDGE`20*/
  571. X`20`20`20`20`7D
  572. X`20`20#endif
  573. X---`201125,1131`20-----
  574. X`20`20`20`20`20`20`20`20XSetNormalHints(theDisp,`20mainW,`20`26hints);
  575. X`20`20`20`20`20`20`7D
  576. X`20`20
  577. X+`20#ifndef`20MWM`20/*`20don't`20do`20this`20for`20DEC's`20Motif`20Window`20Ma
  578. Vnager`20*/
  579. X`20`20`20`20`20`20xwc.x`20-=`205;`20`20`20xwc.y`20-=`2025;`20`20`20`20/*`20EVI
  580. VL`20KLUDGE`20*/
  581. X`20`20#endif`20/*`20MWM`20*/
  582. X`20`20`20`20`7D
  583. X**************
  584. X***`201124,1129
  585. X`20`20`20`20`20`20`7D
  586. X`20`20
  587. X`20`20`20`20`20`20xwc.x`20-=`205;`20`20`20xwc.y`20-=`2025;`20`20`20`20/*`20EVI
  588. VL`20KLUDGE`20*/
  589. X`20`20`20`20`7D
  590. X`20`20#endif
  591. X`20`20
  592. X---`201127,1133`20-----
  593. X`20`20
  594. X`20`20#ifndef`20MWM`20/*`20don't`20do`20this`20for`20DEC's`20Motif`20Window
  595. V`20Manager`20*/
  596. X`20`20`20`20`20`20xwc.x`20-=`205;`20`20`20xwc.y`20-=`2025;`20`20`20`20/*`20EVI
  597. VL`20KLUDGE`20*/
  598. X+`20#endif`20/*`20MWM`20*/
  599. X`20`20`20`20`7D
  600. X`20`20#endif
  601. X`20`20
  602. X***`20xvgif.c
  603. X---`20old:xvgif.c
  604. X**************
  605. X***`20130,135
  606. X`20`20#ifdef`20VMS
  607. X`20`20`20`20int`20status,`20gif_fget_counted(),`20ii;
  608. X`20`20`20`20char`20vms_name`5B256`5D;
  609. X`20`20`20`20typedef`20struct`20`7B
  610. X`20`20`20`20`20`20unsigned`20char`20*pos,`20*start,`20*end;`09/*`20file`20posi
  611. Vtions`20*/
  612. X`20`20`20`20`20`20int`20chan,`20size;
  613. X---`20130,136`20-----
  614. X`20`20#ifdef`20VMS
  615. X`20`20`20`20int`20status,`20gif_fget_counted(),`20ii;
  616. X`20`20`20`20char`20vms_name`5B256`5D;
  617. X+`20`20`20unsigned`20char`20*final_out=NULL;`09/*`20final`20output`20pointer
  618. V`20*/
  619. X`20`20`20`20typedef`20struct`20`7B
  620. X`20`20`20`20`20`20unsigned`20char`20*pos,`20*start,`20*end;`09/*`20file`20posi
  621. Vtions`20*/
  622. X`20`20`20`20`20`20int`20chan,`20size;
  623. X**************
  624. X***`20405,411
  625. X`20`20`20`20if`20(!pic)`20
  626. X`20`20`20`20`20`20return(`20GifError("not`20enough`20memory`20for`20'pic'")
  627. V`20);
  628. X`20`20`20`20if`20(`20!Interlace`20)
  629. X!`20`20`20`20`20status`20=`20GIF_DECOMPRESS`20(`20gif_fget_counted,`20map,`20m
  630. Vaxpixels,`20picptr`20);
  631. X`20`20`20`20else`20`7B
  632. X`20`20`20`20`20`20/*`20decompress`20a`20line`20at`20a`20time`20into`20the`20pr
  633. Voper`20position.`20*/
  634. X`20`20`20`20`20`20int`20pass,`20step,`20i,`20y;
  635. X---`20406,413`20-----
  636. X`20`20`20`20if`20(!pic)`20
  637. X`20`20`20`20`20`20return(`20GifError("not`20enough`20memory`20for`20'pic'")
  638. V`20);
  639. X`20`20`20`20if`20(`20!Interlace`20)
  640. X!`20`20`20`20`20`20`20status`20=`20GIF_DECOMPRESS
  641. X!`20`09(`20gif_fget_counted,`20map,`20maxpixels,`20picptr,`20`26final_out`20);
  642. V
  643. X`20`20`20`20else`20`7B
  644. X`20`20`20`20`20`20/*`20decompress`20a`20line`20at`20a`20time`20into`20the`20pr
  645. Voper`20position.`20*/
  646. X`20`20`20`20`20`20int`20pass,`20step,`20i,`20y;
  647. X**************
  648. X***`20432,438
  649. X`20`20`09`20`20`20`20"Error`20decompressing`20data.`20`20Winging`20it.");
  650. X`20`20`20`20`20`20sprintf`20(`20msg,`20"Error`20decompressing`20data,`20code
  651. V`20%d,`20start:`20%x,`20pos:`20%x",
  652. X`20`20`09`20`20`20`20`20status,`20map->start,`20map->pos`20);
  653. X!`20`20`20`20`20return(`20GifError(msg)`20);
  654. X`20`20`20`20`7D
  655. X`20`20
  656. X`20`20#else`20`20/*`20!VMS`20*/
  657. X---`20434,443`20-----
  658. X`20`20`09`20`20`20`20"Error`20decompressing`20data.`20`20Winging`20it.");
  659. X`20`20`20`20`20`20sprintf`20(`20msg,`20"Error`20decompressing`20data,`20code
  660. V`20%d,`20start:`20%x,`20pos:`20%x",
  661. X`20`20`09`20`20`20`20`20status,`20map->start,`20map->pos`20);
  662. X!`20`20`20`20`20`20`20/*`20Zero`20rest`20of`20array`20*/
  663. X!`20`20`20`20`20`20`20if`20(`20final_out`20!=`20NULL`20)
  664. X!`20`09`09while`20(`20final_out`20<`20`26picptr`5BHeight*Width`5D`20)`20*final
  665. V_out++`20=`200;
  666. X!`20`20`20`20`20`20return(`20GifError(msg)*0`20);
  667. X`20`20`20`20`7D
  668. X`20`20
  669. X`20`20#else`20`20/*`20!VMS`20*/
  670. X***`20xvjpeg.c
  671. X---`20old:xvjpeg.c
  672. X**************
  673. X***`20556,561
  674. X`20`20
  675. X`20`20`20`20/*`20Set`20up`20the`20input`20file`20*/
  676. X`20`20
  677. X`20`20`20`20if`20((cinfo.input_file`20=`20fopen(fname,`20"r"))`20==`20NULL)
  678. V`20return`201;
  679. X`20`20
  680. X`20`20`20`20/*`20figure`20out`20the`20file`20size`20(for`20Informational`20Pur
  681. Vposes`20Only)`20*/
  682. X---`20556,564`20-----
  683. X`20`20
  684. X`20`20`20`20/*`20Set`20up`20the`20input`20file`20*/
  685. X`20`20
  686. X+`20#ifdef`20VMS
  687. X+`20`20`20if`20((cinfo.input_file`20=`20fopen(fname,`20"r",`20"ctx=stm"))`20==
  688. V`20NULL)`20return`201;
  689. X+`20#else
  690. X`20`20`20`20if`20((cinfo.input_file`20=`20fopen(fname,`20"r"))`20==`20NULL)
  691. V`20return`201;
  692. X`20`20#endif
  693. X`20`20
  694. X**************
  695. X***`20557,562
  696. X`20`20`20`20/*`20Set`20up`20the`20input`20file`20*/
  697. X`20`20
  698. X`20`20`20`20if`20((cinfo.input_file`20=`20fopen(fname,`20"r"))`20==`20NULL)
  699. V`20return`201;
  700. X`20`20
  701. X`20`20`20`20/*`20figure`20out`20the`20file`20size`20(for`20Informational`20Pur
  702. Vposes`20Only)`20*/
  703. X`20`20`20`20fseek(cinfo.input_file,`200L,`202);
  704. X---`20560,566`20-----
  705. X`20`20`20`20if`20((cinfo.input_file`20=`20fopen(fname,`20"r",`20"ctx=stm"))
  706. V`20==`20NULL)`20return`201;
  707. X`20`20#else
  708. X`20`20`20`20if`20((cinfo.input_file`20=`20fopen(fname,`20"r"))`20==`20NULL)
  709. V`20return`201;
  710. X+`20#endif
  711. X`20`20
  712. X`20`20`20`20/*`20figure`20out`20the`20file`20size`20(for`20Informational`20Pur
  713. Vposes`20Only)`20*/
  714. X`20`20`20`20fseek(cinfo.input_file,`200L,`202);
  715. X***`20xvmisc.c
  716. X---`20old:xvmisc.c
  717. X**************
  718. X***`20226,248
  719. X`20`20
  720. X`20`20
  721. X`20`20/***********************************/
  722. X-`20void`20xvDestroyImage(image)
  723. X-`20`20`20`20`20`20XImage`20*image;
  724. X-`20`7B
  725. X-`20`20`20/*`20called`20in`20place`20of`20XDestroyImage().`20`20Explicitly`20d
  726. Vestroys`20*BOTH*`20the
  727. X-`20`20`20`20`20`20data`20and`20the`20structure.`20`20XDestroyImage()`20doesn'
  728. Vt`20seem`20to`20do`20this`20on`20all
  729. X-`20`20`20`20`20`20systems.`20`20Also,`20can`20be`20called`20with`20a`20NULL
  730. V`20image`20pointer`20*/
  731. X-`20
  732. X-`20`20`20if`20(image)`20`7B
  733. X-`20`20`20`20`20/*`20free`20data`20by`20hand,`20since`20XDestroyImage`20is`20v
  734. Vague`20about`20it`20*/
  735. X-`20`20`20`20`20if`20(image->data)`20free(image->data);
  736. X-`20`20`20`20`20image->data`20=`20NULL;
  737. X-`20`20`20`20`20XDestroyImage(image);
  738. X-`20`20`20`7D
  739. X-`20`7D
  740. X-`20
  741. X-`20
  742. X-`20/***********************************/
  743. X`20`20void`20DimRect(win,`20x,`20y,`20w,`20h,`20bg)
  744. X`20`20Window`20win;
  745. X`20`20int`20x,y,w,h;
  746. X---`20226,231`20-----
  747. X`20`20
  748. X`20`20
  749. X`20`20/***********************************/
  750. X`20`20void`20DimRect(win,`20x,`20y,`20w,`20h,`20bg)
  751. X`20`20Window`20win;
  752. X`20`20int`20x,y,w,h;
  753. X**************
  754. X***`20256,261
  755. X`20`20`20`20XSetForeground(theDisp,`20theGC,`20bg);
  756. X`20`20`20`20XFillRectangle(theDisp,win,theGC,x,y,w,h);
  757. X`20`20`20`20XSetFillStyle(theDisp,`20theGC,`20FillSolid);
  758. X`20`20`7D
  759. X`20`20
  760. X`20`20
  761. X---`20239,258`20-----
  762. X`20`20`20`20XSetForeground(theDisp,`20theGC,`20bg);
  763. X`20`20`20`20XFillRectangle(theDisp,win,theGC,x,y,w,h);
  764. X`20`20`20`20XSetFillStyle(theDisp,`20theGC,`20FillSolid);
  765. X+`20`7D
  766. X+`20/***********************************/
  767. X+`20void`20xvDestroyImage(image)
  768. X+`20`20`20`20`20`20XImage`20*image;
  769. X+`20`7B
  770. X+`20`20`20/*`20called`20in`20place`20of`20XDestroyImage().`20`20Explicitly`20d
  771. Vestroys`20*BOTH*`20the
  772. X+`20`20`20`20`20`20data`20and`20the`20structure.`20`20XDestroyImage()`20doesn'
  773. Vt`20seem`20to`20do`20this`20on`20all
  774. X+`20`20`20`20`20`20systems.`20`20Also,`20can`20be`20called`20with`20a`20NULL
  775. V`20image`20pointer`20*/
  776. X+`20`20`20if`20(image)`20`7B
  777. X+`20`20`20`20`20/*`20free`20data`20by`20hand,`20since`20XDestroyImage`20is`20v
  778. Vague`20about`20it`20*/
  779. X+`20`20`20`20`20if`20(image->data)`20free(image->data);
  780. X+`20`20`20`20`20image->data`20=`20NULL;
  781. X+`20`20`20`20`20XDestroyImage(image);
  782. X+`20`20`20`7D
  783. X`20`20`7D
  784. X`20`20
  785. X`20`20
  786. $ call unpack XV-221_VMS.DIFF;222 489489466 ""
  787. $!
  788. $ create 'f'
  789. X-`20`20216,`20`20216
  790. X`20`20autoclose`20=`201;
  791. X-`20`20425,`20`20426
  792. X`20`20`20`20`20`20else`20if`20(!argcmp(argv`5Bi`5D,"-cmap",3))`09/*`20ctrlmap
  793. V`20*/
  794. X-`20`20927,`20`20927
  795. X</*`20`20XSelectInput(theDisp,`20rootW,`20ColormapChangeMask);`20*/
  796. X-`201371,`201372
  797. X-`201427,`201427
  798. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE=(int)(pWIDE*ex
  799. Vpand);`20`20eHIGH=(int)(pHIGH*expand);`20`7D
  800. X
  801. X-`201444,`201450
  802. X`20`20`20`20`20`20if`20(i`26WidthValue)`20`7B`20eHIGH`20=`20(pHIGH`20*`20eWIDE
  803. V)`20/`20pWIDE;`20`7D
  804. X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20else`20`7B`20eWIDE
  805. V`20=`20(pWIDE`20*`20eHIGH)`20/`20pHIGH;`20`7D
  806. X`20`20`20`20`20`20RANGE(eWIDE,1,maxWIDE);`20`20RANGE(eHIGH,1,maxHIGH);
  807. X`20`20`20`20`7D
  808. X-`201824,`201824
  809. X-`201828,`201828
  810. X/
  811. $ call unpack XV.DIF;222 1212230393 ""
  812. $!
  813. $ create 'f'
  814. X1`20XV
  815. X`20`20`20`20`20`20`20`20An`20interactive`20`20image`20`20display`20for`20the
  816. V`20X`20Window`20System.`20`20XV`20is
  817. X`20`20`20`20an`20X11`20program`20that`20displays`20images`20in`20the`20GIF,
  818. V`20PBM,`20PGM,`20PPM,`20X11
  819. X`20`20`20`20bitmap,`20JPEG,`20TIFF,`20Sun`20`20Rastefile,`20RLE,`20and`20PM
  820. V`20formats`20on`201-,`204-,
  821. X`20`20`20`206-,`208-,`2016-,`2024-,`20and`20`2032-bit`20`20X`20`20displays.
  822. V`20`20`20`20xv`20`20will`20`20also`20read
  823. X`20`20`20`20compress-ed`20versions`20of`20these`20files.
  824. X
  825. X`20`20`20`20NOTE:`20`20This`20`20`20man`20`20page`20`20is`20`20merely`20`20the
  826. V`20`20text`20`20portion`20`20of`20`20`20`20the
  827. X`20`20`20`20(PostScript)`20`20XV`20`20docs,`20`20without`20`20the`20`20figures
  828. V,`20`20and`20`20without`20`20the
  829. X`20`20`20`20appendicies.`20`20`20As`20such,`20it`20is`20highly`20recommended
  830. V`20that`20you`20get`20your
  831. X`20`20`20`20hands`20on`20the`20*real*`20documentation.
  832. X
  833. X`20`20`20`20`20`20`20`20Execution`20Format:
  834. X`20`20`20`20`20`20`20`20`20`20`20`20xv`20`5Boptions`5D`20`5Bfilename`20`5Bfile
  835. Vname`20...`5D`5D
  836. X
  837. X
  838. X2`20OVERVIEW
  839. X`20`20`20`20`20`20`20`20XV`20lets`20you`20do`20a`20large`20number`20of`20thing
  840. Vs`20(many`20of`20them`20actually
  841. X`20`20`20`20useful),`20including,`20but`20not`20limited`20to,`20the`20followin
  842. Vg:
  843. X`20`20`20`20
  844. X`20`20`20`20`20`20`20`20o`20display`20an`20image`20in`20a`20window`20on`20the
  845. V`20screen
  846. X`20`20`20`20`20`20`20`20o`20display`20an`20image`20on`20the`20root`20window,
  847. V`20in`20a`20variety`20of`20styles
  848. X`20`20`20`20`20`20`20`20o`20grab`20any`20rectangular`20portion`20of`20the`20sc
  849. Vreen`20and`20turn`20it`20into
  850. X`20`20`20`20`20`20`20`20`20`20an`20image
  851. X`20`20`20`20`20`20`20`20o`20arbitrarily`20stretch`20or`20compress`20the`20imag
  852. Ve
  853. X`20`20`20`20`20`20`20`20o`20rotate`20the`20image`20in`2090--degree`20steps
  854. X`20`20`20`20`20`20`20`20o`20flip`20the`20image`20around`20the`20horizontal`20o
  855. Vr`20vertical`20axes
  856. X`20`20`20`20`20`20`20`20o`20crop`20a`20rectangular`20portion`20of`20the`20imag
  857. Ve
  858. X`20`20`20`20`20`20`20`20o`20magnify`20any`20portion`20of`20`20the`20`20image
  859. V`20`20by`20any`20amount,`20up`20to`20the
  860. X`20`20`20`20`20`20`20`20`20`20size`20of`20the`20screen
  861. X`20`20`20`20`20`20`20`20o`20determine`20pixel`20values`20and`20x,y`20coordinat
  862. Ves`20in`20the`20image
  863. X`20`20`20`20`20`20`20`20o`20adjust`20image`20brightness`20and`20contrast`20wit
  864. Vh`20a`20gamma`20correction
  865. X`20`20`20`20`20`20`20`20`20`20function
  866. X`20`20`20`20`20`20`20`20o`20apply`20different`20gamma`20functions`20`20to`20th
  867. Ve`20Red,`20Green,`20and`20Blue
  868. X`20`20`20`20`20`20`20`20`20`20color`20components,`20to`20correct`20for`20non-l
  869. Vinear`20color`20response
  870. X`20`20`20`20`20`20`20`20o`20adjust`20global`20image`20saturation
  871. X`20`20`20`20`20`20`20`20o`20perform`20global`20hue`20remapping
  872. X`20`20`20`20`20`20`20`20o`20edit`20an`20image's`20colormap
  873. X`20`20`20`20`20`20`20`20o`20reduce`20the`20number`20of`20colors`20in`20an`20im
  874. Vage
  875. X`20`20`20`20`20`20`20`20o`20dither`20in`20color`20and`20b`26w
  876. X`20`20`20`20`20`20`20`20o`20smooth`20an`20image
  877. X`20`20`20`20`20`20`20`20o`20crop`20off`20solid`20borders`20automatically
  878. X`20`20`20`20`20`20`20`20o`20convert`20image`20formats
  879. X`20`20`20`20`20`20`20`20o`20generate`20Encapsulated`20PostScript
  880. X
  881. X`20`20`20`20`20`20`20`20Unfortunately`20the`20Automatic`20Checkbook`20`20Balan
  882. Vcing`20`20Module`20still
  883. X`20`20`20`20isn't`20`20completely`20`20debugged,`20`20and`20`20is`20`20`20`20n
  884. Vot`20`20`20`20included`20`20in`20`20this
  885. X`20`20`20`20distribution.`20
  886. X
  887. X2`20Starting_XV
  888. X`20`20`20`20`20`20`20`20NOTE:`20Unless`20`20explicitly`20`20stated`20`20otherw
  889. Vise,`20the`20term`20`20"click"
  890. X`20`20`20`20means`20"click`20with`20the`20Left`20mouse`20button."
  891. X
  892. X`20`20`20`20`20`20`20`20Start`20the`20program`20up`20by`20typing`20'xv'.`20
  893. V`20`20`20After`20a`20short`20delay,`20a
  894. X`20`20`20`20window`20will`20appear`20with`20the`20default`20image`20(the`20
  895. V`20XV`20`20logo,`20`20credits
  896. X`20`20`20`20and`20revision`20date)`20displayed`20in`20it.`20`20If`20you`20chan
  897. Vge`20the`20size`20of`20the
  898. X`20`20`20`20window`20`20(using`20`20whatever`20method`20your`20window`20manage
  899. Vr`20provides),`20the
  900. X`20`20`20`20image`20will`20be`20automatically`20stretched`20to`20fit`20the`20w
  901. Vindow.
  902. X
  903. X2`20Options
  904. X`20`20`20`20`20`20`20`20XV`20supports`20`20literally`20`20dozens`20of`20comman
  905. Vd`20line`20options`20and`20X11
  906. X`20`20`20`20resources.`20`20Fortunately,`20`20it`20`20is`20doubtful`20that`20y
  907. Vou'll`20ever`20need`20to
  908. X`20`20`20`20use`20more`20than`20a`20`20small`20few.`20`20The`20rest`20are`20pr
  909. Vovided`20mainly`20for`20that
  910. X`20`20`20`20'one`20special`20case'`20application`20of`20XV`20...
  911. X
  912. X`20`20`20`20`20`20`20`20If`20you`20start`20XV`20with`20`20the`20command`20'xv
  913. V`20-help',`20the`20current`20list
  914. X`20`20`20`20of`20options`20will`20be`20displayed:
  915. X`20`20`20`20
  916. X`20`20`20`20`20`20`20xv`20`5B-`5D`20`5B-2xlimit`5D`20`20`5B-aspect`20`20w:h
  917. V`5D`20`5B-best24`5D`20`5B-bg`20color`5D`20`5B-black
  918. X`20`20`20`20`20`20`20`20`20`20color`5D`20`5B-browse`5D`20`5B-bw`20width`5D`20
  919. V`20`5B-cecmap`5D`20`20`5B-cegeometry`20`20geom`5D
  920. X`20`20`20`20`20`20`20`20`20`20`5B-cemap`5D`20`5B-cgeometry`20geom`5D`20`5B-cle
  921. Var`5D`20`5B-cmap`5D`20`20`5B-cursor`20char#`5D
  922. X`20`20`20`20`20`20`20`20`20`20`5B-DEBUG`20level`5D`20`5B-display`20disp`5D`20
  923. V`5B-dither`5D`20`5B-expand`20`20exp`5D`20`5B-fg
  924. X`20`20`20`20`20`20`20`20`20`20color`5D`20`5B-fixed`5D`20`5B-geometry`20geom
  925. V`5D`20`5B-help`5D`20`5B-hi`20color`5D`20`20`5B-hsv`5D
  926. X`20`20`20`20`20`20`20`20`20`20`5B-igeometry`20`20geom`5D`20`20`20`20`5B-imap
  927. V`5D`20`20`20`20`5B-keeparound`5D`20`20`5B-lo`20`20color`5D
  928. X`20`20`20`20`20`20`20`20`20`20`5B-loadclear`5D`20`5B-max`5D`20`5B-maxpect`5D
  929. V`20`5B-mono`5D`20`5B-ncols`20#`5D`20`5B-nglobal`5D
  930. X`20`20`20`20`20`20`20`20`20`20`5B-ninstall`5D`20`5B-nolimits`5D`20`5B-nopos
  931. V`5D`20`5B-noqcheck`5D`20`20`5B-noresetroot`5D
  932. X`20`20`20`20`20`20`20`20`20`20`5B-nostat`5D`20`20`5B-owncmap`5D`20`20`5B-perfe
  933. Vct`5D`20`20`5B-quick24`5D`20`5B-quit`5D`20`20`5B-rbg
  934. X`20`20`20`20`20`20`20`20`20`20color`5D`20`5B-rfg`20color`5D`20`5B-rgb`5D`20
  935. V`5B-rmode`20#`5D`20`20`5B-root`5D`20`20`5B-rv`5D`20`20`5B-rw`5D
  936. X`20`20`20`20`20`20`20`20`20`20`5B-slow24`5D`20`20`5B-smooth`5D`20`20`5B-visual
  937. V`20type`5D`20`5B-wait`20seconds`5D`20`5B-white
  938. X`20`20`20`20`20`20`20`20`20`20color`5D`20`5B-wloop`5D`20`5Bfilename`20...`5D
  939. X
  940. X3`20General_Options
  941. X`20`20`20`20`20`20`20-help
  942. X`20`20`20`20`20`20`20`20Print`20`20usage`20`20instructions,`20`20`20listing
  943. V`20`20the`20`20current`20`20available
  944. X`20`20`20`20`20`20`20`20command-line`20options.`20`20Any`20unrecognized`20opti
  945. Von`20will`20do`20this`20as
  946. X`20`20`20`20`20`20`20`20well.
  947. X
  948. X`20`20`20`20`20`20`20`20-display`20`20disp
  949. X`20`20`20`20`20`20`20`20Specifies`20the`20display`20that`20XV`20`20should`20
  950. V`20attempt`20`20to`20connect`20to.
  951. X`20`20`20`20`20`20`20`20If`20you`20don't`20specify`20a`20display,`20`20XV`20
  952. V`20will`20`20use`20the`20environment
  953. X`20`20`20`20`20`20`20`20variable`20$DISPLAY.
  954. X
  955. X`20`20`20`20`20`20`20`20-fg`20`20color`20(Resource`20name:`20foreground`20`20s
  956. Vtring)
  957. X`20`20`20`20`20`20`20`20Sets`20the`20foreground`20color`20used`20by`20the`20wi
  958. Vndows.
  959. X
  960. X`20`20`20`20`20`20`20`20-bg`20`20color`20`20`20(Resource`20name:`20background
  961. V`20`20string)
  962. X`20`20`20`20`20`20`20`20Sets`20the`20background`20color`20used`20by`20the`20wi
  963. Vndows.
  964. X
  965. X`20`20`20`20`20`20`20`20-hi`20`20color`20`20(Resource`20name:`20highlight`20
  966. V`20string)
  967. X`20`20`20`20`20`20`20`20Sets`20the`20highlight`20color`20used`20for`20the`20
  968. V`20top-left`20`20edges`20`20of`20the
  969. X`20`20`20`20`20`20`20`20control`20buttons.
  970. X
  971. X`20`20`20`20`20`20`20`20-lo`20`20color`20(Resource`20name:`20lowlight`20`20str
  972. Ving)
  973. X`20`20`20`20`20`20`20`20Sets`20the`20lowlight`20color`20used`20for`20the`20bot
  974. Vtom-right`20edges`20of`20the
  975. X`20`20`20`20`20`20`20`20control`20buttons,`20and`20also`20the`20background`20o
  976. Vf`20some`20windows.
  977. X
  978. X`20`20`20`20`20`20`20`20-bw`20`20bwidth`20(Resource`20name:`20borderWidth`20
  979. V`20integer)
  980. X`20`20`20`20`20`20`20`20Sets`20`20the`20`20width`20of`20the`20border`20on`20th
  981. Ve`20windows.`20`20`20`20Your`20`20window
  982. X`20`20`20`20`20`20`20`20manager`20may`20choose`20to`20ignore`20this,`20however
  983. V.
  984. X
  985. X3`20Image_Sizing_Options
  986. X`20`20`20`20`20`20`20`20-geometry`20geom`20(Resource`20name:`20geometry`20stri
  987. Vng)
  988. X`20`20`20`20`20`20`20`20Lets`20you`20specify`20the`20size`20and`20placement
  989. V`20of`20the`20'image'`20window.
  990. X`20`20`20`20`20`20`20`20It's`20most`20useful`20when`20you`20only`20specify`20a
  991. V`20`20position,`20and`20let`20XV
  992. X`20`20`20`20`20`20`20`20choose`20`20the`20`20size.`20`20If`20you`20specify`20a
  993. V`20size`20`20as`20`20well,`20`20XV`20`20will
  994. X`20`20`20`20`20`20`20`20create`20a`20window`20of`20that`20size,`20unless`20-fi
  995. Vxed`20is`20specified.`20`20The
  996. X`20`20`20`20`20`20`20`20geom`20`20argument`20`20is`20`20in`20the`20form`20of
  997. V`20a`20normal`20X`20geometry`20`20string
  998. X`20`20`20`20`20`20`20`20(e.g.`20`20`60`60300x240''`20or`20`60`60+10+10''`20or
  999. V`20`60`60400x300+10+10'').
  1000. X
  1001. X`20`20`20`20`20`20`20`20-fixed`20`20(Resource`20name:`20fixed`20`20boolean)
  1002. X`20`20`20`20`20`20`20`20Only`20used`20`20in`20`20conjunction`20`20with`20the
  1003. V`20-geometry`20option.`20`20If`20you
  1004. X`20`20`20`20`20`20`20`20specify`20a`20window`20`20size`20`20with`20`20the`20
  1005. V`20-geometry`20`20option,`20`20XV`20will
  1006. X`20`20`20`20`20`20`20`20normally`20stretch`20the`20picture`20`20to`20`20exactl
  1007. Vy`20`20that`20size.`20`20This`20is
  1008. X`20`20`20`20`20`20`20`20not`20always`20desirable,`20as`20it`20`20may`20`20seri
  1009. Vously`20distort`20the`20aspect
  1010. X`20`20`20`20`20`20`20`20ratio`20of`20the`20picture.`20`20Specifying`20`20the
  1011. V`20`20-fixed`20option`20corrects
  1012. X`20`20`20`20`20`20`20`20this`20behavior`20by`20instructing`20XV`20to`20use`20
  1013. V`20the`20specified`20geometry
  1014. X`20`20`20`20`20`20`20`20size`20as`20a`20maximum`20window`20size.`20`20It`20wil
  1015. Vl,`20however,`20preserve`20the
  1016. X`20`20`20`20`20`20`20`20original`20aspect`20ratio`20of`20the`20picture.
  1017. X
  1018. X`20`20`20`20`20`20`20`20For`20example,`20if`20you`20give`20a`20rectangular`20g
  1019. Veometry`20of`20`20'320x240',
  1020. X`20`20`20`20`20`20`20`20and`20`20you`20`20try`20`20to`20`20display`20`20a`20
  1021. V`20square`20picture`20with`20a`20`20size`20`20of
  1022. X`20`20`20`20`20`20`20`20'256x256',`20the`20window`20opened`20will`20actually
  1023. V`20be`20'240x240',`20which
  1024. X`20`20`20`20`20`20`20`20is`20`20the`20largest`20`20square`20`20that`20`20still
  1025. V`20`20fits`20`20in`20`20the`20`20'320x240'
  1026. X`20`20`20`20`20`20`20`20rectangle`20that`20was`20specified.
  1027. X
  1028. X`20`20`20`20`20`20`20`20-expand`20`20exp`20`20(Resource`20name:`20expand`20
  1029. V`20floating-point)
  1030. X`20`20`20`20`20`20`20`20Lets`20you`20specify`20an`20`20initial`20`20expansion
  1031. V`20`20or`20compression`20factor
  1032. X`20`20`20`20`20`20`20`20for`20`20the`20`20picture.`20`20You`20`20can`20`20spec
  1033. Vify`20`20floating-point`20`20values.
  1034. X`20`20`20`20`20`20`20`20Values`20larger`20than`20zero`20multiply`20the`20`20pi
  1035. Vcture's`20`20dimensions`20by
  1036. X`20`20`20`20`20`20`20`20the`20given`20factor.`20`20(`20i.e.,`20an`20expand`20f
  1037. Vactor`20of`20'3'`20will`20make`20a
  1038. X`20`20`20`20`20`20`20`20320x200`20image`20display`20as`20960x600).
  1039. X
  1040. X`20`20`20`20`20`20`20`20Factors`20less`20than`20zero`20are`20treated`20as`20re
  1041. Vciprocals.`20`20(i.e.,`20`20an
  1042. X`20`20`20`20`20`20`20`20expand`20factor`20of`20`20'-4'`20`20makes`20`20the`20
  1043. V`20picture`20`201/4th`20`20its`20normal
  1044. X`20`20`20`20`20`20`20`20size.).`20`20'0'`20is`20not`20a`20valid`20expansion
  1045. V`20factor.
  1046. X
  1047. X`20`20`20`20`20`20`20`20-aspect`20`20w:h`20`20(Resource`20name:`20aspect`20
  1048. V`20string)
  1049. X`20`20`20`20`20`20`20`20Lets`20you`20set`20an`20initial`20aspect`20ratio,`20an
  1050. Vd`20also`20sets`20`20the`20value
  1051. X`20`20`20`20`20`20`20`20used`20by`20the`20Aspect`20control.`20`20The`20aspect
  1052. V`20ratio`20of`20nearly`20`20every
  1053. X`20`20`20`20`20`20`20`20X`20display`20`20(and,`20`20in`20`20fact,`20any`20civi
  1054. Vlized`20graphics`20display)`20is
  1055. X`20`20`20`20`20`20`20`201:1.`20`20What`20this`20means`20is`20that`20pixels`20a
  1056. Vppear`20to`20be`20'square'.`20`20A
  1057. X`20`20`20`20`20`20`20`20100`20pixel`20wide`20by`20100`20pixel`20high`20box`20w
  1058. Vill`20appear`20on`20the`20screen
  1059. X`20`20`20`20`20`20`20`20as`20a`20square.`20`20Unfortunately,`20`20this`20`20is
  1060. V`20`20not`20the`20case`20with`20some
  1061. X`20`20`20`20`20`20`20`20screens`20and`20digitizers.`20`20The`20-aspect`20`20op
  1062. Vtion`20`20lets`20you`20stretch
  1063. X`20`20`20`20`20`20`20`20the`20`20picture`20`20so`20that`20the`20picture`20appe
  1064. Vars`20`20correctly`20`20on`20`20your
  1065. X`20`20`20`20`20`20`20`20display.`20`20`20`20Unlike`20`20the`20`20other`20size-
  1066. Vrelated`20options,`20this`20`20one
  1067. X`20`20`20`20`20`20`20`20doesn't`20`20care`20`20what`20the`20size`20of`20the
  1068. V`20overall`20picture`20`20is.`20`20`20`20It
  1069. X`20`20`20`20`20`20`20`20operates`20on`20`20a`20`20pixel-by-pixel`20`20basis,
  1070. V`20`20stretching`20`20each`20image
  1071. X`20`20`20`20`20`20`20`20pixel`20slightly,`20in`20`20either`20`20width`20`20or
  1072. V`20height,`20depending`20on`20the
  1073. X`20`20`20`20`20`20`20`20ratio.
  1074. X
  1075. X`20`20`20`20`20`20`20`20Aspect`20`20ratios`20`20greater`20`20than`20`20'1:1'
  1076. V`20`20(e.g.,`20`20'4:3')`20`20make`20the
  1077. X`20`20`20`20`20`20`20`20picture`20`20wider`20`20than`20`20normal.`20`20`20`20A
  1078. Vspect`20ratios`20less`20than`20'1:1'
  1079. X`20`20`20`20`20`20`20`20(e.g.`20`20`20'2:3')`20`20make`20`20the`20picture`20ta
  1080. Vller`20than`20normal.`20`20(Useful
  1081. X`20`20`20`20`20`20`20`20aspect`20ratio:`20`20`20A`20`20512x480`20`20image`20
  1082. V`20that`20was`20supposed`20to`20fill`20a
  1083. X`20`20`20`20`20`20`20`20standard`204x3`20video`20screen`20`20(produced`20by
  1084. V`20many`20video`20digitizers)
  1085. X`20`20`20`20`20`20`20`20should`20be`20displayed`20with`20an`20aspect`20ratio
  1086. V`20of`20'5:4')
  1087. X
  1088. X3`20Color_Allocation_Options
  1089. X`20`20`20`20`20`20`20`20-ncols`20nc`20`20(Resource`20name:`20ncols`20`20intege
  1090. Vr)
  1091. X`20`20`20`20`20`20`20`20Sets`20the`20maximum`20number`20of`20colors`20that`20X
  1092. VV`20will`20use.`20`20Normally,
  1093. X`20`20`20`20`20`20`20`20this`20is`20set`20to`20'as`20many`20`20as`20it`20can
  1094. V`20get'.`20`20However,`20you`20can`20set
  1095. X`20`20`20`20`20`20`20`20this`20to`20smaller`20values`20for`20interesting`20eff
  1096. Vect.`20`20`20Most`20notably,
  1097. X`20`20`20`20`20`20`20`20if`20you`20set`20it`20to`20'0',`20it`20will`20display
  1098. V`20the`20picture`20by`20dithering
  1099. X`20`20`20`20`20`20`20`20with`20'black'`20and`20'white'.`20`20(The`20actual`20c
  1100. Volors`20used`20`20can`20be`20set
  1101. X`20`20`20`20`20`20`20`20by`20the`20-black`20and`20-white`20options,`20below.)
  1102. X
  1103. X`20`20`20`20`20`20`20`20-nglobal`20(Resource`20name:`20nglobal`20`20boolean)
  1104. X`20`20`20`20`20`20`20`20Adjusts`20the`20way`20the`20program`20behaves`20when
  1105. V`20it`20is`20unable`20`20to`20`20get
  1106. X`20`20`20`20`20`20`20`20all`20`20the`20`20colors`20`20it`20`20requested.`20
  1107. V`20Normally,`20it`20will`20search`20the
  1108. X`20`20`20`20`20`20`20`20display's`20default`20`20colormap,`20`20and`20'borrow'
  1109. V`20any`20colors`20it`20deems
  1110. X`20`20`20`20`20`20`20`20appropriate.`20`20These`20borrowed`20colors`20are,`20h
  1111. Vowever,`20not`20owned`20by
  1112. X`20`20`20`20`20`20`20`20XV,`20and`20as`20such,`20`20can`20`20changed`20`20with
  1113. Vout`20`20xv's`20`20permission,`20`20or
  1114. X`20`20`20`20`20`20`20`20knowledge.`20`20`20`20If`20`20this`20happens,`20`20the
  1115. V`20`20displayed`20`20picture`20`20will
  1116. X`20`20`20`20`20`20`20`20change,`20in`20a`20less-than-desirable`20direction.
  1117. V`20`20`20If`20`20you`20`20specify
  1118. X`20`20`20`20`20`20`20`20the`20-nglobal`20option,`20XV`20will`20not`20use`20'gl
  1119. Vobal'`20colors.`20`20It`20will
  1120. X`20`20`20`20`20`20`20`20only`20use`20colors`20that`20it`20successfully`20alloc
  1121. Vated,`20which`20makes`20it
  1122. X`20`20`20`20`20`20`20`20immune`20to`20any`20color`20changes.
  1123. X
  1124. X`20`20`20`20`20`20`20`20It`20should`20`20be`20`20noted`20`20that`20`20'use`20g
  1125. Vlobal`20colors'`20is`20the`20default
  1126. X`20`20`20`20`20`20`20`20because`20color`20changes`20`20aren't`20`20generally
  1127. V`20`20a`20problem`20if`20you`20are
  1128. X`20`20`20`20`20`20`20`20only`20using`20XV`20to`20`20display`20`20a`20`20pictur
  1129. Ve`20for`20a`20short`20time.`20`20Color
  1130. X`20`20`20`20`20`20`20`20changes`20only`20really`20become`20a`20`20problem`20if
  1131. V`20you`20use`20XV`20to`20display
  1132. X`20`20`20`20`20`20`20`20a`20picture`20that`20you`20will`20be`20`20keeping`20
  1133. V`20around`20for`20a`20while,`20while
  1134. X`20`20`20`20`20`20`20`20you`20go`20and`20do`20some`20other`20work`20`20(such
  1135. V`20`20as`20using`20XV`20to`20display`20a
  1136. X`20`20`20`20`20`20`20`20background).`20`20In`20such`20cases`20you`20will`20wan
  1137. Vt`20to`20specify`20-nglobal.
  1138. X`20`20`20`20`20`20`20`20Note:`20`20using`20the`20-ncols`20or`20-root`20options
  1139. V`20automatically`20turn`20on
  1140. X`20`20`20`20`20`20`20`20-nglobal.
  1141. X
  1142. X`20`20`20`20`20`20`20`20-rw`20`20(Resource`20name:`20rwColor`20`20boolean)
  1143. X`20`20`20`20`20`20`20`20Tells`20`20XV`20`20to`20`20use`20`20read/write`20`20co
  1144. Vlor`20`20cells.`20`20`20`20Normally,`20`20XV
  1145. X`20`20`20`20`20`20`20`20allocates`20`20colors`20read-only,`20which`20allows
  1146. V`20it`20to`20`20share`20`20colors
  1147. X`20`20`20`20`20`20`20`20with`20other`20programs.`20`20If`20you`20use`20read/wr
  1148. Vite`20`20color`20`20cells,`20`20no
  1149. X`20`20`20`20`20`20`20`20other`20`20program`20`20can`20`20use`20`20the`20`20col
  1150. Vors`20`20that`20XV`20is`20`20using,`20`20and
  1151. X`20`20`20`20`20`20`20`20vice-versa.`20`20`20`20The`20only`20reason`20you'd`20d
  1152. +-+-+-+-+-+-+-+-  END  OF PART 3 +-+-+-+-+-+-+-+-
  1153.