ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/header.c
(Generate patch)

Comparing ray/src/common/header.c (file contents):
Revision 2.11 by greg, Sat Feb 22 02:07:22 2003 UTC vs.
Revision 2.17 by schorsch, Mon Jun 30 14:59:11 2003 UTC

# Line 24 | Line 24 | static const char      RCSid[] = "$Id$";
24   *  To copy header from input to output, use getheader(fin, fputs, fout)
25   */
26  
27 < /* ====================================================================
28 < * The Radiance Software License, Version 1.0
29 < *
30 < * Copyright (c) 1990 - 2002 The Regents of the University of California,
31 < * through Lawrence Berkeley National Laboratory.   All rights reserved.
32 < *
33 < * Redistribution and use in source and binary forms, with or without
34 < * modification, are permitted provided that the following conditions
35 < * are met:
36 < *
37 < * 1. Redistributions of source code must retain the above copyright
38 < *         notice, this list of conditions and the following disclaimer.
39 < *
40 < * 2. Redistributions in binary form must reproduce the above copyright
41 < *       notice, this list of conditions and the following disclaimer in
42 < *       the documentation and/or other materials provided with the
43 < *       distribution.
44 < *
45 < * 3. The end-user documentation included with the redistribution,
46 < *           if any, must include the following acknowledgment:
47 < *             "This product includes Radiance software
48 < *                 (http://radsite.lbl.gov/)
49 < *                 developed by the Lawrence Berkeley National Laboratory
50 < *               (http://www.lbl.gov/)."
51 < *       Alternately, this acknowledgment may appear in the software itself,
52 < *       if and wherever such third-party acknowledgments normally appear.
53 < *
54 < * 4. The names "Radiance," "Lawrence Berkeley National Laboratory"
55 < *       and "The Regents of the University of California" must
56 < *       not be used to endorse or promote products derived from this
57 < *       software without prior written permission. For written
58 < *       permission, please contact [email protected].
59 < *
60 < * 5. Products derived from this software may not be called "Radiance",
61 < *       nor may "Radiance" appear in their name, without prior written
62 < *       permission of Lawrence Berkeley National Laboratory.
63 < *
64 < * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
65 < * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
66 < * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
67 < * DISCLAIMED.   IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR
68 < * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
69 < * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
70 < * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
71 < * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
72 < * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
73 < * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
74 < * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
75 < * SUCH DAMAGE.
76 < * ====================================================================
77 < *
78 < * This software consists of voluntary contributions made by many
79 < * individuals on behalf of Lawrence Berkeley National Laboratory.   For more
80 < * information on Lawrence Berkeley National Laboratory, please see
81 < * <http://www.lbl.gov/>.
82 < */
27 > #include "copyright.h"
28  
29   #include  <stdio.h>
30   #include  <string.h>
31   #include  <time.h>
32   #include  <ctype.h>
33  
34 + #include "resolu.h"
35 +
36   #define  MAXLINE        512
37  
91 #ifndef BSD
92 #define  index  strchr
93 #endif
94
95 extern char  *index();
96
38   char  HDRSTR[] = "#?";          /* information header magic number */
39  
40   char  FMTSTR[] = "FORMAT=";     /* format identifier */
41  
42   char  TMSTR[] = "CAPDATE=";     /* capture date identifier */
43  
44 + extern void     fputword(char *s, FILE *fp);
45 +
46   static int mycheck();
47  
48  
# Line 199 | Line 142 | int  ac;
142   char  **av;
143   FILE  *fp;
144   {
202        int  quote;
203
145          while (ac-- > 0) {
146                  fputword(*av++, fp);
147                  fputc(ac ? ' ' : '\n', fp);
# Line 368 | Line 309 | FILE  *fout;
309  
310          cdat.fp = fout;
311          cdat.fs[0] = '\0';
312 <        if (getheader(fin, mycheck, &cdat) < 0)
312 >        if (getheader(fin, mycheck, (char *)&cdat) < 0)
313                  return(-1);
314          if (!cdat.fs[0])
315                  return(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines