⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkisofs.h

📁 刻录光盘的程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Header file mkisofs.h - assorted structure definitions and typecasts.   Written by Eric Youngdale (1993).   Copyright 1993 Yggdrasil Computing, Incorporated   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 program; if not, write to the Free Software   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  *//* * 	$Id: mkisofs.h,v 1.20 1999/03/02 04:16:41 eric Exp $ */#include <stdio.h>#include <prototyp.h>/* This symbol is used to indicate that we do not have things like   symlinks, devices, and so forth available.  Just files and dirs */#ifdef VMS#define NON_UNIXFS#endif#ifdef DJGPP#define NON_UNIXFS#endif#ifdef VMS#include <sys/dir.h>#define dirent direct#endif#ifdef _WIN32#define NON_UNIXFS#endif /* _WIN32 */#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <statdefs.h>#ifndef	HAVE_LSTAT#ifndef	VMS#	define	lstat	stat#endif#endif#if defined(HAVE_DIRENT_H)# include <dirent.h># define NAMLEN(dirent) strlen((dirent)->d_name)#else# define dirent direct# define NAMLEN(dirent) (dirent)->d_namlen# if defined(HAVE_SYS_NDIR_H)#  include <sys/ndir.h># endif# if defined(HAVE_SYS_DIR_H)#  include <sys/dir.h># endif# if defined(HAVE_NDIR_H)#  include <ndir.h># endif#endif#if defined(HAVE_STRING_H)#include <string.h>#else#if defined(HAVE_STRINGS_H)#include <strings.h>#endif#endif#ifdef ultrixextern char *strdup();#endif#ifdef __STDC__#define DECL(NAME,ARGS) NAME ARGS#define FDECL1(NAME,TYPE0, ARG0) \	NAME(TYPE0 ARG0)#define FDECL2(NAME,TYPE0, ARG0,TYPE1, ARG1) \	NAME(TYPE0 ARG0, TYPE1 ARG1)#define FDECL3(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2) \	NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2)#define FDECL4(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3) \	NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2, TYPE3 ARG3)#define FDECL5(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4) \	NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2, TYPE3 ARG3, TYPE4 ARG4)#define FDECL6(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4, TYPE5, ARG5) \	NAME(TYPE0 ARG0, TYPE1 ARG1, TYPE2 ARG2, TYPE3 ARG3, TYPE4 ARG4, TYPE5 ARG5)#else#define DECL(NAME,ARGS) NAME()#define FDECL1(NAME,TYPE0, ARG0) NAME(ARG0) TYPE0 ARG0;#define FDECL2(NAME,TYPE0, ARG0,TYPE1, ARG1) NAME(ARG0, ARG1) TYPE0 ARG0; TYPE1 ARG1;#define FDECL3(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2) \	NAME(ARG0, ARG1, ARG2) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2;#define FDECL4(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3) \	NAME(ARG0, ARG1, ARG2, ARG3, ARG4) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; TYPE3 ARG3;#define FDECL5(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4) \	NAME(ARG0, ARG1, ARG2, ARG3, ARG4) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; TYPE3 ARG3; TYPE4 ARG4;#define FDECL6(NAME,TYPE0, ARG0,TYPE1, ARG1, TYPE2, ARG2, TYPE3, ARG3, TYPE4, ARG4, TYPE5, ARG5) \	NAME(ARG0, ARG1, ARG2, ARG3, ARG4, ARG5) TYPE0 ARG0; TYPE1 ARG1; TYPE2 ARG2; TYPE3 ARG3; TYPE4 ARG4; TYPE5 ARG5;#define const#endif#ifdef __SVR4#include <stdlib.h>#elseextern int optind;extern char *optarg;/* extern int getopt (int __argc, char **__argv, char *__optstring); */#endif#include "iso9660.h"#include "defaults.h"struct directory_entry{  struct directory_entry * next;  struct directory_entry * jnext;  struct iso_directory_record isorec;  unsigned int starting_block;  unsigned int size;  unsigned short priority;  unsigned char jreclen;	/* Joliet record len */  char * name;  char * table;  char * whole_name;  struct directory * filedir;  struct directory_entry * parent_rec;  unsigned int de_flags;  ino_t inode;  /* Used in the hash table */  dev_t dev;  /* Used in the hash table */  unsigned char * rr_attributes;  unsigned int rr_attr_size;  unsigned int total_rr_attr_size;  unsigned int got_rr_name;};struct file_hash{  struct file_hash * next;  ino_t inode;  /* Used in the hash table */  dev_t dev;  /* Used in the hash table */  unsigned int starting_block;  unsigned int size;};  /* * This structure is used to control the output of fragments to the cdrom * image.  Everything that will be written to the output image will eventually * go through this structure.   There are two pieces - first is the sizing where * we establish extent numbers for everything, and the second is when we actually * generate the contents and write it to the output image. * * This makes it trivial to extend mkisofs to write special things in the image. * All you need to do is hook an additional structure in the list, and the rest * works like magic. * * The three passes each do the following: * * The 'size' pass determines the size of each component and assigns the extent number * for that component. * * The 'generate' pass will adjust the contents and pointers as required now that extent * numbers are assigned.   In some cases, the contents of the record are also generated. * * The 'write' pass actually writes the data to the disc. */struct	output_fragment{  struct output_fragment * of_next;#ifdef __STDC__  int                      (*of_size)(int);  int	                   (*of_generate)(void);  int	                   (*of_write)(FILE *);#else  int                      (*of_size)();  int	                   (*of_generate)();  int	                   (*of_write)();#endif};extern struct output_fragment * out_list;extern struct output_fragment * out_tail;extern struct output_fragment padblock_desc;extern struct output_fragment voldesc_desc;extern struct output_fragment joliet_desc;extern struct output_fragment torito_desc;extern struct output_fragment end_vol;extern struct output_fragment pathtable_desc;extern struct output_fragment jpathtable_desc;extern struct output_fragment dirtree_desc;extern struct output_fragment dirtree_clean;extern struct output_fragment jdirtree_desc;extern struct output_fragment extension_desc;extern struct output_fragment files_desc;extern struct output_fragment sunboot_desc;extern struct output_fragment sunlabel_desc;extern struct output_fragment genboot_desc;/*  * This structure describes one complete directory.  It has pointers * to other directories in the overall tree so that it is clear where * this directory lives in the tree, and it also must contain pointers * to the contents of the directory.  Note that subdirectories of this * directory exist twice in this stucture.  Once in the subdir chain, * and again in the contents chain. */struct directory{  struct directory * next;  /* Next directory at same level as this one */  struct directory * subdir; /* First subdirectory in this directory */  struct directory * parent;  struct directory_entry * contents;  struct directory_entry * jcontents;  struct directory_entry * self;  char * whole_name;  /* Entire path */  char * de_name;  /* Entire path */  unsigned int ce_bytes;  /* Number of bytes of CE entries reqd for this dir */  unsigned int depth;  unsigned int size;  unsigned int extent;  unsigned int jsize;  unsigned int jextent;  unsigned short path_index;  unsigned short jpath_index;  unsigned short dir_flags;  unsigned short dir_nlink;};struct deferred{  struct deferred * next;  unsigned int starting_block;  char * name;  struct directory * filedir;  unsigned int flags;};extern int goof;extern struct directory * root;extern struct directory * reloc_dir;extern unsigned int next_extent;extern unsigned int last_extent;extern unsigned int last_extent_written;extern unsigned int session_start;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -