File: utils.h

package info (click to toggle)
oleo 1.6-16
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,640 kB
  • ctags: 3,139
  • sloc: ansic: 39,221; yacc: 1,737; sh: 362; makefile: 88
file content (91 lines) | stat: -rw-r--r-- 2,612 bytes parent folder | download | duplicates (3)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef UTILSH
#define UTILSH

/*	Copyright (C) 1992, 1993 Free Software Foundation, Inc.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this software; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
/*  t. lord	Sun Aug  9 20:37:34 1992	*/

#include <stdio.h>
#include "funcdef.h"
#include "global.h"

extern char *argv_name;
extern int __make_backups;
extern int __backup_by_copying;

#if PROTOTYPES
extern VOIDSTAR ck_malloc (size_t);
extern VOIDSTAR ck_calloc (size_t);
extern VOIDSTAR ck_realloc (void *,size_t);
extern char * ck_savestr (char *);
extern char * ck_savestrn (char *, int);
extern void ck_free (VOIDSTAR);
#else /* PROTOTYPES */
extern VOIDSTAR ck_malloc ();
extern VOIDSTAR ck_calloc ();
extern VOIDSTAR ck_realloc ();
extern char * ck_savestr ();
extern char * ck_savestrn ();
extern void ck_free ();
#endif /* PROTOTYPES */

#define ck_remalloc(OLD, SIZE) \
  ((OLD) ? ck_realloc ((OLD), (SIZE)) : ck_malloc (SIZE))

#if PROTOTYPES
extern void get_usr_stats (int, char **);
extern void set_usr_stats (int, char **);

extern char *char_to_string (int);
extern int string_to_char (char **);
extern FILE *xopen_with_backup (const char *,const char *);
extern int xclose (FILE *);
extern char *err_msg (void);
extern char *mk_sprintf (char *, ...);

extern void init_mem (void);
extern void init_eval (void);
extern void init_refs (void);
extern void init_cells (void);
extern VOIDSTAR init_stack (void);

extern VOIDSTAR pop_stack (VOIDSTAR);
extern void push_stack (VOIDSTAR, VOIDSTAR);
extern void flush_stack (VOIDSTAR);
#else /* PROTOTYPES */
extern void get_usr_stats ();
extern void set_usr_stats ();

extern char *char_to_string ();
extern int string_to_char ();
extern FILE *xopen_with_backup ();
extern int xclose ();
extern char *err_msg ();
extern char *mk_sprintf ();

extern void init_mem ();
extern void init_eval ();
extern void init_refs ();
extern void init_cells ();
extern VOIDSTAR init_stack ();

extern VOIDSTAR pop_stack ();
extern void push_stack ();
extern void flush_stack ();
#endif /* PROTOTYPES */

#endif