1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 * Copyright by The HDF Group. * 3 * All rights reserved. * 4 * * 5 * This file is part of HDF5. The full HDF5 copyright notice, including * 6 * terms governing use, modification, and redistribution, is contained in * 7 * the COPYING file, which can be found at the root of the source code * 8 * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * 9 * If you do not have access to either file, you may request a copy from * 10 * help@hdfgroup.org. * 11 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 12 13 #ifndef PIO_STANDALONE_H__ 14 #define PIO_PERF_H__ 15 16 /* Header file for building h5perf by standalone mode. 17 * Created: Christian Chilan, 2005/5/18. 18 */ 19 20 /** From H5private.h **/ 21 22 #include "H5public.h" /* Include Public Definitions */ 23 24 25 /* 26 * Include ANSI-C header files. 27 */ 28 #ifdef H5_STDC_HEADERS 29 # include <assert.h> 30 # include <ctype.h> 31 # include <errno.h> 32 # include <fcntl.h> 33 # include <float.h> 34 # include <limits.h> 35 # include <math.h> 36 # include <signal.h> 37 # include <stdarg.h> 38 # include <stdio.h> 39 # include <stdlib.h> 40 # include <string.h> 41 #endif 42 43 /* 44 * Redefine all the POSIX functions. We should never see a POSIX 45 * function (or any other non-HDF5 function) in the source! 46 */ 47 #define HDabort() abort() 48 #define HDabs(X) abs(X) 49 #ifdef H5_HAVE_WIN32_API 50 #define HDaccess(F,M) _access(F, M) 51 #define R_OK 4 /* Test for read permission. */ 52 #define W_OK 2 /* Test for write permission. */ 53 #define X_OK 1 /* Test for execute permission. */ 54 #define F_OK 0 /* Test for existence. */ 55 #else /* H5_HAVE_WIN32_API */ 56 #define HDaccess(F,M) access(F, M) 57 #ifndef F_OK 58 #define F_OK 00 59 #define W_OK 02 60 #define R_OK 04 61 #endif 62 #endif /* H5_HAVE_WIN32_API */ 63 #define HDacos(X) acos(X) 64 #ifdef H5_HAVE_ALARM 65 #define HDalarm(N) alarm(N) 66 #else /* H5_HAVE_ALARM */ 67 #define HDalarm(N) (0) 68 #endif /* H5_HAVE_ALARM */ 69 #define HDasctime(T) asctime(T) 70 #define HDasin(X) asin(X) 71 #define HDasprintf asprintf /*varargs*/ 72 #define HDassert(X) assert(X) 73 #define HDatan(X) atan(X) 74 #define HDatan2(X,Y) atan2(X,Y) 75 #define HDatexit(F) atexit(F) 76 #define HDatof(S) atof(S) 77 #define HDatoi(S) atoi(S) 78 #define HDatol(S) atol(S) 79 #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F) 80 #define HDcalloc(N,Z) calloc(N,Z) 81 #define HDceil(X) ceil(X) 82 #define HDcfgetispeed(T) cfgetispeed(T) 83 #define HDcfgetospeed(T) cfgetospeed(T) 84 #define HDcfsetispeed(T,S) cfsetispeed(T,S) 85 #define HDcfsetospeed(T,S) cfsetospeed(T,S) 86 #define HDchdir(S) chdir(S) 87 #define HDchmod(S,M) chmod(S,M) 88 #define HDchown(S,O,G) chown(S,O,G) 89 #define HDclearerr(F) clearerr(F) 90 #define HDclock() clock() 91 #define HDclose(F) close(F) 92 #define HDclosedir(D) closedir(D) 93 #define HDcos(X) cos(X) 94 #define HDcosh(X) cosh(X) 95 #define HDcreat(S,M) creat(S,M) 96 #define HDctermid(S) ctermid(S) 97 #define HDctime(T) ctime(T) 98 #define HDcuserid(S) cuserid(S) 99 #ifdef H5_HAVE_DIFFTIME 100 #define HDdifftime(X,Y) difftime(X,Y) 101 #else 102 #define HDdifftime(X,Y) ((double)(X)-(double)(Y)) 103 #endif 104 #define HDdiv(X,Y) div(X,Y) 105 #define HDdup(F) dup(F) 106 #define HDdup2(F,I) dup2(F,I) 107 /* execl() variable arguments */ 108 /* execle() variable arguments */ 109 /* execlp() variable arguments */ 110 #define HDexecv(S,AV) execv(S,AV) 111 #define HDexecve(S,AV,E) execve(S,AV,E) 112 #define HDexecvp(S,AV) execvp(S,AV) 113 #define HDexit(N) exit(N) 114 #define HD_exit(N) _exit(N) 115 #define HDexp(X) exp(X) 116 #define HDfabs(X) fabs(X) 117 /* use ABS() because fabsf() fabsl() are not common yet. */ 118 #define HDfabsf(X) ABS(X) 119 #define HDfabsl(X) ABS(X) 120 #define HDfclose(F) fclose(F) 121 /* fcntl() variable arguments */ 122 #define HDfdopen(N,S) fdopen(N,S) 123 #define HDfeof(F) feof(F) 124 #define HDferror(F) ferror(F) 125 #define HDfflush(F) fflush(F) 126 #define HDfgetc(F) fgetc(F) 127 #define HDfgetpos(F,P) fgetpos(F,P) 128 #define HDfgets(S,N,F) fgets(S,N,F) 129 #ifdef H5_HAVE_WIN32_API 130 #define HDfileno(F) _fileno(F) 131 #else /* H5_HAVE_WIN32_API */ 132 #define HDfileno(F) fileno(F) 133 #endif /* H5_HAVE_WIN32_API */ 134 #define HDfloor(X) floor(X) 135 #define HDfmod(X,Y) fmod(X,Y) 136 #define HDfopen(S,M) fopen(S,M) 137 #define HDfork() fork() 138 #define HDfpathconf(F,N) fpathconf(F,N) 139 H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...); 140 #define HDfputc(C,F) fputc(C,F) 141 #define HDfputs(S,F) fputs(S,F) 142 #define HDfread(M,Z,N,F) fread(M,Z,N,F) 143 #define HDfree(M) free(M) 144 #define HDfreopen(S,M,F) freopen(S,M,F) 145 #define HDfrexp(X,N) frexp(X,N) 146 /* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */ 147 #ifdef H5_HAVE_FREXPF 148 #define HDfrexpf(X,N) frexpf(X,N) 149 #else /* H5_HAVE_FREXPF */ 150 #define HDfrexpf(X,N) frexp(X,N) 151 #endif /* H5_HAVE_FREXPF */ 152 #ifdef H5_HAVE_FREXPL 153 #define HDfrexpl(X,N) frexpl(X,N) 154 #else /* H5_HAVE_FREXPL */ 155 #define HDfrexpl(X,N) frexp(X,N) 156 #endif /* H5_HAVE_FREXPL */ 157 /* fscanf() variable arguments */ 158 #ifdef H5_HAVE_FSEEKO 159 #define HDfseek(F,O,W) fseeko(F,O,W) 160 #else 161 #define HDfseek(F,O,W) fseek(F,O,W) 162 #endif 163 #define HDfsetpos(F,P) fsetpos(F,P) 164 /* definitions related to the file stat utilities. 165 * Windows have its own function names. 166 * For Unix, if off_t is not 64bit big, try use the pseudo-standard 167 * xxx64 versions if available. 168 */ 169 #ifdef H5_HAVE_WIN32_API 170 #define HDfstat(F,B) _fstati64(F,B) 171 #define HDlstat(S,B) _lstati64(S,B) 172 #define HDstat(S,B) _stati64(S,B) 173 typedef struct _stati64 h5_stat_t; 174 typedef __int64 h5_stat_size_t; 175 #define HDoff_t __int64 176 #elif H5_SIZEOF_OFF_T!=8 && H5_SIZEOF_OFF64_T==8 && defined(H5_HAVE_STAT64) 177 #define HDfstat(F,B) fstat64(F,B) 178 #define HDlstat(S,B) lstat64(S,B) 179 #define HDstat(S,B) stat64(S,B) 180 typedef struct stat64 h5_stat_t; 181 typedef off64_t h5_stat_size_t; 182 #define HDoff_t off64_t 183 #else 184 #define HDfstat(F,B) fstat(F,B) 185 #define HDlstat(S,B) lstat(S,B) 186 #define HDstat(S,B) stat(S,B) 187 typedef struct stat h5_stat_t; 188 typedef off_t h5_stat_size_t; 189 #define HDoff_t off_t 190 #endif 191 192 #define HDftell(F) ftell(F) 193 #define HDftruncate(F,L) ftruncate(F,L) 194 #define HDfwrite(M,Z,N,F) fwrite(M,Z,N,F) 195 #define HDgetc(F) getc(F) 196 #define HDgetchar() getchar() 197 #define HDgetcwd(S,Z) getcwd(S,Z) 198 #define HDgetegid() getegid() 199 #define HDgetenv(S) getenv(S) 200 #define HDgeteuid() geteuid() 201 #define HDgetgid() getgid() 202 #define HDgetgrgid(G) getgrgid(G) 203 #define HDgetgrnam(S) getgrnam(S) 204 #define HDgetgroups(Z,G) getgroups(Z,G) 205 #ifdef H5_HAVE_WIN32_API 206 #define HDgetlogin() Wgetlogin() 207 #else /* H5_HAVE_WIN32_API */ 208 #define HDgetlogin() getlogin() 209 #endif /* H5_HAVE_WIN32_API */ 210 #define HDgetpgrp() getpgrp() 211 #define HDgetpid() getpid() 212 #define HDgetppid() getppid() 213 #define HDgetpwnam(S) getpwnam(S) 214 #define HDgetpwuid(U) getpwuid(U) 215 #define HDgetrusage(X,S) getrusage(X,S) 216 #define HDgets(S) gets(S) 217 #ifdef H5_HAVE_WIN32_API 218 H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz); 219 #define HDgettimeofday(V,Z) Wgettimeofday(V,Z) 220 #else /* H5_HAVE_WIN32_API */ 221 #define HDgettimeofday(S,P) gettimeofday(S,P) 222 #endif /* H5_HAVE_WIN32_API */ 223 #define HDgetuid() getuid() 224 #define HDgmtime(T) gmtime(T) 225 #define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/ 226 #define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/ 227 #define HDisatty(F) isatty(F) 228 #define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/ 229 #define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/ 230 #define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/ 231 #define HDislower(C) islower((int)(C)) /*cast for solaris warning*/ 232 #define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/ 233 #define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/ 234 #define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/ 235 #define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/ 236 #define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/ 237 #define HDkill(P,S) kill(P,S) 238 #define HDlabs(X) labs(X) 239 #define HDldexp(X,N) ldexp(X,N) 240 #define HDldiv(X,Y) ldiv(X,Y) 241 #define HDlink(OLD,NEW) link(OLD,NEW) 242 #define HDlocaleconv() localeconv() 243 #define HDlocaltime(T) localtime(T) 244 #define HDlog(X) log(X) 245 #define HDlog10(X) log10(X) 246 #define HDlongjmp(J,N) longjmp(J,N) 247 #ifdef H5_HAVE_WIN32_API 248 #define HDlseek(F,O,W) _lseeki64(F,O,W) 249 #else 250 #ifdef H5_HAVE_LSEEK64 251 #define HDlseek(F,O,W) lseek64(F,O,W) 252 #else 253 #define HDlseek(F,O,W) lseek(F,O,W) 254 #endif 255 #endif 256 #define HDmalloc(Z) malloc(Z) 257 #define HDposix_memalign(P,A,Z) posix_memalign(P,A,Z) 258 #define HDmblen(S,N) mblen(S,N) 259 #define HDmbstowcs(P,S,Z) mbstowcs(P,S,Z) 260 #define HDmbtowc(P,S,Z) mbtowc(P,S,Z) 261 #define HDmemchr(S,C,Z) memchr(S,C,Z) 262 #define HDmemcmp(X,Y,Z) memcmp(X,Y,Z) 263 /* 264 * The (char*) casts are required for the DEC when optimizations are turned 265 * on and the source and/or destination are not aligned. 266 */ 267 #define HDmemcpy(X,Y,Z) memcpy((char*)(X),(const char*)(Y),Z) 268 #define HDmemmove(X,Y,Z) memmove((char*)(X),(const char*)(Y),Z) 269 /* 270 * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO 271 */ 272 #ifdef H5_HAVE_VISUAL_STUDIO 273 #define HDmemset(X,C,Z) memset((void*)(X),C,Z) 274 #else /* H5_HAVE_VISUAL_STUDIO */ 275 #define HDmemset(X,C,Z) memset(X,C,Z) 276 #endif /* H5_HAVE_VISUAL_STUDIO */ 277 #ifdef H5_HAVE_WIN32_API 278 #define HDmkdir(S,M) _mkdir(S) 279 #else /* H5_HAVE_WIN32_API */ 280 #define HDmkdir(S,M) mkdir(S,M) 281 #endif /* H5_HAVE_WIN32_API */ 282 #define HDmkfifo(S,M) mkfifo(S,M) 283 #define HDmktime(T) mktime(T) 284 #define HDmodf(X,Y) modf(X,Y) 285 #ifdef _O_BINARY 286 #define HDopen(S,F,M) open(S,F|_O_BINARY,M) 287 #else 288 #define HDopen(S,F,M) open(S,F,M) 289 #endif 290 #define HDopendir(S) opendir(S) 291 #define HDpathconf(S,N) pathconf(S,N) 292 #define HDpause() pause() 293 #define HDperror(S) perror(S) 294 #define HDpipe(F) pipe(F) 295 #define HDpow(X,Y) pow(X,Y) 296 /* printf() variable arguments */ 297 #define HDprintf(...) HDfprintf(stdout, __VA_ARGS__) 298 #define HDputc(C,F) putc(C,F) 299 #define HDputchar(C) putchar(C) 300 #define HDputs(S) puts(S) 301 #define HDqsort(M,N,Z,F) qsort(M,N,Z,F) 302 #define HDraise(N) raise(N) 303 304 #ifdef H5_HAVE_RAND_R 305 #define HDrandom() HDrand() 306 H5_DLL int HDrand(void); 307 #elif H5_HAVE_RANDOM 308 #define HDrand() random() 309 #define HDrandom() random() 310 #else 311 #define HDrand() rand() 312 #define HDrandom() rand() 313 #endif 314 315 #define HDread(F,M,Z) read(F,M,Z) 316 #define HDreaddir(D) readdir(D) 317 #define HDrealloc(M,Z) realloc(M,Z) 318 #define HDremove(S) remove(S) 319 #define HDrename(OLD,NEW) rename(OLD,NEW) 320 #define HDrewind(F) rewind(F) 321 #define HDrewinddir(D) rewinddir(D) 322 #define HDrmdir(S) rmdir(S) 323 /* scanf() variable arguments */ 324 #define HDsetbuf(F,S) setbuf(F,S) 325 #define HDsetgid(G) setgid(G) 326 #define HDsetjmp(J) setjmp(J) 327 #define HDsetlocale(N,S) setlocale(N,S) 328 #define HDsetpgid(P,PG) setpgid(P,PG) 329 #define HDsetsid() setsid() 330 #define HDsetuid(U) setuid(U) 331 /* Windows does not permit setting the buffer size to values 332 less than 2. */ 333 #ifndef H5_HAVE_WIN32_API 334 #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z) 335 #else 336 #define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,(Z>1?Z:2)) 337 #endif 338 #define HDsigaddset(S,N) sigaddset(S,N) 339 #define HDsigdelset(S,N) sigdelset(S,N) 340 #define HDsigemptyset(S) sigemptyset(S) 341 #define HDsigfillset(S) sigfillset(S) 342 #define HDsigismember(S,N) sigismember(S,N) 343 #define HDsiglongjmp(J,N) siglongjmp(J,N) 344 #define HDsignal(N,F) signal(N,F) 345 #define HDsigpending(S) sigpending(S) 346 #define HDsigprocmask(H,S,O) sigprocmask(H,S,O) 347 #define HDsigsetjmp(J,N) sigsetjmp(J,N) 348 #define HDsigsuspend(S) sigsuspend(S) 349 #define HDsin(X) sin(X) 350 #define HDsinh(X) sinh(X) 351 #define HDsleep(N) sleep(N) 352 #ifdef H5_HAVE_WIN32_API 353 H5_DLL int c99_snprintf(char* str, size_t size, const char* format, ...); 354 #define HDsnprintf c99_snprintf /*varargs*/ 355 #else 356 #define HDsnprintf snprintf /*varargs*/ 357 #endif 358 /* sprintf() variable arguments */ 359 #define HDsprintf sprintf /*varargs*/ 360 #define HDsqrt(X) sqrt(X) 361 #ifdef H5_HAVE_RAND_R 362 H5_DLL void HDsrand(unsigned int seed); 363 #define HDsrandom(S) HDsrand(S) 364 #elif H5_HAVE_RANDOM 365 #define HDsrand(S) srandom(S) 366 #define HDsrandom(S) srandom(S) 367 #else 368 #define HDsrand(S) srand(S) 369 #define HDsrandom(S) srand(S) 370 #endif 371 /* sscanf() variable arguments */ 372 373 #ifdef H5_HAVE_WIN32_API 374 #define HDstrcasecmp(A,B) _stricmp(A,B) 375 #else 376 #define HDstrcasecmp(X,Y) strcasecmp(X,Y) 377 #endif 378 #define HDstrcat(X,Y) strcat(X,Y) 379 #define HDstrchr(S,C) strchr(S,C) 380 #define HDstrcmp(X,Y) strcmp(X,Y) 381 #define HDstrcoll(X,Y) strcoll(X,Y) 382 #define HDstrcpy(X,Y) strcpy(X,Y) 383 #define HDstrcspn(X,Y) strcspn(X,Y) 384 #define HDstrerror(N) strerror(N) 385 #define HDstrftime(S,Z,F,T) strftime(S,Z,F,T) 386 #define HDstrlen(S) strlen(S) 387 #define HDstrncat(X,Y,Z) strncat(X,Y,Z) 388 #define HDstrncmp(X,Y,Z) strncmp(X,Y,Z) 389 #define HDstrncpy(X,Y,Z) strncpy(X,Y,Z) 390 #define HDstrpbrk(X,Y) strpbrk(X,Y) 391 #define HDstrrchr(S,C) strrchr(S,C) 392 #define HDstrspn(X,Y) strspn(X,Y) 393 #define HDstrstr(X,Y) strstr(X,Y) 394 #define HDstrtod(S,R) strtod(S,R) 395 #define HDstrtok(X,Y) strtok(X,Y) 396 #define HDstrtol(S,R,N) strtol(S,R,N) 397 H5_DLL int64_t HDstrtoll (const char *s, const char **rest, int base); 398 #define HDstrtoul(S,R,N) strtoul(S,R,N) 399 #ifdef H5_HAVE_WIN32_API 400 #define HDstrtoull(S,R,N) _strtoui64(S,R,N) 401 #else 402 #define HDstrtoull(S,R,N) strtoull(S,R,N) 403 #endif 404 #define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z) 405 #define HDsysconf(N) sysconf(N) 406 #define HDsystem(S) system(S) 407 #define HDtan(X) tan(X) 408 #define HDtanh(X) tanh(X) 409 #define HDtcdrain(F) tcdrain(F) 410 #define HDtcflow(F,A) tcflow(F,A) 411 #define HDtcflush(F,N) tcflush(F,N) 412 #define HDtcgetattr(F,T) tcgetattr(F,T) 413 #define HDtcgetpgrp(F) tcgetpgrp(F) 414 #define HDtcsendbreak(F,N) tcsendbreak(F,N) 415 #define HDtcsetattr(F,O,T) tcsetattr(F,O,T) 416 #define HDtcsetpgrp(F,N) tcsetpgrp(F,N) 417 #define HDtime(T) time(T) 418 #define HDtimes(T) times(T) 419 #define HDtmpfile() tmpfile() 420 #define HDtmpnam(S) tmpnam(S) 421 #define HDtolower(C) tolower(C) 422 #define HDtoupper(C) toupper(C) 423 #define HDttyname(F) ttyname(F) 424 #define HDtzset() tzset() 425 #define HDumask(N) umask(N) 426 #define HDuname(S) uname(S) 427 #define HDungetc(C,F) ungetc(C,F) 428 #ifdef H5_HAVE_WIN32_API 429 #define HDunlink(S) _unlink(S) 430 #else 431 #define HDunlink(S) unlink(S) 432 #endif 433 #define HDutime(S,T) utime(S,T) 434 #define HDva_arg(A,T) va_arg(A,T) 435 #define HDva_end(A) va_end(A) 436 #define HDva_start(A,P) va_start(A,P) 437 #define HDvasprintf(RET,FMT,A) vasprintf(RET,FMT,A) 438 #define HDvfprintf(F,FMT,A) vfprintf(F,FMT,A) 439 #define HDvprintf(FMT,A) vprintf(FMT,A) 440 #define HDvsprintf(S,FMT,A) vsprintf(S,FMT,A) 441 #ifdef H5_HAVE_WIN32_API 442 H5_DLL int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap); 443 #define HDvsnprintf c99_vsnprintf 444 #else 445 # define HDvsnprintf(S,N,FMT,A) vsnprintf(S,N,FMT,A) 446 #endif 447 #define HDwait(W) wait(W) 448 #define HDwaitpid(P,W,O) waitpid(P,W,O) 449 #define HDwcstombs(S,P,Z) wcstombs(S,P,Z) 450 #define HDwctomb(S,C) wctomb(S,C) 451 #define HDwrite(F,M,Z) write(F,M,Z) 452 453 /* 454 * And now for a couple non-Posix functions... Watch out for systems that 455 * define these in terms of macros. 456 */ 457 #ifdef H5_HAVE_WIN32_API 458 #define HDstrdup(S) _strdup(S) 459 #else /* H5_HAVE_WIN32_API */ 460 461 #if !defined strdup && !defined H5_HAVE_STRDUP 462 extern char *strdup(const char *s); 463 #endif 464 465 #define HDstrdup(S) strdup(S) 466 467 #endif /* H5_HAVE_WIN32_API */ 468 469 /* 470 * HDF Boolean type. 471 */ 472 #ifndef FALSE 473 # define FALSE false 474 #endif 475 #ifndef TRUE 476 # define TRUE true 477 #endif 478 479 /** From h5test.h **/ 480 481 #ifdef H5_HAVE_PARALLEL 482 extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */ 483 #endif 484 485 #ifdef H5_HAVE_PARALLEL 486 H5TEST_DLL int h5_set_info_object(void); 487 H5TEST_DLL void h5_dump_info_object(MPI_Info info); 488 #endif 489 490 491 492 /** From h5tools_utils.h **/ 493 494 extern int opt_err; /* getoption prints errors if this is on */ 495 extern int opt_ind; /* token pointer */ 496 extern const char *opt_arg; /* flag argument (or value) */ 497 498 499 enum { 500 no_arg = 0, /* doesn't take an argument */ 501 require_arg, /* requires an argument */ 502 optional_arg /* argument is optional */ 503 }; 504 505 506 typedef struct long_options { 507 const char *name; /* name of the long option */ 508 int has_arg; /* whether we should look for an arg */ 509 char shortval; /* the shortname equivalent of long arg 510 * this gets returned from get_option */ 511 } long_options; 512 513 extern int get_option(int argc, const char **argv, const char *opt, 514 const struct long_options *l_opt); 515 516 extern int nCols; /*max number of columns for outputting */ 517 518 /* Definitions of useful routines */ 519 extern void print_version(const char *progname); 520 521 #endif 522