-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2031 from JakeOShannessy/read-slice-no-global
split slice functions and move to shared
- Loading branch information
Showing
30 changed files
with
959 additions
and
914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,8 +56,3 @@ void FreeContour(contour *ci); | |
void FreeContours(contour *contours,int ncontours); | ||
|
||
#endif | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include "options.h" | ||
#include "MALLOCC.h" | ||
#include "string_util.h" | ||
#include "gd.h" | ||
#include <math.h> | ||
|
||
#include <string.h> | ||
#include "smokeviewdefs.h" | ||
#include "contourdefs.h" | ||
#include "isodefs.h" | ||
#include "histogram.h" | ||
#include "structures.h" | ||
#include "datadefs.h" | ||
|
||
/* ------------------ GetSliceFileHeader ------------------------ */ | ||
|
||
void GetSliceFileHeader(char *file, int *ip1, int *ip2, int *jp1, int *jp2, int *kp1, int *kp2, int *error){ | ||
FILE *stream = NULL; | ||
int vals[6]; | ||
|
||
stream = fopen(file, "rb"); | ||
*error = 1; | ||
*ip1 = 0; | ||
*ip2 = 0; | ||
*jp1 = 0; | ||
*jp2 = 0; | ||
*kp1 = 0; | ||
*kp2 = 0; | ||
if(stream==NULL)return; | ||
fseek(stream, 3*(4+30+4), SEEK_CUR); | ||
fseek(stream, 4, SEEK_CUR); fread(vals, sizeof(int), 6, stream); | ||
*ip1 = vals[0]; | ||
*ip2 = vals[1]; | ||
*jp1 = vals[2]; | ||
*jp2 = vals[3]; | ||
*kp1 = vals[4]; | ||
*kp2 = vals[5]; | ||
*error = 0; | ||
fclose(stream); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef READSLICE_H_DEFINED | ||
#define READSLICE_H_DEFINED | ||
#include "options.h" | ||
#include "MALLOCC.h" | ||
#include "string_util.h" | ||
#include "gd.h" | ||
|
||
#include <string.h> | ||
|
||
void GetSliceFileHeader(char *file, int *ip1, int *ip2, int *jp1, int *jp2, int *kp1, int *kp2, int *error); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.