MCPcopy Create free account
hub / github.com/NetHack/NetHack / new_dirty_rect

Function new_dirty_rect

outdated/win/gem/gr_rect.c:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <limits.h>
10#include "gr_rect.h"
11dirty_rect *
12new_dirty_rect(int size)
13{
14 dirty_rect *new = NULL;
15 if (size > 0) {
16 new = (dirty_rect *) calloc(1L, sizeof(dirty_rect));
17 if (new) {
18 new->rects = (GRECT *) calloc((long) size, sizeof(GRECT));
19 if (new->rects == NULL) {
20 free(new);
21 return (NULL);
22 }
23 new->max = size;
24 }
25 }
26 return (new);
27}
28void
29delete_dirty_rect(dirty_rect *this)
30{

Callers 1

mar_create_windowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected