home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / cpio11as.zip / EXTERN.H < prev    next >
C/C++ Source or Header  |  1992-02-22  |  4KB  |  137 lines

  1. /* extern.h - External declarations for cpio.
  2.    Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 1, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  17.  
  18. /* MS-DOS port (c) 1990 by Thorsten Ohl, ohl@gnu.ai.mit.edu
  19.    This port is also distributed under the terms of the
  20.    GNU General Public License as published by the
  21.    Free Software Foundation.
  22.  
  23.    Please note that this file is not identical to the
  24.    original GNU release, you should have received this
  25.    code as patch to the official release.
  26.  
  27.    $Header: e:/gnu/cpio/RCS/extern.h 1.1.0.2 90/09/23 23:11:18 tho Exp $
  28.  */
  29.  
  30. #ifdef MSDOS
  31. #define LONG long
  32. #else
  33. #define LONG int
  34. #endif
  35.  
  36. extern int reset_time_flag;
  37. extern int io_block_size;
  38. extern int binary_flag;
  39. extern int portability_flag;
  40. extern int create_dir_flag;
  41. extern int rename_flag;
  42. extern int table_flag;
  43. extern int unconditional_flag;
  44. extern int verbose_flag;
  45. extern int link_flag;
  46. extern int retain_time_flag;
  47. extern int copy_matching_files;
  48. extern int numeric_uid;
  49.  
  50. extern char *input_buffer, *output_buffer;
  51. extern char *in_buff, *out_buff;
  52. extern LONG input_size, output_size;
  53. extern LONG input_bytes, output_bytes;
  54. extern char *directory_name;
  55. extern char **save_patterns;
  56. extern int num_patterns;
  57. #ifdef MSDOS            /* shut up the compiler */
  58. extern int input_is_special;
  59. extern int output_is_special;
  60. extern int input_is_seekable;
  61. extern int output_is_seekable;
  62. #else /* not MSDOS */
  63. extern char input_is_special;
  64. extern char output_is_special;
  65. extern char input_is_seekable;
  66. extern char output_is_seekable;
  67. #endif /* not MSDOS */
  68. extern char *program_name;
  69.  
  70. #ifdef MSDOS
  71. extern int (*xstat) (char *name, struct stat *statb);
  72. extern void (*copy_function) (void);
  73. #else
  74. extern int (*xstat) ();
  75. extern void (*copy_function) ();
  76. #endif
  77.  
  78. #ifdef MSDOS
  79.  
  80. #include <stdlib.h>
  81. #include <io.h>
  82.  
  83. extern int utime (char *, long *);    /* we're cheating... */
  84.  
  85. extern char *copystring (char *string);
  86. extern char *find_inode_file (unsigned int node_num);
  87. extern char *getgroup (int gid);
  88. extern char *getuser (int uid);
  89. extern char *xmalloc (unsigned int size);
  90. extern void add_inode (unsigned short node_num, char *file_name);
  91. extern void copy_buf_out (char *in_buf, int out_des, LONG num_bytes);
  92. extern void copy_files (int in_des, int out_des, LONG num_bytes);
  93. extern void copy_in_buf (char *in_buf, int in_des, LONG num_bytes);
  94. extern void create_all_directories (char *name);
  95. extern void empty_output_buffer (int out_des);
  96. extern void error (int status, int errnum, char *message, ...);
  97. extern void finish_output_file (char *path, int out_des);
  98. extern void get_next_reel (int tape_des);
  99. extern void hash_insert (struct inode_val *new_value);
  100. extern void long_format (struct cpio_header *file_hdr, char *link_name);
  101. extern void process_copy_in (void);
  102. extern void process_copy_out (void);
  103. extern void process_copy_pass (void);
  104. extern void toss_input (int in_des, LONG num_bytes);
  105. extern void write_out_header (struct cpio_header *file_hdr, int out_des);
  106.  
  107. #else /* not MSDOS */
  108.  
  109. long lseek ();
  110. char *malloc ();
  111. char *realloc ();
  112.  
  113. char *copystring ();
  114. char *find_inode_file ();
  115. char *getgroup ();
  116. char *getuser ();
  117. char *xmalloc ();
  118. void add_inode ();
  119. void copy_buf_out ();
  120. void copy_files ();
  121. void copy_in_buf ();
  122. void create_all_directories ();
  123. void empty_output_buffer ();
  124. void error ();
  125. void finish_output_file ();
  126. void get_next_reel ();
  127. void hash_insert ();
  128. void long_format ();
  129. void process_copy_in ();
  130. void process_copy_out();
  131. void process_copy_pass ();
  132. void protection ();
  133. void toss_input ();
  134. void write_out_header ();
  135.  
  136. #endif /* not MSDOS */
  137.