Commit 58c04880 authored by saeed's avatar saeed

a bit cleaning

parent 343bb7ce
......@@ -55,7 +55,6 @@ static void floatostr(float a, char *str, int nafterdecimalpoint){
int sign = 1;
long long int ia = (long long int) (a);
if (a < 0) {
//printf("we are here\n");
sign = -1;
a = (-a);
ia = (long long int) (a);
......@@ -65,7 +64,6 @@ static void floatostr(float a, char *str, int nafterdecimalpoint){
float b = a - (float)ia;
float bt = b;
int hitnonzero = 0;
//printf("b is %f\n",b);
for(int i=0; i < nafterdecimalpoint;++i){
n *= 10L;
bt *= 10L;
......
......@@ -164,7 +164,7 @@ int main(int argc, char *argv[]){
struct Colort *scolor = NULL;
get2dfield_binary("bathy_precise_etopo2.bin",&FLD);
get2dfield_binary("bathy.bin",&FLD);
struct Vis visu = init_x(width,height);
struct dsp_field dspf = adjusttowindowsize(&visu, &FLD);
......
......@@ -19,7 +19,6 @@ static int Isdigit(char C){
return result;
}
static int getLen(char *str){
int result = 0;
......@@ -73,13 +72,14 @@ static void getreportype(char *filename,char *reportype){
char *era = "odb_era5_";
char *precise = "odb_precise_";
char *beg = NULL;
char *end = NULL;
char *str = filename;
int first = -1, last = -1;
find(era, filename, &first, &last);
printf("first %d last %d\n",first, last);
if (first == -1 || last == -1){
first = -1;
last = -1;
......@@ -95,7 +95,6 @@ static void getreportype(char *filename,char *reportype){
str = str + last + 1;
}
printf("str %c \n",*str);
while (*str != '\0'){
beg = NULL;
if (Isdigit(*str)){
......@@ -164,10 +163,6 @@ static int Strcmp(char *str1, char *str2){
}
static void getdescandgroup(struct odbinfo *odbinfo){
for (int i=0; i < ArrayCount(reports);++i){
if (Strcmp(reports[i].code,odbinfo->reportype)){
......@@ -195,7 +190,6 @@ static struct station *getstn(char *filename, struct odbinfo *odbinfo){
rewind(fin);
result = (struct station *)malloc(sizeof(struct station) * nl);
result->ns = nl;
//intostr(nl, odbinfo->ntotal);
int date, cycle, dum1, dum2, dum3;
float lat, lon;
int iter = 0;
......@@ -209,7 +203,6 @@ static struct station *getstn(char *filename, struct odbinfo *odbinfo){
char cname[256] = {'\0'};
intostr(iter, cname);
copy_string(cname,result[iter].name, 255);
//printf("%s\n",result[iter].name);
result[iter].lon = lon;
result[iter].lat = lat;
result[iter].ix = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment