File: memory.h

package info (click to toggle)
tina 0.1.14-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 936 kB
  • sloc: ansic: 1,653; sh: 1,415; python: 1,196; makefile: 42
file content (23 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * tina - a personal information manager
 * SPDX-FileCopyrightText: 2001  Matt Kraai
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef TINA_MEMORY_H
#define TINA_MEMORY_H

#include <sys/types.h>

/* Reallocate PTR to be SIZE bytes.  */
void *xrealloc (void *ptr, size_t size);
/* Allocate a pointer to SIZE bytes.  */
void *xmalloc (size_t size);
/* Allocate a zeroed array of NMEMB SIZE-byte elements.  */
void *xcalloc (size_t nmemb, size_t size);
/* Allocate a copy of S.  */
char *xstrdup (const char *s);
/* Allocate a copy of the first N characters of S.  */
char *xstrndup (const char *s, size_t n);

#endif /* TINA_MEMORY_H */