Linuxpops
3.01.04
Spectral Anaysis Package for Single Dish Data
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
makeversion.c
Go to the documentation of this file.
1
/*
2
Copyright 2021 Arizona Board of Regents on behalf of the University of Arizona.
3
4
For commercial uses, to obtain a license to sell and or sublicense copies of
5
the Software please contact the University of Arizona at Tech Launch Arizona:
6
lewish@tla.arizona.edu.
7
8
Permission is hereby granted, free of charge, to any person obtaining a copy
9
of this software and associated documentation files (the "Software"), to deal
10
in the Software without restriction for non-commercial use educational and
11
research purposes, including without limitation the rights to use, copy,
12
modify, merge, publish, distribute, and to permit persons to whom the Software
13
is furnished to do so, subject to the following conditions:
14
15
The entire above copyright notice and this permission notice shall be included
16
in all copies or substantial portions of the Software.
17
18
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
SOFTWARE.
25
26
1. Additional Required Provisions
27
28
1.1. Arbitration. The parties agree that if a dispute arises between them
29
concerning this Agreement, the parties may be required to submit the matter to
30
arbitration pursuant to Arizona law.
31
32
1.2. Applicable Law and Venue. This Agreement shall be interpreted pursuant
33
to the laws of the State of Arizona. Any arbitration or litigation between the
34
Parties shall be conducted in Pima County, ARIZONA, and LICENSEE hereby
35
submits to venue and jurisdiction in Pima County, ARIZONA.
36
37
1.3. Non-Discrimination. The Parties agree to be bound by state and federal
38
laws and regulations governing equal opportunity and non-discrimination and
39
immigration.
40
41
1.4. Appropriation of Funds. The Parties recognize that performance by
42
ARIZONA may depend upon appropriation of funds by the State Legislature of
43
ARIZONA. If the Legislature fails to appropriate the necessary funds, or if
44
ARIZONA’S appropriation is reduced during the fiscal year, ARIZONA may cancel
45
this Agreement without further duty or obligation. ARIZONA will notify
46
LICENSEE as soon as reasonably possible after it knows of the loss of funds.
47
48
1.5. Conflict of Interest. This Agreement is subject to the provisions of
49
A.R.S. 38-511 and other conflict of interest regulations. Within three years
50
of the EFFECTIVE DATE, ARIZONA may cancel this Agreement if any person
51
significantly involved in initiating, negotiating, drafting, securing, or
52
creating this Agreement for or on behalf of ARIZONA becomes an employee or
53
consultant in any capacity of LICENSEE with respect to the subject matter of
54
this Agreement.
55
56
*/
57
58
59
#include <stdlib.h>
60
#include <stdio.h>
61
#include <strings.h>
62
#include <string.h>
63
#include <unistd.h>
64
65
int
main
(argc, argv)
66
int argc;
67
char
*argv[];
68
{
69
int
n, major, minor,
version
;
70
char
verStr[256];
71
FILE *
fp
;
72
73
if
((fp = fopen(
".version"
,
"r"
) ) <= (FILE *)0)
74
{
75
printf(
"2.6.01\n"
);
76
exit(1);
77
}
78
79
n = fscanf(fp,
"%d.%d.%d"
, &major, &minor, &version);
80
81
if
(n == 3)
82
{
83
if
(argc > 1 && !
strcmp
(argv[1],
"-i"
))
/* Increment */
84
{
85
version++;
86
87
if
(version > 99)
88
{
89
minor++;
90
version = 1;
91
}
92
}
93
94
sprintf(verStr,
"%d.%d.%02d"
, major, minor, version);
95
}
96
else
97
{
98
printf(
"2.6.01\n"
);
99
fclose(fp);
100
101
exit(1);
102
}
103
104
fclose(fp);
105
106
printf(
"%s\n"
, verStr);
107
108
if
((fp = fopen(
".version"
,
"w"
) ) <= (FILE *)0)
109
{
110
exit(1);
111
}
112
113
fprintf(fp,
"%s\n"
, verStr);
114
115
fclose(fp);
116
117
exit(0);
118
}
main
int main(void)
Definition:
gsl_try_2.c:176
fp
FILE * fp
Definition:
linuxpops.c:70
version
int version
Definition:
dataserv.c:41
strcmp
int strcmp()
linuxpops
makeversion.c
Generated on Mon Feb 21 2022 20:37:02 for Linuxpops by
1.8.5