/*DrvHyas allow user to query hydrogen A's, asks for up, low level, gives A, drive hyas */ #include "cddefines.h" #include "ffmtread.h" #include "hydroeinsta.h" #include "drvhyas.h" void DrvHyas(void) { char chCard[133]; int lgEOL; long int i, ihi, low; # ifdef DEBUG_FUN fputs( "<+>DrvHyas()\n", debug_fp ); # endif /* this routine is entered with the command DRIVE HYAS, and * drives Jason's hydrogen einstein A routines */ ihi = 1; /* ihi never lt 1 */ while( ihi != 0 ) { fprintf( ioQQQ, " Enter two quantum numbers, null line to stop.\n" ); if( fgets( chCard , sizeof(chCard) , stdin ) == NULL ) { fprintf( ioQQQ, " error getting drvhyas \n" ); puts( "[Stop in drvhyas]" ); exit(1); } i = 1; low = (long int)FFmtRead(chCard,&i,76,&lgEOL); if( lgEOL ) break; ihi = (long int)FFmtRead(chCard,&i,76,&lgEOL); if( lgEOL ) { fprintf( ioQQQ, " must be two numbers!\n" ); break; } fprintf( ioQQQ, " A(%3ld,%3ld)=%11.3e\n", MIN2(low,ihi), MAX2(low,ihi), HydroEinstA(low,ihi) ); } fprintf( ioQQQ, " Driver exits, enter next line.\n" ); # ifdef DEBUG_FUN fputs( " <->DrvHyas()\n", debug_fp ); # endif return; }