Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenff_config.h
Go to the documentation of this file.
00001 /***************************************************************************** 00002 * FullFAT - High Performance, Thread-Safe Embedded FAT File-System * 00003 * Copyright (C) 2009 James Walmsley (james@worm.me.uk) * 00004 * * 00005 * This program is free software: you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation, either version 3 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 00017 * * 00018 * IMPORTANT NOTICE: * 00019 * ================= * 00020 * Alternative Licensing is available directly from the Copyright holder, * 00021 * (James Walmsley). For more information consult LICENSING.TXT to obtain * 00022 * a Commercial license. * 00023 * * 00024 * See RESTRICTIONS.TXT for extra restrictions on the use of FullFAT. * 00025 * * 00026 * Removing the above notice is illegal and will invalidate this license. * 00027 ***************************************************************************** 00028 * See http://worm.me.uk/fullfat for more information. * 00029 * Or http://fullfat.googlecode.com/ for latest releases and the wiki. * 00030 *****************************************************************************/ 00031 #ifndef _FF_CONFIG_H_ 00032 #define _FF_CONFIG_H_ 00033 /* 00034 Here you can change the configuration of FullFAT as appropriate to your 00035 platform. 00036 */ 00037 //---------- ENDIANESS 00038 #define FF_LITTLE_ENDIAN // Choosing the Byte-order of your system is important. 00039 //#define FF_BIG_ENDIAN // You may be able to provide better Byte-order swapping routines to FullFAT. 00040 // See ff_memory.c for more information. 00041 00042 00043 //---------- LFN (Long File-name) SUPPORT 00044 #define FF_LFN_SUPPORT // Comment this out if you don't want to worry about Patent Issues. 00045 // FullFAT works great with LFNs and without. You choose, its your project! 00046 00047 //#define FF_INCLUDE_SHORT_NAME // HT addition, in 'FF_DIRENT', beside FileName, ShortName will be filled as well 00048 // Useful for debugging, but also some situations its useful to know both. 00049 //---------- SHORTNAMES CAN USE THE CASE BITS 00050 #define FF_SHORTNAME_CASE // Works for XP+ e.g. short.TXT or SHORT.txt. 00051 00052 00053 //---------- UNICODE SUPPORT 00054 #define FF_UNICODE_SUPPORT // If this is defined, then all of FullFAT's API's will expect to receive UTF-16 formatted strings. 00055 // FF_FindFirst() and FF_FindNext() will also return Filenames in UTF-16 format. 00056 // NOTE: This option may cause FullFAT to not "Clean-compile" when using GCC. This is because 00057 // pedantically GCC refuses to accept C99 library functions, unless the -std=c99 flag is used. 00058 // To use UNICODE (UTF-16, or UTF-32 depending on the size of wchar_t) you must have a C99 compliant 00059 // compiler and library. 00060 00061 //#define FF_UNICODE_UTF8_SUPPORT // If this is defined, then all of FullFAT's API's will expect to receive UTF-8 formatted strings. 00062 // FF_FindFirst() and FF_FindNext() will also return Filenames in UTF-8 format. 00063 00064 // Note the 2 UNICODE options are mutually exclusive. Only one can be enabled. 00065 00066 // Ensure that dirents are big enough to hold the maximum UTF-8 sequence. 00067 00068 00069 //---------- FAT12 SUPPORT 00070 #define FF_FAT12_SUPPORT // Enable FAT12 Suppport. You can reduce the code-size by commenting this out. 00071 // If you don't need FAT12 support, why have it. FAT12 is more complex to process, 00072 // therefore savings can be made by not having it. 00073 00074 00075 //---------- TIME SUPPORT 00076 #define FF_TIME_SUPPORT // Should FullFAT use time stamping. Only if you have provided the relevant time drivers in ff_time.c 00077 // Note, by default ff_time.c is set-up for the Windows Demonstration. Please see ff_time.c to disable. 00078 00079 00080 //---------- FILE SPACE ALLOCATION PERFORMANCE 00081 // Uncomment the prefered method. (Can only choose a single method). 00082 #define FF_ALLOC_DEFAULT // Only allocate as much as is needed. (Provides good performance, without wasting space). 00083 //#define FF_ALLOC_DOUBLE // Doubles the size of a file each time allocation is required. (When high-performance writing is required). 00084 00085 00086 //---------- Use Native STDIO.h 00087 //#define FF_USE_NATIVE_STDIO // Makes FullFAT conform to values provided by your native STDIO.h file. 00088 00089 00090 //---------- FREE SPACE CALCULATION 00091 //#define FF_MOUNT_FIND_FREE // Uncomment this option to check for Freespace on a volume mount. (Performance Penalty while mounting). 00092 // If not done in the mount, it will be done on the first call to FF_GetFreeSize() function. 00093 00094 00095 //---------- FIND API WILD-CARD SUPPORT 00096 #define FF_FINDAPI_ALLOW_WILDCARDS // Defined to enable Wild-cards in the API. Disabling this, makes the API consistent with 1.0.x series. 00097 00098 #define FF_WILDCARD_CASE_INSENSITIVE // Alter the case insensitivity of the Wild-card checking behaviour. 00099 00100 00101 //---------- PATH CACHE ---------- 00102 #define FF_PATH_CACHE // Enables a simply Path Caching mechanism that increases performance of repeated operations 00103 // within the same path. E.g. a copy \dir1\*.* \dir2\*.* command. 00104 // This command requires FF_MAX_PATH number of bytes of memory. (Defined below, default 2600). 00105 00106 #define FF_PATH_CACHE_DEPTH 5 // The Number of PATH's to Cache. (Memory Requirement ~= FF_PATH_CACHE_DEPTH * FF_MAX_PATH). 00107 00108 00109 //---------- HASH CACHE // Speed up File-creation with a HASH table. Provides up to 20x performance boost. 00110 //#define FF_HASH_CACHE // Enable HASH to speed up file creation. 00111 #define FF_HASH_CACHE_DEPTH 10 // Number of Directories to be Hashed. (For CRC16 memory is 8KB * DEPTH) 00112 #define FF_HASH_FUNCTION CRC16 // Choose a 16-bit hash. 00113 //#define FF_HASH_FUNCTION CRC8 // Choose an 8-bit hash. 00114 00115 00116 //---------- BLKDEV USES SEMAPHORE 00117 #define FF_BLKDEV_USES_SEM // When defined, each call to fnReadBlocks and fnWriteBlocks will be done while semaphore is locked 00118 // See also ff_safety.c 00119 // (HT addition) - Thanks to Hein Tibosch 00120 00121 00122 //---------- MALLOC 00123 // These should map on to platform specific memory allocators. 00124 #define FF_MALLOC(aSize) FF_Malloc(aSize) 00125 #define FF_FREE(apPtr) FF_Free(apPtr) 00126 00127 00128 //---------- IN-LINE FUNCTIONS 00129 //---------- INLINE KeyWord // Define FF_INLINE as your compiler's inline keyword. This is placed before the type qualifier. 00130 #define FF_INLINE static __forceinline // Keywords to inline functions (Windows) 00131 //#define FF_INLINE static inline // Standard for GCC 00132 00133 //---------- Inline Memory Independence Routines for better performance, but bigger codesize. 00134 //#define FF_INLINE_MEMORY_ACCESS 00135 //---------- Inline Block Calculation Routines for slightly better performance in critical sections. 00136 //#define FF_INLINE_BLOCK_CALCULATIONS 00137 00138 00139 //---------- 64-Bit Number Support 00140 #define FF_64_NUM_SUPPORT // This helps to give information about the FreeSpace and VolumeSize of a partition or volume. 00141 // If you cannot support 64-bit integers, then FullFAT still works, its just that the functions: 00142 // FF_GetFreeSize() and FF_GetVolumeSize() don't make sense when reporting sizes > 4GB. 00143 00144 00145 //---------- Driver Sleep Time 00146 #define FF_DRIVER_BUSY_SLEEP 20 // How long FullFAT should sleep the thread for in ms, if FF_ERR_DRIVER_BUSY is recieved. 00147 00148 00149 //---------- DEBUGGING FEATURES (HELPFUL ERROR MESSAGES) 00150 #define FF_DEBUG // Enable the Error Code string functions. const FF_T_INT8 *FF_GetErrMessage( FF_T_SINT32 iErrorCode); 00151 // Uncommenting this just stops FullFAT error strings being compiled. 00152 // Further calls to FF_GetErrMessage() are safe, and simply returns a pointer to a NULL string. (""). 00153 // This should be disabled to reduce code-size dramatically. 00154 00155 00156 //---------- AUTOMATIC SETTINGS DO NOT EDIT -- These configure your options from above, and check sanity! 00157 00158 #ifdef FF_LFN_SUPPORT 00159 #define FF_MAX_FILENAME (260) 00160 #else 00161 #define FF_MAX_FILENAME (13) 00162 #endif 00163 00164 #ifdef FF_USE_NATIVE_STDIO 00165 #ifdef MAX_PATH 00166 #define FF_MAX_PATH MAX_PATH 00167 #elif PATH_MAX 00168 #define FF_MAX_PATH PATH_MAX 00169 #else 00170 #define FF_MAX_PATH 2600 00171 #endif 00172 #else 00173 #define FF_MAX_PATH 2600 00174 #endif 00175 00176 #ifndef FF_ALLOC_DOUBLE 00177 #ifndef FF_ALLOC_DEFAULT 00178 #error FullFAT Invalid ff_config.h file: A file allocation method must be specified. See ff_config.h file. 00179 #endif 00180 #endif 00181 00182 #ifdef FF_ALLOC_DOUBLE 00183 #ifdef FF_ALLOC_DEFAULT 00184 #error FullFAT Invalid ff_config.h file: Must choose a single option for File Allocation Method. DOUBLE or DEFAULT. See ff_config.h file. 00185 #endif 00186 #endif 00187 00188 #ifdef FF_UNICODE_SUPPORT 00189 #ifdef FF_UNICODE_UTF8_SUPPORT 00190 #error FullFAT Invalid ff_config.h file: Must choose a single UNICODE support option. FF_UNICODE_SUPPORT for UTF-16, FF_UNICODE_UTF8_SUPPORT for UTF-8. 00191 #endif 00192 #endif 00193 00194 #ifndef FF_FAT_CHECK // FF_FAT_CHECK is now forced. 00195 #define FF_FAT_CHECK 00196 #endif 00197 00198 #ifndef FF_LITTLE_ENDIAN 00199 #ifndef FF_BIG_ENDIAN 00200 #error FullFAT Invalid ff_config.h file: An ENDIANESS must be defined for your platform. See ff_config.h file. 00201 #endif 00202 #endif 00203 00204 #ifdef FF_LITTLE_ENDIAN 00205 #ifdef FF_BIG_ENDIAN 00206 #error FullFAT Invalid ff_config.h file: Cannot be BIG and LITTLE ENDIAN, choose either or BIG or LITTLE. See ff_config.h file. 00207 #endif 00208 #endif 00209 00210 #ifdef FF_HASH_CACHE 00211 00212 #if FF_HASH_FUNCTION == CRC16 00213 #define FF_HASH_TABLE_SIZE 8192 00214 #elif FF_HASH_FUNCTION == CRC8 00215 #define FF_HASH_TABLE_SIZE 32 00216 #else 00217 #error FullFAT Invalid ff_config.h file: Invalid Hashing function selected. CRC16 or CRC8! 00218 #endif 00219 00220 #endif 00221 00222 #endif 00223 00224 //---------- END-OF-CONFIGURATION Generated on Sat May 26 2012 04:31:57 for ReactOS by
1.7.6.1
|