summaryrefslogtreecommitdiff
path: root/src/util
Commit message (Collapse)AuthorAge
* Adding key to argument lists of functions called during a traversal of the tree.goodale2001-06-04
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2216 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added Util_asprintf,Util_asnprintf,Util_snprintf,Util_vsnprintf.goodale2001-05-24
| | | | | | | | | | | | | | | | | | | | | | asprintf is like sprintf, but the first arg is a char ** and should basically be the address of a null pointer. The routine allocates enough space and passes back the new buffer pointer. asnprintf is as above, but the buffer need not be null. The thirs argument is the size of the current buffer, and if the string would be larger than that, the current buffer is freed and a new buffer big enough is allocated. snprintf and vsnprintf are pretty standard, except we don't have them on all platforms so I hunted down a file on the internet, written by Patrick Powel (papowell@astart.com), to give us a portable version of the functionality. It may not be entirely up to scratch with floating point - I've not tested it too thouroughly yet. This should enable us to make the web-server stuff a bit more secure against buffer-overruns. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2210 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added Util_asprintf,Util_asnprintf,Util_snprintf,Util_vsnprintf.goodale2001-05-24
| | | | | | | | | | | | | | | | | | | | | | asprintf is like sprintf, but the first arg is a char ** and should basically be the address of a null pointer. The routine allocates enough space and passes back the new buffer pointer. asnprintf is as above, but the buffer need not be null. The thirs argument is the size of the current buffer, and if the string would be larger than that, the current buffer is freed and a new buffer big enough is allocated. snprintf and vsnprintf are pretty standard, except we don't have them on all platforms so I hunted down a file on the internet, written by Patrick Powel (papowell@astart.com), to give us a portable version of the functionality. It may not be entirely up to scratch with floating point - I've not tested it too thouroughly yet. This should enable us to make the web-server stuff a bit more secure against buffer-overruns. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2209 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Stuff for sorted fixed-length lists of strings.goodale2001-05-21
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2203 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Stuff for sorted fixed-length lists of strings.goodale2001-05-21
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2202 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed compiler warnings.tradke2001-05-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2193 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Compiler warningsallen2001-05-10
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2165 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Making rcsid strings constant - PR 669.goodale2001-05-10
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2159 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed bug in CCTKi_Realloc().tradke2001-03-30
| | | | | | | | Invalidate magic number before freeing a memory block so that we really catch externally malloc'ed stuff which got such a block only by accident. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2087 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changing the name of a shadowed local variableallen2001-02-24
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2053 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fix to CCTK_ParameterFilename, and freeing some memory I'd missed whenallen2001-02-11
| | | | | | | the $PARAMETER_FILE directive is used. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2015 17b73243-c579-4c4c-a9d2-2d5706c11dac
* The terminating NUL character was set one bytes too far into the hoststring.tradke2001-01-22
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@2007 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removing extraneous include introduced by my last commit.goodale2001-01-19
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2006 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Include util_Network.h for consistency.goodale2001-01-19
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2005 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add Network.c .goodale2001-01-19
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2004 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Add in winsock header file necessary for Windows.goodale2001-01-19
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@2003 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added separate source file plus header for network related utility routines.tradke2001-01-19
| | | | | | | For now it just provides util_GetHostName(). git-svn-id: http://svn.cactuscode.org/flesh/trunk@2001 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Replacing hard-coded (and wrong) filename with __FILE__ macro in errorgoodale2001-01-14
| | | | | | | | | message. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1993 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Lots more grdoc.goodale2000-11-13
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1889 17b73243-c579-4c4c-a9d2-2d5706c11dac
* grdoc, coding guidelines, removing obsolete code.goodale2000-11-13
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1888 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Lots more grdoc.goodale2000-11-13
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1887 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Cactus/460allen2000-10-07
| | | | | | | Optimising CCTK_Equals and fixing Util_NullTerminate git-svn-id: http://svn.cactuscode.org/flesh/trunk@1861 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed bug in Util_SplitFilename.allen2000-10-05
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1857 17b73243-c579-4c4c-a9d2-2d5706c11dac
* grdoc, style-guidelines, ...goodale2000-10-05
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1854 17b73243-c579-4c4c-a9d2-2d5706c11dac
* CCTK_NullTerminateString now removes the blanks at the end of a string.allen2000-10-04
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1853 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added Util_SplitFilename which provides the directory and filename from a ↵allen2000-10-03
| | | | | | full name git-svn-id: http://svn.cactuscode.org/flesh/trunk@1848 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed $PARAMETER_FILE to strip off directory in par fileallen2000-10-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1847 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removed deprecated CCTK_mkdirallen2000-09-21
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1835 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added CCTK_CurrentTime and CCTK_CurrentDateallen2000-09-19
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1826 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added extra argument to Util_HashDestroy so a function which destroysgoodale2000-09-14
| | | | | | | | | | | | the objects stored in the hash can be passed in. If NULL is passed it ignored this argument. Fixed a bug in Util_HashDestroy. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1814 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added a 'volatile' qualifier to all variables which hold the result of atradke2000-09-12
| | | | | | | | modulo operation. This just servers as a temporary workaround for a Hitachi compiler bug. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1813 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removing compiler warnings and tidyingallen2000-07-15
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1752 17b73243-c579-4c4c-a9d2-2d5706c11dac
* New arguments for CCTK_Abortallen2000-07-14
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1746 17b73243-c579-4c4c-a9d2-2d5706c11dac
* adding CCTK_VWarns, fixed a bug in reallocation countlanfer2000-07-06
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1710 17b73243-c579-4c4c-a9d2-2d5706c11dac
* (Nasty) little hack to add the old Cactus 3 nameofparfile functionality ...allen2000-06-29
| | | | | | | | | | | | | | | | | | anywhere that $PARAMETER_FILE appears it will be replaced by the name of the parameter file that was used, without the last 4 characters. This is so you can say IO::outdir = $PARAMETER_FILE so that ./cactus_exe mypar.par will put output in a directory mypar (using the standard IO thorns). This feature won't be documented until it is added properly, and the notation may change slightly. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1707 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Adding standard header fileallen2000-06-24
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1698 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixing memory leak.goodale2000-05-12
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1650 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixed couple of bugs I just commitedallen2000-05-10
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1647 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Switched the arguments for CCTK_CreateDirectory so that the string is lastallen2000-05-10
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1645 17b73243-c579-4c4c-a9d2-2d5706c11dac
* CCTK_mkdir is now replaced byallen2000-05-10
| | | | | | | | | | | CCTK_CreateDirectory which creates a directory and any needed parents CCTK_mkdir will be removed in Beta 9 git-svn-id: http://svn.cactuscode.org/flesh/trunk@1636 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Changing macro name to keep solaris compiler happy.goodale2000-05-08
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1630 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added CCTK_MkDirs to make a directory and all necessary parents.goodale2000-05-02
| | | | | | | | | CCTK_mkdir now calls this. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1622 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Moved the util string functions to one place.goodale2000-05-02
| | | | | | | | | | Added Util_StrSep - same functionality as strsep. Renamed CCTK_StrDup as Util_Strdup. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1621 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Check with stat(2) if the directory to be created already exists.tradke2000-04-28
| | | | | | | | | | | | | | | This should work for NT as well. Changed return values of CCTK_mkdir(): 0 dir was successfully created positive dir already exists negative failed to create dir for some reason Currently it still uses system(3) to create the dir where you cannot really check for an error code. This should be replaced by mkdir(2) in the future. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1620 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Fixing various warnings.goodale2000-04-19
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1596 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removing rcsid warningsallen2000-04-17
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1559 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Removing incprrect syntax after #endif.goodale2000-04-13
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1538 17b73243-c579-4c4c-a9d2-2d5706c11dac
* Added back the line to in CCTK_FortranString which does agoodale2000-04-04
| | | | | | | | | | | | ONE_FORTSTRING_CREATE. This will produce compiler warnings about unused variables on most platforms but is necessary for the T3E. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1512 17b73243-c579-4c4c-a9d2-2d5706c11dac
* removing Warnign from Malloc.clanfer2000-04-03
| | | | git-svn-id: http://svn.cactuscode.org/flesh/trunk@1508 17b73243-c579-4c4c-a9d2-2d5706c11dac
* GRDOC and bugfix for CCTK_Strdup.goodale2000-03-31
| | | | | | | Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1507 17b73243-c579-4c4c-a9d2-2d5706c11dac