home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume20 / imagemgc / part07 < prev    next >
Encoding:
Text File  |  1993-07-13  |  50.5 KB  |  1,625 lines

  1. Newsgroups: comp.sources.x
  2. From: cristy@eplrx7.es.duPont.com (Cristy)
  3. Subject: v20i063:  imagemagic - X11 image processing and display, Part07/38
  4. Message-ID: <1993Jul14.175413.997@sparky.sterling.com>
  5. X-Md4-Signature: 8690027fe2568fd3f40dce984e5c2a77
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Wed, 14 Jul 1993 17:54:13 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: cristy@eplrx7.es.duPont.com (Cristy)
  12. Posting-number: Volume 20, Issue 63
  13. Archive-name: imagemagic/part07
  14. Environment: X11
  15. Supersedes: imagemagic: Volume 13, Issue 17-37
  16.  
  17. #!/bin/sh
  18. # this is magick.07 (part 7 of ImageMagick)
  19. # do not concatenate these parts, unpack them in order with /bin/sh
  20. # file ImageMagick/xtp/xtp.c continued
  21. #
  22. if test ! -r _shar_seq_.tmp; then
  23.     echo 'Please unpack part 1 first!'
  24.     exit 1
  25. fi
  26. (read Scheck
  27.  if test "$Scheck" != 7; then
  28.     echo Please unpack part "$Scheck" next!
  29.     exit 1
  30.  else
  31.     exit 0
  32.  fi
  33. ) < _shar_seq_.tmp || exit 1
  34. if test ! -f _shar_wnt_.tmp; then
  35.     echo 'x - still skipping ImageMagick/xtp/xtp.c'
  36. else
  37. echo 'x - continuing file ImageMagick/xtp/xtp.c'
  38. sed 's/^X//' << 'SHAR_EOF' >> 'ImageMagick/xtp/xtp.c' &&
  39. %
  40. %  Function SignalChild is called if the status of the child process changes.
  41. %
  42. %  The format of the SignalChild routine is:
  43. %
  44. %    SignalChild()
  45. %
  46. %
  47. */
  48. static void SignalChild()
  49. {
  50. X  char
  51. X    message[2048];
  52. X
  53. X  int
  54. X    process_status;
  55. X
  56. X  while (waitpid((pid_t) NULL,&process_status,WNOHANG) > 0);
  57. X  (void) sprintf(message,"child died, status %x",process_status);
  58. X  Error(message,(char *) NULL);
  59. }
  60. X
  61. /*
  62. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  63. %                                                                             %
  64. %                                                                             %
  65. %                                                                             %
  66. %   U s a g e                                                                 %
  67. %                                                                             %
  68. %                                                                             %
  69. %                                                                             %
  70. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  71. %
  72. %  Procedure Usage displays the program usage;
  73. %
  74. %  The format of the Usage routine is:
  75. %
  76. %      Usage()
  77. %
  78. %
  79. */
  80. static void Usage()
  81. {
  82. X  char
  83. X    **p;
  84. X
  85. X  static char
  86. X    *options[]=
  87. X    {
  88. X      "-binary                retrieve files as binary",
  89. X      "-exclude expression    exclude files that match the expression",
  90. X      "-directory expression  list file names that match the expression",
  91. X      "-ident password        specifies password",
  92. X      "-port number           port number of FTP server",
  93. X      "-print expression      print files that match the expression",
  94. X      "-prune                 do not recursively search for files",
  95. X      "-retrieve expression   retrieve files that match the expression",
  96. X      "-send expression       send files that match the expression",
  97. X      "-timeout seconds       specifies maximum seconds of XTP session",
  98. X      "-user name             identify yourself to the remote FTP server",
  99. X      "-verbose               show all responses from the remote server",
  100. X      NULL
  101. X    };
  102. X  (void) fprintf(stderr,
  103. X    "Usage: %s [-options ...] <host/ip address> [ <home directory> ]\n",
  104. X    client_name);
  105. X  (void) fprintf(stderr,"\nWhere options include:\n");
  106. X  for (p=options; *p; p++)
  107. X    (void) fprintf(stderr,"  %s\n",*p);
  108. X  exit(1);
  109. }
  110. X
  111. /*
  112. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  113. %                                                                             %
  114. %                                                                             %
  115. %                                                                             %
  116. %   W a i t                                                                   %
  117. %                                                                             %
  118. %                                                                             %
  119. %                                                                             %
  120. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  121. %
  122. %  Function Wait reads a line of output from the remote FTP server.
  123. %
  124. %  The format of the Wait() routine is:
  125. %
  126. %    (response=Wait())
  127. %
  128. %  A description of each parameter follows:
  129. %
  130. %    o response:  Function Wait returns this pointer to the output obtained
  131. %      from the remote FTP server.
  132. %
  133. %
  134. */
  135. static char *Wait()
  136. {
  137. X  register char
  138. X    *p;
  139. X
  140. X  static char
  141. X    buffer[1024],
  142. X    *q;
  143. X
  144. X  static char
  145. X    line[1024];
  146. X
  147. X  static int
  148. X    count=0;
  149. X
  150. X  status=0;
  151. X  p=line;
  152. X  do
  153. X  {
  154. X    if (count <= 0)
  155. X      {
  156. X        /*
  157. X          The buffer is empty;  read output from the remote FTP server.
  158. X        */
  159. X        count=read(master,buffer,sizeof(buffer));
  160. X        q=buffer;
  161. X        if (count <= 0)
  162. X          {
  163. X            if (p == line)
  164. X              return((char *) NULL);
  165. X            break;
  166. X          }
  167. X      }
  168. X    count--;
  169. X    *p=(*q++);
  170. X    if (*p == '\n')
  171. X      break;
  172. X    p++;
  173. X    if ((p-line) >= 5)
  174. X      if (!strncmp(p-5,"ftp> ",5))
  175. X        if (count == 0)
  176. X          return((char *) NULL);
  177. X  } while (p < (line+sizeof(line)));
  178. X  *p='\0';
  179. X  if (isdigit(*line))
  180. X    status=atoi(line)/100;
  181. X  return(line);
  182. }
  183. X
  184. /*
  185. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  186. %                                                                             %
  187. %                                                                             %
  188. %                                                                             %
  189. %   m a i n                                                                   %
  190. %                                                                             %
  191. %                                                                             %
  192. %                                                                             %
  193. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  194. %
  195. %
  196. */
  197. int main(argc,argv)
  198. int
  199. X  argc;
  200. X
  201. register char
  202. X  **argv;
  203. {
  204. #include <pwd.h>
  205. X
  206. X  char
  207. X    command[2048],
  208. X    *home_directory,
  209. X    *host_info,
  210. X    *host_name,
  211. X    *ident,
  212. X    *port,
  213. X    *send_expression,
  214. X    *user;
  215. X
  216. X  int
  217. X    binary,
  218. X    child,
  219. X    process_status;
  220. X
  221. X  register char
  222. X    *p,
  223. X    *response;
  224. X
  225. X  struct sigaction
  226. X    action;
  227. X
  228. X  unsigned int
  229. X    prune,
  230. X    timeout,
  231. X    verbose;
  232. X
  233. X  /*
  234. X    Initialize program variables.
  235. X  */
  236. X  client_name=argv[0];
  237. X  binary=False;
  238. X  directory_expression=(RegularExpression *) NULL;
  239. X  exclude_expression=(RegularExpression *) NULL;
  240. X  ident=(char *) NULL;
  241. X  port=(char *) NULL;
  242. X  print_expression=(RegularExpression *) NULL;
  243. X  prune=False;
  244. X  retrieve_expression=(RegularExpression *) NULL;
  245. X  send_expression=(char *) NULL;
  246. X  timeout=0;
  247. X  user=(char *) NULL;
  248. X  verbose=False;
  249. X  /*
  250. X    Parse command line arguments.
  251. X  */
  252. X  for (p=(*argv++); *argv && (**argv == '-'); argv++)
  253. X    switch (argv[0][1])
  254. X    {
  255. X      case 'b':
  256. X      {
  257. X        binary=True;
  258. X        break;
  259. X      }
  260. X      case 'd':
  261. X      {
  262. X        directory_expression=CompileRegularExpression(*++argv);
  263. X        if (!directory_expression)
  264. X          exit(1);
  265. X        break;
  266. X      }
  267. X      case 'e':
  268. X      {
  269. X        exclude_expression=CompileRegularExpression(*++argv);
  270. X        if (!exclude_expression)
  271. X          exit(1);
  272. X        break;
  273. X      }
  274. X      case 'i':
  275. X      {
  276. X        ident=(*++argv);
  277. X        break;
  278. X      }
  279. X      case 'p':
  280. X      {
  281. X        if (strncmp("port",*argv+1,2) == 0)
  282. X          port=(*++argv);
  283. X        else
  284. X          if (strncmp("prune",*argv+1,3) == 0)
  285. X            prune=(**argv == '-');
  286. X          else
  287. X            {
  288. X              print_expression=CompileRegularExpression(*++argv);
  289. X              if (!print_expression)
  290. X                exit(1);
  291. X            }
  292. X        break;
  293. X      }
  294. X      case 'r':
  295. X      {
  296. X        retrieve_expression=CompileRegularExpression(*++argv);
  297. X        if (!retrieve_expression)
  298. X          exit(1);
  299. X        break;
  300. X      }
  301. X      case 's':
  302. X      {
  303. X        send_expression=(*++argv);
  304. X        break;
  305. X      }
  306. X      case 't':
  307. X      {
  308. X        timeout=atoi(*++argv);
  309. X        break;
  310. X      }
  311. X      case 'u':
  312. X      {
  313. X        user=(*++argv);
  314. X        break;
  315. X      }
  316. X      case 'v':
  317. X      {
  318. X        verbose=True;
  319. X        break;
  320. X      }
  321. X      default:
  322. X      {
  323. X        Error("unrecognized option",(char *) NULL);
  324. X        break;
  325. X      }
  326. X    }
  327. X  if ((argc < 2) || (*argv == (char *) NULL))
  328. X    Usage();
  329. X  host_name=argv[0];
  330. X  home_directory=argv[1];
  331. X  if ((directory_expression == (RegularExpression *) NULL) &&
  332. X      (print_expression == (RegularExpression *) NULL) &&
  333. X      (retrieve_expression == (RegularExpression *) NULL) &&
  334. X      (send_expression == (char *) NULL))
  335. X    directory_expression=CompileRegularExpression("");
  336. X  if ((ident == (char *) NULL) && (user == (char *) NULL))
  337. X    {
  338. X      static char
  339. X        name[2048];
  340. X
  341. X      struct passwd
  342. X        *user_info;
  343. X
  344. X      /*
  345. X        Identify user as user@host.domain.
  346. X      */
  347. X      user_info=getpwuid(geteuid());
  348. X      if (user_info == (struct passwd *) NULL)
  349. X        (void) strcpy(name,"anonymous");
  350. X      else
  351. X        (void) strcpy(name,user_info->pw_name);
  352. X      p=name+strlen(name);
  353. X      *p++='@';
  354. X      (void) gethostname(p,64);
  355. X      while (*p)
  356. X        p++;
  357. X      *p++='.';
  358. X      (void) getdomainname(p,64);
  359. X      user="anonymous";
  360. X      ident=name;
  361. X    }
  362. X  else
  363. X    if (ident == (char *) NULL)
  364. X      ident=(char *) GetPassword("Password: ");
  365. X    else
  366. X      if (user == (char *) NULL)
  367. X        user="anonymous";
  368. X  host_info=GetHostInfo(host_name);
  369. X  if (host_info == (char *) NULL)
  370. X    Error("unknown host",host_name);
  371. X  if (home_directory == (char *) NULL)
  372. X    (void) fprintf(stdout,"%s\n",host_info);
  373. X  else
  374. X    (void) fprintf(stdout,"%s %s\n",host_info,home_directory);
  375. X  (void) GetPseudoTerminal();
  376. X  /*
  377. X    Connect and logon to host.
  378. X  */
  379. X  action.sa_handler=SignalChild;
  380. X  (void) sigemptyset(&action.sa_mask);
  381. X  action.sa_flags=0;
  382. X  (void) sigaction(SIGCHLD,&action,(struct sigaction *) NULL);
  383. X  if (timeout != 0)
  384. X    (void) alarm(timeout/10);  /* enable login timer. */
  385. X  child=fork();
  386. X  if (child < 0)
  387. X    Error("unable to fork",(char *) NULL);
  388. X  if (child == 0)
  389. X    ExecuteFtp(host_name,port);
  390. X  while ((response=Wait()))
  391. X    if (verbose)
  392. X      (void) fprintf(stderr,"%s\n",response);
  393. X  (void) sprintf(command,"user %s %s\n",user,ident);
  394. X  (void) write(master,command,strlen(command));
  395. X  while ((response=Wait()))
  396. X  {
  397. X    if (verbose)
  398. X      (void) fprintf(stderr,"%s\n",response);
  399. X    if (status == 5)
  400. X      Error(response,user);
  401. X  }
  402. X  if (timeout != 0)
  403. X    (void) alarm(timeout);  /* enable session timer. */
  404. X  if (home_directory != (char *) NULL)
  405. X    {
  406. X      /*
  407. X        Change remote working directory.
  408. X      */
  409. X      (void) sprintf(command,"cd %s\n",home_directory);
  410. X      (void) write(master,command,strlen(command));
  411. X      while ((response=Wait()))
  412. X      {
  413. X        if (verbose)
  414. X          (void) fprintf(stderr,"%s\n",response);
  415. X        if (status == 5)
  416. X          Error("no such directory",home_directory);
  417. X      }
  418. X      (void) strcpy(command,"pwd\n");
  419. X      (void) write(master,command,strlen(command));
  420. X      while ((response=Wait()))
  421. X        if (verbose)
  422. X          (void) fprintf(stderr,"%s\n",response);
  423. X    }
  424. X  if (binary)
  425. X    {
  426. X      /*
  427. X        Set file transfer type.
  428. X      */
  429. X      (void) strcpy(command,"binary\n");
  430. X      (void) write(master,command,strlen(command));
  431. X      while ((response=Wait()))
  432. X        if (verbose)
  433. X          (void) fprintf(stderr,"%s\n",response);
  434. X      (void) strcpy(command,"type\n");
  435. X      (void) write(master,command,strlen(command));
  436. X      while ((response=Wait()))
  437. X        if (verbose)
  438. X          (void) fprintf(stderr,"%s\n",response);
  439. X    }
  440. X  if (retrieve_expression != (RegularExpression *) NULL)
  441. X    {
  442. X      /*
  443. X        Ensure retrieved files are unique.
  444. X      */
  445. X      (void) strcpy(command,"runique\n");
  446. X      (void) write(master,command,strlen(command));
  447. X      while ((response=Wait()))
  448. X        if (verbose)
  449. X          (void) fprintf(stderr,"%s\n",response);
  450. X    }
  451. X  if (send_expression == (char *) NULL)
  452. X    ProcessRequest(prune,verbose);
  453. X  else
  454. X    {
  455. X      /*
  456. X        Process send request.
  457. X      */
  458. X      (void) strcpy(command,"glob on\n");
  459. X      (void) write(master,command,strlen(command));
  460. X      while ((response=Wait()))
  461. X        if (verbose)
  462. X          (void) fprintf(stderr,"%s\n",response);
  463. X      (void) sprintf(command,"mput %s\n",send_expression);
  464. X      (void) write(master,command,strlen(command));
  465. X      while ((response=Wait()))
  466. X        if ((status == 5) || verbose)
  467. X          (void) fprintf(stderr,"%s\n",response);
  468. X    }
  469. X  (void) strcpy(command,"quit\n");
  470. X  (void) write(master,command,strlen(command));
  471. X  /*
  472. X    Wait for child to finish.
  473. X  */
  474. X  action.sa_handler=SIG_DFL;
  475. X  (void) sigemptyset(&action.sa_mask);
  476. X  action.sa_flags=0;
  477. X  (void) sigaction(SIGCHLD,&action,(struct sigaction *) NULL);
  478. X  (void) waitpid(child,&process_status,WNOHANG);
  479. X  (void) close(master);
  480. X  (void) free((char *) directory_expression);
  481. X  (void) free((char *) exclude_expression);
  482. X  (void) free((char *) print_expression);
  483. X  (void) free((char *) retrieve_expression);
  484. X  return(status < 0);
  485. }
  486. SHAR_EOF
  487. echo 'File ImageMagick/xtp/xtp.c is complete' &&
  488. chmod 0644 ImageMagick/xtp/xtp.c ||
  489. echo 'restore of ImageMagick/xtp/xtp.c failed'
  490. Wc_c="`wc -c < 'ImageMagick/xtp/xtp.c'`"
  491. test 41691 -eq "$Wc_c" ||
  492.     echo 'ImageMagick/xtp/xtp.c: original size 41691, current size' "$Wc_c"
  493. rm -f _shar_wnt_.tmp
  494. fi
  495. # ============= ImageMagick/xtp/xtp.h ==============
  496. if test -f 'ImageMagick/xtp/xtp.h' -a X"$1" != X"-c"; then
  497.     echo 'x - skipping ImageMagick/xtp/xtp.h (File already exists)'
  498.     rm -f _shar_wnt_.tmp
  499. else
  500. > _shar_wnt_.tmp
  501. echo 'x - extracting ImageMagick/xtp/xtp.h (Text)'
  502. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/xtp/xtp.h' &&
  503. /*
  504. X  Include declarations
  505. */
  506. #include <stdio.h>
  507. #if __STDC__ || defined(sgi) || defined(_AIX)
  508. #include <stdlib.h>
  509. #else
  510. #ifndef vms
  511. #include <malloc.h>
  512. #include <memory.h>
  513. #endif
  514. #endif
  515. #include <ctype.h>
  516. #include <math.h>
  517. #include <string.h>
  518. X
  519. /*
  520. X  Define declarations for the Display program.
  521. */
  522. #if __STDC__ || defined(sgi) || defined(_AIX)
  523. #define _Declare(formal_parameters) formal_parameters
  524. #else
  525. #define const 
  526. #define _Declare(formal_parameters) ()
  527. #endif
  528. #define False  0
  529. #define True  1
  530. #define Warning(message,qualifier)  \
  531. {  \
  532. X  (void) fprintf(stderr,"%s: %s",client_name,message);  \
  533. X  if (qualifier != (char *) NULL)  \
  534. X    (void) fprintf(stderr," (%s)",qualifier);  \
  535. X  (void) fprintf(stderr,".\n");  \
  536. }
  537. X
  538. #ifndef lint
  539. static char 
  540. X  Version[]="@(#)ImageMagick 2.1 92/10/10 cristy@dupont.com";
  541. #endif
  542. SHAR_EOF
  543. chmod 0644 ImageMagick/xtp/xtp.h ||
  544. echo 'restore of ImageMagick/xtp/xtp.h failed'
  545. Wc_c="`wc -c < 'ImageMagick/xtp/xtp.h'`"
  546. test 819 -eq "$Wc_c" ||
  547.     echo 'ImageMagick/xtp/xtp.h: original size 819, current size' "$Wc_c"
  548. rm -f _shar_wnt_.tmp
  549. fi
  550. # ============= ImageMagick/xtp/xtp.man ==============
  551. if test -f 'ImageMagick/xtp/xtp.man' -a X"$1" != X"-c"; then
  552.     echo 'x - skipping ImageMagick/xtp/xtp.man (File already exists)'
  553.     rm -f _shar_wnt_.tmp
  554. else
  555. > _shar_wnt_.tmp
  556. echo 'x - extracting ImageMagick/xtp/xtp.man (Text)'
  557. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/xtp/xtp.man' &&
  558. .ad l
  559. .nh
  560. .TH XTP 1 "10 October 1992"
  561. .SH NAME
  562. xtp - file transfer program
  563. .SH SYNOPSIS
  564. .B "xtp"
  565. [ \fI-options\fP ... ] \fI<host/ip address>\fP [ \fI<home directory>\fP ]
  566. .SH DESCRIPTION
  567. .PP
  568. .I Xtp
  569. is a utility for retrieving, listing, or printing files from a remote
  570. network site, or sending files to a remote network site.
  571. .I xtp
  572. performs most of the same functions as the \fBftp\fP program, but does
  573. not require any interactive commands.  You simply specify the file transfer
  574. task on the command line and \fBxtp\fP performs the task automatically.
  575. .SH EXAMPLES
  576. .PP
  577. To retrieve file display.tar.Z from host wizard.dupont.com, use:
  578. .PP
  579. .B
  580. X     xtp -binary -retrieve display.tar.Z wizard.dupont.com
  581. .PP
  582. To retrieve all the files from directory \fIpublic/documents\fP from host
  583. wizard.dupont.com, use:
  584. .PP
  585. X     xtp -binary -retrieve documents/ wizard.dupont.com public
  586. .PP
  587. .SH OPTIONS
  588. .TP
  589. .B "-binary"
  590. retrieve files as binary.
  591. .TP
  592. .B "-exclude \fIexpression\fP"
  593. exclude files that match the \fIregular expression\fP.
  594. .TP
  595. .B "-directory \fIexpression\fP"
  596. list the names of files and their attributes that match the
  597. \fIregular expression\fP.
  598. .TP
  599. .B "-ident \fIpassword\fP"
  600. specifies password.
  601. .TP
  602. .B "-port \fInumber\fP"
  603. If no port number is specified, \fBxtp\fP attempts to contact a FTP server
  604. at the default port.  Otherwise, the specfied port number is used.
  605. .TP
  606. .B "-print \fIexpression\fP"
  607. print files that match the \fIregular expression\fP.
  608. .TP
  609. .B "-prune"
  610. do not recursively search for files.
  611. .TP
  612. .B "-retrieve \fIexpression\fP"
  613. retrieve files that match the \fIregular expression\fP.
  614. X
  615. Retrieved files are stored on your local host directory as the full
  616. name of the retrieved file.  For example, if the retrieved file is
  617. named \fBdocuments/xtp.man\fP on the remote FTP server, it will appear
  618. in your home directory as \fBdocuments/xtp.man\fP.
  619. .TP
  620. .B "-send \fIexpression\fP"
  621. send files that match the \fIregular expression\fP.
  622. .TP
  623. .B "-timeout \fIseconds\fP"
  624. specifies the maximum seconds to complete your remote FTP server request.
  625. If this time expires, the program terminates.  The program also terminates if
  626. one tenth of this value is exceeded while logging onto the remote FTP
  627. server.
  628. .TP
  629. .B "-user \fIname\fP"
  630. identify yourself to the remote FTP server.
  631. X
  632. If \fB-user\fP is specified but not \fB-ident\fP, the password is obtained
  633. from you interactively.
  634. .TP
  635. .B "-verbose"
  636. show all responses from the remote server.
  637. .PP
  638. If neither \fB-print\fP, \fB-retrieve\fP, or \fB-send\fP are specified
  639. on the command line, a directory of files is listed for the remote
  640. network host.
  641. .PP
  642. \fBxtp\fP recursively descends the directory hierarchy from the home
  643. directory. Some remote hosts may have thousands of files causing a
  644. significant delay satisfying your request.  This can be wasteful if the
  645. files you are interested in reside in a known directory.  You can
  646. reduce the searching required by specifying \fI<home directory>\fP on
  647. the command line.  This limits the filename search to the specified
  648. directory and any of its subdirectories.  Alternatively, \fB-prune\fP
  649. restricts the search to the home directory only.
  650. .PP
  651. If only the program name is specified on the command line, the program command
  652. syntax and options are listed.
  653. .SH REGULAR EXPRESSIONS
  654. A \fIregular expression\fP is zero or more branches, separated by
  655. \fB|\fP.  It matches anything that matches one of the branches.
  656. .PP
  657. A branch is zero or more pieces, concatenated.  It matches a match for
  658. the first, followed by a match for the second, etc.
  659. .PP
  660. A piece is an atom possibly followed by \fB*\fP, \fB+\fP, or \fB?\fP.
  661. An atom followed by \fB*\fP matches a sequence of 0 or more matches of
  662. the atom.  An atom followed by \fB+\fP matches a sequence of 1 or more
  663. matches of the atom.  An atom followed by \fB?\fP matches a match of
  664. the atom, or the null pattern.
  665. .PP
  666. An atom is a \fIregular expression\fP in parentheses (matching a match
  667. for the \fIregular expression\fP), a range (see below), \fB.\fP
  668. (matching any single character), \fB^\fP (matching the null pattern at
  669. the beginning of the input pattern), \fB$\fP (matching the null pattern
  670. at the end of the input pattern), a \fB\'\fP followed by a single
  671. character (matching that character), or a single character with no
  672. other significance (matching that character).
  673. .PP
  674. A range is a sequence of characters enclosed in \fB[]\fP.  It normally
  675. matches any single character from the sequence.  If the sequence begins
  676. with \fB^\fP, it matches any single character not from the rest of the
  677. sequence.  If two characters in the sequence are separated by \fB-\fP,
  678. this is shorthand for the full list of ASCII characters between them
  679. (e.g.  \fB[0-9]\fP matches any decimal digit). To include a literal
  680. \fB]\fP in the sequence, make it the first character (following a
  681. possible \fB^\fP).  To include a literal \fB-\fP, make it the first or
  682. last character.
  683. .SH SEE ALSO
  684. .B
  685. ftp(1C)
  686. .SH COPYRIGHT
  687. Copyright 1993 E. I. Dupont de Nemours & Company
  688. .PP
  689. Permission to use, copy, modify, distribute, and sell this software and
  690. its documentation for any purpose is hereby granted without fee,
  691. provided that the above copyright notice appear in all copies and that
  692. both that copyright notice and this permission notice appear in
  693. supporting documentation, and that the name of E. I. Dupont de Nemours
  694. & Company not be used in advertising or publicity pertaining to
  695. distribution of the software without specific, written prior
  696. permission.  E. I. Dupont de Nemours & Company makes no representations
  697. about the suitability of this software for any purpose.  It is provided
  698. "as is" without express or implied warranty.
  699. .PP
  700. E. I. Dupont de Nemours & Company disclaims all warranties with regard
  701. to this software, including all implied warranties of merchantability
  702. and fitness, in no event shall E. I. Dupont de Nemours & Company be
  703. liable for any special, indirect or consequential damages or any
  704. damages whatsoever resulting from loss of use, data or profits, whether
  705. in an action of contract, negligence or other tortious action, arising
  706. out of or in connection with the use or performance of this software.
  707. .SH ACKNOWLEDGEMENTS
  708. Steve Singles, University of Delaware, for the initial implementation of
  709. this program.
  710. .PP
  711. Henry Spencer, University of Toronto, for the implementation of the
  712. \fIregular expression\fP interpreter and the text in \fBREGULAR
  713. EXPRESSIONS\fP.
  714. .SH AUTHOR
  715. John Cristy, E.I. DuPont De Nemours & Company Incorporated
  716. X
  717. X
  718. SHAR_EOF
  719. chmod 0644 ImageMagick/xtp/xtp.man ||
  720. echo 'restore of ImageMagick/xtp/xtp.man failed'
  721. Wc_c="`wc -c < 'ImageMagick/xtp/xtp.man'`"
  722. test 6440 -eq "$Wc_c" ||
  723.     echo 'ImageMagick/xtp/xtp.man: original size 6440, current size' "$Wc_c"
  724. rm -f _shar_wnt_.tmp
  725. fi
  726. # ============= ImageMagick/images/README ==============
  727. if test ! -d 'ImageMagick/images'; then
  728.     echo 'x - creating directory ImageMagick/images'
  729.     mkdir 'ImageMagick/images'
  730. fi
  731. if test -f 'ImageMagick/images/README' -a X"$1" != X"-c"; then
  732.     echo 'x - skipping ImageMagick/images/README (File already exists)'
  733.     rm -f _shar_wnt_.tmp
  734. else
  735. > _shar_wnt_.tmp
  736. echo 'x - extracting ImageMagick/images/README (Text)'
  737. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/images/README' &&
  738. The aquarium image was rendered with rayshade from a script written 
  739. by kilian@cray.com and Jerome A. Farm.
  740. X
  741. Image `montage.miff' was created with this command:
  742. X
  743. X  montage -colors 256 -title "Image Montage" -geometry 128x128+5+5 \
  744. X    -frame -borderwidth 10 -bordercolor SlateGray -highlight LightGray \
  745. X    dna.miff swan.miff aquarium.miff montage.miff
  746. SHAR_EOF
  747. chmod 0644 ImageMagick/images/README ||
  748. echo 'restore of ImageMagick/images/README failed'
  749. Wc_c="`wc -c < 'ImageMagick/images/README'`"
  750. test 354 -eq "$Wc_c" ||
  751.     echo 'ImageMagick/images/README: original size 354, current size' "$Wc_c"
  752. rm -f _shar_wnt_.tmp
  753. fi
  754. # ============= ImageMagick/ChangeLog ==============
  755. if test -f 'ImageMagick/ChangeLog' -a X"$1" != X"-c"; then
  756.     echo 'x - skipping ImageMagick/ChangeLog (File already exists)'
  757.     rm -f _shar_wnt_.tmp
  758. else
  759. > _shar_wnt_.tmp
  760. echo 'x - extracting ImageMagick/ChangeLog (Text)'
  761. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/ChangeLog' &&
  762. ImageMagick 2.3.3
  763. X
  764. X  o Fixed numereous small errors in the ImageMagick manual pages.
  765. X
  766. X  o convert(1) can now scale an image as it converts it.
  767. X
  768. X  o ImageMagick can now read and write ZSoft IBM PC Paintbrush images.
  769. X
  770. X  o ImageMagick now can write as well as read the X: format.
  771. X
  772. X
  773. ImageMagick 2.3.2
  774. X
  775. X  o Added a frame option to montage(1) to put an ornamental border
  776. X    around each image tile.
  777. X
  778. X  o On HP-SUX 9.0 there is a compiler bug.  Try compiling image.c without
  779. X    optimization to prevent a bus error with montage(1).
  780. X
  781. X  o A warning was not being properly generated on a write error
  782. X    (thanks to zins@forwiss.uni-erlangen.de).
  783. X
  784. X  o New '-page' option to set the size and location for a Postscript page.
  785. X
  786. X  o Use '-update' with display(1) to automatically updates the image
  787. X    being displayed when it is modified (thanks to lustig@dupont.com).
  788. X
  789. X  o Made several window attributes changes in display(1) and animate(1) to
  790. X    make the windows more server friendly and efficient.
  791. X
  792. X  o ImageMagick can now read and write Microsoft Windows bitmap images
  793. X    (thanks to Eric.Adams@dseg.ti.com for bug alert).
  794. X
  795. X  o ImageMagick can now read and write Postscript Level II.
  796. X
  797. X  o ImageMagick can now read and write SGI RGB images (thanks to
  798. X    mossip@vizlab.rutgers.edu for bug alert).
  799. X
  800. X  o Setting -delay with display(1) will cause the images to loop
  801. X    continuously (suggested by muller@mafalda.inria.fr).
  802. X
  803. X  o Image rotations of 270 degrees would sometimes produce a
  804. X    segmentation fault on HP's.
  805. X
  806. X  o GIF files written with ImageMagick 2.3.1 were unreadable
  807. X    (thanks to mjensen@bbn.com).
  808. X
  809. X  o GIF files with multiple images would sometimes cause program to
  810. X    core dump (thanks to mjensen@bbn.com).
  811. X
  812. X  o Added -undercolor to mogrify(1) to control undercolor removal and
  813. X    black generation on CMYK images.
  814. X
  815. X  o Converting to the XWD format would sometimes dump core (thanks to
  816. X    kairys@bastar.enet.dec.com).
  817. X
  818. X  o X resources now work correctly when clients are invoked with full
  819. X    pathname, i.e. /usr/local/bin/display (thanks to respl@mi.uib.no).
  820. X
  821. X  o The delay in animate(1) now defaults to 8 milliseconds (thanks to
  822. X    respl@mi.uib.no).
  823. X
  824. X  o ImageMagick did not read MIFF images with large image directories
  825. X    correctly.
  826. X
  827. X  o Increased the default panning window size from 64x64 to 96x96.
  828. X
  829. X  o display(1) now retains proper input focus when using -backdrop.
  830. X
  831. X  o ImageMagick automatically compresses/uncompresses images that end
  832. X    with '.z' with gzip/gunzip.
  833. X
  834. X  o ImageMagick can now write Macintosh PICT image files.
  835. X
  836. X  o ImageMagick can now read and write Truevision TARGA image files.
  837. X
  838. X  o You can now trim off one pixel from any side of an image within
  839. X    display(1) by using <ctrl> and one of the arrow keys (thanks to
  840. X    tennyson@raptor.com).
  841. X
  842. X  o Image Pixmaps in display(1) are now used only if the X resource
  843. X    `usePixmap' is set to True.
  844. X
  845. X  o New segment(1) program.  See SYNOPSIS for details.
  846. X
  847. X  o ImageMagick now compiles properly on the Digitial Alpha (OSF1) and
  848. X    the HP with HPUX.
  849. X
  850. ImageMagick 2.3.1
  851. X
  852. X  o You can now change the color of the X constant image with -bordercolor:
  853. X
  854. X      display -bordercolor red xc:
  855. X
  856. X  o Color reduction to monochrome with dithering is improved (thanks
  857. X    to mutz@kodak.com).
  858. X
  859. X  o Added EPS as a file type for Encapsulated Postscript.
  860. X
  861. X  o Minor improvements to Postscript output.
  862. X
  863. X  o Removed program XtoPS(1).  Equivalent functionality with import(1):
  864. X
  865. X      import image.ps
  866. X      import images.eps
  867. X
  868. X  o The 'Info' command in animate(1) did not always reflect the proper
  869. X    image scene.
  870. X
  871. X  o animate(1) sometimes displayed images with the wrong colormap on
  872. X    TrueColor or DirectColor visuals.
  873. X
  874. X  o Popup windows were enlarged to make them easier to see.
  875. X
  876. X  o Added a menu command to display(1) to load an image interactively
  877. X    (suggested by fouts@dallas.sgi.com).
  878. X
  879. X  o montage was not allocating enough memory for it's directory (thanks to
  880. X    fouts@dallas.sgi.com).
  881. X
  882. X
  883. ImageMagick 2.3
  884. X
  885. X  o Added -descend option to import(1).  Obtain image by descending window
  886. X    hierarchy reading each subwindow and its colormap.  The final image is
  887. X    guarenteed to have the correct colors.
  888. X
  889. X  o If pen color matched background color any annotations would not appear
  890. X    (thanks to dws@ssec.wisc.edu).
  891. X
  892. X  o Thanks to jacobsd@solar.cor2.epa.gov:
  893. X
  894. X      . mogrify now recognizes '-' as stdin and stdout.
  895. X      . PPM, PGM, and PBM image types are now recognized.
  896. X      . PPM, PGM, and PBM images were not always scaled correctly.
  897. X
  898. X  o The -density option is no longer ignored when creating Postscript images.
  899. X
  900. X  o The -quality option is now recognized by display and montage.
  901. X
  902. X  o ImageMagick can now read and write VIFF images.
  903. X
  904. X  o SUN raster files were now properly read and written on the CRAY.
  905. X
  906. X  o Popup queries can now be edited when the pointer is in the popup window.
  907. X
  908. X  o Added -stereo option to combine program.
  909. X
  910. X  o Removed MIFFtoSTEREO source.
  911. X
  912. X  o Magnify window now includes pixel value with RGB color value for windows
  913. X    whose depth is 12 or less.
  914. X
  915. X  o On occasion images were incorrectly identified as XWD.
  916. X
  917. X  o On occasion images with alpha data were being incorrectly runlength-encoded.
  918. X
  919. X  o Sometimes icon's had a private colormap.  Icon's now use a shared colormap.
  920. X  
  921. X  o Keyboard accelerators did not work with -backdrop option.
  922. X
  923. X  o Add new utility: combine-- combine images to create new images using
  924. X    digital compositing operators.
  925. X
  926. X  o xtp failed under Solaris 2.1.
  927. X
  928. X  o I486 compiler complained about includes within a function body of
  929. X    xtp/network.c (thanks to glenn@physics.su.OZ.AU).
  930. X
  931. X  o I486 compiler complained about XWDfile.h being included twice (ReadXWD &
  932. X    WriteXWD) (thanks to glenn@physics.su.OZ.AU)
  933. X
  934. ImageMagick 2.2.4
  935. X
  936. X  o time between images did not always match the value specified on
  937. X    -delay.
  938. X
  939. X  o Sped up and reduced memory requirement of dithering.
  940. X
  941. X  o GIF images were corrupted on SVR4 (thanks to glenn@physics.su.OZ.AU).
  942. X
  943. ImageMagick 2.2.3
  944. X
  945. X  o Non-color reduced images were being written even though the color
  946. X    reduction option was specified (-colors).  This affected images written
  947. X    as AVS, CMYK, and RGB.
  948. X
  949. X  o Modified various sources to reduce lint warnings.
  950. X
  951. X
  952. ImageMagick 2.2.2
  953. X
  954. X  o Dithering did not work properly on the Cray (due to right shift problem).
  955. X
  956. X  o In most cases dithering requires 1/2 as much memory as previously.
  957. X
  958. X  o Dithering was sped up by ~15%.
  959. X
  960. X  o Occasionally the quantization error was reported incorrectly.
  961. X
  962. X
  963. ImageMagick 2.2.1
  964. X
  965. X  o The number of colors reported with the -verbose option was on
  966. X    occasion incorrect.
  967. X
  968. X  o Color quantization was improved and in some cases sped up ~10%.
  969. X
  970. X  o Cleaned up image rotation code.
  971. X
  972. X  o Added -shear to mogrify options.
  973. X
  974. X  o Added a file type of HISTOGRAM to convert.
  975. X
  976. X  o Sometimes PBM image files did not have the correct number of bytes.
  977. X
  978. X  o Color reduced PPM images were being written at the full color resolution.
  979. X
  980. X  o Keypresses are no longer accepted during image configuration.
  981. X
  982. X  o Red, green, and blue values of a X constant image were set to the
  983. X    red intensity of the background color.
  984. X
  985. X  o Clipped images did not show up correctly in the panning icon.
  986. X
  987. X  o `animate' no longer shows images out-of-order if the image scene number is
  988. X    absent (thanks to kent@oddjob.uchicago.edu).
  989. X
  990. X  o ImageMagick now recognizes the X resource class with the first letter
  991. X    of the client capitalized, i.e. 'Display.Visual: default' (thanks to
  992. X    dws@ssec.wisc.edu).
  993. X
  994. X
  995. ImageMagick 2.2
  996. X
  997. X  o When displaying a composite MIFF image created with `montage',
  998. X    button 3 no longer displays a magnify window.  Instead the
  999. X    tile at the mouse location is displayed.  When the tile image is
  1000. X    exited, the composite image reappears.  This is effectively a
  1001. X    visual image directory.
  1002. X
  1003. X  o `montage' has a new gravity option for placing an image within
  1004. X    a tile of the composite, i.e. CenterGravity.
  1005. X
  1006. X  o `montage' has a new compose option for specifying which composite
  1007. X     operation to use.
  1008. X
  1009. X  o `montage' creates composite images with the `montage' keyword.
  1010. X
  1011. X  o Updated MIFF manual page to reflect 'montage' image header
  1012. X    keyword.
  1013. X
  1014. X  o Add -colormap to `mogrify.'  Use to color reduce an image to
  1015. X    a set of colors you choose.
  1016. X
  1017. X  o Some compilers have read-only strings.   ImageMagick no longer
  1018. X    writes on read-only strings.
  1019. X
  1020. X  o For colormapped X servers, the color reduction has been sped up by
  1021. X    trading image quality for processing time.  See the README for
  1022. X    details.
  1023. X
  1024. X  o Latin1Upper was declared wrong in X.h.
  1025. X
  1026. X  o Added unistd.h to display.h for strict ANSI compilers.
  1027. X
  1028. X  o Changed long to time_t for calls to C time routine.
  1029. X
  1030. X  o Multi-part GIF's can now be displayed or animated.
  1031. X
  1032. X  o Fixed segmentation fault when reading multi-part images with
  1033. X    animate, montage, or mogrify.
  1034. X
  1035. X  o Multi-part MIFF images have the correct file name now.
  1036. X
  1037. X  o An expose event for the Magnify window may occur before it is
  1038. X    mapped.  This caused display to fail on Solburne and HP's.
  1039. X
  1040. X  o Using `-colorspace gray' with 'convert' correctly produces
  1041. X    grayscale images.
  1042. X
  1043. X  o Images are sorted by intensity for shared colormapped visuals.
  1044. X    Some intensity intervals are made "more popular".  This gives better
  1045. X    image results when sharing colors with other applications.
  1046. X
  1047. X  o All utilities correctly read multi-part TIFF images.
  1048. X
  1049. X  o Image pixmap was not being updated correctly when pan icon appears
  1050. X    (thanks to dws@ssec.wisc.edu).
  1051. X
  1052. X  o Fixed ANSI warning on image composite code.
  1053. X
  1054. X  o Panning uses a pixmap for faster panning speed.
  1055. X
  1056. X  o Rotate.c now uses a table to force range limits.
  1057. X
  1058. X  o range table in quantize.c is allocated from the heap instead of
  1059. X    the stack.
  1060. X
  1061. X  o adjusted the sensitivity for automatic dithering.  Some JPEG images
  1062. X    were not being dithered.
  1063. X
  1064. X
  1065. ImageMagick 2.0
  1066. X
  1067. X  o Dirk Wetzel <wetzel@forwiss.uni-erlangen.de> fixed the select statement
  1068. X    in animate.c.
  1069. X
  1070. X  o Eric Haines <erich@eye.com> fixed ReadRLEImage in decode.c.  It previously
  1071. X    did not check to see if the background color was present in the image.
  1072. SHAR_EOF
  1073. chmod 0644 ImageMagick/ChangeLog ||
  1074. echo 'restore of ImageMagick/ChangeLog failed'
  1075. Wc_c="`wc -c < 'ImageMagick/ChangeLog'`"
  1076. test 10067 -eq "$Wc_c" ||
  1077.     echo 'ImageMagick/ChangeLog: original size 10067, current size' "$Wc_c"
  1078. rm -f _shar_wnt_.tmp
  1079. fi
  1080. # ============= ImageMagick/Imakefile ==============
  1081. if test -f 'ImageMagick/Imakefile' -a X"$1" != X"-c"; then
  1082.     echo 'x - skipping ImageMagick/Imakefile (File already exists)'
  1083.     rm -f _shar_wnt_.tmp
  1084. else
  1085. > _shar_wnt_.tmp
  1086. echo 'x - extracting ImageMagick/Imakefile (Text)'
  1087. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/Imakefile' &&
  1088. #
  1089. #  Imakefile for display, animate, montage, and import.
  1090. #
  1091. #  Copyright 1993 E. I. du Pont de Nemours & Company
  1092. #
  1093. #  Permission to use, copy, modify, distribute, and sell this software and
  1094. #  its documentation for any purpose is hereby granted without fee,
  1095. #  provided that the above Copyright notice appear in all copies and that
  1096. #  both that Copyright notice and this permission notice appear in
  1097. #  supporting documentation, and that the name of E. I. du Pont de Nemours
  1098. #  & Company not be used in advertising or publicity pertaining to
  1099. #  distribution of the software without specific, written prior
  1100. #  permission.  E. I. du Pont de Nemours & Company makes no representations
  1101. #  about the suitability of this software for any purpose.  It is provided
  1102. #  "as is" without express or implied warranty.
  1103. #
  1104. #  E. I. du Pont de Nemours & Company disclaims all warranties with regard
  1105. #  to this software, including all implied warranties of merchantability
  1106. #  and fitness, in no event shall E. I. du Pont de Nemours & Company be
  1107. #  liable for any special, indirect or consequential damages or any
  1108. #  damages whatsoever resulting from loss of use, data or profits, whether
  1109. #  in an action of contract, negligence or other tortious action, arising
  1110. #  out of or in connection with the use or performance of this software.
  1111. #
  1112. X
  1113. #include "Magick.tmpl"
  1114. X
  1115. #define PassCDebugFlags CDEBUGFLAGS=DefaultCDebugFlags
  1116. X
  1117. MagickObjects= X.o image.o shear.o quantize.o colors.o signature.o decode.o\
  1118. X  encode.o compress.o utility.o PreRvIcccm.o
  1119. X
  1120. SRCS= display.c X.c image.c shear.c quantize.c colors.c signature.c decode.c \
  1121. X  encode.c compress.c utility.c PreRvIcccm.c
  1122. OBJS= display.o $(MagickObjects)
  1123. AnimateObjects= animate.o $(MagickObjects)
  1124. ImportObjects= import.o $(MagickObjects)
  1125. MontageObjects= montage.o $(MagickObjects)
  1126. X
  1127. PROGRAMS= display animate montage import
  1128. X
  1129. AllTarget($(PROGRAMS))
  1130. X
  1131. ComplexProgramTarget(display)
  1132. NormalProgramTarget(animate,$(AnimateObjects), , , )
  1133. InstallProgram(animate,$(BINDIR))
  1134. InstallManPage(animate,$(MANDIR))
  1135. NormalProgramTarget(montage,$(MontageObjects), , , )
  1136. InstallProgram(montage,$(BINDIR))
  1137. InstallManPage(montage,$(MANDIR))
  1138. NormalProgramTarget(import,$(ImportObjects), , , )
  1139. InstallProgram(import,$(BINDIR))
  1140. InstallManPage(import,$(MANDIR))
  1141. X
  1142. #define InstallMyManPage(file,destdir,suffix)                           @@\
  1143. install.man:: file.man                                                  @@\
  1144. X    $(INSTALL) -c $(INSTMANFLAGS) file.man $(DESTDIR)destdir/file.suffix
  1145. X
  1146. InstallMyManPage(quantize,$(MANSOURCEPATH)5,5)
  1147. InstallMyManPage(miff,$(MANSOURCEPATH)5,5)
  1148. X
  1149. #define IHaveSubdirs
  1150. X
  1151. SUBDIRS= utilities xtp
  1152. X
  1153. MakeSubdirs($(SUBDIRS))
  1154. DependSubdirs($(SUBDIRS))
  1155. SHAR_EOF
  1156. chmod 0644 ImageMagick/Imakefile ||
  1157. echo 'restore of ImageMagick/Imakefile failed'
  1158. Wc_c="`wc -c < 'ImageMagick/Imakefile'`"
  1159. test 2673 -eq "$Wc_c" ||
  1160.     echo 'ImageMagick/Imakefile: original size 2673, current size' "$Wc_c"
  1161. rm -f _shar_wnt_.tmp
  1162. fi
  1163. # ============= ImageMagick/Magick.tmpl ==============
  1164. if test -f 'ImageMagick/Magick.tmpl' -a X"$1" != X"-c"; then
  1165.     echo 'x - skipping ImageMagick/Magick.tmpl (File already exists)'
  1166.     rm -f _shar_wnt_.tmp
  1167. else
  1168. > _shar_wnt_.tmp
  1169. echo 'x - extracting ImageMagick/Magick.tmpl (Text)'
  1170. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/Magick.tmpl' &&
  1171. #ifndef XCOMM
  1172. #define XCOMM #
  1173. #endif
  1174. X
  1175. XXCOMM ImageMagick Imakefile info.  This contains any special redefinitions.
  1176. XXCOMM
  1177. XXCOMM Copyright 1993 E. I. du Pont de Nemours & Company
  1178. XXCOMM
  1179. XXCOMM Permission to use, copy, modify, distribute, and sell this software and
  1180. XXCOMM its documentation for any purpose is hereby granted without fee,
  1181. XXCOMM provided that the above Copyright notice appear in all copies and that
  1182. XXCOMM both that Copyright notice and this permission notice appear in
  1183. XXCOMM supporting documentation, and that the name of E. I. du Pont de Nemours
  1184. XXCOMM & Company not be used in advertising or publicity pertaining to
  1185. XXCOMM distribution of the software without specific, written prior
  1186. XXCOMM permission.  E. I. du Pont de Nemours & Company makes no representations
  1187. XXCOMM about the suitability of this software for any purpose.  It is provided
  1188. XXCOMM "as is" without express or implied warranty.
  1189. XXCOMM
  1190. XXCOMM E. I. du Pont de Nemours & Company disclaims all warranties with regard
  1191. XXCOMM to this software, including all implied warranties of merchantability
  1192. XXCOMM and fitness, in no event shall E. I. du Pont de Nemours & Company be
  1193. XXCOMM liable for any special, indirect or consequential damages or any
  1194. XXCOMM damages whatsoever resulting from loss of use, data or profits, whether
  1195. XXCOMM in an action of contract, negligence or other tortious action, arising
  1196. XXCOMM out of or in connection with the use or performance of this software.
  1197. X
  1198. XXCOMM If you have JPEG or TIFF, define HasJPEG or HasTIFF or both.  Make sure
  1199. XXCOMM the path names are correct.  See README for more details.
  1200. XXCOMM
  1201. XXCOMM #define HasTIFF
  1202. XXCOMM #define HasJPEG
  1203. X
  1204. #ifdef HasJPEG
  1205. JPEG_DEFINES= -DHasJPEG
  1206. JPEG_INCLUDES= -I$(TOP)/jpeg
  1207. JPEG_LIBRARIES= -L$(TOP)/jpeg -ljpeg
  1208. #endif
  1209. X
  1210. #ifdef HasTIFF
  1211. TIFF_DEFINES= -DHasTIFF
  1212. TIFF_INCLUDES= -I$(TOP)/tiff/libtiff
  1213. TIFF_LIBRARIES= -L$(TOP)/tiff/libtiff -ltiff
  1214. #endif
  1215. X
  1216. XXCOMM Might need extra libraries for xtp to link correctly.
  1217. XXCOMM
  1218. XXCOMM  EXTRA_LOAD_FLAGS= -lnsl
  1219. X
  1220. DEFINES= $(JPEG_DEFINES) $(JPEG_INCLUDES) $(TIFF_DEFINES) $(TIFF_INCLUDES)
  1221. LOCALDIR=/usr/local/bin
  1222. SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  1223. SHAR_EOF
  1224. chmod 0644 ImageMagick/Magick.tmpl ||
  1225. echo 'restore of ImageMagick/Magick.tmpl failed'
  1226. Wc_c="`wc -c < 'ImageMagick/Magick.tmpl'`"
  1227. test 2134 -eq "$Wc_c" ||
  1228.     echo 'ImageMagick/Magick.tmpl: original size 2134, current size' "$Wc_c"
  1229. rm -f _shar_wnt_.tmp
  1230. fi
  1231. # ============= ImageMagick/Make.com ==============
  1232. if test -f 'ImageMagick/Make.com' -a X"$1" != X"-c"; then
  1233.     echo 'x - skipping ImageMagick/Make.com (File already exists)'
  1234.     rm -f _shar_wnt_.tmp
  1235. else
  1236. > _shar_wnt_.tmp
  1237. echo 'x - extracting ImageMagick/Make.com (Text)'
  1238. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/Make.com' &&
  1239. $!
  1240. $! Make ImageMagick X image utilities for VMS.
  1241. $!
  1242. $
  1243. $define/nolog X11 decw$include:
  1244. $define/nolog sys sys$library:
  1245. $link_options="/nodebug/notraceback"
  1246. $define/nolog lnk$library sys$library:vaxcrtl
  1247. $
  1248. $if ((p1.nes."").and.(p1.nes."display")) then goto SkipDisplay
  1249. $write sys$output "Making Display..."
  1250. $call Make display
  1251. $call Make X
  1252. $call Make image
  1253. $call Make shear
  1254. $call Make quantize
  1255. $call Make colors
  1256. $call Make signature
  1257. $call Make compress
  1258. $call Make decode
  1259. $call Make encode
  1260. $call Make utility
  1261. $call Make PreRvIcccm
  1262. $
  1263. $link'link_options' display,X,image,shear,quantize,colors,signature, -
  1264. X  compress,decode,encode,utility,PreRvIcccm,sys$input:/opt
  1265. sys$share:decw$xlibshr.exe/share
  1266. $
  1267. $display:==$'f$environment("default")'display
  1268. $write sys$output "..symbol DISPLAY defined."
  1269. $
  1270. $SkipDisplay:
  1271. $if ((p1.nes."").and.(p1.nes."import")) then goto SkipImport
  1272. $write sys$output "Making Import..."
  1273. $call Make import
  1274. $call Make X
  1275. $call Make image
  1276. $call Make shear
  1277. $call Make quantize
  1278. $call Make colors
  1279. $call Make signature
  1280. $call Make compress
  1281. $call Make decode
  1282. $call Make encode
  1283. $call Make utility
  1284. $call Make PreRvIcccm
  1285. $
  1286. $link'link_options' import,X,image,shear,quantize,colors,signature,compress, -
  1287. X  decode,encode,utility,PreRvIcccm,sys$input:/opt
  1288. sys$share:decw$xlibshr.exe/share
  1289. $
  1290. $import:==$'f$environment("default")'import
  1291. $write sys$output "..symbol IMPORT defined."
  1292. $SkipImport:
  1293. $
  1294. $if ((p1.nes."").and.(p1.nes."animate")) then goto SkipAnimate
  1295. $write sys$output "Making Animate..."
  1296. $call Make animate
  1297. $call Make X
  1298. $call Make image
  1299. $call Make shear
  1300. $call Make quantize
  1301. $call Make colors
  1302. $call Make signature
  1303. $call Make compress
  1304. $call Make decode
  1305. $call Make encode
  1306. $call Make utility
  1307. $call Make PreRvIcccm
  1308. $
  1309. $link'link_options' animate,X,image,shear,quantize,colors,signature, -
  1310. X  compress,decode,encode,utility,PreRvIcccm,sys$input:/opt
  1311. sys$share:decw$xlibshr.exe/share
  1312. $
  1313. $animate:==$'f$environment("default")'animate
  1314. $write sys$output "..symbol ANIMATE defined."
  1315. $
  1316. $SkipAnimate:
  1317. $if ((p1.nes."").and.(p1.nes."montage")) then goto SkipMontage
  1318. $write sys$output "Making Montage..."
  1319. $call Make montage
  1320. $call Make X
  1321. $call Make image
  1322. $call Make shear
  1323. $call Make quantize
  1324. $call Make colors
  1325. $call Make compress
  1326. $call Make decode
  1327. $call Make encode
  1328. $call Make utility
  1329. $call Make PreRvIcccm
  1330. $
  1331. $link'link_options' montage,X,image,shear,quantize,colors,signature, -
  1332. X  compress,decode,encode,utility,PreRvIcccm,sys$input:/opt
  1333. sys$share:decw$xlibshr.exe/share
  1334. $
  1335. $montage:==$'f$environment("default")'montage
  1336. $write sys$output "..symbol MONTAGE defined."
  1337. $
  1338. $SkipMontage:
  1339. $type sys$input
  1340. X
  1341. Use this command to specify which X server to contact:
  1342. X
  1343. X  $set display/create/node=node_name::
  1344. X
  1345. This can be done automatically from your LOGIN.COM with the following 
  1346. command:
  1347. X
  1348. X  $if (f$trnlmn("sys$rem_node").nes."") then -
  1349. X  $  set display/create/node='f$trnlmn("sys$rem_node")'
  1350. $write sys$output "Making in [.utilities]"
  1351. $set default [.utilities]
  1352. $@make
  1353. $exit
  1354. $
  1355. $Make: subroutine
  1356. $!
  1357. $! A very primitive "make" (or MMS) hack for DCL.
  1358. $!
  1359. $if (p1.eqs."") then exit
  1360. $source_file=f$search(f$parse(p1,".c"))
  1361. $if (source_file.nes."")
  1362. $  then
  1363. $    object_file=f$parse(source_file,,,"name")+".obj"
  1364. $    object_file=f$search( object_file )
  1365. $    if (object_file.nes."") 
  1366. $      then
  1367. $        object_time=f$file_attribute(object_file,"cdt")
  1368. $        source_time=f$file_attribute(source_file,"cdt")
  1369. $        if (f$cvtime(object_time).lts.f$cvtime(source_time)) then -
  1370. $          object_file=""
  1371. $      endif
  1372. $    if (object_file.eqs."") 
  1373. $      then
  1374. $        write sys$output "Compiling ",p1
  1375. $        cc/nodebug/optimize 'source_file'
  1376. $      endif
  1377. $  endif
  1378. $exit
  1379. $endsubroutine
  1380. SHAR_EOF
  1381. chmod 0644 ImageMagick/Make.com ||
  1382. echo 'restore of ImageMagick/Make.com failed'
  1383. Wc_c="`wc -c < 'ImageMagick/Make.com'`"
  1384. test 3648 -eq "$Wc_c" ||
  1385.     echo 'ImageMagick/Make.com: original size 3648, current size' "$Wc_c"
  1386. rm -f _shar_wnt_.tmp
  1387. fi
  1388. # ============= ImageMagick/Makefile ==============
  1389. if test -f 'ImageMagick/Makefile' -a X"$1" != X"-c"; then
  1390.     echo 'x - skipping ImageMagick/Makefile (File already exists)'
  1391.     rm -f _shar_wnt_.tmp
  1392. else
  1393. > _shar_wnt_.tmp
  1394. echo 'x - extracting ImageMagick/Makefile (Text)'
  1395. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/Makefile' &&
  1396. #
  1397. #  Generic makefile for display, animate, montage, and import for
  1398. #  computers that do not have xmkmf.
  1399. #
  1400. #  Copyright 1993 E. I. du Pont de Nemours & Company
  1401. #
  1402. #  Permission to use, copy, modify, distribute, and sell this software and
  1403. #  its documentation for any purpose is hereby granted without fee,
  1404. #  provided that the above Copyright notice appear in all copies and that
  1405. #  both that Copyright notice and this permission notice appear in
  1406. #  supporting documentation, and that the name of E. I. du Pont de Nemours
  1407. #  & Company not be used in advertising or publicity pertaining to
  1408. #  distribution of the software without specific, written prior
  1409. #  permission.  E. I. du Pont de Nemours & Company makes no representations
  1410. #  about the suitability of this software for any purpose.  It is provided
  1411. #  "as is" without express or implied warranty.
  1412. #
  1413. #  E. I. du Pont de Nemours & Company disclaims all warranties with regard
  1414. #  to this software, including all implied warranties of merchantability
  1415. #  and fitness, in no event shall E. I. du Pont de Nemours & Company be
  1416. #  liable for any special, indirect or consequential damages or any
  1417. #  damages whatsoever resulting from loss of use, data or profits, whether
  1418. #  in an action of contract, negligence or other tortious action, arising
  1419. #  out of or in connection with the use or performance of this software.
  1420. #
  1421. X
  1422. #
  1423. # Uncomment the following lines if you have the JPEG or TIFF libraries.
  1424. # See README for more details.
  1425. #
  1426. #TOP= .
  1427. #JPEG_DEFINES= -DHasJPEG
  1428. #JPEG_INCLUDES= -I$(TOP)/jpeg
  1429. #JPEG_LIBRARIES= -L$(TOP)/jpeg -ljpeg
  1430. #TIFF_DEFINES= -DHasTIFF
  1431. #TIFF_INCLUDES= -I$(TOP)/tiff/libtiff
  1432. #TIFF_LIBRARIES= -L$(TOP)/tiff/libtiff -ltiff
  1433. X
  1434. XXLIB= -L/usr/lib/X11R5 -lX11
  1435. X
  1436. CC= cc -O -I/usr/include/X11R5
  1437. DESTDIR= /usr/bin/X11
  1438. INSTALL = install -c
  1439. RM= /bin/rm -f
  1440. X
  1441. DEFINES= $(JPEG_DEFINES) $(JPEG_INCLUDES) $(TIFF_DEFINES) $(TIFF_INCLUDES)
  1442. SYS_LIBRARIES= $(XLIB) $(JPEG_LIBRARIES) $(TIFF_LIBRARIES) -lm
  1443. X
  1444. MagickObjects= X.o image.o shear.o quantize.o colors.o signature.o decode.o\
  1445. X  encode.o compress.o utility.o PreRvIcccm.o
  1446. X
  1447. DisplayObjects= display.o $(MagickObjects)
  1448. AnimateObjects= animate.o $(MagickObjects)
  1449. ImportObjects= import.o $(MagickObjects)
  1450. MontageObjects= montage.o $(MagickObjects)
  1451. X
  1452. PROGRAMS= display animate montage import
  1453. X
  1454. CFLAGS= $(DEFINES)
  1455. X
  1456. all: $(PROGRAMS)
  1457. X
  1458. display: $(DisplayObjects)
  1459. X    $(RM) $@
  1460. X    $(CC) -o $@ $(DisplayObjects) $(SYS_LIBRARIES)
  1461. X
  1462. clean::
  1463. X    $(RM) display
  1464. X
  1465. install:: display
  1466. X    $(INSTALL) display $(DESTDIR)
  1467. X
  1468. animate: $(AnimateObjects)
  1469. X    $(RM) $@
  1470. X    $(CC) -o $@ $(AnimateObjects) $(SYS_LIBRARIES)
  1471. X
  1472. clean::
  1473. X    $(RM) animate
  1474. X
  1475. install:: animate
  1476. X    $(INSTALL) animate $(DESTDIR)
  1477. X
  1478. montage: $(MontageObjects)
  1479. X    $(RM) $@
  1480. X    $(CC) -o $@ $(MontageObjects) $(SYS_LIBRARIES)
  1481. X
  1482. clean::
  1483. X    $(RM) montage
  1484. X
  1485. install:: montage
  1486. X    $(INSTALL) montage $(DESTDIR)
  1487. X
  1488. import: $(ImportObjects)
  1489. X    $(RM) $@
  1490. X    $(CC) -o $@ $(ImportObjects) $(SYS_LIBRARIES)
  1491. X
  1492. clean::
  1493. X    $(RM) import
  1494. X
  1495. install:: import
  1496. X    $(INSTALL) import $(DESTDIR)
  1497. X
  1498. clean::
  1499. X    $(RM) *.ln *.bak *.o core errs ,* *~ *.a .emacs_* make.log MakeOut
  1500. SHAR_EOF
  1501. chmod 0644 ImageMagick/Makefile ||
  1502. echo 'restore of ImageMagick/Makefile failed'
  1503. Wc_c="`wc -c < 'ImageMagick/Makefile'`"
  1504. test 3027 -eq "$Wc_c" ||
  1505.     echo 'ImageMagick/Makefile: original size 3027, current size' "$Wc_c"
  1506. rm -f _shar_wnt_.tmp
  1507. fi
  1508. # ============= ImageMagick/Manifest.ps ==============
  1509. if test -f 'ImageMagick/Manifest.ps' -a X"$1" != X"-c"; then
  1510.     echo 'x - skipping ImageMagick/Manifest.ps (File already exists)'
  1511.     rm -f _shar_wnt_.tmp
  1512. else
  1513. > _shar_wnt_.tmp
  1514. echo 'x - extracting ImageMagick/Manifest.ps (Text)'
  1515. sed 's/^X//' << 'SHAR_EOF' > 'ImageMagick/Manifest.ps' &&
  1516. %!PS-Adobe-2.0 EPSF-2.0
  1517. %%Title: (Directory map of ImageMagick)
  1518. %%Creator: pstree, (C) 1990 Gisle Aas, NR
  1519. %%DocumentFonts: Times-Roman
  1520. %%BoundingBox: 60 82 305 742
  1521. 60.0 0 translate
  1522. /s {show} bind def
  1523. /m {moveto} bind def
  1524. /Times-Roman findfont 10 scalefont setfont
  1525. 0.1 setlinewidth
  1526. 90 732 m(ChangeLog)s
  1527. 90 722 m(Imakefile)s
  1528. 90 712 m(Magick.tmpl)s
  1529. 90 702 m(Make.com)s
  1530. 90 692 m(Makefile)s
  1531. 90 682 m(Manifest.ps)s
  1532. 90 672 m(PreRvIcccm.c)s
  1533. 90 662 m(PreRvIcccm.h)s
  1534. 90 652 m(README)s
  1535. 90 642 m(SYNOPSIS)s
  1536. 90 632 m(X.c)s
  1537. 90 622 m(X.h)s
  1538. 90 612 m(XWDFile.h)s
  1539. 90 602 m(animate.c)s
  1540. 90 592 m(animate.h)s
  1541. 90 582 m(animate.man)s
  1542. 90 572 m(colors.c)s
  1543. 90 562 m(compress.c)s
  1544. 90 552 m(compress.h)s
  1545. 90 542 m(decode.c)s
  1546. 90 532 m(display.c)s
  1547. 90 522 m(display.h)s
  1548. 90 512 m(display.man)s
  1549. 90 502 m(encode.c)s
  1550. 90 492 m(image.c)s
  1551. 90 482 m(image.h)s
  1552. 180 472 m(README)s
  1553. 180 462 m(aquarium.miff)s
  1554. 180 452 m(dna.miff)s
  1555. 180 442 m(montage.miff)s
  1556. 180 432 m(swan.miff)s
  1557. 90 452 m(images)s
  1558. (images) stringwidth pop 91.0 add 455.3 m
  1559. [ 475.3 465.3 455.3 445.3 435.3]
  1560. {gsave 176.0 exch lineto stroke grestore} forall
  1561. 90 422 m(import.c)s
  1562. 90 412 m(import.man)s
  1563. 90 402 m(miff.man)s
  1564. 90 392 m(montage.c)s
  1565. 90 382 m(montage.man)s
  1566. 90 372 m(quantize.c)s
  1567. 90 362 m(quantize.man)s
  1568. 180 352 m(Makefile)s
  1569. 180 342 m(README)s
  1570. 180 332 m(dna.script)s
  1571. 90 342 m(scenes)s
  1572. (scenes) stringwidth pop 91.0 add 345.3 m
  1573. [ 355.3 345.3 335.3]
  1574. {gsave 176.0 exch lineto stroke grestore} forall
  1575. 90 322 m(shear.c)s
  1576. 90 312 m(signature.c)s
  1577. 180 302 m(Imakefile)s
  1578. 180 292 m(Make.com)s
  1579. 180 282 m(Makefile)s
  1580. 180 272 m(combine.c)s
  1581. 180 262 m(combine.man)s
  1582. 180 252 m(convert.c)s
  1583. 180 242 m(convert.man)s
  1584. 180 232 m(mogrify.c)s
  1585. 180 222 m(mogrify.man)s
  1586. 180 212 m(segment.c)s
  1587. 180 202 m(segment.man)s
  1588. 90 252 m(utilities)s
  1589. (utilities) stringwidth pop 91.0 add 255.3 m
  1590. [ 305.3 295.3 285.3 275.3 265.3 255.3 245.3 235.3 225.3 215.3 205.3]
  1591. {gsave 176.0 exch lineto stroke grestore} forall
  1592. 90 192 m(utility.c)s
  1593. 90 182 m(utility.h)s
  1594. 180 172 m(Imakefile)s
  1595. 180 162 m(Makefile)s
  1596. 180 152 m(README)s
  1597. 180 142 m(get)s
  1598. 180 132 m(network.c)s
  1599. 180 122 m(regular.c)s
  1600. 180 112 m(regular.h)s
  1601. 180 102 m(xtp.c)s
  1602. 180 92 m(xtp.h)s
  1603. 180 82 m(xtp.man)s
  1604. 90 127 m(xtp)s
  1605. (xtp) stringwidth pop 91.0 add 130.3 m
  1606. [ 175.3 165.3 155.3 145.3 135.3 125.3 115.3 105.3 95.3 85.3]
  1607. {gsave 176.0 exch lineto stroke grestore} forall
  1608. 0 430 m(ImageMagick)s
  1609. (ImageMagick) stringwidth pop 1.0 add 432.8 m
  1610. [ 735.3 725.3 715.3 705.3 695.3 685.3 675.3 665.3 655.3 645.3 635.3 625.3 615.3 605.3 595.3 585.3 575.3 565.3 555.3 545.3 535.3 525.3 515.3 505.3 495.3 485.3 455.3 425.3 415.3 405.3 395.3 385.3 375.3 365.3 345.3 325.3 315.3 255.3 195.3 185.3 130.3]
  1611. SHAR_EOF
  1612. true || echo 'restore of ImageMagick/Manifest.ps failed'
  1613. fi
  1614. echo 'End of ImageMagick part 7'
  1615. echo 'File ImageMagick/Manifest.ps is continued in part 8'
  1616. echo 8 > _shar_seq_.tmp
  1617. exit 0
  1618.  
  1619. exit 0 # Just in case...
  1620. -- 
  1621.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  1622. \X/  Amiga - The only way to fly! |    sources-x@sterling.com
  1623.  "It's intuitively obvious to the |
  1624.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1625.