~libecbufr-dev/libecbufr/0.8.6

« back to all changes in this revision

Viewing changes to API/Sources/bufr_io.c

  • Committer: vanh.souvanlasy at gc
  • Date: 2015-05-01 14:22:29 UTC
  • Revision ID: vanh.souvanlasy@ec.gc.ca-20150501142229-n94o45dw3zdm7mlg
trimming of trailing zero is now optional, it can be deactived with a call to   bufr_set_trimzero( 0 );

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
static int  debugmode=0;
55
55
static int  verbosemode=0;
 
56
static int  trimzero_mode=1;
56
57
 
57
58
static void (*udf_abort)(const char *msg) = NULL;
58
59
 
2282
2283
   return 0;
2283
2284
   }
2284
2285
 
 
2286
/**
 
2287
 * @english
 
2288
 * set state of trailing zeroes removal
 
2289
 * @endenglish
 
2290
 * @francais
 
2291
 * etablit la condition de suppression des zeros
 
2292
 * @endfrancais
 
2293
 * @author Vanh Souvanlasy
 
2294
 * @ingroup debug
 
2295
 */
 
2296
void bufr_set_trimzero(int mode)
 
2297
   {
 
2298
   trimzero_mode = mode;
 
2299
   }
 
2300
 
 
2301
/**
 
2302
 * @english
 
2303
 * return state of trailing zeroes removal 
 
2304
 * @endenglish
 
2305
 * @francais
 
2306
 * retourne la condition de suppression des zeros
 
2307
 * @endfrancais
 
2308
 * @author Vanh Souvanlasy
 
2309
 * @ingroup debug internal
 
2310
 * @author  Vanh Souvanlasy
 
2311
 */
 
2312
int bufr_is_trimzero(void) 
 
2313
   {
 
2314
   return (trimzero_mode != 0) ? 1 : 0;
 
2315
   }
 
2316