Changeset 9275a3 for pcp/src/helpers.h


Ignore:
Timestamp:
Apr 21, 2008, 2:19:23 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
32de28
Parents:
907086e
git-author:
Frederik Heber <heber@…> (04/18/08 14:50:42)
git-committer:
Frederik Heber <heber@…> (04/21/08 14:19:23)
Message:

Free(): now takes a debug string to know where free error occured
debug(): now depends on HAVE_DEBUG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/helpers.h

    r907086e r9275a3  
    1717#include<stddef.h> /* fuer size_t */
    1818
    19 void debug(struct Problem *P, const char *output);
     19// taken out of TREMOLO
     20/*@-namechecks@*/
     21#ifndef __GNUC__
     22# undef __attribute__
     23# define __attribute__(x)
     24#endif
     25/*@=namechecks@*/
     26
     27
     28/* Behandelt aufgetretene Fehler. error ist der Fehlertyp(enum Errors)
     29   void *SpecialData ist ein untypisierter Zeiger auf Spezielle Daten zur Fehlerbehandlung.
     30   Man koennte auch noch einen Zeiger auf eine Funktion uebergeben */
     31extern void /*@exits@*/ debug(struct Problem *P, const char *output);
     32  //__attribute__ ((__return__));
     33#define debug(err, data) debug_in((err), (data), __FILE__, __LINE__)
     34
     35extern void /*@exits@*/ debug_in(struct Problem *P, const char *output,
     36    const char *file, const int line);
     37  //__attribute__ ((__return__));
     38
    2039/* Eigene malloc, die bei einem Fehler an Error output uebergibt */
    2140void* Malloc(size_t size, const char* output);
     
    3352void* Realloci(void* pointer, size_t size, const char* output, int i);
    3453void* Reallocii(void* pointer, size_t size, const char* output, int i, int j);
    35 void Free (void *ptr);
     54void Free (void *ptr, const char* output);
    3655
    3756void GetRGB(int i, unsigned int max, double* rgb);
Note: See TracChangeset for help on using the changeset viewer.