File: utils.h

package info (click to toggle)
ndoutils 1.4b7-11
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,236 kB
  • ctags: 5,098
  • sloc: ansic: 16,861; sh: 3,477; sql: 2,359; makefile: 250; perl: 132
file content (31 lines) | stat: -rw-r--r-- 721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/************************************************************************
 *
 * UTILS.H - NDO utilities header file
 * Copyright (c) 2005-2007 Ethan Galstad
 * Last Modified: 10-29-2007
 *
 ************************************************************************/

#ifndef _NDO_UTILS_H
#define _NDO_UTILS_H

/* my_free has been freed from bondage as a function */
#define my_free(ptr) { if(ptr) { free(ptr); ptr = NULL; } }


typedef struct ndo_dbuf_struct{
	char *buf;
	unsigned long used_size;
	unsigned long allocated_size;
	unsigned long chunk_size;
        }ndo_dbuf;


int ndo_dbuf_init(ndo_dbuf *,int);
int ndo_dbuf_free(ndo_dbuf *);
int ndo_dbuf_strcat(ndo_dbuf *,char *);


int my_rename(char *,char *);

#endif