Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrew Bauer
VTK
Commits
99ea226c
Commit
99ea226c
authored
Nov 03, 1995
by
Ken Martin
Browse files
minor compiler fixes
parent
b1c83e6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vtkCyberReader.cc
View file @
99ea226c
...
...
@@ -527,7 +527,7 @@ static void gstovtx (GSPEC* gs, struct Vertex *vtx)
{
float
theta
,
theta_incr
;
/* angle of lg and increment */
short
lt
,
lg
;
/* latitude/longitude counters */
int
radius
;
/* radius from input image */
unsigned
int
radius
;
/* radius from input image */
float
r
,
x
,
y
;
/* rectangular coords */
float
y_incr
;
/* latitudnal increment */
float
sin_theta
,
cos_theta
;
/* time savers */
...
...
@@ -713,34 +713,39 @@ static int gsget(GSPEC* gs, int fd)
static
int
gdget
(
GSPEC
*
gs
,
int
fd
)
{
unsigned
long
count
=
(
long
)
sizeof
(
short
)
*
(
long
)
gs
->
nlt
*
(
long
)
gs
->
nlg
;
unsigned
int
n
;
unsigned
int
readsize
;
char
*
addr
;
unsigned
size
=
count
;
/* if unallocated, allocate image memory */
if
(
gs
->
base
==
NULL
)
{
if
(
gdallo
(
gs
)
==
-
1
)
{
return
(
-
1
);
}
}
unsigned
long
count
=
(
long
)
sizeof
(
short
)
*
(
long
)
gs
->
nlt
*
(
long
)
gs
->
nlg
;
int
n
;
unsigned
int
readsize
;
char
*
addr
;
unsigned
size
=
count
;
/* if unallocated, allocate image memory */
if
(
gs
->
base
==
NULL
)
{
if
(
gdallo
(
gs
)
==
-
1
)
{
return
(
-
1
);
}
}
if
(
lseek
(
fd
,
gs
->
offset
,
0
)
==
-
1L
)
{
perror
(
STR026
);
return
(
-
1
);
}
addr
=
(
char
*
)
gs
->
base
;
while
(
count
>
0
)
{
readsize
=
(
unsigned
int
)
MIN
(
size
,
count
);
if
((
n
=
read
(
fd
,
addr
,
readsize
))
==
-
1L
)
{
perror
(
STR027
);
return
(
-
1
);
}
count
-=
(
unsigned
long
)
n
;
addr
+=
n
;
}
return
(
0
);
if
(
lseek
(
fd
,
gs
->
offset
,
0
)
==
-
1L
)
{
perror
(
STR026
);
return
(
-
1
);
}
addr
=
(
char
*
)
gs
->
base
;
while
(
count
>
0
)
{
readsize
=
(
unsigned
int
)
MIN
(
size
,
count
);
if
((
n
=
read
(
fd
,
addr
,
readsize
))
==
-
1
)
{
perror
(
STR027
);
return
(
-
1
);
}
count
-=
(
unsigned
long
)
n
;
addr
+=
n
;
}
return
(
0
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment