Changeset 1106 in MondoRescue for trunk/mondo/src/include


Ignore:
Timestamp:
Feb 7, 2007, 11:55:11 PM (17 years ago)
Author:
Bruno Cornec
Message:

merge -r1082:1105 $SVN_M/branches/stable

Location:
trunk/mondo/src/include
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/include/mr_err.h

    r1074 r1106  
    99#define MR_ERR_H
    1010
     11#include "mr_msg.h"
     12
    1113/* functions (public methods) */
    1214
    1315extern inline void mr_exit(int errorcode, const char *message);
    14 extern inline void mr_log_exit(int errorcode, const char *message);
     16#define mr_log_exit(x,y) {mr_msg(0,y); mr_exit(x, y);}
    1517
    1618#endif                          /* MR_ERR_H */
  • trunk/mondo/src/include/mr_mem.h

    r1074 r1106  
    1313#endif
    1414#include <stdarg.h>
     15#include <stdio.h>
    1516
    1617/* functions (public methods) */
    1718
    18 extern inline void mr_free(char *allocated);
    19 extern inline void mr_allocstr(char *alloc, const char *orig);
    20 extern inline void mr_asprintf(char **alloc, const char *fmt, ...);
    21 extern inline void mr_getline(char **lineptr, size_t *n, FILE *stream);
    22 extern inline void *mr_malloc(size_t size);
     19#define mr_free(x) mr_free_int((void **)&x,__LINE__,__FILE__)
     20#define mr_allocstr(x,y) mr_allocstr_int(x, y,__LINE__,__FILE__)
     21#define mr_asprintf(x,y,args...) mr_asprintf_int(x,__LINE__,__FILE__, y, ## args)
     22#define mr_getline(x,y,z) mr_getline_int(x, y,z,__LINE__,__FILE__)
     23#define mr_malloc(x) mr_malloc_int((size_t)x,__LINE__,__FILE__)
     24
     25/* Internal function bringing debuging info
     26 * called indirectly through macros */
     27extern inline void mr_free_int(void **allocated, int line, char *file);
     28extern inline void mr_allocstr_int(char *alloc, const char *orig, int line, char *file);
     29extern inline void mr_asprintf_int(char **alloc, int line, char *file, const char *fmt, ...);
     30extern inline void mr_getline_int(char **lineptr, size_t *n, FILE *stream, int line, char *file);
     31extern inline void *mr_malloc_int(size_t size, int line, char *file);
    2332
    2433#endif                          /* MR_MEM_H */
  • trunk/mondo/src/include/mr_msg.h

    r1074 r1106  
    1616/* functions (public methods) */
    1717
    18 extern inline void mr_msg(int debug, const char *fmt, ...);
     18#define mr_msg(x,y,args...) {mr_msg_int(x,__LINE__,__FILE__,y,## args);}
    1919extern void mr_msg_init(const char *configfile, int loglevel);
    2020extern void mr_msg_close(void);
    2121
     22/* Internal function bringing debuging info
     23 * called indirectly through macros */
     24extern inline void mr_msg_int(int debug,int line, const char *file, const char *fmt, ...);
     25
    2226#endif                          /* MR_MSG_H */
  • trunk/mondo/src/include/mr_str.h

    r1079 r1106  
    1313extern inline char *mr_strtok(char *instr, const char *delims, int *lastpos);
    1414extern inline char *mr_stresc(char *instr, char *toesc, const char escchr);
     15extern inline char *mr_date(void);
    1516
    1617#endif                          /* MR_STR_H */
  • trunk/mondo/src/include/my-stuff.h

    r1081 r1106  
    1313/*The number of lines of log output to keep at the bottom of the screen.*/
    1414#define NOOF_ERR_LINES  6   
     15
     16/* Hardcoded: Bad for the moment */
     17#define MONDO_CACHE "/var/cache/mondo"
     18#define MONDORESTORECFG MONDO_CACHE"/mondo-restore.cfg"
     19
    1520
    1621/**
     
    270275 * Free variables and call finish(@p x).
    271276 */
    272 #define paranoid_MR_finish(x) {free_MR_global_filenames (); if (g_bkpinfo_DONTUSETHIS) mr_free ( g_bkpinfo_DONTUSETHIS ); finish(x); }
     277#define paranoid_MR_finish(x) {free_MR_global_filenames (); if (g_bkpinfo_DONTUSETHIS) mr_free ( (void*) g_bkpinfo_DONTUSETHIS ); finish(x); }
    273278
    274279/**
Note: See TracChangeset for help on using the changeset viewer.