*** ../Fame-2.0b/Fame.pod Mon Oct 21 17:37:34 1996 --- Fame.pod Tue May 20 17:36:12 1997 *************** *** 373,379 **** =item @data = &Fame::HLI::fameread($dbkey,$objnam,$syear,$sprd,$eyear,$eprd); ! Read data for the given range of dates. =item @data = &Fame::HLI::famereadn($dbkey,$objnam,$numobs,@r,@m); --- 373,381 ---- =item @data = &Fame::HLI::fameread($dbkey,$objnam,$syear,$sprd,$eyear,$eprd); ! Read data for the given range of dates. Returns undef if there's ! a problem (the $Fame::HLI:status variable should be set with the ! error code). =item @data = &Fame::HLI::famereadn($dbkey,$objnam,$numobs,@r,@m); *************** *** 393,399 **** =item &Fame::HLI::famewrite($dbkey,$objnam,$year,$prd,@list); Writes out all the elements of @list into the object staring with the ! given date. =back --- 395,401 ---- =item &Fame::HLI::famewrite($dbkey,$objnam,$year,$prd,@list); Writes out all the elements of @list into the object staring with the ! given date. Returns error status if failed; 0 if sucessful.\n; =back *** ../Fame-2.0b/HISTORY Tue Apr 1 12:38:03 1997 --- HISTORY Tue May 20 17:39:27 1997 *************** *** 42,44 **** --- 42,50 ---- 1/8/97 Fix bug in cfmsatt and famewrite with ND, NA, NC. 1/14/97 Fix bug in LANG::exec. 3/30/97 Remove PERL_SRC in Makefile.PL, add h2ph to dist. + 4/1/97 Add more Solaris-friendly support. + + 2.0c 5/97 + + 5/18/97 Fix famewrite and fameread error status + 5/20/97 Fix problem with $Fame::HLI::status *** ../Fame-2.0b/HLI/HLI.pm Thu Jun 27 11:00:59 1996 --- HLI/HLI.pm Tue May 20 16:13:11 1997 *************** *** 47,55 **** bootstrap Fame::HLI; ! tie $status, Fame::HLI_var_status, "status"; ! tie $version, Fame::HLI_var_version, "version"; # HLI.pm version number sub version {2.0;} --- 47,56 ---- bootstrap Fame::HLI; ! tie $status, Fame::HLI::var_status, "status"; ! tie $version, Fame::HLI::var_version, "version"; + package Fame::HLI; # HLI.pm version number sub version {2.0;} *** ../Fame-2.0b/HLI/cliperl Tue Apr 1 10:12:20 1997 --- HLI/cliperl Wed Apr 16 17:11:21 1997 *************** *** 71,83 **** sub dovar { print INIT ! "newXS(\"${pg}_var_${alias}::TIESCALAR\", ${pfx}_var_${alias}_TIESCALAR,fn);\n"; print INIT ! "newXS(\"${pg}_var_${alias}::FETCH\", ${pfx}_var_${alias}_FETCH,fn);\n"; print INIT ! "newXS(\"${pg}_var_${alias}::STORE\", ${pfx}_var_${alias}_STORE,fn);\n"; # print INIT "\tMAGICVAR(\"$alias\",UV_$alias);\n"; # print HDR "\tUV_$alias,\n"; --- 71,83 ---- sub dovar { print INIT ! "newXS(\"${pg}::var_${alias}::TIESCALAR\", ${pfx}_var_${alias}_TIESCALAR,fn);\n"; print INIT ! "newXS(\"${pg}::var_${alias}::FETCH\", ${pfx}_var_${alias}_FETCH,fn);\n"; print INIT ! "newXS(\"${pg}::var_${alias}::STORE\", ${pfx}_var_${alias}_STORE,fn);\n"; # print INIT "\tMAGICVAR(\"$alias\",UV_$alias);\n"; # print HDR "\tUV_$alias,\n"; *** ../Fame-2.0b/HLI/fame.c Tue Jan 7 16:22:23 1997 --- HLI/fame.c Tue May 20 17:22:42 1997 *************** *** 22,28 **** #include "fame.xtra" int f_status; ! char *version="2.00"; #include "fame.i" --- 22,28 ---- #include "fame.xtra" int f_status; ! char *version="2.01"; #include "fame.i" *************** *** 436,442 **** break; case HUNDFT: sz = 0; ! defalut: sz = 0; } if (sz == 0) { /* croak("Fame error: Invalid data type"); */ --- 436,442 ---- break; case HUNDFT: sz = 0; ! default: sz = 0; } if (sz == 0) { /* croak("Fame error: Invalid data type"); */ *************** *** 449,454 **** --- 449,455 ---- if (status != HSUCC) { /* fprintf(stderr,"HLI(%d)",status); */ /* croak("Fame error: Read failed"); */ + free(valary); XSRETURN_UNDEF; } *************** *** 702,707 **** --- 703,714 ---- numobs = items - 4; freq = famegetfreq(dbkey, series); + if (f_status != HSUCC) { + /* croak("Fame error: unsupported data type"); */ + ST(0)=sv_newmortal(); + sv_setiv(ST(0), f_status); + XSRETURN(1); + } typ = famegettype(dbkey, series); cfmsrng(&status, freq, &year, &prd, &eyear, &eprd, range, &numobs); f_status = status; *************** *** 722,727 **** --- 729,736 ---- } if (sz == 0) { /* croak("Fame error: unsupported data type"); */ + ST(0)=sv_newmortal(); + sv_setiv(ST(0), HBOBJT); XSRETURN(1); } valary = (float *) malloc(numobs * sz); *************** *** 783,793 **** } cfmwrng(&status, dbkey, series, range, valary, HNTMIS, mistt); f_status = status; ! if (status != HSUCC) { /* fprintf(stderr,"HLI(%d)",status); */ /* croak("Fame error: Write failed"); */ ! XSRETURN_UNDEF; ! } free(valary); ST(0)=sv_newmortal(); sv_setiv(ST(0), status); --- 792,802 ---- } cfmwrng(&status, dbkey, series, range, valary, HNTMIS, mistt); f_status = status; ! /*if (status != HSUCC) {*/ /* fprintf(stderr,"HLI(%d)",status); */ /* croak("Fame error: Write failed"); */ ! /* XSRETURN_UNDEF; */ ! /*}*/ free(valary); ST(0)=sv_newmortal(); sv_setiv(ST(0), status); *** ../Fame-2.0b/Makefile.PL Tue Apr 1 12:25:14 1997 --- Makefile.PL Thu May 15 09:49:24 1997 *************** *** 4,10 **** &WriteMakefile( "NAME" => "Fame", ! "VERSION" => "2.0b" ); sub MY::test {' --- 4,10 ---- &WriteMakefile( "NAME" => "Fame", ! "VERSION" => "2.0c" ); sub MY::test {' *************** *** 12,27 **** $(FULLPERL) fame.test patchperl: ! mv $(FULLPERL) $(FILLPERL).old $(FULLPERL).old -p -e s/_Error/_ErroX/g $(FULLPERL).old \ > $(FULLPERL) chmod +x $(FULLPERL) patchsolaris: mv $(FULLPERL) $(FULLPERL).old $(FULLPERL).old -p -e s/Error/ErroX/g $(FULLPERL).old \ > $(FULLPERL) chmod +x $(FULLPERL) maildist: dist uncompress Fame-$(VERSION).tar.Z --- 12,29 ---- $(FULLPERL) fame.test patchperl: ! mv $(FULLPERL) $(FULLPERL).old $(FULLPERL).old -p -e s/_Error/_ErroX/g $(FULLPERL).old \ > $(FULLPERL) chmod +x $(FULLPERL) + touch patch.log patchsolaris: mv $(FULLPERL) $(FULLPERL).old $(FULLPERL).old -p -e s/Error/ErroX/g $(FULLPERL).old \ > $(FULLPERL) chmod +x $(FULLPERL) + touch patch.log maildist: dist uncompress Fame-$(VERSION).tar.Z *** ../Fame-2.0b/README Tue Apr 1 12:17:03 1997 --- README Fri Apr 4 11:22:44 1997 *************** *** 1,11 **** ! Fame Perl Extension ! ------------------- Fernando Trias Parts of this software are in the public domain. ! Changes and additions are Copyright 1995, 1996 by Fernando Trias. All rights reserved. ------------------------------------------------------------------------ --- 1,11 ---- ! Fame Perl Extension 2.0c ! ------------------------ Fernando Trias Parts of this software are in the public domain. ! Changes and additions are Copyright 1995-1997 by Fernando Trias. All rights reserved. ------------------------------------------------------------------------ *************** *** 50,59 **** 3. Extract the Makefile by running "perl Makefile.PL". ! 4. Run "make". ! 5. If everything builds OK, run "make test" to perform rudimentary ! tests. a) IMPORTANT: If you have problems running the test, particularly if you get an "Illegal Instruction" or "Bus Error" message, then you --- 50,59 ---- 3. Extract the Makefile by running "perl Makefile.PL". ! 4. Run "make". HLI/Makefile.PL uses cppstdin, which perl installs. ! If you don't have it, try "cc -E" or "/usr/lib/cpp" instead. ! 5. Run "make patchperl" (or "make patchsolaris" for Solaris) a) IMPORTANT: If you have problems running the test, particularly if you get an "Illegal Instruction" or "Bus Error" message, then you *************** *** 67,73 **** SOLARIS: "Error" does not have a "_" in front of it. You will have to run "make patchsolaris". ! 6. To install everything into production, you may run "make install". MAKEFILE DEFINES --- 67,76 ---- SOLARIS: "Error" does not have a "_" in front of it. You will have to run "make patchsolaris". ! 6. If everything builds OK, run "make test" to perform rudimentary ! tests. ! ! 7. To install everything into production, you may run "make install". MAKEFILE DEFINES *** ../Fame-2.0b/fame.test Tue May 7 10:12:33 1996 --- fame.test Tue May 20 17:24:19 1997 *************** *** 1,6 **** --- 1,7 ---- #!../../perl # FT 9/22/95 + use Fame; # change packages to avoid having to write long package names *************** *** 8,13 **** --- 9,38 ---- package Fame::HLI; + use Config; + # print "p=",$Config{perlpath}, "\n"; + + if (-M "patch.log" > -M $Config{perlpath}) { + print "Warning: You may have rebuilt the PERL executable\n"; + print " since the last time you patched it.\n"; + print "$Config{perlpath} is ", -M $Config{perlpath}, " days old\n"; + print "patch.log is ", -M "patch.log", " days old\n"; + $patch=1; + } + if (! -f "patch.log") { + print "Warning: You have not patched the PERL executable.\n"; + $patch=1; + } + if ($patch) { + print "If you continue you may get a segmentation fault.\n"; + print "See the README file for patching instructions.\n"; + print "Do you wish to continue? "; + $y = ; + if ($y !~ /^[Yy]/) { + die "Run 'make patchperl' or 'make patchsolaris'\n"; + } + } + # unbuffered output $|=1; *************** *** 25,31 **** # create a new object $name="T1"; ! &cfmnwob($status,$k,$name,&HSERIE,&HDAILY, &HNUMRC,&HBSDAY,&HOBBEG); # get the objects information --- 50,56 ---- # create a new object $name="T1"; ! &cfmnwob($stat,$k,$name,&HSERIE,&HDAILY, &HNUMRC,&HBSDAY,&HOBBEG); # get the objects information *************** *** 38,49 **** print "HLILIB extensions not loaded\n" if $@; # test dates ! &cfmddat($status,&HDAILY,$date,1993,5,2); ! die "DATE FAILED date prob 1" if $status != &HSUCC; ! &cfmdatd($status,&HDAILY,$date,$y,$m,$d); ! die "DATE FAILED date prob 2" if $status != &HSUCC; ! &cfmddat($status,&HDAILY,$date2,$y,$m,$d); ! die "DATE FAILED date prob 3" if $status != &HSUCC; die "DATE FAILED date prob 4" if $date2!=$date; print "DATE OK\n"; --- 63,74 ---- print "HLILIB extensions not loaded\n" if $@; # test dates ! &cfmddat($stat,&HDAILY,$date,1993,5,2); ! die "DATE FAILED date prob 1" if $stat != &HSUCC; ! &cfmdatd($stat,&HDAILY,$date,$y,$m,$d); ! die "DATE FAILED date prob 2" if $stat != &HSUCC; ! &cfmddat($stat,&HDAILY,$date2,$y,$m,$d); ! die "DATE FAILED date prob 3" if $stat != &HSUCC; die "DATE FAILED date prob 4" if $date2!=$date; print "DATE OK\n"; *************** *** 51,63 **** @data=(5,4,3,7,1,2,7,4,3,5,4,6,7,4,2,8,6,4,5,4); print "writing. . . "; ! $status=&famewrite($k,$name,1990,1,@data); ! if ($status) { ! print "WRITE FAILED ($status) !!!\n"; $errors++; } # post ! &cfmpodb($status,$k); # get the object's information @d=&famegetinfo($k,$name); --- 76,88 ---- @data=(5,4,3,7,1,2,7,4,3,5,4,6,7,4,2,8,6,4,5,4); print "writing. . . "; ! $stat = &famewrite($k,$name,1990,1,@data); ! if ($stat) { ! print "WRITE FAILED ($stat) !!!\n"; $errors++; } # post ! &cfmpodb($stat,$k); # get the object's information @d=&famegetinfo($k,$name); *************** *** 80,85 **** --- 105,116 ---- print "READ/WRITE OK\n"; } + $s = &cfmcpob($stat, $k, $k, "abcdefg", "testxyz"); + if ($s==0 || $stat==0 || $stat != $s) { + print "ERROR returning correct status\n"; + $errors++; + } + # close if (! &fameclose($k)) { print "ERROR closing test database [$Fame::HLI::status]\n"; *************** *** 155,159 **** } print "ALL TESTS OK\n"; ! system("rm test.db"); exit(0); --- 186,190 ---- } print "ALL TESTS OK\n"; ! #system("rm test.db"); exit(0);