summaryrefslogtreecommitdiff
path: root/src/util
Commit message (Collapse)AuthorAge
...
* Fixed grdoc.tradke2002-05-16
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2819 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed parsing of undocumented $PARFILE variable.tradke2002-05-13
| | | | | | | This closes PR Cactus/1041. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2809 17b73243-c579-4c4c-a9d2-2d5706c11dac
* From Jonathan Thornburg:allen2002-05-09
| | | | | | | | | | | | | | Change our fake version of the C99/C++ "bool" type from typedef enum { false = 0, true = 1 } bool; to typedef int bool; #define true 1 #define false 0 so we can assign an int to a bool without triggering compiler warnings on the origin. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2804 17b73243-c579-4c4c-a9d2-2d5706c11dac
* CCTK_FN_POINTER -> CCTK_FPOINTERallen2002-04-28
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2770 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Replaced HUGE_VAL by DBL_MAX which should be used as the maximum floating-pointtradke2002-04-11
| | | | | | | | number. Thanks to Jonathan to point this out. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2707 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Use HUGE_VAL instead of FLT_MAX for the maximum possible value for doubles.tradke2002-04-11
| | | | | | | This closes Cactus/966. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2706 17b73243-c579-4c4c-a9d2-2d5706c11dac
* [[from Jonathan Thornburg]]rideout2002-04-03
| | | | | | | | | | | | | | | | | | | | src/util/Table.c src/include/util_Table.h * add new functions (cf my E-mail of 30 Mar 2002) Util_TableClone() Util_TableItClone() * add new functions (cf Erik Schnetter's E-mails of 5 Feb 2002) Util_Table{Set,Get}Generic() Util_Table{Set,Get}GenericArray() * add tests for new functions * fix a memory leak in Util_TableDestroy() * fixed some assert( variable = value ) bugs (yikes!!) * refactor some code to better modularize the implementation * add some more const qualifiers to local vars * reformat code to match flesh standard indentation and { } conventions git-svn-id: http://svn.cactuscode.org/flesh/trunk@2683 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Made it so that netdb.h and winsock2.h are never both included. This waskcamarda2002-02-22
| | | | | | | necessary to compile with the gnu compilers in cygwin. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2617 17b73243-c579-4c4c-a9d2-2d5706c11dac
* [[from Jonathan Thornburg]]tradke2002-02-04
| | | | | | | | | | | | | | | | | | Small fixes to Util_TableSetFromString(): * trap some error cases involving invalid keys which slipped by before * document UTIL_ERROR_BAD_KEY as a possible error code * accept trailing whitespace at end of string (this was rejected before) * revise BNF in grdoc comment to correctly describe what the code accepts [I've already revised it in the latex docs (doc/UsersGuide/FunctionReference.tex)] Also fix Util_TableCreateFromString(): * document UTIL_ERROR_BAD_KEY as a possible error code Thanks to Erik Schnetter for pointing out these problems! git-svn-id: http://svn.cactuscode.org/flesh/trunk@2606 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Optimized version of Util_StrCmpi() which doesn't need to call strlen().tradke2002-01-28
| | | | | | | Closes PR Cactus-892. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2597 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Makefile for standalone test of Table Utilities archived on Maintainer weballen2002-01-25
| | | | | | | pages for now git-svn-id: http://svn.cactuscode.org/flesh/trunk@2596 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The 'h' in $Header$ must be capitalized to be parsed by cvs.rideout2002-01-21
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2591 17b73243-c579-4c4c-a9d2-2d5706c11dac
* File committed into wrong directory.rideout2002-01-21
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2590 17b73243-c579-4c4c-a9d2-2d5706c11dac
* [[message actually from Jonathan Thornburg, checkin by David Rideoutrideout2002-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | since JT doesn't have the appropriate CVS karma]] src/util/Table.c * by popular (or at least semi-popular :) demand..... add new function int Util_TableSetFromString(int handle, const char *string) to set a sequence of key/value entries in an existing table, based on a parameter-file-style string. [[This functionality was present before in Util_TableCreateFromSTring(), but bundled together with creating a new table. This change splits out the "scan through a string doing the table assignments it specifies" functionality into a separate function, since it seems useful in various contextx.]] * change Util_TableCreateFromString() to call the new Util_TableSetFromString() to do most of the work * change the test suite to test the new function a bit src/util/makefile * new file, makefile to build standalone test driver for table routines src/include/util_Table.h * add prototype for new Util_TableSetFromString() function git-svn-id: http://svn.cactuscode.org/flesh/trunk@2588 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added missing include.tradke2002-01-18
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2585 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check for a race condition in case CCTK_CreateDirectory() is called for thetradke2002-01-17
| | | | | | | same directory from multiple procs at the same time. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2583 17b73243-c579-4c4c-a9d2-2d5706c11dac
* A revised version of the tables source code with auto-destroytradke2002-01-17
| | | | | | | | completely removed. (I also changed the standalone test suite correspondingly.) git-svn-id: http://svn.cactuscode.org/flesh/trunk@2581 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed a small bug. Completed grdoc.tradke2002-01-02
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2565 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The callback routine, CCTKi_SetParameter(), passed to the ParseFile() routinetradke2002-01-02
| | | | | | | | | | now takes the current line number in the parameter file as a third argument. CCTKi_SetParameter() is now able to tell you what line in the parameter file was erroneous. This closes PR Cactus-838. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2555 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changed CCTK_TimerPrintData and CCTK_TimerPrintDataI to take two arguements,allen2001-12-29
| | | | | | | | | | | | | | | | | | | | | so you can choose both a timer and a clock to print. Passing a NULL argument for a string, or a -1 for the index versions will cause all the timers/clocks to be used. Also added new functions CCTK_NumClocks CCTK_ClockName CCTK_ClockHandle which I needed for this. Not sure that I really needed the ClockHandle one, but it is useful anyway to test if a clock is registered. Maybe these functions should also take something like a file descriptor, so that the information can be easily printed to a file, or to the HTTPD pages. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2547 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Renamed CCTK_DisplayTimerData() to CCTK_TimerPrintData() (along withrideout2001-12-17
| | | | | | | all their variants). git-svn-id: http://svn.cactuscode.org/flesh/trunk@2509 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added fortran wrapper protoypes.tradke2001-12-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2498 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Expanded a CCTK_WARN macro into CCTK_VWarn().tradke2001-12-11
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2496 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added Fortran bindings for timers, and two subroutinesrideout2001-12-11
| | | | | | | | | CCTK_DisplayTimerData() CCTK_DisplayTimerDataI() which display timing data for a given timer. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2494 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Forgot the 'return' statement in my last commit.tradke2001-12-04
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2482 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added return statement to prevent compiler warning 'function should return a ↵tradke2001-12-04
| | | | | | value'. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2480 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixes for Cactus/833,828,825allen2001-12-04
| | | | | | | | | | | | | | | Parsing errors from Parameter file are fatal errors Report all parameter errors before terminating simulation (actually this isn't quite true, it will report all parsing errors and then stop if necessary and then report all parameter setting errors and stop if necessary) In parsing the parameter file omitting the "=" and ommiting the "= value" are fatal errors. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2478 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed warning from CCTK_SetBoolean, this should be caught in anyallen2001-12-04
| | | | | | | calling routine git-svn-id: http://svn.cactuscode.org/flesh/trunk@2477 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed compiler warnings for variables with 'const' qualifiers.tradke2001-12-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2475 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed Util_SplitFilename() to allocate both the dir and basename string.tradke2001-12-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2474 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undefine strdup before it is redefined. Fixes a gcc warning.tradke2001-11-27
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2470 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Undefine CCODE before it is redefined. Fixes a gcc warning.tradke2001-11-27
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2469 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Stuff for utility table routines, implemented by Jonathon Thornburg.goodale2001-11-13
| | | | | | | | | Documentation should follow shortly... Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2462 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Latest changes:goodale2001-11-07
| | | | | | | | | | Some extra checking. Moved types not needed by external stuff into its own header. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2459 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed semantics for the fortran wrappers CCTK_FortranString() and ↵tradke2001-11-06
| | | | | | CCTK_ParameterValString(). git-svn-id: http://svn.cactuscode.org/flesh/trunk@2457 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Moved verification out of evalaution and into parsing stage to speed upgoodale2001-11-06
| | | | | | | | | evaluation. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2454 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding a const qualifier to the 'cGH *' argument of some flesh routinestradke2001-11-05
| | | | | | | | and for I/O method registration. You will also need to update the I/O thorns which I will commit changes to now. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2452 17b73243-c579-4c4c-a9d2-2d5706c11dac
* New improved, or at least more functional, expression parser and evaluator.goodale2001-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now can deal with both floating point and integer values. You can use the functions from the standard C maths library which take one argument. Evaluation should be faster, 'though parsing is probably a bit slower. Now the user-supplied evaluation routine is called just once at the beginning of the evaluation, so if any of the evaluations need a global operation, these can all be done at once. The routines have now been renamed as Util_ functions and the header file cctki_Expression.h has been renamed as util_Expression.h. IMPORTANT NOTE: The above means you will need to rm configs/*/build/Cactus/util/Expression.c.d rm configs/*/build/Cactus/main/Groups.c.d after updating to get rid of stale dependency files. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2449 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added missing includes and fixed a couple of 'cast from const pointer' warnings.tradke2001-10-30
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2442 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixing memory allocation error.goodale2001-10-25
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2435 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Print out times with the same formatallen2001-10-20
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2416 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding expression parser.goodale2001-10-13
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2401 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Start of putting the expression parser into the flesh available routines.goodale2001-10-13
| | | | | | | | | | | Currently just a copy of the stuff from HTTPD changed to integer and a bug fix. When it is generalised and some optimisation is done these will become Util routines rather than CCTKi routines. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2400 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Increased parse buffer size to 8 kB. Also allocate buffers dynamicallytradke2001-09-07
| | | | | | | | | instead of reserving them on the function stack (might cause stack overflow). This closes PR Cactus-784. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2345 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed extraneous semicolon to get rid of compiler warning.tradke2001-09-01
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2324 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Get rid of the prefix when creating named timers so that the othertradke2001-08-27
| | | | | | | routines, which take the name as the argument, do work again. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2319 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Don't print any warning or info messages in CCTK_CreateDirectory().tradke2001-08-27
| | | | | | | Callers should check the return code. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2316 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Return +1 in CCTK_CreateDirectory() if dir already exists, and negativetradke2001-08-27
| | | | | | | if it couldn't be created for some other reason. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2315 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Make the name for named Cactus timers unique by prepending the timer number.tradke2001-07-12
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2292 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added two new timer routines:tradke2001-07-12
| | | | | | | | int CCTK_NumTimers (void); const char *CCTK_TimerName (int timer_handle); git-svn-id: http://svn.cactuscode.org/flesh/trunk@2288 17b73243-c579-4c4c-a9d2-2d5706c11dac