| 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 "standard.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 */ |
| 140 |
|
char **av; |
| 141 |
|
FILE *fp; |
| 142 |
|
{ |
| 202 |
– |
int quote; |
| 203 |
– |
|
| 143 |
|
while (ac-- > 0) { |
| 144 |
|
fputword(*av++, fp); |
| 145 |
|
fputc(ac ? ' ' : '\n', fp); |