#include <stdlib.h>
#include <cgraph/cgraph.h>
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
#define NEW(t) malloc(sizeof(t))
typedef struct {
#include <string.h>
#define NEW(t) malloc(sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
#include <cgraph/cgraph.h>
#include <cgraph/cghdr.h>
#include <getopt.h>
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
static int Verbose;
static char* gname = "";
}
-#define NEW(t) (t*)calloc((1),sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define NEW(t) calloc((1),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
void makeSierpinski(int depth, edgefn ef)
{
};
#define NEW(t) malloc(sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
/* Round x up to next multiple of y, which is a power of 2 */
#define ROUND2(x,y) (((x) + ((y)-1)) & ~((y)-1))
static void pushString(slist ** stk, const char *s)
{
int sz = ROUND2(sizeof(slist) + strlen(s), sizeof(void *));
- slist *sp = (slist *) N_NEW(sz, char);
+ slist *sp = N_NEW(sz, char);
strcpy(sp->buf, s);
sp->next = *stk;
*stk = sp;
#define SMALLBUF 128
#define NEW(t) malloc(sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
#define EMPTY(s) ((s == 0) || (*s == '\0'))
#define SLEN(s) (sizeof(s)-1)
};
#define NEW(t) malloc(sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
/* Round x up to next multiple of y, which is a power of 2 */
#define ROUND2(x,y) (((x) + ((y)-1)) & ~((y)-1))
static void pushString(slist ** stk, const char *s)
{
int sz = ROUND2(sizeof(slist) + strlen(s), sizeof(void *));
- slist *sp = (slist *) N_NEW(sz, char);
+ slist *sp = N_NEW(sz, char);
strcpy(sp->buf, s);
sp->next = *stk;
*stk = sp;
#include <stdlib.h>
#define NEW(t) malloc(sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
typedef struct {
unsigned char on_stack;
#include <string.h>
#include <cgraph/agxbuf.h>
-#define N_GNEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_GNEW(n,t) calloc((n),sizeof(t))
/* agxbinit:
* Assume if init is non-null, hint = sizeof(init[])
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
-#define NEW(t) ((t*)calloc(1,sizeof(t)))
-#define N_NEW(n,t) ((t*)calloc(n,sizeof(t)))
+#define NEW(t) calloc(1,sizeof(t))
+#define N_NEW(n,t) calloc(n,sizeof(t))
#define PI 3.14159265358979323846
COORD *p;
arr = malloc((V + extra) * sizeof(COORD *));
- p = (COORD *) calloc(V * V, sizeof(COORD));
+ p = calloc(V * V, sizeof(COORD));
for (i = 0; i < V; i++) {
arr[i] = p;
p += V;
#include <string.h>
#include <ctype.h>
-#define NEW(t) (t*)calloc(1, sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n), sizeof(t))
+#define NEW(t) calloc(1, sizeof(t))
+#define N_NEW(n,t) calloc((n), sizeof(t))
typedef struct {
unsigned char *buf; /* start of buffer */
if (initcnt == 0) {
bufsz = XDBSIZE;
- ops = (char *) calloc(XDBSIZE, sz);
+ ops = calloc(XDBSIZE, sz);
}
else {
ops = (char*)(x->ops);
0
};
-#define NEW(t) (t*)calloc(1,sizeof(t))
+#define NEW(t) calloc(1,sizeof(t))
static int lookup (Dt_t* map, char* name)
{
} availfont_t;
#define NEW(t) malloc(sizeof(t))
-#define N_NEW(n,t) (t*)calloc((n),sizeof(t))
+#define N_NEW(n,t) calloc((n),sizeof(t))
static PostscriptAlias postscript_alias[] = {
#include "ps_font_equiv.h"