File: archapi.h

package info (click to toggle)
vice 1.19-1etch1
  • links: PTS
  • area: contrib
  • in suites: etch
  • size: 27,132 kB
  • ctags: 33,406
  • sloc: ansic: 257,145; cpp: 13,395; sh: 3,674; makefile: 3,380; perl: 1,801; yacc: 622; lex: 258; asm: 4
file content (91 lines) | stat: -rw-r--r-- 3,284 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
/*
 * archapi.h - Common system-specific API.
 *
 * Written by
 *  Andreas Boose <viceteam@t-online.de>
 *
 * This file is part of VICE, the Versatile Commodore Emulator.
 * See README for copyright notice.
 *
 *  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 of the License, 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 program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 *  02111-1307  USA.
 *
 */

/* Do not include this header file, include `archdep.h' instead.  */

#ifndef _ARCHAPI
#define _ARCHAPI

#include <stdarg.h>
#include <stdio.h>


/* Program start.  */
extern int archdep_init(int *argc, char **argv);
extern void archdep_startup_log_error(const char *format, ...);

/* Filesystem related functions.  */
extern char *archdep_program_name(void);
extern const char *archdep_boot_path(void);
extern char *archdep_default_sysfile_pathlist(const char *emu_id);
extern int archdep_path_is_relative(const char *path);
extern int archdep_expand_path(char **return_path, const char *filename);
extern char *archdep_make_backup_filename(const char *fname);
extern int archdep_mkdir(const char *pathname, int mode);
extern int archdep_stat(const char *file_name, unsigned int *len,
                        unsigned int *isdir);

/* Resource handling.  */
extern char *archdep_default_resource_file_name(void);
extern char *archdep_default_save_resource_file_name(void);

/* Fliplist.  */
extern char *archdep_default_fliplist_file_name(void);

/* Logfile stuff.  */
extern FILE *archdep_open_default_log_file(void);
extern int archdep_default_logger(const char *level_string, const char *txt);

/* Launch program `name' (searched via the PATH environment variable)
   passing `argv' as the parameters, wait for it to exit and return its
   exit status. If `stdout_redir' or `stderr_redir' are != NULL,
   redirect stdout or stderr to the corresponding file.  */
extern int archdep_spawn(const char *name, char **argv,
                         const char *stdout_redir, const char *stderr_redir);

/* Spawn need quoting the params or expanding the filename in some archs.  */
extern char *archdep_filename_parameter(const char *name);
extern char *archdep_quote_parameter(const char *name);

extern int archdep_num_text_lines(void);
extern int archdep_num_text_columns(void);

/* Allocates a filename for a tempfile.  */
extern char *archdep_tmpnam(void);

/* Check file for gzip extension.  */
extern int archdep_file_is_gzip(const char *name);
extern int archdep_file_set_gzip(const char *name);

/* Check file name for block or char device.  */
extern int archdep_file_is_blockdev(const char *name);
extern int archdep_file_is_chardev(const char *name);

/* Free everything on exit.  */
extern void archdep_shutdown(void);

#endif