VirtualBox

source: kBuild/trunk/src/sed/lib/utils.h@ 2421

Last change on this file since 2421 was 599, checked in by bird, 18 years ago

GNU sed 4.1.5.

File size: 1.9 KB
Line 
1/* Functions from hack's utils library.
2 Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003
3 Free Software Foundation, Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
8 any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18
19#include <stdio.h>
20
21#include "basicdefs.h"
22
23void panic P_((const char *str, ...));
24
25FILE *ck_fopen P_((const char *name, const char *mode, bool fail));
26void ck_fwrite P_((const VOID *ptr, size_t size, size_t nmemb, FILE *stream));
27size_t ck_fread P_((VOID *ptr, size_t size, size_t nmemb, FILE *stream));
28void ck_fflush P_((FILE *stream));
29void ck_fclose P_((FILE *stream));
30size_t ck_getline P_((char **text, size_t *buflen, FILE *stream));
31FILE * ck_mkstemp P_((char **p_filename, char *tmpdir, char *base));
32void ck_rename P_((const char *from, const char *to, const char *unlink_if_fail));
33
34VOID *ck_malloc P_((size_t size));
35VOID *xmalloc P_((size_t size));
36VOID *ck_realloc P_((VOID *ptr, size_t size));
37char *ck_strdup P_((const char *str));
38VOID *ck_memdup P_((const VOID *buf, size_t len));
39void ck_free P_((VOID *ptr));
40
41struct buffer *init_buffer P_((void));
42char *get_buffer P_((struct buffer *b));
43size_t size_buffer P_((struct buffer *b));
44char *add_buffer P_((struct buffer *b, const char *p, size_t n));
45char *add1_buffer P_((struct buffer *b, int ch));
46void free_buffer P_((struct buffer *b));
47
48extern const char *myname;
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette