home *** CD-ROM | disk | FTP | other *** search
/ vis-ftp.cs.umass.edu / vis-ftp.cs.umass.edu.tar / vis-ftp.cs.umass.edu / pub / Software / universal_plane_file_format / copy_plane.c < prev    next >
C/C++ Source or Header  |  1990-11-05  |  1KB  |  43 lines

  1. /* -*-c-mode-*- */
  2. /*------------------------------------------------------
  3.  *  COPY_PLANE.C - Program to copy a plane file.  The format of the output 
  4.  *           plane file is always 'native'
  5.  *  Robert Heller Created on Wed Jul 12 12:28:04 1989
  6.  *  Last mod - 
  7.  *--------------------------------------------------------
  8.  *  Contents:
  9.  *--------------------------------------------------------
  10.  * (c) Copyright 1989 by The University of Massachusetts
  11.  *------------------------------------------------------*/
  12.  
  13. #include <stdio.h>
  14.  
  15. #include <llvs_per_plane.h>
  16.  
  17. main(argc,argv)
  18. int argc;
  19. char *argv[];
  20. {
  21.     PLANE *inpl;
  22.     PLANE_INFO *inpl_info;
  23.     char *assoc;
  24.  
  25.     if (argc != 3) usage();
  26.     if (read_plane(&inpl,&inpl_info,&assoc,argv[1]) < 0) {
  27.     perror(argv[0]);
  28.     exit(12);
  29.     }
  30.     if (write_plane(inpl,inpl_info,assoc,argv[2]) < 0) {
  31.     perror(argv[0]);
  32.     exit(12);
  33.     }
  34.     }
  35.  
  36. usage()
  37. {
  38.     fprintf(stderr,"SYNOPIS: copy_plane input_plane_file output_plane_file\n");
  39.     fprintf(stderr,"This program copies the input_plane_file to the\n");
  40.     fprintf(stderr,"output_plane_file.\n\n");
  41.     exit(12);
  42.     }
  43.