|
char * | get_log_fname (void) |
|
char * | get_log_file (void) |
|
void | resume_log_file (void) |
|
int | _xprintf (const char *const xprintf_file, const char *const xprintf_func, const int xprintf_line, MessageType type, const char *const fmt,...) |
| Multi-purpose printing routine: messages, warnings, errors. More...
|
|
void * | xmalloc (size_t size) |
| Memory allocation with checking. More...
|
|
void * | xrealloc (void *ptr, size_t size) |
| Reallocation of memory block with checking. More...
|
|
int | xsystem (const char *) |
| SYSTEM with err handling. More...
|
|
char * | xstrcpy (const char *) |
| MAKE BRAND NEW COPY OF STRING. More...
|
|
char * | xstrtok (char *s, int position=-1) |
| STRTOK WITH ERROR HANDLING and whitespace delimiters. More...
|
|
char * | xstrtok (char *, const char *delim, int position=-1) |
| STRTOK WITH ERROR HANDLING and user specified delimiters. More...
|
|
int | xchomp (char *s) |
| Delete trailing whitespace characters (space,tab,CR,NL). More...
|
|
void | chkerr (unsigned int ierr) |
|
void | chkerr_assert (unsigned int ierr) |
|
|
void * | operator new (std::size_t size) OPERATOR_NEW_THROW_EXCEPTION |
| test & free memory More...
|
|
void * | operator new[] (std::size_t size) OPERATOR_NEW_THROW_EXCEPTION |
|
void | operator delete (void *p) throw () |
|
void | operator delete[] (void *p) throw () |
|
|
int | xmkdir (const char *s) |
| Operations on files and directories. More...
|
|
int | xchdir (const char *s) |
| Change directory (GLIBC function, original in <unistd.h>) More...
|
|
int | xremove (const char *s) |
| Remove file or directory (function) More...
|
|
char * | xgetcwd (void) |
| Get current working directory (GLIBC function, original in <unistd.h>) More...
|
|
int | xrename (const char *oldname, const char *newname) |
| Changes the name of the file or directory specified by oldname to newname. More...
|
|
???
Copyright (C) 2007 Technical University of Liberec. All rights reserved.
Please make a following refer to Flow123d on your project site if you use the program for any purpose, especially for academic research: Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
$Id$ $Revision$ $LastChangedBy$ $LastChangedDate$
Definition in file system.hh.
void* xrealloc |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
Reallocation of memory block with checking.
Reallocates memory block with checking of successful reallocation. The size of the memory block pointed to by the ptr parameter is changed to the size bytes, expanding or reducing the amount of memory available in the block.
The function may move the memory block to a new location, in which case the new location is returned. The content of the memory block is preserved up to the lesser of the new and old sizes, even if the block is moved. If the new size is larger, the value of the newly allocated portion is indeterminate.
In case that ptr is NULL, the function behaves exactly as malloc, assigning a new block of size bytes and returning a pointer to the beginning of it.
In case that the size is 0, the memory previously allocated in ptr is deallocated as if a call to free was made, and a NULL pointer is returned.
- Parameters
-
[in] | ptr | Pointer to a memory block previously allocated |
[in] | size | New size for the memory block, in bytes. |
- Returns
- same as ISO C realloc()
Definition at line 243 of file system.cc.