X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=dvi%2Fmdvi-lib%2Fcommon.h;h=fe4d6f7084f88db0095633d12f9c9afa9cc09efb;hb=e28a6123723a53f6984fc5c5a776409339ab2b2f;hp=67130feb7512cbfad75fbb618b034865b572d266;hpb=c3e1500a4815225f08e1b20dd066559e8c92c280;p=evince.git diff --git a/dvi/mdvi-lib/common.h b/dvi/mdvi-lib/common.h index 67130feb..fe4d6f70 100644 --- a/dvi/mdvi-lib/common.h +++ b/dvi/mdvi-lib/common.h @@ -202,23 +202,19 @@ extern void __debug __PROTO((int, const char *, ...)); /* memory allocation */ -extern void xfree __PROTO((void *)); -extern void *xmalloc __PROTO((size_t)); -extern void *xrealloc __PROTO((void *, size_t)); -extern void *xcalloc __PROTO((size_t, size_t)); -extern char *xstrncpy __PROTO((char *, const char *, size_t)); -extern char *xstrdup __PROTO((const char *)); -extern char *xstrndup __PROTO((const char *, size_t)); -extern void *xmemdup __PROTO((const void *, size_t)); +extern void mdvi_free __PROTO((void *)); +extern void *mdvi_malloc __PROTO((size_t)); +extern void *mdvi_realloc __PROTO((void *, size_t)); +extern void *mdvi_calloc __PROTO((size_t, size_t)); +extern char *mdvi_strncpy __PROTO((char *, const char *, size_t)); +extern char *mdvi_strdup __PROTO((const char *)); +extern char *mdvi_strndup __PROTO((const char *, size_t)); +extern void *mdvi_memdup __PROTO((const void *, size_t)); /* macros to make memory allocation nicer */ -#define xalloc(t) (t *)xmalloc(sizeof(t)) -#define xnalloc(t,n) (t *)xcalloc((n), sizeof(t)) -#define xresize(p,t,n) (t *)xrealloc((p), (n) * sizeof(t)) - -extern int get_number __PROTO((const char *, long *)); -/* return paper dimensions (in cm) */ -extern int paper_dimensions __PROTO((const char *, double *, double *)); +#define xalloc(t) (t *)mdvi_malloc(sizeof(t)) +#define xnalloc(t,n) (t *)mdvi_calloc((n), sizeof(t)) +#define xresize(p,t,n) (t *)mdvi_realloc((p), (n) * sizeof(t)) extern char *xstradd __PROTO((char *, size_t *, size_t, const char *, size_t)); @@ -255,10 +251,8 @@ extern void dstring_reset __PROTO((Dstring *)); extern char *dgets __PROTO((Dstring *, FILE *)); extern int file_readable __PROTO((const char *)); extern int file_exists __PROTO((const char *)); -extern char *find_in_path __PROTO((const char *path, const char *file)); extern const char *file_basename __PROTO((const char *)); extern const char *file_extension __PROTO((const char *)); -extern char *read_into_core __PROTO((const char *, size_t *)); /* * Miscellaneous macros