diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 1999-10-05 22:58:32 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 1999-10-05 22:58:32 +0000 |
commit | 084fac40aceeeca57e774d4f8adb6a6ca461731d (patch) | |
tree | c92657a42b94419ab9579e8c52639c301764ec40 /internal.h | |
parent | 1f3e8dc36947bdcc2d008fba3cdc29e2c79f9c27 (diff) | |
download | busybox-w32-084fac40aceeeca57e774d4f8adb6a6ca461731d.tar.gz busybox-w32-084fac40aceeeca57e774d4f8adb6a6ca461731d.tar.bz2 busybox-w32-084fac40aceeeca57e774d4f8adb6a6ca461731d.zip |
More stuff works.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@9 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 109 |
1 files changed, 54 insertions, 55 deletions
diff --git a/internal.h b/internal.h index e658d3b7d..75e5503cf 100644 --- a/internal.h +++ b/internal.h | |||
@@ -1,3 +1,26 @@ | |||
1 | /* | ||
2 | * Busybox main header file | ||
3 | * | ||
4 | * Copyright (C) 1998 by Erik Andersen <andersee@debian.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell | ||
21 | * Permission has been granted to redistribute this code under the GPL. | ||
22 | * | ||
23 | */ | ||
1 | #ifndef _INTERNAL_H_ | 24 | #ifndef _INTERNAL_H_ |
2 | #define _INTERNAL_H_ | 25 | #define _INTERNAL_H_ |
3 | 26 | ||
@@ -13,8 +36,8 @@ | |||
13 | typedef int BOOL; | 36 | typedef int BOOL; |
14 | #define STDIN 0 | 37 | #define STDIN 0 |
15 | #define STDOUT 1 | 38 | #define STDOUT 1 |
16 | #define FALSE ((BOOL) 0) | 39 | #define FALSE ((BOOL) 1) |
17 | #define TRUE ((BOOL) 1) | 40 | #define TRUE ((BOOL) 0) |
18 | 41 | ||
19 | #define PATH_LEN 1024 | 42 | #define PATH_LEN 1024 |
20 | #define BUF_SIZE 8192 | 43 | #define BUF_SIZE 8192 |
@@ -129,60 +152,36 @@ parse_mode( | |||
129 | 152 | ||
130 | extern int parse_user_name(const char* string, struct FileInfo * i); | 153 | extern int parse_user_name(const char* string, struct FileInfo * i); |
131 | 154 | ||
132 | extern const char block_device_usage[]; | ||
133 | extern const char chgrp_usage[]; | ||
134 | extern const char chmod_usage[]; | ||
135 | extern const char chown_usage[]; | ||
136 | extern const char chroot_usage[]; | ||
137 | extern const char clear_usage[]; | ||
138 | extern const char cp_usage[]; | ||
139 | extern const char date_usage[]; | ||
140 | extern const char dd_usage[]; | ||
141 | extern const char df_usage[]; | ||
142 | extern const char dmesg_usage[]; | ||
143 | extern const char dutmp_usage[]; | ||
144 | extern const char false_usage[]; | ||
145 | extern const char fdflush_usage[]; | ||
146 | extern const char find_usage[]; | ||
147 | extern const char grep_usage[]; | ||
148 | extern const char halt_usage[]; | ||
149 | extern const char init_usage[]; | ||
150 | extern const char kill_usage[]; | ||
151 | extern const char length_usage[]; | ||
152 | extern const char ln_usage[]; | ||
153 | extern const char loadkmap_usage[]; | ||
154 | extern const char losetup_usage[]; | ||
155 | extern const char ls_usage[]; | ||
156 | extern const char math_usage[]; | ||
157 | extern const char makedevs_usage[]; | ||
158 | extern const char mkdir_usage[]; | ||
159 | extern const char mknod_usage[]; | ||
160 | extern const char mkswap_usage[]; | ||
161 | extern const char mnc_usage[]; | ||
162 | extern const char more_usage[]; | ||
163 | extern const char mount_usage[]; | ||
164 | extern const char mt_usage[]; | ||
165 | extern const char mv_usage[]; | ||
166 | extern const char printf_usage[]; | ||
167 | extern const char pwd_usage[]; | ||
168 | extern const char reboot_usage[]; | ||
169 | extern const char rm_usage[]; | ||
170 | extern const char rmdir_usage[]; | ||
171 | extern const char scan_partitions_usage[]; | ||
172 | extern const char sleep_usage[]; | ||
173 | extern const char tar_usage[]; | ||
174 | extern const char swapoff_usage[]; | ||
175 | extern const char swapon_usage[]; | ||
176 | extern const char sync_usage[]; | ||
177 | extern const char touch_usage[]; | ||
178 | extern const char tput_usage[]; | ||
179 | extern const char true_usage[]; | ||
180 | extern const char tryopen_usage[]; | ||
181 | extern const char umount_usage[]; | ||
182 | extern const char update_usage[]; | ||
183 | extern const char zcat_usage[]; | ||
184 | extern const char gzip_usage[]; | ||
185 | 155 | ||
156 | /* | ||
157 | * A chunk of data. | ||
158 | * Chunks contain data which is allocated as needed, but which is | ||
159 | * not freed until all of the data needs freeing, such as at | ||
160 | * the beginning of the next command. | ||
161 | */ | ||
162 | typedef struct chunk CHUNK; | ||
163 | #define CHUNK_INIT_SIZE 4 | ||
164 | |||
165 | struct chunk { | ||
166 | CHUNK *next; | ||
167 | char data[CHUNK_INIT_SIZE]; /* actually of varying length */ | ||
168 | }; | ||
169 | |||
170 | const char *modeString(int mode); | ||
171 | const char *timeString(time_t timeVal); | ||
172 | BOOL isDirectory(const char *name); | ||
173 | BOOL isDevice(const char *name); | ||
174 | BOOL copyFile(const char *srcName, const char *destName, BOOL setModes); | ||
175 | const char *buildName(const char *dirName, const char *fileName); | ||
176 | BOOL makeString(int argc, const char **argv, char *buf, int bufLen); | ||
177 | char *getChunk(int size); | ||
178 | char *chunkstrdup(const char *str); | ||
179 | void freeChunks(void); | ||
180 | int fullWrite(int fd, const char *buf, int len); | ||
181 | int fullRead(int fd, char *buf, int len); | ||
182 | int recursiveAction(const char *fileName, BOOL followLinks, | ||
183 | int (*fileAction) (const char *fileName), | ||
184 | int (*dirAction) (const char *fileName)); | ||
186 | 185 | ||
187 | 186 | ||
188 | #endif | 187 | #endif |