diff --git a/dingux/My_settings.h b/dingux/My_settings.h deleted file mode 100644 index cf7eba5..0000000 --- a/dingux/My_settings.h +++ /dev/null @@ -1,6 +0,0 @@ -// Pokitto config required by PokittoLib - -//#define PROJ_SHOW_FPS_COUNTER -#define PROJ_SCREENMODE 13 -#define PROJ_MODE13 1 -#define PROJ_ENABLE_SOUND 1 diff --git a/dingux/constants.h b/dingux/constants.h deleted file mode 100644 index 8b0a864..0000000 --- a/dingux/constants.h +++ /dev/null @@ -1,579 +0,0 @@ -/** - @file constants.h - - This file contains definitions of game constants that are not considered - part of game settings and whose change can ffect the game balance and - playability, e.g. physics constants. - - by Miloslav Ciz (drummyfish), 2019 - - Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) - plus a waiver of all other intellectual property. The goal of this work is - be and remain completely in the public domain forever, available for any use - whatsoever. -*/ - -#ifndef _SFG_CONSTANTS_H -#define _SFG_CONSTANTS_H - -/** - How quickly player moves, in squares per second. -*/ -#define SFG_PLAYER_MOVE_SPEED 7 - -/** - Gravity acceleration in squares / (second^2). -*/ -#define SFG_GRAVITY_ACCELERATION 30 - -/** - Initial upwards speed of player's jump, in squares per second. -*/ -#define SFG_PLAYER_JUMP_SPEED 5 - -/** - Melee and close-up attack range, in RCL_Units. -*/ -#define SFG_MELEE_RANGE 1600 - -/** - When a projectile is shot, it'll be offset by this distance (in RCL_Units) - from the shooter. -*/ - -#define SFG_PROJECTILE_SPAWN_OFFSET 256 - -/** - Player's melee hit range, in RCL_Units (RCL_UNITS_PER_SQUARE means full angle, - 180 degrees to both sides). -*/ -#define SFG_PLAYER_MELEE_ANGLE 512 - -/** - How quickly elevators and squeezers move, in RCL_Unit per second. -*/ -#define SFG_MOVING_WALL_SPEED 1024 - -/** - How quickly doors open and close, in RCL_Unit per second. -*/ -#define SFG_DOOR_OPEN_SPEED 2048 - -/** - Helper special state value. -*/ -#define SFG_CANT_SAVE 255 - -/** - Says the distance in RCL_Units at which level elements (items, monsters etc.) - are active. -*/ -#define SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE (12 * 1024) - -/** - Rate at which AI will be updated, which also affects how fast enemies will - appear. -*/ -#define SFG_AI_FPS 4 - -/** - Says a probability (0 - 255) of the AI changing its state during one update - step. -*/ -#define SFG_AI_RANDOM_CHANGE_PROBABILITY 40 - -/** - Distance at which level elements (sprites) collide, in RCL_Unit (1024 per - square). -*/ -#define SFG_ELEMENT_COLLISION_RADIUS 1900 - -/** - Height, in RCL_Units, at which collisions happen with level elements - (sprites). -*/ -#define SFG_ELEMENT_COLLISION_HEIGHT 1024 - -/** - Distance at which explosion does damage and throws away the player and - monsters, in RCL_Units. -*/ -#define SFG_EXPLOSION_RADIUS 2048 - -/** - Distance in RCL_Units which the player is pushed away by an explosion. -*/ -#define SFG_EXPLOSION_PUSH_AWAY_DISTANCE 1200 - -/** - How much damage triggers a barrel explosion. -*/ - -#define SFG_BARREL_EXPLOSION_DAMAGE_THRESHOLD 3 - -/** - Maximum player health. -*/ -#define SFG_PLAYER_MAX_HEALTH 125 - -/** - Start health of player. -*/ -#define SFG_PLAYER_START_HEALTH 100 - -/** - At which value health indicator shows a warning (red color). -*/ -#define SFG_PLAYER_HEALTH_WARNING_LEVEL 20 - -/** - Amount of health that is increased by taking a health kit. -*/ -#define SFG_HEALTH_KIT_VALUE 20 - -/** - How much randomness (positive and negative) will be added to damage - (e.g. by weapons, explosions, ...). This constant is is 0 to 255, 255 meaning - 100% of the base value. -*/ -#define SFG_DAMAGE_RANDOMNESS 64 - -/** - Height of monster collision BBox in RCL_Units. -*/ -#define SFG_MONSTER_COLLISION_HEIGHT 1024 - -/** - Specifies key repeat delay, in ms. -*/ -#define SFG_KEY_REPEAT_DELAY 500 - -/** - Specifies key repeat period, in ms. -*/ -#define SFG_KEY_REPEAT_PERIOD 150 - -/** - Angle in which multiple projectiles are spread, RCL_Units. -*/ -#define SFG_PROJECTILE_SPREAD_ANGLE 100 - -#define SFG_MAX_MONSTERS 64 - -#define SFG_MAX_PROJECTILES 12 - -#define SFG_MAX_DOORS 32 - -#define SFG_AMMO_BULLETS 0 -#define SFG_AMMO_ROCKETS 1 -#define SFG_AMMO_PLASMA 2 - -#define SFG_AMMO_TOTAL 3 - -#define SFG_AMMO_NONE SFG_AMMO_TOTAL - -#define SFG_AMMO_INCREASE_BULLETS 10 -#define SFG_AMMO_INCREASE_ROCKETS 5 -#define SFG_AMMO_INCREASE_PLASMA 8 - -#define SFG_AMMO_MAX_BULLETS 200 -#define SFG_AMMO_MAX_ROCKETS 100 -#define SFG_AMMO_MAX_PLASMA 150 - -/** - Duration of story text (intro/outro) in ms. -*/ -#define SFG_STORYTEXT_DURATION 15000 - -/** - Time in ms of the player death animation. -*/ -#define SFG_LOSE_ANIMATION_DURATION 2000 - -/** - Time in ms of the level win animation. -*/ -#define SFG_WIN_ANIMATION_DURATION 2500 - -/** - Time in ms of the level start stage. -*/ -#define SFG_LEVEL_START_DURATION 1500 - -/** - Vertical sprite size, in RCL_Units. -*/ -#define SFG_BASE_SPRITE_SIZE RCL_UNITS_PER_SQUARE - -// ---------------------------- -// derived constants - -#define SFG_GAME_RESOLUTION_X \ - (SFG_SCREEN_RESOLUTION_X / SFG_RESOLUTION_SCALEDOWN) - -#define SFG_GAME_RESOLUTION_Y \ - (SFG_SCREEN_RESOLUTION_Y / SFG_RESOLUTION_SCALEDOWN) - -#define SFG_MS_PER_FRAME (1000 / SFG_FPS) // ms per frame with target FPS - -#if SFG_MS_PER_FRAME == 0 - #undef SFG_MS_PER_FRAME - #define SFG_MS_PER_FRAME 1 -#endif - -#define SFG_KEY_REPEAT_DELAY_FRAMES \ - (SFG_KEY_REPEAT_DELAY / SFG_MS_PER_FRAME) - -#if SFG_KEY_REPEAT_DELAY_FRAMES == 0 - #undef SFG_KEY_REPEAT_DELAY_FRAMES - #define SFG_KEY_REPEAT_DELAY_FRAMES 1 -#endif - -#define SFG_KEY_REPEAT_PERIOD_FRAMES \ - (SFG_KEY_REPEAT_PERIOD / SFG_MS_PER_FRAME) - -#if SFG_KEY_REPEAT_PERIOD_FRAMES == 0 - #undef SFG_KEY_REPEAT_PERIOD_FRAMES - #define SFG_KEY_REPEAT_PERIOD_FRAMES 1 -#endif - -#define SFG_WEAPON_IMAGE_SCALE \ - (SFG_GAME_RESOLUTION_X / (SFG_TEXTURE_SIZE * 5)) - -#if SFG_WEAPON_IMAGE_SCALE == 0 - #undef SFG_WEAPON_IMAGE_SCALE - #define SFG_WEAPON_IMAGE_SCALE 1 -#endif - -#define SFG_WEAPONBOB_OFFSET_PIXELS \ - (SFG_WEAPONBOB_OFFSET * SFG_WEAPON_IMAGE_SCALE) - -#define SFG_WEAPON_IMAGE_POSITION_X \ - (SFG_GAME_RESOLUTION_X / 2 - (SFG_WEAPON_IMAGE_SCALE * SFG_TEXTURE_SIZE) / 2) - -#if SFG_GAME_RESOLUTION_Y > 70 - #define SFG_WEAPON_IMAGE_POSITION_Y \ - (SFG_GAME_RESOLUTION_Y - (SFG_WEAPON_IMAGE_SCALE * SFG_TEXTURE_SIZE)) -#elif SFG_GAME_RESOLUTION_Y > 50 - #define SFG_WEAPON_IMAGE_POSITION_Y (SFG_GAME_RESOLUTION_Y \ - - ((SFG_WEAPON_IMAGE_SCALE * 3 * SFG_TEXTURE_SIZE) / 4)) -#else - #define SFG_WEAPON_IMAGE_POSITION_Y \ - (SFG_GAME_RESOLUTION_Y - SFG_TEXTURE_SIZE / 2) -#endif - -#define SFG_PLAYER_TURN_UNITS_PER_FRAME \ - ((SFG_PLAYER_TURN_SPEED * RCL_UNITS_PER_SQUARE) / (360 * SFG_FPS)) - -#if SFG_PLAYER_TURN_UNITS_PER_FRAME == 0 - #undef SFG_PLAYER_TURN_UNITS_PER_FRAME - #define SFG_PLAYER_TURN_UNITS_PER_FRAME 1 -#endif - -#define SFG_PLAYER_MOVE_UNITS_PER_FRAME \ - ((SFG_PLAYER_MOVE_SPEED * RCL_UNITS_PER_SQUARE) / SFG_FPS) - -#if SFG_PLAYER_MOVE_UNITS_PER_FRAME == 0 - #undef SFG_PLAYER_MOVE_UNITS_PER_FRAME - #define SFG_PLAYER_MOVE_UNITS_PER_FRAME 1 -#endif - -#define SFG_GRAVITY_SPEED_INCREASE_PER_FRAME \ - ((SFG_GRAVITY_ACCELERATION * RCL_UNITS_PER_SQUARE) / (SFG_FPS * SFG_FPS)) - -#if SFG_GRAVITY_SPEED_INCREASE_PER_FRAME == 0 - #undef SFG_GRAVITY_SPEED_INCREASE_PER_FRAME - #define SFG_GRAVITY_SPEED_INCREASE_PER_FRAME 1 -#endif - -#define SFG_PLAYER_JUMP_OFFSET_PER_FRAME \ - (((SFG_PLAYER_JUMP_SPEED * RCL_UNITS_PER_SQUARE) / SFG_FPS) \ - - SFG_GRAVITY_SPEED_INCREASE_PER_FRAME / 2) - /* ^ This substraction corrects the initial veloc. so that the numeric curve - copies the analytical (smooth) curve. Without it the numeric curve goes - ABOVE and makes player jump higher with lower FPS. To make sense of this - try to solve the differential equation and plot it. */ - -#if SFG_PLAYER_JUMP_OFFSET_PER_FRAME == 0 - #undef SFG_PLAYER_JUMP_OFFSET_PER_FRAME - #define SFG_PLAYER_JUMP_OFFSET_PER_FRAME 1 -#endif - -#define SFG_HEADBOB_FRAME_INCREASE_PER_FRAME \ - (SFG_HEADBOB_SPEED / SFG_FPS) - -#if SFG_HEADBOB_FRAME_INCREASE_PER_FRAME == 0 - #undef SFG_HEADBOB_FRAME_INCREASE_PER_FRAME - #define SFG_HEADBOB_FRAME_INCREASE_PER_FRAME 1 -#endif - -#define SFG_HEADBOB_ENABLED (SFG_HEADBOB_SPEED > 0 && SFG_HEADBOB_OFFSET > 0) - -#define SFG_CAMERA_SHEAR_STEP_PER_FRAME \ - ((SFG_GAME_RESOLUTION_Y * SFG_CAMERA_SHEAR_SPEED) / SFG_FPS) - -#if SFG_CAMERA_SHEAR_STEP_PER_FRAME == 0 - #undef SFG_CAMERA_SHEAR_STEP_PER_FRAME - #define SFG_CAMERA_SHEAR_STEP_PER_FRAME 1 -#endif - -#define SFG_CAMERA_MAX_SHEAR_PIXELS \ - ((SFG_CAMERA_MAX_SHEAR * SFG_GAME_RESOLUTION_Y) / 1024) - -#define SFG_FONT_SIZE_SMALL \ - (SFG_GAME_RESOLUTION_X / (SFG_FONT_CHARACTER_SIZE * 50)) - -#if SFG_FONT_SIZE_SMALL == 0 - #undef SFG_FONT_SIZE_SMALL - #define SFG_FONT_SIZE_SMALL 1 -#endif - -#define SFG_FONT_SIZE_MEDIUM \ - (SFG_GAME_RESOLUTION_X / (SFG_FONT_CHARACTER_SIZE * 30)) - -#if SFG_FONT_SIZE_MEDIUM == 0 - #undef SFG_FONT_SIZE_MEDIUM - #define SFG_FONT_SIZE_MEDIUM 1 -#endif - -#define SFG_FONT_SIZE_BIG \ - (SFG_GAME_RESOLUTION_X / (SFG_FONT_CHARACTER_SIZE * 18)) - -#if SFG_FONT_SIZE_BIG == 0 - #undef SFG_FONT_SIZE_BIG - #define SFG_FONT_SIZE_BIG 1 -#endif - -#define SFG_Z_BUFFER_SIZE SFG_GAME_RESOLUTION_X - -/** - Step in which walls get higher, in raycastlib units. -*/ -#define SFG_WALL_HEIGHT_STEP (RCL_UNITS_PER_SQUARE / 4) - -#define SFG_CEILING_MAX_HEIGHT\ - (16 * RCL_UNITS_PER_SQUARE - RCL_UNITS_PER_SQUARE / 2 ) - -#define SFG_DOOR_UP_DOWN_MASK 0x20 -#define SFG_DOOR_LOCK(doorRecord) ((doorRecord) >> 6) -#define SFG_DOOR_VERTICAL_POSITION_MASK 0x1f -#define SFG_DOOR_HEIGHT_STEP (RCL_UNITS_PER_SQUARE / 0x1f) - -#define SFG_DOOR_INCREMENT_PER_FRAME \ - (SFG_DOOR_OPEN_SPEED / (SFG_DOOR_HEIGHT_STEP * SFG_FPS)) - -#if SFG_DOOR_INCREMENT_PER_FRAME == 0 - #undef SFG_DOOR_INCREMENT_PER_FRAME - #define SFG_DOOR_INCREMENT_PER_FRAME 1 -#endif - -#define SFG_MAX_ITEMS SFG_MAX_LEVEL_ELEMENTS - -#define SFG_MAX_SPRITE_SIZE SFG_GAME_RESOLUTION_X - -#define SFG_MAP_PIXEL_SIZE (SFG_GAME_RESOLUTION_Y / SFG_MAP_SIZE) - -#if SFG_MAP_PIXEL_SIZE == 0 - #undef SFG_MAP_PIXEL_SIZE - #define SFG_MAP_PIXEL_SIZE 1 -#endif - -#define SFG_AI_UPDATE_FRAME_INTERVAL \ - (SFG_FPS / SFG_AI_FPS) - -#if SFG_AI_UPDATE_FRAME_INTERVAL == 0 - #undef SFG_AI_UPDATE_FRAME_INTERVAL - #define SFG_AI_UPDATE_FRAME_INTERVAL 1 -#endif - -#define SFG_SPRITE_ANIMATION_FRAME_DURATION \ - (SFG_FPS / SFG_SPRITE_ANIMATION_SPEED) - -#if SFG_SPRITE_ANIMATION_FRAME_DURATION == 0 - #undef SFG_SPRITE_ANIMATION_FRAME_DURATION - #define SFG_SPRITE_ANIMATION_FRAME_DURATION 1 -#endif - -#define SFG_HUD_MARGIN (SFG_GAME_RESOLUTION_X / 40) - -#define SFG_HUD_BORDER_INDICATOR_WIDTH_PIXELS \ - (SFG_GAME_RESOLUTION_Y / SFG_HUD_BORDER_INDICATOR_WIDTH) - -#define SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES \ - (SFG_HUD_BORDER_INDICATOR_DURATION / SFG_MS_PER_FRAME) - -#if SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES == 0 - #define SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES 1 -#endif - -#define SFG_BLINK_PERIOD_FRAMES (SFG_BLINK_PERIOD / SFG_MS_PER_FRAME) - -#define SFG_HUD_BAR_HEIGHT \ - (SFG_FONT_CHARACTER_SIZE * SFG_FONT_SIZE_MEDIUM + SFG_HUD_MARGIN * 2 + 1) - -// ---------------------------- -// monsters - -#define SFG_MONSTER_ATTACK_MELEE 0 -#define SFG_MONSTER_ATTACK_FIREBALL 1 -#define SFG_MONSTER_ATTACK_BULLET 2 -#define SFG_MONSTER_ATTACK_FIREBALL_BULLET 3 -#define SFG_MONSTER_ATTACK_PLASMA 4 -#define SFG_MONSTER_ATTACK_EXPLODE 5 -#define SFG_MONSTER_ATTACK_FIREBALL_PLASMA 6 - -#define SFG_MONSTER_ATTRIBUTE(attackType,aggressivity0to255,health0to255,spriteSize0to3) \ - ((uint16_t) ( \ - attackType | \ - ((aggressivity0to255 / 8) << 3) | \ - (spriteSize0to3 << 8) | \ - ((health0to255 / 4) << 10))) - -#define SFG_GET_MONSTER_ATTACK_TYPE(monsterNumber) \ - (SFG_monsterAttributeTable[monsterNumber] & 0x0007) - -#define SFG_GET_MONSTER_AGGRESSIVITY(monsterNumber) \ - (((SFG_monsterAttributeTable[monsterNumber] >> 3) & 0x1F) * 8) - -#define SFG_GET_MONSTER_SPRITE_SIZE(monsterNumber) \ - ((SFG_monsterAttributeTable[monsterNumber] >> 8) & 0x03) - -#define SFG_GET_MONSTER_MAX_HEALTH(monsterNumber) \ - (((SFG_monsterAttributeTable[monsterNumber] >> 10) & 0x3F) * 4) - -/** - Table of monster attributes, each as a 16bit word in format: - - MSB hhhhhhssaaaattt LSB - - ttt: attack type - aaaaa: aggressivity (frequence of attacks), 0 to 31 - ss: sprite size - hhhhhh: health, 0 to 63 -*/ -uint16_t SFG_monsterAttributeTable[SFG_MONSTERS_TOTAL] = -{ - /* spider */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_FIREBALL,40,61,2), - /* destr. */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_FIREBALL_BULLET,90,170,3), - /* warrior */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_MELEE,255,40,1), - /* plasma */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_PLASMA,56,92,1), - /* ender */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_FIREBALL_PLASMA,128,255,3), - /* turret */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_BULLET,32,23,0), - /* explod. */ SFG_MONSTER_ATTRIBUTE(SFG_MONSTER_ATTACK_EXPLODE,255,36,1) -}; - -// ---------------------------- -// weapons and projectiles - -#define SFG_WEAPON_KNIFE 0 -#define SFG_WEAPON_SHOTGUN 1 -#define SFG_WEAPON_MACHINE_GUN 2 -#define SFG_WEAPON_ROCKET_LAUNCHER 3 -#define SFG_WEAPON_PLASMAGUN 4 -#define SFG_WEAPON_SOLUTION 5 - -#define SFG_WEAPONS_TOTAL 6 - -#define SFG_WEAPON_ATTRIBUTE(fireType,projectileCount,fireCooldownMs) \ - ((uint8_t) (fireType | ((projectileCount - 1) << 2) | ((fireCooldownMs / (SFG_MS_PER_FRAME * 16)) << 4))) - -#define SFG_GET_WEAPON_FIRE_TYPE(weaponNumber) \ - (SFG_weaponAttributeTable[weaponNumber] & 0x03) - -#define SFG_GET_WEAPON_FIRE_COOLDOWN_FRAMES(weaponNumber) \ - ((SFG_weaponAttributeTable[weaponNumber] >> 4) * 16) - -#define SFG_GET_WEAPON_PROJECTILE_COUNT(weaponNumber) \ - (((SFG_weaponAttributeTable[weaponNumber] >> 2) & 0x03) + 1) - -#define SFG_MIN_WEAPON_COOLDOWN_FRAMES 8 - -#define SFG_WEAPON_FIRE_TYPE_MELEE 0 -#define SFG_WEAPON_FIRE_TYPE_BULLET 1 -#define SFG_WEAPON_FIRE_TYPE_FIREBALL 2 -#define SFG_WEAPON_FIRE_TYPE_PLASMA 3 - -#define SFG_WEAPON_FIRE_TYPES_TOTAL 4 - -/** - Table of weapon attributes, each as a byte in format: - - MSB ccccnnff LSB - - ff: fire type - nn: number of projectiles - 1 - cccc: fire cooldown in frames, i.e. time after which the next shot can be - shot again, ccccc has to be multiplied by 16 to get the real value -*/ -SFG_PROGRAM_MEMORY uint8_t SFG_weaponAttributeTable[SFG_WEAPONS_TOTAL] = -{ - /* knife */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_MELEE,1,650), // DPS: 6.2 - /* shotgun */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_BULLET,2,1250), // DPS: 12.8 - /* m. gun */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_BULLET,1,700), // DPS: 11.4 - /* r. laun. */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_FIREBALL,1,850), // DPS: 28.2 - /* plasma */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_PLASMA,1,550), // DPS: 32.7 - /* solution */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_PLASMA,4,1050) // DPS: 85.7 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_attackDamageTable[SFG_WEAPON_FIRE_TYPES_TOTAL] = -{ - /* melee */ 4, - /* bullet */ 8, - /* explostion (fireball) */ 24, - /* plasma */ 18 -}; - -#define SFG_PROJECTILE_EXPLOSION 0 -#define SFG_PROJECTILE_FIREBALL 1 -#define SFG_PROJECTILE_PLASMA 2 -#define SFG_PROJECTILE_DUST 3 -#define SFG_PROJECTILE_BULLET 4 -#define SFG_PROJECTILE_NONE 255 - -#define SFG_PROJECTILES_TOTAL 5 - -#define SFG_PROJECTILE_ATTRIBUTE(speedSquaresPerSec,timeToLiveMs) \ - ((uint8_t) \ - ((((speedSquaresPerSec / 4 == 0) && (speedSquaresPerSec != 0)) ? 1 : speedSquaresPerSec / 4) | \ - ((timeToLiveMs / (8 * SFG_MS_PER_FRAME)) << 3))) - -#define SFG_GET_PROJECTILE_SPEED_UPS(projectileNumber) \ - (((SFG_projectileAttributeTable[projectileNumber] & 0x07) * 4 * RCL_UNITS_PER_SQUARE) / SFG_FPS) - -#define SFG_GET_PROJECTILE_FRAMES_TO_LIVE(projectileNumber) \ - ((SFG_projectileAttributeTable[projectileNumber] >> 3) * 8) - -/** - Table of projectile attributes, each as a byte in format: - - MSB lllllsss LSB - - fff: half speed in game squares per second - lllll: eigth of frames to live -*/ - -#define LOW_FPS (SFG_FPS < 20) ///< low FPS needs low speeds, because collisions - -SFG_PROGRAM_MEMORY uint8_t SFG_projectileAttributeTable[SFG_PROJECTILES_TOTAL] = -{ - /* explosion */ SFG_PROJECTILE_ATTRIBUTE(0,400), - /* fireball */ SFG_PROJECTILE_ATTRIBUTE(10,1000), - -#if LOW_FPS - /* plasma */ SFG_PROJECTILE_ATTRIBUTE(17,500), -#else - /* plasma */ SFG_PROJECTILE_ATTRIBUTE(18,500), -#endif - - /* dust */ SFG_PROJECTILE_ATTRIBUTE(0,450), - -#if LOW_FPS - /* bullet */ SFG_PROJECTILE_ATTRIBUTE(17,1000) -#else - /* bullet */ SFG_PROJECTILE_ATTRIBUTE(28,1000) -#endif -}; - -#undef LOW_FPS - -#endif // guard diff --git a/dingux/game.h b/dingux/game.h deleted file mode 100755 index d894d44..0000000 --- a/dingux/game.h +++ /dev/null @@ -1,4819 +0,0 @@ -/** - @file game.h - - Main source file of the game that puts together all the pieces. main game - logic is implemented here. - - Physics notes (you can break this when messing with constants): - - - Lowest ceiling under which player can fit is 4 height steps. - - Widest hole over which player can run without jumping is 1 square. - - Widest hole over which the player can jump is 3 squares. - - Highest step a player can walk onto without jumping is 2 height steps. - - Highest step a player can jump onto is 3 height steps. - - by Miloslav Ciz (drummyfish), 2019 - - Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) - plus a waiver of all other intellectual property. The goal of this work is - be and remain completely in the public domain forever, available for any use - whatsoever. -*/ - -#ifndef _SFG_GAME_H -#define _SFG_GAME_H - -#include - -/* - The following keys are mandatory to be implemented on any platform in order - for the game to be playable. -*/ -#define SFG_KEY_UP 0 -#define SFG_KEY_RIGHT 1 -#define SFG_KEY_DOWN 2 -#define SFG_KEY_LEFT 3 -#define SFG_KEY_A 4 -#define SFG_KEY_B 5 -#define SFG_KEY_C 6 - -/* - The following keys are optional for a platform to implement. They just make - the controls more comfortable. -*/ -#define SFG_KEY_JUMP 7 -#define SFG_KEY_STRAFE_LEFT 8 -#define SFG_KEY_STRAFE_RIGHT 9 -#define SFG_KEY_MAP 10 -#define SFG_KEY_TOGGLE_FREELOOK 11 -#define SFG_KEY_NEXT_WEAPON 12 -#define SFG_KEY_PREVIOUS_WEAPON 13 -#define SFG_KEY_MENU 14 - -#define SFG_KEY_COUNT 15 ///< Number of keys. - -/* ============================= PORTING =================================== */ - -/* When porting, do the following: - - Include this file (and possibly other optionaly files) in your main_* - frontend source. - - Implement the following functions in your frontend source. - - Call SFG_init() from your frontend initialization code. - - Call SFG_mainLoopBody() from within your frontend main loop. -*/ - -#ifndef SFG_LOG - #define SFG_LOG(str) ; ///< Can be redefined to log messages for better debug. -#endif - -/** - Returns 1 (0) if given key is pressed (not pressed). At least the mandatory - keys have to be implemented, the optional keys don't have to ever return 1. - See the key contant definitions to see which ones are mandatory. -*/ -int8_t SFG_keyPressed(uint8_t key); - -/** - Optinal function for mouse/analog controls, gets mouse x and y offset in - pixels from the game screen center (to achieve classic FPS mouse controls the - platform should center the mouse at the end). If the platform isn't using a - mouse, this function can simply return [0,0] offets at each call, or even - do nothing (leave the variables as are). -*/ -void SFG_getMouseOffset(int16_t *x, int16_t *y); - -/** - Returns time in ms sice program start. -*/ -uint32_t SFG_getTimeMs(); - -/** - Sleep (yield CPU) for specified amount of ms. This is used to relieve CPU - usage. If your platform doesn't need this or handles it in other way, this - function can do nothing. -*/ -void SFG_sleepMs(uint16_t timeMs); - -/** - Set specified screen pixel. The function doesn't have to check whether - the coordinates are within screen. -*/ -static inline void SFG_setPixel(uint16_t x, uint16_t y, uint8_t colorIndex); - -/** - Play given sound effect (SFX). This function may or may not use the sound - samples provided in sounds.h, and it may or may not ignore the (logarithmic) - volume parameter (0 to 255). Depending on the platform the function can play - completely different samples or even e.g. just beeps. If the platform can't - play sounds, this function implementation can simply be left empty. This - function doesn't have to implement safety measures, the back end takes cares - of them. -*/ -void SFG_playSound(uint8_t soundIndex, uint8_t volume); - -/** - Informs the frontend whether music should get enabled/disabled. Playing music - is optional and the frontend can ignore it. If a frontend wants to implement - music, it can use the one provided in sounds.h or use its own. -*/ -void SFG_enableMusic(uint8_t enable); - -#define SFG_EVENT_VIBRATE 0 ///< the controller should vibrate (or blink etc.) -#define SFG_EVENT_PLAYER_HURT 1 -#define SFG_EVENT_PLAYER_DIES 2 -#define SFG_EVENT_LEVEL_STARTS 3 -#define SFG_EVENT_LEVEL_WON 4 -#define SFG_EVENT_MONSTER_DIES 5 -#define SFG_EVENT_PLAYER_TAKES_ITEM 6 -#define SFG_EVENT_EXPLOSION 7 -#define SFG_EVENT_PLAYER_TELEPORTS 8 -#define SFG_EVENT_PLAYER_CHANGES_WEAPON 9 - -/** - This is an optional function that informs the frontend about special events - which may trigger something special, such as a controller vibration, logging - something etc. This function can do nothing. -*/ -void SFG_processEvent(uint8_t event, uint8_t data); - -#define SFG_SAVE_SIZE 12 - -/** - Optional function for permanently saving game state. Platform that don't have - permanent storage may let this function do nothing. If implemented, the - function should save the passed data into its permanent storage, e.g. a file, - a cookie etc. -*/ -void SFG_save(uint8_t data[SFG_SAVE_SIZE]); - -/** - Optional function for retrieving game data that were saved to permanent - storage. Platforms without permanent storage may let this function do nothing. - If implemented, the function should fill the passed array with data from - permanent storage, e.g. a file, a cookie etc. - - If this function is called before SFG_save was ever called and no data is - present in permanent memory, this function should do nothing (leave the data - array as is). - - This function should return 1 if saving/loading is possible and 0 if not (this - will be used by the game to detect this capability). -*/ -uint8_t SFG_load(uint8_t data[SFG_SAVE_SIZE]); - -/* ========================================================================= */ - -/** - Game main loop body, call this inside the platform's specific main loop. - Returns 1 if the game continues, 0 if the game was exited. -*/ -uint8_t SFG_mainLoopBody(); - -/** - Initializes the whole program, call this in the platform initialization. -*/ -void SFG_init(); - -#include "settings.h" - -#if SFG_ARDUINO - #include - - #define SFG_PROGRAM_MEMORY const PROGMEM - #define SFG_PROGRAM_MEMORY_U8(addr) pgm_read_byte(addr) - // TODO -#else - #define SFG_PROGRAM_MEMORY static const - #define SFG_PROGRAM_MEMORY_U8(addr) ((uint8_t) (*(addr))) -#endif - -#include "images.h" -#include "levels.h" -#include "texts.h" -#include "palette.h" - -#if SFG_TEXTURE_DISTANCE == 0 - #define RCL_COMPUTE_WALL_TEXCOORDS 0 -#endif - -#define RCL_PIXEL_FUNCTION SFG_pixelFunc -#define RCL_TEXTURE_VERTICAL_STRETCH 0 - -#define RCL_CAMERA_COLL_HEIGHT_BELOW 800 -#define RCL_CAMERA_COLL_HEIGHT_ABOVE 200 - -#include "raycastlib.h" - -#include "constants.h" - -typedef struct -{ - uint8_t coords[2]; - uint8_t state; /**< door state in format: - - MSB ccbaaaaa LSB - - aaaaa: current door height (how much they're open) - b: whether currently going up (0) or down (1) - cc: by which card (key) the door is unlocked, 00 - means no card (unlocked), 1 means card 0 etc. - */ -} SFG_DoorRecord; - -#define SFG_SPRITE_SIZE(size0to3) \ - (((size0to3 + 3) * SFG_BASE_SPRITE_SIZE) / 4) - -#define SFG_SPRITE_SIZE_PIXELS(size0to3) \ - ((SFG_SPRITE_SIZE(size0to3) * SFG_GAME_RESOLUTION_Y) / RCL_UNITS_PER_SQUARE) - -#define SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(size0to3) \ - (SFG_SPRITE_SIZE(size0to3) / 2) - -/** - Holds information about one instance of a level item (a type of level element, - e.g. pickable items, decorations etc.). The format is following: - - MSB abbbbbbb LSB - - a: active flag, 1 means the item is nearby to player and is active - bbbbbbb: index to elements array of the current level, pointing to element - representing this item -*/ -typedef uint8_t SFG_ItemRecord; - -#define SFG_ITEM_RECORD_ACTIVE_MASK 0x80 - -#define SFG_ITEM_RECORD_LEVEL_ELEMENT(itemRecord) \ - (SFG_currentLevel.levelPointer->elements[itemRecord & \ - ~SFG_ITEM_RECORD_ACTIVE_MASK]) - -typedef struct -{ - uint8_t stateType; /**< Holds state (lower 4 bits) and type of monster - (upper 4 bits). */ - uint8_t coords[2]; /**< monster position, in 1/4s of a square */ - uint8_t health; -} SFG_MonsterRecord; - -#define SFG_MR_STATE(mr) ((mr).stateType & SFG_MONSTER_MASK_STATE) -#define SFG_MR_TYPE(mr) \ - (SFG_MONSTER_INDEX_TO_TYPE(((mr).stateType & SFG_MONSTER_MASK_TYPE) >> 4)) - -#define SFG_MONSTER_COORD_TO_RCL_UNITS(c) ((RCL_UNITS_PER_SQUARE / 8) + c * 256) -#define SFG_MONSTER_COORD_TO_SQUARES(c) (c / 4) - -#define SFG_ELEMENT_COORD_TO_RCL_UNITS(c) \ - (c * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2) - -#define SFG_MONSTER_MASK_STATE 0x0f -#define SFG_MONSTER_MASK_TYPE 0xf0 - -#define SFG_MONSTER_STATE_INACTIVE 0 ///< Not nearby, not actively updated. -#define SFG_MONSTER_STATE_IDLE 1 -#define SFG_MONSTER_STATE_ATTACKING 2 -#define SFG_MONSTER_STATE_HURTING 3 -#define SFG_MONSTER_STATE_DYING 4 -#define SFG_MONSTER_STATE_GOING_N 5 -#define SFG_MONSTER_STATE_GOING_NE 6 -#define SFG_MONSTER_STATE_GOING_E 7 -#define SFG_MONSTER_STATE_GOING_SE 8 -#define SFG_MONSTER_STATE_GOING_S 9 -#define SFG_MONSTER_STATE_GOING_SW 10 -#define SFG_MONSTER_STATE_GOING_W 11 -#define SFG_MONSTER_STATE_GOING_NW 12 -#define SFG_MONSTER_STATE_DEAD 13 - -typedef struct -{ - uint8_t type; - uint8_t doubleFramesToLive; /**< This number times two (because 256 could be - too little at high FPS) says after how many - frames the projectile is destroyed. */ - uint16_t position[3]; /**< Current position, stored as u16 to save space, as - that is exactly enough to store position on 64x64 - map. */ - int16_t direction[3]; /**< Added to position each game step. */ -} SFG_ProjectileRecord; - -#define SFG_GAME_STATE_MENU 0 -#define SFG_GAME_STATE_PLAYING 1 -#define SFG_GAME_STATE_WIN 2 -#define SFG_GAME_STATE_LOSE 3 -#define SFG_GAME_STATE_INTRO 4 -#define SFG_GAME_STATE_OUTRO 5 -#define SFG_GAME_STATE_MAP 6 -#define SFG_GAME_STATE_LEVEL_START 7 - -#define SFG_MENU_ITEM_CONTINUE 0 -#define SFG_MENU_ITEM_MAP 1 -#define SFG_MENU_ITEM_PLAY 2 -#define SFG_MENU_ITEM_LOAD 3 -#define SFG_MENU_ITEM_SOUND 4 -#define SFG_MENU_ITEM_SHEAR 5 -#define SFG_MENU_ITEM_EXIT 6 - -#define SFG_MENU_ITEM_NONE 255 - -/* - GLOBAL VARIABLES -=============================================================================== -*/ - -/** - Groups global variables related to the game as such in a single struct. There - are still other global structs for player, level etc. -*/ -struct -{ - uint8_t state; - uint32_t stateChangeTime; ///< Time in ms at which the state was changed. - - uint8_t currentRandom; ///< for RNG - uint8_t spriteAnimationFrame; - - uint8_t soundsPlayedThisFrame; /**< Each bit says whether given sound was - played this frame, prevents playing too many - sounds at once. */ - - RCL_RayConstraints rayConstraints; - uint8_t keyStates[SFG_KEY_COUNT]; /**< Pressed states of keys, each value - stores the number of frames for which the - key has been held. */ - uint8_t zBuffer[SFG_Z_BUFFER_SIZE]; - - uint8_t textureAverageColors[SFG_WALL_TEXTURE_COUNT]; /**< Contains average - color for each wall texture. */ - - int8_t backgroundScaleMap[SFG_GAME_RESOLUTION_Y]; - uint16_t backgroundScroll; - uint8_t spriteSamplingPoints[SFG_MAX_SPRITE_SIZE]; /**< Helper for - precomputing sprite - sampling positions for - drawing. */ - uint32_t frameTime; ///< Keeps a constant time (in ms) during a frame - uint32_t frame; - uint32_t lastFrameTimeMs; - uint8_t selectedMenuItem; - uint8_t selectedLevel; ///< Level to play selected in the main menu. - uint8_t antiSpam; ///< Prevents log message spamming. - uint8_t settings; /**< Dynamic game settings (can be changed at runtime), - bit meaning: - - MSB -------- LSB - |||| - |||\_ sound (SFX) - ||\__ music - |\___ shearing - \____ freelook (shearing not sliding back) */ - - uint8_t blink; ///< Says whether blinkg is currently on or off. - uint8_t saved; /**< Helper variable to know if game was saved. Can be - 0 (not saved), 1 (just saved) or 255 (can't save).*/ - uint8_t save[SFG_SAVE_SIZE]; /**< Stores the game save state that's kept in - the persistent memory. - - The save format is binary and platform independent. - The save contains game settings, game progress and a - saved position. The format is as follows: - - 0 4b highest level that has been reached - 0 4b level number of the saved position (15: no save) - 1 8b game settings (SFG_game.settings) - 2 8b health at saved position - 3 8b bullet ammo at saved position - 4 8b rocket ammo at saved position - 5 8b plasma ammo at saved position - 6 32b little endian total play time, in 10ths of sec - 10 16b little endian total enemies killed from start */ - uint8_t continues; ///< Whether the game continues or was exited. -} SFG_game; - -#define SFG_SAVE_TOTAL_TIME (SFG_game.save[6] + SFG_game.save[7] * 256 + \ - SFG_game.save[8] * 65536 + SFG_game.save[9] * 4294967296) - -/** - Stores player state. -*/ -struct -{ - RCL_Camera camera; - int8_t squarePosition[2]; - RCL_Vector2D direction; - RCL_Unit verticalSpeed; - RCL_Unit previousVerticalSpeed; /**< Vertical speed in previous frame, needed - for determining whether player is in the - air. */ - uint16_t headBobFrame; - uint8_t weapon; ///< currently selected weapon - - uint8_t health; - - uint32_t weaponCooldownFrames; ///< frames left for weapon cooldow - uint32_t lastHurtFrame; - uint32_t lastItemTakenFrame; - - uint8_t ammo[SFG_AMMO_TOTAL]; - - uint8_t cards; /**< Lowest 3 bits say which access cards have - been taken., the next 3 bits say which cards - should be blinking in the HUD, the last - 2 bits are a blink reset counter. */ - uint8_t justTeleported; -} SFG_player; - -/** - Stores the current level and helper precomputed vaues for better performance. -*/ -struct -{ - const SFG_Level *levelPointer; - uint8_t levelNumber; - const uint8_t* textures[7]; - - uint32_t timeStart; - uint32_t frameStart; - uint32_t completionTime10sOfS; ///< Completion time in 10th of second. - - uint8_t floorColor; - uint8_t ceilingColor; - - SFG_DoorRecord doorRecords[SFG_MAX_DOORS]; - uint8_t doorRecordCount; - uint8_t checkedDoorIndex; ///< Says which door are currently being checked. - - SFG_ItemRecord itemRecords[SFG_MAX_ITEMS]; ///< Holds level items. - uint8_t itemRecordCount; - uint8_t checkedItemIndex; ///< Same as checkedDoorIndex, but for items. - - SFG_MonsterRecord monsterRecords[SFG_MAX_MONSTERS]; - uint8_t monsterRecordCount; - uint8_t checkedMonsterIndex; - - SFG_ProjectileRecord projectileRecords[SFG_MAX_PROJECTILES]; - uint8_t projectileRecordCount; - uint8_t bossCount; - uint8_t monstersDead; - uint8_t backgroundImage; - uint8_t teleportCount; - uint16_t mapRevealMask; /**< Bits say which parts of the map have been - revealed. */ - - uint8_t itemCollisionMap[(SFG_MAP_SIZE * SFG_MAP_SIZE) / 8]; - /**< Bit array, for each map square says whether there - is a colliding item or not. */ -} SFG_currentLevel; - -#if SFG_ARDUINO -/** - Copy of the current level that is stored in RAM. This is only done on Arduino - because accessing it in program memory directly would be difficult. -*/ -SFG_Level SFG_ramLevel; -#endif - -/** - Helper function for accessing the itemCollisionMap bits. -*/ -void SFG_getItemCollisionMapIndex( - uint8_t x, uint8_t y, uint16_t *byte, uint8_t *bit) -{ - uint16_t index = y * SFG_MAP_SIZE + x; - - *byte = index / 8; - *bit = index % 8; -} - -void SFG_setItemCollisionMapBit(uint8_t x, uint8_t y, uint8_t value) -{ - uint16_t byte; - uint8_t bit; - - SFG_getItemCollisionMapIndex(x,y,&byte,&bit); - - SFG_currentLevel.itemCollisionMap[byte] &= ~(0x01 << bit); - SFG_currentLevel.itemCollisionMap[byte] |= (value & 0x01) << bit; -} - -uint8_t SFG_getItemCollisionMapBit(uint8_t x, uint8_t y) -{ - uint16_t byte; - uint8_t bit; - - SFG_getItemCollisionMapIndex(x,y,&byte,&bit); - return (SFG_currentLevel.itemCollisionMap[byte] >> bit) & 0x01; -} - -#if SFG_DITHERED_SHADOW -SFG_PROGRAM_MEMORY uint8_t SFG_ditheringPatterns[] = -{ - 0,0,0,0, - 0,0,0,0, - - 0,0,0,0, - 0,1,0,0, - - 0,0,0,0, - 0,1,0,1, - - 1,0,1,0, - 0,1,0,0, - - 1,0,1,0, - 0,1,0,1, - - 1,0,1,0, - 0,1,1,1, - - 1,1,1,1, - 0,1,0,1, - - 1,1,1,1, - 0,1,1,1, - - 1,1,1,1, - 1,1,1,1 -}; -#endif - -/* - FUNCTIONS -=============================================================================== -*/ - -/** - Returns a pseudorandom byte. This is a very simple congrent generator, its - parameters have been chosen so that each number (0-255) is included in the - output exactly once! -*/ -uint8_t SFG_random() -{ - SFG_game.currentRandom *= 13; - SFG_game.currentRandom += 7; - - return SFG_game.currentRandom; -} - -void SFG_playGameSound(uint8_t soundIndex, uint8_t volume) -{ - if (!(SFG_game.settings & 0x01)) - return; - - uint8_t mask = 0x01 << soundIndex; - - if (!(SFG_game.soundsPlayedThisFrame & mask)) - { - SFG_playSound(soundIndex,volume); - SFG_game.soundsPlayedThisFrame |= mask; - } -} - -/** - Returns a damage value for specific attack type (SFG_WEAPON_FIRE_TYPE_...), - with added randomness (so the values will differ). For explosion pass - SFG_WEAPON_FIRE_TYPE_FIREBALL. -*/ -uint8_t SFG_getDamageValue(uint8_t attackType) -{ - if (attackType >= SFG_WEAPON_FIRE_TYPES_TOTAL) - return 0; - - int32_t value = SFG_attackDamageTable[attackType]; // has to be signed - int32_t maxAdd = (value * SFG_DAMAGE_RANDOMNESS) / 256; - - value = value + (maxAdd / 2) - (SFG_random() * maxAdd / 256); - - if (value < 0) - value = 0; - - return value; -} - -/** - Saves game data to persistent storage. -*/ -void SFG_gameSave() -{ - if (SFG_game.saved == SFG_CANT_SAVE) - return; - - SFG_LOG("saving game data"); - - SFG_save(SFG_game.save); -} - -/** - Loads game data from persistent storage. -*/ -void SFG_gameLoad() -{ - if (SFG_game.saved == SFG_CANT_SAVE) - return; - - SFG_LOG("loading game data"); - - uint8_t result = SFG_load(SFG_game.save); - - if (result == 0) - SFG_game.saved = SFG_CANT_SAVE; -} - -/** - Returns ammo type for given weapon. -*/ -uint8_t SFG_weaponAmmo(uint8_t weapon) -{ - if (weapon == SFG_WEAPON_KNIFE) - return SFG_AMMO_NONE; - if (weapon == SFG_WEAPON_MACHINE_GUN || - weapon == SFG_WEAPON_SHOTGUN) - return SFG_AMMO_BULLETS; - else if (weapon == SFG_WEAPON_ROCKET_LAUNCHER) - return SFG_AMMO_ROCKETS; - else - return SFG_AMMO_PLASMA; -} - -RCL_Unit SFG_taxicabDistance( - RCL_Unit x0, RCL_Unit y0, RCL_Unit z0, RCL_Unit x1, RCL_Unit y1, RCL_Unit z1) -{ - return (RCL_abs(x0 - x1) + RCL_abs(y0 - y1) + RCL_abs(z0 - z1)); -} - -uint8_t SFG_isInActiveDistanceFromPlayer(RCL_Unit x, RCL_Unit y, RCL_Unit z) -{ - return SFG_taxicabDistance( - x,y,z,SFG_player.camera.position.x,SFG_player.camera.position.y, - SFG_player.camera.height) <= SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE; -} - -/** - Function called when a level end to compute the stats etc. -*/ -void SFG_levelEnds() -{ - SFG_currentLevel.completionTime10sOfS = (SFG_MS_PER_FRAME * - (SFG_game.frame - SFG_currentLevel.frameStart)) / 100; - - SFG_currentLevel.monstersDead = 0; - - for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - if (SFG_currentLevel.monsterRecords[i].health == 0) - SFG_currentLevel.monstersDead++; - - uint32_t totalTime = SFG_SAVE_TOTAL_TIME; - - if ((SFG_currentLevel.levelNumber == 0) || (totalTime != 0)) - { - SFG_LOG("Updating save totals."); - - totalTime += SFG_currentLevel.completionTime10sOfS; - - for (uint8_t i = 0; i < 4; ++i) - { - SFG_game.save[6 + i] = totalTime % 256; - totalTime /= 256; - } - - SFG_game.save[10] += SFG_currentLevel.monstersDead % 256; - SFG_game.save[11] += SFG_currentLevel.monstersDead / 256; - } - - SFG_game.save[0] = - (SFG_game.save[0] & 0x0f) | ((SFG_currentLevel.levelNumber + 1) << 4); - - SFG_game.save[2] = SFG_player.health; - SFG_game.save[3] = SFG_player.ammo[0]; - SFG_game.save[4] = SFG_player.ammo[1]; - SFG_game.save[5] = SFG_player.ammo[2]; -} - -static inline uint8_t SFG_RCLUnitToZBuffer(RCL_Unit x) -{ - x /= (RCL_UNITS_PER_SQUARE / 8); - - uint8_t okay = x < 256; - - return okay * (x + 1) - 1; -} - -const uint8_t *SFG_getMonsterSprite( - uint8_t monsterType, uint8_t state, uint8_t frame) -{ - uint8_t index = - state == SFG_MONSTER_STATE_DEAD ? 18 : 17; - // ^ makes the code smaller compared to returning pointers - - if ((state != SFG_MONSTER_STATE_DYING) && (state != SFG_MONSTER_STATE_DEAD)) - switch (monsterType) - { - case SFG_LEVEL_ELEMENT_MONSTER_SPIDER: - switch (state) - { - case SFG_MONSTER_STATE_ATTACKING: index = 1; break; - case SFG_MONSTER_STATE_IDLE: index = 0; break; - default: index = frame ? 0 : 2; break; - } - break; - - case SFG_LEVEL_ELEMENT_MONSTER_WARRIOR: - index = state != SFG_MONSTER_STATE_ATTACKING ? 6 : 7; - break; - - case SFG_LEVEL_ELEMENT_MONSTER_DESTROYER: - switch (state) - { - case SFG_MONSTER_STATE_ATTACKING: index = 4; break; - case SFG_MONSTER_STATE_IDLE: index = 3; break; - default: index = frame ? 3 : 5; break; - } - break; - - case SFG_LEVEL_ELEMENT_MONSTER_PLASMABOT: - index = state != SFG_MONSTER_STATE_ATTACKING ? 8 : 9; - break; - - case SFG_LEVEL_ELEMENT_MONSTER_ENDER: - switch (state) - { - case SFG_MONSTER_STATE_ATTACKING: index = 12; break; - case SFG_MONSTER_STATE_IDLE: index = 10; break; - default: index = frame ? 10 : 11; break; - } - break; - - case SFG_LEVEL_ELEMENT_MONSTER_TURRET: - switch (state) - { - case SFG_MONSTER_STATE_ATTACKING: index = 15; break; - case SFG_MONSTER_STATE_IDLE: index = 13; break; - default: index = frame ? 13 : 14; break; - } - break; - - case SFG_LEVEL_ELEMENT_MONSTER_EXPLODER: - default: - index = 16; - break; - } - - return SFG_monsterSprites + index * SFG_TEXTURE_STORE_SIZE; -} - -/** - Says whether given key is currently pressed (down). This should be preferred - to SFG_keyPressed(). -*/ -uint8_t SFG_keyIsDown(uint8_t key) -{ - return SFG_game.keyStates[key] != 0; -} - -/** - Says whether given key has been pressed in the current frame. -*/ -uint8_t SFG_keyJustPressed(uint8_t key) -{ - return (SFG_game.keyStates[key]) == 1; -} - -/** - Says whether a key is being repeated after being held for certain time. -*/ -uint8_t SFG_keyRepeated(uint8_t key) -{ - return - ((SFG_game.keyStates[key] >= SFG_KEY_REPEAT_DELAY_FRAMES) || - (SFG_game.keyStates[key] == 255)) && - (SFG_game.frame % SFG_KEY_REPEAT_PERIOD_FRAMES == 0); -} - -uint16_t SFG_keyRegisters(uint8_t key) -{ - return SFG_keyJustPressed(key) || SFG_keyRepeated(key); -} - -#if SFG_RESOLUTION_SCALEDOWN == 1 - #define SFG_setGamePixel SFG_setPixel -#else - -/** - Sets the game pixel (a pixel that can potentially be bigger than the screen - pixel). -*/ -static inline void SFG_setGamePixel(uint16_t x, uint16_t y, uint8_t colorIndex) -{ - uint16_t screenY = y * SFG_RESOLUTION_SCALEDOWN; - uint16_t screenX = x * SFG_RESOLUTION_SCALEDOWN; - - for (uint16_t j = screenY; j < screenY + SFG_RESOLUTION_SCALEDOWN; ++j) - for (uint16_t i = screenX; i < screenX + SFG_RESOLUTION_SCALEDOWN; ++i) - SFG_setPixel(i,j,colorIndex); -} -#endif - -void SFG_recomputePLayerDirection() -{ - SFG_player.camera.direction = - RCL_wrap(SFG_player.camera.direction,RCL_UNITS_PER_SQUARE); - - SFG_player.direction = RCL_angleToDirection(SFG_player.camera.direction); - - SFG_player.direction.x = - (SFG_player.direction.x * SFG_PLAYER_MOVE_UNITS_PER_FRAME) - / RCL_UNITS_PER_SQUARE; - - SFG_player.direction.y = - (SFG_player.direction.y * SFG_PLAYER_MOVE_UNITS_PER_FRAME) - / RCL_UNITS_PER_SQUARE; - - SFG_game.backgroundScroll = - ((SFG_player.camera.direction * 8) * SFG_GAME_RESOLUTION_Y) - / RCL_UNITS_PER_SQUARE; -} - -#if SFG_BACKGROUND_BLUR != 0 -uint8_t SFG_backgroundBlurIndex = 0; - -SFG_PROGRAM_MEMORY int8_t SFG_backgroundBlurOffsets[9] = - { - 0 * SFG_BACKGROUND_BLUR, - 16 * SFG_BACKGROUND_BLUR, - 7 * SFG_BACKGROUND_BLUR, - 17 * SFG_BACKGROUND_BLUR, - 1 * SFG_BACKGROUND_BLUR, - 4 * SFG_BACKGROUND_BLUR, - 15 * SFG_BACKGROUND_BLUR, - 9 * SFG_BACKGROUND_BLUR, - 7 * SFG_BACKGROUND_BLUR - }; -#endif - -static inline uint8_t SFG_fogValueDiminish(RCL_Unit depth) -{ - return depth / SFG_FOG_DIMINISH_STEP; -} - -static inline uint8_t - SFG_getTexelFull(uint8_t textureIndex,RCL_Unit u, RCL_Unit v) -{ - return - SFG_getTexel( - textureIndex != 255 ? - SFG_currentLevel.textures[textureIndex] : - (SFG_wallTextures + SFG_currentLevel.levelPointer->doorTextureIndex - * SFG_TEXTURE_STORE_SIZE), - u / 32, - v / 32); -} - -static inline uint8_t SFG_getTexelAverage(uint8_t textureIndex) -{ - return - textureIndex != 255 ? - SFG_game.textureAverageColors[ - SFG_currentLevel.levelPointer->textureIndices[textureIndex]] - : - ( - SFG_game.textureAverageColors[ - SFG_currentLevel.levelPointer->doorTextureIndex] - + 1 // to distinguish from normal walls - ); -} - -void SFG_pixelFunc(RCL_PixelInfo *pixel) -{ - uint8_t color; - uint8_t shadow = 0; - - if (pixel->isHorizon && pixel->depth > RCL_UNITS_PER_SQUARE * 16) - { - color = SFG_TRANSPARENT_COLOR; - } - else if (pixel->isWall) - { - uint8_t textureIndex = - pixel->isFloor ? - ( - ((pixel->hit.type & SFG_TILE_PROPERTY_MASK) != SFG_TILE_PROPERTY_DOOR) ? - (pixel->hit.type & 0x7) - : - ( - (pixel->texCoords.y > RCL_UNITS_PER_SQUARE) ? - (pixel->hit.type & 0x7) : 255 - ) - ): - ((pixel->hit.type & 0x38) >> 3); - -#if SFG_TEXTURE_DISTANCE != 0 - RCL_Unit textureV = pixel->texCoords.y; - - if ((pixel->hit.type & SFG_TILE_PROPERTY_MASK) == - SFG_TILE_PROPERTY_SQUEEZER) - textureV += pixel->wallHeight; -#endif - - color = - textureIndex != SFG_TILE_TEXTURE_TRANSPARENT ? - ( -#if SFG_TEXTURE_DISTANCE >= 65535 - SFG_getTexelFull(textureIndex,pixel->texCoords.x,textureV) -#elif SFG_TEXTURE_DISTANCE == 0 - SFG_getTexelAverage(textureIndex) -#else - pixel->depth <= SFG_TEXTURE_DISTANCE ? - SFG_getTexelFull(textureIndex,pixel->texCoords.x,textureV) : - SFG_getTexelAverage(textureIndex) -#endif - ) - : - SFG_TRANSPARENT_COLOR; - - shadow = pixel->hit.direction >> 1; - } - else - { - color = pixel->isFloor ? - (SFG_currentLevel.floorColor) : - (pixel->height < SFG_CEILING_MAX_HEIGHT ? - SFG_currentLevel.ceilingColor : SFG_TRANSPARENT_COLOR); - } - - if (color != SFG_TRANSPARENT_COLOR) - { -#if SFG_DITHERED_SHADOW - uint8_t fogShadow = (pixel->depth * 8) / SFG_FOG_DIMINISH_STEP; - - uint8_t fogShadowPart = fogShadow & 0x07; - - fogShadow /= 8; - - uint8_t xMod4 = pixel->position.x & 0x03; - uint8_t yMod2 = pixel->position.y & 0x01; - - shadow += - fogShadow + SFG_ditheringPatterns[fogShadowPart * 8 + yMod2 * 4 + xMod4]; -#else - shadow += SFG_fogValueDiminish(pixel->depth); -#endif - -#if SFG_ENABLE_FOG - color = palette_minusValue(color,shadow); -#endif - } - else - { -#if SFG_DRAW_LEVEL_BACKGROUND - color = SFG_getTexel(SFG_backgroundImages + - SFG_currentLevel.backgroundImage * SFG_TEXTURE_STORE_SIZE, - SFG_game.backgroundScaleMap[((pixel->position.x - #if SFG_BACKGROUND_BLUR != 0 - + SFG_backgroundBlurOffsets[SFG_backgroundBlurIndex] - #endif - ) * SFG_RAYCASTING_SUBSAMPLE + SFG_game.backgroundScroll) % SFG_GAME_RESOLUTION_Y], - (SFG_game.backgroundScaleMap[(pixel->position.y // ^ TODO: get rid of mod? - #if SFG_BACKGROUND_BLUR != 0 - + SFG_backgroundBlurOffsets[SFG_backgroundBlurIndex + 1] - #endif - ) % SFG_GAME_RESOLUTION_Y ]) - ); - - #if SFG_BACKGROUND_BLUR != 0 - SFG_backgroundBlurIndex = (SFG_backgroundBlurIndex + 1) % 0x07; - #endif -#else - color = 1; -#endif - } - - RCL_Unit screenX = pixel->position.x * SFG_RAYCASTING_SUBSAMPLE; - - for (int_fast8_t i = 0; i < SFG_RAYCASTING_SUBSAMPLE; ++i) - { - SFG_setGamePixel(screenX,pixel->position.y,color); - screenX++; - } -} - -/** - Draws image on screen, with transparency. This is faster than sprite drawing. - For performance sake drawing near screen edges is not pixel perfect. -*/ -void SFG_blitImage( - const uint8_t *image, - int16_t posX, - int16_t posY, - uint8_t scale) -{ - if (scale == 0) - return; - - uint16_t x0 = posX, - x1, - y0 = posY, - y1; - - uint8_t u0 = 0, v0 = 0; - - if (posX < 0) - { - x0 = 0; - u0 = (-1 * posX) / scale; - } - - posX += scale * SFG_TEXTURE_SIZE; - - uint16_t limitX = SFG_GAME_RESOLUTION_X - scale; - uint16_t limitY = SFG_GAME_RESOLUTION_Y - scale; - - x1 = posX >= 0 ? - (posX <= limitX ? posX : limitX) - : 0; - - if (x1 >= SFG_GAME_RESOLUTION_X) - x1 = SFG_GAME_RESOLUTION_X - 1; - - if (posY < 0) - { - y0 = 0; - v0 = (-1 * posY) / scale; - } - - posY += scale * SFG_TEXTURE_SIZE; - - y1 = posY >= 0 ? - (posY <= limitY ? posY : limitY) - : 0; - - if (y1 >= SFG_GAME_RESOLUTION_Y) - y1 = SFG_GAME_RESOLUTION_Y - 1; - - uint8_t u,v; - - v = v0; - - for (uint16_t y = y0; y < y1; y += scale) - { - u = u0; - - for (uint16_t x = x0; x < x1; x += scale) - { - uint8_t color = SFG_getTexel(image,u,v); - - if (color != SFG_TRANSPARENT_COLOR) - { - uint16_t sY = y; - - for (uint8_t j = 0; j < scale; ++j) - { - uint16_t sX = x; - - for (uint8_t i = 0; i < scale; ++i) - { - SFG_setGamePixel(sX,sY,color); - sX++; - } - - sY++; - } - } - u++; - } - v++; - } -} - -void SFG_drawScaledSprite( - const uint8_t *image, - int16_t centerX, - int16_t centerY, - int16_t size, - uint8_t minusValue, - RCL_Unit distance) -{ - if ((size > SFG_MAX_SPRITE_SIZE) || (size == 0)) - return; - - uint16_t halfSize = size / 2; - - int16_t topLeftX = centerX - halfSize; - int16_t topLeftY = centerY - halfSize; - - int16_t x0, u0; - - if (topLeftX < 0) - { - u0 = -1 * topLeftX; - x0 = 0; - } - else - { - u0 = 0; - x0 = topLeftX; - } - - int16_t x1 = topLeftX + size - 1; - - if (x1 >= SFG_GAME_RESOLUTION_X) - x1 = SFG_GAME_RESOLUTION_X - 1; - - int16_t y0, v0; - - if (topLeftY < 0) - { - v0 = -1 * topLeftY; - y0 = 0; - } - else - { - v0 = 0; - y0 = topLeftY; - } - - int16_t y1 = topLeftY + size - 1; - - if (y1 >= SFG_GAME_RESOLUTION_Y) - y1 = SFG_GAME_RESOLUTION_Y - 1; - - if ((x0 > x1) || (y0 > y1) || (u0 >= size) || (v0 >= size)) // outside screen? - return; - - int16_t u1 = u0 + (x1 - x0); - int16_t v1 = v0 + (y1 - y0); - - // precompute sampling positions: - - int16_t uMin = RCL_min(u0,u1); - int16_t vMin = RCL_min(v0,v1); - int16_t uMax = RCL_max(u0,u1); - int16_t vMax = RCL_max(v0,v1); - - int16_t precompFrom = RCL_min(uMin,vMin); - int16_t precompTo = RCL_max(uMax,vMax); - - precompFrom = RCL_max(0,precompFrom); - precompTo = RCL_min(SFG_MAX_SPRITE_SIZE - 1,precompTo); - - #define PRECOMP_SCALE 512 - - int16_t precompStepScaled = ((SFG_TEXTURE_SIZE) * PRECOMP_SCALE) / size; - int16_t precompPosScaled = precompFrom * precompStepScaled; - - for (int16_t i = precompFrom; i <= precompTo; ++i) - { - SFG_game.spriteSamplingPoints[i] = precompPosScaled / PRECOMP_SCALE; - precompPosScaled += precompStepScaled; - } - - #undef PRECOMP_SCALE - - uint8_t zDistance = SFG_RCLUnitToZBuffer(distance); - - for (int16_t x = x0, u = u0; x <= x1; ++x, ++u) - { - if (SFG_game.zBuffer[x] >= zDistance) - { - int8_t columnTransparent = 1; - - for (int16_t y = y0, v = v0; y <= y1; ++y, ++v) - { - uint8_t color = - SFG_getTexel(image,SFG_game.spriteSamplingPoints[u], - SFG_game.spriteSamplingPoints[v]); - - if (color != SFG_TRANSPARENT_COLOR) - { -#if SFG_DIMINISH_SPRITES - color = palette_minusValue(color,minusValue); -#endif - columnTransparent = 0; - - SFG_setGamePixel(x,y,color); - } - } - - if (!columnTransparent) - SFG_game.zBuffer[x] = zDistance; - } - } -} - -RCL_Unit SFG_texturesAt(int16_t x, int16_t y) -{ - uint8_t p; - - SFG_TileDefinition tile = - SFG_getMapTile(SFG_currentLevel.levelPointer,x,y,&p); - - return - SFG_TILE_FLOOR_TEXTURE(tile) | (SFG_TILE_CEILING_TEXTURE(tile) << 3) | p; - // ^ store both textures (floor and ceiling) and properties in one number -} - -RCL_Unit SFG_movingWallHeight -( - RCL_Unit low, - RCL_Unit high, - uint32_t time -) -{ - RCL_Unit height = high - low; - RCL_Unit halfHeight = height / 2; - - RCL_Unit sinArg = - (time * ((SFG_MOVING_WALL_SPEED * RCL_UNITS_PER_SQUARE) / 1000)) / height; - - return - low + halfHeight + (RCL_sin(sinArg) * halfHeight) / RCL_UNITS_PER_SQUARE; -} - -RCL_Unit SFG_floorHeightAt(int16_t x, int16_t y) -{ - uint8_t properties; - - SFG_TileDefinition tile = - SFG_getMapTile(SFG_currentLevel.levelPointer,x,y,&properties); - - RCL_Unit doorHeight = 0; - - if (properties == SFG_TILE_PROPERTY_DOOR) - { - for (uint8_t i = 0; i < SFG_currentLevel.doorRecordCount; ++i) - { - SFG_DoorRecord *door = &(SFG_currentLevel.doorRecords[i]); - - if ((door->coords[0] == x) && (door->coords[1] == y)) - { - doorHeight = door->state & SFG_DOOR_VERTICAL_POSITION_MASK; - - doorHeight = doorHeight != (0xff & SFG_DOOR_VERTICAL_POSITION_MASK) ? - doorHeight * SFG_DOOR_HEIGHT_STEP : RCL_UNITS_PER_SQUARE; - - - break; - } - } - } - else if (properties == SFG_TILE_PROPERTY_ELEVATOR) - { - RCL_Unit height = - SFG_TILE_FLOOR_HEIGHT(tile) * SFG_WALL_HEIGHT_STEP; - - return SFG_movingWallHeight( - height, - height + SFG_TILE_CEILING_HEIGHT(tile) * SFG_WALL_HEIGHT_STEP, - SFG_game.frameTime - SFG_currentLevel.timeStart); - } - - return SFG_TILE_FLOOR_HEIGHT(tile) * SFG_WALL_HEIGHT_STEP - doorHeight; -} - -/** - Like SFG_floorCollisionHeightAt, but takes into account colliding items on - the map, so the squares that have these items are higher. The former function - is for rendering, this one is for collision checking. -*/ -RCL_Unit SFG_floorCollisionHeightAt(int16_t x, int16_t y) -{ - return SFG_floorHeightAt(x,y) + - SFG_getItemCollisionMapBit(x,y) * RCL_UNITS_PER_SQUARE; -} - -void SFG_getPlayerWeaponInfo( - uint8_t *ammoType, uint8_t *projectileCount, uint8_t *canShoot) -{ - *ammoType = SFG_weaponAmmo(SFG_player.weapon); - - *projectileCount = SFG_GET_WEAPON_PROJECTILE_COUNT(SFG_player.weapon); - -#if SFG_INFINITE_AMMO - *canShoot = 1; -#else - *canShoot = - (*ammoType == SFG_AMMO_NONE || - SFG_player.ammo[*ammoType] >= *projectileCount); -#endif -} - -void SFG_playerRotateWeapon(uint8_t next) -{ - uint8_t initialWeapon = SFG_player.weapon; - int8_t increment = next ? 1 : -1; - - while (1) - { - SFG_player.weapon = - (SFG_WEAPONS_TOTAL + SFG_player.weapon + increment) % SFG_WEAPONS_TOTAL; - - if (SFG_player.weapon == initialWeapon) - break; - - uint8_t ammo, projectileCount, canShoot; - - SFG_getPlayerWeaponInfo(&ammo,&projectileCount,&canShoot); - - if (canShoot) - break; - } -} - -void SFG_initPlayer() -{ - RCL_initCamera(&SFG_player.camera); - - SFG_player.camera.resolution.x = - SFG_GAME_RESOLUTION_X / SFG_RAYCASTING_SUBSAMPLE; - - SFG_player.camera.resolution.y = SFG_GAME_RESOLUTION_Y - SFG_HUD_BAR_HEIGHT; - - SFG_player.camera.position.x = RCL_UNITS_PER_SQUARE / 2 + - SFG_currentLevel.levelPointer->playerStart[0] * RCL_UNITS_PER_SQUARE; - - SFG_player.camera.position.y = RCL_UNITS_PER_SQUARE / 2 + - SFG_currentLevel.levelPointer->playerStart[1] * RCL_UNITS_PER_SQUARE; - - SFG_player.squarePosition[0] = - SFG_player.camera.position.x / RCL_UNITS_PER_SQUARE; - - SFG_player.squarePosition[1] = - SFG_player.camera.position.y / RCL_UNITS_PER_SQUARE; - - SFG_player.camera.height = - SFG_floorHeightAt( - SFG_currentLevel.levelPointer->playerStart[0], - SFG_currentLevel.levelPointer->playerStart[1]) + - RCL_CAMERA_COLL_HEIGHT_BELOW; - - SFG_player.camera.direction = - SFG_currentLevel.levelPointer->playerStart[2] * - (RCL_UNITS_PER_SQUARE / 256); - - SFG_recomputePLayerDirection(); - - SFG_player.previousVerticalSpeed = 0; - - SFG_player.headBobFrame = 0; - - SFG_player.weapon = SFG_WEAPON_KNIFE; - - SFG_player.weaponCooldownFrames = 0; - SFG_player.lastHurtFrame = SFG_game.frame; - SFG_player.lastItemTakenFrame = SFG_game.frame; - - SFG_player.health = SFG_PLAYER_START_HEALTH; - - SFG_player.cards = -#if SFG_UNLOCK_DOOR - 0x07; -#else - 0; -#endif - - SFG_player.justTeleported = 0; - - for (uint8_t i = 0; i < SFG_AMMO_TOTAL; ++i) - SFG_player.ammo[i] = 0; -} - -RCL_Unit SFG_ceilingHeightAt(int16_t x, int16_t y) -{ - uint8_t properties; - SFG_TileDefinition tile = - SFG_getMapTile(SFG_currentLevel.levelPointer,x,y,&properties); - - if (properties == SFG_TILE_PROPERTY_ELEVATOR) - return SFG_CEILING_MAX_HEIGHT; - - uint8_t height = SFG_TILE_CEILING_HEIGHT(tile); - - return properties != SFG_TILE_PROPERTY_SQUEEZER ? - ( - height != SFG_TILE_CEILING_MAX_HEIGHT ? - ((SFG_TILE_FLOOR_HEIGHT(tile) + height) * SFG_WALL_HEIGHT_STEP) : - SFG_CEILING_MAX_HEIGHT - ) : - SFG_movingWallHeight( - SFG_TILE_FLOOR_HEIGHT(tile) * SFG_WALL_HEIGHT_STEP, - (SFG_TILE_CEILING_HEIGHT(tile) + SFG_TILE_FLOOR_HEIGHT(tile)) - * SFG_WALL_HEIGHT_STEP, - SFG_game.frameTime - SFG_currentLevel.timeStart); -} - -/** - Gets sprite (image and sprite size) for given item. -*/ -void SFG_getItemSprite( - uint8_t elementType, const uint8_t **sprite, uint8_t *spriteSize) -{ - *spriteSize = 0; - *sprite = SFG_itemSprites + (elementType - 1) * SFG_TEXTURE_STORE_SIZE; - - switch (elementType) - { - case SFG_LEVEL_ELEMENT_TREE: - case SFG_LEVEL_ELEMENT_RUIN: - case SFG_LEVEL_ELEMENT_LAMP: - case SFG_LEVEL_ELEMENT_TELEPORT: - *spriteSize = 2; - break; - - case SFG_LEVEL_ELEMENT_TERMINAL: - *spriteSize = 1; - break; - - case SFG_LEVEL_ELEMENT_FINISH: - case SFG_LEVEL_ELEMENT_COLUMN: - *spriteSize = 3; - break; - - case SFG_LEVEL_ELEMENT_CARD0: - case SFG_LEVEL_ELEMENT_CARD1: - case SFG_LEVEL_ELEMENT_CARD2: - *sprite = SFG_itemSprites + - (SFG_LEVEL_ELEMENT_CARD0 - 1) * SFG_TEXTURE_STORE_SIZE; - break; - - case SFG_LEVEL_ELEMENT_BLOCKER: - *sprite = 0; - break; - - default: - break; - } -} - -/** - Says whether given item type collides, i.e. stops player from moving. -*/ -uint8_t SFG_itemCollides(uint8_t elementType) -{ - return - elementType == SFG_LEVEL_ELEMENT_BARREL || - elementType == SFG_LEVEL_ELEMENT_TREE || - elementType == SFG_LEVEL_ELEMENT_TERMINAL || - elementType == SFG_LEVEL_ELEMENT_COLUMN || - elementType == SFG_LEVEL_ELEMENT_RUIN || - elementType == SFG_LEVEL_ELEMENT_BLOCKER || - elementType == SFG_LEVEL_ELEMENT_LAMP; -} - -void SFG_setGameState(uint8_t state) -{ - SFG_game.state = state; - SFG_game.stateChangeTime = SFG_game.frameTime; -} - -void SFG_setAndInitLevel(uint8_t levelNumber) -{ - SFG_LOG("setting and initializing level"); - - const SFG_Level *level; - -#if SFG_ARDUINO - memcpy_P(&SFG_ramLevel,SFG_levels[levelNumber],sizeof(SFG_Level)); - level = &SFG_ramLevel; -#else - level = SFG_levels[levelNumber]; -#endif - - SFG_game.currentRandom = 0; - - if (SFG_game.saved != SFG_CANT_SAVE) - SFG_game.saved = 0; - - SFG_currentLevel.levelNumber = levelNumber; - SFG_currentLevel.monstersDead = 0; - SFG_currentLevel.backgroundImage = level->backgroundImage; - SFG_currentLevel.levelPointer = level; - SFG_currentLevel.bossCount = 0; - SFG_currentLevel.floorColor = level->floorColor; - SFG_currentLevel.ceilingColor = level->ceilingColor; - SFG_currentLevel.completionTime10sOfS = 0; - - for (uint8_t i = 0; i < 7; ++i) - SFG_currentLevel.textures[i] = - SFG_wallTextures + level->textureIndices[i] * SFG_TEXTURE_STORE_SIZE; - - SFG_LOG("initializing doors"); - - SFG_currentLevel.checkedDoorIndex = 0; - SFG_currentLevel.doorRecordCount = 0; - SFG_currentLevel.projectileRecordCount = 0; - SFG_currentLevel.teleportCount = 0; - SFG_currentLevel.mapRevealMask = -#if SFG_REVEAL_MAP - 0xffff; -#else - 0; -#endif - - for (uint8_t j = 0; j < SFG_MAP_SIZE; ++j) - { - for (uint8_t i = 0; i < SFG_MAP_SIZE; ++i) - { - uint8_t properties; - - SFG_getMapTile(level,i,j,&properties); - - if ((properties & SFG_TILE_PROPERTY_MASK) == SFG_TILE_PROPERTY_DOOR) - { - SFG_DoorRecord *d = - &(SFG_currentLevel.doorRecords[SFG_currentLevel.doorRecordCount]); - - d->coords[0] = i; - d->coords[1] = j; - d->state = 0x00; - - SFG_currentLevel.doorRecordCount++; - } - - if (SFG_currentLevel.doorRecordCount >= SFG_MAX_DOORS) - { - SFG_LOG("warning: too many doors!"); - break; - } - } - - if (SFG_currentLevel.doorRecordCount >= SFG_MAX_DOORS) - break; - } - - SFG_LOG("initializing level elements"); - - SFG_currentLevel.itemRecordCount = 0; - SFG_currentLevel.checkedItemIndex = 0; - - SFG_currentLevel.monsterRecordCount = 0; - SFG_currentLevel.checkedMonsterIndex = 0; - - SFG_MonsterRecord *monster; - - for (uint16_t i = 0; i < ((SFG_MAP_SIZE * SFG_MAP_SIZE) / 8); ++i) - SFG_currentLevel.itemCollisionMap[i] = 0; - - for (uint8_t i = 0; i < SFG_MAX_LEVEL_ELEMENTS; ++i) - { - const SFG_LevelElement *e = &(SFG_currentLevel.levelPointer->elements[i]); - - if (e->type != SFG_LEVEL_ELEMENT_NONE) - { - if (SFG_LEVEL_ELEMENT_TYPE_IS_MOSTER(e->type)) - { - SFG_LOG("adding monster"); - - monster = - &(SFG_currentLevel.monsterRecords[SFG_currentLevel.monsterRecordCount]); - - monster->stateType = (SFG_MONSTER_TYPE_TO_INDEX(e->type) << 4) - | SFG_MONSTER_STATE_INACTIVE; - - monster->health = - SFG_GET_MONSTER_MAX_HEALTH(SFG_MONSTER_TYPE_TO_INDEX(e->type)); - - monster->coords[0] = e->coords[0] * 4 + 2; - monster->coords[1] = e->coords[1] * 4 + 2; - - SFG_currentLevel.monsterRecordCount++; - - if (e->type == SFG_LEVEL_ELEMENT_MONSTER_ENDER) - SFG_currentLevel.bossCount++; - } - else if ((e->type < SFG_LEVEL_ELEMENT_LOCK0) || - (e->type > SFG_LEVEL_ELEMENT_LOCK2)) - { - SFG_LOG("adding item"); - SFG_currentLevel.itemRecords[SFG_currentLevel.itemRecordCount] = i; - SFG_currentLevel.itemRecordCount++; - - if (e->type == SFG_LEVEL_ELEMENT_TELEPORT) - SFG_currentLevel.teleportCount++; - - if (SFG_itemCollides(e->type)) - SFG_setItemCollisionMapBit(e->coords[0],e->coords[1],1); - } - else - { - SFG_LOG("adding door lock"); - - uint8_t properties; - - SFG_getMapTile(level,e->coords[0],e->coords[1],&properties); - - if ((properties & SFG_TILE_PROPERTY_MASK) == SFG_TILE_PROPERTY_DOOR) - { - // find the door record and lock the door: - for (uint16_t j = 0; j < SFG_currentLevel.doorRecordCount; ++j) - { - SFG_DoorRecord *d = &(SFG_currentLevel.doorRecords[j]); - - if (d->coords[0] == e->coords[0] && d->coords[1] == e->coords[1]) - { - d->state |= (e->type - SFG_LEVEL_ELEMENT_LOCK0 + 1) << 6; - break; - } - } - } - else - { - SFG_LOG("warning: lock not put on door tile!"); - } - } - } - } - - SFG_currentLevel.timeStart = SFG_getTimeMs(); - SFG_currentLevel.frameStart = SFG_game.frame; - - SFG_game.spriteAnimationFrame = 0; - - SFG_initPlayer(); - SFG_setGameState(SFG_GAME_STATE_LEVEL_START); - SFG_processEvent(SFG_EVENT_LEVEL_STARTS,levelNumber); -} - -void SFG_init() -{ - SFG_LOG("initializing game") - - SFG_game.frame = 0; - SFG_game.currentRandom = 0; - SFG_game.continues = 1; - - RCL_initRayConstraints(&SFG_game.rayConstraints); - SFG_game.rayConstraints.maxHits = SFG_RAYCASTING_MAX_HITS; - SFG_game.rayConstraints.maxSteps = SFG_RAYCASTING_MAX_STEPS; - - SFG_game.antiSpam = 0; - - SFG_LOG("computing average texture colors") - - for (uint8_t i = 0; i < SFG_WALL_TEXTURE_COUNT; ++i) - { - /** For simplicity, we round colors so that there is only 64 of them, and - we count them up to 256. */ - - uint8_t colorHistogram[64]; - - for (uint8_t j = 0; j < 64; ++j) - colorHistogram[j] = 0; - - for (uint8_t y = 0; y < SFG_TEXTURE_SIZE; ++y) - for (uint8_t x = 0; x < SFG_TEXTURE_SIZE; ++x) - { - uint8_t color = - SFG_getTexel(SFG_wallTextures + i * SFG_TEXTURE_STORE_SIZE,x,y) / 4; - - colorHistogram[color] += 1; - - if (colorHistogram[color] == 255) - break; - } - - uint8_t maxIndex = 0; - - for (uint8_t j = 0; j < 64; ++j) - { - if (colorHistogram[j] == 255) - { - maxIndex = j; - break; - } - - if (colorHistogram[j] > colorHistogram[maxIndex]) - maxIndex = j; - } - - SFG_game.textureAverageColors[i] = maxIndex * 4; - } - - for (uint16_t i = 0; i < SFG_GAME_RESOLUTION_Y; ++i) - SFG_game.backgroundScaleMap[i] = - (i * SFG_TEXTURE_SIZE) / SFG_GAME_RESOLUTION_Y; - - for (uint8_t i = 0; i < SFG_KEY_COUNT; ++i) - SFG_game.keyStates[i] = 0; - - SFG_game.backgroundScroll = 0; - SFG_currentLevel.levelPointer = 0; - SFG_game.lastFrameTimeMs = SFG_getTimeMs(); - SFG_game.selectedMenuItem = 0; - SFG_game.selectedLevel = 0; - SFG_game.settings = 0x03; - SFG_game.saved = 0; - - // create a default save data: - - for (uint16_t i = 0; i < SFG_SAVE_SIZE; ++i) - SFG_game.save[i] = 0; - - SFG_game.save[0] = 0; - SFG_game.save[1] = SFG_game.settings; - - SFG_gameLoad(); // attempt to load settings - - if (SFG_game.saved != SFG_CANT_SAVE) - { - SFG_LOG("settings loaded"); - SFG_game.settings = SFG_game.save[1]; - } - else - { - SFG_LOG("saving/loading not possible"); - SFG_game.save[0] = SFG_NUMBER_OF_LEVELS | 0xf0; // revealed all levels - } - - SFG_enableMusic(SFG_game.settings & 0x02); - -#if SFG_START_LEVEL == 0 - SFG_setGameState(SFG_GAME_STATE_MENU); -#else - SFG_setAndInitLevel(SFG_START_LEVEL - 1); -#endif -} - -/** - Adds new projectile to the current level, return 1 if added, 0 if not (max - count reached). -*/ -uint8_t SFG_createProjectile(SFG_ProjectileRecord projectile) -{ - if (SFG_currentLevel.projectileRecordCount >= SFG_MAX_PROJECTILES) - return 0; - - SFG_currentLevel.projectileRecords[SFG_currentLevel.projectileRecordCount] = - projectile; - - SFG_currentLevel.projectileRecordCount++; - - return 1; -} - -/** - Launches projectile of given type from given position in given direction - (has to be normalized), with given offset (so as to not collide with the - shooting entity). Returns the same value as SFG_createProjectile. -*/ -uint8_t SFG_launchProjectile( - uint8_t type, - RCL_Vector2D shootFrom, - RCL_Unit shootFromHeight, - RCL_Vector2D direction, - RCL_Unit verticalSpeed, - RCL_Unit offsetDistance - ) -{ - if (type == SFG_PROJECTILE_NONE) - return 0; - - SFG_ProjectileRecord p; - - p.type = type; - p.doubleFramesToLive = - RCL_nonZero(SFG_GET_PROJECTILE_FRAMES_TO_LIVE(type) / 2); - - p.position[0] = - shootFrom.x + (direction.x * offsetDistance) / RCL_UNITS_PER_SQUARE; - - p.position[1] = - shootFrom.y + (direction.y * offsetDistance) / RCL_UNITS_PER_SQUARE; - - p.position[2] = shootFromHeight; - - p.direction[0] = - (direction.x * SFG_GET_PROJECTILE_SPEED_UPS(type)) / RCL_UNITS_PER_SQUARE; - - p.direction[1] = - (direction.y * SFG_GET_PROJECTILE_SPEED_UPS(type)) / RCL_UNITS_PER_SQUARE; - - p.direction[2] = verticalSpeed; - - return SFG_createProjectile(p); -} - -/** - Pushes a given position away from a center by given distance, with collisions. - Returns 1 if push away happened, otherwise 0. -*/ -uint8_t SFG_pushAway( - RCL_Unit pos[3], - RCL_Unit centerX, - RCL_Unit centerY, - RCL_Unit preferredDirection, - RCL_Unit distance) -{ - RCL_Vector2D fromCenter; - - fromCenter.x = pos[0] - centerX; - fromCenter.y = pos[1] - centerY; - - RCL_Unit l = RCL_len(fromCenter); - - if (l < 128) - { - fromCenter = RCL_angleToDirection(preferredDirection); - l = RCL_UNITS_PER_SQUARE; - } - else if (l >= distance) - { - return 0; - } - - RCL_Vector2D offset; - - offset.x = (fromCenter.x * distance) / l; - offset.y = (fromCenter.y * distance) / l; - - RCL_Camera c; - - RCL_initCamera(&c); - - c.position.x = pos[0]; - c.position.y = pos[1]; - c.height = pos[2]; - - RCL_moveCameraWithCollision(&c,offset,0,SFG_floorCollisionHeightAt, - SFG_ceilingHeightAt,1,1); - - pos[0] = c.position.x; - pos[1] = c.position.y; - pos[2] = c.height; - - return 1; -} - -uint8_t SFG_pushPlayerAway( - RCL_Unit centerX, RCL_Unit centerY, RCL_Unit distance) -{ - RCL_Unit p[3]; - - p[0] = SFG_player.camera.position.x; - p[1] = SFG_player.camera.position.y; - p[2] = SFG_player.camera.height; - - uint8_t result = SFG_pushAway(p,centerX,centerY, - SFG_player.camera.direction - RCL_UNITS_PER_SQUARE / 2, - distance); - - SFG_player.camera.position.x = p[0]; - SFG_player.camera.position.y = p[1]; - SFG_player.camera.height = p[2]; - - return result; -} - -/** - Helper function to resolve collision with level element. The function supposes - the collision already does happen and only resolves it. Returns adjusted move - offset. -*/ -RCL_Vector2D SFG_resolveCollisionWithElement( - RCL_Vector2D position, RCL_Vector2D moveOffset, RCL_Vector2D elementPos) -{ - RCL_Unit dx = RCL_abs(elementPos.x - position.x); - RCL_Unit dy = RCL_abs(elementPos.y - position.y); - - if (dx > dy) - { - // colliding from left/right - - if ((moveOffset.x > 0) == (position.x < elementPos.x)) - moveOffset.x = 0; - // ^ only stop if heading towards element, to avoid getting stuck - } - else - { - // colliding from up/down - - if ((moveOffset.y > 0) == (position.y < elementPos.y)) - moveOffset.y = 0; - } - - return moveOffset; -} - -/** - Adds or substracts player's health, which either hurts him (negative value) - or heals him (positive value). -*/ -void SFG_playerChangeHealth(int8_t healthAdd) -{ - int16_t health = SFG_player.health; - health += healthAdd; - health = RCL_clamp(health,0,SFG_PLAYER_MAX_HEALTH); - - SFG_player.health = health; - - if (healthAdd < 0) - { - SFG_player.lastHurtFrame = SFG_game.frame; - SFG_processEvent(SFG_EVENT_VIBRATE,0); - SFG_processEvent(SFG_EVENT_PLAYER_HURT,-1 * healthAdd); - } -} - -void SFG_playerChangeHealthWithMiltiplier(int8_t healthAdd) -{ - if (healthAdd < 0) - healthAdd = - RCL_min(-1, - (((RCL_Unit) healthAdd) * SFG_PLAYER_DAMAGE_MULTIPLIER) / - RCL_UNITS_PER_SQUARE); - - SFG_playerChangeHealth(healthAdd); -} - -uint8_t SFG_distantSoundVolume(RCL_Unit x, RCL_Unit y, RCL_Unit z) -{ - RCL_Unit distance = SFG_taxicabDistance(x,y,z, - SFG_player.camera.position.x, - SFG_player.camera.position.y, - SFG_player.camera.height); - - if (distance >= SFG_SFX_MAX_DISTANCE) - return 0; - - uint32_t result = 255 - (distance * 255) / SFG_SFX_MAX_DISTANCE; - - return (result * result) / 256; -} - -/** - Same as SFG_playerChangeHealth but for monsters. -*/ -void SFG_monsterChangeHealth(SFG_MonsterRecord *monster, int8_t healthAdd) -{ - int16_t health = monster->health; - - health += healthAdd; - health = RCL_clamp(health,0,255); - monster->health = health; - - if (healthAdd < 0) - { - // play hurt sound - - uint8_t volume = SFG_distantSoundVolume( - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]), - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1]))); - - SFG_playGameSound(5,volume); - - if (monster->health == 0) - SFG_playGameSound(2,volume); - } -} - -void SFG_removeItem(uint8_t index) -{ - SFG_LOG("removing item"); - - for (uint16_t j = index; j < SFG_currentLevel.itemRecordCount - 1; ++j) - SFG_currentLevel.itemRecords[j] = - SFG_currentLevel.itemRecords[j + 1]; - - SFG_currentLevel.itemRecordCount--; -} - -/** - Helper function, returns a pointer to level element representing item with - given index, but only if the item is active (otherwise 0 is returned). -*/ -static inline const SFG_LevelElement *SFG_getActiveItemElement(uint8_t index) -{ - SFG_ItemRecord item = SFG_currentLevel.itemRecords[index]; - - if ((item & SFG_ITEM_RECORD_ACTIVE_MASK) == 0) - return 0; - - return &(SFG_currentLevel.levelPointer->elements[item & - ~SFG_ITEM_RECORD_ACTIVE_MASK]); -} - -static inline const SFG_LevelElement *SFG_getLevelElement(uint8_t index) -{ - SFG_ItemRecord item = SFG_currentLevel.itemRecords[index]; - - return &(SFG_currentLevel.levelPointer->elements[item & - ~SFG_ITEM_RECORD_ACTIVE_MASK]); -} - -void SFG_createExplosion(RCL_Unit, RCL_Unit, RCL_Unit); // forward decl - -void SFG_explodeBarrel(uint8_t itemIndex, RCL_Unit x, RCL_Unit y, RCL_Unit z) -{ - const SFG_LevelElement *e = SFG_getLevelElement(itemIndex); - SFG_setItemCollisionMapBit(e->coords[0],e->coords[1],0); - SFG_removeItem(itemIndex); - SFG_createExplosion(x,y,z); -} - -void SFG_createExplosion(RCL_Unit x, RCL_Unit y, RCL_Unit z) -{ - SFG_ProjectileRecord explosion; - - SFG_playGameSound(2,SFG_distantSoundVolume(x,y,z)); - SFG_processEvent(SFG_EVENT_EXPLOSION,0); - - explosion.type = SFG_PROJECTILE_EXPLOSION; - - explosion.position[0] = x; - explosion.position[1] = y; - explosion.position[2] = z; - - explosion.direction[0] = 0; - explosion.direction[1] = 0; - explosion.direction[2] = 0; - - explosion.doubleFramesToLive = RCL_nonZero( - SFG_GET_PROJECTILE_FRAMES_TO_LIVE(SFG_PROJECTILE_EXPLOSION) / 2); - - SFG_createProjectile(explosion); - - uint8_t damage = SFG_getDamageValue(SFG_WEAPON_FIRE_TYPE_FIREBALL); - - if (SFG_pushPlayerAway(x,y,SFG_EXPLOSION_PUSH_AWAY_DISTANCE)) - SFG_playerChangeHealthWithMiltiplier(-1 * damage); - - for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - { - SFG_MonsterRecord *monster = &(SFG_currentLevel.monsterRecords[i]); - - uint16_t state = SFG_MR_STATE(*monster); - - if ((state == SFG_MONSTER_STATE_INACTIVE) || - (state == SFG_MONSTER_STATE_DEAD)) - continue; - - RCL_Unit monsterHeight = - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1])) - + RCL_UNITS_PER_SQUARE / 2; - - if (SFG_taxicabDistance( - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]),monsterHeight, - x,y,z) <= SFG_EXPLOSION_RADIUS) - { - SFG_monsterChangeHealth(monster, - -1 * SFG_getDamageValue(SFG_WEAPON_FIRE_TYPE_FIREBALL)); - } - } - - // explode nearby barrels - - if (damage >= SFG_BARREL_EXPLOSION_DAMAGE_THRESHOLD) - for (uint16_t i = 0; i < SFG_currentLevel.itemRecordCount; ++i) - { - SFG_ItemRecord item = SFG_currentLevel.itemRecords[i]; - - /* We DON'T check just active barrels but all, otherwise it looks weird - that out of sight barrels in a line didn't explode.*/ - - SFG_LevelElement element = SFG_ITEM_RECORD_LEVEL_ELEMENT(item); - - if (element.type != SFG_LEVEL_ELEMENT_BARREL) - continue; - - RCL_Unit elementX = - element.coords[0] * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2; - - RCL_Unit elementY = - element.coords[1] * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2; - - RCL_Unit elementHeight = - SFG_floorHeightAt(element.coords[0],element.coords[1]); - - if (SFG_taxicabDistance( - x,y,z,elementX,elementY,elementHeight) <= SFG_EXPLOSION_RADIUS) - { - SFG_explodeBarrel(i,elementX,elementY,elementHeight); - i--; - } - } -} - -void SFG_createDust(RCL_Unit x, RCL_Unit y, RCL_Unit z) -{ - SFG_ProjectileRecord dust; - - dust.type = SFG_PROJECTILE_DUST; - - dust.position[0] = x; - dust.position[1] = y; - dust.position[2] = z; - - dust.direction[0] = 0; - dust.direction[1] = 0; - dust.direction[2] = 0; - - dust.doubleFramesToLive = - RCL_nonZero(SFG_GET_PROJECTILE_FRAMES_TO_LIVE(SFG_PROJECTILE_DUST) / 2); - - SFG_createProjectile(dust); -} - -void SFG_getMonsterWorldPosition(SFG_MonsterRecord *monster, RCL_Unit *x, - RCL_Unit *y, RCL_Unit *z) -{ - *x = SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]); - *y = SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]); - *z = SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1])) - + RCL_UNITS_PER_SQUARE / 2; -} - -void SFG_monsterPerformAI(SFG_MonsterRecord *monster) -{ - uint8_t state = SFG_MR_STATE(*monster); - uint8_t type = SFG_MR_TYPE(*monster); - uint8_t monsterNumber = SFG_MONSTER_TYPE_TO_INDEX(type); - uint8_t attackType = SFG_GET_MONSTER_ATTACK_TYPE(monsterNumber); - - int8_t coordAdd[2]; - - coordAdd[0] = 0; - coordAdd[1] = 0; - - uint8_t notRanged = - (attackType == SFG_MONSTER_ATTACK_MELEE) || - (attackType == SFG_MONSTER_ATTACK_EXPLODE); - - uint8_t monsterSquare[2] = - { - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1]) - }; - - RCL_Unit currentHeight = - SFG_floorCollisionHeightAt(monsterSquare[0],monsterSquare[1]); - - if ( // sometimes randomly attack - !notRanged && - (SFG_random() < - SFG_GET_MONSTER_AGGRESSIVITY(SFG_MONSTER_TYPE_TO_INDEX(type))) - ) - { - if (!notRanged && (SFG_random() % 4 != 0)) - { - // attack - - state = SFG_MONSTER_STATE_ATTACKING; - - if (type != SFG_LEVEL_ELEMENT_MONSTER_WARRIOR) - { - RCL_Vector2D pos; - RCL_Vector2D dir; - - pos.x = SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]); - pos.y = SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]); - - dir.x = SFG_player.camera.position.x - pos.x - - 128 * SFG_MONSTER_AIM_RANDOMNESS + - SFG_random() * SFG_MONSTER_AIM_RANDOMNESS; - - dir.y = SFG_player.camera.position.y - pos.y - - 128 * SFG_MONSTER_AIM_RANDOMNESS + - SFG_random() * SFG_MONSTER_AIM_RANDOMNESS; - - dir = RCL_normalize(dir); - - uint8_t projectile; - - switch (SFG_GET_MONSTER_ATTACK_TYPE(monsterNumber)) - { - case SFG_MONSTER_ATTACK_FIREBALL: - projectile = SFG_PROJECTILE_FIREBALL; - break; - - case SFG_MONSTER_ATTACK_BULLET: - projectile = SFG_PROJECTILE_BULLET; - break; - - case SFG_MONSTER_ATTACK_PLASMA: - projectile = SFG_PROJECTILE_PLASMA; - break; - - case SFG_MONSTER_ATTACK_FIREBALL_BULLET: - projectile = (SFG_random() < 128) ? - SFG_PROJECTILE_FIREBALL : - SFG_PROJECTILE_BULLET; - break; - - case SFG_MONSTER_ATTACK_FIREBALL_PLASMA: - projectile = (SFG_random() < 128) ? - SFG_PROJECTILE_FIREBALL : - SFG_PROJECTILE_PLASMA; - break; - - default: - projectile = SFG_PROJECTILE_NONE; - break; - } - - if (projectile == SFG_PROJECTILE_BULLET) - SFG_playGameSound(0, - SFG_distantSoundVolume( - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]), - currentHeight) - ); - - SFG_launchProjectile( - projectile, - pos, - currentHeight + RCL_UNITS_PER_SQUARE / 2, - dir, - 0, - SFG_PROJECTILE_SPAWN_OFFSET - ); - } - } - else - state = SFG_MONSTER_STATE_IDLE; - } - else if (state == SFG_MONSTER_STATE_IDLE) - { - if (notRanged) - { - // non-ranged monsters walk towards player - - RCL_Unit pX, pY, pZ; - SFG_getMonsterWorldPosition(monster,&pX,&pY,&pZ); - - uint8_t isClose = // close to player? - SFG_taxicabDistance(pX,pY,pZ, - SFG_player.camera.position.x, - SFG_player.camera.position.y, - SFG_player.camera.height) <= SFG_MELEE_RANGE; - - if (!isClose) - { - // walk towards player - - if (monsterSquare[0] > SFG_player.squarePosition[0]) - { - if (monsterSquare[1] > SFG_player.squarePosition[1]) - state = SFG_MONSTER_STATE_GOING_NW; - else if (monsterSquare[1] < SFG_player.squarePosition[1]) - state = SFG_MONSTER_STATE_GOING_SW; - else - state = SFG_MONSTER_STATE_GOING_W; - } - else if (monsterSquare[0] < SFG_player.squarePosition[0]) - { - if (monsterSquare[1] > SFG_player.squarePosition[1]) - state = SFG_MONSTER_STATE_GOING_NE; - else if (monsterSquare[1] < SFG_player.squarePosition[1]) - state = SFG_MONSTER_STATE_GOING_SE; - else - state = SFG_MONSTER_STATE_GOING_E; - } - else - { - if (monsterSquare[1] > SFG_player.squarePosition[1]) - state = SFG_MONSTER_STATE_GOING_N; - else if (monsterSquare[1] < SFG_player.squarePosition[1]) - state = SFG_MONSTER_STATE_GOING_S; - } - } - else // is close - { - // melee, close-up attack - - if (attackType == SFG_MONSTER_ATTACK_MELEE) - { - // melee attack - - state = SFG_MONSTER_STATE_ATTACKING; - - SFG_playerChangeHealthWithMiltiplier( - -1 * SFG_getDamageValue(SFG_WEAPON_FIRE_TYPE_MELEE)); - - SFG_playGameSound(3,255); - } - else // SFG_MONSTER_ATTACK_EXPLODE - { - // explode - - SFG_createExplosion(pX,pY,pZ); - monster->health = 0; - } - } - } - else // ranged monsters - { - // choose walk direction randomly - - switch (SFG_random() % 8) - { - case 0: state = SFG_MONSTER_STATE_GOING_E; break; - case 1: state = SFG_MONSTER_STATE_GOING_W; break; - case 2: state = SFG_MONSTER_STATE_GOING_N; break; - case 3: state = SFG_MONSTER_STATE_GOING_S; break; - case 4: state = SFG_MONSTER_STATE_GOING_NE; break; - case 5: state = SFG_MONSTER_STATE_GOING_NW; break; - case 6: state = SFG_MONSTER_STATE_GOING_SE; break; - case 7: state = SFG_MONSTER_STATE_GOING_SW; break; - default: break; - } - } - } - else if (state == SFG_MONSTER_STATE_ATTACKING) - { - state = SFG_MONSTER_STATE_IDLE; - } - else - { - int8_t add = 1; - - if (attackType == SFG_MONSTER_ATTACK_MELEE) - add = 2; - else if (attackType == SFG_MONSTER_ATTACK_EXPLODE) - add = 3; - - if (state == SFG_MONSTER_STATE_GOING_E || - state == SFG_MONSTER_STATE_GOING_NE || - state == SFG_MONSTER_STATE_GOING_SE) - coordAdd[0] = add; - else if (state == SFG_MONSTER_STATE_GOING_W || - state == SFG_MONSTER_STATE_GOING_SW || - state == SFG_MONSTER_STATE_GOING_NW) - coordAdd[0] = -1 * add; - - if (state == SFG_MONSTER_STATE_GOING_N || - state == SFG_MONSTER_STATE_GOING_NE || - state == SFG_MONSTER_STATE_GOING_NW) - coordAdd[1] = -1 * add; - else if (state == SFG_MONSTER_STATE_GOING_S || - state == SFG_MONSTER_STATE_GOING_SE || - state == SFG_MONSTER_STATE_GOING_SW) - coordAdd[1] = add; - - if ((coordAdd[0] != 0 || coordAdd[1] != 0) && SFG_random() < - SFG_MONSTER_SOUND_PROBABILITY) - SFG_playGameSound(5, - SFG_distantSoundVolume( - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]), - currentHeight) / 2); - - state = SFG_MONSTER_STATE_IDLE; - } - - int16_t newPos[2]; - - newPos[0] = monster->coords[0] + coordAdd[0]; - newPos[1] = monster->coords[1] + coordAdd[1]; - - int8_t collision = 0; - - if (newPos[0] < 0 || newPos[0] >= 256 || newPos[1] < 0 || newPos[1] >= 256) - { - collision = 1; - } - else - { - uint8_t movingDiagonally = (coordAdd[0] != 0) && (coordAdd[1] != 0); - - // when moving diagonally, we need to check extra tiles - - for (uint8_t i = 0; i < (1 + movingDiagonally); ++i) - { - newPos[0] = monster->coords[0] + (i != 1) * coordAdd[0]; - - RCL_Unit newHeight = - SFG_floorCollisionHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(newPos[0]), - SFG_MONSTER_COORD_TO_SQUARES(newPos[1])); - - collision = - RCL_abs(currentHeight - newHeight) > RCL_CAMERA_COLL_STEP_HEIGHT; - - if (!collision) - collision = (SFG_ceilingHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(newPos[0]), - SFG_MONSTER_COORD_TO_SQUARES(newPos[1])) - newHeight) < - SFG_MONSTER_COLLISION_HEIGHT; - - if (collision) - break; - } - - newPos[0] = monster->coords[0] + coordAdd[0]; - } - - if (collision) - { - state = SFG_MONSTER_STATE_IDLE; - // ^ will force the monster to choose random direction in the next update - - newPos[0] = monster->coords[0]; - newPos[1] = monster->coords[1]; - } - - monster->stateType = state | (monsterNumber << 4); - monster->coords[0] = newPos[0]; - monster->coords[1] = newPos[1];; -} - -static inline uint8_t SFG_elementCollides( - RCL_Unit pointX, - RCL_Unit pointY, - RCL_Unit pointZ, - RCL_Unit elementX, - RCL_Unit elementY, - RCL_Unit elementHeight -) -{ - return - SFG_taxicabDistance(pointX,pointY,pointZ,elementX,elementY,elementHeight) - <= SFG_ELEMENT_COLLISION_RADIUS; -} - -/** - Checks collision of a projectile with level element at given position. -*/ -uint8_t SFG_projectileCollides(SFG_ProjectileRecord *projectile, - RCL_Unit x, RCL_Unit y, RCL_Unit z) -{ - if (!SFG_elementCollides(x,y,z, - projectile->position[0],projectile->position[1],projectile->position[2])) - return 0; - - if ((projectile->type == SFG_PROJECTILE_EXPLOSION) || - (projectile->type == SFG_PROJECTILE_DUST)) - return 0; - - /* For directional projectiles we only register a collision if its direction - is "towards" the element so that the shooter doesn't get shot by his own - projectile. */ - - RCL_Vector2D projDir, toElement; - - projDir.x = projectile->direction[0]; - projDir.y = projectile->direction[1]; - - toElement.x = x - projectile->position[0]; - toElement.y = y - projectile->position[1]; - - return RCL_vectorsAngleCos(projDir,toElement) >= 0; -} - -/** - Updates a frame of the currently loaded level, i.e. enemies, projectiles, - aimations etc., with the exception of player. -*/ -void SFG_updateLevel() -{ - // update projectiles: - - uint8_t substractFrames = - (SFG_game.frame - SFG_currentLevel.frameStart) & 0x01 ? 1 : 0; - /* ^ only substract frames to live every other frame because a maximum of - 256 frames would be too few */ - - for (int8_t i = 0; i < SFG_currentLevel.projectileRecordCount; ++i) - { // ^ has to be signed - SFG_ProjectileRecord *p = &(SFG_currentLevel.projectileRecords[i]); - - uint8_t attackType = 255; - - if (p->type == SFG_PROJECTILE_BULLET) - attackType = SFG_WEAPON_FIRE_TYPE_BULLET; - else if (p->type == SFG_PROJECTILE_PLASMA) - attackType = SFG_WEAPON_FIRE_TYPE_PLASMA; - - RCL_Unit pos[3] = {0,0,0}; /* we have to convert from uint16_t because of - under/overflows */ - uint8_t eliminate = 0; - - for (uint8_t j = 0; j < 3; ++j) - { - pos[j] = p->position[j]; - pos[j] += p->direction[j]; - - if ( // projectile outside map? - (pos[j] < 0) || - (pos[j] >= (SFG_MAP_SIZE * RCL_UNITS_PER_SQUARE))) - { - eliminate = 1; - break; - } - } - - if (p->doubleFramesToLive == 0) // no more time to live? - { - eliminate = 1; - } - else if ( - (p->type != SFG_PROJECTILE_EXPLOSION) && - (p->type != SFG_PROJECTILE_DUST)) - { - if (SFG_projectileCollides( // collides with player? - p, - SFG_player.camera.position.x, - SFG_player.camera.position.y, - SFG_player.camera.height)) - { - eliminate = 1; - SFG_playerChangeHealthWithMiltiplier(-1 * SFG_getDamageValue(attackType)); - } - - /* Check collision with the map (we don't use SFG_floorCollisionHeightAt - because collisions with items have to be done differently for - projectiles). */ - - if (!eliminate && - ((SFG_floorHeightAt(pos[0] / RCL_UNITS_PER_SQUARE,pos[1] / - RCL_UNITS_PER_SQUARE) >= pos[2]) - || - (SFG_ceilingHeightAt(pos[0] / RCL_UNITS_PER_SQUARE,pos[1] / - RCL_UNITS_PER_SQUARE) <= pos[2])) - ) - eliminate = 1; - - // check collision with active level elements - - if (!eliminate) // monsters - for (uint16_t j = 0; j < SFG_currentLevel.monsterRecordCount; ++j) - { - SFG_MonsterRecord *m = &(SFG_currentLevel.monsterRecords[j]); - - uint8_t state = SFG_MR_STATE(*m); - - if ((state != SFG_MONSTER_STATE_INACTIVE) && - (state != SFG_MONSTER_STATE_DEAD)) - { - if (SFG_projectileCollides(p, - SFG_MONSTER_COORD_TO_RCL_UNITS(m->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(m->coords[1]), - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(m->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(m->coords[1])) - )) - { - eliminate = 1; - SFG_monsterChangeHealth(m,-1 * SFG_getDamageValue(attackType)); - break; - } - } - } - - if (!eliminate) // items (can't check itemCollisionMap because of barrels) - for (uint16_t j = 0; j < SFG_currentLevel.itemRecordCount; ++j) - { - const SFG_LevelElement *e = SFG_getActiveItemElement(j); - - if (e != 0 && SFG_itemCollides(e->type)) - { - RCL_Unit x = SFG_ELEMENT_COORD_TO_RCL_UNITS(e->coords[0]); - RCL_Unit y = SFG_ELEMENT_COORD_TO_RCL_UNITS(e->coords[1]); - RCL_Unit z = SFG_floorHeightAt(e->coords[0],e->coords[1]); - - if (SFG_projectileCollides(p,x,y,z)) - { - if ( - (e->type == SFG_LEVEL_ELEMENT_BARREL) && - (SFG_getDamageValue(attackType) >= - SFG_BARREL_EXPLOSION_DAMAGE_THRESHOLD) - ) - { - SFG_explodeBarrel(j,x,y,z); - } - - eliminate = 1; - break; - } - } - } - } - - if (eliminate) - { - if (p->type == SFG_PROJECTILE_FIREBALL) - SFG_createExplosion(p->position[0],p->position[1],p->position[2]); - else if (p->type == SFG_PROJECTILE_BULLET) - SFG_createDust(p->position[0],p->position[1],p->position[2]); - else if (p->type == SFG_PROJECTILE_PLASMA) - SFG_playGameSound(4,SFG_distantSoundVolume(pos[0],pos[1],pos[2])); - - // remove the projectile - - for (uint8_t j = i; j < SFG_currentLevel.projectileRecordCount - 1; ++j) - SFG_currentLevel.projectileRecords[j] = - SFG_currentLevel.projectileRecords[j + 1]; - - SFG_currentLevel.projectileRecordCount--; - - i--; - } - else - { - p->position[0] = pos[0]; - p->position[1] = pos[1]; - p->position[2] = pos[2]; - } - - p->doubleFramesToLive -= substractFrames; - } - - // handle door: - if (SFG_currentLevel.doorRecordCount > 0) // has to be here - { - /* Check door on whether a player is standing nearby. For performance - reasons we only check a few doors and move to others in the next - frame. */ - - if (SFG_currentLevel.checkedDoorIndex == 0) - { - uint8_t count = SFG_player.cards >> 6; - - SFG_player.cards = (count <= 1) ? - (SFG_player.cards & 0x07) : - ((SFG_player.cards & 0x7f) | ((count - 1) << 6)); - } - - for (uint16_t i = 0; - i < RCL_min(SFG_ELEMENT_DISTANCES_CHECKED_PER_FRAME, - SFG_currentLevel.doorRecordCount); - ++i) - { - SFG_DoorRecord *door = - &(SFG_currentLevel.doorRecords[SFG_currentLevel.checkedDoorIndex]); - - uint8_t upDownState = door->state & SFG_DOOR_UP_DOWN_MASK; - - uint8_t newUpDownState = 0; - - uint8_t lock = SFG_DOOR_LOCK(door->state); - - if ( // player near door? - (door->coords[0] >= (SFG_player.squarePosition[0] - 1)) && - (door->coords[0] <= (SFG_player.squarePosition[0] + 1)) && - (door->coords[1] >= (SFG_player.squarePosition[1] - 1)) && - (door->coords[1] <= (SFG_player.squarePosition[1] + 1))) - { - if (lock == 0) - { - newUpDownState = SFG_DOOR_UP_DOWN_MASK; - } - else - { - lock = 1 << (lock - 1); - - if (SFG_player.cards & lock) // player has the card? - newUpDownState = SFG_DOOR_UP_DOWN_MASK; - else - SFG_player.cards = - (SFG_player.cards & 0x07) | (lock << 3) | (2 << 6); - } - } - - if (upDownState != newUpDownState) - SFG_playGameSound(1,255); - - door->state = (door->state & ~SFG_DOOR_UP_DOWN_MASK) | newUpDownState; - - SFG_currentLevel.checkedDoorIndex++; - - if (SFG_currentLevel.checkedDoorIndex >= SFG_currentLevel.doorRecordCount) - SFG_currentLevel.checkedDoorIndex = 0; - } - - // move door up/down: - for (uint32_t i = 0; i < SFG_currentLevel.doorRecordCount; ++i) - { - SFG_DoorRecord *door = &(SFG_currentLevel.doorRecords[i]); - - int8_t height = door->state & SFG_DOOR_VERTICAL_POSITION_MASK; - - height = (door->state & SFG_DOOR_UP_DOWN_MASK) ? - RCL_min(0x1f,height + SFG_DOOR_INCREMENT_PER_FRAME) : - RCL_max(0x00,height - SFG_DOOR_INCREMENT_PER_FRAME); - - door->state = (door->state & ~SFG_DOOR_VERTICAL_POSITION_MASK) | height; - } - } - - // handle items, in a similar manner to door: - if (SFG_currentLevel.itemRecordCount > 0) // has to be here - { - // check item distances: - - for (uint16_t i = 0; - i < RCL_min(SFG_ELEMENT_DISTANCES_CHECKED_PER_FRAME, - SFG_currentLevel.itemRecordCount); - ++i) - { - SFG_ItemRecord item = - SFG_currentLevel.itemRecords[SFG_currentLevel.checkedItemIndex]; - - item &= ~SFG_ITEM_RECORD_ACTIVE_MASK; - - SFG_LevelElement e = - SFG_currentLevel.levelPointer->elements[item]; - - if ( - SFG_isInActiveDistanceFromPlayer( - e.coords[0] * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2, - e.coords[1] * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2, - SFG_floorHeightAt(e.coords[0],e.coords[1]) + RCL_UNITS_PER_SQUARE / 2) - ) - item |= SFG_ITEM_RECORD_ACTIVE_MASK; - - SFG_currentLevel.itemRecords[SFG_currentLevel.checkedItemIndex] = item; - - SFG_currentLevel.checkedItemIndex++; - - if (SFG_currentLevel.checkedItemIndex >= SFG_currentLevel.itemRecordCount) - SFG_currentLevel.checkedItemIndex = 0; - } - } - - // similarly handle monsters: - if (SFG_currentLevel.monsterRecordCount > 0) // has to be here - { - // check monster distances: - - for (uint16_t i = 0; - i < RCL_min(SFG_ELEMENT_DISTANCES_CHECKED_PER_FRAME, - SFG_currentLevel.monsterRecordCount); - ++i) - { - SFG_MonsterRecord *monster = - &(SFG_currentLevel.monsterRecords[SFG_currentLevel.checkedMonsterIndex]); - - if ( // far away from the player? - !SFG_isInActiveDistanceFromPlayer( - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]), - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[1])) - + RCL_UNITS_PER_SQUARE / 2 - ) - ) - { - monster->stateType = - (monster->stateType & SFG_MONSTER_MASK_TYPE) | - SFG_MONSTER_STATE_INACTIVE; - } - else if (SFG_MR_STATE(*monster) == SFG_MONSTER_STATE_INACTIVE) - { - monster->stateType = - (monster->stateType & SFG_MONSTER_MASK_TYPE) | - (monster->health != 0 ? - SFG_MONSTER_STATE_IDLE : SFG_MONSTER_STATE_DEAD); - } - - SFG_currentLevel.checkedMonsterIndex++; - - if (SFG_currentLevel.checkedMonsterIndex >= - SFG_currentLevel.monsterRecordCount) - SFG_currentLevel.checkedMonsterIndex = 0; - } - } - - // update AI and handle dead monsters: - if ((SFG_game.frame - SFG_currentLevel.frameStart) % - SFG_AI_UPDATE_FRAME_INTERVAL == 0) - { - for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - { - SFG_MonsterRecord *monster = &(SFG_currentLevel.monsterRecords[i]); - uint8_t state = SFG_MR_STATE(*monster); - - if ((state == SFG_MONSTER_STATE_INACTIVE) || - (state == SFG_MONSTER_STATE_DEAD)) - continue; - - if (state == SFG_MONSTER_STATE_DYING) - { - if (SFG_MR_TYPE(*monster) == SFG_LEVEL_ELEMENT_MONSTER_ENDER) - { - SFG_currentLevel.bossCount--; - - // last boss killed gives player a key card - - if (SFG_currentLevel.bossCount == 0) - { - SFG_LOG("boss killed, giving player a card"); - SFG_player.cards |= 0x04; - } - } - - monster->stateType = - (monster->stateType & 0xf0) | SFG_MONSTER_STATE_DEAD; - } - else if (monster->health == 0) - { - monster->stateType = (monster->stateType & SFG_MONSTER_MASK_TYPE) | - SFG_MONSTER_STATE_DYING; - - SFG_processEvent(SFG_EVENT_MONSTER_DIES,SFG_MR_TYPE(*monster)); - - if (SFG_MR_TYPE(*monster) == SFG_LEVEL_ELEMENT_MONSTER_EXPLODER) - SFG_createExplosion( - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[0]), - SFG_MONSTER_COORD_TO_RCL_UNITS(monster->coords[1]), - SFG_floorCollisionHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(monster->coords[0])) + - RCL_UNITS_PER_SQUARE / 2); - } - else - { -#if SFG_PREVIEW_MODE == 0 - SFG_monsterPerformAI(monster); -#endif - } - } - } -} - -/** - Maps square position on the map to a bit in map reveal mask. -*/ -static inline uint16_t SFG_getMapRevealBit(uint8_t squareX, uint8_t squareY) -{ - return 1 << ((squareY / 16) * 4 + squareX / 16); -} - -/** - Checks a 3D point visibility from player's position (WITHOUT considering - facing direction). -*/ -static inline uint8_t SFG_spriteIsVisible(RCL_Vector2D pos, RCL_Unit height, - uint8_t spriteSize) -{ - return - RCL_castRay3D( - SFG_player.camera.position, - SFG_player.camera.height, - pos, - height, - SFG_floorHeightAt, - SFG_ceilingHeightAt, - SFG_game.rayConstraints - ) == RCL_UNITS_PER_SQUARE; -} - -/** - Returns a tangent in RCL_Unit of vertical autoaim, given current game state. -*/ -RCL_Unit SFG_autoaimVertically() -{ - for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - { - SFG_MonsterRecord m = SFG_currentLevel.monsterRecords[i]; - - if (SFG_MR_STATE(m) == SFG_MONSTER_STATE_INACTIVE) - continue; - - RCL_Vector2D worldPosition, toMonster; - - worldPosition.x = SFG_MONSTER_COORD_TO_RCL_UNITS(m.coords[0]); - worldPosition.y = SFG_MONSTER_COORD_TO_RCL_UNITS(m.coords[1]); - - toMonster.x = worldPosition.x - SFG_player.camera.position.x; - toMonster.y = worldPosition.y - SFG_player.camera.position.y; - - if (RCL_abs( - RCL_vectorsAngleCos(SFG_player.direction,toMonster) - - RCL_UNITS_PER_SQUARE) < SFG_VERTICAL_AUTOAIM_ANGLE_THRESHOLD) - { - uint8_t spriteSize = SFG_GET_MONSTER_SPRITE_SIZE( - SFG_MONSTER_TYPE_TO_INDEX(SFG_MR_TYPE(m))); - - RCL_Unit worldHeight = - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(m.coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(m.coords[1])) - + - SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(spriteSize); - - if (SFG_spriteIsVisible(worldPosition,worldHeight,spriteSize)) - { - RCL_Unit distance = RCL_len(toMonster); - - return ((worldHeight - SFG_player.camera.height) * RCL_UNITS_PER_SQUARE) - / distance; - } - } - } - - return 0; -} - -/** - Draws text on screen using the bitmap font stored in assets. -*/ -void SFG_drawText( - const char *text, - uint16_t x, - uint16_t y, - uint8_t size, - uint8_t color, - uint16_t maxLength, - uint16_t limitX) -{ - if (size == 0) - size = 1; - - if (limitX == 0) - limitX = 65535; - - if (maxLength == 0) - maxLength = 65535; - - uint16_t pos = 0; - - uint16_t currentX = x; - uint16_t currentY = y; - - while (text[pos] != 0 && pos < maxLength) // for each character - { - uint16_t character = SFG_font[SFG_charToFontIndex(text[pos])]; - - for (uint8_t i = 0; i < SFG_FONT_CHARACTER_SIZE; ++i) // for each line - { - currentY = y; - - for (uint8_t j = 0; j < SFG_FONT_CHARACTER_SIZE; ++j) // for each row - { - if (character & 0x8000) - for (uint8_t k = 0; k < size; ++k) - for (uint8_t l = 0; l < size; ++l) - { - uint16_t drawX = currentX + k; - uint16_t drawY = currentY + l; - - if (drawX < SFG_GAME_RESOLUTION_X && - drawY < SFG_GAME_RESOLUTION_Y) - SFG_setGamePixel(drawX,drawY,color); - } - - currentY += size; - character = character << 1; - } - - currentX += size; - } - - currentX += size; // space - - if (currentX > limitX) - { - currentX = x; - y += (SFG_FONT_CHARACTER_SIZE + 1) * size; - } - - pos++; - } -} - -void SFG_drawLevelStartOverlay() -{ - uint8_t stage = ((SFG_game.frameTime - SFG_game.stateChangeTime) * 4) / - SFG_LEVEL_START_DURATION; - - // fade in: - - for (uint16_t y = 0; y < SFG_GAME_RESOLUTION_Y; ++y) - for (uint16_t x = 0; x < SFG_GAME_RESOLUTION_X; ++x) - { - uint8_t draw = 0; - - switch (stage) - { - case 0: draw = 1; break; - case 1: draw = (x % 2) || (y % 2); break; - case 2: draw = (x % 2) == (y % 2); break; - case 3: draw = (x % 2) && (y % 2); break; - default: break; - } - - if (draw) - SFG_setGamePixel(x,y,0); - } - - if (SFG_game.saved == 1) - SFG_drawText(SFG_TEXT_SAVED,SFG_HUD_MARGIN,SFG_HUD_MARGIN, - SFG_FONT_SIZE_MEDIUM,7,255,0); -} - -/** - Sets player's height to match the floor height below him. -*/ -void SFG_updatePlayerHeight() -{ - SFG_player.camera.height = - SFG_floorCollisionHeightAt( - SFG_player.squarePosition[0],SFG_player.squarePosition[1]) + - RCL_CAMERA_COLL_HEIGHT_BELOW; -} - -/** - Part of SFG_gameStep() for SFG_GAME_STATE_PLAYING. -*/ -void SFG_gameStepPlaying() -{ - if ( - (SFG_keyIsDown(SFG_KEY_C) && SFG_keyIsDown(SFG_KEY_DOWN)) || - SFG_keyIsDown(SFG_KEY_MENU)) - { - SFG_setGameState(SFG_GAME_STATE_MENU); - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - return; - } - - SFG_updateLevel(); - - int8_t recomputeDirection = SFG_currentLevel.frameStart == SFG_game.frame; - - RCL_Vector2D moveOffset; - - moveOffset.x = 0; - moveOffset.y = 0; - - int8_t strafe = 0; - - uint8_t currentWeapon = SFG_player.weapon; - -#if SFG_HEADBOB_ENABLED - int8_t bobbing = 0; -#endif - - int8_t shearing = 0; - - if (SFG_player.weaponCooldownFrames > 0) - SFG_player.weaponCooldownFrames--; - - if (SFG_keyJustPressed(SFG_KEY_TOGGLE_FREELOOK)) - SFG_game.settings = (SFG_game.settings & 0x04) ? - (SFG_game.settings & ~0x0c) : (SFG_game.settings | 0x0c ); - - int8_t canSwitchWeapon = SFG_player.weaponCooldownFrames == 0; - - if (SFG_keyJustPressed(SFG_KEY_NEXT_WEAPON) && canSwitchWeapon) - SFG_playerRotateWeapon(1); - else if (SFG_keyJustPressed(SFG_KEY_PREVIOUS_WEAPON) && canSwitchWeapon) - SFG_playerRotateWeapon(0); - - uint8_t shearingOn = SFG_game.settings & 0x04; - - if (SFG_keyIsDown(SFG_KEY_A)) - { - if (shearingOn) // A + U/D: shearing (if on) - { - if (SFG_keyIsDown(SFG_KEY_UP)) - { - SFG_player.camera.shear = - RCL_min(SFG_CAMERA_MAX_SHEAR_PIXELS, - SFG_player.camera.shear + SFG_CAMERA_SHEAR_STEP_PER_FRAME); - - shearing = 1; - } - else if (SFG_keyIsDown(SFG_KEY_DOWN)) - { - SFG_player.camera.shear = - RCL_max(-1 * SFG_CAMERA_MAX_SHEAR_PIXELS, - SFG_player.camera.shear - SFG_CAMERA_SHEAR_STEP_PER_FRAME); - - shearing = 1; - } - } - - if (!SFG_keyIsDown(SFG_KEY_C)) - { // A + L/R: strafing - if (SFG_keyIsDown(SFG_KEY_LEFT)) - strafe = -1; - else if (SFG_keyIsDown(SFG_KEY_RIGHT)) - strafe = 1; - } - } - - if (SFG_keyIsDown(SFG_KEY_C)) // C + AL/BR: weapon switching - { - if ((SFG_keyJustPressed(SFG_KEY_LEFT) || SFG_keyJustPressed(SFG_KEY_A)) && - canSwitchWeapon) - SFG_playerRotateWeapon(0); - else if ( - (SFG_keyJustPressed(SFG_KEY_RIGHT) || SFG_keyJustPressed(SFG_KEY_B)) && - canSwitchWeapon) - SFG_playerRotateWeapon(1); - } - else if (!SFG_keyIsDown(SFG_KEY_A)) // L/R: turning - { - if (SFG_keyIsDown(SFG_KEY_LEFT)) - { - SFG_player.camera.direction -= SFG_PLAYER_TURN_UNITS_PER_FRAME; - recomputeDirection = 1; - } - else if (SFG_keyIsDown(SFG_KEY_RIGHT)) - { - SFG_player.camera.direction += SFG_PLAYER_TURN_UNITS_PER_FRAME; - recomputeDirection = 1; - } - } - - if (!SFG_keyIsDown(SFG_KEY_A) || !shearingOn) // U/D: movement - { - if (SFG_keyIsDown(SFG_KEY_UP)) - { - moveOffset.x += SFG_player.direction.x; - moveOffset.y += SFG_player.direction.y; -#if SFG_HEADBOB_ENABLED - bobbing = 1; -#endif - } - else if (SFG_keyIsDown(SFG_KEY_DOWN)) - { - moveOffset.x -= SFG_player.direction.x; - moveOffset.y -= SFG_player.direction.y; -#if SFG_HEADBOB_ENABLED - bobbing = 1; -#endif - } - } - - int16_t mouseX = 0, mouseY = 0; - - SFG_getMouseOffset(&mouseX,&mouseY); - - if (mouseX != 0) // mouse turning - { - SFG_player.camera.direction += - (mouseX * SFG_MOUSE_SENSITIVITY_HORIZONTAL) / 128; - - recomputeDirection = 1; - } - - if ((mouseY != 0) && shearingOn) // mouse shearing - SFG_player.camera.shear = - RCL_max(RCL_min( - SFG_player.camera.shear - - (mouseY * SFG_MOUSE_SENSITIVITY_VERTICAL) / 128, - SFG_CAMERA_MAX_SHEAR_PIXELS), - -1 * SFG_CAMERA_MAX_SHEAR_PIXELS); - - if (recomputeDirection) - SFG_recomputePLayerDirection(); - - if (SFG_keyIsDown(SFG_KEY_STRAFE_LEFT)) - strafe = -1; - else if (SFG_keyIsDown(SFG_KEY_STRAFE_RIGHT)) - strafe = 1; - - if (strafe != 0) - { - moveOffset.x += strafe * SFG_player.direction.y; - moveOffset.y -= strafe * SFG_player.direction.x; - } - -#if SFG_PREVIEW_MODE - if (SFG_keyIsDown(SFG_KEY_B)) - SFG_player.verticalSpeed = SFG_PLAYER_MOVE_UNITS_PER_FRAME; - else if (SFG_keyIsDown(SFG_KEY_C)) - SFG_player.verticalSpeed = -1 * SFG_PLAYER_MOVE_UNITS_PER_FRAME; - else - SFG_player.verticalSpeed = 0; -#else - RCL_Unit verticalOffset = - ( - ( - SFG_keyIsDown(SFG_KEY_JUMP) || - (SFG_keyIsDown(SFG_KEY_UP) && SFG_keyIsDown(SFG_KEY_C)) - ) && - (SFG_player.verticalSpeed == 0) && - (SFG_player.previousVerticalSpeed == 0)) ? - SFG_PLAYER_JUMP_OFFSET_PER_FRAME : // jump - (SFG_player.verticalSpeed - SFG_GRAVITY_SPEED_INCREASE_PER_FRAME); -#endif - - if (!shearing && SFG_player.camera.shear != 0 && !(SFG_game.settings & 0x08)) - { - // gradually shear back to zero - - SFG_player.camera.shear = - (SFG_player.camera.shear > 0) ? - RCL_max(0,SFG_player.camera.shear - SFG_CAMERA_SHEAR_STEP_PER_FRAME) : - RCL_min(0,SFG_player.camera.shear + SFG_CAMERA_SHEAR_STEP_PER_FRAME); - } - -#if SFG_HEADBOB_ENABLED && !SFG_PREVIEW_MODE - if (bobbing) - { - SFG_player.headBobFrame += SFG_HEADBOB_FRAME_INCREASE_PER_FRAME; - } - else if (SFG_player.headBobFrame != 0) - { - // smoothly stop bobbing - - uint8_t quadrant = (SFG_player.headBobFrame % RCL_UNITS_PER_SQUARE) / - (RCL_UNITS_PER_SQUARE / 4); - - /* When in quadrant in which sin is going away from zero, switch to the - same value of the next quadrant, so that bobbing starts to go towards - zero immediately. */ - - if (quadrant % 2 == 0) - SFG_player.headBobFrame = - ((quadrant + 1) * RCL_UNITS_PER_SQUARE / 4) + - (RCL_UNITS_PER_SQUARE / 4 - SFG_player.headBobFrame % - (RCL_UNITS_PER_SQUARE / 4)); - - RCL_Unit currentFrame = SFG_player.headBobFrame; - RCL_Unit nextFrame = SFG_player.headBobFrame + 16; - - // only stop bobbing when we pass a frame at which sin crosses zero - SFG_player.headBobFrame = - (currentFrame / (RCL_UNITS_PER_SQUARE / 2) == - nextFrame / (RCL_UNITS_PER_SQUARE / 2)) ? - nextFrame : 0; - } -#endif - - RCL_Unit previousHeight = SFG_player.camera.height; - - // handle player collision with level elements: - - // monsters: - for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - { - SFG_MonsterRecord *m = &(SFG_currentLevel.monsterRecords[i]); - - uint8_t state = SFG_MR_STATE(*m); - - if (state == SFG_MONSTER_STATE_INACTIVE || state == SFG_MONSTER_STATE_DEAD) - continue; - - RCL_Vector2D mPos; - - mPos.x = SFG_MONSTER_COORD_TO_RCL_UNITS(m->coords[0]); - mPos.y = SFG_MONSTER_COORD_TO_RCL_UNITS(m->coords[1]); - - if ( - SFG_elementCollides( - SFG_player.camera.position.x, - SFG_player.camera.position.y, - SFG_player.camera.height, - mPos.x, - mPos.y, - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(m->coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(m->coords[1])) - ) - ) - { - moveOffset = SFG_resolveCollisionWithElement( - SFG_player.camera.position,moveOffset,mPos); - } - } - - uint8_t collidesWithTeleport = 0; - - /* item collisions with player (only those that don't stop player's movement, - as those are handled differently, via itemCollisionMap): */ - for (int16_t i = 0; i < SFG_currentLevel.itemRecordCount; ++i) - // ^ has to be int16_t (signed) - { - if (!(SFG_currentLevel.itemRecords[i] & SFG_ITEM_RECORD_ACTIVE_MASK)) - continue; - - const SFG_LevelElement *e = SFG_getActiveItemElement(i); - - if (e != 0) - { - RCL_Vector2D ePos; - - ePos.x = SFG_ELEMENT_COORD_TO_RCL_UNITS(e->coords[0]); - ePos.y = SFG_ELEMENT_COORD_TO_RCL_UNITS(e->coords[1]); - - if (!SFG_itemCollides(e->type) && - SFG_elementCollides( - SFG_player.camera.position.x, - SFG_player.camera.position.y, - SFG_player.camera.height, - ePos.x, - ePos.y, - SFG_floorHeightAt(e->coords[0],e->coords[1])) - ) - { - uint8_t eliminate = 1; - - uint8_t onlyKnife = 1; - - for (uint8_t i = 0; i < SFG_AMMO_TOTAL; ++i) - if (SFG_player.ammo[i] != 0) - { - onlyKnife = 0; - break; - } - - switch (e->type) - { - case SFG_LEVEL_ELEMENT_HEALTH: - if (SFG_player.health < SFG_PLAYER_MAX_HEALTH) - SFG_playerChangeHealth(SFG_HEALTH_KIT_VALUE); - else - eliminate = 0; - break; - -#define addAmmo(type) \ - if (SFG_player.ammo[SFG_AMMO_##type] < SFG_AMMO_MAX_##type) \ - {\ - SFG_player.ammo[SFG_AMMO_##type] = RCL_min(SFG_AMMO_MAX_##type,\ - SFG_player.ammo[SFG_AMMO_##type] + SFG_AMMO_INCREASE_##type);\ - if (onlyKnife) SFG_playerRotateWeapon(1); \ - }\ - else\ - eliminate = 0; - - case SFG_LEVEL_ELEMENT_BULLETS: - addAmmo(BULLETS) - break; - - case SFG_LEVEL_ELEMENT_ROCKETS: - addAmmo(ROCKETS) - break; - - case SFG_LEVEL_ELEMENT_PLASMA: - addAmmo(PLASMA) - break; - -#undef addAmmo - - case SFG_LEVEL_ELEMENT_CARD0: - case SFG_LEVEL_ELEMENT_CARD1: - case SFG_LEVEL_ELEMENT_CARD2: - SFG_player.cards |= 1 << (e->type - SFG_LEVEL_ELEMENT_CARD0); - break; - - case SFG_LEVEL_ELEMENT_TELEPORT: - collidesWithTeleport = 1; - eliminate = 0; - break; - - case SFG_LEVEL_ELEMENT_FINISH: - SFG_levelEnds(); - SFG_setGameState(SFG_GAME_STATE_WIN); - SFG_playGameSound(2,255); - SFG_processEvent(SFG_EVENT_VIBRATE,0); - SFG_processEvent( - SFG_EVENT_LEVEL_WON,SFG_currentLevel.levelNumber + 1); - eliminate = 0; - break; - - default: - eliminate = 0; - break; - } - - if (eliminate) // take the item - { -#if !SFG_PREVIEW_MODE - SFG_removeItem(i); - SFG_player.lastItemTakenFrame = SFG_game.frame; - i--; - SFG_playGameSound(3,255); - SFG_processEvent(SFG_EVENT_PLAYER_TAKES_ITEM,e->type); -#endif - } - else if ( - e->type == SFG_LEVEL_ELEMENT_TELEPORT && - SFG_currentLevel.teleportCount > 1 && - !SFG_player.justTeleported) - { - // teleport to random destination teleport - - uint8_t teleportNumber = - SFG_random() % (SFG_currentLevel.teleportCount - 1) + 1; - - for (uint16_t j = 0; j < SFG_currentLevel.itemRecordCount; ++j) - { - SFG_LevelElement e2 = - SFG_currentLevel.levelPointer->elements - [SFG_currentLevel.itemRecords[j] & - ~SFG_ITEM_RECORD_ACTIVE_MASK]; - - if ((e2.type == SFG_LEVEL_ELEMENT_TELEPORT) && (j != i)) - teleportNumber--; - - if (teleportNumber == 0) - { - SFG_player.camera.position.x = - SFG_ELEMENT_COORD_TO_RCL_UNITS(e2.coords[0]); - - SFG_player.camera.position.y = - SFG_ELEMENT_COORD_TO_RCL_UNITS(e2.coords[1]); - - SFG_player.camera.height = - SFG_floorHeightAt(e2.coords[0],e2.coords[1]) + - RCL_CAMERA_COLL_HEIGHT_BELOW; - - SFG_currentLevel.itemRecords[j] |= SFG_ITEM_RECORD_ACTIVE_MASK; - /* ^ we have to make the new teleport immediately active so - that it will immediately collide */ - - SFG_player.justTeleported = 1; - - SFG_playGameSound(4,255); - SFG_processEvent(SFG_EVENT_PLAYER_TELEPORTS,0); - - break; - } - } - } - } - } - } // item collision check - - if (!collidesWithTeleport) - SFG_player.justTeleported = 0; - -#if SFG_PREVIEW_MODE - SFG_player.camera.position.x += - SFG_PREVIEW_MODE_SPEED_MULTIPLIER * moveOffset.x; - - SFG_player.camera.position.y += - SFG_PREVIEW_MODE_SPEED_MULTIPLIER * moveOffset.y; - - SFG_player.camera.height += - SFG_PREVIEW_MODE_SPEED_MULTIPLIER * SFG_player.verticalSpeed; -#else - RCL_moveCameraWithCollision(&(SFG_player.camera),moveOffset, - verticalOffset,SFG_floorCollisionHeightAt,SFG_ceilingHeightAt,1,1); - - SFG_player.previousVerticalSpeed = SFG_player.verticalSpeed; - - RCL_Unit limit = RCL_max(RCL_max(0,verticalOffset),SFG_player.verticalSpeed); - - SFG_player.verticalSpeed = - RCL_min(limit,SFG_player.camera.height - previousHeight); - /* ^ By "limit" we assure height increase caused by climbing a step doesn't - add vertical velocity. */ -#endif - -#if SFG_PREVIEW_MODE == 0 - if ( - SFG_keyIsDown(SFG_KEY_B) && - !SFG_keyIsDown(SFG_KEY_C) && - (SFG_player.weaponCooldownFrames == 0)) - { - /* Player attack/shoot/fire, this has to be done AFTER the player is moved, - otherwise he could shoot himself while running forward. */ - - uint8_t ammo, projectileCount, canShoot; - - SFG_getPlayerWeaponInfo(&ammo,&projectileCount,&canShoot); - - if (canShoot) - { - uint8_t sound; - - switch (SFG_player.weapon) - { - case SFG_WEAPON_KNIFE: sound = 255; break; - case SFG_WEAPON_ROCKET_LAUNCHER: - case SFG_WEAPON_SHOTGUN: sound = 2; break; - case SFG_WEAPON_PLASMAGUN: - case SFG_WEAPON_SOLUTION: sound = 4; break; - default: sound = 0; break; - } - - if (sound != 255) - SFG_playGameSound(sound,255); - - if (ammo != SFG_AMMO_NONE) - SFG_player.ammo[ammo] -= projectileCount; - - uint8_t projectile; - - switch (SFG_GET_WEAPON_FIRE_TYPE(SFG_player.weapon)) - { - case SFG_WEAPON_FIRE_TYPE_PLASMA: - projectile = SFG_PROJECTILE_PLASMA; - break; - - case SFG_WEAPON_FIRE_TYPE_FIREBALL: - projectile = SFG_PROJECTILE_FIREBALL; - break; - - case SFG_WEAPON_FIRE_TYPE_BULLET: - projectile = SFG_PROJECTILE_BULLET; - break; - - case SFG_WEAPON_FIRE_TYPE_MELEE: - projectile = SFG_PROJECTILE_NONE; - break; - - default: - projectile = 255; - break; - } - - if (projectile != SFG_PROJECTILE_NONE) - { - uint16_t angleAdd = SFG_PROJECTILE_SPREAD_ANGLE / (projectileCount + 1); - - RCL_Unit direction = - (SFG_player.camera.direction - SFG_PROJECTILE_SPREAD_ANGLE / 2) - + angleAdd; - - RCL_Unit projectileSpeed = SFG_GET_PROJECTILE_SPEED_UPS(projectile); - - /* Vertical speed will be either determined by autoaim (if shearing is - off) or the camera shear value. */ - RCL_Unit verticalSpeed = (SFG_game.settings & 0x04) ? - (SFG_player.camera.shear * projectileSpeed * 2) / // only approximate - SFG_CAMERA_MAX_SHEAR_PIXELS - : - (projectileSpeed * SFG_autoaimVertically()) / RCL_UNITS_PER_SQUARE; - - for (uint8_t i = 0; i < projectileCount; ++i) - { - SFG_launchProjectile( - projectile, - SFG_player.camera.position, - SFG_player.camera.height, - RCL_angleToDirection(direction), - verticalSpeed, - SFG_PROJECTILE_SPAWN_OFFSET - ); - - direction += angleAdd; - } - } - else - { - // player's melee attack - - for (uint16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - { - SFG_MonsterRecord *m = &(SFG_currentLevel.monsterRecords[i]); - - uint8_t state = SFG_MR_STATE(*m); - - if ((state == SFG_MONSTER_STATE_INACTIVE) || - (state == SFG_MONSTER_STATE_DEAD)) - continue; - - RCL_Unit pX, pY, pZ; - SFG_getMonsterWorldPosition(m,&pX,&pY,&pZ); - - if (SFG_taxicabDistance(pX,pY,pZ, - SFG_player.camera.position.x, - SFG_player.camera.position.y, - SFG_player.camera.height) > SFG_MELEE_RANGE) - continue; - - RCL_Vector2D toMonster; - - toMonster.x = pX - SFG_player.camera.position.x; - toMonster.y = pY - SFG_player.camera.position.y; - - if (RCL_vectorsAngleCos(SFG_player.direction,toMonster) >= - (RCL_UNITS_PER_SQUARE - SFG_PLAYER_MELEE_ANGLE)) - { - SFG_monsterChangeHealth(m, - -1 * SFG_getDamageValue(SFG_WEAPON_FIRE_TYPE_MELEE)); - - SFG_createDust(pX,pY,pZ); - - break; - } - } - } - - SFG_player.weaponCooldownFrames = - RCL_max( - SFG_GET_WEAPON_FIRE_COOLDOWN_FRAMES(SFG_player.weapon), - SFG_MIN_WEAPON_COOLDOWN_FRAMES); - - SFG_getPlayerWeaponInfo(&ammo,&projectileCount,&canShoot); - - if (!canShoot) - { - // No more ammo, switch to the second strongest weapon. - - SFG_playerRotateWeapon(1); - - uint8_t previousWeapon = SFG_player.weapon; - - SFG_playerRotateWeapon(0); - - if (previousWeapon > SFG_player.weapon) - SFG_playerRotateWeapon(1); - } - } // endif: has enough ammo? - } // attack -#endif // SFG_PREVIEW_MODE == 0 - - SFG_player.squarePosition[0] = - SFG_player.camera.position.x / RCL_UNITS_PER_SQUARE; - - SFG_player.squarePosition[1] = - SFG_player.camera.position.y / RCL_UNITS_PER_SQUARE; - - SFG_currentLevel.mapRevealMask |= - SFG_getMapRevealBit( - SFG_player.squarePosition[0], - SFG_player.squarePosition[1]); - - if ( // squeezer check - (SFG_ceilingHeightAt( - SFG_player.squarePosition[0],SFG_player.squarePosition[1]) - - SFG_floorHeightAt( - SFG_player.squarePosition[0],SFG_player.squarePosition[1])) - < - (RCL_CAMERA_COLL_HEIGHT_ABOVE + RCL_CAMERA_COLL_HEIGHT_BELOW)) - { - SFG_LOG("player is squeezed"); - SFG_player.health = 0; - } - - if (SFG_player.weapon != currentWeapon) // if weapon switched, start cooldown - SFG_player.weaponCooldownFrames = - SFG_GET_WEAPON_FIRE_COOLDOWN_FRAMES(SFG_player.weapon) / 2; - -#if SFG_IMMORTAL == 0 - if (SFG_player.health == 0) - { - SFG_LOG("player dies"); - SFG_levelEnds(); - SFG_processEvent(SFG_EVENT_VIBRATE,0); - SFG_processEvent(SFG_EVENT_PLAYER_DIES,0); - SFG_setGameState(SFG_GAME_STATE_LOSE); - } -#endif -} - -/** - This function defines which items are displayed in the menu. -*/ -uint8_t SFG_getMenuItem(uint8_t index) -{ - uint8_t current = 0; - - while (1) // find first legitimate item - { - if ( // skip non-legitimate items - ((current <= SFG_MENU_ITEM_MAP) && (SFG_currentLevel.levelPointer == 0)) - || ((current == SFG_MENU_ITEM_LOAD) && ((SFG_game.save[0] >> 4) == 0x0f))) - { - current++; - continue; - } - - if (index == 0) - return (current <= (SFG_MENU_ITEM_EXIT - (SFG_CAN_EXIT ? 0 : 1)) - ) ? current : SFG_MENU_ITEM_NONE; - - current++; - index--; - } - - return SFG_MENU_ITEM_NONE; -} - -void SFG_gameStepMenu() -{ - uint8_t menuItems = 0; - - while (SFG_getMenuItem(menuItems) != SFG_MENU_ITEM_NONE) - menuItems++; - - uint8_t item = SFG_getMenuItem(SFG_game.selectedMenuItem); - - if (SFG_keyRegisters(SFG_KEY_DOWN) && - (SFG_game.selectedMenuItem < menuItems - 1)) - { - SFG_game.selectedMenuItem++; - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - } - else if (SFG_keyRegisters(SFG_KEY_UP) && (SFG_game.selectedMenuItem > 0)) - { - SFG_game.selectedMenuItem--; - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - } - else if (SFG_keyJustPressed(SFG_KEY_A)) - { - switch (item) - { - case SFG_MENU_ITEM_PLAY: - for (uint8_t i = 6; i < SFG_SAVE_SIZE; ++i) // reset totals in save - SFG_game.save[i] = 0; - - if (SFG_game.selectedLevel == 0) - SFG_setGameState(SFG_GAME_STATE_INTRO); - else - SFG_setAndInitLevel(SFG_game.selectedLevel); - - break; - - case SFG_MENU_ITEM_LOAD: - { - SFG_gameLoad(); - - uint8_t saveBackup[SFG_SAVE_SIZE]; - - for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i) - saveBackup[i] = SFG_game.save[i]; - - SFG_setAndInitLevel(SFG_game.save[0] >> 4); - - for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i) - SFG_game.save[i] = saveBackup[i]; - - SFG_player.health = SFG_game.save[2]; - SFG_player.ammo[0] = SFG_game.save[3]; - SFG_player.ammo[1] = SFG_game.save[4]; - SFG_player.ammo[2] = SFG_game.save[5]; - - SFG_playerRotateWeapon(0); // this chooses weapon with ammo available - break; - } - - case SFG_MENU_ITEM_CONTINUE: - SFG_setGameState(SFG_GAME_STATE_PLAYING); - break; - - case SFG_MENU_ITEM_MAP: - SFG_setGameState(SFG_GAME_STATE_MAP); - break; - - case SFG_MENU_ITEM_SOUND: - SFG_LOG("sound changed"); - - SFG_game.settings = - (SFG_game.settings & ~0x03) | ((SFG_game.settings + 1) & 0x03); - - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - - if ((SFG_game.settings & 0x02) != - ((SFG_game.settings - 1) & 0x02)) - SFG_enableMusic(SFG_game.settings & 0x02); - - SFG_game.save[1] = SFG_game.settings; - SFG_gameSave(); - - break; - - case SFG_MENU_ITEM_SHEAR: - { - uint8_t current = (SFG_game.settings >> 2) & 0x03; - - current++; - - if (current == 2) // option that doesn't make sense, skip - current++; - - SFG_game.settings = - (SFG_game.settings & ~0x0c) | ((current & 0x03) << 2); - - SFG_game.save[1] = SFG_game.settings; - SFG_gameSave(); - - break; - } - - case SFG_MENU_ITEM_EXIT: - SFG_game.continues = 0; - break; - - default: - break; - } - } - else if (item == SFG_MENU_ITEM_PLAY) - { - if (SFG_keyRegisters(SFG_KEY_RIGHT) && - (SFG_game.selectedLevel < (SFG_game.save[0] & 0x0f))) - { - SFG_game.selectedLevel++; - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - } - else if (SFG_keyRegisters(SFG_KEY_LEFT) && SFG_game.selectedLevel > 0) - { - SFG_game.selectedLevel--; - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - } - } -} - -/** - Performs one game step (logic, physics, menu, ...), happening SFG_MS_PER_FRAME - after the previous step. -*/ -void SFG_gameStep() -{ - SFG_game.soundsPlayedThisFrame = 0; - - SFG_game.blink = (SFG_game.frame / SFG_BLINK_PERIOD_FRAMES) % 2; - - for (uint8_t i = 0; i < SFG_KEY_COUNT; ++i) - if (!SFG_keyPressed(i)) - SFG_game.keyStates[i] = 0; - else if (SFG_game.keyStates[i] < 255) - SFG_game.keyStates[i]++; - - if ((SFG_currentLevel.frameStart - SFG_game.frame) % - SFG_SPRITE_ANIMATION_FRAME_DURATION == 0) - SFG_game.spriteAnimationFrame++; - - switch (SFG_game.state) - { - case SFG_GAME_STATE_PLAYING: - SFG_gameStepPlaying(); - break; - - case SFG_GAME_STATE_MENU: - SFG_gameStepMenu(); - break; - - case SFG_GAME_STATE_LOSE: - { - // player die animation (lose) - - SFG_updateLevel(); // let monsters and other things continue moving - SFG_updatePlayerHeight(); // in case player is on elevator - - int32_t t = SFG_game.frameTime - SFG_game.stateChangeTime; - - RCL_Unit h = SFG_floorHeightAt(SFG_player.squarePosition[0], - SFG_player.squarePosition[1]); - - SFG_player.camera.height = - RCL_max(h,h + ((SFG_LOSE_ANIMATION_DURATION - t) * - RCL_CAMERA_COLL_HEIGHT_BELOW) / SFG_LOSE_ANIMATION_DURATION); - - SFG_player.camera.shear = - RCL_min(SFG_CAMERA_MAX_SHEAR_PIXELS / 4, - (t * (SFG_CAMERA_MAX_SHEAR_PIXELS / 4)) / SFG_LOSE_ANIMATION_DURATION); - - if (t > SFG_LOSE_ANIMATION_DURATION && - (SFG_keyIsDown(SFG_KEY_A) || SFG_keyIsDown(SFG_KEY_B))) - { - for (uint8_t i = 6; i < SFG_SAVE_SIZE; ++i) - SFG_game.save[i] = 0; - - SFG_setAndInitLevel(SFG_currentLevel.levelNumber); - } - - break; - } - - case SFG_GAME_STATE_WIN: - { - // win animation - - SFG_updateLevel(); - - int32_t t = SFG_game.frameTime - SFG_game.stateChangeTime; - - if (t > SFG_WIN_ANIMATION_DURATION) - { - if (SFG_currentLevel.levelNumber == (SFG_NUMBER_OF_LEVELS - 1)) - { - if (SFG_keyIsDown(SFG_KEY_A)) - SFG_setGameState(SFG_GAME_STATE_OUTRO); - } - else if (SFG_keyIsDown(SFG_KEY_RIGHT) || - SFG_keyIsDown(SFG_KEY_LEFT)) - { - SFG_setAndInitLevel(SFG_currentLevel.levelNumber + 1); - - SFG_player.health = SFG_game.save[2]; - SFG_player.ammo[0] = SFG_game.save[3]; - SFG_player.ammo[1] = SFG_game.save[4]; - SFG_player.ammo[2] = SFG_game.save[5]; - - if (SFG_keyIsDown(SFG_KEY_RIGHT) && SFG_game.saved != SFG_CANT_SAVE) - { - // save the current position - SFG_gameSave(); - SFG_game.saved = 1; - } - } - } - - break; - } - - case SFG_GAME_STATE_MAP: - if (SFG_keyIsDown(SFG_KEY_B)) - SFG_setGameState(SFG_GAME_STATE_MENU); - - break; - - case SFG_GAME_STATE_INTRO: - if (SFG_keyJustPressed(SFG_KEY_A) || SFG_keyJustPressed(SFG_KEY_B)) - SFG_setAndInitLevel(0); - - break; - - case SFG_GAME_STATE_OUTRO: - if (((SFG_game.frameTime - SFG_game.stateChangeTime) > - SFG_STORYTEXT_DURATION) && (SFG_keyIsDown(SFG_KEY_A) || - SFG_keyIsDown(SFG_KEY_B))) - { - SFG_setGameState(SFG_GAME_STATE_MENU); - SFG_playGameSound(3,SFG_MENU_CLICK_VOLUME); - } - - break; - - case SFG_GAME_STATE_LEVEL_START: - { - SFG_updateLevel(); - SFG_updatePlayerHeight(); // in case player is on elevator - - if (SFG_currentLevel.levelNumber > (SFG_game.save[0] & 0x0f)) - { - SFG_game.save[0] = // save progress - (SFG_game.save[0] & 0xf0) | SFG_currentLevel.levelNumber; - SFG_gameSave(); - } - - int16_t x = 0, y = 0; - - SFG_getMouseOffset(&x,&y); // this keeps centering the mouse - - if ((SFG_game.frameTime - SFG_game.stateChangeTime) >= - SFG_LEVEL_START_DURATION) - SFG_setGameState(SFG_GAME_STATE_PLAYING); - - break; - } - - default: - break; - } -} - -void SFG_fillRectangle( - uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t color) -{ - if ((x + width > SFG_GAME_RESOLUTION_X) || - (y + height > SFG_GAME_RESOLUTION_Y)) - return; - - for (uint16_t j = y; j < y + height; ++j) - for (uint16_t i = x; i < x + width; ++i) - SFG_setGamePixel(i,j,color); -} - -static inline void SFG_clearScreen(uint8_t color) -{ - SFG_fillRectangle(0,0,SFG_GAME_RESOLUTION_X, - SFG_GAME_RESOLUTION_Y,color); -} - -/** - Draws fullscreen map of the current level. -*/ -void SFG_drawMap() -{ - SFG_clearScreen(0); - - uint16_t maxJ = - (SFG_MAP_PIXEL_SIZE * SFG_MAP_SIZE) < SFG_GAME_RESOLUTION_Y ? - (SFG_MAP_SIZE) : (SFG_GAME_RESOLUTION_Y / SFG_MAP_PIXEL_SIZE); - - uint16_t maxI = - (SFG_MAP_PIXEL_SIZE * SFG_MAP_SIZE) < SFG_GAME_RESOLUTION_X ? - (SFG_MAP_SIZE) : (SFG_GAME_RESOLUTION_X / SFG_MAP_PIXEL_SIZE); - - uint16_t topLeftX = - (SFG_GAME_RESOLUTION_X - (maxI * SFG_MAP_PIXEL_SIZE)) / 2; - - uint16_t topLeftY = - (SFG_GAME_RESOLUTION_Y - (maxJ * SFG_MAP_PIXEL_SIZE)) / 2; - - uint16_t x; - uint16_t y = topLeftY; - - uint8_t playerColor = - SFG_game.blink ? SFG_MAP_PLAYER_COLOR1 : SFG_MAP_PLAYER_COLOR2; - - for (int16_t j = 0; j < maxJ; ++j) - { - x = topLeftX; - - for (int16_t i = maxI - 1; i >= 0; --i) - { - uint8_t color = 0; // init with non-revealed color - - if (SFG_currentLevel.mapRevealMask & SFG_getMapRevealBit(i,j)) - { - uint8_t properties; - - SFG_TileDefinition tile = - SFG_getMapTile(SFG_currentLevel.levelPointer,i,j,&properties); - - color = playerColor; // start with player color - - if (i != SFG_player.squarePosition[0] || - j != SFG_player.squarePosition[1]) - { - if (properties == SFG_TILE_PROPERTY_ELEVATOR) - color = SFG_MAP_ELEVATOR_COLOR; - else if (properties == SFG_TILE_PROPERTY_SQUEEZER) - color = SFG_MAP_SQUEEZER_COLOR; - else if (properties == SFG_TILE_PROPERTY_DOOR) - color = SFG_MAP_DOOR_COLOR; - else - { - color = 0; - - uint8_t c = SFG_TILE_CEILING_HEIGHT(tile) / 4; - - if (c != 0) - color = (SFG_TILE_FLOOR_HEIGHT(tile) % 8 + 3) * 8 + c - 1; - } - } - } - - for (int_fast16_t k = 0; k < SFG_MAP_PIXEL_SIZE; ++k) - for (int_fast16_t l = 0; l < SFG_MAP_PIXEL_SIZE; ++l) - SFG_setGamePixel(x + l, y + k,color); - - x += SFG_MAP_PIXEL_SIZE; - } - - y += SFG_MAP_PIXEL_SIZE; - } -} - -/** - Draws fullscreen story text (intro/outro). -*/ -void SFG_drawStoryText() -{ - const char *text = SFG_outroText; - uint16_t textColor = 23; - uint8_t clearColor = 9; - uint8_t sprite = 18; - - if (SFG_currentLevel.levelNumber != (SFG_NUMBER_OF_LEVELS - 1)) // intro? - { - text = SFG_introText; - textColor = 7; - clearColor = 0; - sprite = SFG_game.blink * 2; - } - - SFG_clearScreen(clearColor); - - SFG_blitImage(SFG_monsterSprites + sprite * SFG_TEXTURE_STORE_SIZE, - (SFG_GAME_RESOLUTION_X - SFG_TEXTURE_SIZE * SFG_FONT_SIZE_SMALL) / 2, - SFG_GAME_RESOLUTION_Y - (SFG_TEXTURE_SIZE + 3) * SFG_FONT_SIZE_SMALL, - SFG_FONT_SIZE_SMALL); - - uint16_t textLen = 0; - - while (text[textLen] != 0) - textLen++; - - uint16_t drawLen = - RCL_min(textLen, - ((SFG_game.frameTime - SFG_game.stateChangeTime) * textLen) / - SFG_STORYTEXT_DURATION + 1); - -#define CHAR_SIZE (SFG_FONT_SIZE_SMALL * (SFG_FONT_CHARACTER_SIZE + 1)) -#define LINE_LENGTH (SFG_GAME_RESOLUTION_X / CHAR_SIZE) -#define MAX_LENGTH (((SFG_GAME_RESOLUTION_Y / CHAR_SIZE) / 2) * LINE_LENGTH ) - - uint16_t drawShift = (drawLen < MAX_LENGTH) ? 0 : - (((drawLen - MAX_LENGTH) / LINE_LENGTH) * LINE_LENGTH); - -#undef CHAR_SIZE -#undef LINE_LENGTH -#undef MAX_LENGTH - - text += drawShift; - drawLen -= drawShift; - - SFG_drawText(text,SFG_HUD_MARGIN,SFG_HUD_MARGIN,SFG_FONT_SIZE_SMALL,textColor, - drawLen,SFG_GAME_RESOLUTION_X - SFG_HUD_MARGIN); -} - -/** - Draws a number as text on screen, returns the number of characters drawn. -*/ -uint8_t SFG_drawNumber( - int16_t number, - uint16_t x, - uint16_t y, - uint8_t size, - uint8_t color) -{ - char text[7]; - - text[6] = 0; // terminate the string - - int8_t positive = 1; - - if (number < 0) - { - positive = 0; - number *= -1; - } - - int8_t position = 5; - - while (1) - { - text[position] = '0' + number % 10; - number /= 10; - - position--; - - if (number == 0 || position == 0) - break; - } - - if (!positive) - { - text[position] = '-'; - position--; - } - - SFG_drawText(text + position + 1,x,y,size,color,0,0); - - return 5 - position; -} - -/** - Draws a screen border that indicates something is happening, e.g. being hurt - or taking an item. -*/ -void SFG_drawIndicationBorder(uint16_t width, uint8_t color) -{ - for (int_fast16_t j = 0; j < width; ++j) - { - uint16_t j2 = SFG_GAME_RESOLUTION_Y - 1 - j; - - for (int_fast16_t i = 0; i < SFG_GAME_RESOLUTION_X; ++i) - { - if ((i & 0x01) == (j & 0x01)) - { - SFG_setGamePixel(i,j,color); - SFG_setGamePixel(i,j2,color); - } - } - } - - for (int_fast16_t i = 0; i < width; ++i) - { - uint16_t i2 = SFG_GAME_RESOLUTION_X - 1 - i; - - for (int_fast16_t j = width; j < SFG_GAME_RESOLUTION_Y - width; ++j) - { - if ((i & 0x01) == (j & 0x01)) - { - SFG_setGamePixel(i,j,color); - SFG_setGamePixel(i2,j,color); - } - } - } -} - -/** - Draws the player weapon, includes handling the shoot animation. -*/ -void SFG_drawWeapon(int16_t bobOffset) -{ - uint32_t animationLength = - RCL_max(SFG_MIN_WEAPON_COOLDOWN_FRAMES, - SFG_GET_WEAPON_FIRE_COOLDOWN_FRAMES(SFG_player.weapon)); - - uint32_t shotAnimationFrame = - animationLength - SFG_player.weaponCooldownFrames; - - bobOffset -= SFG_HUD_BAR_HEIGHT; - - uint8_t fireType = SFG_GET_WEAPON_FIRE_TYPE(SFG_player.weapon); - - if (shotAnimationFrame < animationLength) - { - if (fireType == SFG_WEAPON_FIRE_TYPE_MELEE) - { - bobOffset = shotAnimationFrame < animationLength / 2 ? 0 : - 2 * SFG_WEAPONBOB_OFFSET_PIXELS ; - } - else - { - bobOffset += - ((animationLength - shotAnimationFrame) * SFG_WEAPON_IMAGE_SCALE * 20) - / animationLength; - - if ( - ((fireType == SFG_WEAPON_FIRE_TYPE_FIREBALL) || - (fireType == SFG_WEAPON_FIRE_TYPE_BULLET)) && - shotAnimationFrame < animationLength / 2) - SFG_blitImage(SFG_effectSprites, - SFG_WEAPON_IMAGE_POSITION_X, - SFG_WEAPON_IMAGE_POSITION_Y - - (SFG_TEXTURE_SIZE / 3) * SFG_WEAPON_IMAGE_SCALE + bobOffset, - SFG_WEAPON_IMAGE_SCALE); - } - } - - SFG_blitImage(SFG_weaponImages + SFG_player.weapon * SFG_TEXTURE_STORE_SIZE, - SFG_WEAPON_IMAGE_POSITION_X, - SFG_WEAPON_IMAGE_POSITION_Y + bobOffset - 1, - SFG_WEAPON_IMAGE_SCALE); -} - -uint16_t SFG_textLen(const char *text) -{ - uint16_t result = 0; - - while (text[result] != 0) - result++; - - return result; -} - -static inline uint16_t SFG_characterSize(uint8_t textSize) -{ - return (SFG_FONT_CHARACTER_SIZE + 1) * textSize; -} - -static inline uint16_t - SFG_textHorizontalSize(const char *text, uint8_t textSize) -{ - return (SFG_textLen(text) * SFG_characterSize(textSize)); -} - -void SFG_drawMenu() -{ - #define BACKGROUND_SCALE (SFG_GAME_RESOLUTION_X / (4 * SFG_TEXTURE_SIZE ) ) - - #if BACKGROUND_SCALE == 0 - #undef BACKGROUND_SCALE - #define BACKGROUND_SCALE 1 - #endif - - #define SCROLL_PIXELS_PER_FRAME ((64 * SFG_GAME_RESOLUTION_X) / (8 * SFG_FPS)) - - #if SCROLL_PIXELS_PER_FRAME == 0 - #undef SCROLL_PIXELS_PER_FRAME - #define SCROLL_PIXELS_PER_FRAME 1 - #endif - - #define SELECTION_START_X ((SFG_GAME_RESOLUTION_X - 12 * SFG_FONT_SIZE_MEDIUM\ - * (SFG_FONT_CHARACTER_SIZE + 1)) / 2) - - uint16_t scroll = (SFG_game.frame * SCROLL_PIXELS_PER_FRAME) / 64; - - for (uint16_t y = 0; y < SFG_GAME_RESOLUTION_Y; ++y) - for (uint16_t x = 0; x < SFG_GAME_RESOLUTION_X; ++x) - SFG_setGamePixel(x,y, - (y >= (SFG_TEXTURE_SIZE * BACKGROUND_SCALE)) ? 0 : - SFG_getTexel(SFG_backgroundImages,((x + scroll) / BACKGROUND_SCALE) - % SFG_TEXTURE_SIZE,y / BACKGROUND_SCALE)); - - uint16_t y = SFG_characterSize(SFG_FONT_SIZE_MEDIUM); - - SFG_blitImage(SFG_logoImage, - SFG_GAME_RESOLUTION_X / 2 - 16 * SFG_FONT_SIZE_MEDIUM,y, - SFG_FONT_SIZE_MEDIUM); - -#if SFG_GAME_RESOLUTION_Y > 50 - y += 32 * SFG_FONT_SIZE_MEDIUM + SFG_characterSize(SFG_FONT_SIZE_MEDIUM); -#else - y = 2; -#endif - - uint8_t i = 0; - - while (1) // draw menu items - { - uint8_t item = SFG_getMenuItem(i); - - if (item == SFG_MENU_ITEM_NONE) - break; - -#if SFG_GAME_RESOLUTION_Y < 70 - // with low resolution only display the selected item - - if (i != SFG_game.selectedMenuItem) - { - i++; - continue; - } -#endif - - const char *text = SFG_menuItemTexts[item]; - uint8_t textLen = SFG_textLen(text); - - uint16_t drawX = (SFG_GAME_RESOLUTION_X - - SFG_textHorizontalSize(text,SFG_FONT_SIZE_MEDIUM)) / 2; - - uint8_t textColor = 7; - - if (i != SFG_game.selectedMenuItem) - textColor = 23; - else - SFG_fillRectangle( // menu item highlight - SELECTION_START_X, - y - SFG_FONT_SIZE_MEDIUM, - SFG_GAME_RESOLUTION_X - SELECTION_START_X * 2, - SFG_characterSize(SFG_FONT_SIZE_MEDIUM),2); - - SFG_drawText(text,drawX,y,SFG_FONT_SIZE_MEDIUM,textColor,0,0); - - if ((item == SFG_MENU_ITEM_PLAY || item == SFG_MENU_ITEM_SOUND - || item == SFG_MENU_ITEM_SHEAR) && - ((i != SFG_game.selectedMenuItem) || SFG_game.blink)) - { - uint32_t x = - drawX + SFG_characterSize(SFG_FONT_SIZE_MEDIUM) * (textLen + 1); - - uint8_t c = 93; - - if (item == SFG_MENU_ITEM_PLAY) - SFG_drawNumber(SFG_game.selectedLevel + 1,x,y,SFG_FONT_SIZE_MEDIUM,c); - else if (item == SFG_MENU_ITEM_SHEAR) - { - uint8_t n = (SFG_game.settings >> 2) & 0x03; - - SFG_drawNumber(n == 3 ? 2 : n,x,y,SFG_FONT_SIZE_MEDIUM,c); - } - else - { - char settingText[3] = " "; - - settingText[0] = (SFG_game.settings & 0x01) ? 'S' : ' '; - settingText[1] = (SFG_game.settings & 0x02) ? 'M' : ' '; - - SFG_drawText(settingText,x,y,SFG_FONT_SIZE_MEDIUM,c,0,0); - } - } - - y += SFG_characterSize(SFG_FONT_SIZE_MEDIUM) + SFG_FONT_SIZE_MEDIUM; - i++; - } - - SFG_drawText(SFG_VERSION_STRING " CC0",SFG_HUD_MARGIN,SFG_GAME_RESOLUTION_Y - - SFG_HUD_MARGIN - SFG_FONT_SIZE_SMALL * SFG_FONT_CHARACTER_SIZE, - SFG_FONT_SIZE_SMALL,4,0,0); - - #if SFG_OS_IS_MALWARE - if (SFG_game.blink) - SFG_drawText(SFG_MALWARE_WARNING,SFG_HUD_MARGIN,SFG_HUD_MARGIN, - SFG_FONT_SIZE_MEDIUM,95,0,0); - #endif - - #undef MAX_ITEMS - #undef BACKGROUND_SCALE - #undef SCROLL_PIXELS_PER_FRAME -} - -void SFG_drawWinOverlay() -{ - uint32_t t = RCL_min(SFG_WIN_ANIMATION_DURATION, - SFG_game.frameTime - SFG_game.stateChangeTime); - - uint32_t t2 = RCL_min(t,SFG_WIN_ANIMATION_DURATION / 4); - - #define STRIP_HEIGHT (SFG_GAME_RESOLUTION_Y / 2) - #define INNER_STRIP_HEIGHT ((STRIP_HEIGHT * 3) / 4) - #define STRIP_START ((SFG_GAME_RESOLUTION_Y - STRIP_HEIGHT) / 2) - - RCL_Unit l = (t2 * STRIP_HEIGHT * 4) / SFG_WIN_ANIMATION_DURATION; - - for (uint16_t y = STRIP_START; y < STRIP_START + l; ++y) - for (uint16_t x = 0; x < SFG_GAME_RESOLUTION_X; ++x) - SFG_setGamePixel(x,y, - RCL_abs(y - (SFG_GAME_RESOLUTION_Y / 2)) <= (INNER_STRIP_HEIGHT / 2) ? - 0 : 172); - - char textLine[] = "level done"; - - uint16_t y = SFG_GAME_RESOLUTION_Y / 2 - - ((STRIP_HEIGHT + INNER_STRIP_HEIGHT) / 2) / 2; - - uint16_t x = (SFG_GAME_RESOLUTION_X - - SFG_textHorizontalSize(textLine,SFG_FONT_SIZE_BIG)) / 2; - - SFG_drawText(textLine,x,y,SFG_FONT_SIZE_BIG,7 + SFG_game.blink * 95,255,0); - - uint32_t timeTotal = SFG_SAVE_TOTAL_TIME; - - // don't show totals in level 1: - uint8_t blink = (SFG_game.blink) && (SFG_currentLevel.levelNumber != 0) - && (timeTotal != 0); - - if (t >= (SFG_WIN_ANIMATION_DURATION / 2)) - { - y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE; - x = SFG_HUD_MARGIN; - - #define CHAR_SIZE (SFG_FONT_SIZE_SMALL * SFG_FONT_CHARACTER_SIZE) - - uint32_t time = blink ? timeTotal : SFG_currentLevel.completionTime10sOfS; - - x += SFG_drawNumber(time / 10,x,y,SFG_FONT_SIZE_SMALL,7) * - CHAR_SIZE + SFG_FONT_SIZE_SMALL; - - char timeRest[5] = ".X s"; - - timeRest[1] = '0' + (time % 10); - - SFG_drawText(timeRest,x,y,SFG_FONT_SIZE_SMALL,7,4,0); - - x = SFG_HUD_MARGIN; - y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE; - - if (blink) - { - x += (SFG_drawNumber(SFG_game.save[10] + SFG_game.save[11] * 256,x,y, - SFG_FONT_SIZE_SMALL,7) + 1) * CHAR_SIZE; - } - else - { - x += SFG_drawNumber(SFG_currentLevel.monstersDead,x,y, - SFG_FONT_SIZE_SMALL,7) * CHAR_SIZE; - - SFG_drawText("/",x,y,SFG_FONT_SIZE_SMALL,7,1,0); - - x += CHAR_SIZE; - - x += (SFG_drawNumber(SFG_currentLevel.monsterRecordCount,x,y, - SFG_FONT_SIZE_SMALL,7) + 1) * CHAR_SIZE; - } - - SFG_drawText(SFG_TEXT_KILLS,x,y,SFG_FONT_SIZE_SMALL,7,255,0); - - if ((t >= (SFG_WIN_ANIMATION_DURATION - 1)) && - (SFG_currentLevel.levelNumber != (SFG_NUMBER_OF_LEVELS - 1))) - { - y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE; - - SFG_drawText(SFG_TEXT_SAVE_PROMPT, - (SFG_GAME_RESOLUTION_X - SFG_textHorizontalSize(SFG_TEXT_SAVE_PROMPT, - SFG_FONT_SIZE_MEDIUM)) / 2,y,SFG_FONT_SIZE_MEDIUM,7,255,0); - } - - #undef CHAR_SIZE - } - - #undef STRIP_HEIGHT - #undef STRIP_START - #undef INNER_STRIP_HEIGHT -} - -void SFG_draw() -{ -#if SFG_BACKGROUND_BLUR != 0 - SFG_backgroundBlurIndex = 0; -#endif - - if (SFG_game.state == SFG_GAME_STATE_MENU) - { - SFG_drawMenu(); - return; - } - - if (SFG_game.state == SFG_GAME_STATE_INTRO || - SFG_game.state == SFG_GAME_STATE_OUTRO) - { - SFG_drawStoryText(); - return; - } - - if (SFG_keyPressed(SFG_KEY_MAP) || (SFG_game.state == SFG_GAME_STATE_MAP)) - { - SFG_drawMap(); - } - else - { - for (int_fast16_t i = 0; i < SFG_Z_BUFFER_SIZE; ++i) - SFG_game.zBuffer[i] = 255; - - int16_t weaponBobOffset = 0; - -#if SFG_HEADBOB_ENABLED - RCL_Unit headBobOffset = 0; - -#if SFG_HEADBOB_SHEAR != 0 - int16_t headBobShearOffset; -#endif - - if (SFG_game.state != SFG_GAME_STATE_LOSE) - { - RCL_Unit bobSin = RCL_sin(SFG_player.headBobFrame); - - headBobOffset = (bobSin * SFG_HEADBOB_OFFSET) / RCL_UNITS_PER_SQUARE; - -#if SFG_HEADBOB_SHEAR != 0 - headBobShearOffset = (bobSin * SFG_HEADBOB_SHEAR) / RCL_UNITS_PER_SQUARE; - SFG_player.camera.shear += headBobShearOffset; -#endif - - weaponBobOffset = - (bobSin * SFG_WEAPONBOB_OFFSET_PIXELS) / (RCL_UNITS_PER_SQUARE) + - SFG_WEAPONBOB_OFFSET_PIXELS; - } - else - { - // player die animation - - int32_t t = SFG_game.frameTime - SFG_game.stateChangeTime; - - weaponBobOffset = (SFG_WEAPON_IMAGE_SCALE * SFG_TEXTURE_SIZE * t) / - SFG_LOSE_ANIMATION_DURATION; - } - - // add head bob just for the rendering (we'll will substract it back later) - - SFG_player.camera.height += headBobOffset; -#endif // headbob enabled? - - RCL_renderComplex( - SFG_player.camera, - SFG_floorHeightAt, - SFG_ceilingHeightAt, - SFG_texturesAt, - SFG_game.rayConstraints); - - // draw sprites: - - // monster sprites: - for (int_fast16_t i = 0; i < SFG_currentLevel.monsterRecordCount; ++i) - { - SFG_MonsterRecord m = SFG_currentLevel.monsterRecords[i]; - - uint8_t state = SFG_MR_STATE(m); - - if (state != SFG_MONSTER_STATE_INACTIVE) - { - RCL_Vector2D worldPosition; - - worldPosition.x = SFG_MONSTER_COORD_TO_RCL_UNITS(m.coords[0]); - worldPosition.y = SFG_MONSTER_COORD_TO_RCL_UNITS(m.coords[1]); - - uint8_t spriteSize = SFG_GET_MONSTER_SPRITE_SIZE( - SFG_MONSTER_TYPE_TO_INDEX(SFG_MR_TYPE(m))); - - RCL_Unit worldHeight = - SFG_floorHeightAt( - SFG_MONSTER_COORD_TO_SQUARES(m.coords[0]), - SFG_MONSTER_COORD_TO_SQUARES(m.coords[1])) - + - SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(spriteSize); - - RCL_PixelInfo p = - RCL_mapToScreen(worldPosition,worldHeight,SFG_player.camera); - - if (p.depth > 0 && - SFG_spriteIsVisible(worldPosition,worldHeight,spriteSize)) - { - const uint8_t *s = - SFG_getMonsterSprite( - SFG_MR_TYPE(m), - state, - SFG_game.spriteAnimationFrame & 0x01); - - SFG_drawScaledSprite(s, - p.position.x * SFG_RAYCASTING_SUBSAMPLE,p.position.y, - RCL_perspectiveScaleVertical( - SFG_SPRITE_SIZE_PIXELS(spriteSize), - p.depth), - p.depth / (RCL_UNITS_PER_SQUARE * 2),p.depth); - } - } - } - - // item sprites: - for (int_fast16_t i = 0; i < SFG_currentLevel.itemRecordCount; ++i) - if (SFG_currentLevel.itemRecords[i] & SFG_ITEM_RECORD_ACTIVE_MASK) - { - RCL_Vector2D worldPosition; - - SFG_LevelElement e = - SFG_currentLevel.levelPointer->elements[ - SFG_currentLevel.itemRecords[i] & ~SFG_ITEM_RECORD_ACTIVE_MASK]; - - worldPosition.x = - SFG_ELEMENT_COORD_TO_RCL_UNITS(e.coords[0]); - - worldPosition.y = - SFG_ELEMENT_COORD_TO_RCL_UNITS(e.coords[1]); - - const uint8_t *sprite; - uint8_t spriteSize; - - SFG_getItemSprite(e.type,&sprite,&spriteSize); - - if (sprite != 0) - { - RCL_Unit worldHeight = SFG_floorHeightAt(e.coords[0],e.coords[1]) - + SFG_SPRITE_SIZE_TO_HEIGHT_ABOVE_GROUND(spriteSize); - - RCL_PixelInfo p = - RCL_mapToScreen(worldPosition,worldHeight,SFG_player.camera); - - if (p.depth > 0 && - SFG_spriteIsVisible(worldPosition,worldHeight,spriteSize)) - SFG_drawScaledSprite( - sprite, - p.position.x * SFG_RAYCASTING_SUBSAMPLE,p.position.y, - RCL_perspectiveScaleVertical(SFG_SPRITE_SIZE_PIXELS(spriteSize),p.depth), - p.depth / (RCL_UNITS_PER_SQUARE * 2),p.depth); - } - } - - // projectile sprites: - for (uint8_t i = 0; i < SFG_currentLevel.projectileRecordCount; ++i) - { - SFG_ProjectileRecord *proj = &(SFG_currentLevel.projectileRecords[i]); - - if (proj->type == SFG_PROJECTILE_BULLET) - continue; // bullets aren't drawn - - RCL_Vector2D worldPosition; - - worldPosition.x = proj->position[0]; - worldPosition.y = proj->position[1]; - - RCL_PixelInfo p = - RCL_mapToScreen(worldPosition,proj->position[2],SFG_player.camera); - - const uint8_t *s = - SFG_effectSprites + proj->type * SFG_TEXTURE_STORE_SIZE; - - int16_t spriteSize = SFG_SPRITE_SIZE_PIXELS(0); - - if (proj->type == SFG_PROJECTILE_EXPLOSION || - proj->type == SFG_PROJECTILE_DUST) - { - int16_t doubleFramesToLive = - RCL_nonZero(SFG_GET_PROJECTILE_FRAMES_TO_LIVE(proj->type) / 2); - - // grow the explosion/dust sprite as an animation - spriteSize = - ( - SFG_SPRITE_SIZE_PIXELS(2) * - RCL_sin( - ((doubleFramesToLive - - proj->doubleFramesToLive) * RCL_UNITS_PER_SQUARE / 4) - / doubleFramesToLive) - ) / RCL_UNITS_PER_SQUARE; - } - - if (p.depth > 0 && - SFG_spriteIsVisible(worldPosition,proj->position[2],spriteSize)) - SFG_drawScaledSprite(s, - p.position.x * SFG_RAYCASTING_SUBSAMPLE,p.position.y, - RCL_perspectiveScaleVertical(spriteSize,p.depth), - SFG_fogValueDiminish(p.depth), - p.depth); - } - -#if SFG_HEADBOB_ENABLED - // after rendering sprites substract back the head bob offset - SFG_player.camera.height -= headBobOffset; - -#if SFG_HEADBOB_SHEAR != 0 - SFG_player.camera.shear -= headBobShearOffset; -#endif - -#endif // head bob enabled? - -#if SFG_PREVIEW_MODE == 0 - SFG_drawWeapon(weaponBobOffset); -#endif - - // draw HUD: - - // bar - - uint8_t color = 5; - - for (uint16_t j = SFG_GAME_RESOLUTION_Y - SFG_HUD_BAR_HEIGHT; - j < SFG_GAME_RESOLUTION_Y; ++j) - { - for (uint16_t i = 0; i < SFG_GAME_RESOLUTION_X; ++i) - SFG_setGamePixel(i,j,color); - - color = 2; - } - - #define TEXT_Y (SFG_GAME_RESOLUTION_Y - SFG_HUD_MARGIN - \ - SFG_FONT_CHARACTER_SIZE * SFG_FONT_SIZE_MEDIUM) - - SFG_drawNumber( // health - SFG_player.health, - SFG_HUD_MARGIN, - TEXT_Y, - SFG_FONT_SIZE_MEDIUM, - SFG_player.health > SFG_PLAYER_HEALTH_WARNING_LEVEL ? 4 : 175); - - SFG_drawNumber( // ammo - SFG_player.weapon != SFG_WEAPON_KNIFE ? - SFG_player.ammo[SFG_weaponAmmo(SFG_player.weapon)] : 0, - SFG_GAME_RESOLUTION_X - SFG_HUD_MARGIN - - (SFG_FONT_CHARACTER_SIZE + 1) * SFG_FONT_SIZE_MEDIUM * 3, - TEXT_Y, - SFG_FONT_SIZE_MEDIUM, - 4); - - for (uint8_t i = 0; i < 3; ++i) // access cards - if ( - ((SFG_player.cards >> i) | ((SFG_player.cards >> (i + 3)) - & SFG_game.blink)) & 0x01) - SFG_fillRectangle( - SFG_HUD_MARGIN + (SFG_FONT_CHARACTER_SIZE + 1) * - SFG_FONT_SIZE_MEDIUM * (5 + i), - TEXT_Y, - SFG_FONT_SIZE_MEDIUM * SFG_FONT_CHARACTER_SIZE, - SFG_FONT_SIZE_MEDIUM * SFG_FONT_CHARACTER_SIZE, - i == 0 ? 93 : (i == 1 ? 124 : 60)); - - #undef TEXT_Y - - // border indicator - - if ((SFG_game.frame - SFG_player.lastHurtFrame - <= SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES) || - (SFG_game.state == SFG_GAME_STATE_LOSE)) - SFG_drawIndicationBorder(SFG_HUD_BORDER_INDICATOR_WIDTH_PIXELS, - SFG_HUD_HURT_INDICATION_COLOR); - else if (SFG_game.frame - SFG_player.lastItemTakenFrame - <= SFG_HUD_BORDER_INDICATOR_DURATION_FRAMES) - SFG_drawIndicationBorder(SFG_HUD_BORDER_INDICATOR_WIDTH_PIXELS, - SFG_HUD_ITEM_TAKEN_INDICATION_COLOR); - - if (SFG_game.state == SFG_GAME_STATE_WIN) - SFG_drawWinOverlay(); - else if (SFG_game.state == SFG_GAME_STATE_LEVEL_START) - SFG_drawLevelStartOverlay(); - } -} - -uint8_t SFG_mainLoopBody() -{ - /* Standard deterministic game loop, independed of actual achieved FPS. - Each game logic (physics) frame is performed with the SFG_MS_PER_FRAME - delta time. */ - uint32_t timeNow = SFG_getTimeMs(); - uint32_t timeNextFrame = SFG_game.lastFrameTimeMs + SFG_MS_PER_FRAME; - - SFG_game.frameTime = timeNow; - - if (timeNow >= timeNextFrame) - { - uint32_t timeSinceLastFrame = timeNow - SFG_game.lastFrameTimeMs; - - uint8_t steps = 0; - - uint8_t previousWeapon = SFG_player.weapon; - - // perform game logic (physics etc.), for each frame - while (timeSinceLastFrame >= SFG_MS_PER_FRAME) - { - SFG_gameStep(); - - timeSinceLastFrame -= SFG_MS_PER_FRAME; - - SFG_game.frame++; - steps++; - } - - if (SFG_player.weapon != previousWeapon) - SFG_processEvent(SFG_EVENT_PLAYER_CHANGES_WEAPON,SFG_player.weapon); - - if ((steps > 1) && (SFG_game.antiSpam == 0)) - { - SFG_LOG("failed to reach target FPS! consider setting a lower value") - SFG_game.antiSpam = 30; - } - - if (SFG_game.antiSpam > 0) - SFG_game.antiSpam--; - - // render noly once - SFG_draw(); - - SFG_game.lastFrameTimeMs = timeNow; - } - else - { - SFG_sleepMs((timeNextFrame - timeNow) / 2); // wait, relieve CPU - } - - return SFG_game.continues; -} - -#undef SFG_SAVE_TOTAL_TIME - -#endif // guard diff --git a/dingux/images.h b/dingux/images.h deleted file mode 100644 index 4f7934b..0000000 --- a/dingux/images.h +++ /dev/null @@ -1,1395 +0,0 @@ -/** - @file assets.h - - This file containts assets to be used in the game. Textures are stored by - columns for cache friendliness (as rendering also happens by columns), - 4 bits per pixel, which means an index to 16 color subpalette stored at the - beginning of the image. Images can be converted to this format with the - provided pything script: - - python img2array.py -t -c -x32 -y32 -ppalette565.png image.png - - by Miloslav Ciz (drummyfish), 2019 - - Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) - plus a waiver of all other intellectual property. The goal of this work is - be and remain completely in the public domain forever, available for any use - whatsoever. -*/ - -#ifndef _SFG_IMAGES_H -#define _SFG_IMAGES_H - -#define SFG_TEXTURE_SIZE 32 - -#define SFG_TEXTURE_STORE_SIZE (16 + (SFG_TEXTURE_SIZE * SFG_TEXTURE_SIZE) / 2) - -/** - Color index which will in textures and sprites be considered transparent. -*/ -#define SFG_TRANSPARENT_COLOR 175 - -/** - Special index of an implicit texture that consists of only transparent pixels. -*/ -#define SFG_TRANSPARENT_TEXTURE 255 - -static inline uint8_t SFG_getTexel(const uint8_t *texture, uint8_t x, uint8_t y) -{ - x &= 0x1f; - y &= 0x1f; - - return SFG_PROGRAM_MEMORY_U8 (texture + - ((SFG_PROGRAM_MEMORY_U8(texture + 16 + (x * SFG_TEXTURE_SIZE + y) / 2) >> - (4 * (y % 2 == 0))) & 0x0f)); -} - -#define SFG_WALL_TEXTURE_COUNT 16 - -SFG_PROGRAM_MEMORY uint8_t - SFG_wallTextures[SFG_WALL_TEXTURE_COUNT * SFG_TEXTURE_STORE_SIZE] = -{ -// 0, white wooden planks -4,21,5,3,20,0,2,26,6,18,57,65,1,16,17,49,0,1,0,3,32,1,33,0,161,64,1,16,64,3,3, -32,0,17,16,9,32,1,17,1,161,65,1,16,78,132,35,32,0,17,16,7,32,1,32,17,240,49,0, -16,57,99,87,206,0,18,16,6,33,0,16,1,177,48,0,0,97,0,2,0,0,17,32,6,32,1,0,1,178, -48,0,0,48,0,2,0,0,17,32,7,32,17,1,0,178,48,1,0,49,0,1,0,0,1,16,3,32,18,0,0,194, -48,0,0,48,0,18,4,64,17,32,4,35,0,3,0,194,48,0,0,49,0,34,4,0,17,32,6,130,50,32, -40,242,48,1,0,49,0,18,0,0,2,32,12,85,85,85,85,81,48,2,0,49,0,33,3,0,2,16,3,32,0, -32,2,98,48,1,0,49,0,34,19,0,18,17,3,32,0,32,0,194,48,2,0,0,0,34,3,4,2,16,3,16,0, -32,32,226,48,2,0,48,0,33,19,0,18,33,3,0,16,32,32,178,48,1,1,50,1,34,3,4,17,16,3, -0,16,32,16,162,48,1,64,50,1,34,7,3,1,17,3,0,16,32,16,184,2,2,2,2,48,18,3,0,0,17, -3,0,17,32,16,94,93,93,89,112,0,18,3,0,0,16,3,0,2,32,16,48,48,48,3,0,0,17,4,0,0, -17,3,0,1,32,16,48,48,0,3,1,1,18,3,0,0,32,7,16,1,32,16,48,0,1,0,1,50,34,3,0,1,33, -3,16,1,20,32,112,48,0,16,1,49,34,3,64,16,33,3,4,2,4,16,48,49,0,16,0,49,34,3,64, -0,32,3,16,1,0,0,48,49,0,16,65,48,34,3,49,0,17,3,16,2,0,0,48,49,1,32,0,49,34,3, -64,0,16,19,16,2,1,0,113,49,17,16,0,48,32,3,0,0,16,19,16,1,2,0,97,66,17,32,64,48, -33,19,34,2,0,137,16,1,18,0,97,49,17,16,66,64,32,3,84,212,105,69,16,1,17,0,97,49, -18,16,50,48,16,19,51,48,51,51,16,1,16,0,98,50,1,19,66,48,32,3,0,1,0,3,32,1,33,0, -177,49,2,16,66,64,16,3,0,1,0,7,32,1,16,1,82,64,1,16,50,0,16,35,0,1,0,9,33,2,32, -0,161,64,1,20,48,0,0,32 -, // 1, skyscraper window -4,5,3,6,2,81,0,59,48,128,138,131,66,44,137,129,16,176,208,176,44,33,0,0,1,43,1, -13,0,32,29,0,0,176,0,0,12,64,0,17,0,32,0,17,1,32,13,11,0,176,0,208,4,65,0,0,0, -34,1,16,1,32,16,0,23,32,0,2,40,66,2,194,230,140,34,208,2,176,17,0,119,76,66,34, -34,34,34,34,34,34,34,34,34,116,64,0,72,194,51,51,51,51,17,49,51,19,19,49,51,12, -34,36,17,210,49,17,16,17,1,17,17,16,17,1,17,42,1,17,17,2,49,154,116,244,229,164, -233,85,49,16,17,14,1,16,2,69,17,104,79,117,149,88,94,137,49,17,17,36,0,0,196,69, -48,137,119,69,84,79,88,85,49,17,1,4,92,244,0,34,0,69,85,95,127,116,86,89,49,17, -17,36,0,0,17,32,1,169,88,229,228,74,85,85,49,19,1,4,0,0,0,2,49,90,153,85,85,169, -95,85,49,16,17,4,2,0,0,39,48,68,85,233,138,37,133,136,49,17,17,36,0,32,0,4,17, -122,150,84,133,230,136,136,49,1,17,10,0,0,0,44,48,35,51,51,51,51,51,35,49,17,1, -66,0,13,0,4,17,51,3,211,3,3,35,2,49,17,17,34,0,0,0,37,49,167,42,70,106,69,102, -102,49,0,17,36,2,34,68,244,48,39,119,79,69,150,102,102,49,17,17,68,64,34,16,76, -49,119,2,127,120,102,102,102,49,17,19,5,0,1,1,74,49,114,119,4,152,102,104,102, -49,17,17,75,0,0,208,28,49,119,39,116,248,104,134,102,49,16,17,34,0,0,0,10,17,39, -114,37,169,104,136,86,49,16,17,4,0,0,1,43,49,114,126,232,74,102,104,134,49,1,0, -34,0,32,0,116,17,119,122,102,88,102,102,102,49,16,17,66,0,0,1,36,49,17,17,17,17, -17,17,17,1,1,1,64,0,0,32,184,49,17,49,17,17,19,51,17,17,17,19,178,0,34,44,66,34, -71,39,34,180,36,66,34,2,32,32,192,17,19,66,192,0,16,176,66,34,34,34,200,36,34, -34,36,68,44,221,192,0,0,10,32,0,16,1,34,16,16,0,11,0,16,13,64,0,0,10,0,0,0,1,34, -0,1,1,2,16,0,1,176,27,0,11,33,0,17,0,112,0,1,17,113,16,0 -, // 2, pink high-tech wall -83,4,12,5,84,20,61,85,13,6,11,3,7,14,15,0,34,32,34,0,32,2,170,34,170,160,170, -160,17,17,17,17,34,34,32,34,42,34,170,2,42,42,170,170,17,17,17,17,34,34,34,36, -34,160,36,32,160,160,42,10,49,17,17,17,34,34,34,42,34,0,0,0,0,0,0,4,49,49,17,17, -34,34,2,10,36,32,17,17,81,17,81,23,59,59,59,17,0,0,0,0,2,0,84,84,96,0,0,0,59,59, -49,19,102,102,102,102,96,32,20,86,0,102,102,102,145,59,59,19,34,34,34,36,96,32, -21,86,5,85,85,23,59,59,49,19,34,34,34,42,96,64,21,86,5,85,69,71,145,155,49,49, -34,34,66,37,96,128,84,86,5,85,91,23,49,49,49,19,34,34,0,0,0,0,0,0,4,84,69,87, -145,155,49,49,34,38,6,102,102,102,102,96,68,84,84,23,145,145,145,51,34,38,2,37, -88,32,68,69,69,85,85,71,49,145,49,51,40,134,2,34,130,64,21,69,85,84,21,23,145, -145,147,51,36,38,4,68,68,64,84,85,85,84,20,71,145,145,49,51,37,38,2,66,68,32,69, -85,85,85,69,87,145,145,147,51,40,134,5,84,72,64,20,65,69,68,20,71,145,193,147, -51,36,70,2,72,136,112,68,65,20,84,20,87,145,145,51,57,40,134,8,133,132,32,84,84, -17,84,68,87,195,147,147,51,40,134,8,88,136,112,21,17,17,68,17,23,147,51,51,51, -36,134,4,133,136,112,81,17,17,68,65,87,147,147,51,57,40,134,0,0,0,0,0,0,65,20, -68,71,147,57,147,57,39,120,102,102,102,102,102,102,1,17,84,71,153,51,57,57,40, -119,135,119,96,112,17,22,1,17,68,183,147,57,51,51,37,120,135,120,96,112,177,22, -1,17,17,87,153,147,57,57,37,136,136,135,96,32,65,22,1,20,91,71,60,57,57,57,0,0, -0,0,96,112,84,22,96,0,0,0,57,57,60,57,102,102,102,102,104,128,75,181,102,102, -102,102,60,57,51,60,39,119,135,119,120,112,180,84,180,181,75,183,57,60,57,57,34, -136,135,215,231,116,119,119,119,119,119,119,60,51,60,60,37,120,135,114,119,135, -125,120,116,212,68,114,60,60,57,57,34,117,136,135,135,120,132,136,136,136,136, -71,57,57,57,153 -, // 3, partly mossy concrete wall -4,3,5,36,20,37,76,12,11,19,77,130,13,35,2,0,2,0,0,80,32,0,0,1,5,37,1,64,4,25,19, -145,0,32,96,32,0,16,48,24,115,48,65,53,48,16,113,11,2,0,0,0,0,0,0,152,3,48,49, -48,51,19,1,17,0,32,16,48,0,16,0,8,0,0,1,67,0,23,19,17,2,0,5,48,0,16,0,24,115,65, -113,85,67,16,0,17,2,0,18,0,0,0,0,6,4,0,0,67,48,19,145,17,0,0,3,80,80,0,0,1,3,80, -19,3,83,16,9,1,2,0,210,0,0,16,0,1,148,3,1,48,51,16,17,17,19,0,16,48,0,16,0,24,5, -64,113,51,3,49,1,11,2,0,0,34,0,0,0,8,85,3,1,67,84,3,112,17,0,36,5,4,32,96,0,8,4, -4,3,52,83,16,17,1,34,0,2,32,0,0,7,1,3,32,49,3,51,119,49,113,4,32,96,66,0,0,0,7, -5,84,1,51,67,112,0,30,2,32,98,32,10,0,0,8,68,32,64,5,3,49,0,14,2,2,96,0,0,96,0, -6,5,80,49,48,51,112,1,27,0,32,2,0,1,96,0,1,51,0,1,3,51,27,0,27,2,0,96,32,0,0,6, -8,0,48,3,3,48,208,24,1,2,32,98,4,32,0,0,6,4,36,3,0,51,0,16,17,34,194,96,34,0,96, -0,6,50,48,1,83,67,144,0,8,0,42,2,36,0,0,162,8,5,32,65,64,48,23,1,1,2,32,100,34, -6,0,12,8,68,50,1,0,3,16,112,1,36,34,2,0,0,0,0,8,0,0,0,48,0,23,7,17,2,42,4,32,42, -0,0,8,5,64,64,35,0,135,0,1,2,64,98,44,6,0,32,8,48,48,1,85,0,17,0,49,2,32,3,2,0, -4,0,8,5,64,0,0,4,0,112,1,4,34,98,2,6,98,32,8,85,36,48,67,5,1,0,11,2,32,98,192, -160,4,52,8,4,0,1,4,0,0,112,113,2,194,2,0,0,0,2,1,5,85,64,211,4,48,0,1,2,32,0,42, -0,21,4,8,64,68,45,4,48,0,23,27,2,32,96,0,0,16,0,1,5,80,0,85,3,16,0,1,2,194,0,0, -0,16,48,17,84,85,0,48,64,144,25,17,0,32,96,0,0,0,64,13,3,68,0,5,48,16,0,17 -, // 4, wooden chess pattern -20,12,11,21,2,43,19,73,1,83,81,10,9,34,42,65,86,82,91,85,89,249,149,153,66,34, -40,34,34,114,34,36,0,0,0,48,48,35,0,2,33,18,39,17,17,66,17,18,0,0,5,48,3,96,3, -50,33,34,40,33,33,113,17,18,96,0,6,48,3,99,3,50,33,34,23,33,18,129,17,18,80,3,5, -48,3,99,3,54,33,33,23,18,17,114,17,18,80,0,5,48,3,99,0,54,33,34,20,34,33,114,33, -18,80,0,2,48,51,163,3,54,65,34,20,34,33,65,33,18,80,3,2,48,0,163,0,54,33,34,20, -34,17,66,33,18,0,0,2,3,0,67,0,53,177,34,20,34,17,130,33,18,0,0,2,51,0,211,0,5, -33,34,36,34,17,114,18,18,80,0,6,3,0,99,0,53,33,34,20,18,33,113,17,18,0,3,2,48,3, -99,0,6,65,33,20,18,33,65,17,18,0,0,2,0,0,96,0,6,34,34,20,17,33,129,17,18,0,0,5, -0,0,99,0,1,33,34,36,17,33,130,17,18,3,3,53,48,0,35,0,6,65,17,20,17,17,66,17,18, -80,85,86,5,85,224,85,85,68,68,72,66,68,132,68,36,66,34,20,34,34,66,34,36,96,0,5, -5,80,80,85,82,65,34,20,33,34,65,18,18,3,3,53,48,3,83,0,5,65,34,20,18,34,65,18, -34,51,51,54,51,3,80,5,5,66,34,20,18,34,65,18,18,51,51,53,51,3,80,5,5,66,34,20, -17,33,65,17,18,0,51,54,51,3,80,5,5,65,34,20,17,17,65,17,34,51,51,53,51,3,80,0,0, -65,34,20,17,17,65,17,18,0,51,54,48,51,80,0,0,66,34,20,17,18,65,17,18,3,51,54,48, -51,80,5,5,65,34,20,17,33,65,17,18,3,51,54,51,51,32,0,5,65,34,20,17,33,65,17,18, -3,51,54,51,51,80,1,5,65,34,20,17,33,65,34,34,3,51,59,48,51,80,5,85,65,34,20,17, -17,66,34,36,3,51,52,48,3,83,1,5,65,34,20,17,17,68,17,20,3,51,54,48,48,35,48,5, -65,33,20,34,17,66,17,18,3,0,52,51,51,35,48,5,65,33,20,17,17,65,18,18,3,51,54,51, -0,35,48,5,32,80,106,0,80,101,6,2,85,85,92,86,86,160,5,82 -, // 5, red brick wall -13,5,6,21,93,101,4,100,11,7,19,3,106,178,0,0,33,17,22,37,48,8,33,3,54,33,64,0,1, -20,5,70,37,0,88,37,85,88,32,64,4,17,64,0,65,20,0,70,32,51,56,37,85,8,33,0,4,17, -83,51,81,20,96,70,32,3,52,38,51,8,33,3,4,18,83,51,81,20,85,70,38,6,4,32,51,8,33, -3,4,18,64,51,81,20,85,69,38,0,4,38,3,52,33,83,5,17,67,51,81,20,101,70,38,0,4,38, -83,4,17,83,0,17,67,51,81,20,101,68,38,0,4,38,69,68,17,86,80,18,69,85,65,36,101, -68,32,85,4,34,17,17,33,86,83,18,18,34,34,36,0,88,33,0,4,34,34,18,33,83,0,18,17, -17,17,36,0,84,35,3,56,34,64,76,17,83,48,98,112,0,119,36,0,68,35,0,4,34,133,4,18, -3,48,98,113,0,17,36,0,85,33,0,4,34,133,100,17,81,48,98,112,0,1,36,0,86,35,0,8, -33,165,68,17,67,53,98,113,0,1,36,85,86,35,0,4,33,69,106,17,64,53,98,112,0,1,20, -85,86,35,0,4,33,133,68,17,64,53,18,112,0,1,20,5,86,35,0,4,33,166,84,17,64,53,18, -112,0,1,20,5,86,35,3,4,33,69,10,17,80,53,18,112,0,1,36,85,86,35,0,52,34,69,100, -33,83,5,18,112,0,113,40,5,84,33,64,8,33,69,4,33,69,68,18,112,0,1,36,0,22,33,0,4, -33,0,52,17,34,34,18,112,0,1,34,34,145,34,41,146,33,0,4,17,17,17,18,113,17,1,36, -99,22,38,80,49,33,69,4,32,0,4,98,112,17,17,36,51,6,32,80,4,33,69,106,35,3,53,98, -112,0,17,36,51,6,33,3,52,33,69,72,35,51,53,18,16,0,17,37,51,6,33,3,52,17,69,84, -35,51,53,98,112,0,17,37,51,6,33,1,52,17,69,100,35,51,48,98,113,17,17,21,3,6,35, -3,52,17,67,4,35,51,48,98,112,0,17,16,51,6,35,3,53,17,69,100,33,49,19,97,112,0, -17,37,51,6,35,3,4,17,212,4,33,3,51,98,1,0,1,36,3,6,35,3,52,18,34,34,33,3,48,177, -34,153,146,36,51,54,33,3,52,34,49,17,33,3,48,98,70,102,17,36,0,6 -, // 6, grass-covered concrete wall, tiles with skyscraper window -36,37,43,35,4,3,107,34,131,50,42,5,106,110,114,26,3,131,51,128,58,52,0,5,84,56, -84,2,0,48,66,0,48,128,5,5,10,112,0,68,0,48,85,68,4,144,32,1,6,32,17,0,7,116,80, -0,85,153,36,13,0,1,0,0,16,1,1,0,54,115,3,160,110,234,55,1,208,40,1,0,170,96,0, -39,115,51,51,144,0,51,144,0,0,16,0,2,17,16,17,208,11,187,20,0,2,43,64,32,17,16, -0,44,17,1,0,16,3,1,0,2,0,3,64,0,0,32,32,0,1,16,17,0,1,3,2,96,32,37,64,0,2,0,2, -32,17,16,1,1,0,0,34,128,32,0,1,16,16,32,0,32,1,0,0,0,16,8,0,2,2,2,2,0,32,2,32,0, -34,1,19,48,5,96,0,2,0,32,0,17,1,2,0,16,1,18,16,65,16,0,32,0,1,2,2,4,0,8,32,2,1, -39,18,4,1,32,0,208,0,0,0,1,16,0,2,0,0,18,19,48,0,16,13,0,1,0,32,18,16,0,0,0,16, -1,0,0,16,65,16,0,0,33,1,16,0,54,0,38,0,6,64,0,129,0,0,0,0,1,0,0,0,9,63,50,2,2,8, -2,32,0,18,0,17,0,1,17,96,0,5,80,32,0,0,0,0,18,69,80,0,1,16,48,1,0,32,153,206,32, -2,2,32,17,4,64,96,32,0,17,0,224,0,131,64,0,0,0,1,0,4,8,0,0,16,16,1,18,96,0,2,2, -0,34,32,2,0,0,5,0,0,96,2,0,32,0,2,0,2,0,17,0,0,0,85,34,32,0,0,0,0,0,2,0,1,16,48, -0,33,2,68,0,2,2,0,16,0,32,32,32,38,1,32,0,0,34,6,0,0,48,3,0,8,0,0,0,18,16,0,0, -98,0,32,0,0,0,33,32,0,32,0,17,17,0,0,0,33,32,0,0,4,49,18,0,2,16,2,1,66,0,98,2,0, -0,0,34,0,17,1,0,0,0,17,0,17,33,2,0,12,126,199,112,39,0,16,6,21,0,16,16,0,16,32, -32,167,51,63,62,172,151,113,0,0,2,0,1,17,48,16,16,48,69,4,51,64,64,0,16,8,96,27, -16,16,16,62,57,149,0,4,51,0,1,4,7,80,2,0,17,1,51,8,52,0,68,0,32,0,4,68,36,16,32 -, // 7, steel door -4,80,3,17,5,59,6,69,58,50,60,2,68,74,70,67,1,17,17,17,17,17,17,17,17,17,17,17, -17,17,17,17,22,102,70,102,70,102,70,102,70,100,102,100,102,100,102,97,16,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,1,16,0,32,0,32,0,32,0,32,2,0,2,0,2,0,1,19,189,187,221,189, -219,219,219,187,187,187,219,189,189,189,177,17,51,51,51,51,51,51,51,51,51,51,51, -51,51,51,49,19,136,136,136,133,133,85,95,34,34,44,47,34,194,34,40,19,136,34,34, -34,2,34,34,34,32,34,32,2,2,2,34,19,130,40,140,136,192,197,192,112,112,64,0,0,7, -4,7,19,146,136,200,92,80,122,90,160,0,64,0,7,0,4,0,19,146,149,136,200,84,122, -202,0,0,64,0,0,7,14,0,19,146,153,153,197,94,170,80,112,0,64,0,112,0,4,0,19,146, -37,156,133,112,5,0,0,224,224,0,112,112,4,0,19,146,153,153,87,160,0,7,160,0,64,0, -0,0,4,4,19,146,149,41,149,4,7,80,160,10,71,0,0,7,4,0,19,146,153,146,87,0,170,87, -0,7,64,0,7,0,4,4,19,146,89,204,87,4,167,80,7,0,224,0,0,0,4,0,19,146,153,156,90, -160,122,80,0,14,64,0,0,112,116,4,19,146,149,153,85,116,170,192,0,112,64,112,0,0, -4,0,19,146,41,92,138,84,122,90,0,0,71,0,7,0,4,4,19,146,153,204,80,126,90,202, -224,0,64,0,0,0,4,0,19,146,143,85,32,4,170,90,160,0,71,0,7,7,14,0,19,130,136,140, -128,116,122,202,112,10,64,0,112,0,4,0,19,130,40,200,92,14,170,80,0,170,74,112,0, -112,116,0,19,136,34,34,34,2,2,0,0,32,34,34,34,34,2,34,19,136,136,136,133,34,85, -85,85,37,194,47,34,242,34,34,17,51,51,51,51,51,51,51,51,51,51,51,51,51,51,49,27, -189,221,187,219,219,219,187,221,187,187,221,189,189,189,177,22,102,70,102,70, -102,70,102,70,102,70,100,102,100,102,97,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0, -32,0,32,0,32,0,32,0,32,2,0,2,0,1,1,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17 -, // 8, white skull on blue -6,5,4,59,60,62,218,14,3,13,85,139,74,63,12,15,17,17,17,17,17,18,147,69,72,17,17, -17,17,17,17,17,16,16,1,1,16,18,35,51,50,17,1,1,16,16,1,17,16,0,0,0,0,18,36,99, -82,16,16,0,0,0,0,17,0,0,0,0,0,18,37,51,82,17,0,0,0,0,0,1,16,0,0,0,0,18,35,179, -50,17,16,0,0,0,0,1,0,0,0,0,0,18,35,51,66,17,16,0,0,0,0,17,16,0,0,0,1,226,37,67, -84,40,17,0,0,0,0,1,0,0,0,17,42,34,85,83,85,67,33,16,0,0,0,17,0,0,1,18,34,51,34, -34,68,75,98,129,16,0,0,17,16,0,17,162,51,130,34,34,38,198,52,66,129,0,1,17,17, -17,42,36,98,33,17,17,34,51,51,68,98,33,17,17,130,34,36,68,33,17,17,23,121,34,52, -68,51,66,34,34,68,84,53,85,33,0,0,121,151,34,37,85,67,69,221,51,51,68,52,82,16, -0,0,126,151,18,34,133,91,69,84,99,51,107,52,66,0,16,16,247,119,17,34,40,60,67, -51,68,83,99,51,50,1,1,17,0,1,33,18,40,51,51,52,85,75,52,52,66,0,17,17,0,1,33,18, -40,51,68,51,69,51,84,53,82,1,0,16,247,119,17,34,40,70,69,51,51,85,84,52,82,16,0, -0,126,151,18,34,132,70,69,84,99,85,68,52,52,33,0,0,121,151,34,36,52,60,52,85,51, -130,34,35,107,33,17,17,23,121,34,99,107,195,66,34,34,17,17,42,102,98,33,17,17, -34,54,102,102,98,33,17,17,16,0,17,162,68,130,34,34,36,76,102,98,33,0,1,17,0,0,1, -18,35,69,34,34,85,67,194,161,16,0,0,17,16,0,0,17,42,35,69,67,68,75,33,16,0,0,0, -17,0,0,0,0,1,226,35,99,54,42,17,0,0,0,0,1,0,0,0,0,0,18,35,51,66,17,16,0,0,0,0, -17,16,0,0,0,0,18,37,51,82,17,16,0,0,0,0,1,0,0,0,0,0,18,45,51,66,17,0,0,0,0,0,1, -16,0,0,0,0,18,36,99,50,16,16,0,0,0,0,17,16,16,1,1,16,18,35,68,50,17,16,16,16,16, -1,17,17,17,17,17,17,18,148,85,88,17,17,17,17,17,17,17 -, // 9, red lava with stones -3,4,12,11,83,94,102,92,91,14,93,15,19,20,100,0,3,82,2,83,32,67,84,1,17,17,16,5, -32,17,20,0,2,48,0,67,117,118,36,0,33,33,0,5,33,17,17,19,69,64,17,20,67,86,82,36, -17,1,0,53,1,17,17,64,56,1,17,17,0,130,50,117,131,64,4,39,0,17,17,0,32,1,17,17,3, -82,4,68,39,85,34,98,36,16,0,3,0,0,1,16,3,82,1,16,0,35,53,106,83,51,51,54,85,68, -36,3,53,32,49,17,16,0,54,34,66,35,37,86,67,85,85,34,38,66,1,17,17,0,82,64,64,0, -3,101,0,32,3,34,102,103,65,1,17,3,84,1,17,0,3,83,18,17,0,67,34,68,85,52,0,69,48, -17,17,19,69,0,17,17,20,3,112,0,2,53,51,114,1,17,17,16,69,65,17,17,16,3,80,3,0,4, -46,98,64,17,17,32,115,1,17,18,0,53,64,17,17,16,50,86,34,0,0,0,35,1,0,0,0,37,65, -17,17,17,2,34,119,85,67,66,34,0,51,130,50,98,64,17,17,17,2,35,68,51,85,102,98, -35,51,50,86,102,35,34,2,16,3,132,0,0,4,34,82,35,20,0,66,85,39,120,34,4,2,80,1, -17,4,53,52,0,17,4,3,83,64,2,37,81,69,16,77,17,16,69,16,0,18,16,0,84,16,0,67,66, -38,49,17,17,32,53,32,17,17,17,0,82,0,33,16,3,102,32,0,0,4,84,0,18,17,17,0,84,1, -17,17,4,182,98,64,0,3,84,1,17,17,17,0,83,1,17,17,4,99,37,83,50,50,32,0,33,17,16, -0,83,1,17,33,2,36,0,34,114,118,84,16,17,0,0,3,83,1,17,16,67,49,1,16,4,38,103,51, -64,84,68,53,32,0,17,0,55,32,17,17,0,39,50,39,85,37,82,166,98,36,16,64,34,1,17, -17,16,55,32,0,36,0,4,54,34,117,66,51,84,1,17,17,16,82,0,0,2,17,4,39,64,18,82, -118,98,64,1,17,4,84,16,17,17,18,4,84,4,0,20,53,102,82,32,0,4,84,0,33,17,16,2,32, -1,17,64,39,51,69,85,117,53,156,65,1,18,50,38,36,17,17,16,34,0,0,20,67,102,101, -115,51,51,130,101,101,32,17,4,84,1,17,33,16,38,148,19,56,56 -, // 10, transparent window -175,4,5,3,59,13,49,60,74,62,61,50,83,2,69,12,17,17,33,17,81,17,17,33,17,17,17, -17,18,34,34,17,59,17,17,17,17,17,17,17,17,17,177,17,18,34,82,33,51,51,51,51,51, -51,51,51,51,51,59,81,18,34,33,17,49,182,102,102,102,102,102,102,102,107,18,33, -18,34,34,33,51,0,0,0,0,116,16,0,0,10,50,37,18,34,34,33,51,0,0,0,0,116,16,0,0,10, -50,17,18,34,21,33,51,0,0,0,0,84,16,0,0,10,50,33,17,243,51,52,51,0,0,0,0,20,16,0, -0,10,50,145,18,17,17,21,51,0,0,0,0,20,32,0,0,10,50,149,18,49,81,17,51,0,0,0,0, -116,112,0,0,1,50,37,82,17,113,17,51,18,51,140,140,71,72,140,136,200,50,37,82,49, -17,225,51,18,68,68,68,121,116,68,68,71,50,33,82,18,18,17,51,0,0,0,0,212,208,0,0, -12,50,17,18,37,34,17,51,0,0,0,0,20,16,0,0,9,50,17,18,18,37,30,51,0,0,0,0,116,32, -0,0,2,50,145,18,34,34,33,51,0,0,0,0,116,16,0,0,2,50,37,18,34,18,17,51,0,0,0,0, -116,16,0,0,10,50,145,18,37,33,18,51,0,0,0,0,116,16,0,0,10,57,145,82,33,18,225, -51,0,0,0,0,20,16,0,0,10,57,145,18,18,17,21,51,0,0,0,0,212,208,0,0,13,50,149,18, -37,18,17,51,18,68,68,68,121,116,68,68,71,50,37,18,34,33,17,51,18,60,200,140,71, -76,136,136,200,50,37,18,34,81,30,51,0,0,0,0,244,16,0,0,1,50,149,18,34,33,17,51, -0,0,0,0,20,32,0,0,10,50,33,18,18,17,17,51,0,0,0,0,116,32,0,0,2,50,33,17,243,51, -52,51,0,0,0,0,20,16,0,0,10,50,17,18,17,17,17,51,0,0,0,0,84,16,0,0,10,50,33,82, -17,33,31,51,0,0,0,0,116,16,0,0,2,50,33,18,17,17,17,49,182,102,102,102,102,102, -102,102,107,34,81,18,37,17,17,19,50,34,34,34,34,34,34,34,34,35,81,18,34,17,17, -59,34,34,34,34,34,34,34,34,34,181,17,18,18,81,21,17,17,17,17,33,17,17,17,21,17, -17,17,18,34,34,18 -, // 11, white steel blocks -6,5,7,4,3,85,71,78,0,0,0,0,0,0,0,0,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68, -68,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,52,34,0,34,34,2,34,34,34,34,34, -0,34,34,34,0,17,0,17,0,0,0,1,16,0,0,0,0,0,1,16,17,17,0,20,0,0,0,0,0,0,0,0,0,0,1, -64,0,17,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,17,17,17,17,17,17,17,17,81,17,17,17,17,17, -17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,1,17,16,0,0,0,0,0,0,0,0,0,0,0,0,17,0, -0,1,1,0,0,6,0,0,0,0,0,0,0,0,17,34,0,34,0,34,34,34,34,34,34,34,34,32,2,34,17,0, -17,0,1,16,0,0,0,0,0,17,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,0,0,0,0,1,0, -0,0,0,0,0,0,16,0,17,17,17,17,17,81,17,22,0,0,0,1,17,1,17,17,17,19,0,0,0,0,0,2,0, -0,0,1,0,0,0,0,113,21,16,0,0,0,0,2,0,0,0,1,0,0,0,0,0,19,0,0,0,0,0,2,0,0,0,1,0,0, -0,0,1,17,34,34,32,2,34,34,0,0,0,2,34,34,0,34,0,17,0,0,0,0,0,17,0,0,0,0,0,1,16, -16,17,17,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,17,0,1,0,0,0,0,0,0,0,0,0,0,0,17,17, -17,17,17,17,17,17,81,17,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,1, -17,16,0,0,0,0,0,0,0,0,1,0,1,16,17,0,0,1,1,0,0,6,0,0,0,16,0,0,0,0,17,34,0,34,0, -34,0,34,34,34,34,34,34,32,2,34,17,0,17,1,1,16,0,0,0,0,0,17,0,1,16,0,17,0,20,0,0, -0,0,0,0,0,0,0,0,1,64,1,17,0,0,0,0,0,0,0,1,0,0,0,0,16,0,17,17,17,17,17,17,17,17, -17,17,21,17,17,17,17,17,17,19,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51 -, // 12, gray square-tiled wall -4,5,3,13,50,6,12,21,85,20,14,11,19,22,84,0,17,17,17,17,17,17,17,18,17,17,17,17, -17,17,17,20,17,3,16,8,17,16,0,18,17,16,1,1,0,3,16,18,16,1,16,1,0,49,17,48,17,1, -3,6,0,17,3,2,16,16,0,16,16,24,16,16,17,0,0,23,16,0,0,2,16,1,3,17,1,16,16,18,19, -0,0,0,49,1,1,2,16,48,17,6,17,17,0,0,16,16,16,119,16,19,0,2,17,16,17,17,17,26,16, -50,17,49,0,19,0,0,0,2,16,17,49,17,129,17,16,2,16,3,16,0,0,1,6,2,16,17,16,1,17, -17,16,2,17,0,17,1,0,0,0,18,17,49,24,17,17,129,16,6,16,113,49,3,16,0,0,98,17,17, -17,16,49,0,96,9,16,16,0,0,1,49,0,18,17,17,17,17,17,16,1,2,81,1,0,32,0,16,16,2, -17,161,129,1,0,48,0,4,16,0,48,16,0,49,1,2,17,17,17,49,17,0,0,16,16,0,16,16,0,0, -48,2,80,17,17,17,19,17,48,0,16,16,0,0,0,17,6,2,32,48,32,6,0,34,32,98,2,34,34,38, -2,34,34,34,21,81,21,85,81,21,81,86,85,21,17,17,21,81,17,27,17,17,16,19,0,48,1,0, -16,0,0,0,48,0,0,2,19,17,49,0,17,1,17,2,22,1,0,1,1,48,0,2,16,17,0,0,48,0,49,2,80, -6,0,0,16,1,48,2,16,48,0,0,16,16,112,50,16,0,0,1,0,16,16,148,17,1,49,0,0,49,0,28, -16,0,0,48,3,0,0,2,16,0,3,1,0,0,17,18,16,3,0,0,0,0,0,50,17,113,1,3,0,0,48,2,16,0, -0,0,0,6,0,2,16,0,0,0,0,48,0,18,16,0,0,0,0,0,0,2,17,0,0,0,0,0,3,2,208,0,3,0,48,0, -0,4,17,112,48,19,16,0,0,18,17,0,0,0,0,0,16,100,16,17,9,1,1,16,1,2,22,0,0,0,0,0, -0,2,16,1,0,16,3,0,48,0,16,0,0,0,0,224,0,4,16,48,3,1,0,0,16,50,16,3,0,48,0,3,0, -52,16,16,1,16,0,0,0,2,16,16,0,0,2,2,1,4,68,66,32,34,36,34,34,36,34,36,34,34,68, -68,68,68 -, // 13, scifi door -3,2,4,9,0,74,200,10,75,41,160,48,120,17,34,50,68,68,68,68,68,68,68,68,70,102, -102,102,102,102,102,102,85,85,153,85,85,153,85,85,85,136,136,136,136,136,136, -136,149,153,153,147,147,57,55,57,125,238,88,135,127,85,119,119,51,147,51,51,51, -55,147,55,215,125,215,119,119,119,119,119,68,68,68,68,68,68,68,70,102,102,102, -102,102,102,102,102,0,0,0,0,0,0,0,5,2,34,34,34,34,34,34,34,53,92,65,85,19,48,0, -81,32,11,160,0,1,18,34,1,48,83,64,0,83,16,0,1,34,1,178,34,1,2,34,33,53,84,65,0, -4,49,80,1,0,11,160,34,43,16,2,1,52,196,49,85,28,51,51,161,26,186,16,0,11,17,17, -161,51,51,51,51,51,51,49,16,1,17,17,17,17,17,17,16,53,85,49,85,19,21,0,34,32,0, -16,0,1,2,34,1,53,5,48,0,83,16,34,34,34,32,18,34,1,2,34,17,49,85,49,0,4,16,34,34, -34,32,16,34,43,2,32,161,51,68,49,85,28,16,34,34,34,32,16,0,11,0,17,0,51,67,51, -51,51,16,34,34,34,32,17,17,17,1,16,34,52,49,49,17,19,16,34,34,34,32,16,0,1,0,17, -2,51,5,48,0,84,16,34,34,34,32,18,34,10,2,1,17,48,5,49,5,84,16,34,34,34,32,16,32, -10,2,32,161,48,85,49,21,28,53,2,34,34,0,16,0,11,16,34,17,49,19,67,68,195,17,80, -177,16,1,161,171,177,0,0,177,51,52,17,51,67,51,17,16,1,26,0,17,161,17,17,16,53, -92,48,85,196,48,0,1,32,11,18,0,186,18,34,1,48,83,48,5,52,48,0,33,34,1,18,32,27, -18,34,33,53,84,49,85,68,17,80,1,0,11,16,0,186,0,2,1,52,196,51,76,67,19,51,161, -26,186,17,171,161,1,17,161,0,0,0,0,0,0,0,0,2,34,34,34,34,34,34,34,68,68,68,68, -68,68,68,102,102,102,102,102,102,102,102,102,51,147,51,51,51,55,147,125,125,119, -119,119,119,119,119,119,149,153,153,147,147,121,55,62,119,238,88,135,127,85,119, -119,85,85,153,85,85,153,85,85,152,136,136,136,136,136,136,136,68,68,68,68,68,68, -68,68,102,102,102,102,102,102,102,102 -, // 14, concrete wall, tiles with skyscraper window -5,4,3,2,6,44,131,66,50,51,45,81,132,28,138,1,1,97,81,193,39,32,17,17,16,44,16, -21,17,33,5,17,17,97,17,17,23,49,17,0,17,33,17,0,16,33,21,28,17,97,17,81,19,48, -17,17,17,34,16,1,16,33,1,17,9,33,17,18,47,50,18,130,255,248,34,81,18,97,0,17, -153,55,50,34,34,34,34,34,34,34,34,34,34,147,49,17,63,114,68,68,68,68,0,64,68,4, -4,64,68,24,34,35,0,82,64,0,1,0,16,0,0,1,0,16,0,46,16,0,0,18,64,16,1,17,0,0,13,0, -0,1,0,31,16,1,18,59,0,16,0,0,0,0,0,0,0,0,0,35,17,17,115,59,65,17,0,0,0,0,0,0,0, -0,16,19,183,51,161,34,17,16,0,0,0,0,0,0,0,0,0,35,17,17,0,33,16,0,0,0,0,0,0,0,0, -4,208,19,17,17,17,18,64,0,0,0,0,0,0,0,0,1,0,19,18,17,17,41,65,16,0,0,0,0,0,0,0, -0,0,35,17,33,17,19,0,16,0,0,0,0,0,0,0,16,0,30,17,17,17,39,65,0,0,0,0,0,0,0,0,0, -16,50,17,21,17,19,0,21,17,0,0,0,0,0,0,0,0,34,17,17,17,43,64,0,0,0,0,0,0,0,0,29, -0,35,18,34,51,51,65,21,1,0,0,0,0,0,0,0,0,51,49,34,1,55,64,0,0,0,0,0,0,0,0,0,4, -27,17,16,16,62,64,16,1,0,0,0,0,0,0,0,0,54,17,17,81,7,64,0,160,0,1,0,0,0,0,1,0, -34,17,17,17,30,0,16,16,16,0,0,0,0,0,1,0,19,17,17,16,38,64,0,0,160,16,0,0,0,208, -16,209,34,17,33,17,147,0,16,17,0,0,16,0,16,0,1,0,50,17,17,16,35,64,0,0,0,0,0,0, -0,16,16,16,49,17,17,33,111,64,0,64,0,0,4,68,0,0,0,4,98,17,34,40,50,34,57,41,34, -99,35,50,34,18,33,33,129,0,4,50,129,17,1,193,50,34,34,34,143,35,34,34,35,51,39, -85,113,17,17,22,33,17,1,16,34,1,1,161,22,17,1,21,49,17,17,30,17,17,17,16,34,17, -16,16,18,10,17,16,97,12,17,22,32,17,0,17,145,17,16,0,144,1,17 -, // 15, computer tech wall -52,59,53,220,38,141,54,143,75,76,77,61,74,5,66,95,48,0,0,0,10,17,0,0,0,0,38,0,0, -0,0,51,16,0,2,1,17,17,0,0,16,0,38,0,0,0,0,3,10,0,0,0,17,1,17,17,17,16,34,0,1,0, -0,0,7,0,0,0,17,49,81,33,33,32,34,48,1,48,0,0,2,0,0,0,17,1,1,17,17,16,38,0,0,0,0, -0,0,0,0,83,0,17,1,33,33,35,18,0,0,80,0,0,0,0,3,0,0,17,17,17,17,16,2,83,2,0,7,0, -0,85,19,19,3,17,17,33,33,32,2,17,0,32,0,0,0,0,48,0,1,16,1,0,16,0,34,17,17,0,0,0, -0,1,2,16,0,24,0,80,1,0,82,1,12,2,0,0,16,16,5,16,0,1,1,0,9,17,34,17,30,18,32,8, -16,0,96,0,0,17,17,17,17,17,34,80,85,16,32,1,0,2,2,0,0,17,68,68,68,68,34,5,85,1, -39,0,0,6,0,176,0,17,68,68,68,68,34,85,5,1,114,3,0,6,0,0,10,25,68,68,68,68,38,11, -85,1,114,3,0,6,0,0,0,17,68,68,68,68,34,0,48,1,2,3,2,6,0,0,0,17,68,68,68,68,34,0, -0,1,2,0,0,2,112,0,0,17,68,68,68,68,38,0,0,1,2,112,0,0,7,112,80,17,68,68,68,68, -38,0,0,21,34,0,0,16,32,0,0,19,34,34,34,34,34,5,0,80,34,177,17,227,0,53,1,17,16, -3,1,1,50,19,51,224,32,24,128,17,32,16,1,16,1,0,16,16,2,51,28,50,32,8,16,1,0,80, -0,21,0,0,16,1,146,51,137,6,0,1,0,1,16,0,17,17,0,0,17,16,34,17,144,32,0,3,0,0,17, -0,1,1,13,240,3,17,35,24,0,0,3,3,0,0,81,16,0,1,15,240,51,0,35,0,3,0,0,1,48,0,0, -195,0,17,0,0,5,49,34,0,3,0,160,3,0,0,5,48,206,17,4,208,109,0,2,48,0,112,2,3,57, -0,0,0,1,17,13,208,221,51,18,17,0,176,3,3,19,0,5,16,0,1,3,0,49,19,50,17,1,0,51,1, -144,0,48,0,0,17,0,0,0,48,34,49,48,0,0,3,48,0,0,0,10,17,0,0,0,0,38,0,0,0,0,51 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_itemSprites[13 * SFG_TEXTURE_STORE_SIZE] = -{ -// 0, barrel -175,6,106,29,100,84,7,92,2,43,10,11,46,4,28,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0, -15,240,0,0,0,0,0,0,255,248,255,255,255,255,255,255,248,143,255,255,255,255,255, -255,143,248,248,255,255,143,136,136,130,136,136,136,136,136,136,136,143,168,66, -136,136,137,136,146,146,130,153,153,146,146,143,66,168,170,226,34,130,41,73,41, -66,137,34,34,153,41,146,226,168,186,34,34,155,149,187,186,162,170,84,153,34,146, -36,158,170,234,34,233,229,93,170,171,85,91,43,78,68,66,146,36,187,121,228,237, -69,90,181,85,85,93,91,132,77,66,36,73,158,89,18,68,69,187,85,183,119,122,181, -187,68,66,68,18,222,93,18,68,77,161,197,28,119,119,170,26,94,34,36,18,213,93, -193,20,21,177,17,81,87,119,123,183,84,52,44,20,222,93,17,17,23,17,17,21,119,117, -17,81,65,35,65,28,213,93,49,17,26,21,186,167,119,225,17,17,113,34,49,49,222,93, -60,19,106,97,106,119,115,49,97,193,118,35,67,19,222,93,18,102,101,102,102,103, -117,86,22,54,113,50,35,18,213,93,18,198,99,118,102,119,119,119,119,183,54,99,38, -25,190,93,102,102,195,166,203,119,119,123,190,101,108,50,51,99,181,93,54,54,51, -117,22,19,87,187,229,53,51,34,33,28,222,125,51,51,51,58,49,28,17,49,21,227,19, -19,51,17,158,185,195,51,51,49,174,81,17,85,117,17,17,193,28,76,155,186,51,195, -51,17,61,91,187,181,49,52,49,28,20,28,154,170,25,236,30,49,49,17,49,193,17,17, -28,20,19,28,184,170,25,225,193,17,17,17,17,193,17,17,17,20,19,30,184,138,60,238, -236,193,193,193,17,195,65,17,17,225,68,62,175,250,34,34,34,34,34,36,225,228,34, -34,34,34,34,36,175,251,0,0,0,0,0,0,4,64,0,0,0,0,0,0,191,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 1, health -175,7,73,6,174,5,69,4,71,53,3,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,34,34,32,0,2,34,34,32,0,0,0,0,0,0,0,2,17,17,18,34,33,17,17, -18,0,0,0,0,0,0,0,33,19,51,49,17,19,51,51,53,32,0,0,0,0,0,2,17,54,102,102,102, -102,102,102,51,162,0,0,0,0,0,2,85,102,89,89,89,89,89,86,101,162,0,0,0,0,0,2,85, -101,149,149,149,149,149,148,101,162,0,0,0,0,0,34,19,129,17,17,17,17,17,52,131, -114,0,0,0,0,2,90,19,131,17,17,17,17,17,20,131,114,0,0,0,0,2,42,19,129,20,68,68, -68,177,52,131,114,0,0,0,0,2,2,19,131,20,68,68,68,177,20,133,114,0,0,0,0,2,2,161, -129,49,49,75,17,49,52,135,32,0,0,0,0,2,0,33,131,19,17,75,19,19,20,135,32,0,0,0, -0,2,0,33,129,49,49,75,17,49,52,135,32,0,0,0,0,2,2,161,131,19,17,75,19,19,20,135, -32,0,0,0,0,2,2,19,129,20,68,68,68,177,52,133,114,0,0,0,0,2,42,19,131,20,68,68, -68,177,20,131,114,0,0,0,0,2,90,19,129,17,17,17,17,17,52,131,114,0,0,0,0,0,34,19, -131,17,17,17,17,17,20,131,114,0,0,0,0,0,2,85,105,89,89,89,89,89,84,101,162,0,0, -0,0,0,2,85,102,149,149,149,149,149,150,101,162,0,0,0,0,0,2,19,54,102,102,102, -102,102,102,53,114,0,0,0,0,0,0,37,51,51,87,119,117,51,51,87,32,0,0,0,0,0,0,2, -119,119,114,34,39,119,119,114,0,0,0,0,0,0,0,0,34,34,32,0,2,34,34,32,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 2, ammo: bullets -175,124,168,112,125,5,194,21,19,17,113,190,2,3,4,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,51,51,0,0,0,0,0,0,0,0,0,0,0,0,51,136,200,211,0,0, -0,0,0,0,0,0,0,0,0,3,120,119,215,195,32,0,0,0,0,2,34,34,34,34,34,35,51,51,51,54, -32,0,0,0,0,33,102,102,102,106,102,102,238,230,102,22,32,0,0,0,0,36,17,17,51,58, -102,102,238,230,102,22,32,0,0,0,0,36,17,51,136,202,102,102,238,230,102,22,32,0, -0,0,0,36,19,120,119,218,68,68,255,244,68,70,32,0,0,0,0,36,17,34,51,58,65,17,85, -81,17,65,32,0,0,0,0,36,17,51,136,202,65,17,85,81,17,65,32,0,0,0,0,36,19,120,119, -218,65,17,91,177,17,65,32,0,0,0,0,36,17,57,127,90,65,17,187,81,17,65,32,0,0,0,0, -36,17,56,153,154,65,17,181,81,17,65,32,0,0,0,0,36,19,120,119,218,65,17,91,81,22, -22,32,0,0,0,0,36,17,56,153,154,65,17,187,182,51,51,50,0,0,0,0,36,17,57,136,202, -65,17,85,51,136,200,194,0,0,0,0,36,19,120,119,218,65,17,83,120,119,215,210,0,0, -0,0,36,17,57,127,90,65,17,187,57,255,95,82,0,0,0,0,36,17,57,136,202,65,17,85, -177,153,147,50,0,0,0,0,36,19,120,119,218,65,17,91,177,19,204,210,0,0,0,0,36,17, -57,127,90,65,17,181,177,19,247,130,0,0,0,0,36,19,136,153,154,65,17,181,81,25,93, -194,0,0,0,0,36,17,57,136,202,65,17,91,177,25,247,130,0,0,0,0,36,19,120,119,218, -65,17,91,81,17,151,130,0,0,0,0,2,34,51,127,90,65,17,187,177,17,152,32,0,0,0,0,0, -0,0,34,42,65,17,85,81,17,67,32,0,0,0,0,0,0,0,0,2,65,17,85,81,17,65,32,0,0,0,0,0, -0,0,0,2,34,34,34,34,34,65,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,32,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 3, ammo: rockets -175,1,117,120,30,3,33,82,5,98,101,102,2,178,174,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,204,16,0,0,0,0,0,0,0,0,0, -0,0,0,17,26,197,81,17,17,17,16,0,0,0,0,0,0,0,17,204,202,85,92,113,119,23,16,0,0, -0,0,0,0,1,85,197,90,85,204,119,17,119,16,0,0,3,51,0,0,1,170,85,90,85,92,119,119, -119,16,0,3,59,47,51,0,1,85,197,90,85,204,124,119,199,193,0,59,187,42,169,51,53, -170,92,90,85,87,246,31,31,193,3,187,238,218,153,157,149,68,37,36,42,39,135,17, -17,17,0,62,238,217,153,51,53,85,82,36,34,167,136,97,17,16,0,3,222,217,211,0,6, -68,34,36,42,247,136,246,17,96,0,3,221,221,211,0,6,68,85,36,34,247,136,246,225, -96,0,59,187,42,169,51,53,68,133,36,42,39,136,246,209,96,3,187,238,218,153,157, -149,68,40,36,34,167,136,246,145,96,0,62,238,217,153,51,53,68,85,36,42,39,136, -246,225,96,0,3,222,217,211,0,6,68,130,36,34,167,136,246,209,96,0,3,221,221,211, -51,54,68,85,36,42,247,136,246,145,96,0,59,187,42,169,51,53,68,85,36,34,247,136, -246,225,96,3,187,238,218,153,157,149,68,34,36,42,39,136,246,209,96,0,62,238,217, -153,51,53,68,85,36,34,167,136,118,145,96,0,3,62,217,51,59,230,68,34,36,42,39, -136,201,153,16,0,0,3,51,0,50,182,68,34,36,34,167,135,106,153,16,0,0,0,0,0,3,54, -85,82,36,42,247,140,250,169,145,0,0,0,0,0,0,6,136,37,36,34,247,134,34,221,209,0, -0,0,0,0,0,0,102,72,68,42,39,134,187,238,236,0,0,0,0,0,0,0,0,102,104,34,166,102, -203,238,192,0,0,0,0,0,0,0,0,0,6,68,105,209,203,190,192,0,0,0,0,0,0,0,0,0,0,102, -1,145,28,188,0,0,0,0,0,0,0,0,0,0,0,0,0,17,16,192,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 4, ammo: plasma -175,0,6,2,4,5,206,7,205,142,207,116,62,1,115,201,0,0,0,0,17,17,17,17,17,17,0,1, -16,0,0,0,0,0,0,1,52,66,66,66,68,67,16,22,97,0,0,0,0,0,0,19,67,17,17,17,17,52,17, -24,129,17,17,16,0,0,1,52,49,15,255,17,243,17,221,21,65,221,61,16,0,0,1,67,16, -250,104,143,52,51,51,53,67,61,67,16,0,0,1,65,1,166,136,190,53,68,68,67,52,67,84, -16,0,0,1,65,1,166,136,187,53,68,68,68,68,67,84,16,0,0,1,65,1,166,104,190,50,85, -85,85,85,84,37,16,0,0,1,65,0,54,102,104,50,85,85,85,85,84,37,16,0,0,1,65,0,243, -51,51,247,34,34,34,34,37,114,16,0,0,0,17,1,104,187,190,55,34,194,44,46,230,114, -16,0,0,1,17,1,166,136,139,55,34,146,41,46,138,114,16,0,0,0,17,1,166,104,142,55, -34,146,156,46,138,114,16,0,0,1,17,0,54,102,104,55,204,153,194,40,170,114,16,0,0, -0,17,0,243,51,51,247,201,34,34,34,37,114,16,0,0,1,17,1,104,187,190,55,34,44,44, -34,37,114,16,0,0,0,17,1,166,136,187,55,41,41,41,34,37,114,16,0,0,1,17,1,166,104, -190,55,41,41,41,34,37,114,16,0,0,0,17,0,54,102,104,55,44,41,146,34,37,114,16,0, -0,1,17,0,243,51,51,247,34,34,44,34,37,114,16,0,0,0,17,1,104,187,190,55,34,146, -41,34,37,114,16,0,0,1,17,1,166,136,187,55,34,146,146,34,37,114,16,0,0,1,65,1, -166,104,190,55,34,153,41,34,37,114,16,0,0,1,65,0,54,102,104,55,201,34,34,34,37, -114,16,0,0,1,65,0,243,51,51,247,146,194,34,36,37,114,16,0,0,1,65,1,104,187,190, -55,34,146,146,37,37,114,16,0,0,1,65,1,166,136,187,55,34,146,201,36,37,114,16,0, -0,1,67,17,166,104,136,55,34,153,34,34,37,114,16,0,0,1,52,61,54,102,104,55,34,34, -34,34,37,114,16,0,0,0,19,67,29,221,221,245,85,85,85,85,84,84,16,0,0,0,1,52,66, -66,66,67,51,17,19,49,17,17,16,0,0,0,0,17,17,17,17,17,17,0,1,16,0,0,0 -, // 5, tree -175,0,5,3,4,196,20,114,2,38,115,17,22,192,37,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,0,0,0,1,17,16,0,0,0,0,0,0,0,17,22,36,0,0,0,25, -153,145,0,0,0,0,0,0,1,36,130,36,0,0,1,153,238,81,0,0,0,0,17,17,1,34,130,36,0,0, -1,158,229,167,16,0,0,17,153,238,17,34,130,36,0,0,17,158,85,167,16,0,0,25,85,85, -81,34,131,36,0,1,193,229,90,125,16,1,0,1,21,85,81,34,40,68,1,17,193,229,167,113, -0,28,16,0,1,218,81,34,72,51,1,204,204,122,119,17,1,193,0,0,25,170,161,36,130,36, -0,17,204,103,209,241,22,16,0,1,154,173,17,40,34,36,0,0,17,204,59,179,111,16,0,0, -29,216,129,56,98,36,0,0,0,17,22,51,177,0,0,1,102,51,49,36,134,36,0,0,0,0,1,54, -61,17,17,28,99,51,177,34,72,52,0,17,17,0,29,214,104,255,182,198,51,187,177,34, -36,131,1,153,145,17,204,204,198,59,204,51,59,191,241,34,40,36,1,158,87,204,195, -60,204,204,99,51,191,17,17,34,40,36,25,149,90,115,63,220,204,99,51,191,209,85, -81,34,36,131,25,229,90,125,241,99,220,63,17,31,182,221,81,34,72,52,30,85,167, -113,22,61,204,241,209,1,31,99,209,36,134,36,30,90,167,209,102,251,198,29,113,0, -1,179,49,56,98,36,1,170,125,19,63,28,49,119,16,0,1,251,49,40,34,36,0,23,209,87, -17,28,177,17,0,0,0,31,177,36,130,36,0,1,21,167,16,22,177,0,0,0,1,145,177,34,72, -51,0,1,90,125,16,19,16,0,0,1,25,27,49,34,40,68,0,0,17,17,0,23,16,0,0,25,229,211, -49,34,131,36,0,0,0,0,1,153,17,0,0,1,26,173,49,34,130,36,0,0,0,0,25,238,87,16,0, -0,1,17,17,34,130,36,0,0,0,0,30,229,167,16,0,0,0,0,1,36,130,36,0,0,0,0,30,90,125, -16,0,0,0,0,0,17,22,36,0,0,0,0,1,167,209,0,0,0,0,0,0,0,1,17,0,0,0,0,0,17,16,0,0, -0,0,0,0,0,0,0 -, // 6, finish -175,3,4,0,5,1,2,6,50,7,198,209,48,42,44,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,147,3,51,51,51,51,51, -51,51,51,51,51,51,51,51,54,115,3,153,153,153,34,153,153,146,41,153,153,34,153, -153,153,115,3,119,119,119,34,119,119,114,39,119,119,34,119,119,119,67,3,68,68, -71,119,119,119,119,119,119,119,119,119,119,119,67,3,68,68,71,34,34,34,34,34,34, -34,34,34,34,34,67,53,85,85,71,40,136,136,136,136,136,136,136,136,129,68,115,49, -170,165,36,43,204,204,95,102,102,102,102,102,97,71,115,49,170,165,36,43,204,197, -246,102,102,102,102,102,97,65,67,49,161,165,36,43,187,255,216,136,136,136,136, -136,129,65,67,49,17,21,36,43,187,253,136,136,136,136,136,136,129,65,67,49,161, -165,36,43,187,253,136,136,136,136,136,136,129,65,67,49,26,21,36,43,102,129,17, -17,17,17,17,17,17,65,67,49,161,165,18,43,102,129,17,17,17,17,17,17,17,65,67,49, -17,21,18,43,102,129,17,17,17,17,17,17,17,65,67,49,170,165,18,43,17,34,34,34,34, -34,34,34,33,65,67,49,17,21,18,43,17,34,34,34,34,34,34,34,33,65,67,49,161,21,18, -43,18,68,68,68,68,68,68,68,65,65,67,49,170,165,142,43,18,68,68,68,68,68,68,68, -65,65,67,49,161,21,142,43,18,119,119,119,119,119,119,119,113,85,83,53,85,85,142, -38,18,68,68,68,68,68,68,68,65,245,83,3,102,102,97,34,34,34,34,34,34,34,34,34,33, -255,99,3,102,102,97,85,85,85,85,85,85,85,85,85,85,85,99,3,102,102,102,17,102, -102,97,22,102,102,17,102,102,102,99,3,85,85,85,17,85,85,81,21,85,85,17,85,85,86, -99,3,51,51,51,51,51,51,51,51,51,51,51,51,51,53,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, -83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0 -, // 7, teleport -175,0,151,6,3,143,5,134,4,53,55,63,127,45,71,2,0,0,0,0,17,16,0,0,1,17,0,0,0,0,0, -0,0,0,0,1,56,17,0,0,19,129,16,0,1,17,17,16,0,0,0,1,102,129,0,0,22,104,16,0,31, -241,17,17,0,0,0,1,102,129,0,0,22,104,16,0,24,143,31,241,0,1,17,17,68,68,17,17, -20,68,65,17,19,56,248,129,0,20,51,51,51,51,51,51,51,51,51,51,143,51,246,97,0,19, -68,68,34,34,34,37,85,34,34,37,17,99,134,97,0,19,68,187,178,238,165,87,82,34,137, -204,145,68,72,129,0,19,190,37,82,39,82,34,114,85,124,119,159,68,68,65,0,19,68, -39,114,85,85,87,199,204,205,215,223,152,132,65,0,19,190,39,114,85,34,89,121,220, -205,217,223,116,79,241,0,19,69,172,206,165,34,34,85,119,204,119,212,125,70,132, -0,19,68,172,202,170,190,34,85,34,217,153,148,121,70,132,0,19,74,172,203,170,226, -34,85,34,221,153,152,121,70,132,0,19,74,170,187,170,226,34,85,37,124,119,152, -121,134,132,0,19,171,235,226,85,34,37,87,119,199,217,152,121,214,132,0,19,75, -187,178,87,34,85,119,119,199,153,157,121,214,132,0,19,68,187,187,186,34,34,85, -37,119,119,157,121,214,132,0,19,69,187,187,234,178,34,114,34,156,201,152,121, -134,132,0,19,68,90,170,170,174,34,114,34,156,201,152,121,134,132,0,19,170,74, -190,229,114,37,85,119,124,204,152,121,70,132,0,19,90,87,34,37,82,89,121,156,204, -221,157,116,68,241,0,19,68,71,34,37,85,85,119,204,205,215,159,118,51,49,0,19, -165,39,34,34,114,37,114,85,87,85,159,147,54,49,0,19,170,187,178,235,162,34,85, -34,204,153,159,99,134,97,0,19,68,68,34,34,34,34,34,34,37,85,129,131,134,97,0,20, -51,51,51,51,51,51,51,51,51,51,212,99,246,97,0,1,17,17,68,68,17,17,20,68,65,17, -24,54,246,129,0,0,0,1,102,129,0,0,22,104,16,0,19,111,24,129,0,0,0,1,102,129,0,0, -22,104,16,0,22,129,20,65,0,0,0,1,56,17,0,0,19,129,16,0,1,17,17,16,0,0,0,0,17,16, -0,0,1,17,0,0,0,0,0,0 -, // 8, computer terminal -175,0,1,85,5,4,23,6,9,26,80,65,2,84,161,194,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,17,0,1,17,17,17,17,17,17,0,1,16,0,0,0,1,116,0,22,101,101,102,102,102, -101,16,1,65,0,0,238,225,117,1,99,53,53,51,51,51,53,187,27,75,17,17,238,17,69,22, -60,129,17,17,17,17,139,83,102,74,140,158,233,154,69,22,56,148,68,68,68,73,21,51, -54,74,142,238,51,25,69,22,49,66,34,34,34,36,19,68,54,90,238,141,61,169,69,21, -177,66,242,242,34,36,19,119,54,202,131,51,218,121,69,22,49,66,242,34,34,36,31, -119,54,90,141,216,167,121,69,22,49,66,242,242,34,36,131,119,54,202,17,138,119, -73,69,22,49,66,242,34,34,36,207,119,54,90,87,119,68,89,69,22,49,66,242,34,34,36, -195,119,54,90,148,68,85,89,69,22,49,66,34,34,34,36,195,119,54,90,181,85,85,89, -69,22,49,79,255,255,255,244,195,119,54,202,185,153,149,89,69,22,49,66,34,34,34, -36,195,119,54,90,185,153,153,153,69,22,49,66,34,34,34,36,140,119,54,90,17,138, -187,153,85,22,49,66,34,34,34,36,19,119,54,202,141,216,171,187,69,21,177,66,34, -34,34,36,28,119,54,90,131,51,218,187,85,22,49,66,34,34,34,36,19,68,54,90,133,85, -93,171,149,22,56,148,68,68,68,73,21,51,54,74,141,221,93,27,89,22,60,129,17,17, -17,17,139,83,54,74,136,136,136,138,149,1,51,60,60,51,51,51,53,187,27,75,17,17, -17,17,153,0,24,140,140,136,136,136,136,16,1,65,0,0,0,1,153,0,1,17,17,17,17,17, -17,0,1,16,0,0,0,1,187,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0 -, // 9, column -175,2,4,3,5,48,6,63,51,7,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,65,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,20,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,73,16,0,0,0,0,0,0,0, -0,0,0,0,0,1,148,38,145,16,0,0,16,0,0,0,1,0,0,0,1,22,146,36,105,145,17,17,33,17, -17,17,23,17,17,17,25,150,98,36,102,67,119,119,41,121,150,102,103,119,118,121,54, -150,98,36,70,67,68,71,36,68,68,68,71,66,119,119,57,70,66,50,68,67,36,68,40,68, -68,67,34,66,36,68,52,36,66,34,34,35,51,51,40,34,50,40,34,35,50,34,52,36,66,50, -34,33,49,129,40,35,131,49,50,35,50,50,20,36,66,35,34,33,17,17,40,129,51,49,18, -51,50,131,18,36,34,51,51,49,17,24,33,19,51,17,50,56,51,131,18,34,66,50,51,49,26, -161,33,51,17,19,50,17,51,19,19,50,51,51,19,49,170,161,35,17,17,17,18,51,19,19, -19,50,35,49,19,17,161,168,34,130,35,56,34,34,33,131,17,34,33,49,50,53,85,85,37, -85,85,85,82,85,85,85,82,67,49,17,42,160,0,0,16,0,0,0,1,0,0,0,10,162,33,19,160,0, -0,0,0,0,0,0,0,0,0,0,0,10,33,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,17,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 10, ruin -175,5,4,3,50,153,2,75,12,6,13,21,240,17,74,83,0,0,0,0,0,0,0,5,0,0,0,9,25,56,18, -19,0,0,0,0,0,0,0,5,0,0,0,145,34,162,56,35,0,0,0,0,0,0,0,117,0,0,0,18,19,49,35, -50,0,0,0,0,119,87,116,69,119,87,82,25,34,51,50,162,0,0,0,5,84,84,84,84,84,85,69, -154,34,34,51,34,0,0,0,0,0,0,0,117,0,0,2,145,33,177,19,50,0,0,0,0,0,0,0,236,0,0, -153,17,17,18,34,51,0,0,0,0,0,0,0,204,0,9,155,17,177,17,17,19,0,0,0,0,0,0,0,236, -0,9,17,17,34,17,17,131,0,0,0,0,0,0,17,17,17,17,17,17,161,17,17,38,0,0,0,0,0,1, -17,35,51,17,177,17,17,17,19,99,0,0,0,0,0,1,19,35,57,33,17,17,18,177,35,102,0,0, -0,0,0,2,24,51,17,17,17,18,17,17,54,102,0,0,0,7,119,124,34,56,33,177,17,27,18,18, -102,214,0,0,0,119,84,92,19,50,33,18,33,17,17,40,99,51,0,0,119,117,0,4,19,51,161, -17,17,17,27,54,70,111,0,0,0,0,0,3,35,67,49,177,33,17,18,99,18,34,0,0,0,0,0,0,34, -51,52,50,34,162,38,49,161,130,0,0,0,0,0,0,65,34,130,68,50,18,131,34,17,33,0,0,0, -0,0,0,49,35,34,52,72,34,99,18,18,42,0,0,0,0,0,0,66,35,35,56,68,214,49,34,33,34, -0,0,7,119,71,71,193,51,50,51,34,70,50,18,162,33,0,0,0,85,84,84,65,35,131,50,132, -70,33,18,34,34,0,0,0,0,0,0,49,35,51,51,52,70,34,35,51,50,0,0,0,0,0,0,51,52,68, -67,68,46,131,51,51,51,0,0,0,0,0,0,244,68,221,77,221,34,102,102,54,109,0,0,0,0,0, -0,0,7,80,0,6,18,35,238,102,102,0,0,0,0,0,0,0,7,80,0,3,18,34,243,51,230,0,0,0,0, -0,84,68,71,84,119,117,146,34,40,51,246,0,0,0,0,0,0,68,85,85,85,67,18,35,35,34, -52,0,0,0,0,0,0,0,5,80,0,0,51,51,51,51,51,0,0,0,0,0,0,0,5,0,0,0,0,51,50,51,35 -, // 11, lamp -175,0,49,31,7,106,27,28,107,3,4,105,1,2,26,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,220,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,220, -16,0,0,0,0,0,0,0,0,0,0,0,0,0,29,220,193,0,0,0,0,0,0,0,0,0,0,0,0,0,22,220,91,0,0, -0,0,0,0,0,0,17,0,1,16,85,103,146,88,85,0,0,0,0,0,0,1,33,0,22,133,51,103,146,232, -51,80,0,0,0,0,0,1,33,17,215,131,51,103,146,248,67,80,0,0,1,16,0,25,33,28,103, -132,68,103,146,248,68,59,187,177,26,33,17,153,33,28,119,132,68,231,98,232,68,55, -119,226,42,34,34,153,33,28,167,132,68,103,111,104,68,59,187,177,26,33,17,169,33, -17,167,131,51,119,98,136,67,80,0,0,1,16,0,26,33,0,23,85,51,119,111,230,51,80,0, -0,0,0,0,1,33,0,1,16,85,119,146,230,85,0,0,0,0,0,0,1,33,0,0,0,0,26,146,97,0,0,0, -0,0,0,0,0,17,0,0,0,0,26,162,241,0,0,0,0,0,0,0,0,0,0,0,0,0,1,175,16,0,0,0,0,0,0, -0,0,0,0,0,0,0,1,162,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 12, access card -175,0,21,45,44,23,46,2,19,34,69,22,68,60,131,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,1, -68,17,24,102,101,86,97,0,0,0,0,0,0,0,0,1,68,17,24,102,85,86,101,16,0,0,0,0,0,0, -0,1,67,17,24,101,85,86,101,183,16,0,0,0,0,0,0,1,51,17,24,85,85,102,59,178,16,0, -0,0,0,0,0,1,51,17,24,85,86,232,219,34,240,0,0,0,0,0,0,1,51,17,24,85,86,131,130, -34,240,0,0,0,0,0,0,1,51,17,24,85,102,52,114,34,16,0,0,0,0,0,0,1,54,17,24,86,99, -56,66,34,16,0,0,0,0,0,0,1,102,17,24,86,51,141,114,34,16,0,0,0,0,0,0,1,101,17,24, -102,51,211,114,34,16,0,0,0,0,0,0,1,101,17,24,99,51,55,114,34,16,0,0,0,0,0,0,1, -85,17,24,51,51,119,226,34,16,0,0,0,0,0,0,1,85,17,24,51,52,71,34,34,16,0,0,0,0,0, -0,1,85,17,24,51,52,119,130,34,16,0,0,0,0,0,0,1,85,17,24,51,68,228,114,34,16,0,0, -0,0,0,0,1,85,17,24,52,68,66,34,34,16,0,0,0,0,0,0,1,86,17,25,52,68,66,34,34,16,0, -0,0,0,0,0,1,86,17,23,68,68,34,34,34,16,0,0,0,0,0,0,1,102,17,23,68,68,34,34,34, -16,0,0,0,0,0,0,1,99,17,23,68,153,153,114,34,16,0,0,0,0,0,0,1,99,17,23,68,154, -170,114,34,16,0,0,0,0,0,0,1,51,17,23,68,154,204,114,34,16,0,0,0,0,0,0,1,51,17, -23,68,154,204,114,34,16,0,0,0,0,0,0,1,51,17,23,68,151,119,114,34,16,0,0,0,0,0,0, -1,51,17,23,66,130,34,130,34,16,0,0,0,0,0,0,1,51,17,23,66,130,34,130,34,16,0,0,0, -0,0,0,0,17,17,17,17,17,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_backgroundImages[3 * SFG_TEXTURE_STORE_SIZE] = -{ -// 0, city -64,10,73,168,19,12,14,13,80,1,72,101,0,100,136,57,17,17,17,68,87,119,119,119, -118,8,0,32,0,46,34,154,17,17,20,85,84,85,119,118,102,96,0,130,130,2,34,154,17, -17,20,65,68,69,119,102,99,48,48,0,2,32,34,154,17,17,17,17,68,68,87,118,102,102, -104,0,2,14,34,154,17,17,17,20,69,69,51,51,0,8,0,224,2,32,34,154,17,17,17,20,85, -87,60,204,195,51,0,0,0,2,34,154,17,17,17,68,85,119,252,204,51,224,48,0,0,32,34, -154,17,17,17,68,85,119,51,51,48,3,0,0,130,34,34,154,17,17,68,68,85,119,119,102, -102,104,48,40,32,32,34,154,17,17,20,69,87,119,119,102,102,102,128,128,0,2,34, -154,17,17,17,69,87,51,51,51,0,8,48,40,32,32,34,154,17,17,17,20,87,60,252,252, -243,51,0,0,128,2,34,154,65,17,17,20,85,60,204,204,51,48,48,0,32,32,34,154,17,17, -17,68,85,51,63,51,48,51,8,130,130,2,34,154,17,17,20,69,103,181,85,86,102,0,56,0, -0,46,34,154,17,17,17,69,85,187,85,91,102,3,15,0,0,2,34,154,17,17,17,68,85,187, -51,51,0,8,8,0,0,32,34,154,17,17,17,68,77,187,51,51,48,0,142,0,0,2,34,154,17,17, -17,68,77,219,51,51,0,8,48,0,0,32,34,154,17,17,65,69,51,51,60,204,195,51,224,0,0, -2,34,154,17,17,68,69,63,239,204,204,51,48,224,0,0,32,34,154,17,17,71,69,51,51, -51,51,48,240,136,128,14,2,34,154,68,17,71,68,85,221,187,219,176,8,48,40,32,46, -34,154,17,17,20,68,69,93,219,211,48,0,0,0,0,2,34,154,17,17,68,68,77,219,221,211, -0,8,48,0,224,32,34,154,65,20,69,85,84,219,221,179,48,0,136,128,0,2,34,154,17,68, -69,85,119,123,221,219,182,104,8,32,0,32,34,154,17,17,68,69,87,107,221,187,102, -102,102,128,0,2,34,154,17,17,20,85,87,107,219,190,0,8,8,0,0,32,34,154,17,17,20, -84,86,107,182,102,102,3,224,0,2,2,34,154,17,17,20,68,71,103,118,110,0,8,0,40,34, -32,34,154,17,17,17,68,71,102,103,102,102,102,104,128,0,2,34,154 -, // 1, reddish scifi interior -168,18,17,19,65,153,1,9,152,232,0,45,61,80,96,160,18,114,34,34,34,34,34,80,0,0, -0,0,0,0,0,0,18,114,34,34,34,34,34,80,0,0,0,0,0,0,0,0,0,215,34,34,34,34,34,80,0, -0,0,0,0,0,0,0,0,119,34,34,34,34,34,80,0,0,0,0,0,0,0,0,0,214,34,34,34,34,34,34, -32,0,0,0,0,0,0,0,0,118,34,34,34,34,34,34,36,69,0,0,0,0,0,0,18,118,17,17,17,17, -17,17,20,69,0,0,0,0,0,0,18,118,17,17,17,17,17,17,20,69,0,0,0,0,0,0,18,118,114, -34,34,34,34,34,116,69,0,0,0,0,0,0,18,118,130,34,34,38,0,0,0,0,0,0,0,0,0,0,18, -118,135,34,34,34,0,0,0,0,0,0,0,0,0,0,85,86,138,34,34,34,34,41,133,0,0,0,0,0,0,0, -0,86,138,17,17,17,17,25,133,85,0,0,0,0,0,0,0,86,138,17,17,17,27,25,132,70,0,0,0, -0,0,0,0,85,85,85,17,17,17,25,132,70,0,0,0,0,0,0,0,0,0,5,17,17,17,25,132,70,0,0, -0,0,0,0,0,0,0,5,17,27,17,25,132,70,0,0,0,0,0,0,0,6,128,17,17,17,17,25,132,70,0, -0,0,0,0,0,16,118,128,17,17,27,17,25,246,0,0,0,0,0,0,0,16,118,128,17,17,17,17,25, -132,0,0,0,0,0,0,0,16,118,128,51,51,51,51,57,246,0,0,0,0,0,0,0,16,118,130,51,51, -51,51,50,132,0,0,0,0,0,0,0,16,118,130,51,51,51,51,50,132,0,0,0,0,0,0,0,16,118, -131,51,51,51,51,51,132,70,0,0,0,0,0,0,0,0,5,60,51,51,51,51,36,70,0,0,0,0,0,0,0, -0,5,51,51,51,51,51,36,70,0,0,0,0,0,0,0,14,229,51,51,51,51,51,52,70,0,0,0,0,0,0, -85,85,51,195,51,51,51,51,52,64,0,0,0,0,0,0,18,114,17,17,17,17,17,17,18,64,0,0,0, -0,0,0,18,113,17,17,17,17,17,17,17,64,0,0,0,0,0,0,18,115,51,51,51,51,51,80,0,0,0, -0,0,0,0,0,18,115,51,51,51,51,51,80,0,0,0,0,0,0,0,0 -, // 2, red city at night -171,1,175,90,172,174,173,25,27,30,91,103,0,0,0,0,113,23,113,17,51,68,68,102,102, -85,82,34,34,34,38,49,113,23,113,17,51,68,68,102,102,85,82,34,34,34,35,51,113,0, -0,0,0,0,0,0,68,69,85,19,4,101,166,17,113,0,0,4,68,102,102,85,85,81,17,19,4,101, -38,54,113,0,0,4,68,102,102,85,85,81,17,19,4,101,38,51,113,0,0,4,68,102,102,85, -85,82,33,19,4,101,34,49,113,0,0,0,0,0,0,0,4,69,81,19,4,101,42,17,119,17,17,17, -17,0,4,68,102,85,85,35,4,101,42,51,135,17,17,51,51,51,0,0,0,0,68,83,4,101,34,17, -152,113,17,59,51,48,0,4,68,102,85,19,4,101,34,83,152,113,17,51,51,48,0,4,68,17, -17,19,4,101,42,51,135,113,17,51,51,48,0,4,68,17,17,19,4,101,164,17,119,17,17,59, -51,48,0,4,68,102,82,19,4,101,165,17,119,17,17,51,51,51,0,0,0,0,69,85,85,34,37, -51,119,113,17,17,17,16,4,68,102,101,82,37,85,34,34,102,119,119,17,19,51,0,4,70, -102,85,34,37,85,34,34,34,119,119,17,17,17,0,4,70,101,85,34,37,85,34,34,34,119, -17,17,17,17,16,4,70,101,82,38,17,48,70,51,34,113,16,0,0,0,0,0,0,102,102,33,17, -48,67,50,38,17,16,176,176,0,4,68,102,101,82,33,17,48,17,51,51,113,16,0,0,0,4,68, -102,101,82,33,17,48,17,51,50,113,16,0,0,0,4,68,102,101,82,38,17,48,17,51,51,135, -17,17,17,17,16,0,0,0,82,34,34,34,35,50,34,136,113,17,17,17,19,0,0,70,85,85,34, -34,36,51,36,136,113,17,16,0,3,48,0,0,0,68,102,82,36,17,17,152,135,17,16,0,0,51, -0,4,68,85,85,34,33,17,22,153,135,17,16,0,0,0,0,0,0,68,102,82,37,17,17,153,135, -17,17,17,16,0,68,70,101,1,19,4,101,81,34,152,119,16,0,0,0,4,68,64,17,17,19,4, -101,34,36,152,119,16,0,0,0,0,68,70,101,1,19,4,101,35,51,135,119,16,0,0,0,0,4,70, -101,85,34,34,34,35,54,119,23,16,0,0,0,0,0,0,4,69,82,34,34,35,51 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_weaponImages[6 * SFG_TEXTURE_STORE_SIZE] = -{ -// 0, knife -175,0,5,2,6,4,3,83,1,77,85,61,60,62,63,75,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,1,153,163,16,0,0,0,0,0,0,0,0,0,0,0,0,1,170, -167,16,0,0,0,0,0,0,0,0,0,0,0,0,1,154,151,16,0,0,0,0,0,0,0,0,0,0,0,0,0,26,119,16, -0,0,0,0,0,0,0,0,0,0,1,17,17,58,119,16,0,0,0,0,0,0,0,0,1,17,20,78,219,57,115,16, -0,0,0,0,0,0,0,17,29,68,68,68,219,57,49,17,17,0,0,0,0,0,17,34,68,238,68,68,219, -57,131,102,102,0,0,0,0,17,85,34,68,68,68,68,43,63,134,102,102,0,0,0,17,34,85,36, -68,78,66,34,37,63,54,102,102,0,0,17,34,36,34,34,36,68,213,188,86,63,54,51,51,0, -1,34,36,43,181,82,34,34,43,44,86,63,51,51,51,0,18,36,69,204,205,34,68,66,34,85, -86,63,51,51,51,1,34,75,204,85,180,68,68,68,37,82,86,63,51,51,51,1,36,188,181,91, -45,222,238,210,85,34,86,63,131,51,136,22,102,102,101,101,82,46,66,34,85,85,86, -57,136,136,136,17,17,17,129,17,17,18,82,38,85,101,86,57,56,136,136,0,0,0,0,0,0, -1,18,83,92,133,83,57,120,17,17,0,0,0,0,0,0,0,8,136,83,22,83,58,119,128,0,0,0,0, -0,0,0,0,0,0,17,1,104,57,119,128,0,0,0,0,0,0,0,0,0,0,0,0,17,58,119,128,0,0,0,0,0, -0,0,0,0,0,0,0,0,26,119,16,0,0,0,0,0,0,0,0,0,0,0,0,1,154,151,16,0,0,0,0,0,0,0,0, -0,0,0,0,1,170,167,16,0,0,0,0,0,0,0,0,0,0,0,0,1,153,163,16,0,0,0,0,0,0,0,0,0,0,0, -0,0,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 1, shotgun -175,1,3,4,6,101,5,17,7,100,2,99,19,21,25,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17,0, -0,0,0,0,0,0,0,0,0,0,0,17,17,121,153,0,0,0,0,0,0,0,0,0,0,1,17,100,55,149,85,0,0, -0,0,0,0,0,0,1,17,22,67,70,121,85,221,0,0,0,0,0,0,0,17,19,52,136,65,38,123,85, -221,0,0,0,0,0,17,17,102,104,132,68,97,38,123,149,93,0,0,0,0,17,70,68,136,68,52, -136,52,70,123,149,93,0,0,0,1,68,36,132,72,131,100,67,54,99,123,185,93,0,0,0,20, -68,36,136,136,67,54,34,97,35,126,185,85,0,0,0,24,138,72,132,102,102,34,163,49, -35,126,235,85,0,0,1,68,74,68,70,102,102,51,51,51,51,39,170,85,0,0,1,68,67,67,51, -51,51,50,34,34,33,42,126,149,0,0,113,19,51,163,34,34,34,34,34,34,33,42,119,149, -0,5,190,225,47,162,242,255,255,255,250,250,175,167,113,233,0,7,119,238,238,119, -119,119,23,23,17,17,17,113,17,238,0,0,1,238,239,255,204,204,204,204,204,204,255, -167,113,233,0,7,119,238,236,153,149,85,85,85,85,85,153,204,113,149,0,5,190,225, -51,242,34,34,34,34,34,34,33,34,119,149,0,0,113,20,67,52,68,136,68,70,102,51,49, -34,123,85,0,0,1,136,138,72,136,136,136,132,68,136,136,98,121,85,0,0,1,68,74,100, -68,68,132,72,136,65,40,103,185,93,0,0,0,19,58,52,102,102,68,51,52,65,38,55,149, -93,0,0,0,22,102,166,51,51,58,35,34,100,70,123,85,221,0,0,0,1,102,51,51,35,58, -162,42,163,51,123,85,221,0,0,0,0,17,34,102,50,34,175,34,161,34,123,149,93,0,0,0, -0,0,17,17,38,102,99,50,161,42,123,149,93,0,0,0,0,0,0,0,17,19,50,102,106,42,123, -185,85,0,0,0,0,0,0,0,0,1,17,18,58,58,126,185,85,0,0,0,0,0,0,0,0,0,0,1,17,51,167, -235,85,0,0,0,0,0,0,0,0,0,0,0,0,17,17,122,153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 2, machine gun -175,4,2,3,0,1,5,6,60,59,50,53,61,62,73,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,68,68,64,0,0,0,0, -0,0,0,0,0,0,0,68,18,34,85,84,68,68,64,0,0,0,0,0,0,0,4,113,34,37,85,87,119,19, -164,0,0,0,0,0,0,0,71,18,37,85,114,39,113,49,245,0,0,0,0,0,0,0,65,85,87,34,119, -119,17,17,37,0,0,0,0,0,0,4,85,114,39,119,119,118,22,19,37,0,0,0,0,0,0,71,119, -119,17,97,140,177,17,50,37,0,0,0,0,0,4,97,17,51,49,17,27,177,51,162,85,0,0,0,0, -68,66,17,19,51,152,50,35,51,162,85,85,0,0,4,68,104,99,17,58,35,136,22,22,49,51, -134,102,0,4,71,151,135,115,19,147,49,17,102,102,17,51,17,22,0,4,233,40,56,210, -19,51,49,17,102,97,17,51,17,17,0,4,66,35,33,18,19,51,17,22,102,17,22,51,17,17,0, -0,4,68,50,53,147,23,118,102,102,17,102,51,129,17,0,0,0,0,68,69,147,49,17,103, -119,103,113,162,85,85,0,0,0,0,0,4,41,17,22,102,17,22,195,51,162,85,0,0,0,0,0,0, -66,34,34,51,54,108,131,51,50,37,0,0,0,0,0,0,4,69,37,82,34,34,35,49,51,37,0,0,0, -0,0,0,0,65,85,82,85,34,34,49,19,37,0,0,0,0,0,0,0,65,34,85,85,37,82,35,51,37,0,0, -0,0,0,0,0,4,18,34,85,85,82,34,51,36,0,0,0,0,0,0,0,0,68,18,37,85,84,68,68,64,0,0, -0,0,0,0,0,0,0,68,68,68,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 3, rocket launcher -175,0,115,2,37,7,25,117,6,116,114,21,5,38,39,1,0,0,0,0,0,0,0,0,0,0,0,0,0,17,17, -0,0,0,0,0,0,0,0,0,0,0,0,17,17,196,51,16,0,0,0,0,0,0,0,0,0,0,1,136,140,67,195,16, -0,0,0,0,0,0,0,0,0,0,1,68,68,67,195,16,0,0,0,0,0,0,0,0,0,0,1,51,51,51,63,17,0,0, -0,0,1,17,16,0,0,0,17,255,255,255,255,250,0,0,0,17,19,51,49,16,17,17,119,121,255, -170,175,164,0,0,17,204,51,51,51,49,119,119,121,146,175,74,148,68,0,1,204,51,102, -98,146,151,146,146,34,41,40,153,119,119,0,27,195,54,98,34,34,34,41,153,153,121, -135,119,119,119,1,184,51,102,41,151,41,153,41,119,116,68,132,77,221,221,1,136, -54,103,119,114,119,114,116,77,220,72,222,221,237,221,1,86,102,39,68,66,34,34,72, -136,136,69,136,136,136,142,24,86,102,125,68,204,200,136,136,136,142,69,142,238, -238,102,21,86,99,126,238,229,85,85,85,85,85,197,85,85,102,221,21,83,51,126,229, -85,85,85,85,85,85,197,85,86,221,187,24,83,51,116,68,68,221,221,221,221,238,69, -238,103,219,68,28,83,51,34,68,68,68,71,119,119,68,72,221,109,180,68,28,131,54, -34,34,34,41,153,153,151,116,152,68,103,116,68,1,131,102,98,34,34,34,34,34,34, -153,40,153,103,180,68,1,203,102,54,170,162,34,34,34,34,34,40,34,103,180,68,1, -204,51,51,102,170,170,170,170,34,34,34,130,103,180,68,0,28,195,51,54,255,102, -102,106,170,170,162,130,109,180,68,0,1,204,51,51,54,255,99,54,102,102,170,40, -109,187,68,0,0,17,204,51,51,51,49,246,54,102,102,40,103,187,68,0,0,0,17,19,51, -49,16,17,17,102,102,54,109,187,187,0,0,0,0,1,17,16,0,0,0,17,17,243,103,187,187, -0,0,0,0,0,0,0,0,0,0,0,0,17,107,180,75,0,0,0,0,0,0,0,0,0,0,0,0,0,18,180,68,0,0,0, -0,0,0,0,0,0,0,0,0,0,22,43,119,0,0,0,0,0,0,0,0,0,0,0,0,0,1,18,34,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,1,17 -, // 4, plasma gun -175,4,6,3,0,5,50,17,49,187,7,190,37,42,209,100,0,0,0,0,0,0,0,0,0,0,0,0,4,64,0, -68,0,0,0,0,0,0,0,0,0,0,68,0,76,148,68,170,0,0,0,0,0,0,0,4,64,4,198,64,70,106, -162,34,0,0,0,0,0,0,0,76,100,4,195,52,170,170,34,34,0,0,0,0,0,0,4,201,103,68,58, -170,162,34,34,102,0,0,0,0,68,0,4,195,55,170,90,34,34,51,102,17,0,0,0,68,85,64, -68,58,170,162,82,34,38,49,17,17,0,0,68,37,85,68,90,165,34,37,34,34,97,17,19,119, -0,4,34,85,68,170,82,34,85,82,34,37,113,17,55,34,0,74,37,136,170,85,34,34,34,34, -34,83,17,19,85,85,4,162,40,170,162,34,37,85,51,118,115,49,17,85,17,153,4,136, -136,134,102,102,99,49,17,19,17,19,21,89,187,187,74,37,17,17,17,17,17,17,17,17, -49,17,53,155,151,119,69,19,136,135,118,97,21,85,85,85,53,85,49,185,114,82,66,85, -81,56,150,150,22,22,145,105,22,145,27,183,34,21,66,85,17,56,185,185,185,185,187, -155,185,187,187,183,37,21,66,81,19,56,150,150,22,22,145,105,22,145,27,183,85,21, -65,51,136,135,118,97,21,85,85,85,53,85,49,185,113,49,69,17,18,34,34,34,34,34,34, -34,50,34,53,155,151,119,4,136,134,102,102,102,51,85,85,35,34,35,37,89,187,187,4, -17,56,17,17,17,17,19,103,103,119,114,34,85,17,153,0,67,51,136,51,136,17,17,17, -17,17,23,34,35,85,85,0,4,51,51,68,136,131,17,136,209,17,17,114,34,55,34,0,0,68, -56,136,68,232,62,51,61,17,17,111,34,35,119,0,0,0,119,136,64,68,119,136,51,131, -49,22,245,34,34,0,0,0,0,68,0,4,198,120,135,227,51,49,102,102,82,0,0,0,0,0,0,4, -201,103,68,119,115,51,51,51,214,0,0,0,0,0,0,0,76,148,4,201,68,115,51,51,51,0,0, -0,0,0,0,0,4,64,4,198,64,70,103,51,51,0,0,0,0,0,0,0,0,0,0,68,0,76,148,68,115,0,0, -0,0,0,0,0,0,0,0,0,0,4,64,0,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 5, solution -6,76,175,26,48,5,4,7,57,77,75,27,58,68,2,28,34,34,34,34,34,34,34,34,40,235,180, -34,36,68,66,68,34,34,34,68,68,34,34,34,71,119,119,66,67,51,52,17,34,34,68,53,86, -68,68,46,112,87,119,4,56,136,51,170,34,34,69,102,54,102,102,135,0,87,7,99,132, -174,131,170,34,34,64,182,51,54,103,112,0,87,0,99,134,108,234,170,34,34,64,96, -181,51,112,0,0,87,0,83,134,119,58,170,34,34,69,176,96,183,0,0,5,21,80,3,62,7, -124,170,34,68,69,54,102,112,0,5,105,145,21,0,54,0,7,202,68,85,104,136,55,0,0,97, -17,153,17,85,0,0,0,124,64,54,102,104,135,0,6,17,29,25,17,17,85,0,0,7,64,179,51, -54,103,0,81,17,17,17,153,17,25,80,0,0,64,101,182,51,55,0,81,17,26,17,217,145,17, -23,0,5,64,240,96,246,55,0,101,17,17,17,25,145,17,23,0,92,69,176,240,96,55,0,105, -81,218,209,209,153,17,23,0,202,68,70,54,181,48,0,97,150,144,154,13,153,17,23,0, -198,34,36,136,56,48,85,97,29,125,122,122,25,145,16,85,134,34,36,72,131,128,0,97, -29,1,13,10,17,145,23,0,134,68,70,51,51,48,80,97,26,145,144,157,17,25,23,0,138, -69,102,54,53,176,80,97,17,169,170,209,17,25,151,0,138,69,176,176,240,183,85,97, -17,25,145,17,17,17,151,0,88,64,240,96,101,183,5,81,17,26,153,209,17,17,112,0,5, -69,101,245,179,135,0,85,17,17,25,145,17,80,0,0,0,69,51,238,136,135,0,5,81,26,25, -97,7,5,0,0,6,68,136,136,131,55,0,0,85,81,17,151,0,0,80,0,60,34,68,133,54,54,112, -0,85,5,16,112,0,102,5,99,204,34,34,69,176,245,55,0,5,80,87,0,5,51,102,60,204,34, -34,64,240,182,51,112,0,85,87,0,6,56,51,204,202,34,34,64,182,51,56,135,112,5,87, -0,99,56,142,236,170,34,34,69,51,136,136,136,71,5,96,5,99,52,174,131,170,34,34, -68,136,136,68,68,36,112,102,99,136,51,56,131,170,34,34,34,68,68,34,34,34,70,102, -51,66,72,51,52,17,34,34,34,34,34,34,34,34,36,68,68,34,36,68,66,68 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_effectSprites[4 * SFG_TEXTURE_STORE_SIZE] = -{ -// 0, explostion -175,183,174,15,103,111,191,7,31,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0, -0,0,0,0,0,0,0,0,3,3,3,3,19,3,0,0,0,0,0,0,0,0,0,48,48,16,51,49,19,48,48,0,0,0,0, -0,0,0,3,3,1,1,19,17,131,51,49,0,0,0,0,1,16,0,0,48,50,34,20,85,120,49,17,64,0,0, -0,0,65,1,0,0,34,17,69,87,117,17,33,16,0,0,0,0,4,16,16,4,18,17,21,87,85,18,33,16, -0,0,0,1,9,34,34,17,34,17,21,85,85,66,17,48,0,0,0,65,18,34,34,17,65,22,85,86,68, -65,19,51,0,0,48,17,34,34,33,18,65,68,70,68,68,102,67,51,0,1,19,49,34,34,33,18, -36,132,100,70,97,20,81,17,51,48,17,18,34,18,18,34,33,119,85,86,97,33,81,51,48,3, -51,18,33,17,34,33,37,119,85,100,97,18,35,51,0,48,49,34,18,34,33,102,87,119,117, -97,17,34,34,16,48,1,17,18,33,17,22,104,119,119,117,81,18,18,33,67,0,1,65,18,33, -20,71,119,119,119,119,132,65,18,34,64,48,0,69,81,17,86,69,88,119,119,133,81,17, -18,34,147,0,0,56,21,69,86,70,103,119,119,116,17,18,34,34,144,0,3,51,56,86,102, -102,120,118,101,120,81,34,34,35,0,0,48,51,17,85,102,102,103,70,102,136,85,34,34, -17,0,0,3,49,19,53,84,102,100,70,102,88,133,84,66,17,19,0,48,51,51,85,68,102,68, -102,102,101,97,33,68,19,17,48,3,3,49,81,36,84,17,70,101,82,33,18,33,67,51,0,0, -51,49,17,33,33,33,70,102,66,34,34,34,17,51,48,0,3,17,18,34,33,34,20,129,18,34, -34,34,34,51,0,0,49,17,34,33,17,17,33,65,34,34,17,18,34,19,48,0,1,18,33,17,17,17, -34,34,33,145,17,18,34,19,48,0,1,17,17,19,49,49,18,17,49,19,49,18,34,35,51,0,0, -17,51,51,17,49,18,19,3,19,51,17,17,36,3,0,3,51,51,48,48,3,17,16,48,17,3,51,17, -16,0,0,3,48,3,3,0,0,16,19,0,0,0,51,51,0,0,0,51,0,0,0,0,0,1,3,48,0,51,51,48,0,0 -, // 1, fireball -175,103,183,7,191,111,254,31,95,180,173,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,0,16,0,0,0,0, -0,0,0,0,0,0,1,1,23,17,17,24,1,0,0,0,0,0,0,0,0,0,16,16,23,85,87,81,24,16,0,0,0,0, -0,0,0,1,8,17,119,115,55,119,17,129,16,0,0,0,0,0,0,0,129,23,119,51,51,55,113,24, -23,0,0,0,0,0,0,8,17,17,113,83,51,85,119,23,113,0,0,0,0,0,0,1,21,113,81,19,53,81, -17,119,129,0,0,0,0,0,0,17,19,53,17,19,50,17,17,113,16,16,0,0,0,0,1,33,83,49,17, -19,66,34,17,17,18,0,0,0,0,0,0,33,85,53,21,19,18,34,34,24,18,16,0,0,0,0,1,33,85, -85,84,68,20,34,35,66,98,0,0,0,0,0,0,33,83,53,20,68,51,51,51,70,34,16,0,0,0,0,1, -33,19,49,66,36,67,52,41,40,98,0,0,0,0,0,0,33,19,84,34,36,36,70,38,134,34,0,0,0, -0,0,0,8,21,81,18,36,66,98,102,166,32,0,0,0,0,0,0,2,21,81,18,68,68,38,134,105,33, -0,0,0,0,0,0,0,18,33,18,68,51,73,102,98,16,0,0,0,0,0,0,0,18,18,34,68,51,74,102, -102,16,0,0,0,0,0,0,0,1,17,18,34,36,38,38,129,0,0,0,0,0,0,0,0,0,8,134,38,34,34, -104,0,0,0,0,0,0,0,0,0,0,0,2,34,102,96,16,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0 -, // 2, plasma -175,199,126,213,198,215,118,46,125,204,124,134,45,117,135,116,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,1,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,68,16,0,0,0,0,0,0,0,0,0,0,16, -1,17,20,17,16,16,16,0,0,0,0,0,0,0,17,18,7,113,20,17,119,1,1,0,0,0,0,0,0,1,17,65, -16,34,67,50,33,17,16,0,0,0,0,0,0,1,36,34,1,19,153,51,33,65,0,0,0,0,0,0,0,14,37, -34,32,51,57,163,35,50,16,0,0,0,0,0,0,114,37,82,2,17,51,170,51,34,17,0,0,0,0,0,0, -18,51,83,34,17,3,152,138,43,178,16,0,0,0,0,1,20,34,52,83,163,32,123,136,199,34, -17,0,0,0,0,1,17,18,35,51,51,34,18,34,194,36,68,0,0,0,0,0,17,17,104,109,250,51, -18,34,34,51,17,0,0,0,0,1,7,113,34,134,136,34,211,70,34,131,17,0,0,0,0,0,16,34, -34,134,34,34,97,17,102,98,16,0,0,0,0,0,1,18,85,84,17,98,97,33,22,98,1,0,0,0,0,1, -17,37,83,242,68,70,18,146,33,23,16,0,0,0,0,1,50,53,35,134,133,65,39,185,37,17,1, -0,0,0,0,0,19,147,34,136,51,81,39,190,36,65,32,0,0,0,0,0,17,18,34,131,34,83,39,0, -35,34,32,0,0,0,0,1,1,17,34,34,34,57,50,114,49,34,0,0,0,0,0,0,16,17,34,34,83,147, -67,33,64,0,0,0,0,0,0,0,1,2,33,35,81,17,68,68,65,0,0,0,0,0,0,0,0,2,33,21,17,17, -17,17,16,0,0,0,0,0,0,0,0,0,0,20,65,0,1,17,0,0,0,0,0,0,0,0,0,0,0,1,65,16,0,16,0, -0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 3, dust -175,5,3,4,53,2,6,52,50,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,2,34,0,0,16, -1,0,0,0,0,0,0,0,0,0,0,34,50,32,3,48,0,0,0,0,0,0,0,0,0,0,2,35,50,16,66,18,0,0,0, -0,0,0,0,1,16,0,2,49,51,4,4,2,82,34,0,0,0,0,0,0,1,16,0,49,49,32,64,18,81,51,32,0, -0,0,0,0,0,0,0,3,22,55,97,18,33,19,48,0,0,0,0,0,0,0,0,0,6,19,50,34,19,17,48,0,0, -0,0,0,0,1,51,17,17,99,35,129,51,50,0,0,0,0,0,0,0,0,1,55,0,7,50,4,34,32,1,0,0,0, -0,0,0,0,3,112,64,2,64,32,98,0,0,0,0,0,0,0,0,0,9,52,4,3,4,4,5,0,0,0,0,0,0,0,0,0, -18,64,34,49,0,32,18,1,16,0,0,0,0,0,0,0,18,34,35,19,32,18,50,0,1,16,0,0,0,0,0,0, -0,37,19,34,136,18,51,16,0,0,0,0,0,0,0,0,0,5,35,49,51,1,0,16,0,0,0,0,0,0,0,0,0,1, -17,19,34,0,0,0,0,0,0,0,0,0,0,0,0,0,34,18,32,0,0,0,0,0,0,0,0,0,0,0,1,0,0,34,0,1, -0,0,0,0,0,0,0,0,0,0,16,0,16,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,16,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_monsterSprites[19 * SFG_TEXTURE_STORE_SIZE] = -{ -// 0, spider idle -175,0,4,3,5,6,223,1,7,10,2,20,62,95,120,18,0,1,17,16,0,0,0,0,0,0,0,0,1,17,16,0, -0,20,45,65,0,0,0,0,0,0,0,0,21,52,33,0,1,65,170,20,16,0,0,0,0,0,0,17,133,50,51, -16,1,218,211,162,16,0,0,0,0,0,17,133,84,17,17,17,1,42,61,173,16,1,0,0,0,1,133, -84,33,0,0,0,1,65,170,20,17,1,16,0,1,24,85,73,16,0,0,0,0,20,210,71,119,19,81,0,0, -1,19,146,16,0,0,0,1,115,17,115,115,68,65,0,0,0,1,66,49,0,0,0,20,36,119,41,37,69, -85,16,0,0,1,66,49,17,17,0,18,50,115,21,85,68,68,33,0,1,17,51,133,52,66,16,20,45, -113,28,197,66,66,65,1,24,136,85,85,50,35,49,1,17,37,86,198,196,34,33,0,1,85,85, -68,153,153,145,0,21,85,70,140,102,34,34,16,0,147,57,147,51,35,16,0,17,119,60, -104,102,98,34,46,238,191,66,243,17,17,17,1,57,115,115,38,108,198,34,231,243,187, -116,33,0,0,0,18,49,153,151,34,104,198,62,255,59,180,51,112,0,0,0,18,49,51,55,34, -104,198,62,255,59,180,51,112,0,0,0,1,57,121,115,38,108,198,34,231,243,187,116, -33,0,0,0,0,17,119,60,104,102,98,34,46,238,191,66,147,17,17,17,0,21,85,70,140, -102,34,34,16,0,148,41,147,51,35,16,1,17,37,86,198,196,34,33,0,1,136,136,133,153, -153,145,20,45,113,28,197,66,66,65,1,21,85,85,85,52,66,49,18,50,115,21,85,84,68, -33,0,1,17,51,133,50,35,16,20,36,119,41,37,85,85,16,0,0,1,66,55,17,17,0,1,115,17, -115,115,68,65,0,0,0,1,66,49,0,0,0,0,20,45,71,119,19,81,0,0,1,19,50,16,0,0,0,1, -65,170,20,17,1,16,0,1,24,136,137,16,0,0,0,1,218,61,162,16,1,0,0,0,1,133,85,129, -0,0,0,1,42,211,173,16,0,0,0,0,0,17,69,85,17,17,17,1,65,170,20,16,0,0,0,0,0,0,17, -69,50,35,16,0,20,210,65,0,0,0,0,0,0,0,0,20,50,49,0,0,1,17,16,0,0,0,0,0,0,0,0,1, -17,16,0 -, // 1, spider attacking -175,0,183,3,4,1,191,5,31,6,7,22,10,223,20,18,0,34,37,85,43,176,0,0,0,0,0,0,17, -17,16,0,0,34,98,34,38,102,0,0,0,0,0,1,148,71,65,16,0,2,98,34,102,98,0,0,0,0,0, -89,169,52,51,49,0,2,104,40,102,32,0,0,0,0,5,170,145,17,17,16,2,38,104,136,98,32, -80,0,0,0,90,167,65,0,0,0,2,102,102,102,102,34,85,0,0,5,184,124,16,0,0,0,2,102, -34,34,102,102,232,80,0,91,139,76,16,0,0,0,2,34,46,34,38,102,187,113,0,85,84,196, -49,17,17,0,0,91,235,85,34,107,136,145,0,0,5,115,19,71,116,16,0,94,238,94,88,139, -139,116,80,0,85,58,169,52,67,49,0,23,75,85,91,184,231,71,80,5,170,153,119,60, -204,17,0,1,21,232,141,141,116,68,16,88,137,119,204,195,49,0,0,1,153,136,189,169, -212,68,65,1,195,60,51,51,67,16,0,1,17,85,55,218,221,212,68,85,95,116,243,49,17, -17,0,19,197,51,83,77,217,125,69,95,62,87,65,16,0,0,1,67,49,204,197,68,218,157, -95,243,235,51,80,0,0,0,1,67,193,51,53,68,218,157,95,243,235,51,80,0,0,0,0,19, -197,204,83,77,217,125,69,95,62,87,65,16,0,0,0,1,17,85,55,218,221,212,68,85,95, -116,243,49,17,17,0,1,153,153,125,168,221,68,65,5,51,60,51,51,67,16,0,1,17,232, -141,141,190,68,16,90,170,170,204,195,49,0,0,23,75,85,91,184,235,71,85,5,183,153, -170,60,204,17,0,94,238,94,88,184,187,116,80,0,85,55,153,52,67,49,2,43,235,82,34, -136,136,145,0,0,1,115,19,71,116,16,2,34,82,34,98,46,187,113,0,85,83,196,49,17, -17,0,2,98,34,38,102,44,232,16,0,91,170,124,16,0,0,0,2,102,102,102,98,37,85,0,0, -5,185,172,16,0,0,0,2,38,136,134,34,80,80,0,0,0,88,167,65,0,0,0,0,182,136,134,98, -80,0,0,0,0,5,185,145,17,17,16,0,34,102,102,102,32,0,0,0,0,0,87,153,52,51,49,0,2, -98,34,102,107,0,0,0,0,0,1,116,71,65,16,0,2,37,82,43,32,0,0,0,0,0,0,17,17,16,0 -, // 2, spider walking -175,0,4,5,6,3,223,1,10,7,2,18,62,95,120,63,0,0,17,17,0,0,0,0,0,0,0,1,17,17,0,0, -0,1,50,211,16,0,0,0,0,0,0,21,51,50,16,0,0,19,26,161,49,0,0,0,0,0,17,146,35,33,0, -0,0,29,173,90,33,0,0,0,0,1,148,68,81,16,0,0,0,18,165,218,209,0,16,0,0,25,67,49, -16,0,0,0,0,19,26,161,49,16,17,0,1,148,51,16,0,0,0,0,0,1,61,35,119,113,84,16,25, -68,56,0,0,0,0,0,0,23,81,23,87,83,51,16,17,21,129,0,0,0,0,0,1,50,55,114,130,67, -68,65,0,1,50,16,0,0,0,0,1,37,39,81,68,67,51,50,0,1,85,81,17,17,17,0,1,50,215,17, -204,67,35,35,16,25,153,148,68,83,50,16,0,17,18,68,111,108,50,34,16,1,68,68,68, -82,37,81,0,1,68,67,105,246,98,34,33,0,133,88,136,136,136,129,0,1,23,117,198,150, -102,34,34,238,227,37,181,17,0,0,0,21,135,87,82,102,252,98,46,123,91,50,81,0,0,0, -1,37,24,136,114,38,159,101,235,181,35,181,112,0,0,0,1,37,24,136,114,38,159,101, -235,181,35,181,112,0,0,0,0,21,135,87,82,102,252,98,46,123,83,123,33,0,0,0,0,1, -23,117,198,150,102,34,34,238,235,50,133,17,17,0,0,1,68,67,105,246,98,34,33,0, -131,40,85,85,34,16,0,17,18,68,111,108,50,34,16,1,148,33,17,17,17,0,1,50,215,17, -204,67,35,35,16,25,50,16,0,0,0,0,1,37,39,81,68,67,51,50,17,148,72,136,128,0,0,0, -1,50,55,114,130,67,68,65,20,68,73,148,136,128,0,0,0,23,81,23,87,83,51,16,1,17, -84,68,83,56,129,0,0,1,61,35,119,113,84,16,0,5,21,68,82,34,81,0,0,19,26,161,49, -16,17,0,0,20,66,87,18,37,16,0,0,18,165,218,209,0,16,0,0,1,84,52,65,17,81,17,0, -29,173,90,33,0,0,0,0,0,17,19,52,82,37,16,0,19,26,161,49,0,0,0,0,0,0,1,19,82,81, -0,0,1,50,211,16,0,0,0,0,0,0,0,1,17,16,0,0,0,17,17,0,0,0,0,0,0,0,0,0,0,0,0 -, // 3, destroyer idle -0,175,3,4,5,73,1,6,2,77,157,79,7,78,76,75,17,0,0,0,17,17,17,17,17,17,17,17,17, -17,17,17,17,11,221,219,0,17,17,17,16,0,0,0,0,0,1,17,17,11,217,153,219,1,17,16,2, -119,114,39,116,119,1,17,17,11,189,154,155,1,16,12,194,124,204,204,199,204,1,17, -17,16,189,154,169,176,12,199,116,35,51,51,50,51,1,17,17,17,11,217,170,213,196, -68,67,34,34,34,40,34,0,0,17,16,11,217,154,149,52,50,50,0,0,0,0,0,4,64,17,7,118, -102,138,173,83,68,128,17,17,17,17,7,114,32,16,116,12,66,106,169,181,51,71,0,1, -17,0,115,56,128,16,67,0,102,102,42,213,35,52,71,112,0,119,51,40,128,7,48,194,0, -7,114,171,82,51,68,71,114,83,34,40,128,4,12,204,64,0,71,106,181,131,52,68,71,82, -34,40,80,4,12,199,114,192,36,70,157,184,52,119,116,37,40,133,80,0,204,119,119, -96,4,70,169,213,55,51,55,69,80,102,96,0,102,103,116,44,4,50,106,155,83,157,147, -117,34,0,0,2,9,230,68,32,3,50,106,173,83,57,211,53,34,1,17,2,11,150,68,48,3,50, -106,233,83,57,211,53,34,1,17,0,34,36,67,44,3,50,106,238,83,157,147,37,34,128,0, -0,119,68,67,128,3,54,254,229,34,51,50,53,88,50,32,6,7,68,50,192,131,38,174,245, -35,34,35,37,34,40,128,2,4,68,48,0,50,111,229,82,51,51,50,82,34,40,128,3,32,66,0, -3,38,254,86,130,34,34,34,88,34,40,128,16,50,0,0,0,111,229,104,34,40,133,85,104, -136,40,80,16,51,99,38,105,154,245,130,40,96,82,67,6,102,133,80,17,3,54,102,137, -238,88,134,96,17,7,66,6,0,101,80,17,16,13,187,154,229,102,104,36,0,116,72,128, -17,6,96,17,17,11,186,170,245,96,130,51,71,67,34,32,17,16,0,17,16,187,218,174, -240,5,130,51,51,51,50,80,17,17,17,17,11,189,170,175,1,16,5,34,34,34,80,1,17,17, -17,17,11,221,170,255,1,17,16,85,85,0,1,17,17,17,17,17,11,218,255,0,17,17,17,0,0, -17,17,17,17,17,17,17,0,0,0,17,17,17,17,17,17,17,17,17,17,17,17 -, // 4, destroyer attacking -175,0,3,4,73,1,5,2,183,6,77,157,79,78,7,31,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0, -17,17,17,0,0,0,0,0,136,136,128,0,0,0,0,0,28,221,220,17,0,0,0,8,136,136,128,0,0, -0,0,0,28,218,170,220,16,1,88,136,136,255,136,128,0,0,0,0,28,218,187,172,85,94, -238,136,136,255,136,128,0,0,0,0,28,218,187,187,215,105,255,248,136,136,136,0,0, -0,0,0,1,221,171,187,163,102,255,255,136,136,136,0,0,1,17,0,25,17,85,87,189,38, -99,99,56,136,0,0,17,86,97,1,150,37,230,37,186,195,51,35,56,0,0,17,255,146,33,1, -99,37,85,85,82,211,35,54,98,17,17,249,99,55,113,25,51,94,33,17,153,44,50,51,111, -255,243,70,50,39,113,22,53,238,230,17,22,148,195,115,54,153,159,114,34,39,113, -19,49,238,153,46,18,102,125,151,57,51,57,100,34,39,65,19,94,233,153,149,17,102, -90,215,51,173,163,148,68,116,65,18,21,85,153,98,225,99,37,172,67,58,211,52,39, -69,81,19,33,163,86,98,17,51,37,189,67,58,211,52,34,17,17,18,33,202,86,99,17,51, -37,58,67,173,163,36,34,16,0,19,18,34,102,50,225,51,37,58,66,51,50,52,34,113,17, -18,89,150,102,55,17,51,82,52,35,34,35,36,71,50,33,19,33,150,99,46,23,50,82,36, -35,51,50,116,34,39,113,19,37,102,99,17,19,37,36,66,51,50,39,66,34,39,113,19,34, -22,33,17,50,82,69,114,34,36,68,71,34,39,113,1,50,81,17,85,85,36,87,34,39,66,99, -23,119,39,65,1,51,37,50,87,171,68,21,81,119,25,98,21,85,116,65,0,19,51,85,123, -50,65,87,38,17,150,103,113,17,84,65,0,1,92,202,171,52,81,35,51,105,99,34,33,0, -21,81,0,1,204,219,187,36,20,114,51,51,51,50,65,0,1,17,0,28,205,219,178,65,20, -119,34,34,34,65,16,0,0,0,0,28,205,187,36,16,1,20,68,68,65,16,0,0,0,0,0,28,219, -187,33,0,0,1,17,17,16,0,0,0,0,0,0,28,219,177,16,0,0,0,0,0,0,0,0,0,0,0,0,17,17, -16,0,0,0,0,0,0,0,0,0,0,0,0 -, // 5, destroyer walking -175,0,3,4,1,5,2,73,6,77,79,7,78,157,75,76,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0, -26,204,202,17,0,0,1,17,17,17,0,0,0,0,0,0,26,201,153,202,16,1,19,136,130,33,17, -17,0,0,0,0,26,172,157,154,16,27,179,40,187,184,133,129,16,0,0,0,1,172,157,217, -161,184,136,50,51,59,184,102,16,0,0,0,0,26,201,221,199,85,85,50,34,35,50,102,16, -0,0,0,1,26,201,157,151,53,35,97,17,18,38,102,16,17,16,0,24,17,68,70,220,115,54, -16,0,1,17,97,17,85,16,1,133,36,181,36,217,167,51,81,17,16,0,17,56,34,16,1,83,36, -68,68,119,199,35,53,88,129,17,136,51,102,16,24,51,75,33,17,136,122,114,51,85,88, -130,115,34,102,16,21,52,187,181,17,21,135,167,99,53,85,88,114,34,102,16,19,49, -187,136,43,18,85,76,214,53,136,133,39,34,103,16,19,75,184,136,132,17,85,73,199, -56,51,56,87,118,119,16,18,20,68,136,82,177,83,36,154,115,156,147,135,33,68,16, -19,33,159,69,82,17,51,36,220,115,57,195,55,34,17,16,18,33,169,69,83,17,51,36, -249,115,57,195,55,34,97,17,19,18,34,85,50,177,51,36,255,115,156,147,39,38,50,33, -18,72,133,85,54,17,51,78,247,34,51,50,55,114,38,97,19,33,133,83,43,22,50,78,231, -35,34,35,39,34,38,97,19,36,85,83,17,19,36,231,114,51,51,50,114,34,38,97,19,34, -21,33,17,50,78,116,98,34,34,38,118,34,38,113,1,50,65,17,68,68,231,70,34,38,97, -17,22,102,103,113,1,51,36,50,70,157,119,20,38,65,16,0,1,20,71,113,0,19,51,68, -109,254,113,70,65,23,97,16,0,1,20,65,0,1,74,169,157,247,65,35,37,136,133,33,0,0, -1,17,0,0,26,173,221,231,65,98,51,85,134,97,0,0,0,0,0,1,170,205,223,225,23,98,34, -51,51,33,0,0,0,0,0,26,172,221,222,16,1,17,118,34,38,97,0,0,0,0,0,26,204,221,238, -16,0,0,17,17,17,16,0,0,0,0,0,26,205,238,17,0,0,0,0,0,0,0,0,0,0,0,0,17,17,17,0,0, -0,0,0,0,0,0,0,0,0,0 -, // 6, warrior idle -175,0,3,5,1,4,6,7,2,62,170,63,92,93,95,151,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,17,17,17,17, -17,17,16,0,0,0,0,0,0,0,23,119,119,119,119,119,119,119,113,0,0,0,0,0,0,1,136,255, -153,187,187,187,185,153,241,0,0,0,0,0,0,1,17,17,17,17,17,17,17,31,133,16,0,0,0, -0,0,0,0,0,0,0,0,0,0,1,85,16,0,0,1,17,16,0,0,0,0,0,0,0,0,0,21,81,0,1,19,53,82,0, -0,0,0,0,0,0,0,0,1,33,1,22,99,51,82,0,0,17,0,0,0,0,0,0,1,40,22,102,51,51,36,0,0, -23,16,0,17,16,0,0,18,40,119,102,99,50,68,0,0,22,113,17,234,113,0,1,85,85,85,54, -51,50,68,0,0,19,103,122,234,102,16,24,60,205,51,38,99,50,68,0,0,1,51,54,162,54, -65,130,57,220,211,38,51,50,68,0,0,0,21,51,102,99,72,34,57,156,211,38,99,51,36,0, -1,17,34,85,51,102,52,34,57,220,211,38,51,51,82,0,19,51,51,51,51,51,84,34,60,205, -50,86,99,53,82,0,1,17,34,37,51,53,84,34,51,51,35,102,50,34,36,0,0,0,18,85,85,85, -72,40,51,50,55,98,34,34,36,0,0,1,37,85,162,82,72,136,34,36,117,34,36,68,68,0,0, -21,85,42,234,34,65,132,34,36,82,36,68,34,36,0,0,21,33,17,234,33,0,20,34,36,36, -68,66,83,82,0,0,18,16,0,17,16,0,1,17,17,36,68,68,68,68,0,0,17,0,0,0,0,0,0,0,1, -36,68,68,34,36,0,0,0,0,0,0,0,0,0,0,0,18,36,66,83,82,0,0,0,0,0,0,0,0,0,0,0,1,18, -36,68,68,0,0,0,0,0,0,0,0,0,0,0,0,1,18,34,36,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,16,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0 -, // 7, warrior attacking -175,0,5,1,3,4,2,7,6,63,170,92,93,62,95,148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -17,0,0,1,17,16,0,0,0,0,0,0,0,0,0,1,71,16,1,18,37,84,0,0,1,16,0,0,0,0,0,18,73,17, -24,130,34,84,0,0,1,113,16,1,17,0,1,36,63,115,72,34,34,67,0,0,1,135,113,30,167, -16,1,102,99,150,68,130,36,51,0,0,0,24,119,174,168,33,22,82,35,247,52,34,36,51,0, -0,0,18,34,138,162,131,102,43,188,57,100,66,36,51,0,0,0,1,82,40,136,35,68,45,203, -61,115,66,36,51,0,0,1,17,20,85,40,130,52,45,219,195,150,68,34,67,0,0,18,34,34, -34,34,37,52,45,203,195,151,52,34,84,0,0,1,17,68,82,34,85,52,43,188,34,57,100,66, -84,0,0,0,1,69,85,85,83,68,34,34,36,57,115,69,84,0,0,0,20,85,90,165,67,102,34,34, -66,99,148,100,67,0,0,0,21,84,174,164,67,54,68,67,84,67,215,51,51,0,0,1,84,17,30, -164,16,3,102,99,70,51,57,52,84,0,0,1,65,0,1,17,0,0,51,51,70,51,51,115,51,0,0,1, -16,0,0,0,0,0,0,1,100,51,51,147,68,0,0,0,0,0,0,0,0,0,0,0,17,68,102,55,19,0,0,0,0, -0,0,0,0,0,0,0,0,17,20,57,17,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,16,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 8, plasmabot idle -175,0,72,65,2,3,4,5,61,60,54,62,6,59,49,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -2,34,34,0,0,0,0,0,0,0,0,0,0,0,0,0,42,170,170,34,0,0,0,0,0,0,1,17,0,0,0,0,42,147, -56,171,32,0,0,0,0,0,1,193,0,0,0,0,42,50,35,153,32,0,0,0,1,17,20,68,17,17,0,2, -171,50,34,57,32,0,0,0,1,119,118,102,85,65,0,2,163,34,34,57,33,0,0,0,1,101,85,68, -68,65,0,2,163,34,35,137,35,16,0,0,1,17,17,17,17,17,0,42,185,50,35,141,50,49,0,0, -0,0,1,65,0,0,0,42,187,131,57,211,66,52,16,0,0,0,21,81,0,0,0,43,51,136,179,68, -136,34,17,17,17,17,68,65,0,0,0,36,101,51,52,216,136,146,86,124,197,204,204,113, -0,0,0,3,122,229,61,136,137,242,17,17,17,17,28,17,0,0,0,2,122,174,83,153,211,35, -65,0,0,0,28,16,0,0,0,2,118,174,101,51,50,51,65,0,17,17,68,65,17,16,0,2,118,102, -238,85,82,52,65,1,119,119,102,102,85,65,0,2,118,102,238,102,98,52,81,1,102,85, -85,68,68,65,0,2,118,174,102,83,50,53,81,0,17,17,17,17,17,16,0,2,122,174,101,171, -179,37,81,0,0,0,20,16,0,0,0,3,122,230,93,184,136,210,17,17,17,17,21,17,0,0,0,35, -118,85,52,216,137,243,86,124,197,204,199,81,0,0,0,43,85,170,179,68,159,34,17,17, -17,17,68,65,0,0,0,42,171,147,57,211,66,52,16,0,0,0,23,113,0,0,0,42,185,50,35, -136,50,65,0,0,0,0,1,193,0,0,0,2,179,34,35,137,36,16,0,0,1,17,20,68,17,17,0,2, -179,34,34,57,33,0,0,0,1,119,118,102,85,65,0,2,152,50,34,61,32,0,0,0,1,101,85,68, -68,65,0,0,40,50,35,223,32,0,0,0,1,17,17,17,17,17,0,0,41,147,61,255,32,0,0,0,0,0, -1,81,0,0,0,0,47,255,223,34,0,0,0,0,0,0,1,17,0,0,0,0,2,34,34,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 9, plasmabot attacking -175,198,0,2,4,3,72,39,193,5,194,6,49,192,65,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,111,193,1,0,0,0,0,0,0,0,0,0,0,0,0,6,177,17,17,0,0,0,0,0,0,2,34,0,0,0,0,15, -113,17,17,240,0,0,0,0,0,2,178,0,0,0,0,107,17,23,17,31,0,0,0,8,136,131,51,34,34, -0,0,97,23,119,113,17,17,0,0,10,153,153,68,85,50,0,0,103,17,119,119,17,16,0,0,10, -68,85,83,51,50,0,6,145,17,119,17,19,61,0,0,10,168,141,34,34,34,0,1,17,17,23,17, -85,172,128,0,0,0,2,50,0,0,0,6,17,113,17,17,85,172,128,0,0,0,2,82,0,0,0,6,156,55, -113,85,84,76,200,170,168,136,211,50,0,0,0,6,52,85,81,84,180,68,245,73,187,91, -187,146,0,0,0,0,233,151,85,91,180,67,98,34,34,34,43,34,0,0,0,0,105,71,115,52,69, -230,227,32,0,0,43,32,0,0,0,0,105,68,124,83,206,110,227,32,168,141,51,50,34,32,0, -0,105,68,68,204,85,110,51,218,153,153,68,68,85,50,0,0,105,68,68,204,68,110,51, -218,68,85,85,51,51,50,0,0,105,68,124,69,238,254,53,208,136,136,221,210,34,32,0, -0,105,71,124,91,153,207,85,32,0,0,35,32,0,0,0,0,233,71,197,25,68,69,253,136,221, -221,37,34,0,0,0,6,233,149,81,20,148,67,197,73,187,91,185,82,0,0,0,6,149,87,17, -17,84,60,200,136,136,136,211,50,0,0,0,6,187,113,17,17,21,172,208,0,0,0,13,146,0, -0,0,6,177,17,119,17,17,163,32,0,0,0,13,178,0,0,0,6,73,145,23,119,19,50,0,0,10, -136,131,51,34,34,0,0,105,17,119,113,28,32,0,0,10,153,68,68,85,50,0,0,105,17,119, -17,17,0,0,0,10,69,85,51,51,50,0,0,97,17,23,17,22,0,0,0,10,168,210,34,34,34,0,0, -1,65,17,21,17,0,0,0,0,0,2,82,0,0,0,0,6,52,69,31,0,0,0,0,0,0,2,34,0,0,0,0,0,102, -102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 10, ender idle -0,3,4,5,2,175,1,6,52,7,93,92,50,74,73,0,85,85,85,85,0,0,0,80,5,0,5,85,85,80,0,0, -85,85,80,0,153,153,52,1,134,17,16,80,0,9,114,32,85,80,3,151,119,119,119,104,97, -135,129,9,119,115,36,16,85,9,114,115,51,51,51,54,97,114,113,99,50,17,22,16,80, -151,113,18,4,18,34,51,97,135,129,102,33,20,70,16,9,119,20,55,114,0,65,34,16,17, -22,24,4,68,70,16,2,20,67,51,51,51,48,34,33,6,96,129,4,65,0,0,9,113,51,58,58,51, -115,3,49,65,51,0,65,96,85,85,9,49,33,34,35,34,35,49,51,18,34,38,102,102,0,0,7, -49,36,34,33,35,18,113,115,43,50,22,23,119,114,32,7,49,33,1,34,51,49,39,23,114, -51,22,18,34,36,16,7,19,34,64,66,34,51,19,35,51,50,6,102,17,22,96,80,115,35,11, -176,34,49,19,45,194,35,51,116,100,70,16,85,3,55,10,164,18,18,61,17,18,18,50,55, -97,22,16,80,1,121,10,170,65,35,18,34,34,33,34,35,96,0,0,3,68,121,64,0,1,18,34, -32,68,18,34,34,6,5,85,1,68,119,64,0,1,17,18,32,68,18,34,34,6,5,85,80,1,55,10, -170,65,34,65,34,34,33,34,33,96,0,0,85,3,51,10,164,35,34,52,17,18,17,34,36,103, -114,32,80,115,35,11,176,51,49,19,20,65,18,34,68,98,36,16,9,19,34,64,67,51,119, -19,35,50,33,70,6,17,22,96,7,49,33,1,51,51,113,35,19,52,34,16,100,68,70,16,3,49, -36,34,50,39,18,49,35,65,17,70,65,17,22,16,3,49,33,51,51,35,35,16,18,75,68,102, -102,102,0,0,3,33,35,51,51,51,49,1,17,68,70,0,98,96,85,85,1,68,18,58,58,49,208, -17,68,6,96,129,2,34,0,0,3,34,65,35,50,0,65,20,96,17,22,24,1,18,36,32,80,50,36, -29,4,18,17,70,97,135,129,0,17,17,20,16,85,2,36,34,34,33,20,230,97,114,113,100, -68,17,22,16,85,80,4,193,17,204,68,104,1,135,129,4,68,68,70,16,85,85,80,0,68,68, -70,1,128,17,16,80,0,4,70,16,85,85,85,85,0,0,0,80,5,0,5,85,85,80,0,0 -, // 11, ender walking -0,3,4,5,175,2,1,6,52,93,7,92,50,74,73,0,68,68,68,68,64,0,0,4,0,64,0,68,68,0,0,4, -68,68,68,0,10,170,114,80,136,97,17,4,0,167,34,4,68,68,0,39,119,119,119,21,86,24, -120,16,119,50,81,4,68,0,167,35,51,51,51,49,102,23,39,22,33,17,97,4,64,42,114,18, -85,1,34,51,22,24,120,22,1,85,97,4,64,167,37,87,114,32,81,34,49,1,17,97,128,85, -97,4,2,21,85,51,51,51,53,18,34,16,102,8,16,81,0,4,10,119,19,51,147,147,115,1,49, -85,18,0,1,96,68,68,10,115,18,34,34,50,35,50,35,33,34,22,102,96,68,68,7,115,18, -81,34,18,49,55,19,50,178,22,23,114,0,0,7,115,18,16,18,35,50,23,23,115,35,22,18, -39,114,32,3,17,50,53,5,34,51,35,35,51,50,6,102,18,37,16,64,115,34,48,187,2,49, -19,45,194,35,51,117,101,22,96,64,50,39,112,153,177,18,49,209,17,33,35,55,97,86, -16,68,0,39,160,153,149,35,17,34,34,34,18,51,96,22,16,64,53,87,165,0,0,17,34,33, -5,82,34,35,6,0,0,64,21,87,165,0,0,17,18,33,5,82,34,34,6,4,68,68,0,39,112,153, -149,34,81,34,34,34,18,33,96,0,4,68,7,51,48,153,178,34,53,17,17,33,18,21,103,34, -4,64,115,35,48,187,3,49,19,21,81,18,17,85,98,81,4,10,17,34,37,5,51,55,19,34,51, -33,86,6,17,102,4,7,50,18,16,19,51,113,35,19,50,81,80,101,85,97,4,7,50,18,82,35, -39,18,49,83,37,21,86,81,17,97,4,3,50,18,35,51,50,35,16,18,37,181,102,102,96,0,4, -2,34,19,51,51,51,49,101,17,85,86,0,2,34,102,96,1,21,81,51,147,145,214,81,85,80, -102,1,128,18,37,32,64,50,37,19,50,37,1,21,86,1,17,104,16,17,21,16,64,51,33,93, -80,82,17,86,96,24,120,22,1,17,22,16,68,0,33,82,34,33,21,230,96,23,39,22,85,85, -86,16,68,68,0,92,17,204,85,96,16,24,120,16,85,85,86,16,68,68,68,0,5,85,86,0,136, -1,17,4,0,0,0,0,68,68,68,68,64,0,0,68,0,64,0,68,68,68,68,68 -, // 12, ender attacking -0,4,5,175,3,26,28,191,6,29,2,1,30,7,105,27,51,51,51,51,48,0,0,3,0,48,112,51,51, -48,0,0,51,51,51,0,13,221,137,80,153,231,119,115,0,13,129,16,51,51,0,24,136,136, -136,101,94,119,221,119,136,130,26,64,51,0,216,18,204,204,204,198,119,125,221, -119,118,244,75,64,48,29,129,73,85,6,153,204,103,119,215,126,6,250,171,64,48,216, -26,168,137,144,86,153,198,7,119,118,144,90,171,64,1,74,170,34,34,34,37,105,153, -96,119,9,96,84,0,0,13,136,66,34,82,82,130,6,198,85,121,0,6,176,51,51,13,130,65, -17,17,33,18,41,156,150,153,110,187,187,0,0,8,130,65,164,17,65,36,40,108,201,89, -110,104,136,129,16,8,130,65,64,65,18,33,72,248,140,156,110,105,145,26,64,2,68, -33,42,170,17,34,18,18,34,41,14,235,255,75,176,48,130,17,42,85,1,36,66,26,81,18, -34,133,181,171,64,48,33,17,40,5,84,65,36,164,68,20,18,40,180,75,64,51,0,17,141, -5,90,18,68,17,17,17,65,34,176,0,0,48,42,161,141,0,0,68,17,20,10,161,17,18,11,3, -51,48,74,161,136,0,0,68,65,20,10,161,17,17,11,3,51,51,0,18,40,5,90,17,95,145,17, -17,65,20,176,0,0,51,8,34,33,5,81,17,37,255,255,31,65,74,184,129,16,48,130,18,42, -85,2,47,242,101,95,249,255,85,177,26,64,13,68,17,26,10,34,40,108,153,34,150,91, -11,244,75,176,8,33,65,64,66,34,134,156,108,201,86,80,181,170,171,64,8,33,65,161, -18,152,105,198,92,149,101,94,95,68,75,64,2,33,65,18,34,41,156,96,105,149,85,238, -235,187,0,0,1,17,66,34,34,44,198,229,102,85,126,0,9,176,51,51,4,74,164,34,82, -166,254,86,85,80,119,6,144,145,0,0,48,33,26,66,41,149,6,101,94,119,119,121,96, -97,26,16,48,34,20,95,80,89,102,94,224,119,215,126,6,111,74,64,51,0,20,89,153, -150,101,238,231,125,221,119,117,111,75,64,51,51,0,95,102,255,85,224,96,119,215, -112,85,90,171,64,51,51,51,0,5,85,94,0,153,7,119,3,0,10,171,64,51,51,51,51,48,0, -0,51,0,48,112,51,51,48,0,0 -, // 13, turret idle -175,0,131,26,41,168,37,6,91,7,48,93,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,25,145,0,0,0,0,0,0,0,0,17,0,0,0,0,17,151,98,16,0,0,0,0,0,0,1,130,16,0,0, -1,35,184,130,81,16,0,0,0,0,0,1,40,16,0,0,1,34,123,178,85,65,0,0,0,0,0,23,49,0,0, -0,25,98,187,98,81,16,0,0,0,0,0,23,65,0,0,0,25,98,118,98,16,0,0,0,0,0,1,115,16,0, -17,17,71,98,118,98,81,16,0,0,0,1,20,116,16,0,0,0,22,35,114,36,85,65,0,0,1,25, -103,53,16,0,0,1,50,52,98,36,81,16,0,0,25,151,39,69,161,0,0,25,51,68,98,36,16,0, -0,0,25,118,100,84,161,0,1,151,54,35,184,36,16,0,0,1,151,98,35,52,85,17,23,102, -70,35,104,132,81,16,0,1,151,98,35,52,85,162,50,34,70,35,104,132,85,65,0,1,118, -34,51,68,85,17,19,51,70,35,104,132,81,16,0,1,118,35,51,68,81,0,1,67,70,35,184, -36,16,0,0,1,102,35,52,69,81,0,0,20,66,53,98,36,16,0,0,1,115,51,68,81,16,0,0,1, -67,165,98,36,81,16,0,1,114,51,69,16,0,0,0,0,20,85,98,36,85,65,0,27,98,35,65,0,0, -1,17,17,18,58,35,58,81,16,0,27,34,35,16,0,0,23,98,51,18,58,35,58,16,0,1,123,130, -52,16,0,0,22,34,68,18,58,140,58,81,16,23,98,184,129,0,0,0,1,35,65,1,90,44,202, -85,65,25,34,35,193,0,0,0,1,20,81,1,85,140,202,81,16,22,34,52,65,0,0,0,17,1,16,0, -17,35,58,16,0,1,35,68,16,0,0,0,16,0,0,0,0,19,49,0,0,0,17,17,0,0,0,0,0,0,0,0,0,1, -16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0 -, // 14 turret walk -175,0,131,26,41,37,168,6,91,7,48,93,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,1,153,16,0,0,0,0,0,0,0,0,0,0,0,0,1,25,117,33,0,0,0,0,0,0,0,0,1,16,0,0, -18,59,136,33,0,0,0,0,0,0,0,0,24,33,0,0,18,39,187,38,16,0,0,0,0,0,0,0,18,129,0,1, -149,43,181,38,65,0,0,0,0,0,0,1,115,16,0,1,149,39,85,38,16,0,0,0,0,0,0,25,33,0,1, -20,117,39,85,33,0,0,0,0,0,1,17,114,49,0,16,1,82,55,34,70,16,0,0,0,1,25,87,51,16, -0,0,19,35,69,34,65,0,0,0,0,25,151,39,70,16,0,1,147,52,69,34,65,0,0,0,0,25,117, -84,100,161,0,25,115,82,59,130,70,16,0,0,1,151,82,35,52,161,17,117,83,82,53,136, -70,65,0,0,1,151,82,35,52,102,35,34,35,82,53,136,70,16,0,0,1,117,34,51,68,102,17, -51,52,82,53,136,65,0,0,0,1,117,34,51,68,102,0,20,52,82,59,130,65,0,0,0,23,85,35, -52,70,97,0,1,68,35,101,34,65,0,0,0,23,82,51,68,102,96,0,0,20,58,101,34,70,16,0, -1,181,34,52,65,16,0,17,16,1,70,101,34,65,0,0,23,178,34,52,16,0,1,119,81,17,35, -162,51,161,0,1,117,40,35,65,0,0,1,82,35,49,35,162,51,166,16,1,146,43,136,65,0,0, -17,34,52,17,35,168,195,166,65,1,82,34,60,16,0,0,1,51,65,0,22,162,204,166,16,1, -34,51,68,16,0,0,0,17,16,0,22,104,204,161,0,0,17,52,65,0,0,0,0,0,0,0,1,18,51,161, -0,0,0,17,16,0,0,0,0,0,0,0,0,1,51,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0 -, // 15 turret attack -175,0,131,41,26,1,168,191,7,48,81,6,37,21,35,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,1,136,16,0,0,0,0,0,0,0,0,0,0,0,0,1,24,188,33,0,0,0,0,0,0,0,0,0,0,0,0, -18,77,170,38,16,0,0,0,0,0,0,0,0,0,0,0,18,43,212,38,49,0,0,0,0,0,0,0,0,0,0,1,140, -45,220,38,16,0,0,0,0,0,0,0,0,0,0,1,140,43,220,33,0,0,0,0,0,0,0,0,0,1,17,19,188, -43,220,38,16,0,0,0,0,80,85,0,0,0,0,1,194,75,226,54,49,0,0,0,85,135,188,165,0,0, -0,148,36,61,226,54,16,0,0,90,136,183,15,254,80,0,9,132,67,61,226,49,0,0,0,168, -139,119,112,238,80,0,24,180,194,77,162,49,0,0,1,187,183,120,135,116,161,21,189, -211,194,77,170,54,16,0,1,192,119,120,135,119,9,173,204,195,194,77,170,54,49,0,1, -204,192,119,119,106,169,21,221,211,194,77,170,54,16,0,0,175,255,247,122,170,80, -0,94,211,194,77,162,49,0,0,0,90,255,231,68,170,80,0,5,227,36,109,226,49,0,0,0,0, -85,224,74,85,0,0,0,83,73,109,226,54,16,0,0,0,0,85,85,0,0,0,0,1,54,109,226,54,49, -0,0,0,0,0,0,0,0,68,68,65,36,158,68,150,16,0,0,0,0,0,0,0,4,141,221,225,36,158,68, -145,0,0,0,0,0,0,0,0,4,221,35,49,36,154,164,150,16,0,0,0,0,0,0,0,0,18,67,16,22, -158,170,150,49,0,0,0,0,0,0,0,0,17,54,16,22,106,170,150,16,0,0,0,0,0,0,0,1,16,17, -0,1,30,68,145,0,0,0,0,0,0,0,0,1,0,0,0,0,1,68,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0 -, // 16 exploder walk -175,168,1,2,3,102,4,5,23,174,99,191,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,0,0, -0,0,89,0,0,0,0,0,0,0,0,68,65,177,0,0,5,85,89,0,0,0,0,0,0,0,4,34,33,177,0,0,19, -187,144,0,0,0,0,0,0,0,1,32,1,131,16,1,198,57,0,0,0,0,0,0,0,0,23,97,1,138,16,28, -116,16,0,0,0,0,0,0,17,17,34,34,17,138,17,17,65,0,0,0,0,0,0,0,22,50,51,51,50,134, -19,49,16,1,17,0,0,0,0,0,23,66,51,34,184,134,33,49,1,23,199,21,153,0,0,0,23,66, -34,184,133,85,50,17,28,199,103,99,85,80,0,0,23,66,136,138,18,85,106,50,199,119, -100,99,85,153,0,0,23,66,136,85,171,166,102,34,39,102,51,36,181,89,144,0,23,34, -34,165,90,21,130,33,36,35,55,103,75,89,0,1,18,187,136,136,81,168,36,116,18,119, -118,70,59,185,144,24,139,85,85,102,98,88,39,71,18,102,102,68,59,187,153,1,18,51, -170,170,97,168,36,116,18,68,68,68,59,185,144,0,19,34,34,58,106,21,130,33,39,34, -51,68,75,89,0,0,23,50,35,35,171,166,163,34,54,103,51,36,85,153,0,0,23,66,42,51, -18,102,163,34,52,70,102,115,89,144,0,0,23,66,34,163,51,86,50,17,19,52,68,97,89, -0,0,0,23,66,50,34,58,90,33,49,1,19,51,16,0,0,0,0,22,50,51,51,34,90,19,49,16,1, -17,0,0,0,0,0,17,17,34,34,17,138,17,17,193,0,0,0,0,0,0,0,0,0,20,65,1,131,16,20, -124,16,0,0,0,0,0,0,0,0,1,32,1,131,16,1,70,57,0,0,0,0,0,0,0,0,1,18,33,129,0,0,19, -187,144,0,0,0,0,0,0,0,0,17,17,129,0,0,5,155,153,0,0,0,0,0,0,0,0,0,1,16,0,0,0,5, -80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -, // 17 universal dying sprite -175,0,223,1,3,4,5,2,6,73,135,79,26,159,131,37,0,0,0,0,0,0,0,0,0,0,0,51,0,0,0,0, -0,0,0,0,0,2,0,0,0,34,32,51,0,0,0,0,0,0,0,0,0,2,32,0,2,163,34,0,0,0,0,0,0,0,0,0, -0,0,0,0,42,3,50,33,16,0,0,0,0,0,0,0,0,0,1,16,32,0,2,22,97,16,0,0,0,0,0,0,0,1,24, -129,16,0,1,119,85,81,0,0,0,0,0,0,0,24,134,134,1,16,1,68,119,84,16,0,0,0,0,0,0, -24,102,136,102,81,0,20,68,116,16,0,0,0,0,0,1,102,102,104,134,65,2,20,68,151,113, -0,0,0,0,0,1,101,86,102,101,48,2,1,68,73,113,0,0,0,0,0,1,101,85,102,100,48,35,52, -17,73,16,0,0,0,0,0,1,85,85,85,71,51,37,84,48,17,0,0,0,0,0,0,1,84,80,80,71,50,34, -36,48,0,0,0,0,0,0,0,0,20,68,68,115,34,85,34,35,0,51,0,0,0,0,0,0,1,68,19,50,42, -51,85,34,3,48,0,0,0,0,0,0,0,17,34,34,163,101,51,67,32,0,0,0,0,0,0,0,0,2,42,68, -83,67,85,49,0,0,0,0,0,0,0,0,2,34,0,53,51,53,51,84,16,0,0,0,0,0,0,0,0,32,0,1,187, -211,115,21,16,0,0,0,0,0,0,0,2,32,0,27,189,211,48,23,16,0,0,0,0,0,0,0,2,0,0,27, -221,209,1,97,0,0,0,0,0,0,0,0,0,0,1,155,221,65,1,112,1,17,16,0,0,0,0,0,0,0,22, -153,145,17,22,49,22,117,16,0,0,0,0,0,0,1,101,84,113,0,23,54,102,53,16,0,0,0,0,0, -0,33,85,84,121,16,1,85,68,55,81,0,0,0,0,0,2,33,68,73,17,193,1,68,71,115,65,0,0, -0,0,0,34,42,153,145,1,195,16,23,119,115,65,0,0,0,0,0,32,2,170,34,31,236,49,23, -116,17,17,0,0,0,0,0,0,0,34,2,24,238,193,1,17,0,0,0,0,0,0,0,0,0,32,0,24,254,193, -0,35,48,0,0,0,0,0,0,0,0,0,0,1,17,16,2,32,48,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,0,0 -, // 18 universal dead/corpse sprite -175,0,3,4,1,5,6,2,157,18,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,4,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,34,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,50,34,0,0,0,0,0,0,0,0,0,0,0,0,0,4,36,17,0,0,0,0,0,0,0,0,0,0,0,0,1,18,65, -49,0,0,0,0,0,0,0,0,0,0,1,17,34,34,19,51,0,0,0,0,0,0,0,0,0,1,22,98,34,34,33,20,0, -0,0,0,0,0,0,0,0,22,101,101,40,130,36,68,0,0,0,0,0,0,0,0,0,22,85,102,85,136,129, -17,0,0,0,0,0,0,0,0,1,85,85,82,37,136,22,68,0,0,0,0,0,0,0,0,1,18,53,85,34,132,19, -36,0,0,0,0,0,0,0,0,0,2,34,85,84,33,100,66,0,0,0,0,0,0,0,0,1,35,51,51,39,22,102, -49,0,0,0,0,0,0,0,0,1,50,58,58,39,65,101,33,0,0,0,0,0,0,0,0,0,18,34,34,116,22,83, -17,0,0,0,0,0,0,0,0,0,1,34,20,68,17,50,20,0,0,0,0,0,0,0,0,0,0,17,4,68,34,20,52,0, -0,0,0,0,0,0,0,0,0,0,0,34,39,83,49,0,0,0,0,0,0,0,0,0,0,0,34,35,117,51,65,0,0,0,0, -0,0,0,0,0,0,0,0,19,115,51,52,0,0,0,0,0,0,0,0,0,0,0,0,19,55,163,153,0,0,0,0,0,0, -0,0,0,0,0,0,1,55,51,153,0,0,0,0,0,0,0,0,0,0,0,0,0,17,115,41,0,0,0,0,0,0,0,0,0,0, -0,0,17,53,36,65,0,0,0,0,0,0,0,0,0,0,0,0,21,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,1, -16,1,35,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,34,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,2,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0 -}; - -SFG_PROGRAM_MEMORY uint8_t SFG_logoImage[SFG_TEXTURE_STORE_SIZE] = -{ -175,224,0,7,4,5,162,77,2,74,70,69,6,11,68,75,0,0,0,0,0,0,17,17,17,17,17,0,0,0,0, -0,0,0,0,0,0,1,132,69,51,84,65,0,0,0,0,0,0,0,0,0,0,24,65,17,19,17,17,0,0,0,0,0,0, -0,0,0,0,24,65,0,19,16,0,0,0,0,0,0,0,0,0,0,0,24,65,17,19,17,17,0,0,0,0,0,0,0,0,0, -0,1,132,69,51,84,65,32,0,0,0,0,0,0,0,0,0,1,17,17,17,17,17,242,0,0,0,0,0,0,0,6, -97,243,94,40,51,84,66,159,32,0,0,0,0,0,17,17,24,60,190,40,50,34,34,155,146,0,0, -0,0,0,33,17,20,203,238,109,51,84,66,251,178,0,0,0,0,0,17,17,131,171,123,145,18, -34,38,122,187,32,0,0,0,0,6,97,92,170,167,113,115,35,81,122,171,32,0,0,0,0,2,22, -202,170,170,212,51,37,210,26,121,130,0,0,0,0,34,17,22,234,164,28,60,34,92,23, -218,56,32,0,0,2,33,17,102,110,113,69,210,35,51,93,51,66,50,0,0,34,34,40,126,246, -210,34,195,35,51,49,210,34,34,0,0,0,2,40,119,238,105,197,210,35,51,93,51,65,50, -0,0,0,2,38,87,119,166,156,60,34,92,223,218,161,32,0,0,2,34,38,87,119,170,20,51, -37,223,23,114,18,0,0,0,2,34,34,69,122,119,241,211,35,86,102,187,32,0,0,0,0,0,97, -213,119,187,97,134,45,17,246,105,32,0,0,0,0,34,33,22,247,238,29,51,53,65,155,98, -0,0,0,0,0,2,34,33,110,233,29,54,17,17,155,146,0,0,0,0,0,0,0,97,111,153,34,34,34, -29,159,32,0,0,0,0,0,0,0,0,41,150,40,51,84,65,146,0,0,0,0,0,0,0,0,0,2,38,40,56, -24,65,32,0,0,0,0,0,0,0,0,0,0,2,40,49,145,65,0,0,0,0,0,0,0,0,0,0,1,17,34,17,17, -17,0,0,0,0,0,0,0,0,0,0,1,132,69,51,84,65,0,0,0,0,0,0,0,0,0,0,1,17,24,56,17,17,0, -0,0,0,0,0,0,0,0,0,0,0,24,51,84,65,0,0,0,0,0,0,0,0,0,0,0,0,1,17,17,17,0,0,0,0,0 -}; - -uint8_t SFG_charToFontIndex(char c) -{ - if (c >= 'a' && c <= 'z') - return c - 'a'; - - if (c >= 'A' && c <= 'Z') - return c - 'A'; - - if (c >= '0' && c <= '9') - return c - '0' + 31; - - switch (c) - { - case ' ': return 26; break; - case '.': return 27; break; - case ',': return 28; break; - case '!': return 29; break; - case '/': return 41; break; - case '-': return 42; break; - case '+': return 43; break; - case '(': return 44; break; - case ')': return 45; break; - case '%': return 46; break; - default: return 30; break; // "?" - } -} - -#define SFG_FONT_CHARACTER_SIZE 4 - -/** - 4x4 font, each character stored as 16 bits. -*/ -SFG_PROGRAM_MEMORY uint16_t SFG_font[47] = -{ - 0xfaf0, // 0 "A" - 0xfd70, // 1 "B" - 0x6990, // 2 "C" - 0xf960, // 3 "D" - 0xfd90, // 4 "E" - 0xfa80, // 5 "F" - 0x69b0, // 6 "G" - 0xf4f0, // 7 "H" - 0x9f90, // 8 "I" - 0x31f0, // 9 "J" - 0xf4b0, // 10 "K" - 0xf110, // 11 "L" - 0xfc4f, // 12 "M" - 0xf42f, // 13 "N" - 0x6996, // 14 "O" - 0xfae0, // 15 "P" - 0x69b7, // 16 "Q" - 0xfad0, // 17 "R" - 0x5da0, // 18 "S" - 0x8f80, // 19 "T" - 0xf1f0, // 20 "U" - 0xe1e0, // 21 "V" - 0xf32f, // 22 "W" - 0x9690, // 23 "X" - 0xc7c0, // 24 "Y" - 0xbd90, // 25 "Z" - 0x0000, // 26 " " - 0x0100, // 27 "." - 0x0300, // 28 "," - 0x0d00, // 29 "!" - 0x48b4, // 30 "?" - 0xf9f0, // 31 "0" - 0x9f10, // 32 "1" - 0xbdd0, // 33 "2" - 0x9da0, // 34 "3" - 0xe2f0, // 35 "4" - 0xdbb0, // 36 "5" - 0xfbb0, // 37 "6" - 0x8bc0, // 38 "7" - 0xfdf0, // 39 "8" - 0xddf0, // 40 "9" - 0x1680, // 41 "/" - 0x2220, // 42 "-" - 0x2720, // 43 "+" - 0x0690, // 44 "(" - 0x0960, // 45 ")" - 0x9249 // 46 "%" -}; - -#endif // guard diff --git a/dingux/levels.h b/dingux/levels.h deleted file mode 100644 index d448707..0000000 --- a/dingux/levels.h +++ /dev/null @@ -1,225 +0,0 @@ -/** - @file levels.h - - This file contains game levels and related code. - - by Miloslav Ciz (drummyfish), 2019 - - Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/) - plus a waiver of all other intellectual property. The goal of this work is - be and remain completely in the public domain forever, available for any use - whatsoever. -*/ - -#ifndef _SFG_LEVELS_H -#define _SFG_LEVELS_H - -#define SFG_MAP_SIZE 64 -#define SFG_TILE_DICTIONARY_SIZE 64 - -typedef uint16_t SFG_TileDefinition; -/**< - Defines a single game map tile. The format is following: - - MSB aaabbbbb cccddddd LSB - - aaa: ceiling texture index (from texture available on the map), 111 - means completely transparent texture - bbbbb: ceiling height (1111 meaning no ceiling) ABOVE the floor - ccc: floor texture index, 111 means completely transparent texture - ddddd: floor height -*/ - -#define SFG_TILE_CEILING_MAX_HEIGHT 31 -#define SFG_TILE_TEXTURE_TRANSPARENT 7 - -typedef SFG_TileDefinition SFG_TileDictionary[SFG_TILE_DICTIONARY_SIZE]; - -/// helper macros for SFG_TileDefinition -#define SFG_TD(floorH, ceilH, floorT, ceilT)\ - ((floorH & 0x001f) |\ - ((floorT & 0x0007) << 5) |\ - ((ceilH & 0x001f) << 8) |\ - ((ceilT & 0x0007) << 13)) - -#define SFG_TILE_FLOOR_HEIGHT(tile) (tile & 0x1f) -#define SFG_TILE_FLOOR_TEXTURE(tile) ((tile & 0xe0) >> 5) -#define SFG_TILE_CEILING_HEIGHT(tile) ((tile & 0x1f00) >> 8) -#define SFG_TILE_CEILING_TEXTURE(tile) ((tile & 0xe000) >> 13) - -#define SFG_OUTSIDE_TILE SFG_TD(63,0,7,7) - -/** - Game map represented as a 2D array. Array item has this format: - - MSB aabbbbbb LSB - - aa: type of square, possible values: - 00: normal - 01: moving floor (elevator), moves from floor height to ceililing height - (there is no ceiling above) - 10: moving ceiling, moves from ceiling height to floor height - 11: door - bbbbbb: index into tile dictionary -*/ -typedef uint8_t SFG_MapArray[SFG_MAP_SIZE * SFG_MAP_SIZE]; - -#define SFG_TILE_PROPERTY_MASK 0xc0 -#define SFG_TILE_PROPERTY_NORMAL 0x00 -#define SFG_TILE_PROPERTY_ELEVATOR 0x40 -#define SFG_TILE_PROPERTY_SQUEEZER 0x80 -#define SFG_TILE_PROPERTY_DOOR 0xc0 - -/** - Serves to place elements (items, enemies etc.) into the game level. -*/ -typedef struct -{ - uint8_t type; - uint8_t coords[2]; -} SFG_LevelElement; - -#define SFG_MAX_LEVEL_ELEMENTS 128 - -/* - Definitions of level element type. These values must leave the highest bit - unused because that will be used by the game engine, so the values must be - lower than 128. -*/ -#define SFG_LEVEL_ELEMENT_NONE 0 -#define SFG_LEVEL_ELEMENT_BARREL 0x01 -#define SFG_LEVEL_ELEMENT_HEALTH 0x02 -#define SFG_LEVEL_ELEMENT_BULLETS 0x03 -#define SFG_LEVEL_ELEMENT_ROCKETS 0x04 -#define SFG_LEVEL_ELEMENT_PLASMA 0x05 -#define SFG_LEVEL_ELEMENT_TREE 0x06 -#define SFG_LEVEL_ELEMENT_FINISH 0x07 -#define SFG_LEVEL_ELEMENT_TELEPORT 0x08 -#define SFG_LEVEL_ELEMENT_TERMINAL 0x09 -#define SFG_LEVEL_ELEMENT_COLUMN 0x0a -#define SFG_LEVEL_ELEMENT_RUIN 0x0b -#define SFG_LEVEL_ELEMENT_LAMP 0x0c -#define SFG_LEVEL_ELEMENT_CARD0 0x0d ///< Access card, unlocks doors with lock. -#define SFG_LEVEL_ELEMENT_CARD1 0x0e -#define SFG_LEVEL_ELEMENT_CARD2 0x0f -#define SFG_LEVEL_ELEMENT_LOCK0 0x10 /**< Special level element that must be - placed on a tile with door. This door is - then unlocked by taking the corresponding - access card. */ -#define SFG_LEVEL_ELEMENT_LOCK1 0x11 -#define SFG_LEVEL_ELEMENT_LOCK2 0x12 -#define SFG_LEVEL_ELEMENT_BLOCKER 0x13 ///< Invisible wall. - -#define SFG_LEVEL_ELEMENT_MONSTER_SPIDER 0x20 -#define SFG_LEVEL_ELEMENT_MONSTER_DESTROYER 0x21 -#define SFG_LEVEL_ELEMENT_MONSTER_WARRIOR 0x22 -#define SFG_LEVEL_ELEMENT_MONSTER_PLASMABOT 0x23 -#define SFG_LEVEL_ELEMENT_MONSTER_ENDER 0x24 -#define SFG_LEVEL_ELEMENT_MONSTER_TURRET 0x25 -#define SFG_LEVEL_ELEMENT_MONSTER_EXPLODER 0x26 - -#define SFG_MONSTERS_TOTAL 7 - -#define SFG_MONSTER_TYPE_TO_INDEX(monsterType) \ - ((monsterType) - SFG_LEVEL_ELEMENT_MONSTER_SPIDER) - -#define SFG_MONSTER_INDEX_TO_TYPE(monsterIndex) \ - ((monsterIndex) + SFG_LEVEL_ELEMENT_MONSTER_SPIDER) - -#define SFG_LEVEL_ELEMENT_TYPE_IS_MOSTER(t) \ - ((t) >= SFG_LEVEL_ELEMENT_MONSTER_SPIDER) - -typedef struct -{ - SFG_MapArray mapArray; - SFG_TileDictionary tileDictionary; - uint8_t textureIndices[7]; /**< Says which textures are used on the map. There - can be at most 7 because of 3bit indexing (one - value is reserved for special transparent - texture). */ - uint8_t doorTextureIndex; /**< Index (global, NOT from textureIndices) of a - texture used for door. */ - uint8_t floorColor; - uint8_t ceilingColor; - uint8_t playerStart[3]; /**< Player starting location: square X, square Y, - direction (fourths of RCL_Unit). */ - uint8_t backgroundImage; /** Index of level background image. */ - SFG_LevelElement elements[SFG_MAX_LEVEL_ELEMENTS]; -} SFG_Level; - -static inline SFG_TileDefinition SFG_getMapTile -( - const SFG_Level *level, - int16_t x, - int16_t y, - uint8_t *properties -) -{ - if (x < 0 || x >= SFG_MAP_SIZE || y < 0 || y >= SFG_MAP_SIZE) - { - *properties = SFG_TILE_PROPERTY_NORMAL; - return SFG_OUTSIDE_TILE; - } - - uint8_t tile = level->mapArray[y * SFG_MAP_SIZE + x]; - - *properties = tile & 0xc0; - return level->tileDictionary[tile & 0x3f]; -} - -#define SFG_NUMBER_OF_LEVELS 10 - -/* - NOTE: Initially the levels were stored sequentially in one big array, but that - caused some issues with Arduino's PROGMEM, so now we store each level in a - separate variable and eventually create an array of pointers to these. -*/ - -SFG_PROGRAM_MEMORY SFG_Level SFG_level0 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level1 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level2 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level3 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level4 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level5 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level6 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level7 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level8 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -SFG_PROGRAM_MEMORY SFG_Level SFG_level9 = - #include "/home/tastyfish/git/anarch/assets/tmp.txt" - ; - -static const SFG_Level * SFG_levels[SFG_NUMBER_OF_LEVELS] = -{ - &SFG_level0, &SFG_level1, &SFG_level2, &SFG_level3, &SFG_level4, &SFG_level5, - &SFG_level6, &SFG_level7, &SFG_level8, &SFG_level9 -}; - -#endif // guard - diff --git a/dingux/mbed_config.h b/dingux/mbed_config.h deleted file mode 100644 index 34e7f96..0000000 --- a/dingux/mbed_config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * mbed SDK - * Copyright (c) 2017 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Automatically generated configuration file. -// DO NOT EDIT, content will be overwritten. - -#ifndef __MBED_CONFIG_DATA__ -#define __MBED_CONFIG_DATA__ - - -#endif diff --git a/dingux/opt/mipsel-linux-uclibc/include/acl/libacl.h b/dingux/opt/mipsel-linux-uclibc/include/acl/libacl.h deleted file mode 100644 index 46ae8e9..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/acl/libacl.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - File: libacl.h - - (C) 1999, 2000 Andreas Gruenbacher, - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 2.1 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, see . -*/ - -#ifndef __ACL_LIBACL_H -#define __ACL_LIBACL_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Flags for acl_to_any_text() */ - -/* Print NO, SOME or ALL effective permissions comments. SOME prints - effective rights comments for entries which have different permissions - than effective permissions. */ -#define TEXT_SOME_EFFECTIVE 0x01 -#define TEXT_ALL_EFFECTIVE 0x02 - -/* Align effective permission comments to column 32 using tabs or - use a single tab. */ -#define TEXT_SMART_INDENT 0x04 - -/* User and group IDs instead of names. */ -#define TEXT_NUMERIC_IDS 0x08 - -/* Only output the first letter of entry types - ("u::rwx" instead of "user::rwx"). */ -#define TEXT_ABBREVIATE 0x10 - -/* acl_check error codes */ - -#define ACL_MULTI_ERROR (0x1000) /* multiple unique objects */ -#define ACL_DUPLICATE_ERROR (0x2000) /* duplicate Id's in entries */ -#define ACL_MISS_ERROR (0x3000) /* missing required entry */ -#define ACL_ENTRY_ERROR (0x4000) /* wrong entry type */ - -extern char *acl_to_any_text(acl_t acl, const char *prefix, - char separator, int options); -extern int acl_cmp(acl_t acl1, acl_t acl2); -extern int acl_check(acl_t acl, int *last); -extern acl_t acl_from_mode(mode_t mode); -extern int acl_equiv_mode(acl_t acl, mode_t *mode_p); -extern int acl_extended_file(const char *path_p); -extern int acl_extended_file_nofollow(const char *path_p); -extern int acl_extended_fd(int fd); -extern int acl_entries(acl_t acl); -extern const char *acl_error(int code); -extern int acl_get_perm(acl_permset_t permset_d, acl_perm_t perm); - -/* Copying permissions between files */ -struct error_context; -extern int perm_copy_file (const char *, const char *, - struct error_context *); -extern int perm_copy_fd (const char *, int, const char *, int, - struct error_context *); - -#ifdef __cplusplus -} -#endif - -#endif /* __ACL_LIBACL_H */ - diff --git a/dingux/opt/mipsel-linux-uclibc/include/attr/attributes.h b/dingux/opt/mipsel-linux-uclibc/include/attr/attributes.h deleted file mode 100644 index 0126927..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/attr/attributes.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2001-2002,2004 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ -#ifndef __ATTRIBUTES_H__ -#define __ATTRIBUTES_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#ifndef ENOATTR -# define ENOATTR ENODATA -#endif - -/* - * An almost-IRIX-compatible extended attributes API - * (the IRIX attribute "list" operation is missing, added ATTR_SECURE). - */ - -/* - * The maximum size (into the kernel or returned from the kernel) of an - * attribute value or the buffer used for an attr_list() call. Larger - * sizes will result in an E2BIG return code. - */ -#define ATTR_MAX_VALUELEN (64*1024) /* max length of a value */ - - -/* - * Flags that can be used with any of the simple attribute calls. - * All desired flags should be bit-wise OR'ed together. - */ -#define ATTR_DONTFOLLOW 0x0001 /* do not follow symlinks for a pathname */ -#define ATTR_ROOT 0x0002 /* use root namespace attributes in op */ -#define ATTR_TRUST 0x0004 /* tell server we can be trusted to properly - handle extended attributes */ -#define ATTR_SECURE 0x0008 /* use security namespace attributes in op */ - -/* - * Additional flags that can be used with the set() attribute call. - * All desired flags (from both lists) should be bit-wise OR'ed together. - */ -#define ATTR_CREATE 0x0010 /* pure create: fail if attr already exists */ -#define ATTR_REPLACE 0x0020 /* pure set: fail if attr does not exist */ - -/* - * Define how lists of attribute names are returned to the user from - * the attr_list() call. A large, 32bit aligned, buffer is passed in - * along with its size. We put an array of offsets at the top that each - * reference an attrlist_ent_t and pack the attrlist_ent_t's at the bottom. - */ -typedef struct attrlist { - int32_t al_count; /* number of entries in attrlist */ - int32_t al_more; /* T/F: more attrs (do call again) */ - int32_t al_offset[1]; /* byte offsets of attrs [var-sized] */ -} attrlist_t; - -/* - * Show the interesting info about one attribute. This is what the - * al_offset[i] entry points to. - */ -typedef struct attrlist_ent { /* data from attr_list() */ - uint32_t a_valuelen; /* number bytes in value of attr */ - char a_name[1]; /* attr name (NULL terminated) */ -} attrlist_ent_t; - -/* - * Given a pointer to the (char*) buffer containing the attr_list() result, - * and an index, return a pointer to the indicated attribute in the buffer. - */ -#define ATTR_ENTRY(buffer, index) \ - ((attrlist_ent_t *) \ - &((char *)buffer)[ ((attrlist_t *)(buffer))->al_offset[index] ]) - -/* - * Implement a "cursor" for use in successive attr_list() calls. - * It provides a way to find the last attribute that was returned in the - * last attr_list() call so that we can get the next one without missing - * any. This should be bzero()ed before use and whenever it is desired to - * start over from the beginning of the attribute list. The only valid - * operation on a cursor is to bzero() it. - */ -typedef struct attrlist_cursor { - uint32_t opaque[4]; /* an opaque cookie */ -} attrlist_cursor_t; - -/* - * Multi-attribute operation vector. - */ -typedef struct attr_multiop { - int32_t am_opcode; /* operation to perform (ATTR_OP_GET, etc.) */ - int32_t am_error; /* [out arg] result of this sub-op (an errno) */ - char *am_attrname; /* attribute name to work with */ - char *am_attrvalue; /* [in/out arg] attribute value (raw bytes) */ - int32_t am_length; /* [in/out arg] length of value */ - int32_t am_flags; /* flags (bit-wise OR of #defines above) */ -} attr_multiop_t; -#define ATTR_MAX_MULTIOPS 128 /* max number ops in an oplist array */ - -/* - * Valid values of am_opcode. - */ -#define ATTR_OP_GET 1 /* return the indicated attr's value */ -#define ATTR_OP_SET 2 /* set/create the indicated attr/value pair */ -#define ATTR_OP_REMOVE 3 /* remove the indicated attr */ - -/* - * Get the value of an attribute. - * Valuelength must be set to the maximum size of the value buffer, it will - * be set to the actual number of bytes used in the value buffer upon return. - * The return value is -1 on error (w/errno set appropriately), 0 on success. - */ -extern int attr_get (const char *__path, const char *__attrname, - char *__attrvalue, int *__valuelength, int __flags) - __attribute__ ((deprecated)); -extern int attr_getf (int __fd, const char *__attrname, char *__attrvalue, - int *__valuelength, int __flags) - __attribute__ ((deprecated)); - -/* - * Set the value of an attribute, creating the attribute if necessary. - * The return value is -1 on error (w/errno set appropriately), 0 on success. - */ -extern int attr_set (const char *__path, const char *__attrname, - const char *__attrvalue, const int __valuelength, - int __flags) - __attribute__ ((deprecated)); -extern int attr_setf (int __fd, const char *__attrname, - const char *__attrvalue, const int __valuelength, - int __flags) - __attribute__ ((deprecated)); - -/* - * Remove an attribute. - * The return value is -1 on error (w/errno set appropriately), 0 on success. - */ -extern int attr_remove (const char *__path, const char *__attrname, - int __flags) - __attribute__ ((deprecated)); -extern int attr_removef (int __fd, const char *__attrname, int __flags) - __attribute__ ((deprecated)); - -/* - * List the names and sizes of the values of all the attributes of an object. - * "Cursor" must be allocated and zeroed before the first call, it is used - * to maintain context between system calls if all the attribute names won't - * fit into the buffer on the first system call. - * The return value is -1 on error (w/errno set appropriately), 0 on success. - */ -extern int attr_list(const char *__path, char *__buffer, const int __buffersize, - int __flags, attrlist_cursor_t *__cursor) - __attribute__ ((deprecated)); -extern int attr_listf(int __fd, char *__buffer, const int __buffersize, - int __flags, attrlist_cursor_t *__cursor) - __attribute__ ((deprecated)); - -/* - * Operate on multiple attributes of the same object simultaneously. - * - * This call will save on system call overhead when many attributes are - * going to be operated on. - * - * The return value is -1 on error (w/errno set appropriately), 0 on success. - * Note that this call will not return -1 as a result of failure of any - * of the sub-operations, their return value is stored in each element - * of the operation array. This call will return -1 for a failure of the - * call as a whole, eg: if the pathname doesn't exist, or the fd is bad. - * - * The semantics and allowable values for the fields in a attr_multiop_t - * are the same as the semantics and allowable values for the arguments to - * the corresponding "simple" attribute interface. For example: the args - * to a ATTR_OP_GET are the same as the args to an attr_get() call. - */ -extern int attr_multi (const char *__path, attr_multiop_t *__oplist, - int __count, int __flags) - __attribute__ ((deprecated)); -extern int attr_multif (int __fd, attr_multiop_t *__oplist, - int __count, int __flags) - __attribute__ ((deprecated)); - -#ifdef __cplusplus -} -#endif - -#endif /* __ATTRIBUTES_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/attr/error_context.h b/dingux/opt/mipsel-linux-uclibc/include/attr/error_context.h deleted file mode 100644 index 9b56944..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/attr/error_context.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2009 Andreas Gruenbacher - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . - */ - -#ifndef __ERROR_CONTEXT_T -#define __ERROR_CONTEXT_T - -#ifdef __cplusplus -extern "C" { -#endif - -struct error_context { - /* Process an error message */ - void (*error) (struct error_context *, const char *, ...); - - /* Quote a file name for including in an error message */ - const char *(*quote) (struct error_context *, const char *); - - /* Free a quoted name */ - void (*quote_free) (struct error_context *, const char *); -}; - -#ifdef ERROR_CONTEXT_MACROS -# define error(ctx, args...) do { \ - if ((ctx) && (ctx)->error) \ - (ctx)->error((ctx), args); \ - } while(0) -# define quote(ctx, name) \ - ( ((ctx) && (ctx)->quote) ? (ctx)->quote((ctx), (name)) : (name) ) -# define quote_free(ctx, name) do { \ - if ((ctx) && (ctx)->quote_free) \ - (ctx)->quote_free((ctx), (name)); \ - } while(0) -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __ERROR_CONTEXT_T */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/attr/libattr.h b/dingux/opt/mipsel-linux-uclibc/include/attr/libattr.h deleted file mode 100644 index 81ebc1b..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/attr/libattr.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2009 Andreas Gruenbacher - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 2.1 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 Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . - */ - -#ifndef __LIBATTR_H -#define __LIBATTR_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct error_context; - -extern int attr_copy_file (const char *, const char *, - int (*) (const char *, struct error_context *), - struct error_context *); -extern int attr_copy_fd (const char *, int, const char *, int, - int (*) (const char *, struct error_context *), - struct error_context *); - -/* Keep this function for backwards compatibility. */ -extern int attr_copy_check_permissions(const char *, struct error_context *); - -#define ATTR_ACTION_SKIP 1 -#define ATTR_ACTION_PERMISSIONS 2 - -extern int attr_copy_action(const char *, struct error_context *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dingux/opt/mipsel-linux-uclibc/include/blkid/blkid.h b/dingux/opt/mipsel-linux-uclibc/include/blkid/blkid.h deleted file mode 100644 index 6ef836d..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/blkid/blkid.h +++ /dev/null @@ -1,461 +0,0 @@ -/* - * blkid.h - Interface for libblkid, a library to identify block devices - * - * Copyright (C) 2001 Andreas Dilger - * Copyright (C) 2003 Theodore Ts'o - * Copyright (C) 2008 Karel Zak - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef _BLKID_BLKID_H -#define _BLKID_BLKID_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define BLKID_VERSION "2.31.1" -#define BLKID_DATE "19-Dec-2017" - -/** - * blkid_dev: - * - * The device object keeps information about one device - */ -typedef struct blkid_struct_dev *blkid_dev; - -/** - * blkid_cache: - * - * information about all system devices - */ -typedef struct blkid_struct_cache *blkid_cache; - -/** - * blkid_probe: - * - * low-level probing setting - */ -typedef struct blkid_struct_probe *blkid_probe; - -/** - * blkid_topology: - * - * device topology information - */ -typedef struct blkid_struct_topology *blkid_topology; - -/** - * blkid_partlist - * - * list of all detected partitions and partitions tables - */ -typedef struct blkid_struct_partlist *blkid_partlist; - -/** - * blkid_partition: - * - * information about a partition - */ -typedef struct blkid_struct_partition *blkid_partition; - -/** - * blkid_parttable: - * - * information about a partition table - */ -typedef struct blkid_struct_parttable *blkid_parttable; - -/** - * blkid_loff_t: - * - * 64-bit signed number for offsets and sizes - */ -typedef int64_t blkid_loff_t; - -/** - * blkid_tag_iterate: - * - * tags iterator for high-level (blkid_cache) API - */ -typedef struct blkid_struct_tag_iterate *blkid_tag_iterate; - -/** - * blkid_dev_iterate: - * - * devices iterator for high-level (blkid_cache) API - */ -typedef struct blkid_struct_dev_iterate *blkid_dev_iterate; - -/* - * Flags for blkid_get_dev - * - * BLKID_DEV_CREATE Create an empty device structure if not found - * in the cache. - * BLKID_DEV_VERIFY Make sure the device structure corresponds - * with reality. - * BLKID_DEV_FIND Just look up a device entry, and return NULL - * if it is not found. - * BLKID_DEV_NORMAL Get a valid device structure, either from the - * cache or by probing the device. - */ -#define BLKID_DEV_FIND 0x0000 -#define BLKID_DEV_CREATE 0x0001 -#define BLKID_DEV_VERIFY 0x0002 -#define BLKID_DEV_NORMAL (BLKID_DEV_CREATE | BLKID_DEV_VERIFY) - - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#ifndef __ul_attribute__ -# if __GNUC_PREREQ (3, 4) -# define __ul_attribute__(_a_) __attribute__(_a_) -# else -# define __ul_attribute__(_a_) -# endif -#endif - -/* cache.c */ -extern void blkid_init_debug(int mask); -extern void blkid_put_cache(blkid_cache cache); -extern int blkid_get_cache(blkid_cache *cache, const char *filename); -extern void blkid_gc_cache(blkid_cache cache); - -/* dev.c */ -extern const char *blkid_dev_devname(blkid_dev dev) - __ul_attribute__((warn_unused_result)); - -extern blkid_dev_iterate blkid_dev_iterate_begin(blkid_cache cache); -extern int blkid_dev_set_search(blkid_dev_iterate iter, - char *search_type, char *search_value); -extern int blkid_dev_next(blkid_dev_iterate iterate, blkid_dev *dev); -extern void blkid_dev_iterate_end(blkid_dev_iterate iterate); - -/* devno.c */ -extern char *blkid_devno_to_devname(dev_t devno) - __ul_attribute__((warn_unused_result)); -extern int blkid_devno_to_wholedisk(dev_t dev, char *diskname, - size_t len, dev_t *diskdevno) - __ul_attribute__((warn_unused_result)); - -/* devname.c */ -extern int blkid_probe_all(blkid_cache cache); -extern int blkid_probe_all_new(blkid_cache cache); -extern int blkid_probe_all_removable(blkid_cache cache); - -extern blkid_dev blkid_get_dev(blkid_cache cache, const char *devname, int flags); - -/* getsize.c */ -extern blkid_loff_t blkid_get_dev_size(int fd); - -/* verify.c */ -extern blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev); - -/* read.c */ - -/* resolve.c */ -extern char *blkid_get_tag_value(blkid_cache cache, const char *tagname, - const char *devname) - __ul_attribute__((warn_unused_result)); -extern char *blkid_get_devname(blkid_cache cache, const char *token, - const char *value) - __ul_attribute__((warn_unused_result)); - -/* tag.c */ -extern blkid_tag_iterate blkid_tag_iterate_begin(blkid_dev dev); -extern int blkid_tag_next(blkid_tag_iterate iterate, - const char **type, const char **value); -extern void blkid_tag_iterate_end(blkid_tag_iterate iterate); -extern int blkid_dev_has_tag(blkid_dev dev, const char *type, const char *value); - -extern blkid_dev blkid_find_dev_with_tag(blkid_cache cache, - const char *type, - const char *value); - -extern int blkid_parse_tag_string(const char *token, char **ret_type, char **ret_val); - -/* version.c */ -extern int blkid_parse_version_string(const char *ver_string) - __ul_attribute__((nonnull)); -extern int blkid_get_library_version(const char **ver_string, - const char **date_string); - -/* encode.c */ -extern int blkid_encode_string(const char *str, char *str_enc, size_t len); -extern int blkid_safe_string(const char *str, char *str_safe, size_t len); - -/* evaluate.c */ -extern int blkid_send_uevent(const char *devname, const char *action); -extern char *blkid_evaluate_tag(const char *token, const char *value, - blkid_cache *cache) - __ul_attribute__((warn_unused_result)); -extern char *blkid_evaluate_spec(const char *spec, blkid_cache *cache) - __ul_attribute__((warn_unused_result)); - -/* probe.c */ -extern blkid_probe blkid_new_probe(void) - __ul_attribute__((warn_unused_result)); -extern blkid_probe blkid_new_probe_from_filename(const char *filename) - __ul_attribute__((warn_unused_result)) - __ul_attribute__((nonnull)); -extern void blkid_free_probe(blkid_probe pr); - -extern void blkid_reset_probe(blkid_probe pr); -extern int blkid_probe_reset_buffers(blkid_probe pr); -extern int blkid_probe_hide_range(blkid_probe pr, uint64_t off, uint64_t len); - -extern int blkid_probe_set_device(blkid_probe pr, int fd, - blkid_loff_t off, blkid_loff_t size) - __ul_attribute__((nonnull)); - -extern dev_t blkid_probe_get_devno(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern dev_t blkid_probe_get_wholedisk_devno(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern int blkid_probe_is_wholedisk(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern blkid_loff_t blkid_probe_get_size(blkid_probe pr) - __ul_attribute__((nonnull)); -extern blkid_loff_t blkid_probe_get_offset(blkid_probe pr) - __ul_attribute__((nonnull)); -extern unsigned int blkid_probe_get_sectorsize(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_probe_set_sectorsize(blkid_probe pr, unsigned int sz) - __ul_attribute__((nonnull)); -extern blkid_loff_t blkid_probe_get_sectors(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern int blkid_probe_get_fd(blkid_probe pr) - __ul_attribute__((nonnull)); - -/* - * superblocks probing - */ -extern int blkid_known_fstype(const char *fstype) - __ul_attribute__((nonnull)); - -extern int blkid_superblocks_get_name(size_t idx, const char **name, int *usage); - -extern int blkid_probe_enable_superblocks(blkid_probe pr, int enable) - __ul_attribute__((nonnull)); - -#define BLKID_SUBLKS_LABEL (1 << 1) /* read LABEL from superblock */ -#define BLKID_SUBLKS_LABELRAW (1 << 2) /* read and define LABEL_RAW result value*/ -#define BLKID_SUBLKS_UUID (1 << 3) /* read UUID from superblock */ -#define BLKID_SUBLKS_UUIDRAW (1 << 4) /* read and define UUID_RAW result value */ -#define BLKID_SUBLKS_TYPE (1 << 5) /* define TYPE result value */ -#define BLKID_SUBLKS_SECTYPE (1 << 6) /* define compatible fs type (second type) */ -#define BLKID_SUBLKS_USAGE (1 << 7) /* define USAGE result value */ -#define BLKID_SUBLKS_VERSION (1 << 8) /* read FS type from superblock */ -#define BLKID_SUBLKS_MAGIC (1 << 9) /* define SBMAGIC and SBMAGIC_OFFSET */ -#define BLKID_SUBLKS_BADCSUM (1 << 10) /* allow a bad checksum */ - -#define BLKID_SUBLKS_DEFAULT (BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | \ - BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE) - -extern int blkid_probe_set_superblocks_flags(blkid_probe pr, int flags) - __ul_attribute__((nonnull)); -extern int blkid_probe_reset_superblocks_filter(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_probe_invert_superblocks_filter(blkid_probe pr) - __ul_attribute__((nonnull)); - -/** - * BLKID_FLTR_NOTIN - */ -#define BLKID_FLTR_NOTIN 1 -/** - * BLKID_FLTR_ONLYIN - */ -#define BLKID_FLTR_ONLYIN 2 -extern int blkid_probe_filter_superblocks_type(blkid_probe pr, int flag, char *names[]) - __ul_attribute__((nonnull)); - -#define BLKID_USAGE_FILESYSTEM (1 << 1) -#define BLKID_USAGE_RAID (1 << 2) -#define BLKID_USAGE_CRYPTO (1 << 3) -#define BLKID_USAGE_OTHER (1 << 4) -extern int blkid_probe_filter_superblocks_usage(blkid_probe pr, int flag, int usage) - __ul_attribute__((nonnull)); - -/* - * topology probing - */ -extern int blkid_probe_enable_topology(blkid_probe pr, int enable) - __ul_attribute__((nonnull)); - -/* binary interface */ -extern blkid_topology blkid_probe_get_topology(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern unsigned long blkid_topology_get_alignment_offset(blkid_topology tp) - __ul_attribute__((nonnull)); -extern unsigned long blkid_topology_get_minimum_io_size(blkid_topology tp) - __ul_attribute__((nonnull)); -extern unsigned long blkid_topology_get_optimal_io_size(blkid_topology tp) - __ul_attribute__((nonnull)); -extern unsigned long blkid_topology_get_logical_sector_size(blkid_topology tp) - __ul_attribute__((nonnull)); -extern unsigned long blkid_topology_get_physical_sector_size(blkid_topology tp) - __ul_attribute__((nonnull)); - -/* - * partitions probing - */ -extern int blkid_known_pttype(const char *pttype); -extern int blkid_partitions_get_name(const size_t idx, const char **name); - -extern int blkid_probe_enable_partitions(blkid_probe pr, int enable) - __ul_attribute__((nonnull)); - -extern int blkid_probe_reset_partitions_filter(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_probe_invert_partitions_filter(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_probe_filter_partitions_type(blkid_probe pr, int flag, char *names[]) - __ul_attribute__((nonnull)); - -/* partitions probing flags */ -#define BLKID_PARTS_FORCE_GPT (1 << 1) -#define BLKID_PARTS_ENTRY_DETAILS (1 << 2) -#define BLKID_PARTS_MAGIC (1 << 3) -extern int blkid_probe_set_partitions_flags(blkid_probe pr, int flags) - __ul_attribute__((nonnull)); - -/* binary interface */ -extern blkid_partlist blkid_probe_get_partitions(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern int blkid_partlist_numof_partitions(blkid_partlist ls) - __ul_attribute__((nonnull)); -extern blkid_parttable blkid_partlist_get_table(blkid_partlist ls) - __ul_attribute__((nonnull)); -extern blkid_partition blkid_partlist_get_partition(blkid_partlist ls, int n) - __ul_attribute__((nonnull)); -extern blkid_partition blkid_partlist_get_partition_by_partno(blkid_partlist ls, int n) - __ul_attribute__((nonnull)); -extern blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno) - __ul_attribute__((nonnull)); -extern blkid_parttable blkid_partition_get_table(blkid_partition par) - __ul_attribute__((nonnull)); - -extern const char *blkid_partition_get_name(blkid_partition par) - __ul_attribute__((nonnull)); -extern const char *blkid_partition_get_uuid(blkid_partition par) - __ul_attribute__((nonnull)); -extern int blkid_partition_get_partno(blkid_partition par) - __ul_attribute__((nonnull)); -extern blkid_loff_t blkid_partition_get_start(blkid_partition par) - __ul_attribute__((nonnull)); -extern blkid_loff_t blkid_partition_get_size(blkid_partition par) - __ul_attribute__((nonnull)); - -extern int blkid_partition_get_type(blkid_partition par) - __ul_attribute__((nonnull)); -extern const char *blkid_partition_get_type_string(blkid_partition par) - __ul_attribute__((nonnull)); -extern unsigned long long blkid_partition_get_flags(blkid_partition par) - __ul_attribute__((nonnull)); - -extern int blkid_partition_is_logical(blkid_partition par) - __ul_attribute__((nonnull)); -extern int blkid_partition_is_extended(blkid_partition par) - __ul_attribute__((nonnull)); -extern int blkid_partition_is_primary(blkid_partition par) - __ul_attribute__((nonnull)); - -extern const char *blkid_parttable_get_type(blkid_parttable tab) - __ul_attribute__((nonnull)); -extern const char *blkid_parttable_get_id(blkid_parttable tab) - __ul_attribute__((nonnull)); -extern blkid_loff_t blkid_parttable_get_offset(blkid_parttable tab) - __ul_attribute__((nonnull)); -extern blkid_partition blkid_parttable_get_parent(blkid_parttable tab) - __ul_attribute__((nonnull)); - -/* - * NAME=value low-level interface - */ -extern int blkid_do_probe(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_do_safeprobe(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_do_fullprobe(blkid_probe pr) - __ul_attribute__((nonnull)); - -extern int blkid_probe_numof_values(blkid_probe pr) - __ul_attribute__((nonnull)); -extern int blkid_probe_get_value(blkid_probe pr, int num, const char **name, - const char **data, size_t *len) - __ul_attribute__((nonnull(1))); -extern int blkid_probe_lookup_value(blkid_probe pr, const char *name, - const char **data, size_t *len) - __ul_attribute__((nonnull(1, 2))); -extern int blkid_probe_has_value(blkid_probe pr, const char *name) - __ul_attribute__((nonnull)); -extern int blkid_do_wipe(blkid_probe pr, int dryrun) - __ul_attribute__((nonnull)); -extern int blkid_probe_step_back(blkid_probe pr) - __ul_attribute__((nonnull)); - -/* - * Deprecated functions/macros - */ -#ifndef BLKID_DISABLE_DEPRECATED - -#define BLKID_PROBREQ_LABEL BLKID_SUBLKS_LABEL -#define BLKID_PROBREQ_LABELRAW BLKID_SUBLKS_LABELRAW -#define BLKID_PROBREQ_UUID BLKID_SUBLKS_UUID -#define BLKID_PROBREQ_UUIDRAW BLKID_SUBLKS_UUIDRAW -#define BLKID_PROBREQ_TYPE BLKID_SUBLKS_TYPE -#define BLKID_PROBREQ_SECTYPE BLKID_SUBLKS_SECTYPE -#define BLKID_PROBREQ_USAGE BLKID_SUBLKS_USAGE -#define BLKID_PROBREQ_VERSION BLKID_SUBLKS_VERSION - -extern int blkid_probe_set_request(blkid_probe pr, int flags) - __ul_attribute__((deprecated)); - -extern int blkid_probe_filter_usage(blkid_probe pr, int flag, int usage) - __ul_attribute__((deprecated)); - -extern int blkid_probe_filter_types(blkid_probe pr, int flag, char *names[]) - __ul_attribute__((deprecated)); - -extern int blkid_probe_invert_filter(blkid_probe pr) - __ul_attribute__((deprecated)); - -extern int blkid_probe_reset_filter(blkid_probe pr) - __ul_attribute__((deprecated)); - -#endif /* BLKID_DISABLE_DEPRECATED */ - -#ifdef __cplusplus -} -#endif - -#endif /* _BLKID_BLKID_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/com_err.h b/dingux/opt/mipsel-linux-uclibc/include/com_err.h deleted file mode 120000 index b52fc72..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/com_err.h +++ /dev/null @@ -1 +0,0 @@ -et/com_err.h \ No newline at end of file diff --git a/dingux/opt/mipsel-linux-uclibc/include/e2p/e2p.h b/dingux/opt/mipsel-linux-uclibc/include/e2p/e2p.h deleted file mode 100644 index e96cdec..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/e2p/e2p.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * e2p.h --- header file for the e2p library - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Library - * General Public License, version 2. - * %End-Header% - */ - -#include /* Needed by dirent.h on netbsd */ -#include -#include - -#include - -#define E2P_FEATURE_COMPAT 0 -#define E2P_FEATURE_INCOMPAT 1 -#define E2P_FEATURE_RO_INCOMPAT 2 -#define E2P_FEATURE_TYPE_MASK 0x03 - -#define E2P_FEATURE_NEGATE_FLAG 0x80 - -#define E2P_FS_FEATURE 0 -#define E2P_JOURNAL_FEATURE 1 - -/* `options' for print_flags() */ - -#define PFOPT_LONG 1 /* Must be 1 for compatibility with `int long_format'. */ - - -int fgetflags (const char * name, unsigned long * flags); -int fgetversion (const char * name, unsigned long * version); -int fsetflags (const char * name, unsigned long flags); -int fsetversion (const char * name, unsigned long version); -int fgetproject(const char *name, unsigned long *project); -int fsetproject(const char *name, unsigned long project); -int getflags (int fd, unsigned long * flags); -int getversion (int fd, unsigned long * version); -int iterate_on_dir (const char * dir_name, - int (*func) (const char *, struct dirent *, void *), - void * private_arg); -void list_super(struct ext2_super_block * s); -void list_super2(struct ext2_super_block * s, FILE *f); -void print_fs_errors (FILE * f, unsigned short errors); -void print_flags (FILE * f, unsigned long flags, unsigned options); -void print_fs_state (FILE * f, unsigned short state); -int setflags (int fd, unsigned long flags); -int setversion (int fd, unsigned long version); - -void e2p_list_journal_super(FILE *f, char *journal_sb_buf, - int exp_block_size, int flags); - -const char *e2p_feature2string(int compat, unsigned int mask); -const char *e2p_jrnl_feature2string(int compat, unsigned int mask); -int e2p_string2feature(char *string, int *compat, unsigned int *mask); -int e2p_jrnl_string2feature(char *string, int *compat_type, unsigned int *mask); -int e2p_edit_feature(const char *str, __u32 *compat_array, __u32 *ok_array); -int e2p_edit_feature2(const char *str, __u32 *compat_array, __u32 *ok_array, - __u32 *clear_ok_array, int *type_err, - unsigned int *mask_err); - -int e2p_is_null_uuid(void *uu); -void e2p_uuid_to_str(void *uu, char *out); -const char *e2p_uuid2str(void *uu); - -const char *e2p_hash2string(int num); -int e2p_string2hash(char *string); - -const char *e2p_mntopt2string(unsigned int mask); -int e2p_string2mntopt(char *string, unsigned int *mask); -int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok); - -unsigned long parse_num_blocks(const char *arg, int log_block_size); -unsigned long long parse_num_blocks2(const char *arg, int log_block_size); - -char *e2p_os2string(int os_type); -int e2p_string2os(char *str); - -unsigned int e2p_percent(int percent, unsigned int base); diff --git a/dingux/opt/mipsel-linux-uclibc/include/et/com_err.h b/dingux/opt/mipsel-linux-uclibc/include/et/com_err.h deleted file mode 100644 index 27a36ea..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/et/com_err.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Header file for common error description library. - * - * Copyright 1988, Student Information Processing Board of the - * Massachusetts Institute of Technology. - * - * For copyright and distribution info, see the documentation supplied - * with this package. - */ - -#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__) - -#ifdef __GNUC__ -#define COM_ERR_ATTR(x) __attribute__(x) -#else -#define COM_ERR_ATTR(x) -#endif - -#include -#include - -typedef long errcode_t; - -struct error_table { - char const * const * msgs; - long base; - int n_msgs; -}; -struct et_list; - -extern void com_err (const char *, long, const char *, ...) - COM_ERR_ATTR((format(printf, 3, 4))); - -extern void com_err_va (const char *whoami, errcode_t code, const char *fmt, - va_list args) - COM_ERR_ATTR((format(printf, 3, 0))); - -extern char const *error_message (long); -extern void (*com_err_hook) (const char *, long, const char *, va_list); -extern void (*set_com_err_hook (void (*) (const char *, long, - const char *, va_list))) - (const char *, long, const char *, va_list); -extern void (*reset_com_err_hook (void)) (const char *, long, - const char *, va_list); -extern int init_error_table(const char * const *msgs, long base, int count); -extern char *(*set_com_err_gettext (char *(*) (const char *))) - (const char *); - -extern errcode_t add_error_table(const struct error_table * et); -extern errcode_t remove_error_table(const struct error_table * et); -extern void add_to_error_table(struct et_list *new_table); - -/* Provided for Heimdall compatibility */ -extern const char *com_right(struct et_list *list, long code); -extern const char *com_right_r(struct et_list *list, long code, char *str, size_t len); -extern void initialize_error_table_r(struct et_list **list, - const char **messages, - int num_errors, - long base); -extern void free_error_table(struct et_list *et); - -/* Provided for compatibility with other com_err libraries */ -extern int et_list_lock(void); -extern int et_list_unlock(void); - -#define __COM_ERR_H -#define __COM_ERR_H__ -#endif /* !defined(__COM_ERR_H) && !defined(__COM_ERR_H__)*/ diff --git a/dingux/opt/mipsel-linux-uclibc/include/expat.h b/dingux/opt/mipsel-linux-uclibc/include/expat.h deleted file mode 100644 index 1f608c0..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/expat.h +++ /dev/null @@ -1,1085 +0,0 @@ -/* - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 1997-2000 Thai Open Source Software Center Ltd - Copyright (c) 2000-2017 Expat development team - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef Expat_INCLUDED -#define Expat_INCLUDED 1 - -#ifdef __VMS -/* 0 1 2 3 0 1 2 3 - 1234567890123456789012345678901 1234567890123456789012345678901 */ -#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler -#define XML_SetUnparsedEntityDeclHandler XML_SetUnparsedEntDeclHandler -#define XML_SetStartNamespaceDeclHandler XML_SetStartNamespcDeclHandler -#define XML_SetExternalEntityRefHandlerArg XML_SetExternalEntRefHandlerArg -#endif - -#include -#include "expat_external.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct XML_ParserStruct; -typedef struct XML_ParserStruct *XML_Parser; - -typedef unsigned char XML_Bool; -#define XML_TRUE ((XML_Bool) 1) -#define XML_FALSE ((XML_Bool) 0) - -/* The XML_Status enum gives the possible return values for several - API functions. The preprocessor #defines are included so this - stanza can be added to code that still needs to support older - versions of Expat 1.95.x: - - #ifndef XML_STATUS_OK - #define XML_STATUS_OK 1 - #define XML_STATUS_ERROR 0 - #endif - - Otherwise, the #define hackery is quite ugly and would have been - dropped. -*/ -enum XML_Status { - XML_STATUS_ERROR = 0, -#define XML_STATUS_ERROR XML_STATUS_ERROR - XML_STATUS_OK = 1, -#define XML_STATUS_OK XML_STATUS_OK - XML_STATUS_SUSPENDED = 2 -#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED -}; - -enum XML_Error { - XML_ERROR_NONE, - XML_ERROR_NO_MEMORY, - XML_ERROR_SYNTAX, - XML_ERROR_NO_ELEMENTS, - XML_ERROR_INVALID_TOKEN, - XML_ERROR_UNCLOSED_TOKEN, - XML_ERROR_PARTIAL_CHAR, - XML_ERROR_TAG_MISMATCH, - XML_ERROR_DUPLICATE_ATTRIBUTE, - XML_ERROR_JUNK_AFTER_DOC_ELEMENT, - XML_ERROR_PARAM_ENTITY_REF, - XML_ERROR_UNDEFINED_ENTITY, - XML_ERROR_RECURSIVE_ENTITY_REF, - XML_ERROR_ASYNC_ENTITY, - XML_ERROR_BAD_CHAR_REF, - XML_ERROR_BINARY_ENTITY_REF, - XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, - XML_ERROR_MISPLACED_XML_PI, - XML_ERROR_UNKNOWN_ENCODING, - XML_ERROR_INCORRECT_ENCODING, - XML_ERROR_UNCLOSED_CDATA_SECTION, - XML_ERROR_EXTERNAL_ENTITY_HANDLING, - XML_ERROR_NOT_STANDALONE, - XML_ERROR_UNEXPECTED_STATE, - XML_ERROR_ENTITY_DECLARED_IN_PE, - XML_ERROR_FEATURE_REQUIRES_XML_DTD, - XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, - /* Added in 1.95.7. */ - XML_ERROR_UNBOUND_PREFIX, - /* Added in 1.95.8. */ - XML_ERROR_UNDECLARING_PREFIX, - XML_ERROR_INCOMPLETE_PE, - XML_ERROR_XML_DECL, - XML_ERROR_TEXT_DECL, - XML_ERROR_PUBLICID, - XML_ERROR_SUSPENDED, - XML_ERROR_NOT_SUSPENDED, - XML_ERROR_ABORTED, - XML_ERROR_FINISHED, - XML_ERROR_SUSPEND_PE, - /* Added in 2.0. */ - XML_ERROR_RESERVED_PREFIX_XML, - XML_ERROR_RESERVED_PREFIX_XMLNS, - XML_ERROR_RESERVED_NAMESPACE_URI, - /* Added in 2.2.1. */ - XML_ERROR_INVALID_ARGUMENT -}; - -enum XML_Content_Type { - XML_CTYPE_EMPTY = 1, - XML_CTYPE_ANY, - XML_CTYPE_MIXED, - XML_CTYPE_NAME, - XML_CTYPE_CHOICE, - XML_CTYPE_SEQ -}; - -enum XML_Content_Quant { - XML_CQUANT_NONE, - XML_CQUANT_OPT, - XML_CQUANT_REP, - XML_CQUANT_PLUS -}; - -/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be - XML_CQUANT_NONE, and the other fields will be zero or NULL. - If type == XML_CTYPE_MIXED, then quant will be NONE or REP and - numchildren will contain number of elements that may be mixed in - and children point to an array of XML_Content cells that will be - all of XML_CTYPE_NAME type with no quantification. - - If type == XML_CTYPE_NAME, then the name points to the name, and - the numchildren field will be zero and children will be NULL. The - quant fields indicates any quantifiers placed on the name. - - CHOICE and SEQ will have name NULL, the number of children in - numchildren and children will point, recursively, to an array - of XML_Content cells. - - The EMPTY, ANY, and MIXED types will only occur at top level. -*/ - -typedef struct XML_cp XML_Content; - -struct XML_cp { - enum XML_Content_Type type; - enum XML_Content_Quant quant; - XML_Char * name; - unsigned int numchildren; - XML_Content * children; -}; - - -/* This is called for an element declaration. See above for - description of the model argument. It's the caller's responsibility - to free model when finished with it. -*/ -typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData, - const XML_Char *name, - XML_Content *model); - -XMLPARSEAPI(void) -XML_SetElementDeclHandler(XML_Parser parser, - XML_ElementDeclHandler eldecl); - -/* The Attlist declaration handler is called for *each* attribute. So - a single Attlist declaration with multiple attributes declared will - generate multiple calls to this handler. The "default" parameter - may be NULL in the case of the "#IMPLIED" or "#REQUIRED" - keyword. The "isrequired" parameter will be true and the default - value will be NULL in the case of "#REQUIRED". If "isrequired" is - true and default is non-NULL, then this is a "#FIXED" default. -*/ -typedef void (XMLCALL *XML_AttlistDeclHandler) ( - void *userData, - const XML_Char *elname, - const XML_Char *attname, - const XML_Char *att_type, - const XML_Char *dflt, - int isrequired); - -XMLPARSEAPI(void) -XML_SetAttlistDeclHandler(XML_Parser parser, - XML_AttlistDeclHandler attdecl); - -/* The XML declaration handler is called for *both* XML declarations - and text declarations. The way to distinguish is that the version - parameter will be NULL for text declarations. The encoding - parameter may be NULL for XML declarations. The standalone - parameter will be -1, 0, or 1 indicating respectively that there - was no standalone parameter in the declaration, that it was given - as no, or that it was given as yes. -*/ -typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData, - const XML_Char *version, - const XML_Char *encoding, - int standalone); - -XMLPARSEAPI(void) -XML_SetXmlDeclHandler(XML_Parser parser, - XML_XmlDeclHandler xmldecl); - - -typedef struct { - void *(*malloc_fcn)(size_t size); - void *(*realloc_fcn)(void *ptr, size_t size); - void (*free_fcn)(void *ptr); -} XML_Memory_Handling_Suite; - -/* Constructs a new parser; encoding is the encoding specified by the - external protocol or NULL if there is none specified. -*/ -XMLPARSEAPI(XML_Parser) -XML_ParserCreate(const XML_Char *encoding); - -/* Constructs a new parser and namespace processor. Element type - names and attribute names that belong to a namespace will be - expanded; unprefixed attribute names are never expanded; unprefixed - element type names are expanded only if there is a default - namespace. The expanded name is the concatenation of the namespace - URI, the namespace separator character, and the local part of the - name. If the namespace separator is '\0' then the namespace URI - and the local part will be concatenated without any separator. - It is a programming error to use the separator '\0' with namespace - triplets (see XML_SetReturnNSTriplet). -*/ -XMLPARSEAPI(XML_Parser) -XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); - - -/* Constructs a new parser using the memory management suite referred to - by memsuite. If memsuite is NULL, then use the standard library memory - suite. If namespaceSeparator is non-NULL it creates a parser with - namespace processing as described above. The character pointed at - will serve as the namespace separator. - - All further memory operations used for the created parser will come from - the given suite. -*/ -XMLPARSEAPI(XML_Parser) -XML_ParserCreate_MM(const XML_Char *encoding, - const XML_Memory_Handling_Suite *memsuite, - const XML_Char *namespaceSeparator); - -/* Prepare a parser object to be re-used. This is particularly - valuable when memory allocation overhead is disproportionatly high, - such as when a large number of small documnents need to be parsed. - All handlers are cleared from the parser, except for the - unknownEncodingHandler. The parser's external state is re-initialized - except for the values of ns and ns_triplets. - - Added in Expat 1.95.3. -*/ -XMLPARSEAPI(XML_Bool) -XML_ParserReset(XML_Parser parser, const XML_Char *encoding); - -/* atts is array of name/value pairs, terminated by 0; - names and values are 0 terminated. -*/ -typedef void (XMLCALL *XML_StartElementHandler) (void *userData, - const XML_Char *name, - const XML_Char **atts); - -typedef void (XMLCALL *XML_EndElementHandler) (void *userData, - const XML_Char *name); - - -/* s is not 0 terminated. */ -typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData, - const XML_Char *s, - int len); - -/* target and data are 0 terminated */ -typedef void (XMLCALL *XML_ProcessingInstructionHandler) ( - void *userData, - const XML_Char *target, - const XML_Char *data); - -/* data is 0 terminated */ -typedef void (XMLCALL *XML_CommentHandler) (void *userData, - const XML_Char *data); - -typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData); -typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData); - -/* This is called for any characters in the XML document for which - there is no applicable handler. This includes both characters that - are part of markup which is of a kind that is not reported - (comments, markup declarations), or characters that are part of a - construct which could be reported but for which no handler has been - supplied. The characters are passed exactly as they were in the XML - document except that they will be encoded in UTF-8 or UTF-16. - Line boundaries are not normalized. Note that a byte order mark - character is not passed to the default handler. There are no - guarantees about how characters are divided between calls to the - default handler: for example, a comment might be split between - multiple calls. -*/ -typedef void (XMLCALL *XML_DefaultHandler) (void *userData, - const XML_Char *s, - int len); - -/* This is called for the start of the DOCTYPE declaration, before - any DTD or internal subset is parsed. -*/ -typedef void (XMLCALL *XML_StartDoctypeDeclHandler) ( - void *userData, - const XML_Char *doctypeName, - const XML_Char *sysid, - const XML_Char *pubid, - int has_internal_subset); - -/* This is called for the start of the DOCTYPE declaration when the - closing > is encountered, but after processing any external - subset. -*/ -typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData); - -/* This is called for entity declarations. The is_parameter_entity - argument will be non-zero if the entity is a parameter entity, zero - otherwise. - - For internal entities (), value will - be non-NULL and systemId, publicID, and notationName will be NULL. - The value string is NOT nul-terminated; the length is provided in - the value_length argument. Since it is legal to have zero-length - values, do not use this argument to test for internal entities. - - For external entities, value will be NULL and systemId will be - non-NULL. The publicId argument will be NULL unless a public - identifier was provided. The notationName argument will have a - non-NULL value only for unparsed entity declarations. - - Note that is_parameter_entity can't be changed to XML_Bool, since - that would break binary compatibility. -*/ -typedef void (XMLCALL *XML_EntityDeclHandler) ( - void *userData, - const XML_Char *entityName, - int is_parameter_entity, - const XML_Char *value, - int value_length, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); - -XMLPARSEAPI(void) -XML_SetEntityDeclHandler(XML_Parser parser, - XML_EntityDeclHandler handler); - -/* OBSOLETE -- OBSOLETE -- OBSOLETE - This handler has been superseded by the EntityDeclHandler above. - It is provided here for backward compatibility. - - This is called for a declaration of an unparsed (NDATA) entity. - The base argument is whatever was set by XML_SetBase. The - entityName, systemId and notationName arguments will never be - NULL. The other arguments may be. -*/ -typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) ( - void *userData, - const XML_Char *entityName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId, - const XML_Char *notationName); - -/* This is called for a declaration of notation. The base argument is - whatever was set by XML_SetBase. The notationName will never be - NULL. The other arguments can be. -*/ -typedef void (XMLCALL *XML_NotationDeclHandler) ( - void *userData, - const XML_Char *notationName, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); - -/* When namespace processing is enabled, these are called once for - each namespace declaration. The call to the start and end element - handlers occur between the calls to the start and end namespace - declaration handlers. For an xmlns attribute, prefix will be - NULL. For an xmlns="" attribute, uri will be NULL. -*/ -typedef void (XMLCALL *XML_StartNamespaceDeclHandler) ( - void *userData, - const XML_Char *prefix, - const XML_Char *uri); - -typedef void (XMLCALL *XML_EndNamespaceDeclHandler) ( - void *userData, - const XML_Char *prefix); - -/* This is called if the document is not standalone, that is, it has an - external subset or a reference to a parameter entity, but does not - have standalone="yes". If this handler returns XML_STATUS_ERROR, - then processing will not continue, and the parser will return a - XML_ERROR_NOT_STANDALONE error. - If parameter entity parsing is enabled, then in addition to the - conditions above this handler will only be called if the referenced - entity was actually read. -*/ -typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData); - -/* This is called for a reference to an external parsed general - entity. The referenced entity is not automatically parsed. The - application can parse it immediately or later using - XML_ExternalEntityParserCreate. - - The parser argument is the parser parsing the entity containing the - reference; it can be passed as the parser argument to - XML_ExternalEntityParserCreate. The systemId argument is the - system identifier as specified in the entity declaration; it will - not be NULL. - - The base argument is the system identifier that should be used as - the base for resolving systemId if systemId was relative; this is - set by XML_SetBase; it may be NULL. - - The publicId argument is the public identifier as specified in the - entity declaration, or NULL if none was specified; the whitespace - in the public identifier will have been normalized as required by - the XML spec. - - The context argument specifies the parsing context in the format - expected by the context argument to XML_ExternalEntityParserCreate; - context is valid only until the handler returns, so if the - referenced entity is to be parsed later, it must be copied. - context is NULL only when the entity is a parameter entity. - - The handler should return XML_STATUS_ERROR if processing should not - continue because of a fatal error in the handling of the external - entity. In this case the calling parser will return an - XML_ERROR_EXTERNAL_ENTITY_HANDLING error. - - Note that unlike other handlers the first argument is the parser, - not userData. -*/ -typedef int (XMLCALL *XML_ExternalEntityRefHandler) ( - XML_Parser parser, - const XML_Char *context, - const XML_Char *base, - const XML_Char *systemId, - const XML_Char *publicId); - -/* This is called in two situations: - 1) An entity reference is encountered for which no declaration - has been read *and* this is not an error. - 2) An internal entity reference is read, but not expanded, because - XML_SetDefaultHandler has been called. - Note: skipped parameter entities in declarations and skipped general - entities in attribute values cannot be reported, because - the event would be out of sync with the reporting of the - declarations or attribute values -*/ -typedef void (XMLCALL *XML_SkippedEntityHandler) ( - void *userData, - const XML_Char *entityName, - int is_parameter_entity); - -/* This structure is filled in by the XML_UnknownEncodingHandler to - provide information to the parser about encodings that are unknown - to the parser. - - The map[b] member gives information about byte sequences whose - first byte is b. - - If map[b] is c where c is >= 0, then b by itself encodes the - Unicode scalar value c. - - If map[b] is -1, then the byte sequence is malformed. - - If map[b] is -n, where n >= 2, then b is the first byte of an - n-byte sequence that encodes a single Unicode scalar value. - - The data member will be passed as the first argument to the convert - function. - - The convert function is used to convert multibyte sequences; s will - point to a n-byte sequence where map[(unsigned char)*s] == -n. The - convert function must return the Unicode scalar value represented - by this byte sequence or -1 if the byte sequence is malformed. - - The convert function may be NULL if the encoding is a single-byte - encoding, that is if map[b] >= -1 for all bytes b. - - When the parser is finished with the encoding, then if release is - not NULL, it will call release passing it the data member; once - release has been called, the convert function will not be called - again. - - Expat places certain restrictions on the encodings that are supported - using this mechanism. - - 1. Every ASCII character that can appear in a well-formed XML document, - other than the characters - - $@\^`{}~ - - must be represented by a single byte, and that byte must be the - same byte that represents that character in ASCII. - - 2. No character may require more than 4 bytes to encode. - - 3. All characters encoded must have Unicode scalar values <= - 0xFFFF, (i.e., characters that would be encoded by surrogates in - UTF-16 are not allowed). Note that this restriction doesn't - apply to the built-in support for UTF-8 and UTF-16. - - 4. No Unicode character may be encoded by more than one distinct - sequence of bytes. -*/ -typedef struct { - int map[256]; - void *data; - int (XMLCALL *convert)(void *data, const char *s); - void (XMLCALL *release)(void *data); -} XML_Encoding; - -/* This is called for an encoding that is unknown to the parser. - - The encodingHandlerData argument is that which was passed as the - second argument to XML_SetUnknownEncodingHandler. - - The name argument gives the name of the encoding as specified in - the encoding declaration. - - If the callback can provide information about the encoding, it must - fill in the XML_Encoding structure, and return XML_STATUS_OK. - Otherwise it must return XML_STATUS_ERROR. - - If info does not describe a suitable encoding, then the parser will - return an XML_UNKNOWN_ENCODING error. -*/ -typedef int (XMLCALL *XML_UnknownEncodingHandler) ( - void *encodingHandlerData, - const XML_Char *name, - XML_Encoding *info); - -XMLPARSEAPI(void) -XML_SetElementHandler(XML_Parser parser, - XML_StartElementHandler start, - XML_EndElementHandler end); - -XMLPARSEAPI(void) -XML_SetStartElementHandler(XML_Parser parser, - XML_StartElementHandler handler); - -XMLPARSEAPI(void) -XML_SetEndElementHandler(XML_Parser parser, - XML_EndElementHandler handler); - -XMLPARSEAPI(void) -XML_SetCharacterDataHandler(XML_Parser parser, - XML_CharacterDataHandler handler); - -XMLPARSEAPI(void) -XML_SetProcessingInstructionHandler(XML_Parser parser, - XML_ProcessingInstructionHandler handler); -XMLPARSEAPI(void) -XML_SetCommentHandler(XML_Parser parser, - XML_CommentHandler handler); - -XMLPARSEAPI(void) -XML_SetCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start, - XML_EndCdataSectionHandler end); - -XMLPARSEAPI(void) -XML_SetStartCdataSectionHandler(XML_Parser parser, - XML_StartCdataSectionHandler start); - -XMLPARSEAPI(void) -XML_SetEndCdataSectionHandler(XML_Parser parser, - XML_EndCdataSectionHandler end); - -/* This sets the default handler and also inhibits expansion of - internal entities. These entity references will be passed to the - default handler, or to the skipped entity handler, if one is set. -*/ -XMLPARSEAPI(void) -XML_SetDefaultHandler(XML_Parser parser, - XML_DefaultHandler handler); - -/* This sets the default handler but does not inhibit expansion of - internal entities. The entity reference will not be passed to the - default handler. -*/ -XMLPARSEAPI(void) -XML_SetDefaultHandlerExpand(XML_Parser parser, - XML_DefaultHandler handler); - -XMLPARSEAPI(void) -XML_SetDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start, - XML_EndDoctypeDeclHandler end); - -XMLPARSEAPI(void) -XML_SetStartDoctypeDeclHandler(XML_Parser parser, - XML_StartDoctypeDeclHandler start); - -XMLPARSEAPI(void) -XML_SetEndDoctypeDeclHandler(XML_Parser parser, - XML_EndDoctypeDeclHandler end); - -XMLPARSEAPI(void) -XML_SetUnparsedEntityDeclHandler(XML_Parser parser, - XML_UnparsedEntityDeclHandler handler); - -XMLPARSEAPI(void) -XML_SetNotationDeclHandler(XML_Parser parser, - XML_NotationDeclHandler handler); - -XMLPARSEAPI(void) -XML_SetNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start, - XML_EndNamespaceDeclHandler end); - -XMLPARSEAPI(void) -XML_SetStartNamespaceDeclHandler(XML_Parser parser, - XML_StartNamespaceDeclHandler start); - -XMLPARSEAPI(void) -XML_SetEndNamespaceDeclHandler(XML_Parser parser, - XML_EndNamespaceDeclHandler end); - -XMLPARSEAPI(void) -XML_SetNotStandaloneHandler(XML_Parser parser, - XML_NotStandaloneHandler handler); - -XMLPARSEAPI(void) -XML_SetExternalEntityRefHandler(XML_Parser parser, - XML_ExternalEntityRefHandler handler); - -/* If a non-NULL value for arg is specified here, then it will be - passed as the first argument to the external entity ref handler - instead of the parser object. -*/ -XMLPARSEAPI(void) -XML_SetExternalEntityRefHandlerArg(XML_Parser parser, - void *arg); - -XMLPARSEAPI(void) -XML_SetSkippedEntityHandler(XML_Parser parser, - XML_SkippedEntityHandler handler); - -XMLPARSEAPI(void) -XML_SetUnknownEncodingHandler(XML_Parser parser, - XML_UnknownEncodingHandler handler, - void *encodingHandlerData); - -/* This can be called within a handler for a start element, end - element, processing instruction or character data. It causes the - corresponding markup to be passed to the default handler. -*/ -XMLPARSEAPI(void) -XML_DefaultCurrent(XML_Parser parser); - -/* If do_nst is non-zero, and namespace processing is in effect, and - a name has a prefix (i.e. an explicit namespace qualifier) then - that name is returned as a triplet in a single string separated by - the separator character specified when the parser was created: URI - + sep + local_name + sep + prefix. - - If do_nst is zero, then namespace information is returned in the - default manner (URI + sep + local_name) whether or not the name - has a prefix. - - Note: Calling XML_SetReturnNSTriplet after XML_Parse or - XML_ParseBuffer has no effect. -*/ - -XMLPARSEAPI(void) -XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); - -/* This value is passed as the userData argument to callbacks. */ -XMLPARSEAPI(void) -XML_SetUserData(XML_Parser parser, void *userData); - -/* Returns the last value set by XML_SetUserData or NULL. */ -#define XML_GetUserData(parser) (*(void **)(parser)) - -/* This is equivalent to supplying an encoding argument to - XML_ParserCreate. On success XML_SetEncoding returns non-zero, - zero otherwise. - Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer - has no effect and returns XML_STATUS_ERROR. -*/ -XMLPARSEAPI(enum XML_Status) -XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); - -/* If this function is called, then the parser will be passed as the - first argument to callbacks instead of userData. The userData will - still be accessible using XML_GetUserData. -*/ -XMLPARSEAPI(void) -XML_UseParserAsHandlerArg(XML_Parser parser); - -/* If useDTD == XML_TRUE is passed to this function, then the parser - will assume that there is an external subset, even if none is - specified in the document. In such a case the parser will call the - externalEntityRefHandler with a value of NULL for the systemId - argument (the publicId and context arguments will be NULL as well). - Note: For the purpose of checking WFC: Entity Declared, passing - useDTD == XML_TRUE will make the parser behave as if the document - had a DTD with an external subset. - Note: If this function is called, then this must be done before - the first call to XML_Parse or XML_ParseBuffer, since it will - have no effect after that. Returns - XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING. - Note: If the document does not have a DOCTYPE declaration at all, - then startDoctypeDeclHandler and endDoctypeDeclHandler will not - be called, despite an external subset being parsed. - Note: If XML_DTD is not defined when Expat is compiled, returns - XML_ERROR_FEATURE_REQUIRES_XML_DTD. - Note: If parser == NULL, returns XML_ERROR_INVALID_ARGUMENT. -*/ -XMLPARSEAPI(enum XML_Error) -XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); - - -/* Sets the base to be used for resolving relative URIs in system - identifiers in declarations. Resolving relative identifiers is - left to the application: this value will be passed through as the - base argument to the XML_ExternalEntityRefHandler, - XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base - argument will be copied. Returns XML_STATUS_ERROR if out of memory, - XML_STATUS_OK otherwise. -*/ -XMLPARSEAPI(enum XML_Status) -XML_SetBase(XML_Parser parser, const XML_Char *base); - -XMLPARSEAPI(const XML_Char *) -XML_GetBase(XML_Parser parser); - -/* Returns the number of the attribute/value pairs passed in last call - to the XML_StartElementHandler that were specified in the start-tag - rather than defaulted. Each attribute/value pair counts as 2; thus - this correspondds to an index into the atts array passed to the - XML_StartElementHandler. Returns -1 if parser == NULL. -*/ -XMLPARSEAPI(int) -XML_GetSpecifiedAttributeCount(XML_Parser parser); - -/* Returns the index of the ID attribute passed in the last call to - XML_StartElementHandler, or -1 if there is no ID attribute or - parser == NULL. Each attribute/value pair counts as 2; thus this - correspondds to an index into the atts array passed to the - XML_StartElementHandler. -*/ -XMLPARSEAPI(int) -XML_GetIdAttributeIndex(XML_Parser parser); - -#ifdef XML_ATTR_INFO -/* Source file byte offsets for the start and end of attribute names and values. - The value indices are exclusive of surrounding quotes; thus in a UTF-8 source - file an attribute value of "blah" will yield: - info->valueEnd - info->valueStart = 4 bytes. -*/ -typedef struct { - XML_Index nameStart; /* Offset to beginning of the attribute name. */ - XML_Index nameEnd; /* Offset after the attribute name's last byte. */ - XML_Index valueStart; /* Offset to beginning of the attribute value. */ - XML_Index valueEnd; /* Offset after the attribute value's last byte. */ -} XML_AttrInfo; - -/* Returns an array of XML_AttrInfo structures for the attribute/value pairs - passed in last call to the XML_StartElementHandler that were specified - in the start-tag rather than defaulted. Each attribute/value pair counts - as 1; thus the number of entries in the array is - XML_GetSpecifiedAttributeCount(parser) / 2. -*/ -XMLPARSEAPI(const XML_AttrInfo *) -XML_GetAttributeInfo(XML_Parser parser); -#endif - -/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is - detected. The last call to XML_Parse must have isFinal true; len - may be zero for this call (or any other). - - Though the return values for these functions has always been - described as a Boolean value, the implementation, at least for the - 1.95.x series, has always returned exactly one of the XML_Status - values. -*/ -XMLPARSEAPI(enum XML_Status) -XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); - -XMLPARSEAPI(void *) -XML_GetBuffer(XML_Parser parser, int len); - -XMLPARSEAPI(enum XML_Status) -XML_ParseBuffer(XML_Parser parser, int len, int isFinal); - -/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return. - Must be called from within a call-back handler, except when aborting - (resumable = 0) an already suspended parser. Some call-backs may - still follow because they would otherwise get lost. Examples: - - endElementHandler() for empty elements when stopped in - startElementHandler(), - - endNameSpaceDeclHandler() when stopped in endElementHandler(), - and possibly others. - - Can be called from most handlers, including DTD related call-backs, - except when parsing an external parameter entity and resumable != 0. - Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. - Possible error codes: - - XML_ERROR_SUSPENDED: when suspending an already suspended parser. - - XML_ERROR_FINISHED: when the parser has already finished. - - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE. - - When resumable != 0 (true) then parsing is suspended, that is, - XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. - Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer() - return XML_STATUS_ERROR with error code XML_ERROR_ABORTED. - - *Note*: - This will be applied to the current parser instance only, that is, if - there is a parent parser then it will continue parsing when the - externalEntityRefHandler() returns. It is up to the implementation of - the externalEntityRefHandler() to call XML_StopParser() on the parent - parser (recursively), if one wants to stop parsing altogether. - - When suspended, parsing can be resumed by calling XML_ResumeParser(). -*/ -XMLPARSEAPI(enum XML_Status) -XML_StopParser(XML_Parser parser, XML_Bool resumable); - -/* Resumes parsing after it has been suspended with XML_StopParser(). - Must not be called from within a handler call-back. Returns same - status codes as XML_Parse() or XML_ParseBuffer(). - Additional error code XML_ERROR_NOT_SUSPENDED possible. - - *Note*: - This must be called on the most deeply nested child parser instance - first, and on its parent parser only after the child parser has finished, - to be applied recursively until the document entity's parser is restarted. - That is, the parent parser will not resume by itself and it is up to the - application to call XML_ResumeParser() on it at the appropriate moment. -*/ -XMLPARSEAPI(enum XML_Status) -XML_ResumeParser(XML_Parser parser); - -enum XML_Parsing { - XML_INITIALIZED, - XML_PARSING, - XML_FINISHED, - XML_SUSPENDED -}; - -typedef struct { - enum XML_Parsing parsing; - XML_Bool finalBuffer; -} XML_ParsingStatus; - -/* Returns status of parser with respect to being initialized, parsing, - finished, or suspended and processing the final buffer. - XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus, - XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED -*/ -XMLPARSEAPI(void) -XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status); - -/* Creates an XML_Parser object that can parse an external general - entity; context is a '\0'-terminated string specifying the parse - context; encoding is a '\0'-terminated string giving the name of - the externally specified encoding, or NULL if there is no - externally specified encoding. The context string consists of a - sequence of tokens separated by formfeeds (\f); a token consisting - of a name specifies that the general entity of the name is open; a - token of the form prefix=uri specifies the namespace for a - particular prefix; a token of the form =uri specifies the default - namespace. This can be called at any point after the first call to - an ExternalEntityRefHandler so longer as the parser has not yet - been freed. The new parser is completely independent and may - safely be used in a separate thread. The handlers and userData are - initialized from the parser argument. Returns NULL if out of memory. - Otherwise returns a new XML_Parser object. -*/ -XMLPARSEAPI(XML_Parser) -XML_ExternalEntityParserCreate(XML_Parser parser, - const XML_Char *context, - const XML_Char *encoding); - -enum XML_ParamEntityParsing { - XML_PARAM_ENTITY_PARSING_NEVER, - XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE, - XML_PARAM_ENTITY_PARSING_ALWAYS -}; - -/* Controls parsing of parameter entities (including the external DTD - subset). If parsing of parameter entities is enabled, then - references to external parameter entities (including the external - DTD subset) will be passed to the handler set with - XML_SetExternalEntityRefHandler. The context passed will be 0. - - Unlike external general entities, external parameter entities can - only be parsed synchronously. If the external parameter entity is - to be parsed, it must be parsed during the call to the external - entity ref handler: the complete sequence of - XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and - XML_ParserFree calls must be made during this call. After - XML_ExternalEntityParserCreate has been called to create the parser - for the external parameter entity (context must be 0 for this - call), it is illegal to make any calls on the old parser until - XML_ParserFree has been called on the newly created parser. - If the library has been compiled without support for parameter - entity parsing (ie without XML_DTD being defined), then - XML_SetParamEntityParsing will return 0 if parsing of parameter - entities is requested; otherwise it will return non-zero. - Note: If XML_SetParamEntityParsing is called after XML_Parse or - XML_ParseBuffer, then it has no effect and will always return 0. - Note: If parser == NULL, the function will do nothing and return 0. -*/ -XMLPARSEAPI(int) -XML_SetParamEntityParsing(XML_Parser parser, - enum XML_ParamEntityParsing parsing); - -/* Sets the hash salt to use for internal hash calculations. - Helps in preventing DoS attacks based on predicting hash - function behavior. This must be called before parsing is started. - Returns 1 if successful, 0 when called after parsing has started. - Note: If parser == NULL, the function will do nothing and return 0. -*/ -XMLPARSEAPI(int) -XML_SetHashSalt(XML_Parser parser, - unsigned long hash_salt); - -/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then - XML_GetErrorCode returns information about the error. -*/ -XMLPARSEAPI(enum XML_Error) -XML_GetErrorCode(XML_Parser parser); - -/* These functions return information about the current parse - location. They may be called from any callback called to report - some parse event; in this case the location is the location of the - first of the sequence of characters that generated the event. When - called from callbacks generated by declarations in the document - prologue, the location identified isn't as neatly defined, but will - be within the relevant markup. When called outside of the callback - functions, the position indicated will be just past the last parse - event (regardless of whether there was an associated callback). - - They may also be called after returning from a call to XML_Parse - or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then - the location is the location of the character at which the error - was detected; otherwise the location is the location of the last - parse event, as described above. - - Note: XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber - return 0 to indicate an error. - Note: XML_GetCurrentByteIndex returns -1 to indicate an error. -*/ -XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser); -XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser); -XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser); - -/* Return the number of bytes in the current event. - Returns 0 if the event is in an internal entity. -*/ -XMLPARSEAPI(int) -XML_GetCurrentByteCount(XML_Parser parser); - -/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets - the integer pointed to by offset to the offset within this buffer - of the current parse position, and sets the integer pointed to by size - to the size of this buffer (the number of input bytes). Otherwise - returns a NULL pointer. Also returns a NULL pointer if a parse isn't - active. - - NOTE: The character pointer returned should not be used outside - the handler that makes the call. -*/ -XMLPARSEAPI(const char *) -XML_GetInputContext(XML_Parser parser, - int *offset, - int *size); - -/* For backwards compatibility with previous versions. */ -#define XML_GetErrorLineNumber XML_GetCurrentLineNumber -#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber -#define XML_GetErrorByteIndex XML_GetCurrentByteIndex - -/* Frees the content model passed to the element declaration handler */ -XMLPARSEAPI(void) -XML_FreeContentModel(XML_Parser parser, XML_Content *model); - -/* Exposing the memory handling functions used in Expat */ -XMLPARSEAPI(void *) -XML_ATTR_MALLOC -XML_ATTR_ALLOC_SIZE(2) -XML_MemMalloc(XML_Parser parser, size_t size); - -XMLPARSEAPI(void *) -XML_ATTR_ALLOC_SIZE(3) -XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); - -XMLPARSEAPI(void) -XML_MemFree(XML_Parser parser, void *ptr); - -/* Frees memory used by the parser. */ -XMLPARSEAPI(void) -XML_ParserFree(XML_Parser parser); - -/* Returns a string describing the error. */ -XMLPARSEAPI(const XML_LChar *) -XML_ErrorString(enum XML_Error code); - -/* Return a string containing the version number of this expat */ -XMLPARSEAPI(const XML_LChar *) -XML_ExpatVersion(void); - -typedef struct { - int major; - int minor; - int micro; -} XML_Expat_Version; - -/* Return an XML_Expat_Version structure containing numeric version - number information for this version of expat. -*/ -XMLPARSEAPI(XML_Expat_Version) -XML_ExpatVersionInfo(void); - -/* Added in Expat 1.95.5. */ -enum XML_FeatureEnum { - XML_FEATURE_END = 0, - XML_FEATURE_UNICODE, - XML_FEATURE_UNICODE_WCHAR_T, - XML_FEATURE_DTD, - XML_FEATURE_CONTEXT_BYTES, - XML_FEATURE_MIN_SIZE, - XML_FEATURE_SIZEOF_XML_CHAR, - XML_FEATURE_SIZEOF_XML_LCHAR, - XML_FEATURE_NS, - XML_FEATURE_LARGE_SIZE, - XML_FEATURE_ATTR_INFO - /* Additional features must be added to the end of this enum. */ -}; - -typedef struct { - enum XML_FeatureEnum feature; - const XML_LChar *name; - long int value; -} XML_Feature; - -XMLPARSEAPI(const XML_Feature *) -XML_GetFeatureList(void); - - -/* Expat follows the semantic versioning convention. - See http://semver.org. -*/ -#define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 2 -#define XML_MICRO_VERSION 5 - -#ifdef __cplusplus -} -#endif - -#endif /* not Expat_INCLUDED */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/expat_config.h b/dingux/opt/mipsel-linux-uclibc/include/expat_config.h deleted file mode 100644 index 3305431..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/expat_config.h +++ /dev/null @@ -1,123 +0,0 @@ -/* expat_config.h. Generated from expat_config.h.in by configure. */ -/* expat_config.h.in. Generated from configure.ac by autoheader. */ - -/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ -#define BYTEORDER 1234 - -/* Define to 1 if you have the `arc4random' function. */ -/* #undef HAVE_ARC4RANDOM */ - -/* Define to 1 if you have the `arc4random_buf' function. */ -/* #undef HAVE_ARC4RANDOM_BUF */ - -/* Define to 1 if you have the `bcopy' function. */ -#define HAVE_BCOPY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrandom' function. */ -#define HAVE_GETRANDOM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `bsd' library (-lbsd). */ -/* #undef HAVE_LIBBSD */ - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have `syscall' and `SYS_getrandom'. */ -/* #undef HAVE_SYSCALL_GETRANDOM */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "expat" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "expat-bugs@libexpat.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "expat" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "expat 2.2.5" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "expat" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.2.5" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "2.2.5" - -/* whether byteorder is bigendian */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to specify how much context to retain around the current parse - point. */ -#define XML_CONTEXT_BYTES 1024 - -/* Define to include code reading entropy from `/dev/urandom'. */ -#define XML_DEV_URANDOM 1 - -/* Define to make parameter entity parsing functionality available. */ -#define XML_DTD 1 - -/* Define to make XML Namespaces functionality available. */ -#define XML_NS 1 - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/expat_external.h b/dingux/opt/mipsel-linux-uclibc/include/expat_external.h deleted file mode 100644 index 629483a..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/expat_external.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 1997-2000 Thai Open Source Software Center Ltd - Copyright (c) 2000-2017 Expat development team - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#ifndef Expat_External_INCLUDED -#define Expat_External_INCLUDED 1 - -/* External API definitions */ - -#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) -# define XML_USE_MSC_EXTENSIONS 1 -#endif - -/* Expat tries very hard to make the API boundary very specifically - defined. There are two macros defined to control this boundary; - each of these can be defined before including this header to - achieve some different behavior, but doing so it not recommended or - tested frequently. - - XMLCALL - The calling convention to use for all calls across the - "library boundary." This will default to cdecl, and - try really hard to tell the compiler that's what we - want. - - XMLIMPORT - Whatever magic is needed to note that a function is - to be imported from a dynamically loaded library - (.dll, .so, or .sl, depending on your platform). - - The XMLCALL macro was added in Expat 1.95.7. The only one which is - expected to be directly useful in client code is XMLCALL. - - Note that on at least some Unix versions, the Expat library must be - compiled with the cdecl calling convention as the default since - system headers may assume the cdecl convention. -*/ -#ifndef XMLCALL -# if defined(_MSC_VER) -# define XMLCALL __cdecl -# elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) -# define XMLCALL __attribute__((cdecl)) -# else -/* For any platform which uses this definition and supports more than - one calling convention, we need to extend this definition to - declare the convention used on that platform, if it's possible to - do so. - - If this is the case for your platform, please file a bug report - with information on how to identify your platform via the C - pre-processor and how to specify the same calling convention as the - platform's malloc() implementation. -*/ -# define XMLCALL -# endif -#endif /* not defined XMLCALL */ - - -#if !defined(XML_STATIC) && !defined(XMLIMPORT) -# ifndef XML_BUILDING_EXPAT -/* using Expat from an application */ - -# ifdef XML_USE_MSC_EXTENSIONS -# define XMLIMPORT __declspec(dllimport) -# endif - -# endif -#endif /* not defined XML_STATIC */ - -#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) -# define XMLIMPORT __attribute__ ((visibility ("default"))) -#endif - -/* If we didn't define it above, define it away: */ -#ifndef XMLIMPORT -# define XMLIMPORT -#endif - -#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) -# define XML_ATTR_MALLOC __attribute__((__malloc__)) -#else -# define XML_ATTR_MALLOC -#endif - -#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) -# define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) -#else -# define XML_ATTR_ALLOC_SIZE(x) -#endif - -#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef XML_UNICODE_WCHAR_T -# ifndef XML_UNICODE -# define XML_UNICODE -# endif -# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) -# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" -# endif -#endif - -#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ -# ifdef XML_UNICODE_WCHAR_T -typedef wchar_t XML_Char; -typedef wchar_t XML_LChar; -# else -typedef unsigned short XML_Char; -typedef char XML_LChar; -# endif /* XML_UNICODE_WCHAR_T */ -#else /* Information is UTF-8 encoded. */ -typedef char XML_Char; -typedef char XML_LChar; -#endif /* XML_UNICODE */ - -#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ -# if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 -typedef __int64 XML_Index; -typedef unsigned __int64 XML_Size; -# else -typedef long long XML_Index; -typedef unsigned long long XML_Size; -# endif -#else -typedef long XML_Index; -typedef unsigned long XML_Size; -#endif /* XML_LARGE_SIZE */ - -#ifdef __cplusplus -} -#endif - -#endif /* not Expat_External_INCLUDED */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/bitops.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/bitops.h deleted file mode 100644 index bc59608..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/bitops.h +++ /dev/null @@ -1,703 +0,0 @@ -/* - * bitops.h --- Bitmap frobbing code. The byte swapping routines are - * also included here. - * - * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o. - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Library - * General Public License, version 2. - * %End-Header% - */ - -#ifdef WORDS_BIGENDIAN -#define ext2fs_cpu_to_le64(x) ((__force __le64)ext2fs_swab64((__u64)(x))) -#define ext2fs_le64_to_cpu(x) ext2fs_swab64((__force __u64)(__le64)(x)) -#define ext2fs_cpu_to_le32(x) ((__force __le32)ext2fs_swab32((__u32)(x))) -#define ext2fs_le32_to_cpu(x) ext2fs_swab32((__force __u32)(__le32)(x)) -#define ext2fs_cpu_to_le16(x) ((__force __le16)ext2fs_swab16((__u16)(x))) -#define ext2fs_le16_to_cpu(x) ext2fs_swab16((__force __u16)(__le16)(x)) - -#define ext2fs_cpu_to_be64(x) ((__force __be64)(__u64)(x)) -#define ext2fs_be64_to_cpu(x) ((__force __u64)(__be64)(x)) -#define ext2fs_cpu_to_be32(x) ((__force __be32)(__u32)(x)) -#define ext2fs_be32_to_cpu(x) ((__force __u32)(__be32)(x)) -#define ext2fs_cpu_to_be16(x) ((__force __be16)(__u16)(x)) -#define ext2fs_be16_to_cpu(x) ((__force __u16)(__be16)(x)) -#else -#define ext2fs_cpu_to_le64(x) ((__force __le64)(__u64)(x)) -#define ext2fs_le64_to_cpu(x) ((__force __u64)(__le64)(x)) -#define ext2fs_cpu_to_le32(x) ((__force __le32)(__u32)(x)) -#define ext2fs_le32_to_cpu(x) ((__force __u32)(__le32)(x)) -#define ext2fs_cpu_to_le16(x) ((__force __le16)(__u16)(x)) -#define ext2fs_le16_to_cpu(x) ((__force __u16)(__le16)(x)) - -#define ext2fs_cpu_to_be64(x) ((__force __be64)ext2fs_swab64((__u64)(x))) -#define ext2fs_be64_to_cpu(x) ext2fs_swab64((__force __u64)(__be64)(x)) -#define ext2fs_cpu_to_be32(x) ((__force __be32)ext2fs_swab32((__u32)(x))) -#define ext2fs_be32_to_cpu(x) ext2fs_swab32((__force __u32)(__be32)(x)) -#define ext2fs_cpu_to_be16(x) ((__force __be16)ext2fs_swab16((__u16)(x))) -#define ext2fs_be16_to_cpu(x) ext2fs_swab16((__force __u16)(__be16)(x)) -#endif - -/* - * EXT2FS bitmap manipulation routines. - */ - -/* Support for sending warning messages from the inline subroutines */ -extern const char *ext2fs_block_string; -extern const char *ext2fs_inode_string; -extern const char *ext2fs_mark_string; -extern const char *ext2fs_unmark_string; -extern const char *ext2fs_test_string; -extern void ext2fs_warn_bitmap(errcode_t errcode, unsigned long arg, - const char *description); -extern void ext2fs_warn_bitmap2(ext2fs_generic_bitmap bitmap, - int code, unsigned long arg); - -#ifdef NO_INLINE_FUNCS -extern void ext2fs_fast_set_bit(unsigned int nr,void * addr); -extern void ext2fs_fast_clear_bit(unsigned int nr, void * addr); -extern void ext2fs_fast_set_bit64(__u64 nr,void * addr); -extern void ext2fs_fast_clear_bit64(__u64 nr, void * addr); -extern __u16 ext2fs_swab16(__u16 val); -extern __u32 ext2fs_swab32(__u32 val); -extern __u64 ext2fs_swab64(__u64 val); - -extern int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); -extern int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block); -extern int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, blk_t block); - -extern int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); -extern int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, ext2_ino_t inode); - -extern void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block); -extern void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block); -extern int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block); - -extern void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap); -extern ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap); -extern blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap); -extern ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap); - -extern void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -extern void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -extern int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -#endif - -/* These functions routines moved to gen_bitmap.c */ -extern void ext2fs_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -extern int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap bitmap, - ino_t inode, int num); -extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, - __u32 bitno); -extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, - blk_t bitno); -extern int ext2fs_test_generic_bitmap(ext2fs_generic_bitmap bitmap, - blk_t bitno); -extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num); -extern void ext2fs_set_bitmap_padding(ext2fs_generic_bitmap map); -extern __u32 ext2fs_get_generic_bitmap_start(ext2fs_generic_bitmap bitmap); -extern __u32 ext2fs_get_generic_bitmap_end(ext2fs_generic_bitmap bitmap); - -/* 64-bit versions */ - -#ifdef NO_INLINE_FUNCS -extern int ext2fs_mark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block); -extern int ext2fs_unmark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block); -extern int ext2fs_test_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block); - -extern int ext2fs_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern int ext2fs_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern int ext2fs_test_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); - -extern void ext2fs_fast_mark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block); -extern void ext2fs_fast_unmark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block); -extern int ext2fs_fast_test_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block); - -extern void ext2fs_fast_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern void ext2fs_fast_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern int ext2fs_fast_test_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode); -extern errcode_t ext2fs_find_first_zero_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t start, - blk64_t end, - blk64_t *out); -extern errcode_t ext2fs_find_first_zero_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t start, - ext2_ino_t end, - ext2_ino_t *out); -extern errcode_t ext2fs_find_first_set_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t start, - blk64_t end, - blk64_t *out); -extern errcode_t ext2fs_find_first_set_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t start, - ext2_ino_t end, - ext2_ino_t *out); -extern blk64_t ext2fs_get_block_bitmap_start2(ext2fs_block_bitmap bitmap); -extern ext2_ino_t ext2fs_get_inode_bitmap_start2(ext2fs_inode_bitmap bitmap); -extern blk64_t ext2fs_get_block_bitmap_end2(ext2fs_block_bitmap bitmap); -extern ext2_ino_t ext2fs_get_inode_bitmap_end2(ext2fs_inode_bitmap bitmap); - -extern int ext2fs_fast_test_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, - unsigned int num); -extern void ext2fs_fast_mark_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, - unsigned int num); -extern void ext2fs_fast_unmark_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, - unsigned int num); -#endif - -/* These routines moved to gen_bitmap64.c */ -extern void ext2fs_clear_generic_bmap(ext2fs_generic_bitmap bitmap); -extern errcode_t ext2fs_compare_generic_bmap(errcode_t neq, - ext2fs_generic_bitmap bm1, - ext2fs_generic_bitmap bm2); -extern void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap bmap); -extern int ext2fs_mark_generic_bmap(ext2fs_generic_bitmap bitmap, - blk64_t bitno); -extern int ext2fs_unmark_generic_bmap(ext2fs_generic_bitmap bitmap, - blk64_t bitno); -extern int ext2fs_test_generic_bmap(ext2fs_generic_bitmap bitmap, - blk64_t bitno); -extern int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, unsigned int num); -extern __u64 ext2fs_get_generic_bmap_start(ext2fs_generic_bitmap bitmap); -extern __u64 ext2fs_get_generic_bmap_end(ext2fs_generic_bitmap bitmap); -extern int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, unsigned int num); -extern void ext2fs_mark_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, unsigned int num); -extern void ext2fs_unmark_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, unsigned int num); -extern errcode_t ext2fs_find_first_zero_generic_bmap(ext2fs_generic_bitmap bitmap, - __u64 start, __u64 end, - __u64 *out); -extern errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap, - __u64 start, __u64 end, - __u64 *out); - -/* - * The inline routines themselves... - * - * If NO_INLINE_FUNCS is defined, then we won't try to do inline - * functions at all; they will be included as normal functions in - * inline.c - */ -#ifdef NO_INLINE_FUNCS -#if (defined(__GNUC__) && (defined(__i386__) || defined(__i486__) || \ - defined(__i586__))) - /* This prevents bitops.c from trying to include the C */ - /* function version of these functions */ -#define _EXT2_HAVE_ASM_BITOPS_ -#endif -#endif /* NO_INLINE_FUNCS */ - -#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) -#ifdef INCLUDE_INLINE_FUNCS -#if (__STDC_VERSION__ >= 199901L) -#define _INLINE_ extern inline -#else -#define _INLINE_ inline -#endif -#else /* !INCLUDE_INLINE FUNCS */ -#if (__STDC_VERSION__ >= 199901L) -#define _INLINE_ inline -#else /* not C99 */ -#ifdef __GNUC__ -#define _INLINE_ extern __inline__ -#else /* For Watcom C */ -#define _INLINE_ extern inline -#endif /* __GNUC__ */ -#endif /* __STDC_VERSION__ >= 199901L */ -#endif /* INCLUDE_INLINE_FUNCS */ - -/* - * Fast bit set/clear functions that doesn't need to return the - * previous bit value. - */ - -_INLINE_ void ext2fs_fast_set_bit(unsigned int nr,void * addr) -{ - unsigned char *ADDR = (unsigned char *) addr; - - ADDR += nr >> 3; - *ADDR |= (unsigned char) (1 << (nr & 0x07)); -} - -_INLINE_ void ext2fs_fast_clear_bit(unsigned int nr, void * addr) -{ - unsigned char *ADDR = (unsigned char *) addr; - - ADDR += nr >> 3; - *ADDR &= (unsigned char) ~(1 << (nr & 0x07)); -} - - -_INLINE_ void ext2fs_fast_set_bit64(__u64 nr, void * addr) -{ - unsigned char *ADDR = (unsigned char *) addr; - - ADDR += nr >> 3; - *ADDR |= (unsigned char) (1 << (nr & 0x07)); -} - -_INLINE_ void ext2fs_fast_clear_bit64(__u64 nr, void * addr) -{ - unsigned char *ADDR = (unsigned char *) addr; - - ADDR += nr >> 3; - *ADDR &= (unsigned char) ~(1 << (nr & 0x07)); -} - - -#if ((defined __GNUC__) && !defined(_EXT2_USE_C_VERSIONS_) && \ - (defined(__i386__) || defined(__i486__) || defined(__i586__))) - -#define _EXT2_HAVE_ASM_BITOPS_ -#define _EXT2_HAVE_ASM_SWAB_ - -/* - * These are done by inline assembly for speed reasons..... - * - * All bitoperations return 0 if the bit was cleared before the - * operation and != 0 if it was not. Bit 0 is the LSB of addr; bit 32 - * is the LSB of (addr+1). - */ - -/* - * Some hacks to defeat gcc over-optimizations.. - */ -struct __dummy_h { unsigned long a[100]; }; -#define EXT2FS_ADDR (*(struct __dummy_h *) addr) -#define EXT2FS_CONST_ADDR (*(const struct __dummy_h *) addr) - -_INLINE_ int ext2fs_set_bit(unsigned int nr, void * addr) -{ - int oldbit; - - addr = (void *) (((unsigned char *) addr) + (nr >> 3)); - __asm__ __volatile__("btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"+m" (EXT2FS_ADDR) - :"r" (nr & 7)); - return oldbit; -} - -_INLINE_ int ext2fs_clear_bit(unsigned int nr, void * addr) -{ - int oldbit; - - addr = (void *) (((unsigned char *) addr) + (nr >> 3)); - __asm__ __volatile__("btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"+m" (EXT2FS_ADDR) - :"r" (nr & 7)); - return oldbit; -} - -_INLINE_ int ext2fs_test_bit(unsigned int nr, const void * addr) -{ - int oldbit; - - addr = (const void *) (((const unsigned char *) addr) + (nr >> 3)); - __asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (EXT2FS_CONST_ADDR),"r" (nr & 7)); - return oldbit; -} - -_INLINE_ __u32 ext2fs_swab32(__u32 val) -{ -#ifdef EXT2FS_REQUIRE_486 - __asm__("bswap %0" : "=r" (val) : "0" (val)); -#else - __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ - "rorl $16,%0\n\t" /* swap words */ - "xchgb %b0,%h0" /* swap higher bytes */ - :"=q" (val) - : "0" (val)); -#endif - return val; -} - -_INLINE_ __u16 ext2fs_swab16(__u16 val) -{ - __asm__("xchgb %b0,%h0" /* swap bytes */ \ - : "=q" (val) \ - : "0" (val)); \ - return val; -} - -#undef EXT2FS_ADDR - -#endif /* i386 */ - - -#if !defined(_EXT2_HAVE_ASM_SWAB_) - -_INLINE_ __u16 ext2fs_swab16(__u16 val) -{ - return (val >> 8) | (__u16) (val << 8); -} - -_INLINE_ __u32 ext2fs_swab32(__u32 val) -{ - return ((val>>24) | ((val>>8)&0xFF00) | - ((val<<8)&0xFF0000) | (val<<24)); -} - -#endif /* !_EXT2_HAVE_ASM_SWAB */ - -_INLINE_ __u64 ext2fs_swab64(__u64 val) -{ - return (ext2fs_swab32((__u32) (val >> 32)) | - (((__u64)ext2fs_swab32(val & 0xFFFFFFFFUL)) << 32)); -} - -_INLINE_ int ext2fs_mark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block) -{ - return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ int ext2fs_unmark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block) -{ - return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ int ext2fs_test_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block) -{ - return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ int ext2fs_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ int ext2fs_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ int ext2fs_test_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ void ext2fs_fast_mark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block) -{ - ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, block); -} - -_INLINE_ void ext2fs_fast_unmark_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block) -{ - ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, block); -} - -_INLINE_ int ext2fs_fast_test_block_bitmap(ext2fs_block_bitmap bitmap, - blk_t block) -{ - return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ void ext2fs_fast_mark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - ext2fs_mark_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode); -} - -_INLINE_ void ext2fs_fast_unmark_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - ext2fs_unmark_generic_bitmap((ext2fs_generic_bitmap) bitmap, inode); -} - -_INLINE_ int ext2fs_fast_test_inode_bitmap(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_test_generic_bitmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ blk_t ext2fs_get_block_bitmap_start(ext2fs_block_bitmap bitmap) -{ - return ext2fs_get_generic_bitmap_start((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_start(ext2fs_inode_bitmap bitmap) -{ - return ext2fs_get_generic_bitmap_start((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ blk_t ext2fs_get_block_bitmap_end(ext2fs_block_bitmap bitmap) -{ - return ext2fs_get_generic_bitmap_end((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_end(ext2fs_inode_bitmap bitmap) -{ - return ext2fs_get_generic_bitmap_end((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ int ext2fs_fast_test_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num) -{ - return ext2fs_test_block_bitmap_range(bitmap, block, num); -} - -_INLINE_ void ext2fs_fast_mark_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num) -{ - ext2fs_mark_block_bitmap_range(bitmap, block, num); -} - -_INLINE_ void ext2fs_fast_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, - blk_t block, int num) -{ - ext2fs_unmark_block_bitmap_range(bitmap, block, num); -} - -/* 64-bit versions */ - -_INLINE_ int ext2fs_mark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block) -{ - return ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ int ext2fs_unmark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block) -{ - return ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, block); -} - -_INLINE_ int ext2fs_test_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block) -{ - return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ int ext2fs_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ int ext2fs_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ int ext2fs_test_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ void ext2fs_fast_mark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block) -{ - ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap, block); -} - -_INLINE_ void ext2fs_fast_unmark_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block) -{ - ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, block); -} - -_INLINE_ int ext2fs_fast_test_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t block) -{ - return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap, - block); -} - -_INLINE_ void ext2fs_fast_mark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - ext2fs_mark_generic_bmap((ext2fs_generic_bitmap) bitmap, inode); -} - -_INLINE_ void ext2fs_fast_unmark_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - ext2fs_unmark_generic_bmap((ext2fs_generic_bitmap) bitmap, inode); -} - -_INLINE_ int ext2fs_fast_test_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t inode) -{ - return ext2fs_test_generic_bmap((ext2fs_generic_bitmap) bitmap, - inode); -} - -_INLINE_ errcode_t ext2fs_find_first_zero_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t start, - blk64_t end, - blk64_t *out) -{ - __u64 o; - errcode_t rv; - - rv = ext2fs_find_first_zero_generic_bmap((ext2fs_generic_bitmap) bitmap, - start, end, &o); - if (!rv) - *out = o; - return rv; -} - -_INLINE_ errcode_t ext2fs_find_first_zero_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t start, - ext2_ino_t end, - ext2_ino_t *out) -{ - __u64 o; - errcode_t rv; - - rv = ext2fs_find_first_zero_generic_bmap((ext2fs_generic_bitmap) bitmap, - start, end, &o); - if (!rv) - *out = (ext2_ino_t) o; - return rv; -} - -_INLINE_ errcode_t ext2fs_find_first_set_block_bitmap2(ext2fs_block_bitmap bitmap, - blk64_t start, - blk64_t end, - blk64_t *out) -{ - __u64 o; - errcode_t rv; - - rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap, - start, end, &o); - if (!rv) - *out = o; - return rv; -} - -_INLINE_ errcode_t ext2fs_find_first_set_inode_bitmap2(ext2fs_inode_bitmap bitmap, - ext2_ino_t start, - ext2_ino_t end, - ext2_ino_t *out) -{ - __u64 o; - errcode_t rv; - - rv = ext2fs_find_first_set_generic_bmap((ext2fs_generic_bitmap) bitmap, - start, end, &o); - if (!rv) - *out = (ext2_ino_t) o; - return rv; -} - -_INLINE_ blk64_t ext2fs_get_block_bitmap_start2(ext2fs_block_bitmap bitmap) -{ - return ext2fs_get_generic_bmap_start((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_start2(ext2fs_inode_bitmap bitmap) -{ - return (ext2_ino_t) ext2fs_get_generic_bmap_start((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ blk64_t ext2fs_get_block_bitmap_end2(ext2fs_block_bitmap bitmap) -{ - return ext2fs_get_generic_bmap_end((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ ext2_ino_t ext2fs_get_inode_bitmap_end2(ext2fs_inode_bitmap bitmap) -{ - return (ext2_ino_t) ext2fs_get_generic_bmap_end((ext2fs_generic_bitmap) bitmap); -} - -_INLINE_ int ext2fs_fast_test_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, - unsigned int num) -{ - return ext2fs_test_block_bitmap_range2(bitmap, block, num); -} - -_INLINE_ void ext2fs_fast_mark_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, - unsigned int num) -{ - ext2fs_mark_block_bitmap_range2(bitmap, block, num); -} - -_INLINE_ void ext2fs_fast_unmark_block_bitmap_range2(ext2fs_block_bitmap bitmap, - blk64_t block, - unsigned int num) -{ - ext2fs_unmark_block_bitmap_range2(bitmap, block, num); -} - -#undef _INLINE_ -#endif - -#ifndef _EXT2_HAVE_ASM_BITOPS_ -extern int ext2fs_set_bit(unsigned int nr,void * addr); -extern int ext2fs_clear_bit(unsigned int nr, void * addr); -extern int ext2fs_test_bit(unsigned int nr, const void * addr); -#endif - -extern int ext2fs_set_bit64(__u64 nr,void * addr); -extern int ext2fs_clear_bit64(__u64 nr, void * addr); -extern int ext2fs_test_bit64(__u64 nr, const void * addr); -extern unsigned int ext2fs_bitcount(const void *addr, unsigned int nbytes); diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_err.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_err.h deleted file mode 100644 index 0c79e4e..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_err.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * ext2_err.h: - * This file is automatically generated; please do not edit it. - */ - -#include - -#define EXT2_ET_BASE (2133571328L) -#define EXT2_ET_MAGIC_EXT2FS_FILSYS (2133571329L) -#define EXT2_ET_MAGIC_BADBLOCKS_LIST (2133571330L) -#define EXT2_ET_MAGIC_BADBLOCKS_ITERATE (2133571331L) -#define EXT2_ET_MAGIC_INODE_SCAN (2133571332L) -#define EXT2_ET_MAGIC_IO_CHANNEL (2133571333L) -#define EXT2_ET_MAGIC_UNIX_IO_CHANNEL (2133571334L) -#define EXT2_ET_MAGIC_IO_MANAGER (2133571335L) -#define EXT2_ET_MAGIC_BLOCK_BITMAP (2133571336L) -#define EXT2_ET_MAGIC_INODE_BITMAP (2133571337L) -#define EXT2_ET_MAGIC_GENERIC_BITMAP (2133571338L) -#define EXT2_ET_MAGIC_TEST_IO_CHANNEL (2133571339L) -#define EXT2_ET_MAGIC_DBLIST (2133571340L) -#define EXT2_ET_MAGIC_ICOUNT (2133571341L) -#define EXT2_ET_MAGIC_PQ_IO_CHANNEL (2133571342L) -#define EXT2_ET_MAGIC_EXT2_FILE (2133571343L) -#define EXT2_ET_MAGIC_E2IMAGE (2133571344L) -#define EXT2_ET_MAGIC_INODE_IO_CHANNEL (2133571345L) -#define EXT2_ET_MAGIC_EXTENT_HANDLE (2133571346L) -#define EXT2_ET_BAD_MAGIC (2133571347L) -#define EXT2_ET_REV_TOO_HIGH (2133571348L) -#define EXT2_ET_RO_FILSYS (2133571349L) -#define EXT2_ET_GDESC_READ (2133571350L) -#define EXT2_ET_GDESC_WRITE (2133571351L) -#define EXT2_ET_GDESC_BAD_BLOCK_MAP (2133571352L) -#define EXT2_ET_GDESC_BAD_INODE_MAP (2133571353L) -#define EXT2_ET_GDESC_BAD_INODE_TABLE (2133571354L) -#define EXT2_ET_INODE_BITMAP_WRITE (2133571355L) -#define EXT2_ET_INODE_BITMAP_READ (2133571356L) -#define EXT2_ET_BLOCK_BITMAP_WRITE (2133571357L) -#define EXT2_ET_BLOCK_BITMAP_READ (2133571358L) -#define EXT2_ET_INODE_TABLE_WRITE (2133571359L) -#define EXT2_ET_INODE_TABLE_READ (2133571360L) -#define EXT2_ET_NEXT_INODE_READ (2133571361L) -#define EXT2_ET_UNEXPECTED_BLOCK_SIZE (2133571362L) -#define EXT2_ET_DIR_CORRUPTED (2133571363L) -#define EXT2_ET_SHORT_READ (2133571364L) -#define EXT2_ET_SHORT_WRITE (2133571365L) -#define EXT2_ET_DIR_NO_SPACE (2133571366L) -#define EXT2_ET_NO_INODE_BITMAP (2133571367L) -#define EXT2_ET_NO_BLOCK_BITMAP (2133571368L) -#define EXT2_ET_BAD_INODE_NUM (2133571369L) -#define EXT2_ET_BAD_BLOCK_NUM (2133571370L) -#define EXT2_ET_EXPAND_DIR_ERR (2133571371L) -#define EXT2_ET_TOOSMALL (2133571372L) -#define EXT2_ET_BAD_BLOCK_MARK (2133571373L) -#define EXT2_ET_BAD_BLOCK_UNMARK (2133571374L) -#define EXT2_ET_BAD_BLOCK_TEST (2133571375L) -#define EXT2_ET_BAD_INODE_MARK (2133571376L) -#define EXT2_ET_BAD_INODE_UNMARK (2133571377L) -#define EXT2_ET_BAD_INODE_TEST (2133571378L) -#define EXT2_ET_FUDGE_BLOCK_BITMAP_END (2133571379L) -#define EXT2_ET_FUDGE_INODE_BITMAP_END (2133571380L) -#define EXT2_ET_BAD_IND_BLOCK (2133571381L) -#define EXT2_ET_BAD_DIND_BLOCK (2133571382L) -#define EXT2_ET_BAD_TIND_BLOCK (2133571383L) -#define EXT2_ET_NEQ_BLOCK_BITMAP (2133571384L) -#define EXT2_ET_NEQ_INODE_BITMAP (2133571385L) -#define EXT2_ET_BAD_DEVICE_NAME (2133571386L) -#define EXT2_ET_MISSING_INODE_TABLE (2133571387L) -#define EXT2_ET_CORRUPT_SUPERBLOCK (2133571388L) -#define EXT2_ET_BAD_GENERIC_MARK (2133571389L) -#define EXT2_ET_BAD_GENERIC_UNMARK (2133571390L) -#define EXT2_ET_BAD_GENERIC_TEST (2133571391L) -#define EXT2_ET_SYMLINK_LOOP (2133571392L) -#define EXT2_ET_CALLBACK_NOTHANDLED (2133571393L) -#define EXT2_ET_BAD_BLOCK_IN_INODE_TABLE (2133571394L) -#define EXT2_ET_UNSUPP_FEATURE (2133571395L) -#define EXT2_ET_RO_UNSUPP_FEATURE (2133571396L) -#define EXT2_ET_LLSEEK_FAILED (2133571397L) -#define EXT2_ET_NO_MEMORY (2133571398L) -#define EXT2_ET_INVALID_ARGUMENT (2133571399L) -#define EXT2_ET_BLOCK_ALLOC_FAIL (2133571400L) -#define EXT2_ET_INODE_ALLOC_FAIL (2133571401L) -#define EXT2_ET_NO_DIRECTORY (2133571402L) -#define EXT2_ET_TOO_MANY_REFS (2133571403L) -#define EXT2_ET_FILE_NOT_FOUND (2133571404L) -#define EXT2_ET_FILE_RO (2133571405L) -#define EXT2_ET_DB_NOT_FOUND (2133571406L) -#define EXT2_ET_DIR_EXISTS (2133571407L) -#define EXT2_ET_UNIMPLEMENTED (2133571408L) -#define EXT2_ET_CANCEL_REQUESTED (2133571409L) -#define EXT2_ET_FILE_TOO_BIG (2133571410L) -#define EXT2_ET_JOURNAL_NOT_BLOCK (2133571411L) -#define EXT2_ET_NO_JOURNAL_SB (2133571412L) -#define EXT2_ET_JOURNAL_TOO_SMALL (2133571413L) -#define EXT2_ET_JOURNAL_UNSUPP_VERSION (2133571414L) -#define EXT2_ET_LOAD_EXT_JOURNAL (2133571415L) -#define EXT2_ET_NO_JOURNAL (2133571416L) -#define EXT2_ET_DIRHASH_UNSUPP (2133571417L) -#define EXT2_ET_BAD_EA_BLOCK_NUM (2133571418L) -#define EXT2_ET_TOO_MANY_INODES (2133571419L) -#define EXT2_ET_NOT_IMAGE_FILE (2133571420L) -#define EXT2_ET_RES_GDT_BLOCKS (2133571421L) -#define EXT2_ET_RESIZE_INODE_CORRUPT (2133571422L) -#define EXT2_ET_SET_BMAP_NO_IND (2133571423L) -#define EXT2_ET_TDB_SUCCESS (2133571424L) -#define EXT2_ET_TDB_ERR_CORRUPT (2133571425L) -#define EXT2_ET_TDB_ERR_IO (2133571426L) -#define EXT2_ET_TDB_ERR_LOCK (2133571427L) -#define EXT2_ET_TDB_ERR_OOM (2133571428L) -#define EXT2_ET_TDB_ERR_EXISTS (2133571429L) -#define EXT2_ET_TDB_ERR_NOLOCK (2133571430L) -#define EXT2_ET_TDB_ERR_EINVAL (2133571431L) -#define EXT2_ET_TDB_ERR_NOEXIST (2133571432L) -#define EXT2_ET_TDB_ERR_RDONLY (2133571433L) -#define EXT2_ET_DBLIST_EMPTY (2133571434L) -#define EXT2_ET_RO_BLOCK_ITERATE (2133571435L) -#define EXT2_ET_MAGIC_EXTENT_PATH (2133571436L) -#define EXT2_ET_MAGIC_GENERIC_BITMAP64 (2133571437L) -#define EXT2_ET_MAGIC_BLOCK_BITMAP64 (2133571438L) -#define EXT2_ET_MAGIC_INODE_BITMAP64 (2133571439L) -#define EXT2_ET_MAGIC_RESERVED_13 (2133571440L) -#define EXT2_ET_MAGIC_RESERVED_14 (2133571441L) -#define EXT2_ET_MAGIC_RESERVED_15 (2133571442L) -#define EXT2_ET_MAGIC_RESERVED_16 (2133571443L) -#define EXT2_ET_MAGIC_RESERVED_17 (2133571444L) -#define EXT2_ET_MAGIC_RESERVED_18 (2133571445L) -#define EXT2_ET_MAGIC_RESERVED_19 (2133571446L) -#define EXT2_ET_EXTENT_HEADER_BAD (2133571447L) -#define EXT2_ET_EXTENT_INDEX_BAD (2133571448L) -#define EXT2_ET_EXTENT_LEAF_BAD (2133571449L) -#define EXT2_ET_EXTENT_NO_SPACE (2133571450L) -#define EXT2_ET_INODE_NOT_EXTENT (2133571451L) -#define EXT2_ET_EXTENT_NO_NEXT (2133571452L) -#define EXT2_ET_EXTENT_NO_PREV (2133571453L) -#define EXT2_ET_EXTENT_NO_UP (2133571454L) -#define EXT2_ET_EXTENT_NO_DOWN (2133571455L) -#define EXT2_ET_NO_CURRENT_NODE (2133571456L) -#define EXT2_ET_OP_NOT_SUPPORTED (2133571457L) -#define EXT2_ET_CANT_INSERT_EXTENT (2133571458L) -#define EXT2_ET_CANT_SPLIT_EXTENT (2133571459L) -#define EXT2_ET_EXTENT_NOT_FOUND (2133571460L) -#define EXT2_ET_EXTENT_NOT_SUPPORTED (2133571461L) -#define EXT2_ET_EXTENT_INVALID_LENGTH (2133571462L) -#define EXT2_ET_IO_CHANNEL_NO_SUPPORT_64 (2133571463L) -#define EXT2_ET_NO_MTAB_FILE (2133571464L) -#define EXT2_ET_CANT_USE_LEGACY_BITMAPS (2133571465L) -#define EXT2_ET_MMP_MAGIC_INVALID (2133571466L) -#define EXT2_ET_MMP_FAILED (2133571467L) -#define EXT2_ET_MMP_FSCK_ON (2133571468L) -#define EXT2_ET_MMP_BAD_BLOCK (2133571469L) -#define EXT2_ET_MMP_UNKNOWN_SEQ (2133571470L) -#define EXT2_ET_MMP_CHANGE_ABORT (2133571471L) -#define EXT2_ET_MMP_OPEN_DIRECT (2133571472L) -#define EXT2_ET_BAD_DESC_SIZE (2133571473L) -#define EXT2_ET_INODE_CSUM_INVALID (2133571474L) -#define EXT2_ET_INODE_BITMAP_CSUM_INVALID (2133571475L) -#define EXT2_ET_EXTENT_CSUM_INVALID (2133571476L) -#define EXT2_ET_DIR_NO_SPACE_FOR_CSUM (2133571477L) -#define EXT2_ET_DIR_CSUM_INVALID (2133571478L) -#define EXT2_ET_EXT_ATTR_CSUM_INVALID (2133571479L) -#define EXT2_ET_SB_CSUM_INVALID (2133571480L) -#define EXT2_ET_UNKNOWN_CSUM (2133571481L) -#define EXT2_ET_MMP_CSUM_INVALID (2133571482L) -#define EXT2_ET_FILE_EXISTS (2133571483L) -#define EXT2_ET_BLOCK_BITMAP_CSUM_INVALID (2133571484L) -#define EXT2_ET_INLINE_DATA_CANT_ITERATE (2133571485L) -#define EXT2_ET_EA_BAD_NAME_LEN (2133571486L) -#define EXT2_ET_EA_BAD_VALUE_SIZE (2133571487L) -#define EXT2_ET_BAD_EA_HASH (2133571488L) -#define EXT2_ET_BAD_EA_HEADER (2133571489L) -#define EXT2_ET_EA_KEY_NOT_FOUND (2133571490L) -#define EXT2_ET_EA_NO_SPACE (2133571491L) -#define EXT2_ET_MISSING_EA_FEATURE (2133571492L) -#define EXT2_ET_NO_INLINE_DATA (2133571493L) -#define EXT2_ET_INLINE_DATA_NO_BLOCK (2133571494L) -#define EXT2_ET_INLINE_DATA_NO_SPACE (2133571495L) -#define EXT2_ET_MAGIC_EA_HANDLE (2133571496L) -#define EXT2_ET_INODE_IS_GARBAGE (2133571497L) -#define EXT2_ET_EA_BAD_VALUE_OFFSET (2133571498L) -#define EXT2_ET_JOURNAL_FLAGS_WRONG (2133571499L) -#define EXT2_ET_UNDO_FILE_CORRUPT (2133571500L) -#define EXT2_ET_UNDO_FILE_WRONG (2133571501L) -#define EXT2_ET_FILESYSTEM_CORRUPTED (2133571502L) -#define EXT2_ET_BAD_CRC (2133571503L) -#define EXT2_ET_CORRUPT_JOURNAL_SB (2133571504L) -#define EXT2_ET_INODE_CORRUPTED (2133571505L) -extern const struct error_table et_ext2_error_table; -extern void initialize_ext2_error_table(void); - -/* For compatibility with Heimdal */ -extern void initialize_ext2_error_table_r(struct et_list **list); - -#define ERROR_TABLE_BASE_ext2 (2133571328L) - -/* for compatibility with older versions... */ -#define init_ext2_err_tbl initialize_ext2_error_table -#define ext2_err_base ERROR_TABLE_BASE_ext2 diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_ext_attr.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_ext_attr.h deleted file mode 100644 index bbb0aaa..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_ext_attr.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - File: linux/ext2_ext_attr.h - - On-disk format of extended attributes for the ext2 filesystem. - - (C) 2000 Andreas Gruenbacher, -*/ - -#ifndef _EXT2_EXT_ATTR_H -#define _EXT2_EXT_ATTR_H -/* Magic value in attribute blocks */ -#define EXT2_EXT_ATTR_MAGIC_v1 0xEA010000 -#define EXT2_EXT_ATTR_MAGIC 0xEA020000 - -/* Maximum number of references to one attribute block */ -#define EXT2_EXT_ATTR_REFCOUNT_MAX 1024 - -struct ext2_ext_attr_header { - __u32 h_magic; /* magic number for identification */ - __u32 h_refcount; /* reference count */ - __u32 h_blocks; /* number of disk blocks used */ - __u32 h_hash; /* hash value of all attributes */ - __u32 h_checksum; /* crc32c(uuid+id+xattrs) */ - /* id = inum if refcount = 1, else blknum */ - __u32 h_reserved[3]; /* zero right now */ -}; - -struct ext2_ext_attr_entry { - __u8 e_name_len; /* length of name */ - __u8 e_name_index; /* attribute name index */ - __u16 e_value_offs; /* offset in disk block of value */ - __u32 e_value_block; /* disk block attribute is stored on (n/i) */ - __u32 e_value_size; /* size of attribute value */ - __u32 e_hash; /* hash value of name and value */ -#if 0 - char e_name[0]; /* attribute name */ -#endif -}; - -#define EXT2_EXT_ATTR_PAD_BITS 2 -#define EXT2_EXT_ATTR_PAD ((unsigned) 1<e_name_len)) ) -#define EXT2_EXT_ATTR_SIZE(size) \ - (((size) + EXT2_EXT_ATTR_ROUND) & ~EXT2_EXT_ATTR_ROUND) -#define EXT2_EXT_IS_LAST_ENTRY(entry) (*((__u32 *)(entry)) == 0UL) -#define EXT2_EXT_ATTR_NAME(entry) \ - (((char *) (entry)) + sizeof(struct ext2_ext_attr_entry)) -#define EXT2_XATTR_LEN(name_len) \ - (((name_len) + EXT2_EXT_ATTR_ROUND + \ - sizeof(struct ext2_xattr_entry)) & ~EXT2_EXT_ATTR_ROUND) -#define EXT2_XATTR_SIZE(size) \ - (((size) + EXT2_EXT_ATTR_ROUND) & ~EXT2_EXT_ATTR_ROUND) - -#ifdef __KERNEL__ -# ifdef CONFIG_EXT2_FS_EXT_ATTR -extern int ext2_get_ext_attr(struct inode *, const char *, char *, size_t, int); -extern int ext2_set_ext_attr(struct inode *, const char *, char *, size_t, int); -extern void ext2_ext_attr_free_inode(struct inode *inode); -extern void ext2_ext_attr_put_super(struct super_block *sb); -extern int ext2_ext_attr_init(void); -extern void ext2_ext_attr_done(void); -# else -# define ext2_get_ext_attr NULL -# define ext2_set_ext_attr NULL -# endif -#endif /* __KERNEL__ */ -#endif /* _EXT2_EXT_ATTR_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_fs.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_fs.h deleted file mode 100644 index 637fab2..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_fs.h +++ /dev/null @@ -1,1104 +0,0 @@ -/* - * linux/include/linux/ext2_fs.h - * - * Copyright (C) 1992, 1993, 1994, 1995 - * Remy Card (card@masi.ibp.fr) - * Laboratoire MASI - Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) - * - * from - * - * linux/include/linux/minix_fs.h - * - * Copyright (C) 1991, 1992 Linus Torvalds - */ - -#ifndef _LINUX_EXT2_FS_H -#define _LINUX_EXT2_FS_H - -#include /* Changed from linux/types.h */ - -/* - * The second extended filesystem constants/structures - */ - -/* - * Define EXT2FS_DEBUG to produce debug messages - */ -#undef EXT2FS_DEBUG - -/* - * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files - */ -#define EXT2_PREALLOCATE -#define EXT2_DEFAULT_PREALLOC_BLOCKS 8 - -/* - * The second extended file system version - */ -#define EXT2FS_DATE "95/08/09" -#define EXT2FS_VERSION "0.5b" - -/* - * Special inode numbers - */ -#define EXT2_BAD_INO 1 /* Bad blocks inode */ -#define EXT2_ROOT_INO 2 /* Root inode */ -#define EXT4_USR_QUOTA_INO 3 /* User quota inode */ -#define EXT4_GRP_QUOTA_INO 4 /* Group quota inode */ -#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */ -#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */ -#define EXT2_RESIZE_INO 7 /* Reserved group descriptors inode */ -#define EXT2_JOURNAL_INO 8 /* Journal inode */ -#define EXT2_EXCLUDE_INO 9 /* The "exclude" inode, for snapshots */ -#define EXT4_REPLICA_INO 10 /* Used by non-upstream feature */ - -/* First non-reserved inode for old ext2 filesystems */ -#define EXT2_GOOD_OLD_FIRST_INO 11 - -/* - * The second extended file system magic number - */ -#define EXT2_SUPER_MAGIC 0xEF53 - -#ifdef __KERNEL__ -#define EXT2_SB(sb) (&((sb)->u.ext2_sb)) -#else -/* Assume that user mode programs are passing in an ext2fs superblock, not - * a kernel struct super_block. This will allow us to call the feature-test - * macros from user land. */ -#define EXT2_SB(sb) (sb) -#endif - -/* - * Maximal count of links to a file - */ -#define EXT2_LINK_MAX 65000 - -/* - * Macro-instructions used to manage several block sizes - */ -#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */ -#define EXT2_MAX_BLOCK_LOG_SIZE 16 /* 65536 */ -#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE) -#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE) -#ifdef __KERNEL__ -#define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize) -#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits) -#define EXT2_ADDR_PER_BLOCK_BITS(s) (EXT2_SB(s)->addr_per_block_bits) -#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->s_inode_size) -#define EXT2_FIRST_INO(s) (EXT2_SB(s)->s_first_ino) -#else -#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size) -#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10) -#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \ - EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size) -#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \ - EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino) -#endif -#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(__u32)) - -/* - * Macro-instructions used to manage allocation clusters - */ -#define EXT2_MIN_CLUSTER_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE -#define EXT2_MAX_CLUSTER_LOG_SIZE 29 /* 512MB */ -#define EXT2_MIN_CLUSTER_SIZE EXT2_MIN_BLOCK_SIZE -#define EXT2_MAX_CLUSTER_SIZE (1 << EXT2_MAX_CLUSTER_LOG_SIZE) -#define EXT2_CLUSTER_SIZE(s) (EXT2_MIN_BLOCK_SIZE << \ - (s)->s_log_cluster_size) -#define EXT2_CLUSTER_SIZE_BITS(s) ((s)->s_log_cluster_size + 10) - -/* - * Macro-instructions used to manage fragments - * - * Note: for backwards compatibility only, for the dump program. - * Ext2/3/4 will never support fragments.... - */ -#define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE -#define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE -#define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE -#define EXT2_FRAG_SIZE(s) EXT2_BLOCK_SIZE(s) -#define EXT2_FRAGS_PER_BLOCK(s) 1 - -/* - * ACL structures - */ -struct ext2_acl_header /* Header of Access Control Lists */ -{ - __u32 aclh_size; - __u32 aclh_file_count; - __u32 aclh_acle_count; - __u32 aclh_first_acle; -}; - -struct ext2_acl_entry /* Access Control List Entry */ -{ - __u32 acle_size; - __u16 acle_perms; /* Access permissions */ - __u16 acle_type; /* Type of entry */ - __u16 acle_tag; /* User or group identity */ - __u16 acle_pad1; - __u32 acle_next; /* Pointer on next entry for the */ - /* same inode or on next free entry */ -}; - -/* - * Structure of a blocks group descriptor - */ -struct ext2_group_desc -{ - __u32 bg_block_bitmap; /* Blocks bitmap block */ - __u32 bg_inode_bitmap; /* Inodes bitmap block */ - __u32 bg_inode_table; /* Inodes table block */ - __u16 bg_free_blocks_count; /* Free blocks count */ - __u16 bg_free_inodes_count; /* Free inodes count */ - __u16 bg_used_dirs_count; /* Directories count */ - __u16 bg_flags; - __u32 bg_exclude_bitmap_lo; /* Exclude bitmap for snapshots */ - __u16 bg_block_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */ - __u16 bg_inode_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */ - __u16 bg_itable_unused; /* Unused inodes count */ - __u16 bg_checksum; /* crc16(s_uuid+group_num+group_desc)*/ -}; - -/* - * Structure of a blocks group descriptor - */ -struct ext4_group_desc -{ - __u32 bg_block_bitmap; /* Blocks bitmap block */ - __u32 bg_inode_bitmap; /* Inodes bitmap block */ - __u32 bg_inode_table; /* Inodes table block */ - __u16 bg_free_blocks_count; /* Free blocks count */ - __u16 bg_free_inodes_count; /* Free inodes count */ - __u16 bg_used_dirs_count; /* Directories count */ - __u16 bg_flags; /* EXT4_BG_flags (INODE_UNINIT, etc) */ - __u32 bg_exclude_bitmap_lo; /* Exclude bitmap for snapshots */ - __u16 bg_block_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */ - __u16 bg_inode_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bitmap) LSB */ - __u16 bg_itable_unused; /* Unused inodes count */ - __u16 bg_checksum; /* crc16(sb_uuid+group+desc) */ - __u32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */ - __u32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */ - __u32 bg_inode_table_hi; /* Inodes table block MSB */ - __u16 bg_free_blocks_count_hi;/* Free blocks count MSB */ - __u16 bg_free_inodes_count_hi;/* Free inodes count MSB */ - __u16 bg_used_dirs_count_hi; /* Directories count MSB */ - __u16 bg_itable_unused_hi; /* Unused inodes count MSB */ - __u32 bg_exclude_bitmap_hi; /* Exclude bitmap block MSB */ - __u16 bg_block_bitmap_csum_hi;/* crc32c(s_uuid+grp_num+bitmap) MSB */ - __u16 bg_inode_bitmap_csum_hi;/* crc32c(s_uuid+grp_num+bitmap) MSB */ - __u32 bg_reserved; -}; - -#define EXT4_BG_INODE_BITMAP_CSUM_HI_END \ - (offsetof(struct ext4_group_desc, bg_inode_bitmap_csum_hi) + \ - sizeof(__u16)) -#define EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION \ - (offsetof(struct ext4_group_desc, bg_block_bitmap_csum_hi) + \ - sizeof(__u16)) - -#define EXT2_BG_INODE_UNINIT 0x0001 /* Inode table/bitmap not initialized */ -#define EXT2_BG_BLOCK_UNINIT 0x0002 /* Block bitmap not initialized */ -#define EXT2_BG_INODE_ZEROED 0x0004 /* On-disk itable initialized to zero */ - -/* - * Data structures used by the directory indexing feature - * - * Note: all of the multibyte integer fields are little endian. - */ - -/* - * Note: dx_root_info is laid out so that if it should somehow get - * overlaid by a dirent the two low bits of the hash version will be - * zero. Therefore, the hash version mod 4 should never be 0. - * Sincerely, the paranoia department. - */ -struct ext2_dx_root_info { - __u32 reserved_zero; - __u8 hash_version; /* 0 now, 1 at release */ - __u8 info_length; /* 8 */ - __u8 indirect_levels; - __u8 unused_flags; -}; - -#define EXT2_HASH_LEGACY 0 -#define EXT2_HASH_HALF_MD4 1 -#define EXT2_HASH_TEA 2 -#define EXT2_HASH_LEGACY_UNSIGNED 3 /* reserved for userspace lib */ -#define EXT2_HASH_HALF_MD4_UNSIGNED 4 /* reserved for userspace lib */ -#define EXT2_HASH_TEA_UNSIGNED 5 /* reserved for userspace lib */ - -#define EXT2_HASH_FLAG_INCOMPAT 0x1 - -struct ext2_dx_entry { - __le32 hash; - __le32 block; -}; - -struct ext2_dx_countlimit { - __le16 limit; - __le16 count; -}; - -/* - * This goes at the end of each htree block. - */ -struct ext2_dx_tail { - __le32 dt_reserved; - __le32 dt_checksum; /* crc32c(uuid+inum+dxblock) */ -}; - -/* - * Macro-instructions used to manage group descriptors - */ -#define EXT2_MIN_DESC_SIZE 32 -#define EXT2_MIN_DESC_SIZE_64BIT 64 -#define EXT2_MAX_DESC_SIZE EXT2_MIN_BLOCK_SIZE -#define EXT2_DESC_SIZE(s) \ - ((EXT2_SB(s)->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) ? \ - (s)->s_desc_size : EXT2_MIN_DESC_SIZE) - -#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group) -#define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group) -#define EXT2_CLUSTERS_PER_GROUP(s) (EXT2_SB(s)->s_clusters_per_group) -#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s)) -/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */ -#define EXT2_MAX_BLOCKS_PER_GROUP(s) ((((unsigned) 1 << 16) - 8) * \ - (EXT2_CLUSTER_SIZE(s) / \ - EXT2_BLOCK_SIZE(s))) -#define EXT2_MAX_CLUSTERS_PER_GROUP(s) (((unsigned) 1 << 16) - 8) -#define EXT2_MAX_INODES_PER_GROUP(s) (((unsigned) 1 << 16) - \ - EXT2_INODES_PER_BLOCK(s)) -#ifdef __KERNEL__ -#define EXT2_DESC_PER_BLOCK(s) (EXT2_SB(s)->s_desc_per_block) -#define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits) -#else -#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_DESC_SIZE(s)) -#endif - -#define EXT2_GROUPS_TO_BLOCKS(s, g) ((blk64_t) EXT2_BLOCKS_PER_GROUP(s) * \ - (g)) -#define EXT2_GROUPS_TO_CLUSTERS(s, g) ((blk64_t) EXT2_CLUSTERS_PER_GROUP(s) * \ - (g)) - -/* - * Constants relative to the data blocks - */ -#define EXT2_NDIR_BLOCKS 12 -#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS -#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1) -#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1) -#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1) - -/* - * Inode flags - */ -#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */ -#define EXT2_UNRM_FL 0x00000002 /* Undelete */ -#define EXT2_COMPR_FL 0x00000004 /* Compress file */ -#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */ -#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */ -#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */ -#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */ -#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */ -/* Reserved for compression usage... */ -#define EXT2_DIRTY_FL 0x00000100 -#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */ -#define EXT2_NOCOMPR_FL 0x00000400 /* Access raw compressed data */ - /* nb: was previously EXT2_ECOMPR_FL */ -#define EXT4_ENCRYPT_FL 0x00000800 /* encrypted inode */ -/* End compression flags --- maybe not all used */ -#define EXT2_BTREE_FL 0x00001000 /* btree format dir */ -#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */ -#define EXT2_IMAGIC_FL 0x00002000 -#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */ -#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ -#define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */ -#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -#define EXT4_HUGE_FILE_FL 0x00040000 /* Set to each huge file */ -#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ -#define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */ -/* EXT4_EOFBLOCKS_FL 0x00400000 was here */ -#define FS_NOCOW_FL 0x00800000 /* Do not cow file */ -#define EXT4_SNAPFILE_FL 0x01000000 /* Inode is a snapshot */ -#define EXT4_SNAPFILE_DELETED_FL 0x04000000 /* Snapshot is being deleted */ -#define EXT4_SNAPFILE_SHRUNK_FL 0x08000000 /* Snapshot shrink has completed */ -#define EXT4_INLINE_DATA_FL 0x10000000 /* Inode has inline data */ -#define EXT4_PROJINHERIT_FL 0x20000000 /* Create with parents projid */ -#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ - -#define EXT2_FL_USER_VISIBLE 0x204BDFFF /* User visible flags */ -#define EXT2_FL_USER_MODIFIABLE 0x204B80FF /* User modifiable flags */ - -/* - * ioctl commands - */ - -/* Used for online resize */ -struct ext2_new_group_input { - __u32 group; /* Group number for this data */ - __u32 block_bitmap; /* Absolute block number of block bitmap */ - __u32 inode_bitmap; /* Absolute block number of inode bitmap */ - __u32 inode_table; /* Absolute block number of inode table start */ - __u32 blocks_count; /* Total number of blocks in this group */ - __u16 reserved_blocks; /* Number of reserved blocks in this group */ - __u16 unused; /* Number of reserved GDT blocks in group */ -}; - -struct ext4_new_group_input { - __u32 group; /* Group number for this data */ - __u64 block_bitmap; /* Absolute block number of block bitmap */ - __u64 inode_bitmap; /* Absolute block number of inode bitmap */ - __u64 inode_table; /* Absolute block number of inode table start */ - __u32 blocks_count; /* Total number of blocks in this group */ - __u16 reserved_blocks; /* Number of reserved blocks in this group */ - __u16 unused; -}; - -#ifdef __GNU__ /* Needed for the Hurd */ -#define _IOT_ext2_new_group_input _IOT (_IOTS(__u32), 5, _IOTS(__u16), 2, 0, 0) -#endif - -#define EXT2_IOC_GETFLAGS _IOR('f', 1, long) -#define EXT2_IOC_SETFLAGS _IOW('f', 2, long) -#define EXT2_IOC_GETVERSION _IOR('v', 1, long) -#define EXT2_IOC_SETVERSION _IOW('v', 2, long) -#define EXT2_IOC_GETVERSION_NEW _IOR('f', 3, long) -#define EXT2_IOC_SETVERSION_NEW _IOW('f', 4, long) -#define EXT2_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long) -#define EXT2_IOC_GROUP_ADD _IOW('f', 8,struct ext2_new_group_input) -#define EXT4_IOC_GROUP_ADD _IOW('f', 8,struct ext4_new_group_input) -#define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64) - -/* - * Structure of an inode on the disk - */ -struct ext2_inode { - __u16 i_mode; /* File mode */ - __u16 i_uid; /* Low 16 bits of Owner Uid */ - __u32 i_size; /* Size in bytes */ - __u32 i_atime; /* Access time */ - __u32 i_ctime; /* Inode change time */ - __u32 i_mtime; /* Modification time */ - __u32 i_dtime; /* Deletion Time */ - __u16 i_gid; /* Low 16 bits of Group Id */ - __u16 i_links_count; /* Links count */ - __u32 i_blocks; /* Blocks count */ - __u32 i_flags; /* File flags */ - union { - struct { - __u32 l_i_version; /* was l_i_reserved1 */ - } linux1; - struct { - __u32 h_i_translator; - } hurd1; - } osd1; /* OS dependent 1 */ - __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */ - __u32 i_generation; /* File version (for NFS) */ - __u32 i_file_acl; /* File ACL */ - __u32 i_size_high; /* Formerly i_dir_acl, directory ACL */ - __u32 i_faddr; /* Fragment address */ - union { - struct { - __u16 l_i_blocks_hi; - __u16 l_i_file_acl_high; - __u16 l_i_uid_high; /* these 2 fields */ - __u16 l_i_gid_high; /* were reserved2[0] */ - __u16 l_i_checksum_lo; /* crc32c(uuid+inum+inode) */ - __u16 l_i_reserved; - } linux2; - struct { - __u8 h_i_frag; /* Fragment number */ - __u8 h_i_fsize; /* Fragment size */ - __u16 h_i_mode_high; - __u16 h_i_uid_high; - __u16 h_i_gid_high; - __u32 h_i_author; - } hurd2; - } osd2; /* OS dependent 2 */ -}; - -/* - * Permanent part of an large inode on the disk - */ -struct ext2_inode_large { - __u16 i_mode; /* File mode */ - __u16 i_uid; /* Low 16 bits of Owner Uid */ - __u32 i_size; /* Size in bytes */ - __u32 i_atime; /* Access time */ - __u32 i_ctime; /* Inode Change time */ - __u32 i_mtime; /* Modification time */ - __u32 i_dtime; /* Deletion Time */ - __u16 i_gid; /* Low 16 bits of Group Id */ - __u16 i_links_count; /* Links count */ - __u32 i_blocks; /* Blocks count */ - __u32 i_flags; /* File flags */ - union { - struct { - __u32 l_i_version; /* was l_i_reserved1 */ - } linux1; - struct { - __u32 h_i_translator; - } hurd1; - } osd1; /* OS dependent 1 */ - __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */ - __u32 i_generation; /* File version (for NFS) */ - __u32 i_file_acl; /* File ACL */ - __u32 i_size_high; /* Formerly i_dir_acl, directory ACL */ - __u32 i_faddr; /* Fragment address */ - union { - struct { - __u16 l_i_blocks_hi; - __u16 l_i_file_acl_high; - __u16 l_i_uid_high; /* these 2 fields */ - __u16 l_i_gid_high; /* were reserved2[0] */ - __u16 l_i_checksum_lo; /* crc32c(uuid+inum+inode) */ - __u16 l_i_reserved; - } linux2; - struct { - __u8 h_i_frag; /* Fragment number */ - __u8 h_i_fsize; /* Fragment size */ - __u16 h_i_mode_high; - __u16 h_i_uid_high; - __u16 h_i_gid_high; - __u32 h_i_author; - } hurd2; - } osd2; /* OS dependent 2 */ - __u16 i_extra_isize; - __u16 i_checksum_hi; /* crc32c(uuid+inum+inode) */ - __u32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */ - __u32 i_mtime_extra; /* extra Modification time (nsec << 2 | epoch) */ - __u32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */ - __u32 i_crtime; /* File creation time */ - __u32 i_crtime_extra; /* extra File creation time (nsec << 2 | epoch)*/ - __u32 i_version_hi; /* high 32 bits for 64-bit version */ - __u32 i_projid; /* Project ID */ -}; - -#define EXT4_INODE_CSUM_HI_EXTRA_END \ - (offsetof(struct ext2_inode_large, i_checksum_hi) + sizeof(__u16) - \ - EXT2_GOOD_OLD_INODE_SIZE) - -#define EXT4_EPOCH_BITS 2 -#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1) - -#define i_dir_acl i_size_high - -#define i_checksum_lo osd2.linux2.l_i_checksum_lo - -#define inode_includes(size, field) \ - (size >= (sizeof(((struct ext2_inode_large *)0)->field) + \ - offsetof(struct ext2_inode_large, field))) - -#if defined(__KERNEL__) || defined(__linux__) -#define i_reserved1 osd1.linux1.l_i_reserved1 -#define i_frag osd2.linux2.l_i_frag -#define i_fsize osd2.linux2.l_i_fsize -#define i_uid_low i_uid -#define i_gid_low i_gid -#define i_uid_high osd2.linux2.l_i_uid_high -#define i_gid_high osd2.linux2.l_i_gid_high -#else -#if defined(__GNU__) - -#define i_translator osd1.hurd1.h_i_translator -#define i_frag osd2.hurd2.h_i_frag; -#define i_fsize osd2.hurd2.h_i_fsize; -#define i_uid_high osd2.hurd2.h_i_uid_high -#define i_gid_high osd2.hurd2.h_i_gid_high -#define i_author osd2.hurd2.h_i_author - -#endif /* __GNU__ */ -#endif /* defined(__KERNEL__) || defined(__linux__) */ - -#define inode_uid(inode) ((inode).i_uid | (inode).osd2.linux2.l_i_uid_high << 16) -#define inode_gid(inode) ((inode).i_gid | (inode).osd2.linux2.l_i_gid_high << 16) -#define inode_projid(inode) ((inode).i_projid) -#define ext2fs_set_i_uid_high(inode,x) ((inode).osd2.linux2.l_i_uid_high = (x)) -#define ext2fs_set_i_gid_high(inode,x) ((inode).osd2.linux2.l_i_gid_high = (x)) - -static inline -struct ext2_inode *EXT2_INODE(struct ext2_inode_large *large_inode) -{ - return (struct ext2_inode *) large_inode; -} - -/* - * File system states - */ -#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */ -#define EXT2_ERROR_FS 0x0002 /* Errors detected */ -#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */ - -/* - * Misc. filesystem flags - */ -#define EXT2_FLAGS_SIGNED_HASH 0x0001 /* Signed dirhash in use */ -#define EXT2_FLAGS_UNSIGNED_HASH 0x0002 /* Unsigned dirhash in use */ -#define EXT2_FLAGS_TEST_FILESYS 0x0004 /* OK for use on development code */ -#define EXT2_FLAGS_IS_SNAPSHOT 0x0010 /* This is a snapshot image */ -#define EXT2_FLAGS_FIX_SNAPSHOT 0x0020 /* Snapshot inodes corrupted */ -#define EXT2_FLAGS_FIX_EXCLUDE 0x0040 /* Exclude bitmaps corrupted */ - -/* - * Mount flags - */ -#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */ -#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */ -#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */ -#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */ -#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */ -#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */ -#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */ -#define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */ - -#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt -#define set_opt(o, opt) o |= EXT2_MOUNT_##opt -#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \ - EXT2_MOUNT_##opt) -/* - * Maximal mount counts between two filesystem checks - */ -#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */ -#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */ - -/* - * Behaviour when detecting errors - */ -#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */ -#define EXT2_ERRORS_RO 2 /* Remount fs read-only */ -#define EXT2_ERRORS_PANIC 3 /* Panic */ -#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE - -#if (__GNUC__ >= 4) -#define ext4_offsetof(TYPE,MEMBER) __builtin_offsetof(TYPE,MEMBER) -#else -#define ext4_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif - -/* Metadata checksum algorithms */ -#define EXT2_CRC32C_CHKSUM 1 - -/* Encryption algorithms, key size and key reference len */ -#define EXT4_ENCRYPTION_MODE_INVALID 0 -#define EXT4_ENCRYPTION_MODE_AES_256_XTS 1 -#define EXT4_ENCRYPTION_MODE_AES_256_GCM 2 -#define EXT4_ENCRYPTION_MODE_AES_256_CBC 3 -#define EXT4_ENCRYPTION_MODE_AES_256_CTS 4 - -#define EXT4_AES_256_XTS_KEY_SIZE 64 -#define EXT4_AES_256_GCM_KEY_SIZE 32 -#define EXT4_AES_256_CBC_KEY_SIZE 32 -#define EXT4_AES_256_CTS_KEY_SIZE 32 -#define EXT4_MAX_KEY_SIZE 64 - -#define EXT4_KEY_DESCRIPTOR_SIZE 8 -#define EXT4_CRYPTO_BLOCK_SIZE 16 - -/* Password derivation constants */ -#define EXT4_MAX_PASSPHRASE_SIZE 1024 -#define EXT4_MAX_SALT_SIZE 256 -#define EXT4_PBKDF2_ITERATIONS 0xFFFF - -#define EXT2_LABEL_LEN 16 - -/* - * Policy provided via an ioctl on the topmost directory. This - * structure is also in the kernel. - */ -struct ext4_encryption_policy { - char version; - char contents_encryption_mode; - char filenames_encryption_mode; - char flags; - char master_key_descriptor[EXT4_KEY_DESCRIPTOR_SIZE]; -} __attribute__((__packed__)); - -struct ext4_encryption_key { - __u32 mode; - char raw[EXT4_MAX_KEY_SIZE]; - __u32 size; -} __attribute__((__packed__)); - -/* - * Structure of the super block - */ -struct ext2_super_block { - __u32 s_inodes_count; /* Inodes count */ - __u32 s_blocks_count; /* Blocks count */ - __u32 s_r_blocks_count; /* Reserved blocks count */ - __u32 s_free_blocks_count; /* Free blocks count */ - __u32 s_free_inodes_count; /* Free inodes count */ - __u32 s_first_data_block; /* First Data Block */ - __u32 s_log_block_size; /* Block size */ - __u32 s_log_cluster_size; /* Allocation cluster size */ - __u32 s_blocks_per_group; /* # Blocks per group */ - __u32 s_clusters_per_group; /* # Fragments per group */ - __u32 s_inodes_per_group; /* # Inodes per group */ - __u32 s_mtime; /* Mount time */ - __u32 s_wtime; /* Write time */ - __u16 s_mnt_count; /* Mount count */ - __s16 s_max_mnt_count; /* Maximal mount count */ - __u16 s_magic; /* Magic signature */ - __u16 s_state; /* File system state */ - __u16 s_errors; /* Behaviour when detecting errors */ - __u16 s_minor_rev_level; /* minor revision level */ - __u32 s_lastcheck; /* time of last check */ - __u32 s_checkinterval; /* max. time between checks */ - __u32 s_creator_os; /* OS */ - __u32 s_rev_level; /* Revision level */ - __u16 s_def_resuid; /* Default uid for reserved blocks */ - __u16 s_def_resgid; /* Default gid for reserved blocks */ - /* - * These fields are for EXT2_DYNAMIC_REV superblocks only. - * - * Note: the difference between the compatible feature set and - * the incompatible feature set is that if there is a bit set - * in the incompatible feature set that the kernel doesn't - * know about, it should refuse to mount the filesystem. - * - * e2fsck's requirements are more strict; if it doesn't know - * about a feature in either the compatible or incompatible - * feature set, it must abort and not try to meddle with - * things it doesn't understand... - */ - __u32 s_first_ino; /* First non-reserved inode */ - __u16 s_inode_size; /* size of inode structure */ - __u16 s_block_group_nr; /* block group # of this superblock */ - __u32 s_feature_compat; /* compatible feature set */ - __u32 s_feature_incompat; /* incompatible feature set */ - __u32 s_feature_ro_compat; /* readonly-compatible feature set */ - __u8 s_uuid[16]; /* 128-bit uuid for volume */ - char s_volume_name[EXT2_LABEL_LEN]; /* volume name */ - char s_last_mounted[64]; /* directory where last mounted */ - __u32 s_algorithm_usage_bitmap; /* For compression */ - /* - * Performance hints. Directory preallocation should only - * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on. - */ - __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ - __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ - __u16 s_reserved_gdt_blocks; /* Per group table for online growth */ - /* - * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set. - */ - __u8 s_journal_uuid[16]; /* uuid of journal superblock */ - __u32 s_journal_inum; /* inode number of journal file */ - __u32 s_journal_dev; /* device number of journal file */ - __u32 s_last_orphan; /* start of list of inodes to delete */ - __u32 s_hash_seed[4]; /* HTREE hash seed */ - __u8 s_def_hash_version; /* Default hash version to use */ - __u8 s_jnl_backup_type; /* Default type of journal backup */ - __u16 s_desc_size; /* Group desc. size: INCOMPAT_64BIT */ - __u32 s_default_mount_opts; - __u32 s_first_meta_bg; /* First metablock group */ - __u32 s_mkfs_time; /* When the filesystem was created */ - __u32 s_jnl_blocks[17]; /* Backup of the journal inode */ - __u32 s_blocks_count_hi; /* Blocks count high 32bits */ - __u32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/ - __u32 s_free_blocks_hi; /* Free blocks count */ - __u16 s_min_extra_isize; /* All inodes have at least # bytes */ - __u16 s_want_extra_isize; /* New inodes should reserve # bytes */ - __u32 s_flags; /* Miscellaneous flags */ - __u16 s_raid_stride; /* RAID stride */ - __u16 s_mmp_update_interval; /* # seconds to wait in MMP checking */ - __u64 s_mmp_block; /* Block for multi-mount protection */ - __u32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/ - __u8 s_log_groups_per_flex; /* FLEX_BG group size */ - __u8 s_checksum_type; /* metadata checksum algorithm */ - __u8 s_encryption_level; /* versioning level for encryption */ - __u8 s_reserved_pad; /* Padding to next 32bits */ - __u64 s_kbytes_written; /* nr of lifetime kilobytes written */ - __u32 s_snapshot_inum; /* Inode number of active snapshot */ - __u32 s_snapshot_id; /* sequential ID of active snapshot */ - __u64 s_snapshot_r_blocks_count; /* reserved blocks for active - snapshot's future use */ - __u32 s_snapshot_list; /* inode number of the head of the on-disk snapshot list */ -#define EXT4_S_ERR_START ext4_offsetof(struct ext2_super_block, s_error_count) - __u32 s_error_count; /* number of fs errors */ - __u32 s_first_error_time; /* first time an error happened */ - __u32 s_first_error_ino; /* inode involved in first error */ - __u64 s_first_error_block; /* block involved of first error */ - __u8 s_first_error_func[32]; /* function where the error happened */ - __u32 s_first_error_line; /* line number where error happened */ - __u32 s_last_error_time; /* most recent time of an error */ - __u32 s_last_error_ino; /* inode involved in last error */ - __u32 s_last_error_line; /* line number where error happened */ - __u64 s_last_error_block; /* block involved of last error */ - __u8 s_last_error_func[32]; /* function where the error happened */ -#define EXT4_S_ERR_END ext4_offsetof(struct ext2_super_block, s_mount_opts) - __u8 s_mount_opts[64]; - __u32 s_usr_quota_inum; /* inode number of user quota file */ - __u32 s_grp_quota_inum; /* inode number of group quota file */ - __u32 s_overhead_blocks; /* overhead blocks/clusters in fs */ - __u32 s_backup_bgs[2]; /* If sparse_super2 enabled */ - __u8 s_encrypt_algos[4]; /* Encryption algorithms in use */ - __u8 s_encrypt_pw_salt[16]; /* Salt used for string2key algorithm */ - __le32 s_lpf_ino; /* Location of the lost+found inode */ - __le32 s_prj_quota_inum; /* inode for tracking project quota */ - __le32 s_checksum_seed; /* crc32c(orig_uuid) if csum_seed set */ - __le32 s_reserved[98]; /* Padding to the end of the block */ - __u32 s_checksum; /* crc32c(superblock) */ -}; - -#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START) - -/* - * Codes for operating systems - */ -#define EXT2_OS_LINUX 0 -#define EXT2_OS_HURD 1 -#define EXT2_OBSO_OS_MASIX 2 -#define EXT2_OS_FREEBSD 3 -#define EXT2_OS_LITES 4 - -/* - * Revision levels - */ -#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */ -#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */ - -#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV -#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV - -#define EXT2_GOOD_OLD_INODE_SIZE 128 - -/* - * Journal inode backup types - */ -#define EXT3_JNL_BACKUP_BLOCKS 1 - -/* - * Feature set definitions - */ - -#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \ - ( EXT2_SB(sb)->s_feature_compat & (mask) ) -#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \ - ( EXT2_SB(sb)->s_feature_ro_compat & (mask) ) -#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \ - ( EXT2_SB(sb)->s_feature_incompat & (mask) ) - -#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001 -#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002 -#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004 -#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008 -#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010 -#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020 -#define EXT2_FEATURE_COMPAT_LAZY_BG 0x0040 -/* #define EXT2_FEATURE_COMPAT_EXCLUDE_INODE 0x0080 not used, legacy */ -#define EXT2_FEATURE_COMPAT_EXCLUDE_BITMAP 0x0100 -#define EXT4_FEATURE_COMPAT_SPARSE_SUPER2 0x0200 - - -#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001 -#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 -/* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 not used */ -#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008 -#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 -#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020 -#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 -#define EXT4_FEATURE_RO_COMPAT_HAS_SNAPSHOT 0x0080 -#define EXT4_FEATURE_RO_COMPAT_QUOTA 0x0100 -#define EXT4_FEATURE_RO_COMPAT_BIGALLOC 0x0200 -/* - * METADATA_CSUM implies GDT_CSUM. When METADATA_CSUM is set, group - * descriptor checksums use the same algorithm as all other data - * structures' checksums. - */ -#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 -#define EXT4_FEATURE_RO_COMPAT_REPLICA 0x0800 -#define EXT4_FEATURE_RO_COMPAT_READONLY 0x1000 -#define EXT4_FEATURE_RO_COMPAT_PROJECT 0x2000 /* Project quota */ - - -#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001 -#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002 -#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */ -#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ -#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010 -#define EXT3_FEATURE_INCOMPAT_EXTENTS 0x0040 -#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 -#define EXT4_FEATURE_INCOMPAT_MMP 0x0100 -#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200 -#define EXT4_FEATURE_INCOMPAT_EA_INODE 0x0400 -#define EXT4_FEATURE_INCOMPAT_DIRDATA 0x1000 -#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000 -#define EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000 /* >2GB or 3-lvl htree */ -#define EXT4_FEATURE_INCOMPAT_INLINE_DATA 0x8000 /* data in inode */ -#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000 - -#define EXT4_FEATURE_COMPAT_FUNCS(name, ver, flagname) \ -static inline int ext2fs_has_feature_##name(struct ext2_super_block *sb) \ -{ \ - return ((EXT2_SB(sb)->s_feature_compat & \ - EXT##ver##_FEATURE_COMPAT_##flagname) != 0); \ -} \ -static inline void ext2fs_set_feature_##name(struct ext2_super_block *sb) \ -{ \ - EXT2_SB(sb)->s_feature_compat |= \ - EXT##ver##_FEATURE_COMPAT_##flagname; \ -} \ -static inline void ext2fs_clear_feature_##name(struct ext2_super_block *sb) \ -{ \ - EXT2_SB(sb)->s_feature_compat &= \ - ~EXT##ver##_FEATURE_COMPAT_##flagname; \ -} - -#define EXT4_FEATURE_RO_COMPAT_FUNCS(name, ver, flagname) \ -static inline int ext2fs_has_feature_##name(struct ext2_super_block *sb) \ -{ \ - return ((EXT2_SB(sb)->s_feature_ro_compat & \ - EXT##ver##_FEATURE_RO_COMPAT_##flagname) != 0); \ -} \ -static inline void ext2fs_set_feature_##name(struct ext2_super_block *sb) \ -{ \ - EXT2_SB(sb)->s_feature_ro_compat |= \ - EXT##ver##_FEATURE_RO_COMPAT_##flagname; \ -} \ -static inline void ext2fs_clear_feature_##name(struct ext2_super_block *sb) \ -{ \ - EXT2_SB(sb)->s_feature_ro_compat &= \ - ~EXT##ver##_FEATURE_RO_COMPAT_##flagname; \ -} - -#define EXT4_FEATURE_INCOMPAT_FUNCS(name, ver, flagname) \ -static inline int ext2fs_has_feature_##name(struct ext2_super_block *sb) \ -{ \ - return ((EXT2_SB(sb)->s_feature_incompat & \ - EXT##ver##_FEATURE_INCOMPAT_##flagname) != 0); \ -} \ -static inline void ext2fs_set_feature_##name(struct ext2_super_block *sb) \ -{ \ - EXT2_SB(sb)->s_feature_incompat |= \ - EXT##ver##_FEATURE_INCOMPAT_##flagname; \ -} \ -static inline void ext2fs_clear_feature_##name(struct ext2_super_block *sb) \ -{ \ - EXT2_SB(sb)->s_feature_incompat &= \ - ~EXT##ver##_FEATURE_INCOMPAT_##flagname; \ -} - -EXT4_FEATURE_COMPAT_FUNCS(dir_prealloc, 2, DIR_PREALLOC) -EXT4_FEATURE_COMPAT_FUNCS(imagic_inodes, 2, IMAGIC_INODES) -EXT4_FEATURE_COMPAT_FUNCS(journal, 3, HAS_JOURNAL) -EXT4_FEATURE_COMPAT_FUNCS(xattr, 2, EXT_ATTR) -EXT4_FEATURE_COMPAT_FUNCS(resize_inode, 2, RESIZE_INODE) -EXT4_FEATURE_COMPAT_FUNCS(dir_index, 2, DIR_INDEX) -EXT4_FEATURE_COMPAT_FUNCS(lazy_bg, 2, LAZY_BG) -EXT4_FEATURE_COMPAT_FUNCS(exclude_bitmap, 2, EXCLUDE_BITMAP) -EXT4_FEATURE_COMPAT_FUNCS(sparse_super2, 4, SPARSE_SUPER2) - -EXT4_FEATURE_RO_COMPAT_FUNCS(sparse_super, 2, SPARSE_SUPER) -EXT4_FEATURE_RO_COMPAT_FUNCS(large_file, 2, LARGE_FILE) -EXT4_FEATURE_RO_COMPAT_FUNCS(huge_file, 4, HUGE_FILE) -EXT4_FEATURE_RO_COMPAT_FUNCS(gdt_csum, 4, GDT_CSUM) -EXT4_FEATURE_RO_COMPAT_FUNCS(dir_nlink, 4, DIR_NLINK) -EXT4_FEATURE_RO_COMPAT_FUNCS(extra_isize, 4, EXTRA_ISIZE) -EXT4_FEATURE_RO_COMPAT_FUNCS(has_snapshot, 4, HAS_SNAPSHOT) -EXT4_FEATURE_RO_COMPAT_FUNCS(quota, 4, QUOTA) -EXT4_FEATURE_RO_COMPAT_FUNCS(bigalloc, 4, BIGALLOC) -EXT4_FEATURE_RO_COMPAT_FUNCS(metadata_csum, 4, METADATA_CSUM) -EXT4_FEATURE_RO_COMPAT_FUNCS(replica, 4, REPLICA) -EXT4_FEATURE_RO_COMPAT_FUNCS(readonly, 4, READONLY) -EXT4_FEATURE_RO_COMPAT_FUNCS(project, 4, PROJECT) - -EXT4_FEATURE_INCOMPAT_FUNCS(compression, 2, COMPRESSION) -EXT4_FEATURE_INCOMPAT_FUNCS(filetype, 2, FILETYPE) -EXT4_FEATURE_INCOMPAT_FUNCS(journal_needs_recovery, 3, RECOVER) -EXT4_FEATURE_INCOMPAT_FUNCS(journal_dev, 3, JOURNAL_DEV) -EXT4_FEATURE_INCOMPAT_FUNCS(meta_bg, 2, META_BG) -EXT4_FEATURE_INCOMPAT_FUNCS(extents, 3, EXTENTS) -EXT4_FEATURE_INCOMPAT_FUNCS(64bit, 4, 64BIT) -EXT4_FEATURE_INCOMPAT_FUNCS(mmp, 4, MMP) -EXT4_FEATURE_INCOMPAT_FUNCS(flex_bg, 4, FLEX_BG) -EXT4_FEATURE_INCOMPAT_FUNCS(ea_inode, 4, EA_INODE) -EXT4_FEATURE_INCOMPAT_FUNCS(dirdata, 4, DIRDATA) -EXT4_FEATURE_INCOMPAT_FUNCS(csum_seed, 4, CSUM_SEED) -EXT4_FEATURE_INCOMPAT_FUNCS(largedir, 4, LARGEDIR) -EXT4_FEATURE_INCOMPAT_FUNCS(inline_data, 4, INLINE_DATA) -EXT4_FEATURE_INCOMPAT_FUNCS(encrypt, 4, ENCRYPT) - -#define EXT2_FEATURE_COMPAT_SUPP 0 -#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \ - EXT4_FEATURE_INCOMPAT_MMP) -#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \ - EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \ - EXT2_FEATURE_RO_COMPAT_BTREE_DIR) - -/* - * Default values for user and/or group using reserved blocks - */ -#define EXT2_DEF_RESUID 0 -#define EXT2_DEF_RESGID 0 - -/* - * Default mount options - */ -#define EXT2_DEFM_DEBUG 0x0001 -#define EXT2_DEFM_BSDGROUPS 0x0002 -#define EXT2_DEFM_XATTR_USER 0x0004 -#define EXT2_DEFM_ACL 0x0008 -#define EXT2_DEFM_UID16 0x0010 -#define EXT3_DEFM_JMODE 0x0060 -#define EXT3_DEFM_JMODE_DATA 0x0020 -#define EXT3_DEFM_JMODE_ORDERED 0x0040 -#define EXT3_DEFM_JMODE_WBACK 0x0060 -#define EXT4_DEFM_NOBARRIER 0x0100 -#define EXT4_DEFM_BLOCK_VALIDITY 0x0200 -#define EXT4_DEFM_DISCARD 0x0400 -#define EXT4_DEFM_NODELALLOC 0x0800 - -/* - * Structure of a directory entry - */ -#define EXT2_NAME_LEN 255 - -struct ext2_dir_entry { - __u32 inode; /* Inode number */ - __u16 rec_len; /* Directory entry length */ - __u16 name_len; /* Name length */ - char name[EXT2_NAME_LEN]; /* File name */ -}; - -/* - * The new version of the directory entry. Since EXT2 structures are - * stored in intel byte order, and the name_len field could never be - * bigger than 255 chars, it's safe to reclaim the extra byte for the - * file_type field. - * - * This structure is deprecated due to endian issues. Please use struct - * ext2_dir_entry and accessor functions - * ext2fs_dirent_name_len - * ext2fs_dirent_set_name_len - * ext2fs_dirent_file_type - * ext2fs_dirent_set_file_type - * to get and set name_len and file_type fields. - */ -struct ext2_dir_entry_2 { - __u32 inode; /* Inode number */ - __u16 rec_len; /* Directory entry length */ - __u8 name_len; /* Name length */ - __u8 file_type; - char name[EXT2_NAME_LEN]; /* File name */ -}; - -/* - * This is a bogus directory entry at the end of each leaf block that - * records checksums. - */ -struct ext2_dir_entry_tail { - __u32 det_reserved_zero1; /* Pretend to be unused */ - __u16 det_rec_len; /* 12 */ - __u16 det_reserved_name_len; /* 0xDE00, fake namelen/filetype */ - __u32 det_checksum; /* crc32c(uuid+inode+dirent) */ -}; - -/* - * Ext2 directory file types. Only the low 3 bits are used. The - * other bits are reserved for now. - */ -#define EXT2_FT_UNKNOWN 0 -#define EXT2_FT_REG_FILE 1 -#define EXT2_FT_DIR 2 -#define EXT2_FT_CHRDEV 3 -#define EXT2_FT_BLKDEV 4 -#define EXT2_FT_FIFO 5 -#define EXT2_FT_SOCK 6 -#define EXT2_FT_SYMLINK 7 - -#define EXT2_FT_MAX 8 - -/* - * Annoyingly, e2fsprogs always swab16s ext2_dir_entry.name_len, so we - * have to build ext2_dir_entry_tail with that assumption too. This - * constant helps to build the dir_entry_tail to look like it has an - * "invalid" file type. - */ -#define EXT2_DIR_NAME_LEN_CSUM 0xDE00 - -/* - * EXT2_DIR_PAD defines the directory entries boundaries - * - * NOTE: It must be a multiple of 4 - */ -#define EXT2_DIR_ENTRY_HEADER_LEN 8 -#define EXT2_DIR_PAD 4 -#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) -#define EXT2_DIR_REC_LEN(name_len) (((name_len) + \ - EXT2_DIR_ENTRY_HEADER_LEN + \ - EXT2_DIR_ROUND) & \ - ~EXT2_DIR_ROUND) - -/* - * Constants for ext4's extended time encoding - */ -#define EXT4_EPOCH_BITS 2 -#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1) -#define EXT4_NSEC_MASK (~0UL << EXT4_EPOCH_BITS) - -/* - * This structure is used for multiple mount protection. It is written - * into the block number saved in the s_mmp_block field in the superblock. - * Programs that check MMP should assume that if SEQ_FSCK (or any unknown - * code above SEQ_MAX) is present then it is NOT safe to use the filesystem, - * regardless of how old the timestamp is. - * - * The timestamp in the MMP structure will be updated by e2fsck at some - * arbitrary intervals (start of passes, after every few groups of inodes - * in pass1 and pass1b). There is no guarantee that e2fsck is updating - * the MMP block in a timely manner, and the updates it does are purely - * for the convenience of the sysadmin and not for automatic validation. - * - * Note: Only the mmp_seq value is used to determine whether the MMP block - * is being updated. The mmp_time, mmp_nodename, and mmp_bdevname - * fields are only for informational purposes for the administrator, - * due to clock skew between nodes and hostname HA service takeover. - */ -#define EXT4_MMP_MAGIC 0x004D4D50U /* ASCII for MMP */ -#define EXT4_MMP_SEQ_CLEAN 0xFF4D4D50U /* mmp_seq value for clean unmount */ -#define EXT4_MMP_SEQ_FSCK 0xE24D4D50U /* mmp_seq value when being fscked */ -#define EXT4_MMP_SEQ_MAX 0xE24D4D4FU /* maximum valid mmp_seq value */ - -/* Not endian-annotated; it's swapped at read/write time */ -struct mmp_struct { - __u32 mmp_magic; /* Magic number for MMP */ - __u32 mmp_seq; /* Sequence no. updated periodically */ - __u64 mmp_time; /* Time last updated */ - char mmp_nodename[64]; /* Node which last updated MMP block */ - char mmp_bdevname[32]; /* Bdev which last updated MMP block */ - __u16 mmp_check_interval; /* Changed mmp_check_interval */ - __u16 mmp_pad1; - __u32 mmp_pad2[226]; - __u32 mmp_checksum; /* crc32c(uuid+mmp_block) */ -}; - -/* - * Default interval for MMP update in seconds. - */ -#define EXT4_MMP_UPDATE_INTERVAL 5 - -/* - * Maximum interval for MMP update in seconds. - */ -#define EXT4_MMP_MAX_UPDATE_INTERVAL 300 - -/* - * Minimum interval for MMP checking in seconds. - */ -#define EXT4_MMP_MIN_CHECK_INTERVAL 5 - -/* - * Minimum size of inline data. - */ -#define EXT4_MIN_INLINE_DATA_SIZE ((sizeof(__u32) * EXT2_N_BLOCKS)) - -/* - * Size of a parent inode in inline data directory. - */ -#define EXT4_INLINE_DATA_DOTDOT_SIZE (4) - -#endif /* _LINUX_EXT2_FS_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_io.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_io.h deleted file mode 100644 index 6b7e977..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_io.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * io.h --- the I/O manager abstraction - * - * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o. - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Library - * General Public License, version 2. - * %End-Header% - */ - -#ifndef _EXT2FS_EXT2_IO_H -#define _EXT2FS_EXT2_IO_H - -/* - * ext2_loff_t is defined here since unix_io.c needs it. - */ -#if defined(__GNUC__) || defined(HAS_LONG_LONG) -typedef long long ext2_loff_t; -#else -typedef long ext2_loff_t; -#endif - -/* llseek.c */ -ext2_loff_t ext2fs_llseek (int, ext2_loff_t, int); - -typedef struct struct_io_manager *io_manager; -typedef struct struct_io_channel *io_channel; -typedef struct struct_io_stats *io_stats; - -#define CHANNEL_FLAGS_WRITETHROUGH 0x01 -#define CHANNEL_FLAGS_DISCARD_ZEROES 0x02 -#define CHANNEL_FLAGS_BLOCK_DEVICE 0x04 - -#define io_channel_discard_zeroes_data(i) (i->flags & CHANNEL_FLAGS_DISCARD_ZEROES) - -struct struct_io_channel { - errcode_t magic; - io_manager manager; - char *name; - int block_size; - errcode_t (*read_error)(io_channel channel, - unsigned long block, - int count, - void *data, - size_t size, - int actual_bytes_read, - errcode_t error); - errcode_t (*write_error)(io_channel channel, - unsigned long block, - int count, - const void *data, - size_t size, - int actual_bytes_written, - errcode_t error); - int refcount; - int flags; - long reserved[14]; - void *private_data; - void *app_data; - int align; -}; - -struct struct_io_stats { - int num_fields; - int reserved; - unsigned long long bytes_read; - unsigned long long bytes_written; -}; - -struct struct_io_manager { - errcode_t magic; - const char *name; - errcode_t (*open)(const char *name, int flags, io_channel *channel); - errcode_t (*close)(io_channel channel); - errcode_t (*set_blksize)(io_channel channel, int blksize); - errcode_t (*read_blk)(io_channel channel, unsigned long block, - int count, void *data); - errcode_t (*write_blk)(io_channel channel, unsigned long block, - int count, const void *data); - errcode_t (*flush)(io_channel channel); - errcode_t (*write_byte)(io_channel channel, unsigned long offset, - int count, const void *data); - errcode_t (*set_option)(io_channel channel, const char *option, - const char *arg); - errcode_t (*get_stats)(io_channel channel, io_stats *io_stats); - errcode_t (*read_blk64)(io_channel channel, unsigned long long block, - int count, void *data); - errcode_t (*write_blk64)(io_channel channel, unsigned long long block, - int count, const void *data); - errcode_t (*discard)(io_channel channel, unsigned long long block, - unsigned long long count); - errcode_t (*cache_readahead)(io_channel channel, - unsigned long long block, - unsigned long long count); - errcode_t (*zeroout)(io_channel channel, unsigned long long block, - unsigned long long count); - long reserved[14]; -}; - -#define IO_FLAG_RW 0x0001 -#define IO_FLAG_EXCLUSIVE 0x0002 -#define IO_FLAG_DIRECT_IO 0x0004 -#define IO_FLAG_FORCE_BOUNCE 0x0008 - -/* - * Convenience functions.... - */ -#define io_channel_close(c) ((c)->manager->close((c))) -#define io_channel_set_blksize(c,s) ((c)->manager->set_blksize((c),s)) -#define io_channel_read_blk(c,b,n,d) ((c)->manager->read_blk((c),b,n,d)) -#define io_channel_write_blk(c,b,n,d) ((c)->manager->write_blk((c),b,n,d)) -#define io_channel_flush(c) ((c)->manager->flush((c))) -#define io_channel_bumpcount(c) ((c)->refcount++) - -/* io_manager.c */ -extern errcode_t io_channel_set_options(io_channel channel, - const char *options); -extern errcode_t io_channel_write_byte(io_channel channel, - unsigned long offset, - int count, const void *data); -extern errcode_t io_channel_read_blk64(io_channel channel, - unsigned long long block, - int count, void *data); -extern errcode_t io_channel_write_blk64(io_channel channel, - unsigned long long block, - int count, const void *data); -extern errcode_t io_channel_discard(io_channel channel, - unsigned long long block, - unsigned long long count); -extern errcode_t io_channel_zeroout(io_channel channel, - unsigned long long block, - unsigned long long count); -extern errcode_t io_channel_alloc_buf(io_channel channel, - int count, void *ptr); -extern errcode_t io_channel_cache_readahead(io_channel io, - unsigned long long block, - unsigned long long count); - -/* unix_io.c */ -extern io_manager unix_io_manager; -extern io_manager unixfd_io_manager; - -/* undo_io.c */ -extern io_manager undo_io_manager; -extern errcode_t set_undo_io_backing_manager(io_manager manager); -extern errcode_t set_undo_io_backup_file(char *file_name); - -/* test_io.c */ -extern io_manager test_io_manager, test_io_backing_manager; -extern void (*test_io_cb_read_blk) - (unsigned long block, int count, errcode_t err); -extern void (*test_io_cb_write_blk) - (unsigned long block, int count, errcode_t err); -extern void (*test_io_cb_read_blk64) - (unsigned long long block, int count, errcode_t err); -extern void (*test_io_cb_write_blk64) - (unsigned long long block, int count, errcode_t err); -extern void (*test_io_cb_set_blksize) - (int blksize, errcode_t err); - -#endif /* _EXT2FS_EXT2_IO_H */ - diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_types.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_types.h deleted file mode 100644 index 0638256..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2_types.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * If linux/types.h is already been included, assume it has defined - * everything we need. (cross fingers) Other header files may have - * also defined the types that we need. - */ -#if (!defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \ - !defined(_EXT2_TYPES_H)) -#define _EXT2_TYPES_H - -#define __S8_TYPEDEF __signed__ char -#define __U8_TYPEDEF unsigned char -#define __S16_TYPEDEF __signed__ short -#define __U16_TYPEDEF unsigned short -#define __S32_TYPEDEF __signed__ int -#define __U32_TYPEDEF unsigned int -#define __S64_TYPEDEF __signed__ long long -#define __U64_TYPEDEF unsigned long long - -#ifndef HAVE___U8 -#define HAVE___U8 -#ifdef __U8_TYPEDEF -typedef __U8_TYPEDEF __u8; -#else -typedef unsigned char __u8; -#endif -#endif /* HAVE___U8 */ - -#ifndef HAVE___S8 -#define HAVE___S8 -#ifdef __S8_TYPEDEF -typedef __S8_TYPEDEF __s8; -#else -typedef signed char __s8; -#endif -#endif /* HAVE___S8 */ - -#ifndef HAVE___U16 -#define HAVE___U16 -#ifdef __U16_TYPEDEF -typedef __U16_TYPEDEF __u16; -#else -#if (4 == 2) -typedef unsigned int __u16; -#else -#if (2 == 2) -typedef unsigned short __u16; -#else -#undef HAVE___U16 - ?==error: undefined 16 bit type -#endif /* SIZEOF_SHORT == 2 */ -#endif /* SIZEOF_INT == 2 */ -#endif /* __U16_TYPEDEF */ -#endif /* HAVE___U16 */ - -#ifndef HAVE___S16 -#define HAVE___S16 -#ifdef __S16_TYPEDEF -typedef __S16_TYPEDEF __s16; -#else -#if (4 == 2) -typedef int __s16; -#else -#if (2 == 2) -typedef short __s16; -#else -#undef HAVE___S16 - ?==error: undefined 16 bit type -#endif /* SIZEOF_SHORT == 2 */ -#endif /* SIZEOF_INT == 2 */ -#endif /* __S16_TYPEDEF */ -#endif /* HAVE___S16 */ - -#ifndef HAVE___U32 -#define HAVE___U32 -#ifdef __U32_TYPEDEF -typedef __U32_TYPEDEF __u32; -#else -#if (4 == 4) -typedef unsigned int __u32; -#else -#if (8 == 4) -typedef unsigned long __u32; -#else -#if (2 == 4) -typedef unsigned short __u32; -#else -#undef HAVE___U32 - ?== error: undefined 32 bit type -#endif /* SIZEOF_SHORT == 4 */ -#endif /* SIZEOF_LONG == 4 */ -#endif /* SIZEOF_INT == 4 */ -#endif /* __U32_TYPEDEF */ -#endif /* HAVE___U32 */ - -#ifndef HAVE___S32 -#define HAVE___S32 -#ifdef __S32_TYPEDEF -typedef __S32_TYPEDEF __s32; -#else -#if (4 == 4) -typedef int __s32; -#else -#if (8 == 4) -typedef long __s32; -#else -#if (2 == 4) -typedef short __s32; -#else -#undef HAVE___S32 - ?== error: undefined 32 bit type -#endif /* SIZEOF_SHORT == 4 */ -#endif /* SIZEOF_LONG == 4 */ -#endif /* SIZEOF_INT == 4 */ -#endif /* __S32_TYPEDEF */ -#endif /* HAVE___S32 */ - -#ifndef HAVE___U64 -#define HAVE___U64 -#ifdef __U64_TYPEDEF -typedef __U64_TYPEDEF __u64; -#else -#if (4 == 8) -typedef unsigned int __u64; -#else -#if (8 == 8) -typedef unsigned long long __u64; -#else -#if (8 == 8) -typedef unsigned long __u64; -#else -#undef HAVE___U64 - ?== error: undefined 64 bit type -#endif /* SIZEOF_LONG_LONG == 8 */ -#endif /* SIZEOF_LONG == 8 */ -#endif /* SIZEOF_INT == 8 */ -#endif /* __U64_TYPEDEF */ -#endif /* HAVE___U64 */ - -#ifndef HAVE___S64 -#define HAVE___S64 -#ifdef __S64_TYPEDEF -typedef __S64_TYPEDEF __s64; -#else -#if (4 == 8) -typedef int __s64; -#else -#if (8 == 8) -#if defined(__GNUC__) -typedef __signed__ long long __s64; -#else -typedef signed long long __s64; -#endif /* __GNUC__ */ -#else -#if (8 == 8) -typedef long __s64; -#else -#undef HAVE___S64 - ?== error: undefined 64 bit type -#endif /* SIZEOF_LONG_LONG == 8 */ -#endif /* SIZEOF_LONG == 8 */ -#endif /* SIZEOF_INT == 8 */ -#endif /* __S64_TYPEDEF */ -#endif /* HAVE___S64 */ - -#undef __S8_TYPEDEF -#undef __U8_TYPEDEF -#undef __S16_TYPEDEF -#undef __U16_TYPEDEF -#undef __S32_TYPEDEF -#undef __U32_TYPEDEF -#undef __S64_TYPEDEF -#undef __U64_TYPEDEF - -#endif /* _*_TYPES_H */ - -#include - -/* endian checking stuff */ -#ifndef EXT2_ENDIAN_H_ -#define EXT2_ENDIAN_H_ - -#ifdef __CHECKER__ -# ifndef __bitwise -# define __bitwise __attribute__((bitwise)) -# endif -#define __force __attribute__((force)) -#else -# ifndef __bitwise -# define __bitwise -# endif -#define __force -#endif - -typedef __u16 __bitwise __le16; -typedef __u32 __bitwise __le32; -typedef __u64 __bitwise __le64; -typedef __u16 __bitwise __be16; -typedef __u32 __bitwise __be32; -typedef __u64 __bitwise __be64; - -#endif /* EXT2_ENDIAN_H_ */ - -/* These defines are needed for the public ext2fs.h header file */ -#define HAVE_SYS_TYPES_H 1 -#undef WORDS_BIGENDIAN diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2fs.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2fs.h deleted file mode 100644 index 6c6287b..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext2fs.h +++ /dev/null @@ -1,1988 +0,0 @@ -/* - * ext2fs.h --- ext2fs - * - * Copyright (C) 1993, 1994, 1995, 1996 Theodore Ts'o. - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Library - * General Public License, version 2. - * %End-Header% - */ - -#ifndef _EXT2FS_EXT2FS_H -#define _EXT2FS_EXT2FS_H - -#ifdef __GNUC__ -#define EXT2FS_ATTR(x) __attribute__(x) -#else -#define EXT2FS_ATTR(x) -#endif - -#ifdef CONFIG_TDB -#define EXT2FS_NO_TDB_UNUSED -#else -#define EXT2FS_NO_TDB_UNUSED EXT2FS_ATTR((unused)) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Non-GNU C compilers won't necessarily understand inline - */ -#if (!defined(__GNUC__) && !defined(__WATCOMC__)) -#define NO_INLINE_FUNCS -#endif - -/* - * Where the master copy of the superblock is located, and how big - * superblocks are supposed to be. We define SUPERBLOCK_SIZE because - * the size of the superblock structure is not necessarily trustworthy - * (some versions have the padding set up so that the superblock is - * 1032 bytes long). - */ -#define SUPERBLOCK_OFFSET 1024 -#define SUPERBLOCK_SIZE 1024 - -#define UUID_STR_SIZE 37 - -/* - * The last ext2fs revision level that this version of the library is - * able to support. - */ -#define EXT2_LIB_CURRENT_REV EXT2_DYNAMIC_REV - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#include -#include -#include -#include -#include - -#if EXT2_FLAT_INCLUDES -#include "e2_types.h" -#include "ext2_fs.h" -#include "ext3_extents.h" -#else -#include -#include -#include -#endif /* EXT2_FLAT_INCLUDES */ - -typedef __u32 __bitwise ext2_ino_t; -typedef __u32 __bitwise blk_t; -typedef __u64 __bitwise blk64_t; -typedef __u32 __bitwise dgrp_t; -typedef __u32 __bitwise ext2_off_t; -typedef __u64 __bitwise ext2_off64_t; -typedef __s64 __bitwise e2_blkcnt_t; -typedef __u32 __bitwise ext2_dirhash_t; - -#if EXT2_FLAT_INCLUDES -#include "com_err.h" -#include "ext2_io.h" -#include "ext2_err.h" -#include "ext2_ext_attr.h" -#else -#include -#include -#include -#include -#endif - -/* - * Portability help for Microsoft Visual C++ - */ -#ifdef _MSC_VER -#define EXT2_QSORT_TYPE int __cdecl -#else -#define EXT2_QSORT_TYPE int -#endif - -typedef struct struct_ext2_filsys *ext2_filsys; - -#define EXT2FS_MARK_ERROR 0 -#define EXT2FS_UNMARK_ERROR 1 -#define EXT2FS_TEST_ERROR 2 - -typedef struct ext2fs_struct_generic_bitmap *ext2fs_generic_bitmap; -typedef struct ext2fs_struct_generic_bitmap *ext2fs_inode_bitmap; -typedef struct ext2fs_struct_generic_bitmap *ext2fs_block_bitmap; - -#define EXT2_FIRST_INODE(s) EXT2_FIRST_INO(s) - - -/* - * Badblocks list definitions - */ - -typedef struct ext2_struct_u32_list *ext2_badblocks_list; -typedef struct ext2_struct_u32_iterate *ext2_badblocks_iterate; - -typedef struct ext2_struct_u32_list *ext2_u32_list; -typedef struct ext2_struct_u32_iterate *ext2_u32_iterate; - -/* old */ -typedef struct ext2_struct_u32_list *badblocks_list; -typedef struct ext2_struct_u32_iterate *badblocks_iterate; - -#define BADBLOCKS_FLAG_DIRTY 1 - -/* - * ext2_dblist structure and abstractions (see dblist.c) - */ -struct ext2_db_entry2 { - ext2_ino_t ino; - blk64_t blk; - e2_blkcnt_t blockcnt; -}; - -/* Ye Olde 32-bit version */ -struct ext2_db_entry { - ext2_ino_t ino; - blk_t blk; - int blockcnt; -}; - -typedef struct ext2_struct_dblist *ext2_dblist; - -#define DBLIST_ABORT 1 - -/* - * ext2_fileio definitions - */ - -#define EXT2_FILE_WRITE 0x0001 -#define EXT2_FILE_CREATE 0x0002 - -#define EXT2_FILE_MASK 0x00FF - -#define EXT2_FILE_BUF_DIRTY 0x4000 -#define EXT2_FILE_BUF_VALID 0x2000 - -typedef struct ext2_file *ext2_file_t; - -#define EXT2_SEEK_SET 0 -#define EXT2_SEEK_CUR 1 -#define EXT2_SEEK_END 2 - -/* - * Flags for the ext2_filsys structure and for ext2fs_open() - */ -#define EXT2_FLAG_RW 0x01 -#define EXT2_FLAG_CHANGED 0x02 -#define EXT2_FLAG_DIRTY 0x04 -#define EXT2_FLAG_VALID 0x08 -#define EXT2_FLAG_IB_DIRTY 0x10 -#define EXT2_FLAG_BB_DIRTY 0x20 -#define EXT2_FLAG_SWAP_BYTES 0x40 -#define EXT2_FLAG_SWAP_BYTES_READ 0x80 -#define EXT2_FLAG_SWAP_BYTES_WRITE 0x100 -#define EXT2_FLAG_MASTER_SB_ONLY 0x200 -#define EXT2_FLAG_FORCE 0x400 -#define EXT2_FLAG_SUPER_ONLY 0x800 -#define EXT2_FLAG_JOURNAL_DEV_OK 0x1000 -#define EXT2_FLAG_IMAGE_FILE 0x2000 -#define EXT2_FLAG_EXCLUSIVE 0x4000 -#define EXT2_FLAG_SOFTSUPP_FEATURES 0x8000 -#define EXT2_FLAG_NOFREE_ON_ERROR 0x10000 -#define EXT2_FLAG_64BITS 0x20000 -#define EXT2_FLAG_PRINT_PROGRESS 0x40000 -#define EXT2_FLAG_DIRECT_IO 0x80000 -#define EXT2_FLAG_SKIP_MMP 0x100000 -#define EXT2_FLAG_IGNORE_CSUM_ERRORS 0x200000 - -/* - * Special flag in the ext2 inode i_flag field that means that this is - * a new inode. (So that ext2_write_inode() can clear extra fields.) - */ -#define EXT2_NEW_INODE_FL 0x80000000 - -/* - * Flags for mkjournal - */ -#define EXT2_MKJOURNAL_V1_SUPER 0x0000001 /* create V1 superblock (deprecated) */ -#define EXT2_MKJOURNAL_LAZYINIT 0x0000002 /* don't zero journal inode before use*/ -#define EXT2_MKJOURNAL_NO_MNT_CHECK 0x0000004 /* don't check mount status */ - -struct opaque_ext2_group_desc; - -struct struct_ext2_filsys { - errcode_t magic; - io_channel io; - int flags; - char * device_name; - struct ext2_super_block * super; - unsigned int blocksize; - int fragsize; - dgrp_t group_desc_count; - unsigned long desc_blocks; - struct opaque_ext2_group_desc * group_desc; - unsigned int inode_blocks_per_group; - ext2fs_inode_bitmap inode_map; - ext2fs_block_bitmap block_map; - /* XXX FIXME-64: not 64-bit safe, but not used? */ - errcode_t (*get_blocks)(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks); - errcode_t (*check_directory)(ext2_filsys fs, ext2_ino_t ino); - errcode_t (*write_bitmaps)(ext2_filsys fs); - errcode_t (*read_inode)(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode); - errcode_t (*write_inode)(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode); - ext2_badblocks_list badblocks; - ext2_dblist dblist; - __u32 stride; /* for mke2fs */ - struct ext2_super_block * orig_super; - struct ext2_image_hdr * image_header; - __u32 umask; - time_t now; - int cluster_ratio_bits; - __u16 default_bitmap_type; - __u16 pad; - /* - * Reserved for future expansion - */ - __u32 reserved[5]; - - /* - * Reserved for the use of the calling application. - */ - void * priv_data; - - /* - * Inode cache - */ - struct ext2_inode_cache *icache; - io_channel image_io; - - /* - * More callback functions - */ - errcode_t (*get_alloc_block)(ext2_filsys fs, blk64_t goal, - blk64_t *ret); - void (*block_alloc_stats)(ext2_filsys fs, blk64_t blk, int inuse); - - /* - * Buffers for Multiple mount protection(MMP) block. - */ - void *mmp_buf; - void *mmp_cmp; - int mmp_fd; - - /* - * Time at which e2fsck last updated the MMP block. - */ - long mmp_last_written; - - /* progress operation functions */ - struct ext2fs_progress_ops *progress_ops; - - /* Precomputed FS UUID checksum for seeding other checksums */ - __u32 csum_seed; - - io_channel journal_io; - char *journal_name; - - /* New block range allocation hooks */ - errcode_t (*new_range)(ext2_filsys fs, int flags, blk64_t goal, - blk64_t len, blk64_t *pblk, blk64_t *plen); - void (*block_alloc_stats_range)(ext2_filsys fs, blk64_t blk, blk_t num, - int inuse); -}; - -#if EXT2_FLAT_INCLUDES -#include "e2_bitops.h" -#else -#include -#endif - -/* - * 64-bit bitmap backend types - */ -#define EXT2FS_BMAP64_BITARRAY 1 -#define EXT2FS_BMAP64_RBTREE 2 -#define EXT2FS_BMAP64_AUTODIR 3 - -/* - * Return flags for the block iterator functions - */ -#define BLOCK_CHANGED 1 -#define BLOCK_ABORT 2 -#define BLOCK_ERROR 4 -#define BLOCK_INLINE_DATA_CHANGED 8 - -/* - * Block interate flags - * - * BLOCK_FLAG_APPEND, or BLOCK_FLAG_HOLE, indicates that the interator - * function should be called on blocks where the block number is zero. - * This is used by ext2fs_expand_dir() to be able to add a new block - * to an inode. It can also be used for programs that want to be able - * to deal with files that contain "holes". - * - * BLOCK_FLAG_DEPTH_TRAVERSE indicates that the iterator function for - * the indirect, doubly indirect, etc. blocks should be called after - * all of the blocks contained in the indirect blocks are processed. - * This is useful if you are going to be deallocating blocks from an - * inode. - * - * BLOCK_FLAG_DATA_ONLY indicates that the iterator function should be - * called for data blocks only. - * - * BLOCK_FLAG_READ_ONLY is a promise by the caller that it will not - * modify returned block number. - * - * BLOCK_FLAG_NO_LARGE is for internal use only. It informs - * ext2fs_block_iterate2 that large files won't be accepted. - */ -#define BLOCK_FLAG_APPEND 1 -#define BLOCK_FLAG_HOLE 1 -#define BLOCK_FLAG_DEPTH_TRAVERSE 2 -#define BLOCK_FLAG_DATA_ONLY 4 -#define BLOCK_FLAG_READ_ONLY 8 - -#define BLOCK_FLAG_NO_LARGE 0x1000 - -/* - * Magic "block count" return values for the block iterator function. - */ -#define BLOCK_COUNT_IND (-1) -#define BLOCK_COUNT_DIND (-2) -#define BLOCK_COUNT_TIND (-3) -#define BLOCK_COUNT_TRANSLATOR (-4) - -#if 0 -/* - * Flags for ext2fs_move_blocks - */ -#define EXT2_BMOVE_GET_DBLIST 0x0001 -#define EXT2_BMOVE_DEBUG 0x0002 -#endif - -/* - * Generic (non-filesystem layout specific) extents structure - */ - -#define EXT2_EXTENT_FLAGS_LEAF 0x0001 -#define EXT2_EXTENT_FLAGS_UNINIT 0x0002 -#define EXT2_EXTENT_FLAGS_SECOND_VISIT 0x0004 - -struct ext2fs_extent { - blk64_t e_pblk; /* first physical block */ - blk64_t e_lblk; /* first logical block extent covers */ - __u32 e_len; /* number of blocks covered by extent */ - __u32 e_flags; /* extent flags */ -}; - -typedef struct ext2_extent_handle *ext2_extent_handle_t; -typedef struct ext2_extent_path *ext2_extent_path_t; - -/* - * Flags used by ext2fs_extent_get() - */ -#define EXT2_EXTENT_CURRENT 0x0000 -#define EXT2_EXTENT_MOVE_MASK 0x000F -#define EXT2_EXTENT_ROOT 0x0001 -#define EXT2_EXTENT_LAST_LEAF 0x0002 -#define EXT2_EXTENT_FIRST_SIB 0x0003 -#define EXT2_EXTENT_LAST_SIB 0x0004 -#define EXT2_EXTENT_NEXT_SIB 0x0005 -#define EXT2_EXTENT_PREV_SIB 0x0006 -#define EXT2_EXTENT_NEXT_LEAF 0x0007 -#define EXT2_EXTENT_PREV_LEAF 0x0008 -#define EXT2_EXTENT_NEXT 0x0009 -#define EXT2_EXTENT_PREV 0x000A -#define EXT2_EXTENT_UP 0x000B -#define EXT2_EXTENT_DOWN 0x000C -#define EXT2_EXTENT_DOWN_AND_LAST 0x000D - -/* - * Flags used by ext2fs_extent_insert() - */ -#define EXT2_EXTENT_INSERT_AFTER 0x0001 /* insert after handle loc'n */ -#define EXT2_EXTENT_INSERT_NOSPLIT 0x0002 /* insert may not cause split */ - -/* - * Flags used by ext2fs_extent_delete() - */ -#define EXT2_EXTENT_DELETE_KEEP_EMPTY 0x001 /* keep node if last extent gone */ - -/* - * Flags used by ext2fs_extent_set_bmap() - */ -#define EXT2_EXTENT_SET_BMAP_UNINIT 0x0001 - -/* - * Data structure returned by ext2fs_extent_get_info() - */ -struct ext2_extent_info { - int curr_entry; - int curr_level; - int num_entries; - int max_entries; - int max_depth; - int bytes_avail; - blk64_t max_lblk; - blk64_t max_pblk; - __u32 max_len; - __u32 max_uninit_len; -}; - -/* - * Flags for directory block reading and writing functions - */ -#define EXT2_DIRBLOCK_V2_STRUCT 0x0001 - -/* - * Return flags for the directory iterator functions - */ -#define DIRENT_CHANGED 1 -#define DIRENT_ABORT 2 -#define DIRENT_ERROR 3 - -/* - * Directory iterator flags - */ - -#define DIRENT_FLAG_INCLUDE_EMPTY 1 -#define DIRENT_FLAG_INCLUDE_REMOVED 2 -#define DIRENT_FLAG_INCLUDE_CSUM 4 -#define DIRENT_FLAG_INCLUDE_INLINE_DATA 8 - -#define DIRENT_DOT_FILE 1 -#define DIRENT_DOT_DOT_FILE 2 -#define DIRENT_OTHER_FILE 3 -#define DIRENT_DELETED_FILE 4 -#define DIRENT_CHECKSUM 5 - -/* - * Inode scan definitions - */ -typedef struct ext2_struct_inode_scan *ext2_inode_scan; - -/* - * ext2fs_scan flags - */ -#define EXT2_SF_CHK_BADBLOCKS 0x0001 -#define EXT2_SF_BAD_INODE_BLK 0x0002 -#define EXT2_SF_BAD_EXTRA_BYTES 0x0004 -#define EXT2_SF_SKIP_MISSING_ITABLE 0x0008 -#define EXT2_SF_DO_LAZY 0x0010 -#define EXT2_SF_WARN_GARBAGE_INODES 0x0020 - -/* - * ext2fs_check_if_mounted flags - */ -#define EXT2_MF_MOUNTED 1 -#define EXT2_MF_ISROOT 2 -#define EXT2_MF_READONLY 4 -#define EXT2_MF_SWAP 8 -#define EXT2_MF_BUSY 16 - -/* - * Ext2/linux mode flags. We define them here so that we don't need - * to depend on the OS's sys/stat.h, since we may be compiling on a - * non-Linux system. - */ -#define LINUX_S_IFMT 00170000 -#define LINUX_S_IFSOCK 0140000 -#define LINUX_S_IFLNK 0120000 -#define LINUX_S_IFREG 0100000 -#define LINUX_S_IFBLK 0060000 -#define LINUX_S_IFDIR 0040000 -#define LINUX_S_IFCHR 0020000 -#define LINUX_S_IFIFO 0010000 -#define LINUX_S_ISUID 0004000 -#define LINUX_S_ISGID 0002000 -#define LINUX_S_ISVTX 0001000 - -#define LINUX_S_IRWXU 00700 -#define LINUX_S_IRUSR 00400 -#define LINUX_S_IWUSR 00200 -#define LINUX_S_IXUSR 00100 - -#define LINUX_S_IRWXG 00070 -#define LINUX_S_IRGRP 00040 -#define LINUX_S_IWGRP 00020 -#define LINUX_S_IXGRP 00010 - -#define LINUX_S_IRWXO 00007 -#define LINUX_S_IROTH 00004 -#define LINUX_S_IWOTH 00002 -#define LINUX_S_IXOTH 00001 - -#define LINUX_S_ISLNK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFLNK) -#define LINUX_S_ISREG(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFREG) -#define LINUX_S_ISDIR(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFDIR) -#define LINUX_S_ISCHR(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFCHR) -#define LINUX_S_ISBLK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFBLK) -#define LINUX_S_ISFIFO(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFIFO) -#define LINUX_S_ISSOCK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFSOCK) - -/* - * ext2 size of an inode - */ -#define EXT2_I_SIZE(i) ((i)->i_size | ((__u64) (i)->i_size_high << 32)) - -/* - * ext2_icount_t abstraction - */ -#define EXT2_ICOUNT_OPT_INCREMENT 0x01 -#define EXT2_ICOUNT_OPT_FULLMAP 0x02 - -typedef struct ext2_icount *ext2_icount_t; - -/* - * Flags for ext2fs_bmap - */ -#define BMAP_ALLOC 0x0001 -#define BMAP_SET 0x0002 -#define BMAP_UNINIT 0x0004 -#define BMAP_ZERO 0x0008 - -/* - * Returned flags from ext2fs_bmap - */ -#define BMAP_RET_UNINIT 0x0001 - -/* - * Flags for imager.c functions - */ -#define IMAGER_FLAG_INODEMAP 1 -#define IMAGER_FLAG_SPARSEWRITE 2 - -/* - * For checking structure magic numbers... - */ - -#define EXT2_CHECK_MAGIC(struct, code) \ - if ((struct)->magic != (code)) return (code) - -/* - * Features supported by this version of the library - */ -#define EXT2_LIB_FEATURE_COMPAT_SUPP (EXT2_FEATURE_COMPAT_DIR_PREALLOC|\ - EXT2_FEATURE_COMPAT_IMAGIC_INODES|\ - EXT3_FEATURE_COMPAT_HAS_JOURNAL|\ - EXT2_FEATURE_COMPAT_RESIZE_INODE|\ - EXT2_FEATURE_COMPAT_DIR_INDEX|\ - EXT2_FEATURE_COMPAT_EXT_ATTR|\ - EXT4_FEATURE_COMPAT_SPARSE_SUPER2) - -#ifdef CONFIG_MMP -#define EXT4_LIB_INCOMPAT_MMP EXT4_FEATURE_INCOMPAT_MMP -#else -#define EXT4_LIB_INCOMPAT_MMP (0) -#endif - -#define EXT2_LIB_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE|\ - EXT3_FEATURE_INCOMPAT_JOURNAL_DEV|\ - EXT2_FEATURE_INCOMPAT_META_BG|\ - EXT3_FEATURE_INCOMPAT_RECOVER|\ - EXT3_FEATURE_INCOMPAT_EXTENTS|\ - EXT4_FEATURE_INCOMPAT_FLEX_BG|\ - EXT4_LIB_INCOMPAT_MMP|\ - EXT4_FEATURE_INCOMPAT_64BIT|\ - EXT4_FEATURE_INCOMPAT_INLINE_DATA|\ - EXT4_FEATURE_INCOMPAT_ENCRYPT|\ - EXT4_FEATURE_INCOMPAT_CSUM_SEED) - -#define EXT2_LIB_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\ - EXT4_FEATURE_RO_COMPAT_HUGE_FILE|\ - EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\ - EXT4_FEATURE_RO_COMPAT_DIR_NLINK|\ - EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE|\ - EXT4_FEATURE_RO_COMPAT_GDT_CSUM|\ - EXT4_FEATURE_RO_COMPAT_BIGALLOC|\ - EXT4_FEATURE_RO_COMPAT_QUOTA|\ - EXT4_FEATURE_RO_COMPAT_METADATA_CSUM|\ - EXT4_FEATURE_RO_COMPAT_READONLY |\ - EXT4_FEATURE_RO_COMPAT_PROJECT) - -/* - * These features are only allowed if EXT2_FLAG_SOFTSUPP_FEATURES is passed - * to ext2fs_openfs() - */ -#define EXT2_LIB_SOFTSUPP_INCOMPAT (0) -#define EXT2_LIB_SOFTSUPP_RO_COMPAT (EXT4_FEATURE_RO_COMPAT_REPLICA) - - -/* Translate a block number to a cluster number */ -#define EXT2FS_CLUSTER_RATIO(fs) (1 << (fs)->cluster_ratio_bits) -#define EXT2FS_CLUSTER_MASK(fs) (EXT2FS_CLUSTER_RATIO(fs) - 1) -#define EXT2FS_B2C(fs, blk) ((blk) >> (fs)->cluster_ratio_bits) -/* Translate a cluster number to a block number */ -#define EXT2FS_C2B(fs, cluster) ((cluster) << (fs)->cluster_ratio_bits) -/* Translate # of blks to # of clusters */ -#define EXT2FS_NUM_B2C(fs, blks) (((blks) + EXT2FS_CLUSTER_MASK(fs)) >> \ - (fs)->cluster_ratio_bits) - -#if defined(HAVE_FSTAT64) && !defined(__OSX_AVAILABLE_BUT_DEPRECATED) -typedef struct stat64 ext2fs_struct_stat; -#else -typedef struct stat ext2fs_struct_stat; -#endif - -/* - * For ext2fs_close2() and ext2fs_flush2(), this flag allows you to - * avoid the fsync call. - */ -#define EXT2_FLAG_FLUSH_NO_SYNC 1 - -/* - * Modify and iterate extended attributes - */ -struct ext2_xattr_handle; -#define XATTR_ABORT 1 -#define XATTR_CHANGED 2 - -/* - * function prototypes - */ -static inline int ext2fs_has_group_desc_csum(ext2_filsys fs) -{ - return ext2fs_has_feature_metadata_csum(fs->super) || - ext2fs_has_feature_gdt_csum(fs->super); -} - -/* The LARGE_FILE feature should be set if we have stored files 2GB+ in size */ -static inline int ext2fs_needs_large_file_feature(unsigned long long file_size) -{ - return file_size >= 0x80000000ULL; -} - -/* alloc.c */ -extern void ext2fs_clear_block_uninit(ext2_filsys fs, dgrp_t group); -extern errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir, int mode, - ext2fs_inode_bitmap map, ext2_ino_t *ret); -extern errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal, - ext2fs_block_bitmap map, blk_t *ret); -extern errcode_t ext2fs_new_block2(ext2_filsys fs, blk64_t goal, - ext2fs_block_bitmap map, blk64_t *ret); -extern errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start, - blk_t finish, int num, - ext2fs_block_bitmap map, - blk_t *ret); -extern errcode_t ext2fs_get_free_blocks2(ext2_filsys fs, blk64_t start, - blk64_t finish, int num, - ext2fs_block_bitmap map, - blk64_t *ret); -extern errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal, - char *block_buf, blk_t *ret); -extern errcode_t ext2fs_alloc_block2(ext2_filsys fs, blk64_t goal, - char *block_buf, blk64_t *ret); -extern void ext2fs_set_alloc_block_callback(ext2_filsys fs, - errcode_t (*func)(ext2_filsys fs, - blk64_t goal, - blk64_t *ret), - errcode_t (**old)(ext2_filsys fs, - blk64_t goal, - blk64_t *ret)); -blk64_t ext2fs_find_inode_goal(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, blk64_t lblk); -extern void ext2fs_set_new_range_callback(ext2_filsys fs, - errcode_t (*func)(ext2_filsys fs, int flags, blk64_t goal, - blk64_t len, blk64_t *pblk, blk64_t *plen), - errcode_t (**old)(ext2_filsys fs, int flags, blk64_t goal, - blk64_t len, blk64_t *pblk, blk64_t *plen)); -extern void ext2fs_set_block_alloc_stats_range_callback(ext2_filsys fs, - void (*func)(ext2_filsys fs, blk64_t blk, - blk_t num, int inuse), - void (**old)(ext2_filsys fs, blk64_t blk, - blk_t num, int inuse)); -#define EXT2_NEWRANGE_FIXED_GOAL (0x1) -#define EXT2_NEWRANGE_MIN_LENGTH (0x2) -#define EXT2_NEWRANGE_ALL_FLAGS (0x3) -errcode_t ext2fs_new_range(ext2_filsys fs, int flags, blk64_t goal, - blk64_t len, ext2fs_block_bitmap map, blk64_t *pblk, - blk64_t *plen); -#define EXT2_ALLOCRANGE_FIXED_GOAL (0x1) -#define EXT2_ALLOCRANGE_ZERO_BLOCKS (0x2) -#define EXT2_ALLOCRANGE_ALL_FLAGS (0x3) -errcode_t ext2fs_alloc_range(ext2_filsys fs, int flags, blk64_t goal, - blk_t len, blk64_t *ret); - -/* alloc_sb.c */ -extern int ext2fs_reserve_super_and_bgd(ext2_filsys fs, - dgrp_t group, - ext2fs_block_bitmap bmap); -extern void ext2fs_set_block_alloc_stats_callback(ext2_filsys fs, - void (*func)(ext2_filsys fs, - blk64_t blk, - int inuse), - void (**old)(ext2_filsys fs, - blk64_t blk, - int inuse)); - -/* alloc_stats.c */ -void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse); -void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino, - int inuse, int isdir); -void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse); -void ext2fs_block_alloc_stats2(ext2_filsys fs, blk64_t blk, int inuse); -void ext2fs_block_alloc_stats_range(ext2_filsys fs, blk64_t blk, - blk_t num, int inuse); - -/* alloc_tables.c */ -extern errcode_t ext2fs_allocate_tables(ext2_filsys fs); -extern errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, - ext2fs_block_bitmap bmap); - -/* badblocks.c */ -extern errcode_t ext2fs_u32_list_create(ext2_u32_list *ret, int size); -extern errcode_t ext2fs_u32_list_add(ext2_u32_list bb, __u32 blk); -extern int ext2fs_u32_list_find(ext2_u32_list bb, __u32 blk); -extern int ext2fs_u32_list_test(ext2_u32_list bb, blk_t blk); -extern errcode_t ext2fs_u32_list_iterate_begin(ext2_u32_list bb, - ext2_u32_iterate *ret); -extern int ext2fs_u32_list_iterate(ext2_u32_iterate iter, blk_t *blk); -extern void ext2fs_u32_list_iterate_end(ext2_u32_iterate iter); -extern errcode_t ext2fs_u32_copy(ext2_u32_list src, ext2_u32_list *dest); -extern int ext2fs_u32_list_equal(ext2_u32_list bb1, ext2_u32_list bb2); - -extern errcode_t ext2fs_badblocks_list_create(ext2_badblocks_list *ret, - int size); -extern errcode_t ext2fs_badblocks_list_add(ext2_badblocks_list bb, - blk_t blk); -extern int ext2fs_badblocks_list_test(ext2_badblocks_list bb, - blk_t blk); -extern int ext2fs_u32_list_del(ext2_u32_list bb, __u32 blk); -extern void ext2fs_badblocks_list_del(ext2_u32_list bb, __u32 blk); -extern errcode_t - ext2fs_badblocks_list_iterate_begin(ext2_badblocks_list bb, - ext2_badblocks_iterate *ret); -extern int ext2fs_badblocks_list_iterate(ext2_badblocks_iterate iter, - blk_t *blk); -extern void ext2fs_badblocks_list_iterate_end(ext2_badblocks_iterate iter); -extern errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src, - ext2_badblocks_list *dest); -extern int ext2fs_badblocks_equal(ext2_badblocks_list bb1, - ext2_badblocks_list bb2); -extern int ext2fs_u32_list_count(ext2_u32_list bb); - -/* bb_compat */ -extern errcode_t badblocks_list_create(badblocks_list *ret, int size); -extern errcode_t badblocks_list_add(badblocks_list bb, blk_t blk); -extern int badblocks_list_test(badblocks_list bb, blk_t blk); -extern errcode_t badblocks_list_iterate_begin(badblocks_list bb, - badblocks_iterate *ret); -extern int badblocks_list_iterate(badblocks_iterate iter, blk_t *blk); -extern void badblocks_list_iterate_end(badblocks_iterate iter); -extern void badblocks_list_free(badblocks_list bb); - -/* bb_inode.c */ -extern errcode_t ext2fs_update_bb_inode(ext2_filsys fs, - ext2_badblocks_list bb_list); - -/* bitmaps.c */ -extern void ext2fs_free_block_bitmap(ext2fs_block_bitmap bitmap); -extern void ext2fs_free_inode_bitmap(ext2fs_inode_bitmap bitmap); -extern errcode_t ext2fs_copy_bitmap(ext2fs_generic_bitmap src, - ext2fs_generic_bitmap *dest); -extern errcode_t ext2fs_write_inode_bitmap(ext2_filsys fs); -extern errcode_t ext2fs_write_block_bitmap (ext2_filsys fs); -extern errcode_t ext2fs_read_inode_bitmap (ext2_filsys fs); -extern errcode_t ext2fs_read_block_bitmap(ext2_filsys fs); -extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs, - const char *descr, - ext2fs_block_bitmap *ret); -extern errcode_t ext2fs_allocate_subcluster_bitmap(ext2_filsys fs, - const char *descr, - ext2fs_block_bitmap *ret); -extern int ext2fs_get_bitmap_granularity(ext2fs_block_bitmap bitmap); -extern errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs, - const char *descr, - ext2fs_inode_bitmap *ret); -extern errcode_t ext2fs_fudge_inode_bitmap_end(ext2fs_inode_bitmap bitmap, - ext2_ino_t end, ext2_ino_t *oend); -extern errcode_t ext2fs_fudge_block_bitmap_end(ext2fs_block_bitmap bitmap, - blk_t end, blk_t *oend); -extern errcode_t ext2fs_fudge_block_bitmap_end2(ext2fs_block_bitmap bitmap, - blk64_t end, blk64_t *oend); -extern void ext2fs_clear_inode_bitmap(ext2fs_inode_bitmap bitmap); -extern void ext2fs_clear_block_bitmap(ext2fs_block_bitmap bitmap); -extern errcode_t ext2fs_read_bitmaps(ext2_filsys fs); -extern errcode_t ext2fs_write_bitmaps(ext2_filsys fs); -extern errcode_t ext2fs_resize_inode_bitmap(__u32 new_end, __u32 new_real_end, - ext2fs_inode_bitmap bmap); -extern errcode_t ext2fs_resize_inode_bitmap2(__u64 new_end, - __u64 new_real_end, - ext2fs_inode_bitmap bmap); -extern errcode_t ext2fs_resize_block_bitmap(__u32 new_end, __u32 new_real_end, - ext2fs_block_bitmap bmap); -extern errcode_t ext2fs_resize_block_bitmap2(__u64 new_end, - __u64 new_real_end, - ext2fs_block_bitmap bmap); -extern errcode_t ext2fs_compare_block_bitmap(ext2fs_block_bitmap bm1, - ext2fs_block_bitmap bm2); -extern errcode_t ext2fs_compare_inode_bitmap(ext2fs_inode_bitmap bm1, - ext2fs_inode_bitmap bm2); -extern errcode_t ext2fs_set_inode_bitmap_range(ext2fs_inode_bitmap bmap, - ext2_ino_t start, unsigned int num, - void *in); -extern errcode_t ext2fs_set_inode_bitmap_range2(ext2fs_inode_bitmap bmap, - __u64 start, size_t num, - void *in); -extern errcode_t ext2fs_get_inode_bitmap_range(ext2fs_inode_bitmap bmap, - ext2_ino_t start, unsigned int num, - void *out); -extern errcode_t ext2fs_get_inode_bitmap_range2(ext2fs_inode_bitmap bmap, - __u64 start, size_t num, - void *out); -extern errcode_t ext2fs_set_block_bitmap_range(ext2fs_block_bitmap bmap, - blk_t start, unsigned int num, - void *in); -extern errcode_t ext2fs_set_block_bitmap_range2(ext2fs_block_bitmap bmap, - blk64_t start, size_t num, - void *in); -extern errcode_t ext2fs_get_block_bitmap_range(ext2fs_block_bitmap bmap, - blk_t start, unsigned int num, - void *out); -extern errcode_t ext2fs_get_block_bitmap_range2(ext2fs_block_bitmap bmap, - blk64_t start, size_t num, - void *out); - -/* blknum.c */ -extern __u32 ext2fs_inode_bitmap_checksum(ext2_filsys fs, dgrp_t group); -extern __u32 ext2fs_block_bitmap_checksum(ext2_filsys fs, dgrp_t group); -extern dgrp_t ext2fs_group_of_blk2(ext2_filsys fs, blk64_t); -extern blk64_t ext2fs_group_first_block2(ext2_filsys fs, dgrp_t group); -extern blk64_t ext2fs_group_last_block2(ext2_filsys fs, dgrp_t group); -extern int ext2fs_group_blocks_count(ext2_filsys fs, dgrp_t group); -extern blk64_t ext2fs_inode_data_blocks2(ext2_filsys fs, - struct ext2_inode *inode); -extern blk64_t ext2fs_inode_i_blocks(ext2_filsys fs, - struct ext2_inode *inode); -extern blk64_t ext2fs_blocks_count(struct ext2_super_block *super); -extern void ext2fs_blocks_count_set(struct ext2_super_block *super, - blk64_t blk); -extern void ext2fs_blocks_count_add(struct ext2_super_block *super, - blk64_t blk); -extern blk64_t ext2fs_r_blocks_count(struct ext2_super_block *super); -extern void ext2fs_r_blocks_count_set(struct ext2_super_block *super, - blk64_t blk); -extern void ext2fs_r_blocks_count_add(struct ext2_super_block *super, - blk64_t blk); -extern blk64_t ext2fs_free_blocks_count(struct ext2_super_block *super); -extern void ext2fs_free_blocks_count_set(struct ext2_super_block *super, - blk64_t blk); -extern void ext2fs_free_blocks_count_add(struct ext2_super_block *super, - blk64_t blk); -/* Block group descriptor accessor functions */ -extern struct ext2_group_desc *ext2fs_group_desc(ext2_filsys fs, - struct opaque_ext2_group_desc *gdp, - dgrp_t group); -extern blk64_t ext2fs_block_bitmap_csum(ext2_filsys fs, dgrp_t group); -extern blk64_t ext2fs_block_bitmap_loc(ext2_filsys fs, dgrp_t group); -extern void ext2fs_block_bitmap_loc_set(ext2_filsys fs, dgrp_t group, - blk64_t blk); -extern __u32 ext2fs_inode_bitmap_csum(ext2_filsys fs, dgrp_t group); -extern blk64_t ext2fs_inode_bitmap_loc(ext2_filsys fs, dgrp_t group); -extern void ext2fs_inode_bitmap_loc_set(ext2_filsys fs, dgrp_t group, - blk64_t blk); -extern blk64_t ext2fs_inode_table_loc(ext2_filsys fs, dgrp_t group); -extern void ext2fs_inode_table_loc_set(ext2_filsys fs, dgrp_t group, - blk64_t blk); -extern __u32 ext2fs_bg_free_blocks_count(ext2_filsys fs, dgrp_t group); -extern void ext2fs_bg_free_blocks_count_set(ext2_filsys fs, dgrp_t group, - __u32 n); -extern __u32 ext2fs_bg_free_inodes_count(ext2_filsys fs, dgrp_t group); -extern void ext2fs_bg_free_inodes_count_set(ext2_filsys fs, dgrp_t group, - __u32 n); -extern __u32 ext2fs_bg_used_dirs_count(ext2_filsys fs, dgrp_t group); -extern void ext2fs_bg_used_dirs_count_set(ext2_filsys fs, dgrp_t group, - __u32 n); -extern __u32 ext2fs_bg_itable_unused(ext2_filsys fs, dgrp_t group); -extern void ext2fs_bg_itable_unused_set(ext2_filsys fs, dgrp_t group, - __u32 n); -extern __u16 ext2fs_bg_flags(ext2_filsys fs, dgrp_t group); -extern void ext2fs_bg_flags_zap(ext2_filsys fs, dgrp_t group); -extern int ext2fs_bg_flags_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag); -extern void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags); -extern void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flags); -extern __u16 ext2fs_bg_checksum(ext2_filsys fs, dgrp_t group); -extern void ext2fs_bg_checksum_set(ext2_filsys fs, dgrp_t group, __u16 checksum); -extern blk64_t ext2fs_file_acl_block(ext2_filsys fs, - const struct ext2_inode *inode); -extern void ext2fs_file_acl_block_set(ext2_filsys fs, - struct ext2_inode *inode, blk64_t blk); -extern errcode_t ext2fs_inode_size_set(ext2_filsys fs, struct ext2_inode *inode, - ext2_off64_t size); - -/* block.c */ -extern errcode_t ext2fs_block_iterate(ext2_filsys fs, - ext2_ino_t ino, - int flags, - char *block_buf, - int (*func)(ext2_filsys fs, - blk_t *blocknr, - int blockcnt, - void *priv_data), - void *priv_data); -errcode_t ext2fs_block_iterate2(ext2_filsys fs, - ext2_ino_t ino, - int flags, - char *block_buf, - int (*func)(ext2_filsys fs, - blk_t *blocknr, - e2_blkcnt_t blockcnt, - blk_t ref_blk, - int ref_offset, - void *priv_data), - void *priv_data); -errcode_t ext2fs_block_iterate3(ext2_filsys fs, - ext2_ino_t ino, - int flags, - char *block_buf, - int (*func)(ext2_filsys fs, - blk64_t *blocknr, - e2_blkcnt_t blockcnt, - blk64_t ref_blk, - int ref_offset, - void *priv_data), - void *priv_data); - -/* bmap.c */ -extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - char *block_buf, int bmap_flags, - blk_t block, blk_t *phys_blk); -extern errcode_t ext2fs_bmap2(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - char *block_buf, int bmap_flags, blk64_t block, - int *ret_flags, blk64_t *phys_blk); -errcode_t ext2fs_map_cluster_block(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, blk64_t lblk, - blk64_t *pblk); - -#if 0 -/* bmove.c */ -extern errcode_t ext2fs_move_blocks(ext2_filsys fs, - ext2fs_block_bitmap reserve, - ext2fs_block_bitmap alloc_map, - int flags); -#endif - -/* check_desc.c */ -extern errcode_t ext2fs_check_desc(ext2_filsys fs); - -/* closefs.c */ -extern errcode_t ext2fs_close(ext2_filsys fs); -extern errcode_t ext2fs_close2(ext2_filsys fs, int flags); -extern errcode_t ext2fs_close_free(ext2_filsys *fs); -extern errcode_t ext2fs_flush(ext2_filsys fs); -extern errcode_t ext2fs_flush2(ext2_filsys fs, int flags); -extern int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group_block); -extern errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs, - dgrp_t group, - blk64_t *ret_super_blk, - blk64_t *ret_old_desc_blk, - blk64_t *ret_new_desc_blk, - blk_t *ret_used_blks); -extern int ext2fs_super_and_bgd_loc(ext2_filsys fs, - dgrp_t group, - blk_t *ret_super_blk, - blk_t *ret_old_desc_blk, - blk_t *ret_new_desc_blk, - int *ret_meta_bg); -extern void ext2fs_update_dynamic_rev(ext2_filsys fs); - -/* crc32c.c */ -extern __u32 ext2fs_crc32_be(__u32 crc, unsigned char const *p, size_t len); -extern __u32 ext2fs_crc32c_le(__u32 crc, unsigned char const *p, size_t len); - -/* csum.c */ -extern void ext2fs_init_csum_seed(ext2_filsys fs); -extern errcode_t ext2fs_mmp_csum_set(ext2_filsys fs, struct mmp_struct *mmp); -extern int ext2fs_mmp_csum_verify(ext2_filsys, struct mmp_struct *mmp); -extern int ext2fs_verify_csum_type(ext2_filsys fs, struct ext2_super_block *sb); -extern errcode_t ext2fs_superblock_csum_set(ext2_filsys fs, - struct ext2_super_block *sb); -extern int ext2fs_superblock_csum_verify(ext2_filsys fs, - struct ext2_super_block *sb); -extern errcode_t ext2fs_ext_attr_block_csum_set(ext2_filsys fs, - ext2_ino_t inum, blk64_t block, - struct ext2_ext_attr_header *hdr); -extern int ext2fs_ext_attr_block_csum_verify(ext2_filsys fs, ext2_ino_t inum, - blk64_t block, - struct ext2_ext_attr_header *hdr); -#define EXT2_DIRENT_TAIL(block, blocksize) \ - ((struct ext2_dir_entry_tail *)(((char *)(block)) + \ - (blocksize) - sizeof(struct ext2_dir_entry_tail))) - -extern void ext2fs_initialize_dirent_tail(ext2_filsys fs, - struct ext2_dir_entry_tail *t); -extern int ext2fs_dirent_has_tail(ext2_filsys fs, - struct ext2_dir_entry *dirent); -extern int ext2fs_dirent_csum_verify(ext2_filsys fs, ext2_ino_t inum, - struct ext2_dir_entry *dirent); -extern int ext2fs_dir_block_csum_verify(ext2_filsys fs, ext2_ino_t inum, - struct ext2_dir_entry *dirent); -extern errcode_t ext2fs_dir_block_csum_set(ext2_filsys fs, ext2_ino_t inum, - struct ext2_dir_entry *dirent); -extern errcode_t ext2fs_get_dx_countlimit(ext2_filsys fs, - struct ext2_dir_entry *dirent, - struct ext2_dx_countlimit **cc, - int *offset); -extern errcode_t ext2fs_extent_block_csum_set(ext2_filsys fs, - ext2_ino_t inum, - struct ext3_extent_header *eh); -extern int ext2fs_extent_block_csum_verify(ext2_filsys fs, - ext2_ino_t inum, - struct ext3_extent_header *eh); -extern errcode_t ext2fs_block_bitmap_csum_set(ext2_filsys fs, dgrp_t group, - char *bitmap, int size); -extern int ext2fs_block_bitmap_csum_verify(ext2_filsys fs, dgrp_t group, - char *bitmap, int size); -extern errcode_t ext2fs_inode_bitmap_csum_set(ext2_filsys fs, dgrp_t group, - char *bitmap, int size); -extern int ext2fs_inode_bitmap_csum_verify(ext2_filsys fs, dgrp_t group, - char *bitmap, int size); -extern errcode_t ext2fs_inode_csum_set(ext2_filsys fs, ext2_ino_t inum, - struct ext2_inode_large *inode); -extern int ext2fs_inode_csum_verify(ext2_filsys fs, ext2_ino_t inum, - struct ext2_inode_large *inode); -extern void ext2fs_group_desc_csum_set(ext2_filsys fs, dgrp_t group); -extern int ext2fs_group_desc_csum_verify(ext2_filsys fs, dgrp_t group); -extern errcode_t ext2fs_set_gdt_csum(ext2_filsys fs); -extern __u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group); - -/* dblist.c */ -extern errcode_t ext2fs_init_dblist(ext2_filsys fs, ext2_dblist *ret_dblist); -extern errcode_t ext2fs_add_dir_block(ext2_dblist dblist, ext2_ino_t ino, - blk_t blk, int blockcnt); -extern errcode_t ext2fs_add_dir_block2(ext2_dblist dblist, ext2_ino_t ino, - blk64_t blk, e2_blkcnt_t blockcnt); -extern void ext2fs_dblist_sort(ext2_dblist dblist, - EXT2_QSORT_TYPE (*sortfunc)(const void *, - const void *)); -extern void ext2fs_dblist_sort2(ext2_dblist dblist, - EXT2_QSORT_TYPE (*sortfunc)(const void *, - const void *)); -extern errcode_t ext2fs_dblist_iterate(ext2_dblist dblist, - int (*func)(ext2_filsys fs, struct ext2_db_entry *db_info, - void *priv_data), - void *priv_data); -extern errcode_t ext2fs_dblist_iterate2(ext2_dblist dblist, - int (*func)(ext2_filsys fs, struct ext2_db_entry2 *db_info, - void *priv_data), - void *priv_data); -extern errcode_t ext2fs_dblist_iterate3(ext2_dblist dblist, - int (*func)(ext2_filsys fs, struct ext2_db_entry2 *db_info, - void *priv_data), - unsigned long long start, - unsigned long long count, - void *priv_data); -extern errcode_t ext2fs_set_dir_block(ext2_dblist dblist, ext2_ino_t ino, - blk_t blk, int blockcnt); -extern errcode_t ext2fs_set_dir_block2(ext2_dblist dblist, ext2_ino_t ino, - blk64_t blk, e2_blkcnt_t blockcnt); -extern errcode_t ext2fs_copy_dblist(ext2_dblist src, - ext2_dblist *dest); -extern int ext2fs_dblist_count(ext2_dblist dblist); -extern blk64_t ext2fs_dblist_count2(ext2_dblist dblist); -extern errcode_t ext2fs_dblist_get_last(ext2_dblist dblist, - struct ext2_db_entry **entry); -extern errcode_t ext2fs_dblist_get_last2(ext2_dblist dblist, - struct ext2_db_entry2 **entry); -extern errcode_t ext2fs_dblist_drop_last(ext2_dblist dblist); - -/* dblist_dir.c */ -extern errcode_t - ext2fs_dblist_dir_iterate(ext2_dblist dblist, - int flags, - char *block_buf, - int (*func)(ext2_ino_t dir, - int entry, - struct ext2_dir_entry *dirent, - int offset, - int blocksize, - char *buf, - void *priv_data), - void *priv_data); - -#if 0 -/* digest_encode.c */ -#define EXT2FS_DIGEST_SIZE EXT2FS_SHA256_LENGTH -extern int ext2fs_digest_encode(const char *src, int len, char *dst); -extern int ext2fs_digest_decode(const char *src, int len, char *dst); -#endif - -/* dirblock.c */ -extern errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block, - void *buf); -extern errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block, - void *buf, int flags); -extern errcode_t ext2fs_read_dir_block3(ext2_filsys fs, blk64_t block, - void *buf, int flags); -extern errcode_t ext2fs_read_dir_block4(ext2_filsys fs, blk64_t block, - void *buf, int flags, ext2_ino_t ino); -extern errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block, - void *buf); -extern errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block, - void *buf, int flags); -extern errcode_t ext2fs_write_dir_block3(ext2_filsys fs, blk64_t block, - void *buf, int flags); -extern errcode_t ext2fs_write_dir_block4(ext2_filsys fs, blk64_t block, - void *buf, int flags, ext2_ino_t ino); - -/* dirhash.c */ -extern errcode_t ext2fs_dirhash(int version, const char *name, int len, - const __u32 *seed, - ext2_dirhash_t *ret_hash, - ext2_dirhash_t *ret_minor_hash); - - -/* dir_iterate.c */ -extern errcode_t ext2fs_get_rec_len(ext2_filsys fs, - struct ext2_dir_entry *dirent, - unsigned int *rec_len); -extern errcode_t ext2fs_set_rec_len(ext2_filsys fs, - unsigned int len, - struct ext2_dir_entry *dirent); -extern errcode_t ext2fs_dir_iterate(ext2_filsys fs, - ext2_ino_t dir, - int flags, - char *block_buf, - int (*func)(struct ext2_dir_entry *dirent, - int offset, - int blocksize, - char *buf, - void *priv_data), - void *priv_data); -extern errcode_t ext2fs_dir_iterate2(ext2_filsys fs, - ext2_ino_t dir, - int flags, - char *block_buf, - int (*func)(ext2_ino_t dir, - int entry, - struct ext2_dir_entry *dirent, - int offset, - int blocksize, - char *buf, - void *priv_data), - void *priv_data); - -/* dupfs.c */ -extern errcode_t ext2fs_dup_handle(ext2_filsys src, ext2_filsys *dest); - -/* expanddir.c */ -extern errcode_t ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir); - -/* ext_attr.c */ -extern __u32 ext2fs_ext_attr_hash_entry(struct ext2_ext_attr_entry *entry, - void *data); -extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf); -extern errcode_t ext2fs_read_ext_attr2(ext2_filsys fs, blk64_t block, - void *buf); -extern errcode_t ext2fs_read_ext_attr3(ext2_filsys fs, blk64_t block, - void *buf, ext2_ino_t inum); -extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, - void *buf); -extern errcode_t ext2fs_write_ext_attr2(ext2_filsys fs, blk64_t block, - void *buf); -extern errcode_t ext2fs_write_ext_attr3(ext2_filsys fs, blk64_t block, - void *buf, ext2_ino_t inum); -extern errcode_t ext2fs_adjust_ea_refcount(ext2_filsys fs, blk_t blk, - char *block_buf, - int adjust, __u32 *newcount); -extern errcode_t ext2fs_adjust_ea_refcount2(ext2_filsys fs, blk64_t blk, - char *block_buf, - int adjust, __u32 *newcount); -extern errcode_t ext2fs_adjust_ea_refcount3(ext2_filsys fs, blk64_t blk, - char *block_buf, - int adjust, __u32 *newcount, - ext2_ino_t inum); -errcode_t ext2fs_xattrs_write(struct ext2_xattr_handle *handle); -errcode_t ext2fs_xattrs_read(struct ext2_xattr_handle *handle); -errcode_t ext2fs_xattrs_iterate(struct ext2_xattr_handle *h, - int (*func)(char *name, char *value, - size_t value_len, void *data), - void *data); -errcode_t ext2fs_xattr_get(struct ext2_xattr_handle *h, const char *key, - void **value, size_t *value_len); -errcode_t ext2fs_xattr_set(struct ext2_xattr_handle *handle, - const char *key, - const void *value, - size_t value_len); -errcode_t ext2fs_xattr_remove(struct ext2_xattr_handle *handle, - const char *key); -errcode_t ext2fs_xattrs_open(ext2_filsys fs, ext2_ino_t ino, - struct ext2_xattr_handle **handle); -errcode_t ext2fs_xattrs_close(struct ext2_xattr_handle **handle); -errcode_t ext2fs_free_ext_attr(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode_large *inode); -errcode_t ext2fs_xattrs_count(struct ext2_xattr_handle *handle, size_t *count); -errcode_t ext2fs_xattr_inode_max_size(ext2_filsys fs, ext2_ino_t ino, - size_t *size); -#define XATTR_HANDLE_FLAG_RAW 0x0001 -errcode_t ext2fs_xattrs_flags(struct ext2_xattr_handle *handle, - unsigned int *new_flags, unsigned int *old_flags); - -/* extent.c */ -extern errcode_t ext2fs_extent_header_verify(void *ptr, int size); -extern errcode_t ext2fs_extent_open(ext2_filsys fs, ext2_ino_t ino, - ext2_extent_handle_t *handle); -extern errcode_t ext2fs_extent_open2(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - ext2_extent_handle_t *ret_handle); -extern void ext2fs_extent_free(ext2_extent_handle_t handle); -extern errcode_t ext2fs_extent_get(ext2_extent_handle_t handle, - int flags, struct ext2fs_extent *extent); -extern errcode_t ext2fs_extent_node_split(ext2_extent_handle_t handle); -extern errcode_t ext2fs_extent_replace(ext2_extent_handle_t handle, int flags, - struct ext2fs_extent *extent); -extern errcode_t ext2fs_extent_insert(ext2_extent_handle_t handle, int flags, - struct ext2fs_extent *extent); -extern errcode_t ext2fs_extent_set_bmap(ext2_extent_handle_t handle, - blk64_t logical, blk64_t physical, - int flags); -extern errcode_t ext2fs_extent_delete(ext2_extent_handle_t handle, int flags); -extern errcode_t ext2fs_extent_get_info(ext2_extent_handle_t handle, - struct ext2_extent_info *info); -extern errcode_t ext2fs_extent_goto(ext2_extent_handle_t handle, - blk64_t blk); -extern errcode_t ext2fs_extent_goto2(ext2_extent_handle_t handle, - int leaf_level, blk64_t blk); -extern errcode_t ext2fs_extent_fix_parents(ext2_extent_handle_t handle); -size_t ext2fs_max_extent_depth(ext2_extent_handle_t handle); - -/* fallocate.c */ -#define EXT2_FALLOCATE_ZERO_BLOCKS (0x1) -#define EXT2_FALLOCATE_FORCE_INIT (0x2) -#define EXT2_FALLOCATE_FORCE_UNINIT (0x4) -#define EXT2_FALLOCATE_INIT_BEYOND_EOF (0x8) -#define EXT2_FALLOCATE_ALL_FLAGS (0xF) -errcode_t ext2fs_fallocate(ext2_filsys fs, int flags, ext2_ino_t ino, - struct ext2_inode *inode, blk64_t goal, - blk64_t start, blk64_t len); - -/* fileio.c */ -extern errcode_t ext2fs_file_open2(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - int flags, ext2_file_t *ret); -extern errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino, - int flags, ext2_file_t *ret); -extern ext2_filsys ext2fs_file_get_fs(ext2_file_t file); -struct ext2_inode *ext2fs_file_get_inode(ext2_file_t file); -extern ext2_ino_t ext2fs_file_get_inode_num(ext2_file_t file); -extern errcode_t ext2fs_file_close(ext2_file_t file); -extern errcode_t ext2fs_file_flush(ext2_file_t file); -extern errcode_t ext2fs_file_read(ext2_file_t file, void *buf, - unsigned int wanted, unsigned int *got); -extern errcode_t ext2fs_file_write(ext2_file_t file, const void *buf, - unsigned int nbytes, unsigned int *written); -extern errcode_t ext2fs_file_llseek(ext2_file_t file, __u64 offset, - int whence, __u64 *ret_pos); -extern errcode_t ext2fs_file_lseek(ext2_file_t file, ext2_off_t offset, - int whence, ext2_off_t *ret_pos); -errcode_t ext2fs_file_get_lsize(ext2_file_t file, __u64 *ret_size); -extern ext2_off_t ext2fs_file_get_size(ext2_file_t file); -extern errcode_t ext2fs_file_set_size(ext2_file_t file, ext2_off_t size); -extern errcode_t ext2fs_file_set_size2(ext2_file_t file, ext2_off64_t size); - -/* finddev.c */ -extern char *ext2fs_find_block_device(dev_t device); - -/* flushb.c */ -extern errcode_t ext2fs_sync_device(int fd, int flushb); - -/* freefs.c */ -extern void ext2fs_free(ext2_filsys fs); -extern void ext2fs_free_dblist(ext2_dblist dblist); -extern void ext2fs_badblocks_list_free(ext2_badblocks_list bb); -extern void ext2fs_u32_list_free(ext2_u32_list bb); - -/* gen_bitmap.c */ -extern void ext2fs_free_generic_bitmap(ext2fs_inode_bitmap bitmap); -extern errcode_t ext2fs_make_generic_bitmap(errcode_t magic, ext2_filsys fs, - __u32 start, __u32 end, - __u32 real_end, - const char *descr, char *init_map, - ext2fs_generic_bitmap *ret); -extern errcode_t ext2fs_allocate_generic_bitmap(__u32 start, - __u32 end, - __u32 real_end, - const char *descr, - ext2fs_generic_bitmap *ret); -extern errcode_t ext2fs_copy_generic_bitmap(ext2fs_generic_bitmap src, - ext2fs_generic_bitmap *dest); -extern void ext2fs_clear_generic_bitmap(ext2fs_generic_bitmap bitmap); -extern errcode_t ext2fs_fudge_generic_bitmap_end(ext2fs_inode_bitmap bitmap, - errcode_t magic, - errcode_t neq, - ext2_ino_t end, - ext2_ino_t *oend); -extern void ext2fs_set_generic_bitmap_padding(ext2fs_generic_bitmap map); -extern errcode_t ext2fs_resize_generic_bitmap(errcode_t magic, - __u32 new_end, - __u32 new_real_end, - ext2fs_generic_bitmap bmap); -extern errcode_t ext2fs_compare_generic_bitmap(errcode_t magic, errcode_t neq, - ext2fs_generic_bitmap bm1, - ext2fs_generic_bitmap bm2); -extern errcode_t ext2fs_get_generic_bitmap_range(ext2fs_generic_bitmap bmap, - errcode_t magic, - __u32 start, __u32 num, - void *out); -extern errcode_t ext2fs_set_generic_bitmap_range(ext2fs_generic_bitmap bmap, - errcode_t magic, - __u32 start, __u32 num, - void *in); -extern errcode_t ext2fs_find_first_zero_generic_bitmap(ext2fs_generic_bitmap bitmap, - __u32 start, __u32 end, - __u32 *out); -extern errcode_t ext2fs_find_first_set_generic_bitmap(ext2fs_generic_bitmap bitmap, - __u32 start, __u32 end, - __u32 *out); - -/* gen_bitmap64.c */ -void ext2fs_free_generic_bmap(ext2fs_generic_bitmap bmap); -errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic, - int type, __u64 start, __u64 end, - __u64 real_end, - const char *descr, - ext2fs_generic_bitmap *ret); -errcode_t ext2fs_copy_generic_bmap(ext2fs_generic_bitmap src, - ext2fs_generic_bitmap *dest); -void ext2fs_clear_generic_bmap(ext2fs_generic_bitmap bitmap); -errcode_t ext2fs_fudge_generic_bmap_end(ext2fs_generic_bitmap bitmap, - errcode_t neq, - __u64 end, __u64 *oend); -void ext2fs_set_generic_bmap_padding(ext2fs_generic_bitmap bmap); -errcode_t ext2fs_resize_generic_bmap(ext2fs_generic_bitmap bmap, - __u64 new_end, - __u64 new_real_end); -errcode_t ext2fs_compare_generic_bmap(errcode_t neq, - ext2fs_generic_bitmap bm1, - ext2fs_generic_bitmap bm2); -errcode_t ext2fs_get_generic_bmap_range(ext2fs_generic_bitmap bmap, - __u64 start, unsigned int num, - void *out); -errcode_t ext2fs_set_generic_bmap_range(ext2fs_generic_bitmap bmap, - __u64 start, unsigned int num, - void *in); -errcode_t ext2fs_convert_subcluster_bitmap(ext2_filsys fs, - ext2fs_block_bitmap *bitmap); - -/* get_num_dirs.c */ -extern errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs); - -/* getsize.c */ -extern errcode_t ext2fs_get_device_size(const char *file, int blocksize, - blk_t *retblocks); -extern errcode_t ext2fs_get_device_size2(const char *file, int blocksize, - blk64_t *retblocks); - -/* getsectsize.c */ -extern int ext2fs_get_dio_alignment(int fd); -errcode_t ext2fs_get_device_sectsize(const char *file, int *sectsize); -errcode_t ext2fs_get_device_phys_sectsize(const char *file, int *sectsize); - -/* i_block.c */ -errcode_t ext2fs_iblk_add_blocks(ext2_filsys fs, struct ext2_inode *inode, - blk64_t num_blocks); -errcode_t ext2fs_iblk_sub_blocks(ext2_filsys fs, struct ext2_inode *inode, - blk64_t num_blocks); -errcode_t ext2fs_iblk_set(ext2_filsys fs, struct ext2_inode *inode, blk64_t b); - -/* imager.c */ -extern errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags); -extern errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, int flags); -extern errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, int flags); -extern errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd, int flags); -extern errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags); -extern errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags); - -/* ind_block.c */ -errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf); -errcode_t ext2fs_write_ind_block(ext2_filsys fs, blk_t blk, void *buf); - -/* initialize.c */ -extern errcode_t ext2fs_initialize(const char *name, int flags, - struct ext2_super_block *param, - io_manager manager, ext2_filsys *ret_fs); - -/* icount.c */ -extern void ext2fs_free_icount(ext2_icount_t icount); -extern errcode_t ext2fs_create_icount_tdb(ext2_filsys fs, char *tdb_dir, - int flags, ext2_icount_t *ret); -extern errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags, - unsigned int size, - ext2_icount_t hint, ext2_icount_t *ret); -extern errcode_t ext2fs_create_icount(ext2_filsys fs, int flags, - unsigned int size, - ext2_icount_t *ret); -extern errcode_t ext2fs_icount_fetch(ext2_icount_t icount, ext2_ino_t ino, - __u16 *ret); -extern errcode_t ext2fs_icount_increment(ext2_icount_t icount, ext2_ino_t ino, - __u16 *ret); -extern errcode_t ext2fs_icount_decrement(ext2_icount_t icount, ext2_ino_t ino, - __u16 *ret); -extern errcode_t ext2fs_icount_store(ext2_icount_t icount, ext2_ino_t ino, - __u16 count); -extern ext2_ino_t ext2fs_get_icount_size(ext2_icount_t icount); -errcode_t ext2fs_icount_validate(ext2_icount_t icount, FILE *); - -/* inline.c */ - -extern errcode_t ext2fs_get_memalign(unsigned long size, - unsigned long align, void *ptr); - -/* inline_data.c */ -extern errcode_t ext2fs_inline_data_init(ext2_filsys fs, ext2_ino_t ino); -extern errcode_t ext2fs_inline_data_size(ext2_filsys fs, ext2_ino_t ino, - size_t *size); -extern errcode_t ext2fs_inline_data_get(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - void *buf, size_t *size); -extern errcode_t ext2fs_inline_data_set(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - void *buf, size_t size); - -/* inode.c */ -extern errcode_t ext2fs_create_inode_cache(ext2_filsys fs, - unsigned int cache_size); -extern void ext2fs_free_inode_cache(struct ext2_inode_cache *icache); -extern errcode_t ext2fs_flush_icache(ext2_filsys fs); -extern errcode_t ext2fs_get_next_inode_full(ext2_inode_scan scan, - ext2_ino_t *ino, - struct ext2_inode *inode, - int bufsize); -#define EXT2_INODE_SCAN_DEFAULT_BUFFER_BLOCKS 8 -extern errcode_t ext2fs_open_inode_scan(ext2_filsys fs, int buffer_blocks, - ext2_inode_scan *ret_scan); -extern void ext2fs_close_inode_scan(ext2_inode_scan scan); -extern errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ext2_ino_t *ino, - struct ext2_inode *inode); -extern errcode_t ext2fs_inode_scan_goto_blockgroup(ext2_inode_scan scan, - int group); -extern void ext2fs_set_inode_callback - (ext2_inode_scan scan, - errcode_t (*done_group)(ext2_filsys fs, - ext2_inode_scan scan, - dgrp_t group, - void * priv_data), - void *done_group_data); -extern int ext2fs_inode_scan_flags(ext2_inode_scan scan, int set_flags, - int clear_flags); -extern errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode * inode, - int bufsize); -extern errcode_t ext2fs_read_inode (ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode * inode); -extern errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode * inode, - int bufsize); -extern errcode_t ext2fs_write_inode(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode * inode); -extern errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode * inode); -extern errcode_t ext2fs_get_blocks(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks); -extern errcode_t ext2fs_check_directory(ext2_filsys fs, ext2_ino_t ino); - -/* inode_io.c */ -extern io_manager inode_io_manager; -extern errcode_t ext2fs_inode_io_intern(ext2_filsys fs, ext2_ino_t ino, - char **name); -extern errcode_t ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - char **name); - -/* ismounted.c */ -extern errcode_t ext2fs_check_if_mounted(const char *file, int *mount_flags); -extern errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags, - char *mtpt, int mtlen); - -/* punch.c */ -/* - * NOTE: This function removes from an inode the blocks "start", "end", and - * every block in between. - */ -extern errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino, - struct ext2_inode *inode, - char *block_buf, blk64_t start, - blk64_t end); - -/* namei.c */ -extern errcode_t ext2fs_lookup(ext2_filsys fs, ext2_ino_t dir, const char *name, - int namelen, char *buf, ext2_ino_t *inode); -extern errcode_t ext2fs_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, - const char *name, ext2_ino_t *inode); -errcode_t ext2fs_namei_follow(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, - const char *name, ext2_ino_t *inode); -extern errcode_t ext2fs_follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd, - ext2_ino_t inode, ext2_ino_t *res_inode); - -/* native.c */ -int ext2fs_native_flag(void); - -/* newdir.c */ -extern errcode_t ext2fs_new_dir_block(ext2_filsys fs, ext2_ino_t dir_ino, - ext2_ino_t parent_ino, char **block); -extern errcode_t ext2fs_new_dir_inline_data(ext2_filsys fs, ext2_ino_t dir_ino, - ext2_ino_t parent_ino, __u32 *iblock); - -/* mkdir.c */ -extern errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum, - const char *name); - -/* mkjournal.c */ -extern errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num, - blk_t *ret_blk, int *ret_count); -extern errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num, - blk64_t *ret_blk, int *ret_count); -extern errcode_t ext2fs_create_journal_superblock(ext2_filsys fs, - __u32 num_blocks, int flags, - char **ret_jsb); -extern errcode_t ext2fs_add_journal_device(ext2_filsys fs, - ext2_filsys journal_dev); -extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks, - int flags); -extern errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks, - blk64_t goal, int flags); -extern int ext2fs_default_journal_size(__u64 num_blocks); -extern int ext2fs_journal_sb_start(int blocksize); - -/* openfs.c */ -extern errcode_t ext2fs_open(const char *name, int flags, int superblock, - unsigned int block_size, io_manager manager, - ext2_filsys *ret_fs); -extern errcode_t ext2fs_open2(const char *name, const char *io_options, - int flags, int superblock, - unsigned int block_size, io_manager manager, - ext2_filsys *ret_fs); -/* - * The dgrp_t argument to these two functions is not actually a group number - * but a block number offset within a group table! Convert with the formula - * (group_number / groups_per_block). - */ -extern blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs, - blk64_t group_block, dgrp_t i); -extern blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block, - dgrp_t i); -errcode_t ext2fs_get_data_io(ext2_filsys fs, io_channel *old_io); -errcode_t ext2fs_set_data_io(ext2_filsys fs, io_channel new_io); -errcode_t ext2fs_rewrite_to_io(ext2_filsys fs, io_channel new_io); - -/* get_pathname.c */ -extern errcode_t ext2fs_get_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino, - char **name); - -/* link.c */ -errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name, - ext2_ino_t ino, int flags); -errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir, const char *name, - ext2_ino_t ino, int flags); - -/* symlink.c */ -errcode_t ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino, - const char *name, const char *target); - -/* mmp.c */ -errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf); -errcode_t ext2fs_mmp_write(ext2_filsys fs, blk64_t mmp_blk, void *buf); -errcode_t ext2fs_mmp_clear(ext2_filsys fs); -errcode_t ext2fs_mmp_init(ext2_filsys fs); -errcode_t ext2fs_mmp_start(ext2_filsys fs); -errcode_t ext2fs_mmp_update(ext2_filsys fs); -errcode_t ext2fs_mmp_update2(ext2_filsys fs, int immediately); -errcode_t ext2fs_mmp_stop(ext2_filsys fs); -unsigned ext2fs_mmp_new_seq(void); - -/* read_bb.c */ -extern errcode_t ext2fs_read_bb_inode(ext2_filsys fs, - ext2_badblocks_list *bb_list); - -/* read_bb_file.c */ -extern errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f, - ext2_badblocks_list *bb_list, - void *priv_data, - void (*invalid)(ext2_filsys fs, - blk_t blk, - char *badstr, - void *priv_data)); -extern errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f, - ext2_badblocks_list *bb_list, - void (*invalid)(ext2_filsys fs, - blk_t blk)); - -/* res_gdt.c */ -extern errcode_t ext2fs_create_resize_inode(ext2_filsys fs); - -/*sha256.c */ -#define EXT2FS_SHA256_LENGTH 32 -#if 0 -extern void ext2fs_sha256(const unsigned char *in, unsigned long in_size, - unsigned char out[EXT2FS_SHA256_LENGTH]); -#endif - -/* sha512.c */ -#define EXT2FS_SHA512_LENGTH 64 -extern void ext2fs_sha512(const unsigned char *in, unsigned long in_size, - unsigned char out[EXT2FS_SHA512_LENGTH]); - -/* swapfs.c */ -extern errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf, size_t size, - int flags); -extern errcode_t ext2fs_dirent_swab_in(ext2_filsys fs, char *buf, int flags); -extern errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char *buf, size_t size, - int flags); -extern errcode_t ext2fs_dirent_swab_out(ext2_filsys fs, char *buf, int flags); -extern void ext2fs_swap_ext_attr(char *to, char *from, int bufsize, - int has_header); -extern void ext2fs_swap_ext_attr_header(struct ext2_ext_attr_header *to_header, - struct ext2_ext_attr_header *from_hdr); -extern void ext2fs_swap_ext_attr_entry(struct ext2_ext_attr_entry *to_entry, - struct ext2_ext_attr_entry *from_entry); -extern void ext2fs_swap_super(struct ext2_super_block * super); -extern void ext2fs_swap_group_desc(struct ext2_group_desc *gdp); -extern void ext2fs_swap_group_desc2(ext2_filsys, struct ext2_group_desc *gdp); -extern void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t, - struct ext2_inode_large *f, int hostorder, - int bufsize); -extern void ext2fs_swap_inode(ext2_filsys fs,struct ext2_inode *t, - struct ext2_inode *f, int hostorder); -extern void ext2fs_swap_mmp(struct mmp_struct *mmp); - -/* unix_io.c */ -extern int ext2fs_open_file(const char *pathname, int flags, mode_t mode); -extern int ext2fs_stat(const char *path, ext2fs_struct_stat *buf); -extern int ext2fs_fstat(int fd, ext2fs_struct_stat *buf); - -/* valid_blk.c */ -extern int ext2fs_inode_has_valid_blocks(struct ext2_inode *inode); -extern int ext2fs_inode_has_valid_blocks2(ext2_filsys fs, - struct ext2_inode *inode); - -/* version.c */ -extern int ext2fs_parse_version_string(const char *ver_string); -extern int ext2fs_get_library_version(const char **ver_string, - const char **date_string); - -/* write_bb_file.c */ -extern errcode_t ext2fs_write_bb_FILE(ext2_badblocks_list bb_list, - unsigned int flags, - FILE *f); - - -/* inline functions */ -#ifdef NO_INLINE_FUNCS -extern errcode_t ext2fs_get_mem(unsigned long size, void *ptr); -extern errcode_t ext2fs_get_memzero(unsigned long size, void *ptr); -extern errcode_t ext2fs_get_array(unsigned long count, - unsigned long size, void *ptr); -extern errcode_t ext2fs_get_arrayzero(unsigned long count, - unsigned long size, void *ptr); -extern errcode_t ext2fs_free_mem(void *ptr); -extern errcode_t ext2fs_resize_mem(unsigned long old_size, - unsigned long size, void *ptr); -extern void ext2fs_mark_super_dirty(ext2_filsys fs); -extern void ext2fs_mark_changed(ext2_filsys fs); -extern int ext2fs_test_changed(ext2_filsys fs); -extern void ext2fs_mark_valid(ext2_filsys fs); -extern void ext2fs_unmark_valid(ext2_filsys fs); -extern int ext2fs_test_valid(ext2_filsys fs); -extern void ext2fs_mark_ib_dirty(ext2_filsys fs); -extern void ext2fs_mark_bb_dirty(ext2_filsys fs); -extern int ext2fs_test_ib_dirty(ext2_filsys fs); -extern int ext2fs_test_bb_dirty(ext2_filsys fs); -extern dgrp_t ext2fs_group_of_blk(ext2_filsys fs, blk_t blk); -extern dgrp_t ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino); -extern blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group); -extern blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group); -extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs, - struct ext2_inode *inode); -extern unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b); -extern __u64 ext2fs_div64_ceil(__u64 a, __u64 b); -extern int ext2fs_dirent_name_len(const struct ext2_dir_entry *entry); -extern void ext2fs_dirent_set_name_len(struct ext2_dir_entry *entry, int len); -extern int ext2fs_dirent_file_type(const struct ext2_dir_entry *entry); -extern void ext2fs_dirent_set_file_type(struct ext2_dir_entry *entry, int type); -extern struct ext2_inode *ext2fs_inode(struct ext2_inode_large * large_inode); -extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large * large_inode); - -#endif - -/* - * The actual inlined functions definitions themselves... - * - * If NO_INLINE_FUNCS is defined, then we won't try to do inline - * functions at all! - */ -#if (defined(INCLUDE_INLINE_FUNCS) || !defined(NO_INLINE_FUNCS)) -#ifdef INCLUDE_INLINE_FUNCS -#define _INLINE_ extern -#else -#if (__STDC_VERSION__ >= 199901L) -#define _INLINE_ inline -#else -#ifdef __GNUC__ -#define _INLINE_ extern __inline__ -#else /* For Watcom C */ -#define _INLINE_ extern inline -#endif /* __GNUC__ */ -#endif /* __STDC_VERSION__ >= 199901L */ -#endif - -#ifndef EXT2_CUSTOM_MEMORY_ROUTINES -#include -/* - * Allocate memory. The 'ptr' arg must point to a pointer. - */ -_INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void *ptr) -{ - void *pp; - - pp = malloc(size); - if (!pp) - return EXT2_ET_NO_MEMORY; - memcpy(ptr, &pp, sizeof (pp)); - return 0; -} - -_INLINE_ errcode_t ext2fs_get_memzero(unsigned long size, void *ptr) -{ - void *pp; - - pp = malloc(size); - if (!pp) - return EXT2_ET_NO_MEMORY; - memset(pp, 0, size); - memcpy(ptr, &pp, sizeof(pp)); - return 0; -} - -_INLINE_ errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr) -{ - if (count && (~0UL)/count < size) - return EXT2_ET_NO_MEMORY; - return ext2fs_get_mem(count*size, ptr); -} - -_INLINE_ errcode_t ext2fs_get_arrayzero(unsigned long count, - unsigned long size, void *ptr) -{ - void *pp; - - if (count && (~0UL)/count < size) - return EXT2_ET_NO_MEMORY; - pp = calloc(count, size); - if (!pp) - return EXT2_ET_NO_MEMORY; - memcpy(ptr, &pp, sizeof(pp)); - return 0; -} - -/* - * Free memory. The 'ptr' arg must point to a pointer. - */ -_INLINE_ errcode_t ext2fs_free_mem(void *ptr) -{ - void *p; - - memcpy(&p, ptr, sizeof(p)); - free(p); - p = 0; - memcpy(ptr, &p, sizeof(p)); - return 0; -} - -/* - * Resize memory. The 'ptr' arg must point to a pointer. - */ -_INLINE_ errcode_t ext2fs_resize_mem(unsigned long EXT2FS_ATTR((unused)) old_size, - unsigned long size, void *ptr) -{ - void *p; - - /* Use "memcpy" for pointer assignments here to avoid problems - * with C99 strict type aliasing rules. */ - memcpy(&p, ptr, sizeof(p)); - p = realloc(p, size); - if (!p) - return EXT2_ET_NO_MEMORY; - memcpy(ptr, &p, sizeof(p)); - return 0; -} -#endif /* Custom memory routines */ - -/* - * Mark a filesystem superblock as dirty - */ -_INLINE_ void ext2fs_mark_super_dirty(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_DIRTY | EXT2_FLAG_CHANGED; -} - -/* - * Mark a filesystem as changed - */ -_INLINE_ void ext2fs_mark_changed(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_CHANGED; -} - -/* - * Check to see if a filesystem has changed - */ -_INLINE_ int ext2fs_test_changed(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_CHANGED); -} - -/* - * Mark a filesystem as valid - */ -_INLINE_ void ext2fs_mark_valid(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_VALID; -} - -/* - * Mark a filesystem as NOT valid - */ -_INLINE_ void ext2fs_unmark_valid(ext2_filsys fs) -{ - fs->flags &= ~EXT2_FLAG_VALID; -} - -/* - * Check to see if a filesystem is valid - */ -_INLINE_ int ext2fs_test_valid(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_VALID); -} - -/* - * Mark the inode bitmap as dirty - */ -_INLINE_ void ext2fs_mark_ib_dirty(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_IB_DIRTY | EXT2_FLAG_CHANGED; -} - -/* - * Mark the block bitmap as dirty - */ -_INLINE_ void ext2fs_mark_bb_dirty(ext2_filsys fs) -{ - fs->flags |= EXT2_FLAG_BB_DIRTY | EXT2_FLAG_CHANGED; -} - -/* - * Check to see if a filesystem's inode bitmap is dirty - */ -_INLINE_ int ext2fs_test_ib_dirty(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_IB_DIRTY); -} - -/* - * Check to see if a filesystem's block bitmap is dirty - */ -_INLINE_ int ext2fs_test_bb_dirty(ext2_filsys fs) -{ - return (fs->flags & EXT2_FLAG_BB_DIRTY); -} - -/* - * Return the group # of a block - */ -_INLINE_ dgrp_t ext2fs_group_of_blk(ext2_filsys fs, blk_t blk) -{ - return ext2fs_group_of_blk2(fs, blk); -} -/* - * Return the group # of an inode number - */ -_INLINE_ dgrp_t ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino) -{ - return (ino - 1) / fs->super->s_inodes_per_group; -} - -/* - * Return the first block (inclusive) in a group - */ -_INLINE_ blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group) -{ - return (blk_t) ext2fs_group_first_block2(fs, group); -} - -/* - * Return the last block (inclusive) in a group - */ -_INLINE_ blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group) -{ - return (blk_t) ext2fs_group_last_block2(fs, group); -} - -_INLINE_ blk_t ext2fs_inode_data_blocks(ext2_filsys fs, - struct ext2_inode *inode) -{ - return (blk_t) ext2fs_inode_data_blocks2(fs, inode); -} - -/* - * This is an efficient, overflow safe way of calculating ceil((1.0 * a) / b) - */ -_INLINE_ unsigned int ext2fs_div_ceil(unsigned int a, unsigned int b) -{ - if (!a) - return 0; - return ((a - 1) / b) + 1; -} - -_INLINE_ __u64 ext2fs_div64_ceil(__u64 a, __u64 b) -{ - if (!a) - return 0; - return ((a - 1) / b) + 1; -} - -_INLINE_ int ext2fs_dirent_name_len(const struct ext2_dir_entry *entry) -{ - return entry->name_len & 0xff; -} - -_INLINE_ void ext2fs_dirent_set_name_len(struct ext2_dir_entry *entry, int len) -{ - entry->name_len = (entry->name_len & 0xff00) | (len & 0xff); -} - -_INLINE_ int ext2fs_dirent_file_type(const struct ext2_dir_entry *entry) -{ - return entry->name_len >> 8; -} - -_INLINE_ void ext2fs_dirent_set_file_type(struct ext2_dir_entry *entry, int type) -{ - entry->name_len = (entry->name_len & 0xff) | (type << 8); -} - -_INLINE_ struct ext2_inode *ext2fs_inode(struct ext2_inode_large * large_inode) -{ - /* It is always safe to convert large inode to a small inode */ - return (struct ext2_inode *) large_inode; -} - -_INLINE_ const struct ext2_inode * -ext2fs_const_inode(const struct ext2_inode_large * large_inode) -{ - /* It is always safe to convert large inode to a small inode */ - return (const struct ext2_inode *) large_inode; -} - -#undef _INLINE_ -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _EXT2FS_EXT2FS_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext3_extents.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext3_extents.h deleted file mode 100644 index 309fbc8..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/ext3_extents.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2003,2004 Cluster File Systems, Inc, info@clusterfs.com - * Written by Alex Tomas - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Library - * General Public License, version 2. - * %End-Header% - */ - -#ifndef _LINUX_EXT3_EXTENTS -#define _LINUX_EXT3_EXTENTS - -/* - * ext3_inode has i_block array (total 60 bytes) - * first 4 bytes are used to store: - * - tree depth (0 mean there is no tree yet. all extents in the inode) - * - number of alive extents in the inode - */ - -/* - * This is extent tail on-disk structure. - * All other extent structures are 12 bytes long. It turns out that - * block_size % 12 >= 4 for at least all powers of 2 greater than 512, which - * covers all valid ext4 block sizes. Therefore, this tail structure can be - * crammed into the end of the block without having to rebalance the tree. - */ -struct ext3_extent_tail { - __le32 et_checksum; /* crc32c(uuid+inum+extent_block) */ -}; - -/* - * this is extent on-disk structure - * it's used at the bottom of the tree - */ -struct ext3_extent { - __le32 ee_block; /* first logical block extent covers */ - __le16 ee_len; /* number of blocks covered by extent */ - __le16 ee_start_hi; /* high 16 bits of physical block */ - __le32 ee_start; /* low 32 bigs of physical block */ -}; - -/* - * this is index on-disk structure - * it's used at all the levels, but the bottom - */ -struct ext3_extent_idx { - __le32 ei_block; /* index covers logical blocks from 'block' */ - __le32 ei_leaf; /* pointer to the physical block of the next * - * level. leaf or next index could bet here */ - __le16 ei_leaf_hi; /* high 16 bits of physical block */ - __le16 ei_unused; -}; - -/* - * each block (leaves and indexes), even inode-stored has header - */ -struct ext3_extent_header { - __le16 eh_magic; /* probably will support different formats */ - __le16 eh_entries; /* number of valid entries */ - __le16 eh_max; /* capacity of store in entries */ - __le16 eh_depth; /* has tree real underlying blocks? */ - __le32 eh_generation; /* generation of the tree */ -}; - -#define EXT3_EXT_MAGIC 0xf30a - -/* - * array of ext3_ext_path contains path to some extent - * creation/lookup routines use it for traversal/splitting/etc - * truncate uses it to simulate recursive walking - */ -struct ext3_ext_path { - __u32 p_block; - __u16 p_depth; - struct ext3_extent *p_ext; - struct ext3_extent_idx *p_idx; - struct ext3_extent_header *p_hdr; - struct buffer_head *p_bh; -}; - -/* - * EXT_INIT_MAX_LEN is the maximum number of blocks we can have in an - * initialized extent. This is 2^15 and not (2^16 - 1), since we use the - * MSB of ee_len field in the extent datastructure to signify if this - * particular extent is an initialized extent or an uninitialized (i.e. - * preallocated). - * EXT_UNINIT_MAX_LEN is the maximum number of blocks we can have in an - * uninitialized extent. - * If ee_len is <= 0x8000, it is an initialized extent. Otherwise, it is an - * uninitialized one. In other words, if MSB of ee_len is set, it is an - * uninitialized extent with only one special scenario when ee_len = 0x8000. - * In this case we can not have an uninitialized extent of zero length and - * thus we make it as a special case of initialized extent with 0x8000 length. - * This way we get better extent-to-group alignment for initialized extents. - * Hence, the maximum number of blocks we can have in an *initialized* - * extent is 2^15 (32768) and in an *uninitialized* extent is 2^15-1 (32767). - */ -#define EXT_INIT_MAX_LEN (1UL << 15) -#define EXT_UNINIT_MAX_LEN (EXT_INIT_MAX_LEN - 1) -#define EXT_MAX_EXTENT_LBLK (((__u64) 1 << 32) - 1) -#define EXT_MAX_EXTENT_PBLK (((__u64) 1 << 48) - 1) - -#define EXT_FIRST_EXTENT(__hdr__) \ - ((struct ext3_extent *) (((char *) (__hdr__)) + \ - sizeof(struct ext3_extent_header))) -#define EXT_FIRST_INDEX(__hdr__) \ - ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ - sizeof(struct ext3_extent_header))) -#define EXT_HAS_FREE_INDEX(__path__) \ - (ext2fs_le16_to_cpu((__path__)->p_hdr->eh_entries) < \ - ext2fs_le16_to_cpu((__path__)->p_hdr->eh_max)) -#define EXT_LAST_EXTENT(__hdr__) \ - (EXT_FIRST_EXTENT((__hdr__)) + \ - ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1) -#define EXT_LAST_INDEX(__hdr__) \ - (EXT_FIRST_INDEX((__hdr__)) + \ - ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1) -#define EXT_MAX_EXTENT(__hdr__) \ - (EXT_FIRST_EXTENT((__hdr__)) + \ - ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1) -#define EXT_MAX_INDEX(__hdr__) \ - (EXT_FIRST_INDEX((__hdr__)) + \ - ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1) - -#endif /* _LINUX_EXT3_EXTENTS */ - diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/qcow2.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/qcow2.h deleted file mode 100644 index 81e0ec9..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/qcow2.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * qcow2.h --- structures and function prototypes for qcow2.c to generate - * qcow2 formatted disk images. This format is used originally by QEMU - * for virtual machines, and stores the filesystem data on disk in a - * packed format to avoid creating sparse image files that need lots of - * seeking to read and write. - * - * The qcow2 format supports zlib compression, but that is not yet - * implemented. - * - * It is possible to directly mount a qcow2 image using qemu-nbd: - * - * [root]# modprobe nbd max_part=63 - * [root]# qemu-nbd -c /dev/nbd0 image.img - * [root]# mount /dev/nbd0p1 /mnt/qemu - * - * Format details at http://people.gnome.org/~markmc/qcow-image-format.html - * - * Copyright (C) 2010 Red Hat, Inc., Lukas Czerner - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Public - * License. - * %End-Header% - */ - -/* Number of l2 tables in memory before writeback */ -#define L2_CACHE_PREALLOC 512 - - -#define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb) -#define QCOW_VERSION 2 -#define QCOW_OFLAG_COPIED (1LL << 63) -#define QCOW_OFLAG_COMPRESSED (1LL << 62) - -#define QCOW_COMPRESSED 1 -#define QCOW_ENCRYPTED 2 - -struct ext2_qcow2_hdr { - __u32 magic; - __u32 version; - - __u64 backing_file_offset; - __u32 backing_file_size; - - __u32 cluster_bits; - __u64 size; - __u32 crypt_method; - - __u32 l1_size; - __u64 l1_table_offset; - - __u64 refcount_table_offset; - __u32 refcount_table_clusters; - - __u32 nb_snapshots; - __u64 snapshots_offset; -}; - -typedef struct ext2_qcow2_l2_table L2_CACHE_HEAD; - -struct ext2_qcow2_l2_table { - __u32 l1_index; - __u64 offset; - __u64 *data; - L2_CACHE_HEAD *next; -}; - -struct ext2_qcow2_l2_cache { - L2_CACHE_HEAD *used_head; - L2_CACHE_HEAD *used_tail; - L2_CACHE_HEAD *free_head; - __u32 free; - __u32 count; - __u64 next_offset; -}; - -struct ext2_qcow2_refcount { - __u64 *refcount_table; - __u64 refcount_table_offset; - __u64 refcount_block_offset; - - __u32 refcount_table_clusters; - __u32 refcount_table_index; - __u32 refcount_block_index; - - __u16 *refcount_block; -}; - -struct ext2_qcow2_image { - int fd; - struct ext2_qcow2_hdr *hdr; - struct ext2_qcow2_l2_cache *l2_cache; - struct ext2_qcow2_refcount refcount; - __u32 cluster_size; - __u32 cluster_bits; - __u32 l1_size; - __u32 l2_size; - - __u64 *l1_table; - __u64 l2_offset; - __u64 l1_offset; - __u64 image_size; -}; - -/* Function prototypes */ - -/* qcow2.c */ - -/* Functions for converting qcow2 image into raw image */ -struct ext2_qcow2_hdr *qcow2_read_header(int); -int qcow2_write_raw_image(int, int, struct ext2_qcow2_hdr *); - diff --git a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/tdb.h b/dingux/opt/mipsel-linux-uclibc/include/ext2fs/tdb.h deleted file mode 100644 index 6a4086c..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/ext2fs/tdb.h +++ /dev/null @@ -1,215 +0,0 @@ -#ifndef __TDB_H__ -#define __TDB_H__ - -/* - Unix SMB/CIFS implementation. - - trivial database library - - Copyright (C) Andrew Tridgell 1999-2004 - - ** NOTE! The following LGPL license applies to the tdb - ** library. This does NOT imply that all of Samba is released - ** under the LGPL - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* flags to tdb_store() */ -#define TDB_REPLACE 1 -#define TDB_INSERT 2 -#define TDB_MODIFY 3 - -/* flags for tdb_open() */ -#define TDB_DEFAULT 0 /* just a readability place holder */ -#define TDB_CLEAR_IF_FIRST 1 -#define TDB_INTERNAL 2 /* don't store on disk */ -#define TDB_NOLOCK 4 /* don't do any locking */ -#define TDB_NOMMAP 8 /* don't use mmap */ -#define TDB_CONVERT 16 /* convert endian (internal use) */ -#define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */ -#define TDB_NOSYNC 64 /* don't use synchronous transactions */ -#define TDB_SEQNUM 128 /* maintain a sequence number */ - -#define TDB_ERRCODE(code, ret) ((tdb->ecode = (code)), ret) - -/* error codes */ -enum TDB_ERROR {TDB_SUCCESS=0, TDB_ERR_CORRUPT, TDB_ERR_IO, TDB_ERR_LOCK, - TDB_ERR_OOM, TDB_ERR_EXISTS, TDB_ERR_NOLOCK, TDB_ERR_LOCK_TIMEOUT, - TDB_ERR_NOEXIST, TDB_ERR_EINVAL, TDB_ERR_RDONLY}; - -/* debugging uses one of the following levels */ -enum tdb_debug_level {TDB_DEBUG_FATAL = 0, TDB_DEBUG_ERROR, - TDB_DEBUG_WARNING, TDB_DEBUG_TRACE}; - -typedef struct TDB_DATA { - unsigned char *dptr; - size_t dsize; -} TDB_DATA; - -#ifndef PRINTF_ATTRIBUTE -#if (__GNUC__ >= 3) -/** Use gcc attribute to check printf fns. a1 is the 1-based index of - * the parameter containing the format, and a2 the index of the first - * argument. Note that some gcc 2.x versions don't handle this - * properly **/ -#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) -#else -#define PRINTF_ATTRIBUTE(a1, a2) -#endif -#endif - -/* ext2fs tdb renames */ -#define tdb_open ext2fs_tdb_open -#define tdb_open_ex ext2fs_tdb_open_ex -#define tdb_set_max_dead ext2fs_tdb_set_max_dead -#define tdb_reopen ext2fs_tdb_reopen -#define tdb_reopen_all ext2fs_tdb_reopen_all -#define tdb_set_logging_function ext2fs_tdb_set_logging_function -#define tdb_error ext2fs_tdb_error -#define tdb_errorstr ext2fs_tdb_errorstr -#define tdb_fetch ext2fs_tdb_fetch -#define tdb_parse_record ext2fs_tdb_parse_record -#define tdb_delete ext2fs_tdb_delete -#define tdb_store ext2fs_tdb_store -#define tdb_append ext2fs_tdb_append -#define tdb_close ext2fs_tdb_close -#define tdb_firstkey ext2fs_tdb_firstkey -#define tdb_nextkey ext2fs_tdb_nextkey -#define tdb_traverse ext2fs_tdb_traverse -#define tdb_traverse_read ext2fs_tdb_traverse_read -#define tdb_exists ext2fs_tdb_exists -#define tdb_lockall ext2fs_tdb_lockall -#define tdb_unlockall ext2fs_tdb_unlockall -#define tdb_lockall_read ext2fs_tdb_lockall_read -#define tdb_unlockall_read ext2fs_tdb_unlockall_read -#define tdb_name ext2fs_tdb_name -#define tdb_fd ext2fs_tdb_fd -#define tdb_log_fn ext2fs_tdb_log_fn -#define tdb_get_logging_private ext2fs_tdb_get_logging_private -#define tdb_transaction_start ext2fs_tdb_transaction_start -#define tdb_transaction_commit ext2fs_tdb_transaction_commit -#define tdb_transaction_cancel ext2fs_tdb_transaction_cancel -#define tdb_transaction_recover ext2fs_tdb_transaction_recover -#define tdb_get_seqnum ext2fs_tdb_get_seqnum -#define tdb_hash_size ext2fs_tdb_hash_size -#define tdb_map_size ext2fs_tdb_map_size -#define tdb_get_flags ext2fs_tdb_get_flags -#define tdb_chainlock ext2fs_tdb_chainlock -#define tdb_chainunlock ext2fs_tdb_chainunlock -#define tdb_chainlock_read ext2fs_tdb_chainlock_read -#define tdb_chainunlock_read ext2fs_tdb_chainunlock_read -#define tdb_dump_all ext2fs_tdb_dump_all -#define tdb_printfreelist ext2fs_tdb_printfreelist -#define tdb_validate_freelist ext2fs_tdb_validate_freelist -#define tdb_chainlock_mark ext2fs_tdb_chainlock_mark -#define tdb_chainlock_nonblock ext2fs_tdb_chainlock_nonblock -#define tdb_chainlock_unmark ext2fs_tdb_chainlock_unmark -#define tdb_enable_seqnum ext2fs_tdb_enable_seqnum -#define tdb_increment_seqnum_nonblock ext2fs_tdb_increment_seqnum_nonblock -#define tdb_lock_nonblock ext2fs_tdb_lock_nonblock -#define tdb_lockall_mark ext2fs_tdb_lockall_mark -#define tdb_lockall_nonblock ext2fs_tdb_lockall_nonblock -#define tdb_lockall_read_nonblock ext2fs_tdb_lockall_read_nonblock -#define tdb_lockall_unmark ext2fs_tdb_lockall_unmark -#define tdb_flush ext2fs_tdb_flush - -/* this is the context structure that is returned from a db open */ -typedef struct tdb_context TDB_CONTEXT; - -typedef int (*tdb_traverse_func)(struct tdb_context *, TDB_DATA, TDB_DATA, void *); -typedef void (*tdb_log_func)(struct tdb_context *, enum tdb_debug_level, const char *, ...) PRINTF_ATTRIBUTE(3, 4); -typedef unsigned int (*tdb_hash_func)(TDB_DATA *key); - -struct tdb_logging_context { - tdb_log_func log_fn; - void *log_private; -}; - -struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode); -struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode, - const struct tdb_logging_context *log_ctx, - tdb_hash_func hash_fn); -void tdb_set_max_dead(struct tdb_context *tdb, int max_dead); - -int tdb_reopen(struct tdb_context *tdb); -int tdb_reopen_all(int parent_longlived); -void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx); -enum TDB_ERROR tdb_error(struct tdb_context *tdb); -const char *tdb_errorstr(struct tdb_context *tdb); -TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key); -int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key, - int (*parser)(TDB_DATA key, TDB_DATA data, - void *private_data), - void *private_data); -int tdb_delete(struct tdb_context *tdb, TDB_DATA key); -int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag); -int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf); -int tdb_close(struct tdb_context *tdb); -TDB_DATA tdb_firstkey(struct tdb_context *tdb); -TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key); -int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *); -int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *); -int tdb_exists(struct tdb_context *tdb, TDB_DATA key); -int tdb_lockall(struct tdb_context *tdb); -int tdb_lockall_nonblock(struct tdb_context *tdb); -int tdb_unlockall(struct tdb_context *tdb); -int tdb_lockall_read(struct tdb_context *tdb); -int tdb_lockall_read_nonblock(struct tdb_context *tdb); -int tdb_unlockall_read(struct tdb_context *tdb); -int tdb_lockall_mark(struct tdb_context *tdb); -int tdb_lockall_unmark(struct tdb_context *tdb); -const char *tdb_name(struct tdb_context *tdb); -int tdb_fd(struct tdb_context *tdb); -tdb_log_func tdb_log_fn(struct tdb_context *tdb); -void *tdb_get_logging_private(struct tdb_context *tdb); -int tdb_transaction_start(struct tdb_context *tdb); -int tdb_transaction_commit(struct tdb_context *tdb); -int tdb_transaction_cancel(struct tdb_context *tdb); -int tdb_transaction_recover(struct tdb_context *tdb); -int tdb_get_seqnum(struct tdb_context *tdb); -int tdb_hash_size(struct tdb_context *tdb); -size_t tdb_map_size(struct tdb_context *tdb); -int tdb_get_flags(struct tdb_context *tdb); -void tdb_enable_seqnum(struct tdb_context *tdb); -void tdb_increment_seqnum_nonblock(struct tdb_context *tdb); -int tdb_flush(struct tdb_context *tdb); - -/* Low level locking functions: use with care */ -int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key); -int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key); -int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key); -int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key); -int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key); -int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key); -int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key); - -/* Debug functions. Not used in production. */ -void tdb_dump_all(struct tdb_context *tdb); -int tdb_printfreelist(struct tdb_context *tdb); -int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries); - -#ifdef __cplusplus -} -#endif - -#endif /* tdb.h */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/gdb/jit-reader.h b/dingux/opt/mipsel-linux-uclibc/include/gdb/jit-reader.h deleted file mode 100644 index 777d0d7..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/gdb/jit-reader.h +++ /dev/null @@ -1,346 +0,0 @@ -/* JIT declarations for GDB, the GNU Debugger. - - Copyright (C) 2011-2016 Free Software Foundation, Inc. - - This file is part of GDB. - - 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 3 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, see . */ - -#ifndef GDB_JIT_READER_H -#define GDB_JIT_READER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Versioning information. See gdb_reader_funcs. */ - -#define GDB_READER_INTERFACE_VERSION 1 - -/* Readers must be released under a GPL compatible license. To - declare that the reader is indeed released under a GPL compatible - license, invoke the macro GDB_DECLARE_GPL_COMPATIBLE in a source - file. */ - -#ifdef __cplusplus -#define GDB_DECLARE_GPL_COMPATIBLE_READER \ - extern "C" { \ - extern int plugin_is_GPL_compatible (void); \ - extern int plugin_is_GPL_compatible (void) \ - { \ - return 0; \ - } \ - } - -#else - -#define GDB_DECLARE_GPL_COMPATIBLE_READER \ - extern int plugin_is_GPL_compatible (void); \ - extern int plugin_is_GPL_compatible (void) \ - { \ - return 0; \ - } - -#endif - -/* Represents an address on the target system. */ - -typedef unsigned long GDB_CORE_ADDR; - -/* Return status codes. */ - -enum gdb_status { - GDB_FAIL = 0, - GDB_SUCCESS = 1 -}; - -struct gdb_object; -struct gdb_symtab; -struct gdb_block; -struct gdb_symbol_callbacks; - -/* An array of these are used to represent a map from code addresses to line - numbers in the source file. */ - -struct gdb_line_mapping -{ - int line; - GDB_CORE_ADDR pc; -}; - -/* Create a new GDB code object. Each code object can have one or - more symbol tables, each representing a compiled source file. */ - -typedef struct gdb_object *(gdb_object_open) (struct gdb_symbol_callbacks *cb); - -/* The callback used to create new symbol table. CB is the - gdb_symbol_callbacks which the structure is part of. FILE_NAME is - an (optionally NULL) file name to associate with this new symbol - table. - - Returns a new instance to gdb_symtab that can later be passed to - gdb_block_new, gdb_symtab_add_line_mapping and gdb_symtab_close. */ - -typedef struct gdb_symtab *(gdb_symtab_open) (struct gdb_symbol_callbacks *cb, - struct gdb_object *obj, - const char *file_name); - -/* Creates a new block in a given symbol table. A symbol table is a - forest of blocks, each block representing an code address range and - a corresponding (optionally NULL) NAME. In case the block - corresponds to a function, the NAME passed should be the name of - the function. - - If the new block to be created is a child of (i.e. is nested in) - another block, the parent block can be passed in PARENT. SYMTAB is - the symbol table the new block is to belong in. BEGIN, END is the - code address range the block corresponds to. - - Returns a new instance of gdb_block, which, as of now, has no use. - Note that the gdb_block returned must not be freed by the - caller. */ - -typedef struct gdb_block *(gdb_block_open) (struct gdb_symbol_callbacks *cb, - struct gdb_symtab *symtab, - struct gdb_block *parent, - GDB_CORE_ADDR begin, - GDB_CORE_ADDR end, - const char *name); - -/* Adds a PC to line number mapping for the symbol table SYMTAB. - NLINES is the number of elements in LINES, each element - corresponding to one (PC, line) pair. */ - -typedef void (gdb_symtab_add_line_mapping) (struct gdb_symbol_callbacks *cb, - struct gdb_symtab *symtab, - int nlines, - struct gdb_line_mapping *lines); - -/* Close the symtab SYMTAB. This signals to GDB that no more blocks - will be opened on this symtab. */ - -typedef void (gdb_symtab_close) (struct gdb_symbol_callbacks *cb, - struct gdb_symtab *symtab); - - -/* Closes the gdb_object OBJ and adds the emitted information into - GDB's internal structures. Once this is done, the debug - information will be picked up and used; this will usually be the - last operation in gdb_read_debug_info. */ - -typedef void (gdb_object_close) (struct gdb_symbol_callbacks *cb, - struct gdb_object *obj); - -/* Reads LEN bytes from TARGET_MEM in the target's virtual address - space into GDB_BUF. - - Returns GDB_FAIL on failure, and GDB_SUCCESS on success. */ - -typedef enum gdb_status (gdb_target_read) (GDB_CORE_ADDR target_mem, - void *gdb_buf, int len); - -/* The list of callbacks that are passed to read. These callbacks are - to be used to construct the symbol table. The functions have been - described above. */ - -struct gdb_symbol_callbacks -{ - gdb_object_open *object_open; - gdb_symtab_open *symtab_open; - gdb_block_open *block_open; - gdb_symtab_close *symtab_close; - gdb_object_close *object_close; - - gdb_symtab_add_line_mapping *line_mapping_add; - gdb_target_read *target_read; - - /* For internal use by GDB. */ - void *priv_data; -}; - -/* Forward declaration. */ - -struct gdb_reg_value; - -/* A function of this type is used to free a gdb_reg_value. See the - comment on `free' in struct gdb_reg_value. */ - -typedef void (gdb_reg_value_free) (struct gdb_reg_value *); - -/* Denotes the value of a register. */ - -struct gdb_reg_value -{ - /* The size of the register in bytes. The reader need not set this - field. This will be set for (defined) register values being read - from GDB using reg_get. */ - int size; - - /* Set to non-zero if the value for the register is known. The - registers for which the reader does not call reg_set are also - assumed to be undefined */ - int defined; - - /* Since gdb_reg_value is a variable sized structure, it will - usually be allocated on the heap. This function is expected to - contain the corresponding "free" function. - - When a pointer to gdb_reg_value is being sent from GDB to the - reader (via gdb_unwind_reg_get), the reader is expected to call - this function (with the same gdb_reg_value as argument) once it - is done with the value. - - When the function sends the a gdb_reg_value to GDB (via - gdb_unwind_reg_set), it is expected to set this field to point to - an appropriate cleanup routine (or to NULL if no cleanup is - required). */ - gdb_reg_value_free *free; - - /* The value of the register. */ - unsigned char value[1]; -}; - -/* get_frame_id in gdb_reader_funcs is to return a gdb_frame_id - corresponding to the current frame. The registers corresponding to - the current frame can be read using reg_get. Calling get_frame_id - on a particular frame should return the same gdb_frame_id - throughout its lifetime (i.e. till before it gets unwound). One - way to do this is by having the CODE_ADDRESS point to the - function's first instruction and STACK_ADDRESS point to the value - of the stack pointer when entering the function. */ - -struct gdb_frame_id -{ - GDB_CORE_ADDR code_address; - GDB_CORE_ADDR stack_address; -}; - -/* Forward declaration. */ - -struct gdb_unwind_callbacks; - -/* Returns the value of a particular register in the current frame. - The current frame is the frame that needs to be unwound into the - outer (earlier) frame. - - CB is the struct gdb_unwind_callbacks * the callback belongs to. - REGNUM is the DWARF register number of the register that needs to - be unwound. - - Returns the gdb_reg_value corresponding to the register requested. - In case the value of the register has been optimized away or - otherwise unavailable, the defined flag in the returned - gdb_reg_value will be zero. */ - -typedef struct gdb_reg_value *(gdb_unwind_reg_get) - (struct gdb_unwind_callbacks *cb, int regnum); - -/* Sets the previous value of a particular register. REGNUM is the - (DWARF) register number whose value is to be set. VAL is the value - the register is to be set to. - - VAL is *not* copied, so the memory allocated to it cannot be - reused. Once GDB no longer needs the value, it is deallocated - using the FREE function (see gdb_reg_value). - - A register can also be "set" to an undefined value by setting the - defined in VAL to zero. */ - -typedef void (gdb_unwind_reg_set) (struct gdb_unwind_callbacks *cb, int regnum, - struct gdb_reg_value *val); - -/* This struct is passed to unwind in gdb_reader_funcs, and is to be - used to unwind the current frame (current being the frame whose - registers can be read using reg_get) into the earlier frame. The - functions have been described above. */ - -struct gdb_unwind_callbacks -{ - gdb_unwind_reg_get *reg_get; - gdb_unwind_reg_set *reg_set; - gdb_target_read *target_read; - - /* For internal use by GDB. */ - void *priv_data; -}; - -/* Forward declaration. */ - -struct gdb_reader_funcs; - -/* Parse the debug info off a block of memory, pointed to by MEMORY - (already copied to GDB's address space) and MEMORY_SZ bytes long. - The implementation has to use the functions in CB to actually emit - the parsed data into GDB. SELF is the same structure returned by - gdb_init_reader. - - Return GDB_FAIL on failure and GDB_SUCCESS on success. */ - -typedef enum gdb_status (gdb_read_debug_info) (struct gdb_reader_funcs *self, - struct gdb_symbol_callbacks *cb, - void *memory, long memory_sz); - -/* Unwind the current frame, CB is the set of unwind callbacks that - are to be used to do this. - - Return GDB_FAIL on failure and GDB_SUCCESS on success. */ - -typedef enum gdb_status (gdb_unwind_frame) (struct gdb_reader_funcs *self, - struct gdb_unwind_callbacks *cb); - -/* Return the frame ID corresponding to the current frame, using C to - read the current register values. See the comment on struct - gdb_frame_id. */ - -typedef struct gdb_frame_id (gdb_get_frame_id) (struct gdb_reader_funcs *self, - struct gdb_unwind_callbacks *c); - -/* Called when a reader is being unloaded. This function should also - free SELF, if required. */ - -typedef void (gdb_destroy_reader) (struct gdb_reader_funcs *self); - -/* Called when the reader is loaded. Must either return a properly - populated gdb_reader_funcs or NULL. The memory allocated for the - gdb_reader_funcs is to be managed by the reader itself (i.e. if it - is allocated from the heap, it must also be freed in - gdb_destroy_reader). */ - -extern struct gdb_reader_funcs *gdb_init_reader (void); - -/* Pointer to the functions which implement the reader's - functionality. The individual functions have been documented - above. - - None of the fields are optional. */ - -struct gdb_reader_funcs -{ - /* Must be set to GDB_READER_INTERFACE_VERSION. */ - int reader_version; - - /* For use by the reader. */ - void *priv_data; - - gdb_read_debug_info *read; - gdb_unwind_frame *unwind; - gdb_get_frame_id *get_frame_id; - gdb_destroy_reader *destroy; -}; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/dingux/opt/mipsel-linux-uclibc/include/gettext-po.h b/dingux/opt/mipsel-linux-uclibc/include/gettext-po.h deleted file mode 100644 index a42ae22..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/gettext-po.h +++ /dev/null @@ -1,357 +0,0 @@ -/* Public API for GNU gettext PO files - contained in libgettextpo. - Copyright (C) 2003-2008, 2010, 2015-2016 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - 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 3 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, see . */ - -#ifndef _GETTEXT_PO_H -#define _GETTEXT_PO_H 1 - -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* =========================== Meta Information ============================ */ - -/* Version number: (major<<16) + (minor<<8) + subminor */ -#define LIBGETTEXTPO_VERSION 0x001308 -extern int libgettextpo_version; - -/* ================================= Types ================================= */ - -/* A po_file_t represents the contents of a PO file. */ -typedef struct po_file *po_file_t; - -/* A po_message_iterator_t represents an iterator through a domain of a - PO file. */ -typedef struct po_message_iterator *po_message_iterator_t; - -/* A po_message_t represents a message in a PO file. */ -typedef struct po_message *po_message_t; - -/* A po_filepos_t represents a string's position within a source file. */ -typedef struct po_filepos *po_filepos_t; - -/* A po_error_handler handles error situations. */ -struct po_error_handler -{ - /* Signal an error. The error message is built from FORMAT and the following - arguments. ERRNUM, if nonzero, is an errno value. - Must increment the error_message_count variable declared in error.h. - Must not return if STATUS is nonzero. */ - void (*error) (int status, int errnum, - const char *format, ...) -#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__ - __attribute__ ((__format__ (__printf__, 3, 4))) -#endif - ; - - /* Signal an error. The error message is built from FORMAT and the following - arguments. The error location is at FILENAME line LINENO. ERRNUM, if - nonzero, is an errno value. - Must increment the error_message_count variable declared in error.h. - Must not return if STATUS is nonzero. */ - void (*error_at_line) (int status, int errnum, - const char *filename, unsigned int lineno, - const char *format, ...) -#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__ - __attribute__ ((__format__ (__printf__, 5, 6))) -#endif - ; - - /* Signal a multiline warning. The PREFIX applies to all lines of the - MESSAGE. Free the PREFIX and MESSAGE when done. */ - void (*multiline_warning) (char *prefix, char *message); - - /* Signal a multiline error. The PREFIX applies to all lines of the - MESSAGE. Free the PREFIX and MESSAGE when done. - Must increment the error_message_count variable declared in error.h if - PREFIX is non-NULL. */ - void (*multiline_error) (char *prefix, char *message); -}; -typedef const struct po_error_handler *po_error_handler_t; - -/* A po_xerror_handler handles warnings, error and fatal error situations. */ -#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */ -#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */ -#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */ -struct po_xerror_handler -{ - /* Signal a problem of the given severity. - MESSAGE and/or FILENAME + LINENO indicate where the problem occurred. - If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored. - If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored. - If COLUMN is (size_t)(-1), it should be ignored. - MESSAGE_TEXT is the problem description (if MULTILINE_P is true, - multiple lines of text, each terminated with a newline, otherwise - usually a single line). - Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */ - void (*xerror) (int severity, - po_message_t message, - const char *filename, size_t lineno, size_t column, - int multiline_p, const char *message_text); - /* Signal a problem that refers to two messages. - Similar to two calls to xerror. - If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to - MESSAGE_TEXT2. */ - void (*xerror2) (int severity, - po_message_t message1, - const char *filename1, size_t lineno1, size_t column1, - int multiline_p1, const char *message_text1, - po_message_t message2, - const char *filename2, size_t lineno2, size_t column2, - int multiline_p2, const char *message_text2); -}; -typedef const struct po_xerror_handler *po_xerror_handler_t; - -/* Memory allocation: - The memory allocations performed by these functions use xmalloc(), - therefore will cause a program exit if memory is exhausted. - The memory allocated by po_file_read, and implicitly returned through - the po_message_* functions, lasts until freed with po_file_free. */ - - -/* ============================= po_file_t API ============================= */ - -/* Create an empty PO file representation in memory. */ -extern po_file_t po_file_create (void); - -/* Read a PO file into memory. - Return its contents. Upon failure, return NULL and set errno. */ -#define po_file_read po_file_read_v3 -extern po_file_t po_file_read (const char *filename, - po_xerror_handler_t handler); - -/* Write an in-memory PO file to a file. - Upon failure, return NULL and set errno. */ -#define po_file_write po_file_write_v2 -extern po_file_t po_file_write (po_file_t file, const char *filename, - po_xerror_handler_t handler); - -/* Free a PO file from memory. */ -extern void po_file_free (po_file_t file); - -/* Return the names of the domains covered by a PO file in memory. */ -extern const char * const * po_file_domains (po_file_t file); - - -/* =========================== Header entry API ============================ */ - -/* Return the header entry of a domain of a PO file in memory. - The domain NULL denotes the default domain. - Return NULL if there is no header entry. */ -extern const char * po_file_domain_header (po_file_t file, const char *domain); - -/* Return the value of a field in a header entry. - The return value is either a freshly allocated string, to be freed by the - caller, or NULL. */ -extern char * po_header_field (const char *header, const char *field); - -/* Return the header entry with a given field set to a given value. The field - is added if necessary. - The return value is a freshly allocated string. */ -extern char * po_header_set_field (const char *header, const char *field, const char *value); - - -/* ======================= po_message_iterator_t API ======================= */ - -/* Create an iterator for traversing a domain of a PO file in memory. - The domain NULL denotes the default domain. */ -extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain); - -/* Free an iterator. */ -extern void po_message_iterator_free (po_message_iterator_t iterator); - -/* Return the next message, and advance the iterator. - Return NULL at the end of the message list. */ -extern po_message_t po_next_message (po_message_iterator_t iterator); - -/* Insert a message in a PO file in memory, in the domain and at the position - indicated by the iterator. The iterator thereby advances past the freshly - inserted message. */ -extern void po_message_insert (po_message_iterator_t iterator, po_message_t message); - - -/* =========================== po_message_t API ============================ */ - -/* Return a freshly constructed message. - To finish initializing the message, you must set the msgid and msgstr. */ -extern po_message_t po_message_create (void); - -/* Return the context of a message, or NULL for a message not restricted to a - context. */ -extern const char * po_message_msgctxt (po_message_t message); - -/* Change the context of a message. NULL means a message not restricted to a - context. */ -extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt); - -/* Return the msgid (untranslated English string) of a message. */ -extern const char * po_message_msgid (po_message_t message); - -/* Change the msgid (untranslated English string) of a message. */ -extern void po_message_set_msgid (po_message_t message, const char *msgid); - -/* Return the msgid_plural (untranslated English plural string) of a message, - or NULL for a message without plural. */ -extern const char * po_message_msgid_plural (po_message_t message); - -/* Change the msgid_plural (untranslated English plural string) of a message. - NULL means a message without plural. */ -extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural); - -/* Return the msgstr (translation) of a message. - Return the empty string for an untranslated message. */ -extern const char * po_message_msgstr (po_message_t message); - -/* Change the msgstr (translation) of a message. - Use an empty string to denote an untranslated message. */ -extern void po_message_set_msgstr (po_message_t message, const char *msgstr); - -/* Return the msgstr[index] for a message with plural handling, or - NULL when the index is out of range or for a message without plural. */ -extern const char * po_message_msgstr_plural (po_message_t message, int index); - -/* Change the msgstr[index] for a message with plural handling. - Use a NULL value at the end to reduce the number of plural forms. */ -extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr); - -/* Return the comments for a message. */ -extern const char * po_message_comments (po_message_t message); - -/* Change the comments for a message. - comments should be a multiline string, ending in a newline, or empty. */ -extern void po_message_set_comments (po_message_t message, const char *comments); - -/* Return the extracted comments for a message. */ -extern const char * po_message_extracted_comments (po_message_t message); - -/* Change the extracted comments for a message. - comments should be a multiline string, ending in a newline, or empty. */ -extern void po_message_set_extracted_comments (po_message_t message, const char *comments); - -/* Return the i-th file position for a message, or NULL if i is out of - range. */ -extern po_filepos_t po_message_filepos (po_message_t message, int i); - -/* Remove the i-th file position from a message. - The indices of all following file positions for the message are decremented - by one. */ -extern void po_message_remove_filepos (po_message_t message, int i); - -/* Add a file position to a message, if it is not already present for the - message. - file is the file name. - start_line is the line number where the string starts, or (size_t)(-1) if no - line number is available. */ -extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line); - -/* Return the previous context of a message, or NULL for none. */ -extern const char * po_message_prev_msgctxt (po_message_t message); - -/* Change the previous context of a message. NULL is allowed. */ -extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt); - -/* Return the previous msgid (untranslated English string) of a message, or - NULL for none. */ -extern const char * po_message_prev_msgid (po_message_t message); - -/* Change the previous msgid (untranslated English string) of a message. - NULL is allowed. */ -extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid); - -/* Return the previous msgid_plural (untranslated English plural string) of a - message, or NULL for none. */ -extern const char * po_message_prev_msgid_plural (po_message_t message); - -/* Change the previous msgid_plural (untranslated English plural string) of a - message. NULL is allowed. */ -extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural); - -/* Return true if the message is marked obsolete. */ -extern int po_message_is_obsolete (po_message_t message); - -/* Change the obsolete mark of a message. */ -extern void po_message_set_obsolete (po_message_t message, int obsolete); - -/* Return true if the message is marked fuzzy. */ -extern int po_message_is_fuzzy (po_message_t message); - -/* Change the fuzzy mark of a message. */ -extern void po_message_set_fuzzy (po_message_t message, int fuzzy); - -/* Return true if the message is marked as being a format string of the given - type (e.g. "c-format"). */ -extern int po_message_is_format (po_message_t message, const char *format_type); - -/* Change the format string mark for a given type of a message. */ -extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value); - -/* If a numeric range of a message is set, return true and store the minimum - and maximum value in *MINP and *MAXP. */ -extern int po_message_is_range (po_message_t message, int *minp, int *maxp); - -/* Change the numeric range of a message. MIN and MAX must be non-negative, - with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a - message. */ -extern void po_message_set_range (po_message_t message, int min, int max); - - -/* =========================== po_filepos_t API ============================ */ - -/* Return the file name. */ -extern const char * po_filepos_file (po_filepos_t filepos); - -/* Return the line number where the string starts, or (size_t)(-1) if no line - number is available. */ -extern size_t po_filepos_start_line (po_filepos_t filepos); - - -/* ============================ Format type API ============================= */ - -/* Return a NULL terminated array of the supported format types. */ -extern const char * const * po_format_list (void); - -/* Return the pretty name associated with a format type. - For example, for "csharp-format", return "C#". - Return NULL if the argument is not a supported format type. */ -extern const char * po_format_pretty_name (const char *format_type); - - -/* ============================= Checking API ============================== */ - -/* Test whether an entire file PO file is valid, like msgfmt does it. - If it is invalid, pass the reasons to the handler. */ -extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler); - -/* Test a single message, to be inserted in a PO file in memory, like msgfmt - does it. If it is invalid, pass the reasons to the handler. The iterator - is not modified by this call; it only specifies the file and the domain. */ -extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler); - -/* Test whether the message translation is a valid format string if the message - is marked as being a format string. If it is invalid, pass the reasons to - the handler. */ -#define po_message_check_format po_message_check_format_v2 -extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler); - - -#ifdef __cplusplus -} -#endif - -#endif /* _GETTEXT_PO_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/gmp.h b/dingux/opt/mipsel-linux-uclibc/include/gmp.h deleted file mode 100644 index 02e95aa..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/gmp.h +++ /dev/null @@ -1,2329 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993-1997, 1999-2016 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of either: - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at your - option) any later version. - -or - - * 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. - -or both in parallel, as here. - -The GNU MP Library 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 copies of the GNU General Public License and the -GNU Lesser General Public License along with the GNU MP Library. If not, -see https://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -#ifndef __GNU_MP__ -#define __GNU_MP__ 6 - -#include /* for size_t */ -#include - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ \ - || defined (__DEFINED_FILE) /* musl */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is defined, - via an application having included . Usually va_list is a typedef - so can't be tested directly, but C99 specifies that va_start is a macro. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ - || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#else -#define __GMP_EXTERN_INLINE extern __inline__ -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of an mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_limbs_read __gmpz_limbs_read -__GMP_DECLSPEC mp_srcptr mpz_limbs_read (mpz_srcptr); - -#define mpz_limbs_write __gmpz_limbs_write -__GMP_DECLSPEC mp_ptr mpz_limbs_write (mpz_ptr, mp_size_t); - -#define mpz_limbs_modify __gmpz_limbs_modify -__GMP_DECLSPEC mp_ptr mpz_limbs_modify (mpz_ptr, mp_size_t); - -#define mpz_limbs_finish __gmpz_limbs_finish -__GMP_DECLSPEC void mpz_limbs_finish (mpz_ptr, mp_size_t); - -#define mpz_roinit_n __gmpz_roinit_n -__GMP_DECLSPEC mpz_srcptr mpz_roinit_n (mpz_ptr, mp_srcptr, mp_size_t); - -#define MPZ_ROINIT_N(xp, xs) {{0, (xs),(xp) }} - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_cmp_z __gmpq_cmp_z -__GMP_DECLSPEC int mpq_cmp_z (mpq_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_z __gmpf_cmp_z -__GMP_DECLSPEC int mpf_cmp_z (mpf_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_zero_p __MPN(zero_p) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_zero_p) -__GMP_DECLSPEC int mpn_zero_p (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_1 __MPN(divexact_1) -__GMP_DECLSPEC void mpn_divexact_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_1 __MPN(div_qr_1) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_1 (mp_ptr, mp_limb_t *, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sizeinbase __MPN(sizeinbase) -__GMP_DECLSPEC size_t mpn_sizeinbase (mp_srcptr, mp_size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_cnd_add_n __MPN(cnd_add_n) -__GMP_DECLSPEC mp_limb_t mpn_cnd_add_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_cnd_sub_n __MPN(cnd_sub_n) -__GMP_DECLSPEC mp_limb_t mpn_cnd_sub_n (mp_limb_t, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sec_add_1 __MPN(sec_add_1) -__GMP_DECLSPEC mp_limb_t mpn_sec_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); -#define mpn_sec_add_1_itch __MPN(sec_add_1_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_add_1_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_sec_sub_1 __MPN(sec_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sec_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); -#define mpn_sec_sub_1_itch __MPN(sec_sub_1_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_sub_1_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_cnd_swap __MPN(cnd_swap) -__GMP_DECLSPEC void mpn_cnd_swap (mp_limb_t, volatile mp_limb_t *, volatile mp_limb_t *, mp_size_t); - -#define mpn_sec_mul __MPN(sec_mul) -__GMP_DECLSPEC void mpn_sec_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); -#define mpn_sec_mul_itch __MPN(sec_mul_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_mul_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_sec_sqr __MPN(sec_sqr) -__GMP_DECLSPEC void mpn_sec_sqr (mp_ptr, mp_srcptr, mp_size_t, mp_ptr); -#define mpn_sec_sqr_itch __MPN(sec_sqr_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_sqr_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_sec_powm __MPN(sec_powm) -__GMP_DECLSPEC void mpn_sec_powm (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_bitcnt_t, mp_srcptr, mp_size_t, mp_ptr); -#define mpn_sec_powm_itch __MPN(sec_powm_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_powm_itch (mp_size_t, mp_bitcnt_t, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_sec_tabselect __MPN(sec_tabselect) -__GMP_DECLSPEC void mpn_sec_tabselect (volatile mp_limb_t *, volatile const mp_limb_t *, mp_size_t, mp_size_t, mp_size_t); - -#define mpn_sec_div_qr __MPN(sec_div_qr) -__GMP_DECLSPEC mp_limb_t mpn_sec_div_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); -#define mpn_sec_div_qr_itch __MPN(sec_div_qr_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_div_qr_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; -#define mpn_sec_div_r __MPN(sec_div_r) -__GMP_DECLSPEC void mpn_sec_div_r (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); -#define mpn_sec_div_r_itch __MPN(sec_div_r_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_div_r_itch (mp_size_t, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_sec_invert __MPN(sec_invert) -__GMP_DECLSPEC int mpn_sec_invert (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_bitcnt_t, mp_ptr); -#define mpn_sec_invert_itch __MPN(sec_invert_itch) -__GMP_DECLSPEC mp_size_t mpn_sec_invert_itch (mp_size_t) __GMP_ATTRIBUTE_PURE; - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_zero_p) -#if ! defined (__GMP_FORCE_mpn_zero_p) -__GMP_EXTERN_INLINE -#endif -int -mpn_zero_p (mp_srcptr __gmp_p, mp_size_t __gmp_n) __GMP_NOTHROW -{ - /* if (__GMP_LIKELY (__gmp_n > 0)) */ - do { - if (__gmp_p[--__gmp_n] != 0) - return 0; - } while (__gmp_n != 0); - return 1; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - while (*__gmp_up == 0) /* Low zero limbs are unchanged by negation. */ - { - *__gmp_rp = 0; - if (!--__gmp_n) /* All zero */ - return 0; - ++__gmp_up; ++__gmp_rp; - } - - *__gmp_rp = (- *__gmp_up) & GMP_NUMB_MASK; - - if (--__gmp_n) /* Higher limbs get complemented. */ - mpn_com (++__gmp_rp, ++__gmp_up, __gmp_n); - - return 1; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p ((SI) >= 0) && (SI) >= 0 \ - ? mpz_cmp_ui (Z, __GMP_CAST (unsigned long, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 ? mpq_sgn (Q) \ - : __builtin_constant_p ((NUI) == (DUI)) && (NUI) == (DUI) \ - ? mpz_cmp (mpq_numref (Q), mpq_denref (Q)) \ - : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "/usr/bin/gcc" -#define __GMP_CFLAGS "-O2 -I/opt/mipsel-linux-uclibc/include" - -/* Major version number is the value of __GNU_MP__ too, above. */ -#define __GNU_MP_VERSION 6 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 2 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libfdisk/libfdisk.h b/dingux/opt/mipsel-linux-uclibc/include/libfdisk/libfdisk.h deleted file mode 100644 index 80fb22a..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libfdisk/libfdisk.h +++ /dev/null @@ -1,761 +0,0 @@ -/* - * libfdisk.h - libfdisk API - * - * Copyright (C) 2012-2014 Karel Zak - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef _LIBFDISK_H -#define _LIBFDISK_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/** - * LIBFDISK_VERSION: - * - * Library version string - */ -#define LIBFDISK_VERSION "2.31.1" - -#define LIBFDISK_MAJOR_VERSION 2 -#define LIBFDISK_MINOR_VERSION 31 -#define LIBFDISK_PATCH_VERSION 1 - -/** - * fdisk_context: - * - * Basic library handler. - */ -struct fdisk_context; - -/** - * fdisk_label: - * - * Disk label specific driver and setting. - */ -struct fdisk_label; - -/** - * fdisk_parttype: - * - * Partition type. - */ -struct fdisk_parttype; - -/** - * fdisk_partition: - * - * Partition abstraction (and template). - */ -struct fdisk_partition; - -/** - * fdisk_ask: - * - * Ask API handler for dialogs with users. - */ -struct fdisk_ask; - -/** - * fdisk_iter: - * - * Unified iterator. - */ -struct fdisk_iter; - -/** - * fdisk_table: - * - * Container for fdisk_partition objects - */ -struct fdisk_table; - -/** - * fdisk_field - * - * Output field description. - */ -struct fdisk_field; - -/** - * fdisk_script - * - * library handler for sfdisk compatible scripts and dumps - */ -struct fdisk_script; - -/** - * fdisk_sector_t - * - * LBA adresses type - */ -typedef uint64_t fdisk_sector_t; - -/** - * fdisk_labeltype: - * - * Supported partition table types (labels) - */ -enum fdisk_labeltype { - FDISK_DISKLABEL_DOS = (1 << 1), /* MBR label type */ - FDISK_DISKLABEL_SUN = (1 << 2), /* SUN label type */ - FDISK_DISKLABEL_SGI = (1 << 3), /* SGI label type */ - FDISK_DISKLABEL_BSD = (1 << 4), /* BSD label t ype */ - FDISK_DISKLABEL_GPT = (1 << 5) /* UEFI GPT type */ -}; - -/** - * fdisk_labelitem - * - * library handler for label specific information. See - * generic FDISK_LABELITEM_* and label specific {GPT,MBR,..}_LABELITEM_*. - */ -struct fdisk_labelitem; - -/** - * fdisk_asktype: - * - * Ask API dialog types - */ -enum fdisk_asktype { - FDISK_ASKTYPE_NONE = 0, /* undefined type */ - FDISK_ASKTYPE_NUMBER, /* ask for number */ - FDISK_ASKTYPE_OFFSET, /* ask for offset */ - FDISK_ASKTYPE_WARN, /* print warning message and errno */ - FDISK_ASKTYPE_WARNX, /* print warning message */ - FDISK_ASKTYPE_INFO, /* print infor message */ - FDISK_ASKTYPE_YESNO, /* ask Yes/No question */ - FDISK_ASKTYPE_STRING, /* ask for string */ - FDISK_ASKTYPE_MENU /* ask for menu item */ -}; - -/* init.c */ -extern void fdisk_init_debug(int mask); - -/* version.c */ -extern int fdisk_parse_version_string(const char *ver_string); -extern int fdisk_get_library_version(const char **ver_string); -extern int fdisk_get_library_features(const char ***features); - -/* context.h */ - -#define FDISK_PLURAL 0 -#define FDISK_SINGULAR 1 - -struct fdisk_context *fdisk_new_context(void); -struct fdisk_context *fdisk_new_nested_context(struct fdisk_context *parent, const char *name); -void fdisk_unref_context(struct fdisk_context *cxt); -void fdisk_ref_context(struct fdisk_context *cxt); - -struct fdisk_context *fdisk_get_parent(struct fdisk_context *cxt); -size_t fdisk_get_npartitions(struct fdisk_context *cxt); - -struct fdisk_label *fdisk_get_label(struct fdisk_context *cxt, const char *name); -int fdisk_next_label(struct fdisk_context *cxt, struct fdisk_label **lb); -size_t fdisk_get_nlabels(struct fdisk_context *cxt); - -int fdisk_has_label(struct fdisk_context *cxt); -int fdisk_is_labeltype(struct fdisk_context *cxt, enum fdisk_labeltype id); -#define fdisk_is_label(c, x) fdisk_is_labeltype(c, FDISK_DISKLABEL_ ## x) - - -int fdisk_assign_device(struct fdisk_context *cxt, - const char *fname, int readonly); -int fdisk_deassign_device(struct fdisk_context *cxt, int nosync); -int fdisk_reassign_device(struct fdisk_context *cxt); - -int fdisk_is_readonly(struct fdisk_context *cxt); -int fdisk_is_regfile(struct fdisk_context *cxt); -int fdisk_device_is_used(struct fdisk_context *cxt); - -int fdisk_disable_dialogs(struct fdisk_context *cxt, int disable); -int fdisk_has_dialogs(struct fdisk_context *cxt); - -int fdisk_enable_details(struct fdisk_context *cxt, int enable); -int fdisk_is_details(struct fdisk_context *cxt); - -int fdisk_enable_listonly(struct fdisk_context *cxt, int enable); -int fdisk_is_listonly(struct fdisk_context *cxt); - -int fdisk_enable_wipe(struct fdisk_context *cxt, int enable); -int fdisk_has_wipe(struct fdisk_context *cxt); -const char *fdisk_get_collision(struct fdisk_context *cxt); -int fdisk_is_ptcollision(struct fdisk_context *cxt); - -int fdisk_set_unit(struct fdisk_context *cxt, const char *str); -const char *fdisk_get_unit(struct fdisk_context *cxt, int n); -int fdisk_use_cylinders(struct fdisk_context *cxt); -unsigned int fdisk_get_units_per_sector(struct fdisk_context *cxt); - -unsigned long fdisk_get_optimal_iosize(struct fdisk_context *cxt); -unsigned long fdisk_get_minimal_iosize(struct fdisk_context *cxt); -unsigned long fdisk_get_physector_size(struct fdisk_context *cxt); -unsigned long fdisk_get_sector_size(struct fdisk_context *cxt); -unsigned long fdisk_get_alignment_offset(struct fdisk_context *cxt); -unsigned long fdisk_get_grain_size(struct fdisk_context *cxt); -fdisk_sector_t fdisk_get_first_lba(struct fdisk_context *cxt); -fdisk_sector_t fdisk_set_first_lba(struct fdisk_context *cxt, fdisk_sector_t lba); -fdisk_sector_t fdisk_get_last_lba(struct fdisk_context *cxt); -fdisk_sector_t fdisk_set_last_lba(struct fdisk_context *cxt, fdisk_sector_t lba); -fdisk_sector_t fdisk_get_nsectors(struct fdisk_context *cxt); -const char *fdisk_get_devname(struct fdisk_context *cxt); -int fdisk_get_devfd(struct fdisk_context *cxt); - -unsigned int fdisk_get_geom_heads(struct fdisk_context *cxt); -fdisk_sector_t fdisk_get_geom_sectors(struct fdisk_context *cxt); -fdisk_sector_t fdisk_get_geom_cylinders(struct fdisk_context *cxt); - -enum { - FDISK_SIZEUNIT_HUMAN = 0, /* default, human readable {M,G,P,...} */ - FDISK_SIZEUNIT_BYTES /* bytes */ -}; -int fdisk_set_size_unit(struct fdisk_context *cxt, int unit); -int fdisk_get_size_unit(struct fdisk_context *cxt); - -int fdisk_has_protected_bootbits(struct fdisk_context *cxt); -int fdisk_enable_bootbits_protection(struct fdisk_context *cxt, int enable); - -/* parttype.c */ -struct fdisk_parttype *fdisk_new_parttype(void); -void fdisk_ref_parttype(struct fdisk_parttype *t); -void fdisk_unref_parttype(struct fdisk_parttype *t); -int fdisk_parttype_set_name(struct fdisk_parttype *t, const char *str); -int fdisk_parttype_set_typestr(struct fdisk_parttype *t, const char *str); -int fdisk_parttype_set_code(struct fdisk_parttype *t, int code); -size_t fdisk_label_get_nparttypes(const struct fdisk_label *lb); -struct fdisk_parttype *fdisk_label_get_parttype(const struct fdisk_label *lb, size_t n); -int fdisk_label_has_code_parttypes(const struct fdisk_label *lb); -struct fdisk_parttype *fdisk_label_get_parttype_from_code( - const struct fdisk_label *lb, - unsigned int code); -struct fdisk_parttype *fdisk_label_get_parttype_from_string( - const struct fdisk_label *lb, - const char *str); -struct fdisk_parttype *fdisk_new_unknown_parttype(unsigned int code, - const char *typestr); -struct fdisk_parttype *fdisk_copy_parttype(const struct fdisk_parttype *type); -struct fdisk_parttype *fdisk_label_parse_parttype( - const struct fdisk_label *lb, - const char *str); -const char *fdisk_parttype_get_string(const struct fdisk_parttype *t); -unsigned int fdisk_parttype_get_code(const struct fdisk_parttype *t); -const char *fdisk_parttype_get_name(const struct fdisk_parttype *t); -int fdisk_parttype_is_unknown(const struct fdisk_parttype *t); - - -/* field.c */ -extern int fdisk_field_get_id(const struct fdisk_field *field); -extern const char *fdisk_field_get_name(const struct fdisk_field *field); -extern double fdisk_field_get_width(const struct fdisk_field *field); -extern int fdisk_field_is_number(const struct fdisk_field *field); - - -/* label.c */ - -/** - * fdisk_fieldtype: - * - * Types of fdisk_field. The fields describe a partition. - */ -enum fdisk_fieldtype { - FDISK_FIELD_NONE = 0, - - /* generic */ - FDISK_FIELD_DEVICE, /* partition device name */ - FDISK_FIELD_START, /* start offset of the partition */ - FDISK_FIELD_END, /* end offset of the partition */ - FDISK_FIELD_SECTORS, /* number of sectors */ - FDISK_FIELD_CYLINDERS, /* number of cylinders (deprecated) */ - FDISK_FIELD_SIZE, /* partition size */ - FDISK_FIELD_TYPE, /* partition type */ - FDISK_FIELD_TYPEID, /* partition type ID */ - - /* label specific */ - FDISK_FIELD_ATTR, /* partition attribute (GPT) */ - FDISK_FIELD_BOOT, /* partition boot flag */ - FDISK_FIELD_BSIZE, /* size of the boot area (BSD) */ - FDISK_FIELD_CPG, /* BSD */ - FDISK_FIELD_EADDR, /* End-C/H/S (MBR) */ - FDISK_FIELD_FSIZE, /* BSD */ - FDISK_FIELD_NAME, /* partition label/name (GPT) */ - FDISK_FIELD_SADDR, /* Start-C/H/S (MBR) */ - FDISK_FIELD_UUID, /* partition UUID (GPT) */ - - FDISK_FIELD_FSUUID, - FDISK_FIELD_FSLABEL, - FDISK_FIELD_FSTYPE, - - FDISK_NFIELDS /* must be last */ -}; - -int fdisk_label_get_type(const struct fdisk_label *lb); -const char *fdisk_label_get_name(const struct fdisk_label *lb); -int fdisk_label_require_geometry(const struct fdisk_label *lb); - - -extern int fdisk_write_disklabel(struct fdisk_context *cxt); -extern int fdisk_verify_disklabel(struct fdisk_context *cxt); -extern int fdisk_create_disklabel(struct fdisk_context *cxt, const char *name); -extern int fdisk_list_disklabel(struct fdisk_context *cxt); -extern int fdisk_locate_disklabel(struct fdisk_context *cxt, int n, - const char **name, - uint64_t *offset, - size_t *size); - -/** - * fdisk_labelitem_gen: - * - * Generic disklabel items - */ -enum fdisk_labelitem_gen { - FDISK_LABELITEM_ID = 0, /* Unique disk identifier */ - - __FDISK_NLABELITEMS = 8 /* Specifies reserved range for generic items (0..7) */ -}; - -/* item.c */ -extern struct fdisk_labelitem *fdisk_new_labelitem(void); -extern void fdisk_ref_labelitem(struct fdisk_labelitem *li); -extern int fdisk_reset_labelitem(struct fdisk_labelitem *li); -extern void fdisk_unref_labelitem(struct fdisk_labelitem *li); -extern const char *fdisk_labelitem_get_name(struct fdisk_labelitem *li); -extern int fdisk_labelitem_get_id(struct fdisk_labelitem *li); -extern int fdisk_labelitem_get_data_u64(struct fdisk_labelitem *li, uint64_t *data); -extern int fdisk_labelitem_get_data_string(struct fdisk_labelitem *li, const char **data); -extern int fdisk_labelitem_is_string(struct fdisk_labelitem *li); -extern int fdisk_labelitem_is_number(struct fdisk_labelitem *li); - -extern int fdisk_get_disklabel_item(struct fdisk_context *cxt, int id, struct fdisk_labelitem *item); - -extern int fdisk_get_disklabel_id(struct fdisk_context *cxt, char **id); -extern int fdisk_set_disklabel_id(struct fdisk_context *cxt); - -extern int fdisk_get_partition(struct fdisk_context *cxt, size_t partno, struct fdisk_partition **pa); -extern int fdisk_set_partition(struct fdisk_context *cxt, size_t partno, struct fdisk_partition *pa); -extern int fdisk_add_partition(struct fdisk_context *cxt, struct fdisk_partition *pa, size_t *partno); -extern int fdisk_delete_partition(struct fdisk_context *cxt, size_t partno); -extern int fdisk_delete_all_partitions(struct fdisk_context *cxt); - -extern int fdisk_wipe_partition(struct fdisk_context *cxt, size_t partno, int enable); - -extern int fdisk_set_partition_type(struct fdisk_context *cxt, size_t partnum, - struct fdisk_parttype *t); - - -extern int fdisk_label_get_fields_ids( - const struct fdisk_label *lb, - struct fdisk_context *cxt, - int **ids, size_t *nids); - -extern int fdisk_label_get_fields_ids_all( - const struct fdisk_label *lb, - struct fdisk_context *cxt, - int **ids, size_t *nids); - -extern const struct fdisk_field *fdisk_label_get_field(const struct fdisk_label *lb, int id); -extern const struct fdisk_field *fdisk_label_get_field_by_name( - const struct fdisk_label *lb, - const char *name); - -extern void fdisk_label_set_changed(struct fdisk_label *lb, int changed); -extern int fdisk_label_is_changed(const struct fdisk_label *lb); - -extern void fdisk_label_set_disabled(struct fdisk_label *lb, int disabled); -extern int fdisk_label_is_disabled(const struct fdisk_label *lb); - -extern int fdisk_is_partition_used(struct fdisk_context *cxt, size_t n); - -extern int fdisk_toggle_partition_flag(struct fdisk_context *cxt, size_t partnum, unsigned long flag); - -extern struct fdisk_partition *fdisk_new_partition(void); -extern void fdisk_reset_partition(struct fdisk_partition *pa); -extern void fdisk_ref_partition(struct fdisk_partition *pa); -extern void fdisk_unref_partition(struct fdisk_partition *pa); -extern int fdisk_partition_is_freespace(struct fdisk_partition *pa); - -int fdisk_partition_set_start(struct fdisk_partition *pa, uint64_t off); -int fdisk_partition_unset_start(struct fdisk_partition *pa); -fdisk_sector_t fdisk_partition_get_start(struct fdisk_partition *pa); -int fdisk_partition_has_start(struct fdisk_partition *pa); -int fdisk_partition_cmp_start(struct fdisk_partition *a, - struct fdisk_partition *b); -int fdisk_partition_start_follow_default(struct fdisk_partition *pa, int enable); -int fdisk_partition_start_is_default(struct fdisk_partition *pa); - -int fdisk_partition_set_size(struct fdisk_partition *pa, uint64_t sz); -int fdisk_partition_unset_size(struct fdisk_partition *pa); -fdisk_sector_t fdisk_partition_get_size(struct fdisk_partition *pa); -int fdisk_partition_has_size(struct fdisk_partition *pa); -int fdisk_partition_size_explicit(struct fdisk_partition *pa, int enable); - -int fdisk_partition_has_end(struct fdisk_partition *pa); -fdisk_sector_t fdisk_partition_get_end(struct fdisk_partition *pa); - -int fdisk_partition_set_partno(struct fdisk_partition *pa, size_t num); -int fdisk_partition_unset_partno(struct fdisk_partition *pa); -size_t fdisk_partition_get_partno(struct fdisk_partition *pa); -int fdisk_partition_has_partno(struct fdisk_partition *pa); -int fdisk_partition_cmp_partno(struct fdisk_partition *a, - struct fdisk_partition *b); - -int fdisk_partition_partno_follow_default(struct fdisk_partition *pa, int enable); - -extern int fdisk_partition_set_type(struct fdisk_partition *pa, struct fdisk_parttype *type); -extern struct fdisk_parttype *fdisk_partition_get_type(struct fdisk_partition *pa); -extern int fdisk_partition_set_name(struct fdisk_partition *pa, const char *name); -extern const char *fdisk_partition_get_name(struct fdisk_partition *pa); -extern int fdisk_partition_set_uuid(struct fdisk_partition *pa, const char *uuid); -extern int fdisk_partition_set_attrs(struct fdisk_partition *pa, const char *attrs); -extern const char *fdisk_partition_get_uuid(struct fdisk_partition *pa); -extern const char *fdisk_partition_get_attrs(struct fdisk_partition *pa); -extern int fdisk_partition_is_nested(struct fdisk_partition *pa); -extern int fdisk_partition_is_container(struct fdisk_partition *pa); -extern int fdisk_partition_get_parent(struct fdisk_partition *pa, size_t *parent); -extern int fdisk_partition_is_used(struct fdisk_partition *pa); -extern int fdisk_partition_is_bootable(struct fdisk_partition *pa); -extern int fdisk_partition_is_wholedisk(struct fdisk_partition *pa); -extern int fdisk_partition_to_string(struct fdisk_partition *pa, - struct fdisk_context *cxt, - int id, char **data); - -int fdisk_partition_next_partno(struct fdisk_partition *pa, - struct fdisk_context *cxt, - size_t *n); - -extern int fdisk_partition_end_follow_default(struct fdisk_partition *pa, int enable); -extern int fdisk_partition_end_is_default(struct fdisk_partition *pa); - -extern int fdisk_reorder_partitions(struct fdisk_context *cxt); - -extern int fdisk_partition_has_wipe(struct fdisk_context *cxt, struct fdisk_partition *pa); - - -/* table.c */ -extern struct fdisk_table *fdisk_new_table(void); -extern int fdisk_reset_table(struct fdisk_table *tb); -extern void fdisk_ref_table(struct fdisk_table *tb); -extern void fdisk_unref_table(struct fdisk_table *tb); -extern size_t fdisk_table_get_nents(struct fdisk_table *tb); -extern int fdisk_table_is_empty(struct fdisk_table *tb); -extern int fdisk_table_add_partition(struct fdisk_table *tb, struct fdisk_partition *pa); -extern int fdisk_table_remove_partition(struct fdisk_table *tb, struct fdisk_partition *pa); - -extern int fdisk_get_partitions(struct fdisk_context *cxt, struct fdisk_table **tb); -extern int fdisk_get_freespaces(struct fdisk_context *cxt, struct fdisk_table **tb); - - -extern int fdisk_table_wrong_order(struct fdisk_table *tb); -extern int fdisk_table_sort_partitions(struct fdisk_table *tb, - int (*cmp)(struct fdisk_partition *, - struct fdisk_partition *)); - -extern int fdisk_table_next_partition( - struct fdisk_table *tb, - struct fdisk_iter *itr, - struct fdisk_partition **pa); - -extern struct fdisk_partition *fdisk_table_get_partition( - struct fdisk_table *tb, - size_t n); -extern struct fdisk_partition *fdisk_table_get_partition_by_partno( - struct fdisk_table *tb, - size_t partno); - -extern int fdisk_apply_table(struct fdisk_context *cxt, struct fdisk_table *tb); - -/* alignment.c */ -#define FDISK_ALIGN_UP 1 -#define FDISK_ALIGN_DOWN 2 -#define FDISK_ALIGN_NEAREST 3 - -fdisk_sector_t fdisk_align_lba(struct fdisk_context *cxt, fdisk_sector_t lba, int direction); -fdisk_sector_t fdisk_align_lba_in_range(struct fdisk_context *cxt, - fdisk_sector_t lba, fdisk_sector_t start, fdisk_sector_t stop); -int fdisk_lba_is_phy_aligned(struct fdisk_context *cxt, fdisk_sector_t lba); - -int fdisk_override_geometry(struct fdisk_context *cxt, - unsigned int cylinders, - unsigned int heads, - unsigned int sectors); -int fdisk_save_user_geometry(struct fdisk_context *cxt, - unsigned int cylinders, - unsigned int heads, - unsigned int sectors); -int fdisk_save_user_sector_size(struct fdisk_context *cxt, - unsigned int phy, - unsigned int log); - -int fdisk_save_user_grain(struct fdisk_context *cxt, unsigned long grain); - -int fdisk_has_user_device_properties(struct fdisk_context *cxt); -int fdisk_reset_alignment(struct fdisk_context *cxt); -int fdisk_reset_device_properties(struct fdisk_context *cxt); -int fdisk_reread_partition_table(struct fdisk_context *cxt); -int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org); - -/* iter.c */ -enum { - - FDISK_ITER_FORWARD = 0, - FDISK_ITER_BACKWARD -}; -extern struct fdisk_iter *fdisk_new_iter(int direction); -extern void fdisk_free_iter(struct fdisk_iter *itr); -extern void fdisk_reset_iter(struct fdisk_iter *itr, int direction); -extern int fdisk_iter_get_direction(struct fdisk_iter *itr); - - -/* dos.c */ -#define DOS_FLAG_ACTIVE 1 - -extern int fdisk_dos_move_begin(struct fdisk_context *cxt, size_t i); -extern int fdisk_dos_enable_compatible(struct fdisk_label *lb, int enable); -extern int fdisk_dos_is_compatible(struct fdisk_label *lb); - -/* sun.h */ -extern int fdisk_sun_set_alt_cyl(struct fdisk_context *cxt); -extern int fdisk_sun_set_xcyl(struct fdisk_context *cxt); -extern int fdisk_sun_set_ilfact(struct fdisk_context *cxt); -extern int fdisk_sun_set_rspeed(struct fdisk_context *cxt); -extern int fdisk_sun_set_pcylcount(struct fdisk_context *cxt); - -/** - * fdisk_labelitem_sun: - * - * SUN specific label items. - */ -enum fdisk_labelitem_sun { - SUN_LABELITEM_LABELID = __FDISK_NLABELITEMS, - SUN_LABELITEM_VTOCID, - SUN_LABELITEM_RPM, - SUN_LABELITEM_ACYL, - SUN_LABELITEM_PCYL, - SUN_LABELITEM_APC, - SUN_LABELITEM_INTRLV -}; - -/* bsd.c */ -extern int fdisk_bsd_edit_disklabel(struct fdisk_context *cxt); -extern int fdisk_bsd_write_bootstrap(struct fdisk_context *cxt); -extern int fdisk_bsd_link_partition(struct fdisk_context *cxt); - -/** - * fdisk_labelitem_bsd: - * - * BSD specific label items. - */ -enum fdisk_labelitem_bsd { - /* specific */ - BSD_LABELITEM_TYPE = __FDISK_NLABELITEMS, - BSD_LABELITEM_DISK, - BSD_LABELITEM_PACKNAME, - BSD_LABELITEM_FLAGS, - BSD_LABELITEM_SECSIZE, - BSD_LABELITEM_NTRACKS, - BSD_LABELITEM_SECPERCYL, - BSD_LABELITEM_CYLINDERS, - BSD_LABELITEM_RPM, - BSD_LABELITEM_INTERLEAVE, - BSD_LABELITEM_TRACKSKEW, - BSD_LABELITEM_CYLINDERSKEW, - BSD_LABELITEM_HEADSWITCH, - BSD_LABELITEM_TRKSEEK -}; - -/* sgi.h */ -#define SGI_FLAG_BOOT 1 -#define SGI_FLAG_SWAP 2 -extern int fdisk_sgi_set_bootfile(struct fdisk_context *cxt); -extern int fdisk_sgi_create_info(struct fdisk_context *cxt); - -/** - * fdisk_labelitem_sgi: - * - * SGI specific label items. - */ -enum fdisk_labelitem_sgi { - SGI_LABELITEM_PCYLCOUNT = __FDISK_NLABELITEMS, - SGI_LABELITEM_SPARECYL, - SGI_LABELITEM_ILFACT, - SGI_LABELITEM_BOOTFILE -}; - -/* gpt */ - -/* - * GPT partition attributes - */ - -/** - * GPT_FLAG_REQUIRED: - * - * GPT attribute; marks a partition as system partition (disk - * partitioning utilities must preserve the partition as is) - */ -#define GPT_FLAG_REQUIRED 1 - -/** - * GPT_FLAG_NOBLOCK: - * - * GPT attribute; EFI firmware should ignore the content of the - * partition and not try to read from it - */ -#define GPT_FLAG_NOBLOCK 2 - -/** - * GPT_FLAG_LEGACYBOOT: - * - * GPT attribute; use the partition for legacy boot method - */ -#define GPT_FLAG_LEGACYBOOT 3 - -/** - * GPT_FLAG_GUIDSPECIFIC: - * - * GPT attribute; for bites 48-63, defined and used by the individual partition - * type. - * - * The flag GPT_FLAG_GUIDSPECIFIC forces libfdisk to ask (by ask API) - * for a bit number. If you want to toggle specific bit and avoid any - * dialog, then use the bit number (in range 48..63). For example: - * - * // start dialog to ask for bit number - * fdisk_toggle_partition_flag(cxt, n, GPT_FLAG_GUIDSPECIFIC); - * - * // toggle bit 60 - * fdisk_toggle_partition_flag(cxt, n, 60); - */ -#define GPT_FLAG_GUIDSPECIFIC 4 - -extern int fdisk_gpt_is_hybrid(struct fdisk_context *cxt); -extern int fdisk_gpt_set_npartitions(struct fdisk_context *cxt, uint32_t entries); -extern int fdisk_gpt_get_partition_attrs(struct fdisk_context *cxt, size_t partnum, uint64_t *attrs); -extern int fdisk_gpt_set_partition_attrs(struct fdisk_context *cxt, size_t partnum, uint64_t attrs); - -/** - * fdisk_labelitem_gpt: - * - * GPT specific label items. - */ -enum fdisk_labelitem_gpt { - /* generic */ - GPT_LABELITEM_ID = FDISK_LABELITEM_ID, /* GPT disklabel UUID (!= partition UUID) */ - /* specific */ - GPT_LABELITEM_FIRSTLBA = __FDISK_NLABELITEMS, /* First Usable LBA */ - GPT_LABELITEM_LASTLBA, /* Last Usable LBA */ - GPT_LABELITEM_ALTLBA, /* Alternative LBA (backup header LBA) */ - GPT_LABELITEM_ENTRIESLBA, /* Partitions entires array LBA */ - GPT_LABELITEM_ENTRIESALLOC /* Number of allocated entries in entries array */ -}; - -/* script.c */ -struct fdisk_script *fdisk_new_script(struct fdisk_context *cxt); -struct fdisk_script *fdisk_new_script_from_file(struct fdisk_context *cxt, - const char *filename); -void fdisk_ref_script(struct fdisk_script *dp); -void fdisk_unref_script(struct fdisk_script *dp); - -const char *fdisk_script_get_header(struct fdisk_script *dp, const char *name); -int fdisk_script_set_header(struct fdisk_script *dp, const char *name, const char *data); -struct fdisk_table *fdisk_script_get_table(struct fdisk_script *dp); -int fdisk_script_get_nlines(struct fdisk_script *dp); -int fdisk_script_has_force_label(struct fdisk_script *dp); - -int fdisk_script_set_userdata(struct fdisk_script *dp, void *data); -void *fdisk_script_get_userdata(struct fdisk_script *dp); - -int fdisk_script_set_fgets(struct fdisk_script *dp, - char *(*fn_fgets)(struct fdisk_script *, char *, size_t, FILE *)); -int fdisk_script_read_context(struct fdisk_script *dp, struct fdisk_context *cxt); -int fdisk_script_enable_json(struct fdisk_script *dp, int json); -int fdisk_script_write_file(struct fdisk_script *dp, FILE *f); -int fdisk_script_read_file(struct fdisk_script *dp, FILE *f); -int fdisk_script_read_line(struct fdisk_script *dp, FILE *f, char *buf, size_t bufsz); - -int fdisk_set_script(struct fdisk_context *cxt, struct fdisk_script *dp); -struct fdisk_script *fdisk_get_script(struct fdisk_context *cxt); - -int fdisk_apply_script_headers(struct fdisk_context *cxt, struct fdisk_script *dp); -int fdisk_apply_script(struct fdisk_context *cxt, struct fdisk_script *dp); - - -/* ask.c */ -#define fdisk_is_ask(a, x) (fdisk_ask_get_type(a) == FDISK_ASKTYPE_ ## x) - -int fdisk_set_ask(struct fdisk_context *cxt, - int (*ask_cb)(struct fdisk_context *, struct fdisk_ask *, void *), - void *data); - - -void fdisk_ref_ask(struct fdisk_ask *ask); -void fdisk_unref_ask(struct fdisk_ask *ask); -const char *fdisk_ask_get_query(struct fdisk_ask *ask); -int fdisk_ask_get_type(struct fdisk_ask *ask); -const char *fdisk_ask_number_get_range(struct fdisk_ask *ask); -uint64_t fdisk_ask_number_get_default(struct fdisk_ask *ask); -uint64_t fdisk_ask_number_get_low(struct fdisk_ask *ask); -uint64_t fdisk_ask_number_get_high(struct fdisk_ask *ask); -uint64_t fdisk_ask_number_get_result(struct fdisk_ask *ask); -int fdisk_ask_number_set_result(struct fdisk_ask *ask, uint64_t result); -uint64_t fdisk_ask_number_get_base(struct fdisk_ask *ask); -uint64_t fdisk_ask_number_get_unit(struct fdisk_ask *ask); -int fdisk_ask_number_set_relative(struct fdisk_ask *ask, int relative); -int fdisk_ask_number_inchars(struct fdisk_ask *ask); -int fdisk_ask_partnum(struct fdisk_context *cxt, size_t *partnum, int wantnew); - -int fdisk_ask_number(struct fdisk_context *cxt, - uintmax_t low, - uintmax_t dflt, - uintmax_t high, - const char *query, - uintmax_t *result); -char *fdisk_ask_string_get_result(struct fdisk_ask *ask); -int fdisk_ask_string_set_result(struct fdisk_ask *ask, char *result); -int fdisk_ask_string(struct fdisk_context *cxt, - const char *query, - char **result); -int fdisk_ask_yesno(struct fdisk_context *cxt, - const char *query, - int *result); -int fdisk_ask_yesno_get_result(struct fdisk_ask *ask); -int fdisk_ask_yesno_set_result(struct fdisk_ask *ask, int result); -int fdisk_ask_menu_get_default(struct fdisk_ask *ask); -int fdisk_ask_menu_set_result(struct fdisk_ask *ask, int key); -int fdisk_ask_menu_get_result(struct fdisk_ask *ask, int *key); -int fdisk_ask_menu_get_item(struct fdisk_ask *ask, size_t idx, int *key, - const char **name, const char **desc); -size_t fdisk_ask_menu_get_nitems(struct fdisk_ask *ask); -int fdisk_ask_print_get_errno(struct fdisk_ask *ask); -const char *fdisk_ask_print_get_mesg(struct fdisk_ask *ask); - -int fdisk_info(struct fdisk_context *cxt, const char *fmt, ...); -int fdisk_warn(struct fdisk_context *cxt, const char *fmt, ...); -int fdisk_warnx(struct fdisk_context *cxt, const char *fmt, ...); - -/* utils.h */ -extern char *fdisk_partname(const char *dev, size_t partno); - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBFDISK_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_dlloader.h b/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_dlloader.h deleted file mode 100644 index 66cf047..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_dlloader.h +++ /dev/null @@ -1,91 +0,0 @@ -/* lt_dlloader.h -- dynamic library loader interface - - Copyright (C) 2004, 2007-2008, 2011-2015 Free Software Foundation, - Inc. - Written by Gary V. Vaughan, 2004 - - NOTE: The canonical source of this file is maintained with the - GNU Libtool package. Report bugs to bug-libtool@gnu.org. - -GNU Libltdl is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -As a special exception to the GNU Lesser General Public License, -if you distribute this file as part of a program or library that -is built using GNU Libtool, you may include this file under the -same distribution terms that you use for the rest of that program. - -GNU Libltdl 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with GNU Libltdl; see the file COPYING.LIB. If not, a -copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, -or obtained by writing to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#if !defined LT_DLLOADER_H -#define LT_DLLOADER_H 1 - -#include - -LT_BEGIN_C_DECLS - -typedef void * lt_dlloader; -typedef void * lt_module; -typedef void * lt_user_data; -typedef struct lt__advise * lt_dladvise; - -/* Function pointer types for module loader vtable entries: */ -typedef lt_module lt_module_open (lt_user_data data, - const char *filename, - lt_dladvise advise); -typedef int lt_module_close (lt_user_data data, - lt_module module); -typedef void * lt_find_sym (lt_user_data data, lt_module module, - const char *symbolname); -typedef int lt_dlloader_init (lt_user_data data); -typedef int lt_dlloader_exit (lt_user_data data); - -/* Default priority is LT_DLLOADER_PREPEND if none is explicitly given. */ -typedef enum { - LT_DLLOADER_PREPEND = 0, LT_DLLOADER_APPEND -} lt_dlloader_priority; - -/* This structure defines a module loader, as populated by the get_vtable - entry point of each loader. */ -typedef struct { - const char * name; - const char * sym_prefix; - lt_module_open * module_open; - lt_module_close * module_close; - lt_find_sym * find_sym; - lt_dlloader_init * dlloader_init; - lt_dlloader_exit * dlloader_exit; - lt_user_data dlloader_data; - lt_dlloader_priority priority; -} lt_dlvtable; - -LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable); -LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader); - -LT_SCOPE lt_dlvtable * lt_dlloader_remove (const char *name); -LT_SCOPE const lt_dlvtable *lt_dlloader_find (const char *name); -LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader); - - -/* Type of a function to get a loader's vtable: */ -typedef const lt_dlvtable *lt_get_vtable (lt_user_data data); - -#ifdef LT_DEBUG_LOADERS -LT_SCOPE void lt_dlloader_dump (void); -#endif - -LT_END_C_DECLS - -#endif /*!defined LT_DLLOADER_H*/ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_error.h b/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_error.h deleted file mode 100644 index 367c36b..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_error.h +++ /dev/null @@ -1,86 +0,0 @@ -/* lt_error.h -- error propagation interface - - Copyright (C) 1999-2001, 2004, 2007, 2011-2015 Free Software - Foundation, Inc. - Written by Thomas Tanner, 1999 - - NOTE: The canonical source of this file is maintained with the - GNU Libtool package. Report bugs to bug-libtool@gnu.org. - -GNU Libltdl is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -As a special exception to the GNU Lesser General Public License, -if you distribute this file as part of a program or library that -is built using GNU Libtool, you may include this file under the -same distribution terms that you use for the rest of that program. - -GNU Libltdl 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with GNU Libltdl; see the file COPYING.LIB. If not, a -copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, -or obtained by writing to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -/* Only include this header file once. */ -#if !defined LT_ERROR_H -#define LT_ERROR_H 1 - -#include - -LT_BEGIN_C_DECLS - -/* Defining error strings alongside their symbolic names in a macro in - this way allows us to expand the macro in different contexts with - confidence that the enumeration of symbolic names will map correctly - onto the table of error strings. \0 is appended to the strings to - expilicitely initialize the string terminator. */ -#define lt_dlerror_table \ - LT_ERROR(UNKNOWN, "unknown error\0") \ - LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available\0") \ - LT_ERROR(INVALID_LOADER, "invalid loader\0") \ - LT_ERROR(INIT_LOADER, "loader initialization failed\0") \ - LT_ERROR(REMOVE_LOADER, "loader removal failed\0") \ - LT_ERROR(FILE_NOT_FOUND, "file not found\0") \ - LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found\0") \ - LT_ERROR(NO_SYMBOLS, "no symbols defined\0") \ - LT_ERROR(CANNOT_OPEN, "can't open the module\0") \ - LT_ERROR(CANNOT_CLOSE, "can't close the module\0") \ - LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found\0") \ - LT_ERROR(NO_MEMORY, "not enough memory\0") \ - LT_ERROR(INVALID_HANDLE, "invalid module handle\0") \ - LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow\0") \ - LT_ERROR(INVALID_ERRORCODE, "invalid errorcode\0") \ - LT_ERROR(SHUTDOWN, "library already shutdown\0") \ - LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module\0") \ - LT_ERROR(INVALID_MUTEX_ARGS, "internal error (code withdrawn)\0")\ - LT_ERROR(INVALID_POSITION, "invalid search path insert position\0")\ - LT_ERROR(CONFLICTING_FLAGS, "symbol visibility can be global or local\0") - -/* Enumerate the symbolic error names. */ -enum { -#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), - lt_dlerror_table -#undef LT_ERROR - - LT_ERROR_MAX -}; - -/* Should be max of the error string lengths above (plus one for C++) */ -#define LT_ERROR_LEN_MAX (41) - -/* These functions are only useful from inside custom module loaders. */ -LT_SCOPE int lt_dladderror (const char *diagnostic); -LT_SCOPE int lt_dlseterror (int errorcode); - - -LT_END_C_DECLS - -#endif /*!defined LT_ERROR_H*/ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_system.h b/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_system.h deleted file mode 100644 index a9bc7ec..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libltdl/lt_system.h +++ /dev/null @@ -1,166 +0,0 @@ -/* lt_system.h -- system portability abstraction layer - - Copyright (C) 2004, 2007, 2010-2015 Free Software Foundation, Inc. - Written by Gary V. Vaughan, 2004 - - NOTE: The canonical source of this file is maintained with the - GNU Libtool package. Report bugs to bug-libtool@gnu.org. - -GNU Libltdl is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -As a special exception to the GNU Lesser General Public License, -if you distribute this file as part of a program or library that -is built using GNU Libtool, you may include this file under the -same distribution terms that you use for the rest of that program. - -GNU Libltdl 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with GNU Libltdl; see the file COPYING.LIB. If not, a -copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, -or obtained by writing to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#if !defined LT_SYSTEM_H -#define LT_SYSTEM_H 1 - -#include -#include -#include - -/* Some systems do not define EXIT_*, even with STDC_HEADERS. */ -#if !defined EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -#if !defined EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - -/* Just pick a big number... */ -#define LT_FILENAME_MAX 2048 - - -/* Saves on those hard to debug '\0' typos.... */ -#define LT_EOS_CHAR '\0' - -/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, - so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at - the end of C declarations. */ -#if defined __cplusplus -# define LT_BEGIN_C_DECLS extern "C" { -# define LT_END_C_DECLS } -#else -# define LT_BEGIN_C_DECLS /* empty */ -# define LT_END_C_DECLS /* empty */ -#endif - -/* LT_STMT_START/END are used to create macros that expand to a - a single compound statement in a portable way. */ -#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus -# define LT_STMT_START (void)( -# define LT_STMT_END ) -#else -# if (defined sun || defined __sun__) -# define LT_STMT_START if (1) -# define LT_STMT_END else (void)0 -# else -# define LT_STMT_START do -# define LT_STMT_END while (0) -# endif -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -/* Canonicalise Windows and Cygwin recognition macros. - To match the values set by recent Cygwin compilers, make sure that if - __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ -#if defined __CYGWIN32__ && !defined __CYGWIN__ -# define __CYGWIN__ __CYGWIN32__ -#endif -#if defined __CYGWIN__ -# if defined __WINDOWS__ -# undef __WINDOWS__ -# endif -#elif defined _WIN32 -# define __WINDOWS__ _WIN32 -#elif defined WIN32 -# define __WINDOWS__ WIN32 -#endif -#if defined __CYGWIN__ && defined __WINDOWS__ -# undef __WINDOWS__ -#endif - - -/* DLL building support on win32 hosts; mostly to workaround their - ridiculous implementation of data symbol exporting. */ -#if !defined LT_SCOPE -# if defined __WINDOWS__ || defined __CYGWIN__ -# if defined DLL_EXPORT /* defined by libtool (if required) */ -# define LT_SCOPE extern __declspec(dllexport) -# endif -# if defined LIBLTDL_DLL_IMPORT /* define if linking with this dll */ - /* note: cygwin/mingw compilers can rely instead on auto-import */ -# define LT_SCOPE extern __declspec(dllimport) -# endif -# endif -# if !defined LT_SCOPE /* static linking or !__WINDOWS__ */ -# define LT_SCOPE extern -# endif -#endif - -#if defined __WINDOWS__ -/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory - separator when it is set. */ -# define LT_DIRSEP_CHAR '\\' -# define LT_PATHSEP_CHAR ';' -#else -# define LT_PATHSEP_CHAR ':' -#endif - -#if defined _MSC_VER /* Visual Studio */ -# define R_OK 4 -#endif - -/* fopen() mode flags for reading a text file */ -#undef LT_READTEXT_MODE -#if defined __WINDOWS__ || defined __CYGWIN__ -# define LT_READTEXT_MODE "rt" -#else -# define LT_READTEXT_MODE "r" -#endif - -/* The extra indirection to the LT__STR and LT__CONC macros is required so - that if the arguments to LT_STR() (or LT_CONC()) are themselves macros, - they will be expanded before being quoted. */ -#ifndef LT_STR -# define LT__STR(arg) #arg -# define LT_STR(arg) LT__STR(arg) -#endif - -#ifndef LT_CONC -# define LT__CONC(a, b) a##b -# define LT_CONC(a, b) LT__CONC(a, b) -#endif -#ifndef LT_CONC3 -# define LT__CONC3(a, b, c) a##b##c -# define LT_CONC3(a, b, c) LT__CONC3(a, b, c) -#endif - -#endif /*!defined LT_SYSTEM_H*/ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libmount/libmount.h b/dingux/opt/mipsel-linux-uclibc/include/libmount/libmount.h deleted file mode 100644 index 8bb93a0..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libmount/libmount.h +++ /dev/null @@ -1,956 +0,0 @@ -/* - * mount.h - libmount API - * - * Copyright (C) 2008-2009 Karel Zak - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef _LIBMOUNT_MOUNT_H -#define _LIBMOUNT_MOUNT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#define LIBMOUNT_VERSION "2.31.1" -#define LIBMOUNT_MAJOR_VERSION 2 -#define LIBMOUNT_MINOR_VERSION 31 -#define LIBMOUNT_PATCH_VERSION 1 - -/** - * libmnt_cache: - * - * Stores canonicalized paths and evaluated tags - */ -struct libmnt_cache; - -/** - * libmnt_lock: - * - * Stores information about the locked file (e.g. /etc/mtab) - */ -struct libmnt_lock; - -/** - * libmnt_iter: - * - * Generic iterator (stores state about lists) - */ -struct libmnt_iter; - -/** - * libmnt_optmap: - * @name: option name[=type] where type is printf-like type specifier") - * @id: option ID or MS_* flags (e.g MS_RDONLY) - * @mask: MNT_{NOMTAB,INVERT,...} mask - * - * Mount options description (map) - */ -struct libmnt_optmap -{ - const char *name; - int id; - int mask; -}; - -/* - * mount options map masks - */ -#define MNT_INVERT (1 << 1) /* invert the mountflag */ -#define MNT_NOMTAB (1 << 2) /* skip in the mtab option string */ -#define MNT_PREFIX (1 << 3) /* prefix used for some options (e.g. "x-foo") */ -#define MNT_NOHLPS (1 << 4) /* don't add the option to mount. helpers command line */ - -/** - * libmnt_fs: - * - * Parsed fstab/mtab/mountinfo entry - */ -struct libmnt_fs; - -/** - * libmnt_table: - * - * List of struct libmnt_fs entries (parsed fstab/mtab/mountinfo) - */ -struct libmnt_table; - -/** - * libmnt_update - * - * /etc/mtab or utab update description - */ -struct libmnt_update; - -/** - * libmnt_context - * - * Mount/umount status - */ -struct libmnt_context; - -/** - * libmnt_monitor - * - * Mount tables monitor - */ -struct libmnt_monitor; - -/** - * libmnt_tabdiff: - * - * Stores mountinfo state - */ -struct libmnt_tabdiff; - -/* - * Actions - */ -enum { - MNT_ACT_MOUNT = 1, - MNT_ACT_UMOUNT -}; - -/* - * Errors -- by default libmount returns -errno for generic errors (ENOMEM, - * EINVAL, ...) and for mount(2) errors, but for some specific operations it - * returns private error codes. Note that maximum system errno value should be - * 4095 on UNIXes. - * - * See also mnt_context_get_syscall_errno() and mnt_context_get_helper_status(). - */ -/** - * MNT_ERR_NOFSTAB: - * - * not found required entry in fstab - */ -#define MNT_ERR_NOFSTAB 5000 -/** - * MNT_ERR_NOFSTYPE: - * - * failed to detect filesystem type - */ -#define MNT_ERR_NOFSTYPE 5001 -/** - * MNT_ERR_NOSOURCE: - * - * required mount source undefined - */ -#define MNT_ERR_NOSOURCE 5002 -/** - * MNT_ERR_LOOPDEV: - * - * loopdev setup failed, errno set by libc - */ -#define MNT_ERR_LOOPDEV 5003 -/** - * MNT_ERR_MOUNTOPT: - * - * failed to parse/use userspace mount options - */ -#define MNT_ERR_MOUNTOPT 5004 -/** - * MNT_ERR_APPLYFLAGS: - * - * failed to apply MS_PROPAGATION flags - */ -#define MNT_ERR_APPLYFLAGS 5005 -/** - * MNT_ERR_AMBIFS: - * - * libblkid detected more filesystems on the device - */ -#define MNT_ERR_AMBIFS 5006 -/** - * MNT_ERR_LOOPOVERLAP: - * - * detected overlapping loop device that cannot be re-used - */ -#define MNT_ERR_LOOPOVERLAP 5007 -/** - * MNT_ERR_LOCK: - * - * failed to lock mtab/utab or so. - */ -#define MNT_ERR_LOCK 5008 - - -/* - * Overall return codes -- based on mount(8) and umount(8) return codes. - * See mnt_context_get_excode() for more details. - */ - -/** - * MNT_EX_SUCCESS: - * - * [u]mount(8) exit code: no errors - */ -#define MNT_EX_SUCCESS 0 - -/** - * MNT_EX_USAGE: - * - * [u]mount(8) exit code: incorrect invocation or permission - */ -#define MNT_EX_USAGE 1 - -/** - * MNT_EX_SYSERR: - * - * [u]mount(8) exit code: out of memory, cannot fork, ... - */ - -#define MNT_EX_SYSERR 2 - -/** - * MNT_EX_SOFTWARE: - * - * [u]mount(8) exit code: internal mount bug or wrong version - */ -#define MNT_EX_SOFTWARE 4 - -/** - * MNT_EX_USER: - * - * [u]mount(8) exit code: user interrupt - */ -#define MNT_EX_USER 8 - -/** - * MNT_EX_FILEIO: - * - * [u]mount(8) exit code: problems writing, locking, ... mtab/utab - */ -#define MNT_EX_FILEIO 16 - -/** - * MNT_EX_FAIL: - * - * [u]mount(8) exit code: mount failure - */ -#define MNT_EX_FAIL 32 - -/** - * MNT_EX_SOMEOK: - * - * [u]mount(8) exit code: some mount succeeded; usually when executed with - * --all options. Never returned by libmount. - */ -#define MNT_EX_SOMEOK 64 - - - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#ifndef __ul_attribute__ -# if __GNUC_PREREQ (3, 4) -# define __ul_attribute__(_a_) __attribute__(_a_) -# else -# define __ul_attribute__(_a_) -# endif -#endif - - -/* init.c */ -extern void mnt_init_debug(int mask); - -/* version.c */ -extern int mnt_parse_version_string(const char *ver_string); -extern int mnt_get_library_version(const char **ver_string); -extern int mnt_get_library_features(const char ***features); - -/* utils.c */ -extern char *mnt_mangle(const char *str) - __ul_attribute__((warn_unused_result)); -extern char *mnt_unmangle(const char *str) - __ul_attribute__((warn_unused_result)); - -extern int mnt_tag_is_valid(const char *tag); -extern int mnt_fstype_is_netfs(const char *type); -extern int mnt_fstype_is_pseudofs(const char *type); - -extern int mnt_match_fstype(const char *type, const char *pattern) - __ul_attribute__((warn_unused_result)); -extern int mnt_match_options(const char *optstr, const char *pattern) - __ul_attribute__((warn_unused_result)); -extern const char *mnt_get_fstab_path(void); -extern const char *mnt_get_swaps_path(void); -extern const char *mnt_get_mtab_path(void); -extern int mnt_has_regular_mtab(const char **mtab, int *writable); -extern char *mnt_get_mountpoint(const char *path) - __ul_attribute__((warn_unused_result)); - -/* cache.c */ -extern struct libmnt_cache *mnt_new_cache(void) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_cache(struct libmnt_cache *cache); - -extern void mnt_ref_cache(struct libmnt_cache *cache); -extern void mnt_unref_cache(struct libmnt_cache *cache); - -extern int mnt_cache_set_targets(struct libmnt_cache *cache, - struct libmnt_table *mtab); -extern int mnt_cache_read_tags(struct libmnt_cache *cache, const char *devname); - -extern int mnt_cache_device_has_tag(struct libmnt_cache *cache, - const char *devname, - const char *token, - const char *value); - -extern char *mnt_cache_find_tag_value(struct libmnt_cache *cache, - const char *devname, const char *token); - -extern char *mnt_get_fstype(const char *devname, int *ambi, - struct libmnt_cache *cache) - __ul_attribute__((warn_unused_result)); -extern char *mnt_resolve_path(const char *path, struct libmnt_cache *cache) - __ul_attribute__((warn_unused_result)); -extern char *mnt_resolve_target(const char *path, struct libmnt_cache *cache) - __ul_attribute__((warn_unused_result)); -extern char *mnt_resolve_tag(const char *token, const char *value, - struct libmnt_cache *cache) - __ul_attribute__((warn_unused_result)); -extern char *mnt_resolve_spec(const char *spec, struct libmnt_cache *cache) - __ul_attribute__((warn_unused_result)); -extern char *mnt_pretty_path(const char *path, struct libmnt_cache *cache) - __ul_attribute__((warn_unused_result)); - -/* optstr.c */ -extern int mnt_optstr_next_option(char **optstr, char **name, size_t *namesz, - char **value, size_t *valuesz); -extern int mnt_optstr_append_option(char **optstr, const char *name, - const char *value); -extern int mnt_optstr_prepend_option(char **optstr, const char *name, - const char *value); - -extern int mnt_optstr_get_option(const char *optstr, const char *name, - char **value, size_t *valsz); -extern int mnt_optstr_set_option(char **optstr, const char *name, - const char *value); -extern int mnt_optstr_remove_option(char **optstr, const char *name); -extern int mnt_optstr_deduplicate_option(char **optstr, const char *name); - -extern int mnt_split_optstr(const char *optstr, - char **user, char **vfs, char **fs, - int ignore_user, int ignore_vfs); - -extern int mnt_optstr_get_options(const char *optstr, char **subset, - const struct libmnt_optmap *map, int ignore); - -extern int mnt_optstr_get_flags(const char *optstr, unsigned long *flags, - const struct libmnt_optmap *map); - -extern int mnt_optstr_apply_flags(char **optstr, unsigned long flags, - const struct libmnt_optmap *map); - -/* iter.c */ -enum { - - MNT_ITER_FORWARD = 0, - MNT_ITER_BACKWARD -}; -extern struct libmnt_iter *mnt_new_iter(int direction) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_iter(struct libmnt_iter *itr); - -extern void mnt_reset_iter(struct libmnt_iter *itr, int direction) - __ul_attribute__((nonnull)); -extern int mnt_iter_get_direction(struct libmnt_iter *itr) - __ul_attribute__((nonnull)); - -/* optmap.c */ -enum { - MNT_LINUX_MAP = 1, - MNT_USERSPACE_MAP -}; -extern const struct libmnt_optmap *mnt_get_builtin_optmap(int id); - -/* lock.c */ -extern struct libmnt_lock *mnt_new_lock(const char *datafile, pid_t id) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_lock(struct libmnt_lock *ml); - -extern void mnt_unlock_file(struct libmnt_lock *ml); -extern int mnt_lock_file(struct libmnt_lock *ml); -extern int mnt_lock_block_signals(struct libmnt_lock *ml, int enable); - -/* fs.c */ -extern struct libmnt_fs *mnt_new_fs(void) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_fs(struct libmnt_fs *fs); -extern void mnt_ref_fs(struct libmnt_fs *fs); -extern void mnt_unref_fs(struct libmnt_fs *fs); - -extern void mnt_reset_fs(struct libmnt_fs *fs); -extern struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, - const struct libmnt_fs *src) - __ul_attribute__((warn_unused_result)); -extern void *mnt_fs_get_userdata(struct libmnt_fs *fs); -extern int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data); -extern const char *mnt_fs_get_source(struct libmnt_fs *fs); -extern int mnt_fs_set_source(struct libmnt_fs *fs, const char *source); -extern const char *mnt_fs_get_srcpath(struct libmnt_fs *fs); - -extern int mnt_fs_get_tag(struct libmnt_fs *fs, const char **name, - const char **value); -extern const char *mnt_fs_get_target(struct libmnt_fs *fs); -extern int mnt_fs_set_target(struct libmnt_fs *fs, const char *tgt); -extern const char *mnt_fs_get_fstype(struct libmnt_fs *fs); -extern int mnt_fs_set_fstype(struct libmnt_fs *fs, const char *fstype); - -extern int mnt_fs_streq_srcpath(struct libmnt_fs *fs, const char *path) - __ul_attribute__((warn_unused_result)); -extern int mnt_fs_streq_target(struct libmnt_fs *fs, const char *path) - __ul_attribute__((warn_unused_result)); - -extern char *mnt_fs_strdup_options(struct libmnt_fs *fs) - __ul_attribute__((warn_unused_result)); -extern const char *mnt_fs_get_options(struct libmnt_fs *fs) - __ul_attribute__((warn_unused_result)); -extern const char *mnt_fs_get_optional_fields(struct libmnt_fs *fs) - __ul_attribute__((warn_unused_result)); -extern int mnt_fs_get_propagation(struct libmnt_fs *fs, unsigned long *flags); - -extern int mnt_fs_set_options(struct libmnt_fs *fs, const char *optstr); -extern int mnt_fs_append_options(struct libmnt_fs *fs, const char *optstr); -extern int mnt_fs_prepend_options(struct libmnt_fs *fs, const char *optstr); - -extern int mnt_fs_get_option(struct libmnt_fs *fs, const char *name, - char **value, size_t *valsz); - -extern const char *mnt_fs_get_fs_options(struct libmnt_fs *fs); -extern const char *mnt_fs_get_vfs_options(struct libmnt_fs *fs); -extern const char *mnt_fs_get_user_options(struct libmnt_fs *fs); - -extern const char *mnt_fs_get_attributes(struct libmnt_fs *fs); -extern int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr); -extern int mnt_fs_get_attribute(struct libmnt_fs *fs, const char *name, - char **value, size_t *valsz); -extern int mnt_fs_append_attributes(struct libmnt_fs *fs, const char *optstr); -extern int mnt_fs_prepend_attributes(struct libmnt_fs *fs, const char *optstr); - -extern int mnt_fs_get_freq(struct libmnt_fs *fs); -extern int mnt_fs_set_freq(struct libmnt_fs *fs, int freq); -extern int mnt_fs_get_passno(struct libmnt_fs *fs); -extern int mnt_fs_set_passno(struct libmnt_fs *fs, int passno); -extern const char *mnt_fs_get_root(struct libmnt_fs *fs); -extern int mnt_fs_set_root(struct libmnt_fs *fs, const char *path); -extern const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs); -extern int mnt_fs_set_bindsrc(struct libmnt_fs *fs, const char *src); -extern int mnt_fs_get_id(struct libmnt_fs *fs); -extern int mnt_fs_get_parent_id(struct libmnt_fs *fs); -extern dev_t mnt_fs_get_devno(struct libmnt_fs *fs); -extern pid_t mnt_fs_get_tid(struct libmnt_fs *fs); - -extern const char *mnt_fs_get_swaptype(struct libmnt_fs *fs); -extern off_t mnt_fs_get_size(struct libmnt_fs *fs); -extern off_t mnt_fs_get_usedsize(struct libmnt_fs *fs); -extern int mnt_fs_get_priority(struct libmnt_fs *fs); -extern int mnt_fs_set_priority(struct libmnt_fs *fs, int prio); - -extern const char *mnt_fs_get_comment(struct libmnt_fs *fs); -extern int mnt_fs_set_comment(struct libmnt_fs *fs, const char *comm); -extern int mnt_fs_append_comment(struct libmnt_fs *fs, const char *comm); - -extern int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, - struct libmnt_cache *cache); -extern int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, - struct libmnt_cache *cache); -extern int mnt_fs_match_fstype(struct libmnt_fs *fs, const char *types); -extern int mnt_fs_match_options(struct libmnt_fs *fs, const char *options); -extern int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file); - -extern int mnt_fs_is_kernel(struct libmnt_fs *fs); -extern int mnt_fs_is_swaparea(struct libmnt_fs *fs); -extern int mnt_fs_is_netfs(struct libmnt_fs *fs); -extern int mnt_fs_is_pseudofs(struct libmnt_fs *fs); - -extern void mnt_free_mntent(struct mntent *mnt); -extern int mnt_fs_to_mntent(struct libmnt_fs *fs, struct mntent **mnt); - -/* tab-parse.c */ -extern struct libmnt_table *mnt_new_table_from_file(const char *filename) - __ul_attribute__((warn_unused_result)); -extern struct libmnt_table *mnt_new_table_from_dir(const char *dirname) - __ul_attribute__((warn_unused_result)); -extern int mnt_table_parse_stream(struct libmnt_table *tb, FILE *f, - const char *filename); -extern int mnt_table_parse_file(struct libmnt_table *tb, const char *filename); -extern int mnt_table_parse_dir(struct libmnt_table *tb, const char *dirname); - -extern int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename); -extern int mnt_table_parse_swaps(struct libmnt_table *tb, const char *filename); -extern int mnt_table_parse_mtab(struct libmnt_table *tb, const char *filename); -extern int mnt_table_set_parser_errcb(struct libmnt_table *tb, - int (*cb)(struct libmnt_table *tb, const char *filename, int line)); - -/* tab.c */ -extern struct libmnt_table *mnt_new_table(void) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_table(struct libmnt_table *tb); - -extern void mnt_ref_table(struct libmnt_table *tb); -extern void mnt_unref_table(struct libmnt_table *tb); - -extern int mnt_reset_table(struct libmnt_table *tb); -extern int mnt_table_get_nents(struct libmnt_table *tb); -extern int mnt_table_is_empty(struct libmnt_table *tb); - -extern int mnt_table_set_userdata(struct libmnt_table *tb, void *data); -extern void *mnt_table_get_userdata(struct libmnt_table *tb); - -extern void mnt_table_enable_comments(struct libmnt_table *tb, int enable); -extern int mnt_table_with_comments(struct libmnt_table *tb); -extern const char *mnt_table_get_intro_comment(struct libmnt_table *tb); -extern int mnt_table_set_intro_comment(struct libmnt_table *tb, const char *comm); -extern int mnt_table_append_intro_comment(struct libmnt_table *tb, const char *comm); -extern int mnt_table_set_trailing_comment(struct libmnt_table *tb, const char *comm); -extern const char *mnt_table_get_trailing_comment(struct libmnt_table *tb); -extern int mnt_table_append_trailing_comment(struct libmnt_table *tb, const char *comm); - -extern int mnt_table_set_cache(struct libmnt_table *tb, struct libmnt_cache *mpc); -extern struct libmnt_cache *mnt_table_get_cache(struct libmnt_table *tb); -extern int mnt_table_add_fs(struct libmnt_table *tb, struct libmnt_fs *fs); -extern int mnt_table_remove_fs(struct libmnt_table *tb, struct libmnt_fs *fs); -extern int mnt_table_first_fs(struct libmnt_table *tb, struct libmnt_fs **fs); -extern int mnt_table_last_fs(struct libmnt_table *tb, struct libmnt_fs **fs); -extern int mnt_table_next_fs(struct libmnt_table *tb, struct libmnt_iter *itr, - struct libmnt_fs **fs); -extern int mnt_table_next_child_fs(struct libmnt_table *tb, struct libmnt_iter *itr, - struct libmnt_fs *parent, struct libmnt_fs **chld); -extern int mnt_table_get_root_fs(struct libmnt_table *tb, struct libmnt_fs **root); -extern int mnt_table_set_iter(struct libmnt_table *tb, struct libmnt_iter *itr, - struct libmnt_fs *fs); - -enum { - MNT_UNIQ_FORWARD = (1 << 1), /* default is backward */ - MNT_UNIQ_KEEPTREE = (1 << 2) -}; -extern int mnt_table_uniq_fs(struct libmnt_table *tb, int flags, - int (*cmp)(struct libmnt_table *, - struct libmnt_fs *, - struct libmnt_fs *)); - -extern struct libmnt_fs *mnt_table_find_mountpoint(struct libmnt_table *tb, - const char *path, int direction); -extern struct libmnt_fs *mnt_table_find_target(struct libmnt_table *tb, - const char *path, int direction); -extern struct libmnt_fs *mnt_table_find_srcpath(struct libmnt_table *tb, - const char *path, int direction); -extern struct libmnt_fs *mnt_table_find_tag(struct libmnt_table *tb, const char *tag, - const char *val, int direction); -extern struct libmnt_fs *mnt_table_find_target_with_option(struct libmnt_table *tb, const char *path, - const char *option, const char *val, int direction); -extern struct libmnt_fs *mnt_table_find_source(struct libmnt_table *tb, - const char *source, int direction); -extern struct libmnt_fs *mnt_table_find_pair(struct libmnt_table *tb, - const char *source, - const char *target, int direction); -extern struct libmnt_fs *mnt_table_find_devno(struct libmnt_table *tb, - dev_t devno, int direction); - -extern int mnt_table_find_next_fs(struct libmnt_table *tb, - struct libmnt_iter *itr, - int (*match_func)(struct libmnt_fs *, void *), - void *userdata, - struct libmnt_fs **fs); - -extern int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs); - -/* tab_update.c */ -extern struct libmnt_update *mnt_new_update(void) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_update(struct libmnt_update *upd); - -extern int mnt_table_replace_file(struct libmnt_table *tb, const char *filename); -extern int mnt_table_write_file(struct libmnt_table *tb, FILE *file); - -extern int mnt_update_is_ready(struct libmnt_update *upd); -extern int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags, - const char *target, struct libmnt_fs *fs); -extern int mnt_update_table(struct libmnt_update *upd, struct libmnt_lock *lc); -extern unsigned long mnt_update_get_mflags(struct libmnt_update *upd); -extern int mnt_update_force_rdonly(struct libmnt_update *upd, int rdonly); -extern const char *mnt_update_get_filename(struct libmnt_update *upd); -extern struct libmnt_fs *mnt_update_get_fs(struct libmnt_update *upd); - -/* tab_diff.c */ -enum { - MNT_TABDIFF_MOUNT = 1, - MNT_TABDIFF_UMOUNT, - MNT_TABDIFF_MOVE, - MNT_TABDIFF_REMOUNT, - MNT_TABDIFF_PROPAGATION, /* not implemented yet (TODO) */ -}; - -extern struct libmnt_tabdiff *mnt_new_tabdiff(void) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_tabdiff(struct libmnt_tabdiff *df); - -extern int mnt_diff_tables(struct libmnt_tabdiff *df, - struct libmnt_table *old_tab, - struct libmnt_table *new_tab); - -extern int mnt_tabdiff_next_change(struct libmnt_tabdiff *df, - struct libmnt_iter *itr, - struct libmnt_fs **old_fs, - struct libmnt_fs **new_fs, - int *oper); - -/* monitor.c */ -enum { - MNT_MONITOR_TYPE_USERSPACE = 1, /* userspace mount options */ - MNT_MONITOR_TYPE_KERNEL /* kernel mount table */ -}; - -extern struct libmnt_monitor *mnt_new_monitor(void); -extern void mnt_ref_monitor(struct libmnt_monitor *mn); -extern void mnt_unref_monitor(struct libmnt_monitor *mn); - -extern int mnt_monitor_enable_kernel(struct libmnt_monitor *mn, int enable); -extern int mnt_monitor_enable_userspace(struct libmnt_monitor *mn, - int enable, const char *filename); - -extern int mnt_monitor_get_fd(struct libmnt_monitor *mn); -extern int mnt_monitor_close_fd(struct libmnt_monitor *mn); -extern int mnt_monitor_wait(struct libmnt_monitor *mn, int timeout); - -extern int mnt_monitor_next_change(struct libmnt_monitor *mn, - const char **filename, int *type); -extern int mnt_monitor_event_cleanup(struct libmnt_monitor *mn); - - -/* context.c */ - -/* - * Mode for mount options from fstab (or mtab), see mnt_context_set_optsmode(). - */ -enum { - MNT_OMODE_IGNORE = (1 << 1), /* ignore mtab/fstab options */ - MNT_OMODE_APPEND = (1 << 2), /* append mtab/fstab options to existing options */ - MNT_OMODE_PREPEND = (1 << 3), /* prepend mtab/fstab options to existing options */ - MNT_OMODE_REPLACE = (1 << 4), /* replace existing options with options from mtab/fstab */ - - MNT_OMODE_FORCE = (1 << 5), /* always read mtab/fstab options */ - - MNT_OMODE_FSTAB = (1 << 10), /* read from fstab */ - MNT_OMODE_MTAB = (1 << 11), /* read from mtab if fstab not enabled or failed */ - MNT_OMODE_NOTAB = (1 << 12), /* do not read fstab/mtab at all */ - - /* default */ - MNT_OMODE_AUTO = (MNT_OMODE_PREPEND | MNT_OMODE_FSTAB | MNT_OMODE_MTAB), - /* non-root users */ - MNT_OMODE_USER = (MNT_OMODE_REPLACE | MNT_OMODE_FORCE | MNT_OMODE_FSTAB) -}; - -extern struct libmnt_context *mnt_new_context(void) - __ul_attribute__((warn_unused_result)); -extern void mnt_free_context(struct libmnt_context *cxt); - -extern int mnt_reset_context(struct libmnt_context *cxt); -extern int mnt_context_is_restricted(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); - -extern int mnt_context_init_helper(struct libmnt_context *cxt, - int action, int flags); -extern int mnt_context_helper_setopt(struct libmnt_context *cxt, int c, char *arg); - -extern int mnt_context_set_optsmode(struct libmnt_context *cxt, int mode); -extern int mnt_context_disable_canonicalize(struct libmnt_context *cxt, int disable); -extern int mnt_context_enable_lazy(struct libmnt_context *cxt, int enable); -extern int mnt_context_enable_rdonly_umount(struct libmnt_context *cxt, int enable); -extern int mnt_context_enable_rwonly_mount(struct libmnt_context *cxt, int enable); -extern int mnt_context_disable_helpers(struct libmnt_context *cxt, int disable); -extern int mnt_context_enable_sloppy(struct libmnt_context *cxt, int enable); -extern int mnt_context_enable_fake(struct libmnt_context *cxt, int enable); -extern int mnt_context_disable_mtab(struct libmnt_context *cxt, int disable); -extern int mnt_context_enable_force(struct libmnt_context *cxt, int enable); -extern int mnt_context_enable_verbose(struct libmnt_context *cxt, int enable); -extern int mnt_context_enable_loopdel(struct libmnt_context *cxt, int enable); -extern int mnt_context_enable_fork(struct libmnt_context *cxt, int enable); -extern int mnt_context_disable_swapmatch(struct libmnt_context *cxt, int disable); - -extern int mnt_context_get_optsmode(struct libmnt_context *cxt); - -extern int mnt_context_is_lazy(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_rdonly_umount(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_rwonly_mount(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_sloppy(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_fake(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_nomtab(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_force(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_verbose(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_loopdel(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_nohelpers(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_nocanonicalize(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_swapmatch(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_forced_rdonly(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); - -extern int mnt_context_is_fork(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_parent(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); -extern int mnt_context_is_child(struct libmnt_context *cxt) - __ul_attribute__((nonnull)); - -extern int mnt_context_wait_for_children(struct libmnt_context *cxt, - int *nchildren, int *nerrs); - -extern int mnt_context_is_fs_mounted(struct libmnt_context *cxt, - struct libmnt_fs *fs, int *mounted); -extern int mnt_context_set_fs(struct libmnt_context *cxt, struct libmnt_fs *fs); -extern struct libmnt_fs *mnt_context_get_fs(struct libmnt_context *cxt); - -extern int mnt_context_set_source(struct libmnt_context *cxt, const char *source); -extern int mnt_context_set_target(struct libmnt_context *cxt, const char *target); -extern int mnt_context_set_fstype(struct libmnt_context *cxt, const char *fstype); - -extern const char *mnt_context_get_source(struct libmnt_context *cxt); -extern const char *mnt_context_get_target(struct libmnt_context *cxt); -extern const char *mnt_context_get_fstype(struct libmnt_context *cxt); - -extern void *mnt_context_get_mtab_userdata(struct libmnt_context *cxt); -extern void *mnt_context_get_fstab_userdata(struct libmnt_context *cxt); -extern void *mnt_context_get_fs_userdata(struct libmnt_context *cxt); - -extern int mnt_context_set_options(struct libmnt_context *cxt, const char *optstr); -extern int mnt_context_append_options(struct libmnt_context *cxt, const char *optstr); - -extern const char *mnt_context_get_options(struct libmnt_context *cxt); - -extern int mnt_context_set_fstype_pattern(struct libmnt_context *cxt, const char *pattern); -extern int mnt_context_set_options_pattern(struct libmnt_context *cxt, const char *pattern); - -extern int mnt_context_set_passwd_cb(struct libmnt_context *cxt, - char *(*get)(struct libmnt_context *), - void (*release)(struct libmnt_context *, char *)) - __ul_attribute__((deprecated)); - -extern int mnt_context_set_tables_errcb(struct libmnt_context *cxt, - int (*cb)(struct libmnt_table *tb, const char *filename, int line)); -extern int mnt_context_set_fstab(struct libmnt_context *cxt, - struct libmnt_table *tb); -extern int mnt_context_get_fstab(struct libmnt_context *cxt, - struct libmnt_table **tb); - -extern int mnt_context_get_mtab(struct libmnt_context *cxt, - struct libmnt_table **tb); -extern int mnt_context_get_table(struct libmnt_context *cxt, - const char *filename, - struct libmnt_table **tb); -extern int mnt_context_set_cache(struct libmnt_context *cxt, - struct libmnt_cache *cache); -extern struct libmnt_cache *mnt_context_get_cache(struct libmnt_context *cxt); -extern struct libmnt_lock *mnt_context_get_lock(struct libmnt_context *cxt); -extern int mnt_context_set_mflags(struct libmnt_context *cxt, - unsigned long flags); -extern int mnt_context_get_mflags(struct libmnt_context *cxt, - unsigned long *flags); -extern int mnt_context_set_user_mflags(struct libmnt_context *cxt, - unsigned long flags); -extern int mnt_context_get_user_mflags(struct libmnt_context *cxt, - unsigned long *flags); - -extern int mnt_context_set_mountdata(struct libmnt_context *cxt, void *data); -extern int mnt_context_apply_fstab(struct libmnt_context *cxt); - -extern int mnt_context_reset_status(struct libmnt_context *cxt); -extern int mnt_context_get_status(struct libmnt_context *cxt); - -extern int mnt_context_helper_executed(struct libmnt_context *cxt); -extern int mnt_context_get_helper_status(struct libmnt_context *cxt); - -extern int mnt_context_syscall_called(struct libmnt_context *cxt); - -extern int mnt_context_get_syscall_errno(struct libmnt_context *cxt); - -extern int mnt_context_strerror(struct libmnt_context *cxt, char *buf, - size_t bufsiz) - __ul_attribute__((deprecated)); - -extern int mnt_context_get_excode(struct libmnt_context *cxt, - int rc, char *buf, size_t bufsz); - - -/* context_mount.c */ -extern int mnt_context_mount(struct libmnt_context *cxt); -extern int mnt_context_umount(struct libmnt_context *cxt); -extern int mnt_context_next_mount(struct libmnt_context *cxt, - struct libmnt_iter *itr, - struct libmnt_fs **fs, - int *mntrc, int *ignored); - -extern int mnt_context_prepare_mount(struct libmnt_context *cxt) - __ul_attribute__((warn_unused_result)); -extern int mnt_context_do_mount(struct libmnt_context *cxt); -extern int mnt_context_finalize_mount(struct libmnt_context *cxt); - -/* context_umount.c */ -extern int mnt_context_find_umount_fs(struct libmnt_context *cxt, - const char *tgt, - struct libmnt_fs **pfs); -extern int mnt_context_next_umount(struct libmnt_context *cxt, - struct libmnt_iter *itr, - struct libmnt_fs **fs, - int *mntrc, int *ignored); - -extern int mnt_context_prepare_umount(struct libmnt_context *cxt) - __ul_attribute__((warn_unused_result)); -extern int mnt_context_do_umount(struct libmnt_context *cxt); -extern int mnt_context_finalize_umount(struct libmnt_context *cxt); - -extern int mnt_context_tab_applied(struct libmnt_context *cxt); -extern int mnt_context_set_syscall_status(struct libmnt_context *cxt, int status); - -/* - * mount(8) userspace options masks (MNT_MAP_USERSPACE map) - */ -#define MNT_MS_NOAUTO (1 << 2) -#define MNT_MS_USER (1 << 3) -#define MNT_MS_USERS (1 << 4) -#define MNT_MS_OWNER (1 << 5) -#define MNT_MS_GROUP (1 << 6) -#define MNT_MS_NETDEV (1 << 7) -#define MNT_MS_COMMENT (1 << 8) -#define MNT_MS_LOOP (1 << 9) -#define MNT_MS_NOFAIL (1 << 10) -#define MNT_MS_UHELPER (1 << 11) -#define MNT_MS_HELPER (1 << 12) -#define MNT_MS_XCOMMENT (1 << 13) -#define MNT_MS_OFFSET (1 << 14) -#define MNT_MS_SIZELIMIT (1 << 15) -#define MNT_MS_ENCRYPTION (1 << 16) -#define MNT_MS_XFSTABCOMM (1 << 17) - -/* - * mount(2) MS_* masks (MNT_MAP_LINUX map) - */ -#ifndef MS_RDONLY -#define MS_RDONLY 1 /* Mount read-only */ -#endif -#ifndef MS_NOSUID -#define MS_NOSUID 2 /* Ignore suid and sgid bits */ -#endif -#ifndef MS_NODEV -#define MS_NODEV 4 /* Disallow access to device special files */ -#endif -#ifndef MS_NOEXEC -#define MS_NOEXEC 8 /* Disallow program execution */ -#endif -#ifndef MS_SYNCHRONOUS -#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ -#endif -#ifndef MS_REMOUNT -#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ -#endif -#ifndef MS_MANDLOCK -#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */ -#endif -#ifndef MS_DIRSYNC -#define MS_DIRSYNC 128 /* Directory modifications are synchronous */ -#endif -#ifndef MS_NOATIME -#define MS_NOATIME 0x400 /* 1024: Do not update access times. */ -#endif -#ifndef MS_NODIRATIME -#define MS_NODIRATIME 0x800 /* 2048: Don't update directory access times */ -#endif -#ifndef MS_BIND -#define MS_BIND 0x1000 /* 4096: Mount existing tree elsewhere as well */ -#endif -#ifndef MS_MOVE -#define MS_MOVE 0x2000 /* 8192: Atomically move the tree */ -#endif -#ifndef MS_REC -#define MS_REC 0x4000 /* 16384: Recursive loopback */ -#endif -#ifndef MS_SILENT -#define MS_SILENT 0x8000 /* 32768: Don't emit certain kernel messages */ -#endif -#ifndef MS_UNBINDABLE -#define MS_UNBINDABLE (1<<17) /* 131072: Make unbindable */ -#endif -#ifndef MS_PRIVATE -#define MS_PRIVATE (1<<18) /* 262144: Make private */ -#endif -#ifndef MS_SLAVE -#define MS_SLAVE (1<<19) /* 524288: Make slave */ -#endif -#ifndef MS_SHARED -#define MS_SHARED (1<<20) /* 1048576: Make shared */ -#endif -#ifndef MS_RELATIME -#define MS_RELATIME (1<<21) /* 2097152: Update atime relative to mtime/ctime */ -#endif -#ifndef MS_I_VERSION -#define MS_I_VERSION (1<<23) /* Update the inode I_version field */ -#endif -#ifndef MS_STRICTATIME -#define MS_STRICTATIME (1<<24) /* Always perform atime updates */ -#endif -#ifndef MS_LAZYTIME -#define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */ -#endif - - -/* - * Magic mount flag number. Had to be or-ed to the flag values. - */ -#ifndef MS_MGC_VAL -#define MS_MGC_VAL 0xC0ED0000 /* magic flag number to indicate "new" flags */ -#endif -#ifndef MS_MGC_MSK -#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */ -#endif - - -/* Shared-subtree options */ -#define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE) - -/* Options that we make ordinary users have by default. */ -#define MS_SECURE (MS_NOEXEC|MS_NOSUID|MS_NODEV) - -/* Options that we make owner-mounted devices have by default */ -#define MS_OWNERSECURE (MS_NOSUID|MS_NODEV) - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBMOUNT_MOUNT_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libsmartcols/libsmartcols.h b/dingux/opt/mipsel-linux-uclibc/include/libsmartcols/libsmartcols.h deleted file mode 100644 index b08b544..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libsmartcols/libsmartcols.h +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Prints table or tree. - * - * Copyright (C) 2014 Ondrej Oprala - * Copyright (C) 2014 Karel Zak - * - * This file may be redistributed under the terms of the - * GNU Lesser General Public License. - */ -#ifndef _LIBSMARTCOLS_H -#define _LIBSMARTCOLS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/** - * LIBSMARTCOLS_VERSION: - * - * Library version string - */ -#define LIBSMARTCOLS_VERSION "2.31.1" - -/** - * libscols_iter: - * - * Generic iterator - */ -struct libscols_iter; - -/** - * libscols_symbols: - * - * Symbol groups for printing tree hierarchies - */ -struct libscols_symbols; - -/** - * libscols_cell: - * - * A cell - the smallest library object - */ -struct libscols_cell; - -/** - * libscols_line: - * - * A line - an array of cells - */ -struct libscols_line; - -/** - * libscols_table: - * - * A table - The most abstract object, encapsulating lines, columns, symbols and cells - */ -struct libscols_table; - -/** - * libscols_column: - * - * A column - defines the number of columns and column names - */ -struct libscols_column; - -/* iter.c */ -enum { - - SCOLS_ITER_FORWARD = 0, - SCOLS_ITER_BACKWARD -}; - -/* - * Column flags - */ -enum { - SCOLS_FL_TRUNC = (1 << 0), /* truncate fields data if necessary */ - SCOLS_FL_TREE = (1 << 1), /* use tree "ascii art" */ - SCOLS_FL_RIGHT = (1 << 2), /* align to the right */ - SCOLS_FL_STRICTWIDTH = (1 << 3), /* don't reduce width if column is empty */ - SCOLS_FL_NOEXTREMES = (1 << 4), /* ignore extreme fields when count column width*/ - SCOLS_FL_HIDDEN = (1 << 5), /* maintain data, but don't print */ - SCOLS_FL_WRAP = (1 << 6) /* wrap long lines to multi-line cells */ -}; - -/* - * Cell flags, see scols_cell_set_flags() before use - */ -enum { - /* alignment evaluated in order: right,center,left */ - SCOLS_CELL_FL_LEFT = 0, - SCOLS_CELL_FL_CENTER = (1 << 0), - SCOLS_CELL_FL_RIGHT = (1 << 1) -}; - -extern struct libscols_iter *scols_new_iter(int direction); -extern void scols_free_iter(struct libscols_iter *itr); -extern void scols_reset_iter(struct libscols_iter *itr, int direction); -extern int scols_iter_get_direction(const struct libscols_iter *itr); - -/* init.c */ -extern void scols_init_debug(int mask); - -/* version.c */ -extern int scols_parse_version_string(const char *ver_string); -extern int scols_get_library_version(const char **ver_string); - -/* symbols.c */ -extern struct libscols_symbols *scols_new_symbols(void); -extern void scols_ref_symbols(struct libscols_symbols *sy); -extern void scols_unref_symbols(struct libscols_symbols *sy); -extern struct libscols_symbols *scols_copy_symbols(const struct libscols_symbols *sy); -extern int scols_symbols_set_branch(struct libscols_symbols *sy, const char *str); -extern int scols_symbols_set_vertical(struct libscols_symbols *sy, const char *str); -extern int scols_symbols_set_right(struct libscols_symbols *sy, const char *str); -extern int scols_symbols_set_title_padding(struct libscols_symbols *sy, const char *str); -extern int scols_symbols_set_cell_padding(struct libscols_symbols *sy, const char *str); - -/* cell.c */ -extern int scols_reset_cell(struct libscols_cell *ce); -extern int scols_cell_copy_content(struct libscols_cell *dest, - const struct libscols_cell *src); -extern int scols_cell_set_data(struct libscols_cell *ce, const char *data); -extern int scols_cell_refer_data(struct libscols_cell *ce, char *data); -extern const char *scols_cell_get_data(const struct libscols_cell *ce); -extern int scols_cell_set_color(struct libscols_cell *ce, const char *color); -extern const char *scols_cell_get_color(const struct libscols_cell *ce); - -extern int scols_cell_set_flags(struct libscols_cell *ce, int flags); -extern int scols_cell_get_flags(const struct libscols_cell *ce); -extern int scols_cell_get_alignment(const struct libscols_cell *ce); - -extern void *scols_cell_get_userdata(struct libscols_cell *ce); -extern int scols_cell_set_userdata(struct libscols_cell *ce, void *data); - -extern int scols_cmpstr_cells(struct libscols_cell *a, - struct libscols_cell *b, void *data); -/* column.c */ -extern int scols_column_is_tree(const struct libscols_column *cl); -extern int scols_column_is_trunc(const struct libscols_column *cl); -extern int scols_column_is_right(const struct libscols_column *cl); -extern int scols_column_is_strict_width(const struct libscols_column *cl); -extern int scols_column_is_hidden(const struct libscols_column *cl); -extern int scols_column_is_noextremes(const struct libscols_column *cl); -extern int scols_column_is_wrap(const struct libscols_column *cl); -extern int scols_column_is_customwrap(const struct libscols_column *cl); - -extern size_t scols_column_get_width(const struct libscols_column *cl); - -extern int scols_column_set_safechars(struct libscols_column *cl, const char *safe); -extern const char *scols_column_get_safechars(const struct libscols_column *cl); - -extern int scols_column_set_flags(struct libscols_column *cl, int flags); -extern int scols_column_get_flags(const struct libscols_column *cl); -extern struct libscols_column *scols_new_column(void); -extern void scols_ref_column(struct libscols_column *cl); -extern void scols_unref_column(struct libscols_column *cl); -extern struct libscols_column *scols_copy_column(const struct libscols_column *cl); -extern int scols_column_set_whint(struct libscols_column *cl, double whint); -extern double scols_column_get_whint(const struct libscols_column *cl); -extern struct libscols_cell *scols_column_get_header(struct libscols_column *cl); -extern int scols_column_set_color(struct libscols_column *cl, const char *color); -extern const char *scols_column_get_color(const struct libscols_column *cl); -extern struct libscols_table *scols_column_get_table(const struct libscols_column *cl); - -extern int scols_column_set_cmpfunc(struct libscols_column *cl, - int (*cmp)(struct libscols_cell *a, - struct libscols_cell *b, void *), - void *data); - -extern int scols_column_set_wrapfunc(struct libscols_column *cl, - size_t (*wrap_chunksize)(const struct libscols_column *, - const char *, void *), - char * (*wrap_nextchunk)(const struct libscols_column *, - char *, void *), - void *userdata); - -extern char *scols_wrapnl_nextchunk(const struct libscols_column *cl, char *data, void *userdata); -extern size_t scols_wrapnl_chunksize(const struct libscols_column *cl, const char *data, void *userdata); - -/* line.c */ -extern struct libscols_line *scols_new_line(void); -extern void scols_ref_line(struct libscols_line *ln); -extern void scols_unref_line(struct libscols_line *ln); -extern int scols_line_alloc_cells(struct libscols_line *ln, size_t n); -extern void scols_line_free_cells(struct libscols_line *ln); -extern int scols_line_set_userdata(struct libscols_line *ln, void *data); -extern void *scols_line_get_userdata(struct libscols_line *ln); -extern int scols_line_remove_child(struct libscols_line *ln, struct libscols_line *child); -extern int scols_line_add_child(struct libscols_line *ln, struct libscols_line *child); -extern int scols_line_has_children(struct libscols_line *ln); -extern int scols_line_is_ancestor(struct libscols_line *ln, struct libscols_line *parent); -extern int scols_line_next_child(struct libscols_line *ln, - struct libscols_iter *itr, struct libscols_line **chld); -extern struct libscols_line *scols_line_get_parent(const struct libscols_line *ln); -extern int scols_line_set_color(struct libscols_line *ln, const char *color); -extern const char *scols_line_get_color(const struct libscols_line *ln); -extern size_t scols_line_get_ncells(const struct libscols_line *ln); -extern struct libscols_cell *scols_line_get_cell(struct libscols_line *ln, size_t n); -extern struct libscols_cell *scols_line_get_column_cell( - struct libscols_line *ln, - struct libscols_column *cl); -extern int scols_line_set_data(struct libscols_line *ln, size_t n, const char *data); -extern int scols_line_refer_data(struct libscols_line *ln, size_t n, char *data); -extern int scols_line_set_column_data(struct libscols_line *ln, struct libscols_column *cl, const char *data); -extern int scols_line_refer_column_data(struct libscols_line *ln, struct libscols_column *cl, char *data); -extern struct libscols_line *scols_copy_line(const struct libscols_line *ln); - -/* table */ -extern int scols_table_colors_wanted(const struct libscols_table *tb); -extern int scols_table_set_name(struct libscols_table *tb, const char *name); -extern const char *scols_table_get_name(const struct libscols_table *tb); -extern struct libscols_cell *scols_table_get_title(struct libscols_table *tb); -extern int scols_table_is_raw(const struct libscols_table *tb); -extern int scols_table_is_ascii(const struct libscols_table *tb); -extern int scols_table_is_json(const struct libscols_table *tb); -extern int scols_table_is_noheadings(const struct libscols_table *tb); -extern int scols_table_is_header_repeat(const struct libscols_table *tb); -extern int scols_table_is_empty(const struct libscols_table *tb); -extern int scols_table_is_export(const struct libscols_table *tb); -extern int scols_table_is_maxout(const struct libscols_table *tb); -extern int scols_table_is_nowrap(const struct libscols_table *tb); -extern int scols_table_is_nolinesep(const struct libscols_table *tb); -extern int scols_table_is_tree(const struct libscols_table *tb); -extern int scols_table_is_noencoding(const struct libscols_table *tb); - -extern int scols_table_enable_colors(struct libscols_table *tb, int enable); -extern int scols_table_enable_raw(struct libscols_table *tb, int enable); -extern int scols_table_enable_ascii(struct libscols_table *tb, int enable); -extern int scols_table_enable_json(struct libscols_table *tb, int enable); -extern int scols_table_enable_noheadings(struct libscols_table *tb, int enable); -extern int scols_table_enable_header_repeat(struct libscols_table *tb, int enable); -extern int scols_table_enable_export(struct libscols_table *tb, int enable); -extern int scols_table_enable_maxout(struct libscols_table *tb, int enable); -extern int scols_table_enable_nowrap(struct libscols_table *tb, int enable); -extern int scols_table_enable_nolinesep(struct libscols_table *tb, int enable); -extern int scols_table_enable_noencoding(struct libscols_table *tb, int enable); - -extern int scols_table_set_column_separator(struct libscols_table *tb, const char *sep); -extern int scols_table_set_line_separator(struct libscols_table *tb, const char *sep); - -extern struct libscols_table *scols_new_table(void); -extern void scols_ref_table(struct libscols_table *tb); -extern void scols_unref_table(struct libscols_table *tb); -extern int scols_table_add_column(struct libscols_table *tb, struct libscols_column *cl); -extern int scols_table_remove_column(struct libscols_table *tb, struct libscols_column *cl); -extern int scols_table_remove_columns(struct libscols_table *tb); -extern int scols_table_move_column(struct libscols_table *tb, struct libscols_column *pre, struct libscols_column *cl); -extern struct libscols_column *scols_table_new_column(struct libscols_table *tb, const char *name, double whint, int flags); -extern int scols_table_next_column(struct libscols_table *tb, struct libscols_iter *itr, struct libscols_column **cl); -extern const char *scols_table_get_column_separator(const struct libscols_table *tb); -extern const char *scols_table_get_line_separator(const struct libscols_table *tb); -extern size_t scols_table_get_ncols(const struct libscols_table *tb); -extern size_t scols_table_get_nlines(const struct libscols_table *tb); -extern struct libscols_column *scols_table_get_column(struct libscols_table *tb, size_t n); -extern int scols_table_add_line(struct libscols_table *tb, struct libscols_line *ln); -extern int scols_table_remove_line(struct libscols_table *tb, struct libscols_line *ln); -extern void scols_table_remove_lines(struct libscols_table *tb); -extern int scols_table_next_line(struct libscols_table *tb, struct libscols_iter *itr, struct libscols_line **ln); -extern struct libscols_line *scols_table_new_line(struct libscols_table *tb, struct libscols_line *parent); -extern struct libscols_line *scols_table_get_line(struct libscols_table *tb, size_t n); -extern struct libscols_table *scols_copy_table(struct libscols_table *tb); -extern int scols_table_set_symbols(struct libscols_table *tb, struct libscols_symbols *sy); -extern int scols_table_set_default_symbols(struct libscols_table *tb); -extern struct libscols_symbols *scols_table_get_symbols(const struct libscols_table *tb); - -extern int scols_table_set_stream(struct libscols_table *tb, FILE *stream); -extern FILE *scols_table_get_stream(const struct libscols_table *tb); -extern int scols_table_reduce_termwidth(struct libscols_table *tb, size_t reduce); - -extern int scols_sort_table(struct libscols_table *tb, struct libscols_column *cl); -extern int scols_sort_table_by_tree(struct libscols_table *tb); -/* - * - */ -enum { - SCOLS_TERMFORCE_AUTO = 0, - SCOLS_TERMFORCE_NEVER, - SCOLS_TERMFORCE_ALWAYS -}; -extern int scols_table_set_termforce(struct libscols_table *tb, int force); -extern int scols_table_get_termforce(const struct libscols_table *tb); -extern int scols_table_set_termwidth(struct libscols_table *tb, size_t width); -extern size_t scols_table_get_termwidth(const struct libscols_table *tb); -extern int scols_table_set_termheight(struct libscols_table *tb, size_t height); -extern size_t scols_table_get_termheight(const struct libscols_table *tb); - - -/* table_print.c */ -extern int scols_print_table(struct libscols_table *tb); -extern int scols_print_table_to_string(struct libscols_table *tb, char **data); - -extern int scols_table_print_range( struct libscols_table *tb, - struct libscols_line *start, - struct libscols_line *end); -extern int scols_table_print_range_to_string( struct libscols_table *tb, - struct libscols_line *start, - struct libscols_line *end, - char **data); - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBSMARTCOLS_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/DOCBparser.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/DOCBparser.h deleted file mode 100644 index 9394fa7..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/DOCBparser.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Summary: old DocBook SGML parser - * Description: interface for a DocBook SGML non-verifying parser - * This code is DEPRECATED, and should not be used anymore. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __DOCB_PARSER_H__ -#define __DOCB_PARSER_H__ -#include - -#ifdef LIBXML_DOCB_ENABLED - -#include -#include - -#ifndef IN_LIBXML -#ifdef __GNUC__ -#warning "The DOCBparser module has been deprecated in libxml2-2.6.0" -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Most of the back-end structures from XML and SGML are shared. - */ -typedef xmlParserCtxt docbParserCtxt; -typedef xmlParserCtxtPtr docbParserCtxtPtr; -typedef xmlSAXHandler docbSAXHandler; -typedef xmlSAXHandlerPtr docbSAXHandlerPtr; -typedef xmlParserInput docbParserInput; -typedef xmlParserInputPtr docbParserInputPtr; -typedef xmlDocPtr docbDocPtr; - -/* - * There is only few public functions. - */ -XMLPUBFUN int XMLCALL - docbEncodeEntities(unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen, int quoteChar); - -XMLPUBFUN docbDocPtr XMLCALL - docbSAXParseDoc (xmlChar *cur, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -XMLPUBFUN docbDocPtr XMLCALL - docbParseDoc (xmlChar *cur, - const char *encoding); -XMLPUBFUN docbDocPtr XMLCALL - docbSAXParseFile (const char *filename, - const char *encoding, - docbSAXHandlerPtr sax, - void *userData); -XMLPUBFUN docbDocPtr XMLCALL - docbParseFile (const char *filename, - const char *encoding); - -/** - * Interfaces for the Push mode. - */ -XMLPUBFUN void XMLCALL - docbFreeParserCtxt (docbParserCtxtPtr ctxt); -XMLPUBFUN docbParserCtxtPtr XMLCALL - docbCreatePushParserCtxt(docbSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename, - xmlCharEncoding enc); -XMLPUBFUN int XMLCALL - docbParseChunk (docbParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); -XMLPUBFUN docbParserCtxtPtr XMLCALL - docbCreateFileParserCtxt(const char *filename, - const char *encoding); -XMLPUBFUN int XMLCALL - docbParseDocument (docbParserCtxtPtr ctxt); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_DOCB_ENABLED */ - -#endif /* __DOCB_PARSER_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/HTMLparser.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/HTMLparser.h deleted file mode 100644 index 1d4fec2..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/HTMLparser.h +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Summary: interface for an HTML 4.0 non-verifying parser - * Description: this module implements an HTML 4.0 non-verifying parser - * with API compatible with the XML parser ones. It should - * be able to parse "real world" HTML, even if severely - * broken from a specification point of view. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __HTML_PARSER_H__ -#define __HTML_PARSER_H__ -#include -#include - -#ifdef LIBXML_HTML_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Most of the back-end structures from XML and HTML are shared. - */ -typedef xmlParserCtxt htmlParserCtxt; -typedef xmlParserCtxtPtr htmlParserCtxtPtr; -typedef xmlParserNodeInfo htmlParserNodeInfo; -typedef xmlSAXHandler htmlSAXHandler; -typedef xmlSAXHandlerPtr htmlSAXHandlerPtr; -typedef xmlParserInput htmlParserInput; -typedef xmlParserInputPtr htmlParserInputPtr; -typedef xmlDocPtr htmlDocPtr; -typedef xmlNodePtr htmlNodePtr; - -/* - * Internal description of an HTML element, representing HTML 4.01 - * and XHTML 1.0 (which share the same structure). - */ -typedef struct _htmlElemDesc htmlElemDesc; -typedef htmlElemDesc *htmlElemDescPtr; -struct _htmlElemDesc { - const char *name; /* The tag name */ - char startTag; /* Whether the start tag can be implied */ - char endTag; /* Whether the end tag can be implied */ - char saveEndTag; /* Whether the end tag should be saved */ - char empty; /* Is this an empty element ? */ - char depr; /* Is this a deprecated element ? */ - char dtd; /* 1: only in Loose DTD, 2: only Frameset one */ - char isinline; /* is this a block 0 or inline 1 element */ - const char *desc; /* the description */ - -/* NRK Jan.2003 - * New fields encapsulating HTML structure - * - * Bugs: - * This is a very limited representation. It fails to tell us when - * an element *requires* subelements (we only have whether they're - * allowed or not), and it doesn't tell us where CDATA and PCDATA - * are allowed. Some element relationships are not fully represented: - * these are flagged with the word MODIFIER - */ - const char** subelts; /* allowed sub-elements of this element */ - const char* defaultsubelt; /* subelement for suggested auto-repair - if necessary or NULL */ - const char** attrs_opt; /* Optional Attributes */ - const char** attrs_depr; /* Additional deprecated attributes */ - const char** attrs_req; /* Required attributes */ -}; - -/* - * Internal description of an HTML entity. - */ -typedef struct _htmlEntityDesc htmlEntityDesc; -typedef htmlEntityDesc *htmlEntityDescPtr; -struct _htmlEntityDesc { - unsigned int value; /* the UNICODE value for the character */ - const char *name; /* The entity name */ - const char *desc; /* the description */ -}; - -/* - * There is only few public functions. - */ -XMLPUBFUN const htmlElemDesc * XMLCALL - htmlTagLookup (const xmlChar *tag); -XMLPUBFUN const htmlEntityDesc * XMLCALL - htmlEntityLookup(const xmlChar *name); -XMLPUBFUN const htmlEntityDesc * XMLCALL - htmlEntityValueLookup(unsigned int value); - -XMLPUBFUN int XMLCALL - htmlIsAutoClosed(htmlDocPtr doc, - htmlNodePtr elem); -XMLPUBFUN int XMLCALL - htmlAutoCloseTag(htmlDocPtr doc, - const xmlChar *name, - htmlNodePtr elem); -XMLPUBFUN const htmlEntityDesc * XMLCALL - htmlParseEntityRef(htmlParserCtxtPtr ctxt, - const xmlChar **str); -XMLPUBFUN int XMLCALL - htmlParseCharRef(htmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - htmlParseElement(htmlParserCtxtPtr ctxt); - -XMLPUBFUN htmlParserCtxtPtr XMLCALL - htmlNewParserCtxt(void); - -XMLPUBFUN htmlParserCtxtPtr XMLCALL - htmlCreateMemoryParserCtxt(const char *buffer, - int size); - -XMLPUBFUN int XMLCALL - htmlParseDocument(htmlParserCtxtPtr ctxt); -XMLPUBFUN htmlDocPtr XMLCALL - htmlSAXParseDoc (const xmlChar *cur, - const char *encoding, - htmlSAXHandlerPtr sax, - void *userData); -XMLPUBFUN htmlDocPtr XMLCALL - htmlParseDoc (const xmlChar *cur, - const char *encoding); -XMLPUBFUN htmlDocPtr XMLCALL - htmlSAXParseFile(const char *filename, - const char *encoding, - htmlSAXHandlerPtr sax, - void *userData); -XMLPUBFUN htmlDocPtr XMLCALL - htmlParseFile (const char *filename, - const char *encoding); -XMLPUBFUN int XMLCALL - UTF8ToHtml (unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen); -XMLPUBFUN int XMLCALL - htmlEncodeEntities(unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen, int quoteChar); -XMLPUBFUN int XMLCALL - htmlIsScriptAttribute(const xmlChar *name); -XMLPUBFUN int XMLCALL - htmlHandleOmittedElem(int val); - -#ifdef LIBXML_PUSH_ENABLED -/** - * Interfaces for the Push mode. - */ -XMLPUBFUN htmlParserCtxtPtr XMLCALL - htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename, - xmlCharEncoding enc); -XMLPUBFUN int XMLCALL - htmlParseChunk (htmlParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); -#endif /* LIBXML_PUSH_ENABLED */ - -XMLPUBFUN void XMLCALL - htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); - -/* - * New set of simpler/more flexible APIs - */ -/** - * xmlParserOption: - * - * This is the set of XML parser options that can be passed down - * to the xmlReadDoc() and similar calls. - */ -typedef enum { - HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */ - HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */ - HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */ - HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */ - HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ - HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ - HTML_PARSE_NONET = 1<<11,/* Forbid network access */ - HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */ - HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */ - HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */ -} htmlParserOption; - -XMLPUBFUN void XMLCALL - htmlCtxtReset (htmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - htmlCtxtUseOptions (htmlParserCtxtPtr ctxt, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlReadDoc (const xmlChar *cur, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlReadFile (const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlReadMemory (const char *buffer, - int size, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlReadFd (int fd, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlReadIO (xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlCtxtReadDoc (xmlParserCtxtPtr ctxt, - const xmlChar *cur, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlCtxtReadFile (xmlParserCtxtPtr ctxt, - const char *filename, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlCtxtReadMemory (xmlParserCtxtPtr ctxt, - const char *buffer, - int size, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlCtxtReadFd (xmlParserCtxtPtr ctxt, - int fd, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN htmlDocPtr XMLCALL - htmlCtxtReadIO (xmlParserCtxtPtr ctxt, - xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - const char *URL, - const char *encoding, - int options); - -/* NRK/Jan2003: further knowledge of HTML structure - */ -typedef enum { - HTML_NA = 0 , /* something we don't check at all */ - HTML_INVALID = 0x1 , - HTML_DEPRECATED = 0x2 , - HTML_VALID = 0x4 , - HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */ -} htmlStatus ; - -/* Using htmlElemDesc rather than name here, to emphasise the fact - that otherwise there's a lookup overhead -*/ -XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; -XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; -XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; -XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ; -/** - * htmlDefaultSubelement: - * @elt: HTML element - * - * Returns the default subelement for this element - */ -#define htmlDefaultSubelement(elt) elt->defaultsubelt -/** - * htmlElementAllowedHereDesc: - * @parent: HTML parent element - * @elt: HTML element - * - * Checks whether an HTML element description may be a - * direct child of the specified element. - * - * Returns 1 if allowed; 0 otherwise. - */ -#define htmlElementAllowedHereDesc(parent,elt) \ - htmlElementAllowedHere((parent), (elt)->name) -/** - * htmlRequiredAttrs: - * @elt: HTML element - * - * Returns the attributes required for the specified element. - */ -#define htmlRequiredAttrs(elt) (elt)->attrs_req - - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_HTML_ENABLED */ -#endif /* __HTML_PARSER_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/HTMLtree.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/HTMLtree.h deleted file mode 100644 index c0e1103..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/HTMLtree.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Summary: specific APIs to process HTML tree, especially serialization - * Description: this module implements a few function needed to process - * tree in an HTML specific way. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __HTML_TREE_H__ -#define __HTML_TREE_H__ - -#include -#include -#include -#include - -#ifdef LIBXML_HTML_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * HTML_TEXT_NODE: - * - * Macro. A text node in a HTML document is really implemented - * the same way as a text node in an XML document. - */ -#define HTML_TEXT_NODE XML_TEXT_NODE -/** - * HTML_ENTITY_REF_NODE: - * - * Macro. An entity reference in a HTML document is really implemented - * the same way as an entity reference in an XML document. - */ -#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE -/** - * HTML_COMMENT_NODE: - * - * Macro. A comment in a HTML document is really implemented - * the same way as a comment in an XML document. - */ -#define HTML_COMMENT_NODE XML_COMMENT_NODE -/** - * HTML_PRESERVE_NODE: - * - * Macro. A preserved node in a HTML document is really implemented - * the same way as a CDATA section in an XML document. - */ -#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE -/** - * HTML_PI_NODE: - * - * Macro. A processing instruction in a HTML document is really implemented - * the same way as a processing instruction in an XML document. - */ -#define HTML_PI_NODE XML_PI_NODE - -XMLPUBFUN htmlDocPtr XMLCALL - htmlNewDoc (const xmlChar *URI, - const xmlChar *ExternalID); -XMLPUBFUN htmlDocPtr XMLCALL - htmlNewDocNoDtD (const xmlChar *URI, - const xmlChar *ExternalID); -XMLPUBFUN const xmlChar * XMLCALL - htmlGetMetaEncoding (htmlDocPtr doc); -XMLPUBFUN int XMLCALL - htmlSetMetaEncoding (htmlDocPtr doc, - const xmlChar *encoding); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - htmlDocDumpMemory (xmlDocPtr cur, - xmlChar **mem, - int *size); -XMLPUBFUN void XMLCALL - htmlDocDumpMemoryFormat (xmlDocPtr cur, - xmlChar **mem, - int *size, - int format); -XMLPUBFUN int XMLCALL - htmlDocDump (FILE *f, - xmlDocPtr cur); -XMLPUBFUN int XMLCALL - htmlSaveFile (const char *filename, - xmlDocPtr cur); -XMLPUBFUN int XMLCALL - htmlNodeDump (xmlBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur); -XMLPUBFUN void XMLCALL - htmlNodeDumpFile (FILE *out, - xmlDocPtr doc, - xmlNodePtr cur); -XMLPUBFUN int XMLCALL - htmlNodeDumpFileFormat (FILE *out, - xmlDocPtr doc, - xmlNodePtr cur, - const char *encoding, - int format); -XMLPUBFUN int XMLCALL - htmlSaveFileEnc (const char *filename, - xmlDocPtr cur, - const char *encoding); -XMLPUBFUN int XMLCALL - htmlSaveFileFormat (const char *filename, - xmlDocPtr cur, - const char *encoding, - int format); - -XMLPUBFUN void XMLCALL - htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - const char *encoding, - int format); -XMLPUBFUN void XMLCALL - htmlDocContentDumpOutput(xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding); -XMLPUBFUN void XMLCALL - htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding, - int format); -XMLPUBFUN void XMLCALL - htmlNodeDumpOutput (xmlOutputBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - const char *encoding); - -#endif /* LIBXML_OUTPUT_ENABLED */ - -XMLPUBFUN int XMLCALL - htmlIsBooleanAttr (const xmlChar *name); - - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_HTML_ENABLED */ - -#endif /* __HTML_TREE_H__ */ - diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/SAX.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/SAX.h deleted file mode 100644 index 20093ce..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/SAX.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Summary: Old SAX version 1 handler, deprecated - * Description: DEPRECATED set of SAX version 1 interfaces used to - * build the DOM tree. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - - -#ifndef __XML_SAX_H__ -#define __XML_SAX_H__ - -#include -#include -#include -#include -#include - -#ifdef LIBXML_LEGACY_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif -XMLPUBFUN const xmlChar * XMLCALL - getPublicId (void *ctx); -XMLPUBFUN const xmlChar * XMLCALL - getSystemId (void *ctx); -XMLPUBFUN void XMLCALL - setDocumentLocator (void *ctx, - xmlSAXLocatorPtr loc); - -XMLPUBFUN int XMLCALL - getLineNumber (void *ctx); -XMLPUBFUN int XMLCALL - getColumnNumber (void *ctx); - -XMLPUBFUN int XMLCALL - isStandalone (void *ctx); -XMLPUBFUN int XMLCALL - hasInternalSubset (void *ctx); -XMLPUBFUN int XMLCALL - hasExternalSubset (void *ctx); - -XMLPUBFUN void XMLCALL - internalSubset (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN void XMLCALL - externalSubset (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN xmlEntityPtr XMLCALL - getEntity (void *ctx, - const xmlChar *name); -XMLPUBFUN xmlEntityPtr XMLCALL - getParameterEntity (void *ctx, - const xmlChar *name); -XMLPUBFUN xmlParserInputPtr XMLCALL - resolveEntity (void *ctx, - const xmlChar *publicId, - const xmlChar *systemId); - -XMLPUBFUN void XMLCALL - entityDecl (void *ctx, - const xmlChar *name, - int type, - const xmlChar *publicId, - const xmlChar *systemId, - xmlChar *content); -XMLPUBFUN void XMLCALL - attributeDecl (void *ctx, - const xmlChar *elem, - const xmlChar *fullname, - int type, - int def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -XMLPUBFUN void XMLCALL - elementDecl (void *ctx, - const xmlChar *name, - int type, - xmlElementContentPtr content); -XMLPUBFUN void XMLCALL - notationDecl (void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId); -XMLPUBFUN void XMLCALL - unparsedEntityDecl (void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId, - const xmlChar *notationName); - -XMLPUBFUN void XMLCALL - startDocument (void *ctx); -XMLPUBFUN void XMLCALL - endDocument (void *ctx); -XMLPUBFUN void XMLCALL - attribute (void *ctx, - const xmlChar *fullname, - const xmlChar *value); -XMLPUBFUN void XMLCALL - startElement (void *ctx, - const xmlChar *fullname, - const xmlChar **atts); -XMLPUBFUN void XMLCALL - endElement (void *ctx, - const xmlChar *name); -XMLPUBFUN void XMLCALL - reference (void *ctx, - const xmlChar *name); -XMLPUBFUN void XMLCALL - characters (void *ctx, - const xmlChar *ch, - int len); -XMLPUBFUN void XMLCALL - ignorableWhitespace (void *ctx, - const xmlChar *ch, - int len); -XMLPUBFUN void XMLCALL - processingInstruction (void *ctx, - const xmlChar *target, - const xmlChar *data); -XMLPUBFUN void XMLCALL - globalNamespace (void *ctx, - const xmlChar *href, - const xmlChar *prefix); -XMLPUBFUN void XMLCALL - setNamespace (void *ctx, - const xmlChar *name); -XMLPUBFUN xmlNsPtr XMLCALL - getNamespace (void *ctx); -XMLPUBFUN int XMLCALL - checkNamespace (void *ctx, - xmlChar *nameSpace); -XMLPUBFUN void XMLCALL - namespaceDecl (void *ctx, - const xmlChar *href, - const xmlChar *prefix); -XMLPUBFUN void XMLCALL - comment (void *ctx, - const xmlChar *value); -XMLPUBFUN void XMLCALL - cdataBlock (void *ctx, - const xmlChar *value, - int len); - -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN void XMLCALL - initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr, - int warning); -#ifdef LIBXML_HTML_ENABLED -XMLPUBFUN void XMLCALL - inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); -#endif -#ifdef LIBXML_DOCB_ENABLED -XMLPUBFUN void XMLCALL - initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); -#endif -#endif /* LIBXML_SAX1_ENABLED */ - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_LEGACY_ENABLED */ - -#endif /* __XML_SAX_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/SAX2.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/SAX2.h deleted file mode 100644 index a55212e..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/SAX2.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Summary: SAX2 parser interface used to build the DOM tree - * Description: those are the default SAX2 interfaces used by - * the library when building DOM tree. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - - -#ifndef __XML_SAX2_H__ -#define __XML_SAX2_H__ - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -XMLPUBFUN const xmlChar * XMLCALL - xmlSAX2GetPublicId (void *ctx); -XMLPUBFUN const xmlChar * XMLCALL - xmlSAX2GetSystemId (void *ctx); -XMLPUBFUN void XMLCALL - xmlSAX2SetDocumentLocator (void *ctx, - xmlSAXLocatorPtr loc); - -XMLPUBFUN int XMLCALL - xmlSAX2GetLineNumber (void *ctx); -XMLPUBFUN int XMLCALL - xmlSAX2GetColumnNumber (void *ctx); - -XMLPUBFUN int XMLCALL - xmlSAX2IsStandalone (void *ctx); -XMLPUBFUN int XMLCALL - xmlSAX2HasInternalSubset (void *ctx); -XMLPUBFUN int XMLCALL - xmlSAX2HasExternalSubset (void *ctx); - -XMLPUBFUN void XMLCALL - xmlSAX2InternalSubset (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN void XMLCALL - xmlSAX2ExternalSubset (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlSAX2GetEntity (void *ctx, - const xmlChar *name); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlSAX2GetParameterEntity (void *ctx, - const xmlChar *name); -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlSAX2ResolveEntity (void *ctx, - const xmlChar *publicId, - const xmlChar *systemId); - -XMLPUBFUN void XMLCALL - xmlSAX2EntityDecl (void *ctx, - const xmlChar *name, - int type, - const xmlChar *publicId, - const xmlChar *systemId, - xmlChar *content); -XMLPUBFUN void XMLCALL - xmlSAX2AttributeDecl (void *ctx, - const xmlChar *elem, - const xmlChar *fullname, - int type, - int def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -XMLPUBFUN void XMLCALL - xmlSAX2ElementDecl (void *ctx, - const xmlChar *name, - int type, - xmlElementContentPtr content); -XMLPUBFUN void XMLCALL - xmlSAX2NotationDecl (void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId); -XMLPUBFUN void XMLCALL - xmlSAX2UnparsedEntityDecl (void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId, - const xmlChar *notationName); - -XMLPUBFUN void XMLCALL - xmlSAX2StartDocument (void *ctx); -XMLPUBFUN void XMLCALL - xmlSAX2EndDocument (void *ctx); -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ - defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \ - defined(LIBXML_LEGACY_ENABLED) -XMLPUBFUN void XMLCALL - xmlSAX2StartElement (void *ctx, - const xmlChar *fullname, - const xmlChar **atts); -XMLPUBFUN void XMLCALL - xmlSAX2EndElement (void *ctx, - const xmlChar *name); -#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */ -XMLPUBFUN void XMLCALL - xmlSAX2StartElementNs (void *ctx, - const xmlChar *localname, - const xmlChar *prefix, - const xmlChar *URI, - int nb_namespaces, - const xmlChar **namespaces, - int nb_attributes, - int nb_defaulted, - const xmlChar **attributes); -XMLPUBFUN void XMLCALL - xmlSAX2EndElementNs (void *ctx, - const xmlChar *localname, - const xmlChar *prefix, - const xmlChar *URI); -XMLPUBFUN void XMLCALL - xmlSAX2Reference (void *ctx, - const xmlChar *name); -XMLPUBFUN void XMLCALL - xmlSAX2Characters (void *ctx, - const xmlChar *ch, - int len); -XMLPUBFUN void XMLCALL - xmlSAX2IgnorableWhitespace (void *ctx, - const xmlChar *ch, - int len); -XMLPUBFUN void XMLCALL - xmlSAX2ProcessingInstruction (void *ctx, - const xmlChar *target, - const xmlChar *data); -XMLPUBFUN void XMLCALL - xmlSAX2Comment (void *ctx, - const xmlChar *value); -XMLPUBFUN void XMLCALL - xmlSAX2CDataBlock (void *ctx, - const xmlChar *value, - int len); - -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL - xmlSAXDefaultVersion (int version); -#endif /* LIBXML_SAX1_ENABLED */ - -XMLPUBFUN int XMLCALL - xmlSAXVersion (xmlSAXHandler *hdlr, - int version); -XMLPUBFUN void XMLCALL - xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, - int warning); -#ifdef LIBXML_HTML_ENABLED -XMLPUBFUN void XMLCALL - xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr); -XMLPUBFUN void XMLCALL - htmlDefaultSAXHandlerInit (void); -#endif -#ifdef LIBXML_DOCB_ENABLED -XMLPUBFUN void XMLCALL - xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr); -XMLPUBFUN void XMLCALL - docbDefaultSAXHandlerInit (void); -#endif -XMLPUBFUN void XMLCALL - xmlDefaultSAXHandlerInit (void); -#ifdef __cplusplus -} -#endif -#endif /* __XML_SAX2_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/c14n.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/c14n.h deleted file mode 100644 index b8971d9..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/c14n.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Summary: Provide Canonical XML and Exclusive XML Canonicalization - * Description: the c14n modules provides a - * - * "Canonical XML" implementation - * http://www.w3.org/TR/xml-c14n - * - * and an - * - * "Exclusive XML Canonicalization" implementation - * http://www.w3.org/TR/xml-exc-c14n - - * Copy: See Copyright for the status of this software. - * - * Author: Aleksey Sanin - */ -#ifndef __XML_C14N_H__ -#define __XML_C14N_H__ -#ifdef LIBXML_C14N_ENABLED -#ifdef LIBXML_OUTPUT_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include -#include -#include - -/* - * XML Canonicazation - * http://www.w3.org/TR/xml-c14n - * - * Exclusive XML Canonicazation - * http://www.w3.org/TR/xml-exc-c14n - * - * Canonical form of an XML document could be created if and only if - * a) default attributes (if any) are added to all nodes - * b) all character and parsed entity references are resolved - * In order to achive this in libxml2 the document MUST be loaded with - * following global setings: - * - * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - * xmlSubstituteEntitiesDefault(1); - * - * or corresponding parser context setting: - * xmlParserCtxtPtr ctxt; - * - * ... - * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS; - * ctxt->replaceEntities = 1; - * ... - */ - -/* - * xmlC14NMode: - * - * Predefined values for C14N modes - * - */ -typedef enum { - XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */ - XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */ - XML_C14N_1_1 = 2 /* C14N 1.1 spec */ -} xmlC14NMode; - -XMLPUBFUN int XMLCALL - xmlC14NDocSaveTo (xmlDocPtr doc, - xmlNodeSetPtr nodes, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - xmlOutputBufferPtr buf); - -XMLPUBFUN int XMLCALL - xmlC14NDocDumpMemory (xmlDocPtr doc, - xmlNodeSetPtr nodes, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - xmlChar **doc_txt_ptr); - -XMLPUBFUN int XMLCALL - xmlC14NDocSave (xmlDocPtr doc, - xmlNodeSetPtr nodes, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - const char* filename, - int compression); - - -/** - * This is the core C14N function - */ -/** - * xmlC14NIsVisibleCallback: - * @user_data: user data - * @node: the curent node - * @parent: the parent node - * - * Signature for a C14N callback on visible nodes - * - * Returns 1 if the node should be included - */ -typedef int (*xmlC14NIsVisibleCallback) (void* user_data, - xmlNodePtr node, - xmlNodePtr parent); - -XMLPUBFUN int XMLCALL - xmlC14NExecute (xmlDocPtr doc, - xmlC14NIsVisibleCallback is_visible_callback, - void* user_data, - int mode, /* a xmlC14NMode */ - xmlChar **inclusive_ns_prefixes, - int with_comments, - xmlOutputBufferPtr buf); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* LIBXML_OUTPUT_ENABLED */ -#endif /* LIBXML_C14N_ENABLED */ -#endif /* __XML_C14N_H__ */ - diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/catalog.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/catalog.h deleted file mode 100644 index 5a13f51..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/catalog.h +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Summary: interfaces to the Catalog handling system - * Description: the catalog module implements the support for - * XML Catalogs and SGML catalogs - * - * SGML Open Technical Resolution TR9401:1997. - * http://www.jclark.com/sp/catalog.htm - * - * XML Catalogs Working Draft 06 August 2001 - * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_CATALOG_H__ -#define __XML_CATALOG_H__ - -#include - -#include -#include -#include - -#ifdef LIBXML_CATALOG_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XML_CATALOGS_NAMESPACE: - * - * The namespace for the XML Catalogs elements. - */ -#define XML_CATALOGS_NAMESPACE \ - (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" -/** - * XML_CATALOG_PI: - * - * The specific XML Catalog Processing Instuction name. - */ -#define XML_CATALOG_PI \ - (const xmlChar *) "oasis-xml-catalog" - -/* - * The API is voluntarily limited to general cataloging. - */ -typedef enum { - XML_CATA_PREFER_NONE = 0, - XML_CATA_PREFER_PUBLIC = 1, - XML_CATA_PREFER_SYSTEM -} xmlCatalogPrefer; - -typedef enum { - XML_CATA_ALLOW_NONE = 0, - XML_CATA_ALLOW_GLOBAL = 1, - XML_CATA_ALLOW_DOCUMENT = 2, - XML_CATA_ALLOW_ALL = 3 -} xmlCatalogAllow; - -typedef struct _xmlCatalog xmlCatalog; -typedef xmlCatalog *xmlCatalogPtr; - -/* - * Operations on a given catalog. - */ -XMLPUBFUN xmlCatalogPtr XMLCALL - xmlNewCatalog (int sgml); -XMLPUBFUN xmlCatalogPtr XMLCALL - xmlLoadACatalog (const char *filename); -XMLPUBFUN xmlCatalogPtr XMLCALL - xmlLoadSGMLSuperCatalog (const char *filename); -XMLPUBFUN int XMLCALL - xmlConvertSGMLCatalog (xmlCatalogPtr catal); -XMLPUBFUN int XMLCALL - xmlACatalogAdd (xmlCatalogPtr catal, - const xmlChar *type, - const xmlChar *orig, - const xmlChar *replace); -XMLPUBFUN int XMLCALL - xmlACatalogRemove (xmlCatalogPtr catal, - const xmlChar *value); -XMLPUBFUN xmlChar * XMLCALL - xmlACatalogResolve (xmlCatalogPtr catal, - const xmlChar *pubID, - const xmlChar *sysID); -XMLPUBFUN xmlChar * XMLCALL - xmlACatalogResolveSystem(xmlCatalogPtr catal, - const xmlChar *sysID); -XMLPUBFUN xmlChar * XMLCALL - xmlACatalogResolvePublic(xmlCatalogPtr catal, - const xmlChar *pubID); -XMLPUBFUN xmlChar * XMLCALL - xmlACatalogResolveURI (xmlCatalogPtr catal, - const xmlChar *URI); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlACatalogDump (xmlCatalogPtr catal, - FILE *out); -#endif /* LIBXML_OUTPUT_ENABLED */ -XMLPUBFUN void XMLCALL - xmlFreeCatalog (xmlCatalogPtr catal); -XMLPUBFUN int XMLCALL - xmlCatalogIsEmpty (xmlCatalogPtr catal); - -/* - * Global operations. - */ -XMLPUBFUN void XMLCALL - xmlInitializeCatalog (void); -XMLPUBFUN int XMLCALL - xmlLoadCatalog (const char *filename); -XMLPUBFUN void XMLCALL - xmlLoadCatalogs (const char *paths); -XMLPUBFUN void XMLCALL - xmlCatalogCleanup (void); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlCatalogDump (FILE *out); -#endif /* LIBXML_OUTPUT_ENABLED */ -XMLPUBFUN xmlChar * XMLCALL - xmlCatalogResolve (const xmlChar *pubID, - const xmlChar *sysID); -XMLPUBFUN xmlChar * XMLCALL - xmlCatalogResolveSystem (const xmlChar *sysID); -XMLPUBFUN xmlChar * XMLCALL - xmlCatalogResolvePublic (const xmlChar *pubID); -XMLPUBFUN xmlChar * XMLCALL - xmlCatalogResolveURI (const xmlChar *URI); -XMLPUBFUN int XMLCALL - xmlCatalogAdd (const xmlChar *type, - const xmlChar *orig, - const xmlChar *replace); -XMLPUBFUN int XMLCALL - xmlCatalogRemove (const xmlChar *value); -XMLPUBFUN xmlDocPtr XMLCALL - xmlParseCatalogFile (const char *filename); -XMLPUBFUN int XMLCALL - xmlCatalogConvert (void); - -/* - * Strictly minimal interfaces for per-document catalogs used - * by the parser. - */ -XMLPUBFUN void XMLCALL - xmlCatalogFreeLocal (void *catalogs); -XMLPUBFUN void * XMLCALL - xmlCatalogAddLocal (void *catalogs, - const xmlChar *URL); -XMLPUBFUN xmlChar * XMLCALL - xmlCatalogLocalResolve (void *catalogs, - const xmlChar *pubID, - const xmlChar *sysID); -XMLPUBFUN xmlChar * XMLCALL - xmlCatalogLocalResolveURI(void *catalogs, - const xmlChar *URI); -/* - * Preference settings. - */ -XMLPUBFUN int XMLCALL - xmlCatalogSetDebug (int level); -XMLPUBFUN xmlCatalogPrefer XMLCALL - xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); -XMLPUBFUN void XMLCALL - xmlCatalogSetDefaults (xmlCatalogAllow allow); -XMLPUBFUN xmlCatalogAllow XMLCALL - xmlCatalogGetDefaults (void); - - -/* DEPRECATED interfaces */ -XMLPUBFUN const xmlChar * XMLCALL - xmlCatalogGetSystem (const xmlChar *sysID); -XMLPUBFUN const xmlChar * XMLCALL - xmlCatalogGetPublic (const xmlChar *pubID); - -#ifdef __cplusplus -} -#endif -#endif /* LIBXML_CATALOG_ENABLED */ -#endif /* __XML_CATALOG_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/chvalid.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/chvalid.h deleted file mode 100644 index fb43016..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/chvalid.h +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Summary: Unicode character range checking - * Description: this module exports interfaces for the character - * range validation APIs - * - * This file is automatically generated from the cvs source - * definition files using the genChRanges.py Python script - * - * Generation date: Mon Mar 27 11:09:48 2006 - * Sources: chvalid.def - * Author: William Brack - */ - -#ifndef __XML_CHVALID_H__ -#define __XML_CHVALID_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Define our typedefs and structures - * - */ -typedef struct _xmlChSRange xmlChSRange; -typedef xmlChSRange *xmlChSRangePtr; -struct _xmlChSRange { - unsigned short low; - unsigned short high; -}; - -typedef struct _xmlChLRange xmlChLRange; -typedef xmlChLRange *xmlChLRangePtr; -struct _xmlChLRange { - unsigned int low; - unsigned int high; -}; - -typedef struct _xmlChRangeGroup xmlChRangeGroup; -typedef xmlChRangeGroup *xmlChRangeGroupPtr; -struct _xmlChRangeGroup { - int nbShortRange; - int nbLongRange; - const xmlChSRange *shortRange; /* points to an array of ranges */ - const xmlChLRange *longRange; -}; - -/** - * Range checking routine - */ -XMLPUBFUN int XMLCALL - xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); - - -/** - * xmlIsBaseChar_ch: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ - ((0x61 <= (c)) && ((c) <= 0x7a)) || \ - ((0xc0 <= (c)) && ((c) <= 0xd6)) || \ - ((0xd8 <= (c)) && ((c) <= 0xf6)) || \ - (0xf8 <= (c))) - -/** - * xmlIsBaseCharQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \ - xmlIsBaseChar_ch((c)) : \ - xmlCharInRange((c), &xmlIsBaseCharGroup)) - -XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup; - -/** - * xmlIsBlank_ch: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsBlank_ch(c) (((c) == 0x20) || \ - ((0x9 <= (c)) && ((c) <= 0xa)) || \ - ((c) == 0xd)) - -/** - * xmlIsBlankQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsBlankQ(c) (((c) < 0x100) ? \ - xmlIsBlank_ch((c)) : 0) - - -/** - * xmlIsChar_ch: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \ - ((c) == 0xd) || \ - (0x20 <= (c))) - -/** - * xmlIsCharQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsCharQ(c) (((c) < 0x100) ? \ - xmlIsChar_ch((c)) :\ - (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \ - ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \ - ((0x10000 <= (c)) && ((c) <= 0x10ffff)))) - -XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup; - -/** - * xmlIsCombiningQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsCombiningQ(c) (((c) < 0x100) ? \ - 0 : \ - xmlCharInRange((c), &xmlIsCombiningGroup)) - -XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup; - -/** - * xmlIsDigit_ch: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39))) - -/** - * xmlIsDigitQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsDigitQ(c) (((c) < 0x100) ? \ - xmlIsDigit_ch((c)) : \ - xmlCharInRange((c), &xmlIsDigitGroup)) - -XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup; - -/** - * xmlIsExtender_ch: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsExtender_ch(c) (((c) == 0xb7)) - -/** - * xmlIsExtenderQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsExtenderQ(c) (((c) < 0x100) ? \ - xmlIsExtender_ch((c)) : \ - xmlCharInRange((c), &xmlIsExtenderGroup)) - -XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup; - -/** - * xmlIsIdeographicQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \ - 0 :\ - (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \ - ((c) == 0x3007) || \ - ((0x3021 <= (c)) && ((c) <= 0x3029)))) - -XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup; -XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]; - -/** - * xmlIsPubidChar_ch: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)]) - -/** - * xmlIsPubidCharQ: - * @c: char to validate - * - * Automatically generated by genChRanges.py - */ -#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \ - xmlIsPubidChar_ch((c)) : 0) - -XMLPUBFUN int XMLCALL - xmlIsBaseChar(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsBlank(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsChar(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsCombining(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsDigit(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsExtender(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsIdeographic(unsigned int ch); -XMLPUBFUN int XMLCALL - xmlIsPubidChar(unsigned int ch); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_CHVALID_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/debugXML.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/debugXML.h deleted file mode 100644 index 5b3be13..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/debugXML.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Summary: Tree debugging APIs - * Description: Interfaces to a set of routines used for debugging the tree - * produced by the XML parser. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __DEBUG_XML__ -#define __DEBUG_XML__ -#include -#include -#include - -#ifdef LIBXML_DEBUG_ENABLED - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The standard Dump routines. - */ -XMLPUBFUN void XMLCALL - xmlDebugDumpString (FILE *output, - const xmlChar *str); -XMLPUBFUN void XMLCALL - xmlDebugDumpAttr (FILE *output, - xmlAttrPtr attr, - int depth); -XMLPUBFUN void XMLCALL - xmlDebugDumpAttrList (FILE *output, - xmlAttrPtr attr, - int depth); -XMLPUBFUN void XMLCALL - xmlDebugDumpOneNode (FILE *output, - xmlNodePtr node, - int depth); -XMLPUBFUN void XMLCALL - xmlDebugDumpNode (FILE *output, - xmlNodePtr node, - int depth); -XMLPUBFUN void XMLCALL - xmlDebugDumpNodeList (FILE *output, - xmlNodePtr node, - int depth); -XMLPUBFUN void XMLCALL - xmlDebugDumpDocumentHead(FILE *output, - xmlDocPtr doc); -XMLPUBFUN void XMLCALL - xmlDebugDumpDocument (FILE *output, - xmlDocPtr doc); -XMLPUBFUN void XMLCALL - xmlDebugDumpDTD (FILE *output, - xmlDtdPtr dtd); -XMLPUBFUN void XMLCALL - xmlDebugDumpEntities (FILE *output, - xmlDocPtr doc); - -/**************************************************************** - * * - * Checking routines * - * * - ****************************************************************/ - -XMLPUBFUN int XMLCALL - xmlDebugCheckDocument (FILE * output, - xmlDocPtr doc); - -/**************************************************************** - * * - * XML shell helpers * - * * - ****************************************************************/ - -XMLPUBFUN void XMLCALL - xmlLsOneNode (FILE *output, xmlNodePtr node); -XMLPUBFUN int XMLCALL - xmlLsCountNode (xmlNodePtr node); - -XMLPUBFUN const char * XMLCALL - xmlBoolToText (int boolval); - -/**************************************************************** - * * - * The XML shell related structures and functions * - * * - ****************************************************************/ - -#ifdef LIBXML_XPATH_ENABLED -/** - * xmlShellReadlineFunc: - * @prompt: a string prompt - * - * This is a generic signature for the XML shell input function. - * - * Returns a string which will be freed by the Shell. - */ -typedef char * (* xmlShellReadlineFunc)(char *prompt); - -/** - * xmlShellCtxt: - * - * A debugging shell context. - * TODO: add the defined function tables. - */ -typedef struct _xmlShellCtxt xmlShellCtxt; -typedef xmlShellCtxt *xmlShellCtxtPtr; -struct _xmlShellCtxt { - char *filename; - xmlDocPtr doc; - xmlNodePtr node; - xmlXPathContextPtr pctxt; - int loaded; - FILE *output; - xmlShellReadlineFunc input; -}; - -/** - * xmlShellCmd: - * @ctxt: a shell context - * @arg: a string argument - * @node: a first node - * @node2: a second node - * - * This is a generic signature for the XML shell functions. - * - * Returns an int, negative returns indicating errors. - */ -typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); - -XMLPUBFUN void XMLCALL - xmlShellPrintXPathError (int errorType, - const char *arg); -XMLPUBFUN void XMLCALL - xmlShellPrintXPathResult(xmlXPathObjectPtr list); -XMLPUBFUN int XMLCALL - xmlShellList (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -XMLPUBFUN int XMLCALL - xmlShellBase (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -XMLPUBFUN int XMLCALL - xmlShellDir (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -XMLPUBFUN int XMLCALL - xmlShellLoad (xmlShellCtxtPtr ctxt, - char *filename, - xmlNodePtr node, - xmlNodePtr node2); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlShellPrintNode (xmlNodePtr node); -XMLPUBFUN int XMLCALL - xmlShellCat (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr node, - xmlNodePtr node2); -XMLPUBFUN int XMLCALL - xmlShellWrite (xmlShellCtxtPtr ctxt, - char *filename, - xmlNodePtr node, - xmlNodePtr node2); -XMLPUBFUN int XMLCALL - xmlShellSave (xmlShellCtxtPtr ctxt, - char *filename, - xmlNodePtr node, - xmlNodePtr node2); -#endif /* LIBXML_OUTPUT_ENABLED */ -#ifdef LIBXML_VALID_ENABLED -XMLPUBFUN int XMLCALL - xmlShellValidate (xmlShellCtxtPtr ctxt, - char *dtd, - xmlNodePtr node, - xmlNodePtr node2); -#endif /* LIBXML_VALID_ENABLED */ -XMLPUBFUN int XMLCALL - xmlShellDu (xmlShellCtxtPtr ctxt, - char *arg, - xmlNodePtr tree, - xmlNodePtr node2); -XMLPUBFUN int XMLCALL - xmlShellPwd (xmlShellCtxtPtr ctxt, - char *buffer, - xmlNodePtr node, - xmlNodePtr node2); - -/* - * The Shell interface. - */ -XMLPUBFUN void XMLCALL - xmlShell (xmlDocPtr doc, - char *filename, - xmlShellReadlineFunc input, - FILE *output); - -#endif /* LIBXML_XPATH_ENABLED */ - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_DEBUG_ENABLED */ -#endif /* __DEBUG_XML__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/dict.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/dict.h deleted file mode 100644 index b83db59..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/dict.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Summary: string dictionary - * Description: dictionary of reusable strings, just used to avoid allocation - * and freeing operations. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_DICT_H__ -#define __XML_DICT_H__ - -#ifdef __cplusplus -#define __XML_EXTERNC extern "C" -#else -#define __XML_EXTERNC -#endif - -/* - * The dictionary. - */ -__XML_EXTERNC typedef struct _xmlDict xmlDict; -__XML_EXTERNC typedef xmlDict *xmlDictPtr; - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Initializer - */ -XMLPUBFUN int XMLCALL xmlInitializeDict(void); - -/* - * Constructor and destructor. - */ -XMLPUBFUN xmlDictPtr XMLCALL - xmlDictCreate (void); -XMLPUBFUN size_t XMLCALL - xmlDictSetLimit (xmlDictPtr dict, - size_t limit); -XMLPUBFUN size_t XMLCALL - xmlDictGetUsage (xmlDictPtr dict); -XMLPUBFUN xmlDictPtr XMLCALL - xmlDictCreateSub(xmlDictPtr sub); -XMLPUBFUN int XMLCALL - xmlDictReference(xmlDictPtr dict); -XMLPUBFUN void XMLCALL - xmlDictFree (xmlDictPtr dict); - -/* - * Lookup of entry in the dictionary. - */ -XMLPUBFUN const xmlChar * XMLCALL - xmlDictLookup (xmlDictPtr dict, - const xmlChar *name, - int len); -XMLPUBFUN const xmlChar * XMLCALL - xmlDictExists (xmlDictPtr dict, - const xmlChar *name, - int len); -XMLPUBFUN const xmlChar * XMLCALL - xmlDictQLookup (xmlDictPtr dict, - const xmlChar *prefix, - const xmlChar *name); -XMLPUBFUN int XMLCALL - xmlDictOwns (xmlDictPtr dict, - const xmlChar *str); -XMLPUBFUN int XMLCALL - xmlDictSize (xmlDictPtr dict); - -/* - * Cleanup function - */ -XMLPUBFUN void XMLCALL - xmlDictCleanup (void); - -#ifdef __cplusplus -} -#endif -#endif /* ! __XML_DICT_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/encoding.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/encoding.h deleted file mode 100644 index c875af6..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/encoding.h +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Summary: interface for the encoding conversion functions - * Description: interface for the encoding conversion functions needed for - * XML basic encoding and iconv() support. - * - * Related specs are - * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies - * [ISO-10646] UTF-8 and UTF-16 in Annexes - * [ISO-8859-1] ISO Latin-1 characters codes. - * [UNICODE] The Unicode Consortium, "The Unicode Standard -- - * Worldwide Character Encoding -- Version 1.0", Addison- - * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is - * described in Unicode Technical Report #4. - * [US-ASCII] Coded Character Set--7-bit American Standard Code for - * Information Interchange, ANSI X3.4-1986. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_CHAR_ENCODING_H__ -#define __XML_CHAR_ENCODING_H__ - -#include - -#ifdef LIBXML_ICONV_ENABLED -#include -#endif -#ifdef LIBXML_ICU_ENABLED -#include -#endif -#ifdef __cplusplus -extern "C" { -#endif - -/* - * xmlCharEncoding: - * - * Predefined values for some standard encodings. - * Libxml does not do beforehand translation on UTF8 and ISOLatinX. - * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default. - * - * Anything else would have to be translated to UTF8 before being - * given to the parser itself. The BOM for UTF16 and the encoding - * declaration are looked at and a converter is looked for at that - * point. If not found the parser stops here as asked by the XML REC. A - * converter can be registered by the user using xmlRegisterCharEncodingHandler - * but the current form doesn't allow stateful transcoding (a serious - * problem agreed !). If iconv has been found it will be used - * automatically and allow stateful transcoding, the simplest is then - * to be sure to enable iconv and to provide iconv libs for the encoding - * support needed. - * - * Note that the generic "UTF-16" is not a predefined value. Instead, only - * the specific UTF-16LE and UTF-16BE are present. - */ -typedef enum { - XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */ - XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */ - XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */ - XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */ - XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */ - XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */ - XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */ - XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */ - XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */ - XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */ - XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */ - XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */ - XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */ - XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */ - XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */ - XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */ - XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */ - XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */ - XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */ - XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */ - XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */ - XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */ - XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */ - XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */ -} xmlCharEncoding; - -/** - * xmlCharEncodingInputFunc: - * @out: a pointer to an array of bytes to store the UTF-8 result - * @outlen: the length of @out - * @in: a pointer to an array of chars in the original encoding - * @inlen: the length of @in - * - * Take a block of chars in the original encoding and try to convert - * it to an UTF-8 block of chars out. - * - * Returns the number of bytes written, -1 if lack of space, or -2 - * if the transcoding failed. - * The value of @inlen after return is the number of octets consumed - * if the return value is positive, else unpredictiable. - * The value of @outlen after return is the number of octets consumed. - */ -typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, - const unsigned char *in, int *inlen); - - -/** - * xmlCharEncodingOutputFunc: - * @out: a pointer to an array of bytes to store the result - * @outlen: the length of @out - * @in: a pointer to an array of UTF-8 chars - * @inlen: the length of @in - * - * Take a block of UTF-8 chars in and try to convert it to another - * encoding. - * Note: a first call designed to produce heading info is called with - * in = NULL. If stateful this should also initialize the encoder state. - * - * Returns the number of bytes written, -1 if lack of space, or -2 - * if the transcoding failed. - * The value of @inlen after return is the number of octets consumed - * if the return value is positive, else unpredictiable. - * The value of @outlen after return is the number of octets produced. - */ -typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, - const unsigned char *in, int *inlen); - - -/* - * Block defining the handlers for non UTF-8 encodings. - * If iconv is supported, there are two extra fields. - */ -#ifdef LIBXML_ICU_ENABLED -/* Size of pivot buffer, same as icu/source/common/ucnv.cpp CHUNK_SIZE */ -#define ICU_PIVOT_BUF_SIZE 1024 -struct _uconv_t { - UConverter *uconv; /* for conversion between an encoding and UTF-16 */ - UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */ - UChar pivot_buf[ICU_PIVOT_BUF_SIZE]; - UChar *pivot_source; - UChar *pivot_target; -}; -typedef struct _uconv_t uconv_t; -#endif - -typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; -typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; -struct _xmlCharEncodingHandler { - char *name; - xmlCharEncodingInputFunc input; - xmlCharEncodingOutputFunc output; -#ifdef LIBXML_ICONV_ENABLED - iconv_t iconv_in; - iconv_t iconv_out; -#endif /* LIBXML_ICONV_ENABLED */ -#ifdef LIBXML_ICU_ENABLED - uconv_t *uconv_in; - uconv_t *uconv_out; -#endif /* LIBXML_ICU_ENABLED */ -}; - -#ifdef __cplusplus -} -#endif -#include -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Interfaces for encoding handlers. - */ -XMLPUBFUN void XMLCALL - xmlInitCharEncodingHandlers (void); -XMLPUBFUN void XMLCALL - xmlCleanupCharEncodingHandlers (void); -XMLPUBFUN void XMLCALL - xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); -XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL - xmlGetCharEncodingHandler (xmlCharEncoding enc); -XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL - xmlFindCharEncodingHandler (const char *name); -XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL - xmlNewCharEncodingHandler (const char *name, - xmlCharEncodingInputFunc input, - xmlCharEncodingOutputFunc output); - -/* - * Interfaces for encoding names and aliases. - */ -XMLPUBFUN int XMLCALL - xmlAddEncodingAlias (const char *name, - const char *alias); -XMLPUBFUN int XMLCALL - xmlDelEncodingAlias (const char *alias); -XMLPUBFUN const char * XMLCALL - xmlGetEncodingAlias (const char *alias); -XMLPUBFUN void XMLCALL - xmlCleanupEncodingAliases (void); -XMLPUBFUN xmlCharEncoding XMLCALL - xmlParseCharEncoding (const char *name); -XMLPUBFUN const char * XMLCALL - xmlGetCharEncodingName (xmlCharEncoding enc); - -/* - * Interfaces directly used by the parsers. - */ -XMLPUBFUN xmlCharEncoding XMLCALL - xmlDetectCharEncoding (const unsigned char *in, - int len); - -XMLPUBFUN int XMLCALL - xmlCharEncOutFunc (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); - -XMLPUBFUN int XMLCALL - xmlCharEncInFunc (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); -XMLPUBFUN int XMLCALL - xmlCharEncFirstLine (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); -XMLPUBFUN int XMLCALL - xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); - -/* - * Export a few useful functions - */ -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN int XMLCALL - UTF8Toisolat1 (unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen); -#endif /* LIBXML_OUTPUT_ENABLED */ -XMLPUBFUN int XMLCALL - isolat1ToUTF8 (unsigned char *out, - int *outlen, - const unsigned char *in, - int *inlen); -#ifdef __cplusplus -} -#endif - -#endif /* __XML_CHAR_ENCODING_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/entities.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/entities.h deleted file mode 100644 index 47b4573..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/entities.h +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Summary: interface for the XML entities handling - * Description: this module provides some of the entity API needed - * for the parser and applications. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_ENTITIES_H__ -#define __XML_ENTITIES_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The different valid entity types. - */ -typedef enum { - XML_INTERNAL_GENERAL_ENTITY = 1, - XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, - XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, - XML_INTERNAL_PARAMETER_ENTITY = 4, - XML_EXTERNAL_PARAMETER_ENTITY = 5, - XML_INTERNAL_PREDEFINED_ENTITY = 6 -} xmlEntityType; - -/* - * An unit of storage for an entity, contains the string, the value - * and the linkind data needed for the linking in the hash table. - */ - -struct _xmlEntity { - void *_private; /* application data */ - xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ - const xmlChar *name; /* Entity name */ - struct _xmlNode *children; /* First child link */ - struct _xmlNode *last; /* Last child link */ - struct _xmlDtd *parent; /* -> DTD */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - xmlChar *orig; /* content without ref substitution */ - xmlChar *content; /* content or ndata if unparsed */ - int length; /* the content length */ - xmlEntityType etype; /* The entity type */ - const xmlChar *ExternalID; /* External identifier for PUBLIC */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */ - - struct _xmlEntity *nexte; /* unused */ - const xmlChar *URI; /* the full URI as computed */ - int owner; /* does the entity own the childrens */ - int checked; /* was the entity content checked */ - /* this is also used to count entities - * references done from that entity - * and if it contains '<' */ -}; - -/* - * All entities are stored in an hash table. - * There is 2 separate hash tables for global and parameter entities. - */ - -typedef struct _xmlHashTable xmlEntitiesTable; -typedef xmlEntitiesTable *xmlEntitiesTablePtr; - -/* - * External functions: - */ - -#ifdef LIBXML_LEGACY_ENABLED -XMLPUBFUN void XMLCALL - xmlInitializePredefinedEntities (void); -#endif /* LIBXML_LEGACY_ENABLED */ - -XMLPUBFUN xmlEntityPtr XMLCALL - xmlNewEntity (xmlDocPtr doc, - const xmlChar *name, - int type, - const xmlChar *ExternalID, - const xmlChar *SystemID, - const xmlChar *content); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlAddDocEntity (xmlDocPtr doc, - const xmlChar *name, - int type, - const xmlChar *ExternalID, - const xmlChar *SystemID, - const xmlChar *content); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlAddDtdEntity (xmlDocPtr doc, - const xmlChar *name, - int type, - const xmlChar *ExternalID, - const xmlChar *SystemID, - const xmlChar *content); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlGetPredefinedEntity (const xmlChar *name); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlGetDocEntity (const xmlDoc *doc, - const xmlChar *name); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlGetDtdEntity (xmlDocPtr doc, - const xmlChar *name); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlGetParameterEntity (xmlDocPtr doc, - const xmlChar *name); -#ifdef LIBXML_LEGACY_ENABLED -XMLPUBFUN const xmlChar * XMLCALL - xmlEncodeEntities (xmlDocPtr doc, - const xmlChar *input); -#endif /* LIBXML_LEGACY_ENABLED */ -XMLPUBFUN xmlChar * XMLCALL - xmlEncodeEntitiesReentrant(xmlDocPtr doc, - const xmlChar *input); -XMLPUBFUN xmlChar * XMLCALL - xmlEncodeSpecialChars (const xmlDoc *doc, - const xmlChar *input); -XMLPUBFUN xmlEntitiesTablePtr XMLCALL - xmlCreateEntitiesTable (void); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlEntitiesTablePtr XMLCALL - xmlCopyEntitiesTable (xmlEntitiesTablePtr table); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN void XMLCALL - xmlFreeEntitiesTable (xmlEntitiesTablePtr table); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlDumpEntitiesTable (xmlBufferPtr buf, - xmlEntitiesTablePtr table); -XMLPUBFUN void XMLCALL - xmlDumpEntityDecl (xmlBufferPtr buf, - xmlEntityPtr ent); -#endif /* LIBXML_OUTPUT_ENABLED */ -#ifdef LIBXML_LEGACY_ENABLED -XMLPUBFUN void XMLCALL - xmlCleanupPredefinedEntities(void); -#endif /* LIBXML_LEGACY_ENABLED */ - - -#ifdef __cplusplus -} -#endif - -# endif /* __XML_ENTITIES_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/globals.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/globals.h deleted file mode 100644 index 5e41b7b..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/globals.h +++ /dev/null @@ -1,508 +0,0 @@ -/* - * Summary: interface for all global variables of the library - * Description: all the global variables and thread handling for - * those variables is handled by this module. - * - * The bottom of this file is automatically generated by build_glob.py - * based on the description file global.data - * - * Copy: See Copyright for the status of this software. - * - * Author: Gary Pennington , Daniel Veillard - */ - -#ifndef __XML_GLOBALS_H -#define __XML_GLOBALS_H - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -XMLPUBFUN void XMLCALL xmlInitGlobals(void); -XMLPUBFUN void XMLCALL xmlCleanupGlobals(void); - -/** - * xmlParserInputBufferCreateFilenameFunc: - * @URI: the URI to read from - * @enc: the requested source encoding - * - * Signature for the function doing the lookup for a suitable input method - * corresponding to an URI. - * - * Returns the new xmlParserInputBufferPtr in case of success or NULL if no - * method was found. - */ -typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, - xmlCharEncoding enc); - - -/** - * xmlOutputBufferCreateFilenameFunc: - * @URI: the URI to write to - * @enc: the requested target encoding - * - * Signature for the function doing the lookup for a suitable output method - * corresponding to an URI. - * - * Returns the new xmlOutputBufferPtr in case of success or NULL if no - * method was found. - */ -typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, - xmlCharEncodingHandlerPtr encoder, - int compression); - -XMLPUBFUN xmlParserInputBufferCreateFilenameFunc -XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); -XMLPUBFUN xmlOutputBufferCreateFilenameFunc -XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); - -/* - * Externally global symbols which need to be protected for backwards - * compatibility support. - */ - -#undef docbDefaultSAXHandler -#undef htmlDefaultSAXHandler -#undef oldXMLWDcompatibility -#undef xmlBufferAllocScheme -#undef xmlDefaultBufferSize -#undef xmlDefaultSAXHandler -#undef xmlDefaultSAXLocator -#undef xmlDoValidityCheckingDefaultValue -#undef xmlFree -#undef xmlGenericError -#undef xmlStructuredError -#undef xmlGenericErrorContext -#undef xmlStructuredErrorContext -#undef xmlGetWarningsDefaultValue -#undef xmlIndentTreeOutput -#undef xmlTreeIndentString -#undef xmlKeepBlanksDefaultValue -#undef xmlLineNumbersDefaultValue -#undef xmlLoadExtDtdDefaultValue -#undef xmlMalloc -#undef xmlMallocAtomic -#undef xmlMemStrdup -#undef xmlParserDebugEntities -#undef xmlParserVersion -#undef xmlPedanticParserDefaultValue -#undef xmlRealloc -#undef xmlSaveNoEmptyTags -#undef xmlSubstituteEntitiesDefaultValue -#undef xmlRegisterNodeDefaultValue -#undef xmlDeregisterNodeDefaultValue -#undef xmlLastError -#undef xmlParserInputBufferCreateFilenameValue -#undef xmlOutputBufferCreateFilenameValue - -/** - * xmlRegisterNodeFunc: - * @node: the current node - * - * Signature for the registration callback of a created node - */ -typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); -/** - * xmlDeregisterNodeFunc: - * @node: the current node - * - * Signature for the deregistration callback of a discarded node - */ -typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); - -typedef struct _xmlGlobalState xmlGlobalState; -typedef xmlGlobalState *xmlGlobalStatePtr; -struct _xmlGlobalState -{ - const char *xmlParserVersion; - - xmlSAXLocator xmlDefaultSAXLocator; - xmlSAXHandlerV1 xmlDefaultSAXHandler; - xmlSAXHandlerV1 docbDefaultSAXHandler; - xmlSAXHandlerV1 htmlDefaultSAXHandler; - - xmlFreeFunc xmlFree; - xmlMallocFunc xmlMalloc; - xmlStrdupFunc xmlMemStrdup; - xmlReallocFunc xmlRealloc; - - xmlGenericErrorFunc xmlGenericError; - xmlStructuredErrorFunc xmlStructuredError; - void *xmlGenericErrorContext; - - int oldXMLWDcompatibility; - - xmlBufferAllocationScheme xmlBufferAllocScheme; - int xmlDefaultBufferSize; - - int xmlSubstituteEntitiesDefaultValue; - int xmlDoValidityCheckingDefaultValue; - int xmlGetWarningsDefaultValue; - int xmlKeepBlanksDefaultValue; - int xmlLineNumbersDefaultValue; - int xmlLoadExtDtdDefaultValue; - int xmlParserDebugEntities; - int xmlPedanticParserDefaultValue; - - int xmlSaveNoEmptyTags; - int xmlIndentTreeOutput; - const char *xmlTreeIndentString; - - xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; - xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; - - xmlMallocFunc xmlMallocAtomic; - xmlError xmlLastError; - - xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; - xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; - - void *xmlStructuredErrorContext; -}; - -#ifdef __cplusplus -} -#endif -#include -#ifdef __cplusplus -extern "C" { -#endif - -XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs); - -XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); - -XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler); - -XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func); -XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func); -XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func); -XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func); - -XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL - xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func); -XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL - xmlThrDefParserInputBufferCreateFilenameDefault( - xmlParserInputBufferCreateFilenameFunc func); - -/** DOC_DISABLE */ -/* - * In general the memory allocation entry points are not kept - * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED - * - xmlMalloc - * - xmlMallocAtomic - * - xmlRealloc - * - xmlMemStrdup - * - xmlFree - */ - -#ifdef LIBXML_THREAD_ALLOC_ENABLED -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void); -#define xmlMalloc \ -(*(__xmlMalloc())) -#else -XMLPUBVAR xmlMallocFunc xmlMalloc; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void); -#define xmlMallocAtomic \ -(*(__xmlMallocAtomic())) -#else -XMLPUBVAR xmlMallocFunc xmlMallocAtomic; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void); -#define xmlRealloc \ -(*(__xmlRealloc())) -#else -XMLPUBVAR xmlReallocFunc xmlRealloc; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void); -#define xmlFree \ -(*(__xmlFree())) -#else -XMLPUBVAR xmlFreeFunc xmlFree; -#endif - -#ifdef LIBXML_THREAD_ENABLED -XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void); -#define xmlMemStrdup \ -(*(__xmlMemStrdup())) -#else -XMLPUBVAR xmlStrdupFunc xmlMemStrdup; -#endif - -#else /* !LIBXML_THREAD_ALLOC_ENABLED */ -XMLPUBVAR xmlMallocFunc xmlMalloc; -XMLPUBVAR xmlMallocFunc xmlMallocAtomic; -XMLPUBVAR xmlReallocFunc xmlRealloc; -XMLPUBVAR xmlFreeFunc xmlFree; -XMLPUBVAR xmlStrdupFunc xmlMemStrdup; -#endif /* LIBXML_THREAD_ALLOC_ENABLED */ - -#ifdef LIBXML_DOCB_ENABLED -XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define docbDefaultSAXHandler \ -(*(__docbDefaultSAXHandler())) -#else -XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler; -#endif -#endif - -#ifdef LIBXML_HTML_ENABLED -XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define htmlDefaultSAXHandler \ -(*(__htmlDefaultSAXHandler())) -#else -XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler; -#endif -#endif - -XMLPUBFUN xmlError * XMLCALL __xmlLastError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLastError \ -(*(__xmlLastError())) -#else -XMLPUBVAR xmlError xmlLastError; -#endif - -/* - * Everything starting from the line below is - * Automatically generated by build_glob.py. - * Do not modify the previous line. - */ - - -XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void); -#ifdef LIBXML_THREAD_ENABLED -#define oldXMLWDcompatibility \ -(*(__oldXMLWDcompatibility())) -#else -XMLPUBVAR int oldXMLWDcompatibility; -#endif - -XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlBufferAllocScheme \ -(*(__xmlBufferAllocScheme())) -#else -XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme; -#endif -XMLPUBFUN xmlBufferAllocationScheme XMLCALL - xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v); - -XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultBufferSize \ -(*(__xmlDefaultBufferSize())) -#else -XMLPUBVAR int xmlDefaultBufferSize; -#endif -XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v); - -XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultSAXHandler \ -(*(__xmlDefaultSAXHandler())) -#else -XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler; -#endif - -XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDefaultSAXLocator \ -(*(__xmlDefaultSAXLocator())) -#else -XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator; -#endif - -XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDoValidityCheckingDefaultValue \ -(*(__xmlDoValidityCheckingDefaultValue())) -#else -XMLPUBVAR int xmlDoValidityCheckingDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v); - -XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGenericError \ -(*(__xmlGenericError())) -#else -XMLPUBVAR xmlGenericErrorFunc xmlGenericError; -#endif - -XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlStructuredError \ -(*(__xmlStructuredError())) -#else -XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError; -#endif - -XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGenericErrorContext \ -(*(__xmlGenericErrorContext())) -#else -XMLPUBVAR void * xmlGenericErrorContext; -#endif - -XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlStructuredErrorContext \ -(*(__xmlStructuredErrorContext())) -#else -XMLPUBVAR void * xmlStructuredErrorContext; -#endif - -XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlGetWarningsDefaultValue \ -(*(__xmlGetWarningsDefaultValue())) -#else -XMLPUBVAR int xmlGetWarningsDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlIndentTreeOutput \ -(*(__xmlIndentTreeOutput())) -#else -XMLPUBVAR int xmlIndentTreeOutput; -#endif -XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v); - -XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlTreeIndentString \ -(*(__xmlTreeIndentString())) -#else -XMLPUBVAR const char * xmlTreeIndentString; -#endif -XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v); - -XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlKeepBlanksDefaultValue \ -(*(__xmlKeepBlanksDefaultValue())) -#else -XMLPUBVAR int xmlKeepBlanksDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLineNumbersDefaultValue \ -(*(__xmlLineNumbersDefaultValue())) -#else -XMLPUBVAR int xmlLineNumbersDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlLoadExtDtdDefaultValue \ -(*(__xmlLoadExtDtdDefaultValue())) -#else -XMLPUBVAR int xmlLoadExtDtdDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserDebugEntities \ -(*(__xmlParserDebugEntities())) -#else -XMLPUBVAR int xmlParserDebugEntities; -#endif -XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v); - -XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserVersion \ -(*(__xmlParserVersion())) -#else -XMLPUBVAR const char * xmlParserVersion; -#endif - -XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlPedanticParserDefaultValue \ -(*(__xmlPedanticParserDefaultValue())) -#else -XMLPUBVAR int xmlPedanticParserDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v); - -XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlSaveNoEmptyTags \ -(*(__xmlSaveNoEmptyTags())) -#else -XMLPUBVAR int xmlSaveNoEmptyTags; -#endif -XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v); - -XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlSubstituteEntitiesDefaultValue \ -(*(__xmlSubstituteEntitiesDefaultValue())) -#else -XMLPUBVAR int xmlSubstituteEntitiesDefaultValue; -#endif -XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v); - -XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlRegisterNodeDefaultValue \ -(*(__xmlRegisterNodeDefaultValue())) -#else -XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; -#endif - -XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlDeregisterNodeDefaultValue \ -(*(__xmlDeregisterNodeDefaultValue())) -#else -XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; -#endif - -XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \ - __xmlParserInputBufferCreateFilenameValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlParserInputBufferCreateFilenameValue \ -(*(__xmlParserInputBufferCreateFilenameValue())) -#else -XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; -#endif - -XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void); -#ifdef LIBXML_THREAD_ENABLED -#define xmlOutputBufferCreateFilenameValue \ -(*(__xmlOutputBufferCreateFilenameValue())) -#else -XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_GLOBALS_H */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/hash.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/hash.h deleted file mode 100644 index 6352874..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/hash.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Summary: Chained hash tables - * Description: This module implements the hash table support used in - * various places in the library. - * - * Copy: See Copyright for the status of this software. - * - * Author: Bjorn Reese - */ - -#ifndef __XML_HASH_H__ -#define __XML_HASH_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The hash table. - */ -typedef struct _xmlHashTable xmlHashTable; -typedef xmlHashTable *xmlHashTablePtr; - -#ifdef __cplusplus -} -#endif - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Recent version of gcc produce a warning when a function pointer is assigned - * to an object pointer, or vice versa. The following macro is a dirty hack - * to allow suppression of the warning. If your architecture has function - * pointers which are a different size than a void pointer, there may be some - * serious trouble within the library. - */ -/** - * XML_CAST_FPTR: - * @fptr: pointer to a function - * - * Macro to do a casting from an object pointer to a - * function pointer without encountering a warning from - * gcc - * - * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr)) - * This macro violated ISO C aliasing rules (gcc4 on s390 broke) - * so it is disabled now - */ - -#define XML_CAST_FPTR(fptr) fptr - - -/* - * function types: - */ -/** - * xmlHashDeallocator: - * @payload: the data in the hash - * @name: the name associated - * - * Callback to free data from a hash. - */ -typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name); -/** - * xmlHashCopier: - * @payload: the data in the hash - * @name: the name associated - * - * Callback to copy data from a hash. - * - * Returns a copy of the data or NULL in case of error. - */ -typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name); -/** - * xmlHashScanner: - * @payload: the data in the hash - * @data: extra scannner data - * @name: the name associated - * - * Callback when scanning data in a hash with the simple scanner. - */ -typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name); -/** - * xmlHashScannerFull: - * @payload: the data in the hash - * @data: extra scannner data - * @name: the name associated - * @name2: the second name associated - * @name3: the third name associated - * - * Callback when scanning data in a hash with the full scanner. - */ -typedef void (*xmlHashScannerFull)(void *payload, void *data, - const xmlChar *name, const xmlChar *name2, - const xmlChar *name3); - -/* - * Constructor and destructor. - */ -XMLPUBFUN xmlHashTablePtr XMLCALL - xmlHashCreate (int size); -XMLPUBFUN xmlHashTablePtr XMLCALL - xmlHashCreateDict(int size, - xmlDictPtr dict); -XMLPUBFUN void XMLCALL - xmlHashFree (xmlHashTablePtr table, - xmlHashDeallocator f); -XMLPUBFUN void XMLCALL - xmlHashDefaultDeallocator(void *entry, - const xmlChar *name); - -/* - * Add a new entry to the hash table. - */ -XMLPUBFUN int XMLCALL - xmlHashAddEntry (xmlHashTablePtr table, - const xmlChar *name, - void *userdata); -XMLPUBFUN int XMLCALL - xmlHashUpdateEntry(xmlHashTablePtr table, - const xmlChar *name, - void *userdata, - xmlHashDeallocator f); -XMLPUBFUN int XMLCALL - xmlHashAddEntry2(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - void *userdata); -XMLPUBFUN int XMLCALL - xmlHashUpdateEntry2(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - void *userdata, - xmlHashDeallocator f); -XMLPUBFUN int XMLCALL - xmlHashAddEntry3(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - void *userdata); -XMLPUBFUN int XMLCALL - xmlHashUpdateEntry3(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - void *userdata, - xmlHashDeallocator f); - -/* - * Remove an entry from the hash table. - */ -XMLPUBFUN int XMLCALL - xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, - xmlHashDeallocator f); -XMLPUBFUN int XMLCALL - xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, - const xmlChar *name2, xmlHashDeallocator f); -XMLPUBFUN int XMLCALL - xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, - const xmlChar *name2, const xmlChar *name3, - xmlHashDeallocator f); - -/* - * Retrieve the userdata. - */ -XMLPUBFUN void * XMLCALL - xmlHashLookup (xmlHashTablePtr table, - const xmlChar *name); -XMLPUBFUN void * XMLCALL - xmlHashLookup2 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2); -XMLPUBFUN void * XMLCALL - xmlHashLookup3 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3); -XMLPUBFUN void * XMLCALL - xmlHashQLookup (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *prefix); -XMLPUBFUN void * XMLCALL - xmlHashQLookup2 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *prefix, - const xmlChar *name2, - const xmlChar *prefix2); -XMLPUBFUN void * XMLCALL - xmlHashQLookup3 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *prefix, - const xmlChar *name2, - const xmlChar *prefix2, - const xmlChar *name3, - const xmlChar *prefix3); - -/* - * Helpers. - */ -XMLPUBFUN xmlHashTablePtr XMLCALL - xmlHashCopy (xmlHashTablePtr table, - xmlHashCopier f); -XMLPUBFUN int XMLCALL - xmlHashSize (xmlHashTablePtr table); -XMLPUBFUN void XMLCALL - xmlHashScan (xmlHashTablePtr table, - xmlHashScanner f, - void *data); -XMLPUBFUN void XMLCALL - xmlHashScan3 (xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - xmlHashScanner f, - void *data); -XMLPUBFUN void XMLCALL - xmlHashScanFull (xmlHashTablePtr table, - xmlHashScannerFull f, - void *data); -XMLPUBFUN void XMLCALL - xmlHashScanFull3(xmlHashTablePtr table, - const xmlChar *name, - const xmlChar *name2, - const xmlChar *name3, - xmlHashScannerFull f, - void *data); -#ifdef __cplusplus -} -#endif -#endif /* ! __XML_HASH_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/list.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/list.h deleted file mode 100644 index 3211c75..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/list.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Summary: lists interfaces - * Description: this module implement the list support used in - * various place in the library. - * - * Copy: See Copyright for the status of this software. - * - * Author: Gary Pennington - */ - -#ifndef __XML_LINK_INCLUDE__ -#define __XML_LINK_INCLUDE__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _xmlLink xmlLink; -typedef xmlLink *xmlLinkPtr; - -typedef struct _xmlList xmlList; -typedef xmlList *xmlListPtr; - -/** - * xmlListDeallocator: - * @lk: the data to deallocate - * - * Callback function used to free data from a list. - */ -typedef void (*xmlListDeallocator) (xmlLinkPtr lk); -/** - * xmlListDataCompare: - * @data0: the first data - * @data1: the second data - * - * Callback function used to compare 2 data. - * - * Returns 0 is equality, -1 or 1 otherwise depending on the ordering. - */ -typedef int (*xmlListDataCompare) (const void *data0, const void *data1); -/** - * xmlListWalker: - * @data: the data found in the list - * @user: extra user provided data to the walker - * - * Callback function used when walking a list with xmlListWalk(). - * - * Returns 0 to stop walking the list, 1 otherwise. - */ -typedef int (*xmlListWalker) (const void *data, void *user); - -/* Creation/Deletion */ -XMLPUBFUN xmlListPtr XMLCALL - xmlListCreate (xmlListDeallocator deallocator, - xmlListDataCompare compare); -XMLPUBFUN void XMLCALL - xmlListDelete (xmlListPtr l); - -/* Basic Operators */ -XMLPUBFUN void * XMLCALL - xmlListSearch (xmlListPtr l, - void *data); -XMLPUBFUN void * XMLCALL - xmlListReverseSearch (xmlListPtr l, - void *data); -XMLPUBFUN int XMLCALL - xmlListInsert (xmlListPtr l, - void *data) ; -XMLPUBFUN int XMLCALL - xmlListAppend (xmlListPtr l, - void *data) ; -XMLPUBFUN int XMLCALL - xmlListRemoveFirst (xmlListPtr l, - void *data); -XMLPUBFUN int XMLCALL - xmlListRemoveLast (xmlListPtr l, - void *data); -XMLPUBFUN int XMLCALL - xmlListRemoveAll (xmlListPtr l, - void *data); -XMLPUBFUN void XMLCALL - xmlListClear (xmlListPtr l); -XMLPUBFUN int XMLCALL - xmlListEmpty (xmlListPtr l); -XMLPUBFUN xmlLinkPtr XMLCALL - xmlListFront (xmlListPtr l); -XMLPUBFUN xmlLinkPtr XMLCALL - xmlListEnd (xmlListPtr l); -XMLPUBFUN int XMLCALL - xmlListSize (xmlListPtr l); - -XMLPUBFUN void XMLCALL - xmlListPopFront (xmlListPtr l); -XMLPUBFUN void XMLCALL - xmlListPopBack (xmlListPtr l); -XMLPUBFUN int XMLCALL - xmlListPushFront (xmlListPtr l, - void *data); -XMLPUBFUN int XMLCALL - xmlListPushBack (xmlListPtr l, - void *data); - -/* Advanced Operators */ -XMLPUBFUN void XMLCALL - xmlListReverse (xmlListPtr l); -XMLPUBFUN void XMLCALL - xmlListSort (xmlListPtr l); -XMLPUBFUN void XMLCALL - xmlListWalk (xmlListPtr l, - xmlListWalker walker, - void *user); -XMLPUBFUN void XMLCALL - xmlListReverseWalk (xmlListPtr l, - xmlListWalker walker, - void *user); -XMLPUBFUN void XMLCALL - xmlListMerge (xmlListPtr l1, - xmlListPtr l2); -XMLPUBFUN xmlListPtr XMLCALL - xmlListDup (const xmlListPtr old); -XMLPUBFUN int XMLCALL - xmlListCopy (xmlListPtr cur, - const xmlListPtr old); -/* Link operators */ -XMLPUBFUN void * XMLCALL - xmlLinkGetData (xmlLinkPtr lk); - -/* xmlListUnique() */ -/* xmlListSwap */ - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_LINK_INCLUDE__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/nanoftp.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/nanoftp.h deleted file mode 100644 index 7335faf..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/nanoftp.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Summary: minimal FTP implementation - * Description: minimal FTP implementation allowing to fetch resources - * like external subset. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __NANO_FTP_H__ -#define __NANO_FTP_H__ - -#include - -#ifdef LIBXML_FTP_ENABLED - -/* Needed for portability to Windows 64 bits */ -#if defined(_WIN32) && !defined(__CYGWIN__) -#include -#else -/** - * SOCKET: - * - * macro used to provide portability of code to windows sockets - */ -#define SOCKET int -/** - * INVALID_SOCKET: - * - * macro used to provide portability of code to windows sockets - * the value to be used when the socket is not valid - */ -#undef INVALID_SOCKET -#define INVALID_SOCKET (-1) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * ftpListCallback: - * @userData: user provided data for the callback - * @filename: the file name (including "->" when links are shown) - * @attrib: the attribute string - * @owner: the owner string - * @group: the group string - * @size: the file size - * @links: the link count - * @year: the year - * @month: the month - * @day: the day - * @hour: the hour - * @minute: the minute - * - * A callback for the xmlNanoFTPList command. - * Note that only one of year and day:minute are specified. - */ -typedef void (*ftpListCallback) (void *userData, - const char *filename, const char *attrib, - const char *owner, const char *group, - unsigned long size, int links, int year, - const char *month, int day, int hour, - int minute); -/** - * ftpDataCallback: - * @userData: the user provided context - * @data: the data received - * @len: its size in bytes - * - * A callback for the xmlNanoFTPGet command. - */ -typedef void (*ftpDataCallback) (void *userData, - const char *data, - int len); - -/* - * Init - */ -XMLPUBFUN void XMLCALL - xmlNanoFTPInit (void); -XMLPUBFUN void XMLCALL - xmlNanoFTPCleanup (void); - -/* - * Creating/freeing contexts. - */ -XMLPUBFUN void * XMLCALL - xmlNanoFTPNewCtxt (const char *URL); -XMLPUBFUN void XMLCALL - xmlNanoFTPFreeCtxt (void * ctx); -XMLPUBFUN void * XMLCALL - xmlNanoFTPConnectTo (const char *server, - int port); -/* - * Opening/closing session connections. - */ -XMLPUBFUN void * XMLCALL - xmlNanoFTPOpen (const char *URL); -XMLPUBFUN int XMLCALL - xmlNanoFTPConnect (void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoFTPClose (void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoFTPQuit (void *ctx); -XMLPUBFUN void XMLCALL - xmlNanoFTPScanProxy (const char *URL); -XMLPUBFUN void XMLCALL - xmlNanoFTPProxy (const char *host, - int port, - const char *user, - const char *passwd, - int type); -XMLPUBFUN int XMLCALL - xmlNanoFTPUpdateURL (void *ctx, - const char *URL); - -/* - * Rather internal commands. - */ -XMLPUBFUN int XMLCALL - xmlNanoFTPGetResponse (void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoFTPCheckResponse (void *ctx); - -/* - * CD/DIR/GET handlers. - */ -XMLPUBFUN int XMLCALL - xmlNanoFTPCwd (void *ctx, - const char *directory); -XMLPUBFUN int XMLCALL - xmlNanoFTPDele (void *ctx, - const char *file); - -XMLPUBFUN SOCKET XMLCALL - xmlNanoFTPGetConnection (void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoFTPCloseConnection(void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoFTPList (void *ctx, - ftpListCallback callback, - void *userData, - const char *filename); -XMLPUBFUN SOCKET XMLCALL - xmlNanoFTPGetSocket (void *ctx, - const char *filename); -XMLPUBFUN int XMLCALL - xmlNanoFTPGet (void *ctx, - ftpDataCallback callback, - void *userData, - const char *filename); -XMLPUBFUN int XMLCALL - xmlNanoFTPRead (void *ctx, - void *dest, - int len); - -#ifdef __cplusplus -} -#endif -#endif /* LIBXML_FTP_ENABLED */ -#endif /* __NANO_FTP_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/nanohttp.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/nanohttp.h deleted file mode 100644 index 22b8fb4..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/nanohttp.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Summary: minimal HTTP implementation - * Description: minimal HTTP implementation allowing to fetch resources - * like external subset. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __NANO_HTTP_H__ -#define __NANO_HTTP_H__ - -#include - -#ifdef LIBXML_HTTP_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif -XMLPUBFUN void XMLCALL - xmlNanoHTTPInit (void); -XMLPUBFUN void XMLCALL - xmlNanoHTTPCleanup (void); -XMLPUBFUN void XMLCALL - xmlNanoHTTPScanProxy (const char *URL); -XMLPUBFUN int XMLCALL - xmlNanoHTTPFetch (const char *URL, - const char *filename, - char **contentType); -XMLPUBFUN void * XMLCALL - xmlNanoHTTPMethod (const char *URL, - const char *method, - const char *input, - char **contentType, - const char *headers, - int ilen); -XMLPUBFUN void * XMLCALL - xmlNanoHTTPMethodRedir (const char *URL, - const char *method, - const char *input, - char **contentType, - char **redir, - const char *headers, - int ilen); -XMLPUBFUN void * XMLCALL - xmlNanoHTTPOpen (const char *URL, - char **contentType); -XMLPUBFUN void * XMLCALL - xmlNanoHTTPOpenRedir (const char *URL, - char **contentType, - char **redir); -XMLPUBFUN int XMLCALL - xmlNanoHTTPReturnCode (void *ctx); -XMLPUBFUN const char * XMLCALL - xmlNanoHTTPAuthHeader (void *ctx); -XMLPUBFUN const char * XMLCALL - xmlNanoHTTPRedir (void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoHTTPContentLength( void * ctx ); -XMLPUBFUN const char * XMLCALL - xmlNanoHTTPEncoding (void *ctx); -XMLPUBFUN const char * XMLCALL - xmlNanoHTTPMimeType (void *ctx); -XMLPUBFUN int XMLCALL - xmlNanoHTTPRead (void *ctx, - void *dest, - int len); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN int XMLCALL - xmlNanoHTTPSave (void *ctxt, - const char *filename); -#endif /* LIBXML_OUTPUT_ENABLED */ -XMLPUBFUN void XMLCALL - xmlNanoHTTPClose (void *ctx); -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_HTTP_ENABLED */ -#endif /* __NANO_HTTP_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/parser.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/parser.h deleted file mode 100644 index 47fbec0..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/parser.h +++ /dev/null @@ -1,1241 +0,0 @@ -/* - * Summary: the core parser module - * Description: Interfaces, constants and types related to the XML parser - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_PARSER_H__ -#define __XML_PARSER_H__ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XML_DEFAULT_VERSION: - * - * The default version of XML used: 1.0 - */ -#define XML_DEFAULT_VERSION "1.0" - -/** - * xmlParserInput: - * - * An xmlParserInput is an input flow for the XML processor. - * Each entity parsed is associated an xmlParserInput (except the - * few predefined ones). This is the case both for internal entities - * - in which case the flow is already completely in memory - or - * external entities - in which case we use the buf structure for - * progressive reading and I18N conversions to the internal UTF-8 format. - */ - -/** - * xmlParserInputDeallocate: - * @str: the string to deallocate - * - * Callback for freeing some parser input allocations. - */ -typedef void (* xmlParserInputDeallocate)(xmlChar *str); - -struct _xmlParserInput { - /* Input buffer */ - xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */ - - const char *filename; /* The file analyzed, if any */ - const char *directory; /* the directory/base of the file */ - const xmlChar *base; /* Base of the array to parse */ - const xmlChar *cur; /* Current char being parsed */ - const xmlChar *end; /* end of the array to parse */ - int length; /* length if known */ - int line; /* Current line */ - int col; /* Current column */ - /* - * NOTE: consumed is only tested for equality in the parser code, - * so even if there is an overflow this should not give troubles - * for parsing very large instances. - */ - unsigned long consumed; /* How many xmlChars already consumed */ - xmlParserInputDeallocate free; /* function to deallocate the base */ - const xmlChar *encoding; /* the encoding string for entity */ - const xmlChar *version; /* the version string for entity */ - int standalone; /* Was that entity marked standalone */ - int id; /* an unique identifier for the entity */ -}; - -/** - * xmlParserNodeInfo: - * - * The parser can be asked to collect Node informations, i.e. at what - * place in the file they were detected. - * NOTE: This is off by default and not very well tested. - */ -typedef struct _xmlParserNodeInfo xmlParserNodeInfo; -typedef xmlParserNodeInfo *xmlParserNodeInfoPtr; - -struct _xmlParserNodeInfo { - const struct _xmlNode* node; - /* Position & line # that text that created the node begins & ends on */ - unsigned long begin_pos; - unsigned long begin_line; - unsigned long end_pos; - unsigned long end_line; -}; - -typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq; -typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr; -struct _xmlParserNodeInfoSeq { - unsigned long maximum; - unsigned long length; - xmlParserNodeInfo* buffer; -}; - -/** - * xmlParserInputState: - * - * The parser is now working also as a state based parser. - * The recursive one use the state info for entities processing. - */ -typedef enum { - XML_PARSER_EOF = -1, /* nothing is to be parsed */ - XML_PARSER_START = 0, /* nothing has been parsed */ - XML_PARSER_MISC, /* Misc* before int subset */ - XML_PARSER_PI, /* Within a processing instruction */ - XML_PARSER_DTD, /* within some DTD content */ - XML_PARSER_PROLOG, /* Misc* after internal subset */ - XML_PARSER_COMMENT, /* within a comment */ - XML_PARSER_START_TAG, /* within a start tag */ - XML_PARSER_CONTENT, /* within the content */ - XML_PARSER_CDATA_SECTION, /* within a CDATA section */ - XML_PARSER_END_TAG, /* within a closing tag */ - XML_PARSER_ENTITY_DECL, /* within an entity declaration */ - XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */ - XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */ - XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */ - XML_PARSER_EPILOG, /* the Misc* after the last end tag */ - XML_PARSER_IGNORE, /* within an IGNORED section */ - XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */ -} xmlParserInputState; - -/** - * XML_DETECT_IDS: - * - * Bit in the loadsubset context field to tell to do ID/REFs lookups. - * Use it to initialize xmlLoadExtDtdDefaultValue. - */ -#define XML_DETECT_IDS 2 - -/** - * XML_COMPLETE_ATTRS: - * - * Bit in the loadsubset context field to tell to do complete the - * elements attributes lists with the ones defaulted from the DTDs. - * Use it to initialize xmlLoadExtDtdDefaultValue. - */ -#define XML_COMPLETE_ATTRS 4 - -/** - * XML_SKIP_IDS: - * - * Bit in the loadsubset context field to tell to not do ID/REFs registration. - * Used to initialize xmlLoadExtDtdDefaultValue in some special cases. - */ -#define XML_SKIP_IDS 8 - -/** - * xmlParserMode: - * - * A parser can operate in various modes - */ -typedef enum { - XML_PARSE_UNKNOWN = 0, - XML_PARSE_DOM = 1, - XML_PARSE_SAX = 2, - XML_PARSE_PUSH_DOM = 3, - XML_PARSE_PUSH_SAX = 4, - XML_PARSE_READER = 5 -} xmlParserMode; - -/** - * xmlParserCtxt: - * - * The parser context. - * NOTE This doesn't completely define the parser state, the (current ?) - * design of the parser uses recursive function calls since this allow - * and easy mapping from the production rules of the specification - * to the actual code. The drawback is that the actual function call - * also reflect the parser state. However most of the parsing routines - * takes as the only argument the parser context pointer, so migrating - * to a state based parser for progressive parsing shouldn't be too hard. - */ -struct _xmlParserCtxt { - struct _xmlSAXHandler *sax; /* The SAX handler */ - void *userData; /* For SAX interface only, used by DOM build */ - xmlDocPtr myDoc; /* the document being built */ - int wellFormed; /* is the document well formed */ - int replaceEntities; /* shall we replace entities ? */ - const xmlChar *version; /* the XML version string */ - const xmlChar *encoding; /* the declared encoding, if any */ - int standalone; /* standalone document */ - int html; /* an HTML(1)/Docbook(2) document - * 3 is HTML after - * 10 is HTML after - */ - - /* Input stream stack */ - xmlParserInputPtr input; /* Current input stream */ - int inputNr; /* Number of current input streams */ - int inputMax; /* Max number of input streams */ - xmlParserInputPtr *inputTab; /* stack of inputs */ - - /* Node analysis stack only used for DOM building */ - xmlNodePtr node; /* Current parsed Node */ - int nodeNr; /* Depth of the parsing stack */ - int nodeMax; /* Max depth of the parsing stack */ - xmlNodePtr *nodeTab; /* array of nodes */ - - int record_info; /* Whether node info should be kept */ - xmlParserNodeInfoSeq node_seq; /* info about each node parsed */ - - int errNo; /* error code */ - - int hasExternalSubset; /* reference and external subset */ - int hasPErefs; /* the internal subset has PE refs */ - int external; /* are we parsing an external entity */ - - int valid; /* is the document valid */ - int validate; /* shall we try to validate ? */ - xmlValidCtxt vctxt; /* The validity context */ - - xmlParserInputState instate; /* current type of input */ - int token; /* next char look-ahead */ - - char *directory; /* the data directory */ - - /* Node name stack */ - const xmlChar *name; /* Current parsed Node */ - int nameNr; /* Depth of the parsing stack */ - int nameMax; /* Max depth of the parsing stack */ - const xmlChar * *nameTab; /* array of nodes */ - - long nbChars; /* number of xmlChar processed */ - long checkIndex; /* used by progressive parsing lookup */ - int keepBlanks; /* ugly but ... */ - int disableSAX; /* SAX callbacks are disabled */ - int inSubset; /* Parsing is in int 1/ext 2 subset */ - const xmlChar * intSubName; /* name of subset */ - xmlChar * extSubURI; /* URI of external subset */ - xmlChar * extSubSystem; /* SYSTEM ID of external subset */ - - /* xml:space values */ - int * space; /* Should the parser preserve spaces */ - int spaceNr; /* Depth of the parsing stack */ - int spaceMax; /* Max depth of the parsing stack */ - int * spaceTab; /* array of space infos */ - - int depth; /* to prevent entity substitution loops */ - xmlParserInputPtr entity; /* used to check entities boundaries */ - int charset; /* encoding of the in-memory content - actually an xmlCharEncoding */ - int nodelen; /* Those two fields are there to */ - int nodemem; /* Speed up large node parsing */ - int pedantic; /* signal pedantic warnings */ - void *_private; /* For user data, libxml won't touch it */ - - int loadsubset; /* should the external subset be loaded */ - int linenumbers; /* set line number in element content */ - void *catalogs; /* document's own catalog */ - int recovery; /* run in recovery mode */ - int progressive; /* is this a progressive parsing */ - xmlDictPtr dict; /* dictionary for the parser */ - const xmlChar * *atts; /* array for the attributes callbacks */ - int maxatts; /* the size of the array */ - int docdict; /* use strings from dict to build tree */ - - /* - * pre-interned strings - */ - const xmlChar *str_xml; - const xmlChar *str_xmlns; - const xmlChar *str_xml_ns; - - /* - * Everything below is used only by the new SAX mode - */ - int sax2; /* operating in the new SAX mode */ - int nsNr; /* the number of inherited namespaces */ - int nsMax; /* the size of the arrays */ - const xmlChar * *nsTab; /* the array of prefix/namespace name */ - int *attallocs; /* which attribute were allocated */ - void * *pushTab; /* array of data for push */ - xmlHashTablePtr attsDefault; /* defaulted attributes if any */ - xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */ - int nsWellFormed; /* is the document XML Nanespace okay */ - int options; /* Extra options */ - - /* - * Those fields are needed only for treaming parsing so far - */ - int dictNames; /* Use dictionary names for the tree */ - int freeElemsNr; /* number of freed element nodes */ - xmlNodePtr freeElems; /* List of freed element nodes */ - int freeAttrsNr; /* number of freed attributes nodes */ - xmlAttrPtr freeAttrs; /* List of freed attributes nodes */ - - /* - * the complete error informations for the last error. - */ - xmlError lastError; - xmlParserMode parseMode; /* the parser mode */ - unsigned long nbentities; /* number of entities references */ - unsigned long sizeentities; /* size of parsed entities */ - - /* for use by HTML non-recursive parser */ - xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */ - int nodeInfoNr; /* Depth of the parsing stack */ - int nodeInfoMax; /* Max depth of the parsing stack */ - xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */ - - int input_id; /* we need to label inputs */ - unsigned long sizeentcopy; /* volume of entity copy */ -}; - -/** - * xmlSAXLocator: - * - * A SAX Locator. - */ -struct _xmlSAXLocator { - const xmlChar *(*getPublicId)(void *ctx); - const xmlChar *(*getSystemId)(void *ctx); - int (*getLineNumber)(void *ctx); - int (*getColumnNumber)(void *ctx); -}; - -/** - * xmlSAXHandler: - * - * A SAX handler is bunch of callbacks called by the parser when processing - * of the input generate data or structure informations. - */ - -/** - * resolveEntitySAXFunc: - * @ctx: the user data (XML parser context) - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * - * Callback: - * The entity loader, to control the loading of external entities, - * the application can either: - * - override this resolveEntity() callback in the SAX block - * - or better use the xmlSetExternalEntityLoader() function to - * set up it's own entity resolution routine - * - * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. - */ -typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, - const xmlChar *publicId, - const xmlChar *systemId); -/** - * internalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the root element name - * @ExternalID: the external ID - * @SystemID: the SYSTEM ID (e.g. filename or URL) - * - * Callback on internal subset declaration. - */ -typedef void (*internalSubsetSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -/** - * externalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the root element name - * @ExternalID: the external ID - * @SystemID: the SYSTEM ID (e.g. filename or URL) - * - * Callback on external subset declaration. - */ -typedef void (*externalSubsetSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -/** - * getEntitySAXFunc: - * @ctx: the user data (XML parser context) - * @name: The entity name - * - * Get an entity by name. - * - * Returns the xmlEntityPtr if found. - */ -typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, - const xmlChar *name); -/** - * getParameterEntitySAXFunc: - * @ctx: the user data (XML parser context) - * @name: The entity name - * - * Get a parameter entity by name. - * - * Returns the xmlEntityPtr if found. - */ -typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, - const xmlChar *name); -/** - * entityDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the entity name - * @type: the entity type - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * @content: the entity value (without processing). - * - * An entity definition has been parsed. - */ -typedef void (*entityDeclSAXFunc) (void *ctx, - const xmlChar *name, - int type, - const xmlChar *publicId, - const xmlChar *systemId, - xmlChar *content); -/** - * notationDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The name of the notation - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * - * What to do when a notation declaration has been parsed. - */ -typedef void (*notationDeclSAXFunc)(void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId); -/** - * attributeDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @elem: the name of the element - * @fullname: the attribute name - * @type: the attribute type - * @def: the type of default value - * @defaultValue: the attribute default value - * @tree: the tree of enumerated value set - * - * An attribute definition has been parsed. - */ -typedef void (*attributeDeclSAXFunc)(void *ctx, - const xmlChar *elem, - const xmlChar *fullname, - int type, - int def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -/** - * elementDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: the element name - * @type: the element type - * @content: the element value tree - * - * An element definition has been parsed. - */ -typedef void (*elementDeclSAXFunc)(void *ctx, - const xmlChar *name, - int type, - xmlElementContentPtr content); -/** - * unparsedEntityDeclSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The name of the entity - * @publicId: The public ID of the entity - * @systemId: The system ID of the entity - * @notationName: the name of the notation - * - * What to do when an unparsed entity declaration is parsed. - */ -typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, - const xmlChar *name, - const xmlChar *publicId, - const xmlChar *systemId, - const xmlChar *notationName); -/** - * setDocumentLocatorSAXFunc: - * @ctx: the user data (XML parser context) - * @loc: A SAX Locator - * - * Receive the document locator at startup, actually xmlDefaultSAXLocator. - * Everything is available on the context, so this is useless in our case. - */ -typedef void (*setDocumentLocatorSAXFunc) (void *ctx, - xmlSAXLocatorPtr loc); -/** - * startDocumentSAXFunc: - * @ctx: the user data (XML parser context) - * - * Called when the document start being processed. - */ -typedef void (*startDocumentSAXFunc) (void *ctx); -/** - * endDocumentSAXFunc: - * @ctx: the user data (XML parser context) - * - * Called when the document end has been detected. - */ -typedef void (*endDocumentSAXFunc) (void *ctx); -/** - * startElementSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The element name, including namespace prefix - * @atts: An array of name/value attributes pairs, NULL terminated - * - * Called when an opening tag has been processed. - */ -typedef void (*startElementSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar **atts); -/** - * endElementSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The element name - * - * Called when the end of an element has been detected. - */ -typedef void (*endElementSAXFunc) (void *ctx, - const xmlChar *name); -/** - * attributeSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The attribute name, including namespace prefix - * @value: The attribute value - * - * Handle an attribute that has been read by the parser. - * The default handling is to convert the attribute into an - * DOM subtree and past it in a new xmlAttr element added to - * the element. - */ -typedef void (*attributeSAXFunc) (void *ctx, - const xmlChar *name, - const xmlChar *value); -/** - * referenceSAXFunc: - * @ctx: the user data (XML parser context) - * @name: The entity name - * - * Called when an entity reference is detected. - */ -typedef void (*referenceSAXFunc) (void *ctx, - const xmlChar *name); -/** - * charactersSAXFunc: - * @ctx: the user data (XML parser context) - * @ch: a xmlChar string - * @len: the number of xmlChar - * - * Receiving some chars from the parser. - */ -typedef void (*charactersSAXFunc) (void *ctx, - const xmlChar *ch, - int len); -/** - * ignorableWhitespaceSAXFunc: - * @ctx: the user data (XML parser context) - * @ch: a xmlChar string - * @len: the number of xmlChar - * - * Receiving some ignorable whitespaces from the parser. - * UNUSED: by default the DOM building will use characters. - */ -typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, - const xmlChar *ch, - int len); -/** - * processingInstructionSAXFunc: - * @ctx: the user data (XML parser context) - * @target: the target name - * @data: the PI data's - * - * A processing instruction has been parsed. - */ -typedef void (*processingInstructionSAXFunc) (void *ctx, - const xmlChar *target, - const xmlChar *data); -/** - * commentSAXFunc: - * @ctx: the user data (XML parser context) - * @value: the comment content - * - * A comment has been parsed. - */ -typedef void (*commentSAXFunc) (void *ctx, - const xmlChar *value); -/** - * cdataBlockSAXFunc: - * @ctx: the user data (XML parser context) - * @value: The pcdata content - * @len: the block length - * - * Called when a pcdata block has been parsed. - */ -typedef void (*cdataBlockSAXFunc) ( - void *ctx, - const xmlChar *value, - int len); -/** - * warningSAXFunc: - * @ctx: an XML parser context - * @msg: the message to display/transmit - * @...: extra parameters for the message display - * - * Display and format a warning messages, callback. - */ -typedef void (XMLCDECL *warningSAXFunc) (void *ctx, - const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); -/** - * errorSAXFunc: - * @ctx: an XML parser context - * @msg: the message to display/transmit - * @...: extra parameters for the message display - * - * Display and format an error messages, callback. - */ -typedef void (XMLCDECL *errorSAXFunc) (void *ctx, - const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); -/** - * fatalErrorSAXFunc: - * @ctx: an XML parser context - * @msg: the message to display/transmit - * @...: extra parameters for the message display - * - * Display and format fatal error messages, callback. - * Note: so far fatalError() SAX callbacks are not used, error() - * get all the callbacks for errors. - */ -typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx, - const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); -/** - * isStandaloneSAXFunc: - * @ctx: the user data (XML parser context) - * - * Is this document tagged standalone? - * - * Returns 1 if true - */ -typedef int (*isStandaloneSAXFunc) (void *ctx); -/** - * hasInternalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * - * Does this document has an internal subset. - * - * Returns 1 if true - */ -typedef int (*hasInternalSubsetSAXFunc) (void *ctx); - -/** - * hasExternalSubsetSAXFunc: - * @ctx: the user data (XML parser context) - * - * Does this document has an external subset? - * - * Returns 1 if true - */ -typedef int (*hasExternalSubsetSAXFunc) (void *ctx); - -/************************************************************************ - * * - * The SAX version 2 API extensions * - * * - ************************************************************************/ -/** - * XML_SAX2_MAGIC: - * - * Special constant found in SAX2 blocks initialized fields - */ -#define XML_SAX2_MAGIC 0xDEEDBEAF - -/** - * startElementNsSAX2Func: - * @ctx: the user data (XML parser context) - * @localname: the local name of the element - * @prefix: the element namespace prefix if available - * @URI: the element namespace name if available - * @nb_namespaces: number of namespace definitions on that node - * @namespaces: pointer to the array of prefix/URI pairs namespace definitions - * @nb_attributes: the number of attributes on that node - * @nb_defaulted: the number of defaulted attributes. The defaulted - * ones are at the end of the array - * @attributes: pointer to the array of (localname/prefix/URI/value/end) - * attribute values. - * - * SAX2 callback when an element start has been detected by the parser. - * It provides the namespace informations for the element, as well as - * the new namespace declarations on the element. - */ - -typedef void (*startElementNsSAX2Func) (void *ctx, - const xmlChar *localname, - const xmlChar *prefix, - const xmlChar *URI, - int nb_namespaces, - const xmlChar **namespaces, - int nb_attributes, - int nb_defaulted, - const xmlChar **attributes); - -/** - * endElementNsSAX2Func: - * @ctx: the user data (XML parser context) - * @localname: the local name of the element - * @prefix: the element namespace prefix if available - * @URI: the element namespace name if available - * - * SAX2 callback when an element end has been detected by the parser. - * It provides the namespace informations for the element. - */ - -typedef void (*endElementNsSAX2Func) (void *ctx, - const xmlChar *localname, - const xmlChar *prefix, - const xmlChar *URI); - - -struct _xmlSAXHandler { - internalSubsetSAXFunc internalSubset; - isStandaloneSAXFunc isStandalone; - hasInternalSubsetSAXFunc hasInternalSubset; - hasExternalSubsetSAXFunc hasExternalSubset; - resolveEntitySAXFunc resolveEntity; - getEntitySAXFunc getEntity; - entityDeclSAXFunc entityDecl; - notationDeclSAXFunc notationDecl; - attributeDeclSAXFunc attributeDecl; - elementDeclSAXFunc elementDecl; - unparsedEntityDeclSAXFunc unparsedEntityDecl; - setDocumentLocatorSAXFunc setDocumentLocator; - startDocumentSAXFunc startDocument; - endDocumentSAXFunc endDocument; - startElementSAXFunc startElement; - endElementSAXFunc endElement; - referenceSAXFunc reference; - charactersSAXFunc characters; - ignorableWhitespaceSAXFunc ignorableWhitespace; - processingInstructionSAXFunc processingInstruction; - commentSAXFunc comment; - warningSAXFunc warning; - errorSAXFunc error; - fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ - getParameterEntitySAXFunc getParameterEntity; - cdataBlockSAXFunc cdataBlock; - externalSubsetSAXFunc externalSubset; - unsigned int initialized; - /* The following fields are extensions available only on version 2 */ - void *_private; - startElementNsSAX2Func startElementNs; - endElementNsSAX2Func endElementNs; - xmlStructuredErrorFunc serror; -}; - -/* - * SAX Version 1 - */ -typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1; -typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr; -struct _xmlSAXHandlerV1 { - internalSubsetSAXFunc internalSubset; - isStandaloneSAXFunc isStandalone; - hasInternalSubsetSAXFunc hasInternalSubset; - hasExternalSubsetSAXFunc hasExternalSubset; - resolveEntitySAXFunc resolveEntity; - getEntitySAXFunc getEntity; - entityDeclSAXFunc entityDecl; - notationDeclSAXFunc notationDecl; - attributeDeclSAXFunc attributeDecl; - elementDeclSAXFunc elementDecl; - unparsedEntityDeclSAXFunc unparsedEntityDecl; - setDocumentLocatorSAXFunc setDocumentLocator; - startDocumentSAXFunc startDocument; - endDocumentSAXFunc endDocument; - startElementSAXFunc startElement; - endElementSAXFunc endElement; - referenceSAXFunc reference; - charactersSAXFunc characters; - ignorableWhitespaceSAXFunc ignorableWhitespace; - processingInstructionSAXFunc processingInstruction; - commentSAXFunc comment; - warningSAXFunc warning; - errorSAXFunc error; - fatalErrorSAXFunc fatalError; /* unused error() get all the errors */ - getParameterEntitySAXFunc getParameterEntity; - cdataBlockSAXFunc cdataBlock; - externalSubsetSAXFunc externalSubset; - unsigned int initialized; -}; - - -/** - * xmlExternalEntityLoader: - * @URL: The System ID of the resource requested - * @ID: The Public ID of the resource requested - * @context: the XML parser context - * - * External entity loaders types. - * - * Returns the entity input parser. - */ -typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, - const char *ID, - xmlParserCtxtPtr context); - -#ifdef __cplusplus -} -#endif - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * Init/Cleanup - */ -XMLPUBFUN void XMLCALL - xmlInitParser (void); -XMLPUBFUN void XMLCALL - xmlCleanupParser (void); - -/* - * Input functions - */ -XMLPUBFUN int XMLCALL - xmlParserInputRead (xmlParserInputPtr in, - int len); -XMLPUBFUN int XMLCALL - xmlParserInputGrow (xmlParserInputPtr in, - int len); - -/* - * Basic parsing Interfaces - */ -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN xmlDocPtr XMLCALL - xmlParseDoc (const xmlChar *cur); -XMLPUBFUN xmlDocPtr XMLCALL - xmlParseFile (const char *filename); -XMLPUBFUN xmlDocPtr XMLCALL - xmlParseMemory (const char *buffer, - int size); -#endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN int XMLCALL - xmlSubstituteEntitiesDefault(int val); -XMLPUBFUN int XMLCALL - xmlKeepBlanksDefault (int val); -XMLPUBFUN void XMLCALL - xmlStopParser (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlPedanticParserDefault(int val); -XMLPUBFUN int XMLCALL - xmlLineNumbersDefault (int val); - -#ifdef LIBXML_SAX1_ENABLED -/* - * Recovery mode - */ -XMLPUBFUN xmlDocPtr XMLCALL - xmlRecoverDoc (const xmlChar *cur); -XMLPUBFUN xmlDocPtr XMLCALL - xmlRecoverMemory (const char *buffer, - int size); -XMLPUBFUN xmlDocPtr XMLCALL - xmlRecoverFile (const char *filename); -#endif /* LIBXML_SAX1_ENABLED */ - -/* - * Less common routines and SAX interfaces - */ -XMLPUBFUN int XMLCALL - xmlParseDocument (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL - xmlSAXUserParseFile (xmlSAXHandlerPtr sax, - void *user_data, - const char *filename); -XMLPUBFUN int XMLCALL - xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, - void *user_data, - const char *buffer, - int size); -XMLPUBFUN xmlDocPtr XMLCALL - xmlSAXParseDoc (xmlSAXHandlerPtr sax, - const xmlChar *cur, - int recovery); -XMLPUBFUN xmlDocPtr XMLCALL - xmlSAXParseMemory (xmlSAXHandlerPtr sax, - const char *buffer, - int size, - int recovery); -XMLPUBFUN xmlDocPtr XMLCALL - xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, - const char *buffer, - int size, - int recovery, - void *data); -XMLPUBFUN xmlDocPtr XMLCALL - xmlSAXParseFile (xmlSAXHandlerPtr sax, - const char *filename, - int recovery); -XMLPUBFUN xmlDocPtr XMLCALL - xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, - const char *filename, - int recovery, - void *data); -XMLPUBFUN xmlDocPtr XMLCALL - xmlSAXParseEntity (xmlSAXHandlerPtr sax, - const char *filename); -XMLPUBFUN xmlDocPtr XMLCALL - xmlParseEntity (const char *filename); -#endif /* LIBXML_SAX1_ENABLED */ - -#ifdef LIBXML_VALID_ENABLED -XMLPUBFUN xmlDtdPtr XMLCALL - xmlSAXParseDTD (xmlSAXHandlerPtr sax, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN xmlDtdPtr XMLCALL - xmlParseDTD (const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN xmlDtdPtr XMLCALL - xmlIOParseDTD (xmlSAXHandlerPtr sax, - xmlParserInputBufferPtr input, - xmlCharEncoding enc); -#endif /* LIBXML_VALID_ENABLE */ -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL - xmlParseBalancedChunkMemory(xmlDocPtr doc, - xmlSAXHandlerPtr sax, - void *user_data, - int depth, - const xmlChar *string, - xmlNodePtr *lst); -#endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN xmlParserErrors XMLCALL - xmlParseInNodeContext (xmlNodePtr node, - const char *data, - int datalen, - int options, - xmlNodePtr *lst); -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN int XMLCALL - xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, - xmlSAXHandlerPtr sax, - void *user_data, - int depth, - const xmlChar *string, - xmlNodePtr *lst, - int recover); -XMLPUBFUN int XMLCALL - xmlParseExternalEntity (xmlDocPtr doc, - xmlSAXHandlerPtr sax, - void *user_data, - int depth, - const xmlChar *URL, - const xmlChar *ID, - xmlNodePtr *lst); -#endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN int XMLCALL - xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, - const xmlChar *URL, - const xmlChar *ID, - xmlNodePtr *lst); - -/* - * Parser contexts handling. - */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlNewParserCtxt (void); -XMLPUBFUN int XMLCALL - xmlInitParserCtxt (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlClearParserCtxt (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN void XMLCALL - xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, - const xmlChar* buffer, - const char *filename); -#endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreateDocParserCtxt (const xmlChar *cur); - -#ifdef LIBXML_LEGACY_ENABLED -/* - * Reading/setting optional parsing features. - */ -XMLPUBFUN int XMLCALL - xmlGetFeaturesList (int *len, - const char **result); -XMLPUBFUN int XMLCALL - xmlGetFeature (xmlParserCtxtPtr ctxt, - const char *name, - void *result); -XMLPUBFUN int XMLCALL - xmlSetFeature (xmlParserCtxtPtr ctxt, - const char *name, - void *value); -#endif /* LIBXML_LEGACY_ENABLED */ - -#ifdef LIBXML_PUSH_ENABLED -/* - * Interfaces for the Push mode. - */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, - void *user_data, - const char *chunk, - int size, - const char *filename); -XMLPUBFUN int XMLCALL - xmlParseChunk (xmlParserCtxtPtr ctxt, - const char *chunk, - int size, - int terminate); -#endif /* LIBXML_PUSH_ENABLED */ - -/* - * Special I/O mode. - */ - -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, - void *user_data, - xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - xmlCharEncoding enc); - -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlNewIOInputStream (xmlParserCtxtPtr ctxt, - xmlParserInputBufferPtr input, - xmlCharEncoding enc); - -/* - * Node infos. - */ -XMLPUBFUN const xmlParserNodeInfo* XMLCALL - xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, - const xmlNodePtr node); -XMLPUBFUN void XMLCALL - xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); -XMLPUBFUN void XMLCALL - xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); -XMLPUBFUN unsigned long XMLCALL - xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, - const xmlNodePtr node); -XMLPUBFUN void XMLCALL - xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, - const xmlParserNodeInfoPtr info); - -/* - * External entities handling actually implemented in xmlIO. - */ - -XMLPUBFUN void XMLCALL - xmlSetExternalEntityLoader(xmlExternalEntityLoader f); -XMLPUBFUN xmlExternalEntityLoader XMLCALL - xmlGetExternalEntityLoader(void); -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlLoadExternalEntity (const char *URL, - const char *ID, - xmlParserCtxtPtr ctxt); - -/* - * Index lookup, actually implemented in the encoding module - */ -XMLPUBFUN long XMLCALL - xmlByteConsumed (xmlParserCtxtPtr ctxt); - -/* - * New set of simpler/more flexible APIs - */ -/** - * xmlParserOption: - * - * This is the set of XML parser options that can be passed down - * to the xmlReadDoc() and similar calls. - */ -typedef enum { - XML_PARSE_RECOVER = 1<<0, /* recover on errors */ - XML_PARSE_NOENT = 1<<1, /* substitute entities */ - XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */ - XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */ - XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */ - XML_PARSE_NOERROR = 1<<5, /* suppress error reports */ - XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */ - XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */ - XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */ - XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */ - XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */ - XML_PARSE_NONET = 1<<11,/* Forbid network access */ - XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */ - XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */ - XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */ - XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */ - XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of - the tree allowed afterwards (will possibly - crash if you try to modify the tree) */ - XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */ - XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */ - XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */ - XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */ - XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */ - XML_PARSE_BIG_LINES = 1<<22 /* Store big lines numbers in text PSVI field */ -} xmlParserOption; - -XMLPUBFUN void XMLCALL - xmlCtxtReset (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlCtxtResetPush (xmlParserCtxtPtr ctxt, - const char *chunk, - int size, - const char *filename, - const char *encoding); -XMLPUBFUN int XMLCALL - xmlCtxtUseOptions (xmlParserCtxtPtr ctxt, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlReadDoc (const xmlChar *cur, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlReadFile (const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlReadMemory (const char *buffer, - int size, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlReadFd (int fd, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlReadIO (xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlCtxtReadDoc (xmlParserCtxtPtr ctxt, - const xmlChar *cur, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlCtxtReadFile (xmlParserCtxtPtr ctxt, - const char *filename, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlCtxtReadMemory (xmlParserCtxtPtr ctxt, - const char *buffer, - int size, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlCtxtReadFd (xmlParserCtxtPtr ctxt, - int fd, - const char *URL, - const char *encoding, - int options); -XMLPUBFUN xmlDocPtr XMLCALL - xmlCtxtReadIO (xmlParserCtxtPtr ctxt, - xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - const char *URL, - const char *encoding, - int options); - -/* - * Library wide options - */ -/** - * xmlFeature: - * - * Used to examine the existance of features that can be enabled - * or disabled at compile-time. - * They used to be called XML_FEATURE_xxx but this clashed with Expat - */ -typedef enum { - XML_WITH_THREAD = 1, - XML_WITH_TREE = 2, - XML_WITH_OUTPUT = 3, - XML_WITH_PUSH = 4, - XML_WITH_READER = 5, - XML_WITH_PATTERN = 6, - XML_WITH_WRITER = 7, - XML_WITH_SAX1 = 8, - XML_WITH_FTP = 9, - XML_WITH_HTTP = 10, - XML_WITH_VALID = 11, - XML_WITH_HTML = 12, - XML_WITH_LEGACY = 13, - XML_WITH_C14N = 14, - XML_WITH_CATALOG = 15, - XML_WITH_XPATH = 16, - XML_WITH_XPTR = 17, - XML_WITH_XINCLUDE = 18, - XML_WITH_ICONV = 19, - XML_WITH_ISO8859X = 20, - XML_WITH_UNICODE = 21, - XML_WITH_REGEXP = 22, - XML_WITH_AUTOMATA = 23, - XML_WITH_EXPR = 24, - XML_WITH_SCHEMAS = 25, - XML_WITH_SCHEMATRON = 26, - XML_WITH_MODULES = 27, - XML_WITH_DEBUG = 28, - XML_WITH_DEBUG_MEM = 29, - XML_WITH_DEBUG_RUN = 30, - XML_WITH_ZLIB = 31, - XML_WITH_ICU = 32, - XML_WITH_LZMA = 33, - XML_WITH_NONE = 99999 /* just to be sure of allocation size */ -} xmlFeature; - -XMLPUBFUN int XMLCALL - xmlHasFeature (xmlFeature feature); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_PARSER_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/parserInternals.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/parserInternals.h deleted file mode 100644 index f30fc68..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/parserInternals.h +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Summary: internals routines and limits exported by the parser. - * Description: this module exports a number of internal parsing routines - * they are not really all intended for applications but - * can prove useful doing low level processing. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_PARSER_INTERNALS_H__ -#define __XML_PARSER_INTERNALS_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlParserMaxDepth: - * - * arbitrary depth limit for the XML documents that we allow to - * process. This is not a limitation of the parser but a safety - * boundary feature, use XML_PARSE_HUGE option to override it. - */ -XMLPUBVAR unsigned int xmlParserMaxDepth; - -/** - * XML_MAX_TEXT_LENGTH: - * - * Maximum size allowed for a single text node when building a tree. - * This is not a limitation of the parser but a safety boundary feature, - * use XML_PARSE_HUGE option to override it. - * Introduced in 2.9.0 - */ -#define XML_MAX_TEXT_LENGTH 10000000 - -/** - * XML_MAX_NAME_LENGTH: - * - * Maximum size allowed for a markup identitier - * This is not a limitation of the parser but a safety boundary feature, - * use XML_PARSE_HUGE option to override it. - * Note that with the use of parsing dictionaries overriding the limit - * may result in more runtime memory usage in face of "unfriendly' content - * Introduced in 2.9.0 - */ -#define XML_MAX_NAME_LENGTH 50000 - -/** - * XML_MAX_DICTIONARY_LIMIT: - * - * Maximum size allowed by the parser for a dictionary by default - * This is not a limitation of the parser but a safety boundary feature, - * use XML_PARSE_HUGE option to override it. - * Introduced in 2.9.0 - */ -#define XML_MAX_DICTIONARY_LIMIT 10000000 - -/** - * XML_MAX_LOOKUP_LIMIT: - * - * Maximum size allowed by the parser for ahead lookup - * This is an upper boundary enforced by the parser to avoid bad - * behaviour on "unfriendly' content - * Introduced in 2.9.0 - */ -#define XML_MAX_LOOKUP_LIMIT 10000000 - -/** - * XML_MAX_NAMELEN: - * - * Identifiers can be longer, but this will be more costly - * at runtime. - */ -#define XML_MAX_NAMELEN 100 - -/** - * INPUT_CHUNK: - * - * The parser tries to always have that amount of input ready. - * One of the point is providing context when reporting errors. - */ -#define INPUT_CHUNK 250 - -/************************************************************************ - * * - * UNICODE version of the macros. * - * * - ************************************************************************/ -/** - * IS_BYTE_CHAR: - * @c: an byte value (int) - * - * Macro to check the following production in the XML spec: - * - * [2] Char ::= #x9 | #xA | #xD | [#x20...] - * any byte character in the accepted range - */ -#define IS_BYTE_CHAR(c) xmlIsChar_ch(c) - -/** - * IS_CHAR: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] - * | [#x10000-#x10FFFF] - * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. - */ -#define IS_CHAR(c) xmlIsCharQ(c) - -/** - * IS_CHAR_CH: - * @c: an xmlChar (usually an unsigned char) - * - * Behaves like IS_CHAR on single-byte value - */ -#define IS_CHAR_CH(c) xmlIsChar_ch(c) - -/** - * IS_BLANK: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * [3] S ::= (#x20 | #x9 | #xD | #xA)+ - */ -#define IS_BLANK(c) xmlIsBlankQ(c) - -/** - * IS_BLANK_CH: - * @c: an xmlChar value (normally unsigned char) - * - * Behaviour same as IS_BLANK - */ -#define IS_BLANK_CH(c) xmlIsBlank_ch(c) - -/** - * IS_BASECHAR: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * [85] BaseChar ::= ... long list see REC ... - */ -#define IS_BASECHAR(c) xmlIsBaseCharQ(c) - -/** - * IS_DIGIT: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * [88] Digit ::= ... long list see REC ... - */ -#define IS_DIGIT(c) xmlIsDigitQ(c) - -/** - * IS_DIGIT_CH: - * @c: an xmlChar value (usually an unsigned char) - * - * Behaves like IS_DIGIT but with a single byte argument - */ -#define IS_DIGIT_CH(c) xmlIsDigit_ch(c) - -/** - * IS_COMBINING: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * [87] CombiningChar ::= ... long list see REC ... - */ -#define IS_COMBINING(c) xmlIsCombiningQ(c) - -/** - * IS_COMBINING_CH: - * @c: an xmlChar (usually an unsigned char) - * - * Always false (all combining chars > 0xff) - */ -#define IS_COMBINING_CH(c) 0 - -/** - * IS_EXTENDER: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * - * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | - * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] | - * [#x309D-#x309E] | [#x30FC-#x30FE] - */ -#define IS_EXTENDER(c) xmlIsExtenderQ(c) - -/** - * IS_EXTENDER_CH: - * @c: an xmlChar value (usually an unsigned char) - * - * Behaves like IS_EXTENDER but with a single-byte argument - */ -#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c) - -/** - * IS_IDEOGRAPHIC: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * - * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] - */ -#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c) - -/** - * IS_LETTER: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * - * [84] Letter ::= BaseChar | Ideographic - */ -#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) - -/** - * IS_LETTER_CH: - * @c: an xmlChar value (normally unsigned char) - * - * Macro behaves like IS_LETTER, but only check base chars - * - */ -#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c) - -/** - * IS_ASCII_LETTER: - * @c: an xmlChar value - * - * Macro to check [a-zA-Z] - * - */ -#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \ - ((0x61 <= (c)) && ((c) <= 0x7a))) - -/** - * IS_ASCII_DIGIT: - * @c: an xmlChar value - * - * Macro to check [0-9] - * - */ -#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39)) - -/** - * IS_PUBIDCHAR: - * @c: an UNICODE value (int) - * - * Macro to check the following production in the XML spec: - * - * - * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] - */ -#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c) - -/** - * IS_PUBIDCHAR_CH: - * @c: an xmlChar value (normally unsigned char) - * - * Same as IS_PUBIDCHAR but for single-byte value - */ -#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c) - -/** - * SKIP_EOL: - * @p: and UTF8 string pointer - * - * Skips the end of line chars. - */ -#define SKIP_EOL(p) \ - if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \ - if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; } - -/** - * MOVETO_ENDTAG: - * @p: and UTF8 string pointer - * - * Skips to the next '>' char. - */ -#define MOVETO_ENDTAG(p) \ - while ((*p) && (*(p) != '>')) (p)++ - -/** - * MOVETO_STARTTAG: - * @p: and UTF8 string pointer - * - * Skips to the next '<' char. - */ -#define MOVETO_STARTTAG(p) \ - while ((*p) && (*(p) != '<')) (p)++ - -/** - * Global variables used for predefined strings. - */ -XMLPUBVAR const xmlChar xmlStringText[]; -XMLPUBVAR const xmlChar xmlStringTextNoenc[]; -XMLPUBVAR const xmlChar xmlStringComment[]; - -/* - * Function to finish the work of the macros where needed. - */ -XMLPUBFUN int XMLCALL xmlIsLetter (int c); - -/** - * Parser context. - */ -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreateFileParserCtxt (const char *filename); -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreateURLParserCtxt (const char *filename, - int options); -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreateMemoryParserCtxt(const char *buffer, - int size); -XMLPUBFUN xmlParserCtxtPtr XMLCALL - xmlCreateEntityParserCtxt(const xmlChar *URL, - const xmlChar *ID, - const xmlChar *base); -XMLPUBFUN int XMLCALL - xmlSwitchEncoding (xmlParserCtxtPtr ctxt, - xmlCharEncoding enc); -XMLPUBFUN int XMLCALL - xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, - xmlCharEncodingHandlerPtr handler); -XMLPUBFUN int XMLCALL - xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt, - xmlParserInputPtr input, - xmlCharEncodingHandlerPtr handler); - -#ifdef IN_LIBXML -/* internal error reporting */ -XMLPUBFUN void XMLCALL - __xmlErrEncoding (xmlParserCtxtPtr ctxt, - xmlParserErrors xmlerr, - const char *msg, - const xmlChar * str1, - const xmlChar * str2) LIBXML_ATTR_FORMAT(3,0); -#endif - -/** - * Input Streams. - */ -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlNewStringInputStream (xmlParserCtxtPtr ctxt, - const xmlChar *buffer); -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, - xmlEntityPtr entity); -XMLPUBFUN int XMLCALL - xmlPushInput (xmlParserCtxtPtr ctxt, - xmlParserInputPtr input); -XMLPUBFUN xmlChar XMLCALL - xmlPopInput (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlFreeInputStream (xmlParserInputPtr input); -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlNewInputFromFile (xmlParserCtxtPtr ctxt, - const char *filename); -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlNewInputStream (xmlParserCtxtPtr ctxt); - -/** - * Namespaces. - */ -XMLPUBFUN xmlChar * XMLCALL - xmlSplitQName (xmlParserCtxtPtr ctxt, - const xmlChar *name, - xmlChar **prefix); - -/** - * Generic production rules. - */ -XMLPUBFUN const xmlChar * XMLCALL - xmlParseName (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParseNmtoken (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParseEntityValue (xmlParserCtxtPtr ctxt, - xmlChar **orig); -XMLPUBFUN xmlChar * XMLCALL - xmlParseAttValue (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseCharData (xmlParserCtxtPtr ctxt, - int cdata); -XMLPUBFUN xmlChar * XMLCALL - xmlParseExternalID (xmlParserCtxtPtr ctxt, - xmlChar **publicID, - int strict); -XMLPUBFUN void XMLCALL - xmlParseComment (xmlParserCtxtPtr ctxt); -XMLPUBFUN const xmlChar * XMLCALL - xmlParsePITarget (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParsePI (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseNotationDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseEntityDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, - xmlChar **value); -XMLPUBFUN xmlEnumerationPtr XMLCALL - xmlParseNotationType (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlEnumerationPtr XMLCALL - xmlParseEnumerationType (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, - xmlEnumerationPtr *tree); -XMLPUBFUN int XMLCALL - xmlParseAttributeType (xmlParserCtxtPtr ctxt, - xmlEnumerationPtr *tree); -XMLPUBFUN void XMLCALL - xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlElementContentPtr XMLCALL - xmlParseElementMixedContentDecl - (xmlParserCtxtPtr ctxt, - int inputchk); -XMLPUBFUN xmlElementContentPtr XMLCALL - xmlParseElementChildrenContentDecl - (xmlParserCtxtPtr ctxt, - int inputchk); -XMLPUBFUN int XMLCALL - xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, - const xmlChar *name, - xmlElementContentPtr *result); -XMLPUBFUN int XMLCALL - xmlParseElementDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlParseCharRef (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlEntityPtr XMLCALL - xmlParseEntityRef (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseReference (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParsePEReference (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); -#ifdef LIBXML_SAX1_ENABLED -XMLPUBFUN const xmlChar * XMLCALL - xmlParseAttribute (xmlParserCtxtPtr ctxt, - xmlChar **value); -XMLPUBFUN const xmlChar * XMLCALL - xmlParseStartTag (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseEndTag (xmlParserCtxtPtr ctxt); -#endif /* LIBXML_SAX1_ENABLED */ -XMLPUBFUN void XMLCALL - xmlParseCDSect (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseContent (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseElement (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParseVersionNum (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParseVersionInfo (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlParseEncName (xmlParserCtxtPtr ctxt); -XMLPUBFUN const xmlChar * XMLCALL - xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlParseSDDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseXMLDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseTextDecl (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseMisc (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseExternalSubset (xmlParserCtxtPtr ctxt, - const xmlChar *ExternalID, - const xmlChar *SystemID); -/** - * XML_SUBSTITUTE_NONE: - * - * If no entities need to be substituted. - */ -#define XML_SUBSTITUTE_NONE 0 -/** - * XML_SUBSTITUTE_REF: - * - * Whether general entities need to be substituted. - */ -#define XML_SUBSTITUTE_REF 1 -/** - * XML_SUBSTITUTE_PEREF: - * - * Whether parameter entities need to be substituted. - */ -#define XML_SUBSTITUTE_PEREF 2 -/** - * XML_SUBSTITUTE_BOTH: - * - * Both general and parameter entities need to be substituted. - */ -#define XML_SUBSTITUTE_BOTH 3 - -XMLPUBFUN xmlChar * XMLCALL - xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, - const xmlChar *str, - int what, - xmlChar end, - xmlChar end2, - xmlChar end3); -XMLPUBFUN xmlChar * XMLCALL - xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt, - const xmlChar *str, - int len, - int what, - xmlChar end, - xmlChar end2, - xmlChar end3); - -/* - * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP. - */ -XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt, - xmlNodePtr value); -XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt, - xmlParserInputPtr value); -XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt); -XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt, - const xmlChar *value); - -/* - * other commodities shared between parser.c and parserInternals. - */ -XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt, - const xmlChar *cur, - int *len); -XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); -XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang); - -/* - * Really core function shared with HTML parser. - */ -XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt, - int *len); -XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out, - int val); -XMLPUBFUN int XMLCALL xmlCopyChar (int len, - xmlChar *out, - int val); -XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in); - -#ifdef LIBXML_HTML_ENABLED -/* - * Actually comes from the HTML parser but launched from the init stuff. - */ -XMLPUBFUN void XMLCALL htmlInitAutoClose (void); -XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename, - const char *encoding); -#endif - -/* - * Specific function to keep track of entities references - * and used by the XSLT debugger. - */ -#ifdef LIBXML_LEGACY_ENABLED -/** - * xmlEntityReferenceFunc: - * @ent: the entity - * @firstNode: the fist node in the chunk - * @lastNode: the last nod in the chunk - * - * Callback function used when one needs to be able to track back the - * provenance of a chunk of nodes inherited from an entity replacement. - */ -typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent, - xmlNodePtr firstNode, - xmlNodePtr lastNode); - -XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func); - -XMLPUBFUN xmlChar * XMLCALL - xmlParseQuotedString (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlParseNamespace (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlScanName (xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt); -XMLPUBFUN xmlChar * XMLCALL - xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, - xmlChar **prefix); -/** - * Entities - */ -XMLPUBFUN xmlChar * XMLCALL - xmlDecodeEntities (xmlParserCtxtPtr ctxt, - int len, - int what, - xmlChar end, - xmlChar end2, - xmlChar end3); -XMLPUBFUN void XMLCALL - xmlHandleEntity (xmlParserCtxtPtr ctxt, - xmlEntityPtr entity); - -#endif /* LIBXML_LEGACY_ENABLED */ - -#ifdef IN_LIBXML -/* - * internal only - */ -XMLPUBFUN void XMLCALL - xmlErrMemory (xmlParserCtxtPtr ctxt, - const char *extra); -#endif - -#ifdef __cplusplus -} -#endif -#endif /* __XML_PARSER_INTERNALS_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/pattern.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/pattern.h deleted file mode 100644 index 97d2cd2..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/pattern.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Summary: pattern expression handling - * Description: allows to compile and test pattern expressions for nodes - * either in a tree or based on a parser state. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_PATTERN_H__ -#define __XML_PATTERN_H__ - -#include -#include -#include - -#ifdef LIBXML_PATTERN_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlPattern: - * - * A compiled (XPath based) pattern to select nodes - */ -typedef struct _xmlPattern xmlPattern; -typedef xmlPattern *xmlPatternPtr; - -/** - * xmlPatternFlags: - * - * This is the set of options affecting the behaviour of pattern - * matching with this module - * - */ -typedef enum { - XML_PATTERN_DEFAULT = 0, /* simple pattern match */ - XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */ - XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */ - XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */ -} xmlPatternFlags; - -XMLPUBFUN void XMLCALL - xmlFreePattern (xmlPatternPtr comp); - -XMLPUBFUN void XMLCALL - xmlFreePatternList (xmlPatternPtr comp); - -XMLPUBFUN xmlPatternPtr XMLCALL - xmlPatterncompile (const xmlChar *pattern, - xmlDict *dict, - int flags, - const xmlChar **namespaces); -XMLPUBFUN int XMLCALL - xmlPatternMatch (xmlPatternPtr comp, - xmlNodePtr node); - -/* streaming interfaces */ -typedef struct _xmlStreamCtxt xmlStreamCtxt; -typedef xmlStreamCtxt *xmlStreamCtxtPtr; - -XMLPUBFUN int XMLCALL - xmlPatternStreamable (xmlPatternPtr comp); -XMLPUBFUN int XMLCALL - xmlPatternMaxDepth (xmlPatternPtr comp); -XMLPUBFUN int XMLCALL - xmlPatternMinDepth (xmlPatternPtr comp); -XMLPUBFUN int XMLCALL - xmlPatternFromRoot (xmlPatternPtr comp); -XMLPUBFUN xmlStreamCtxtPtr XMLCALL - xmlPatternGetStreamCtxt (xmlPatternPtr comp); -XMLPUBFUN void XMLCALL - xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); -XMLPUBFUN int XMLCALL - xmlStreamPushNode (xmlStreamCtxtPtr stream, - const xmlChar *name, - const xmlChar *ns, - int nodeType); -XMLPUBFUN int XMLCALL - xmlStreamPush (xmlStreamCtxtPtr stream, - const xmlChar *name, - const xmlChar *ns); -XMLPUBFUN int XMLCALL - xmlStreamPushAttr (xmlStreamCtxtPtr stream, - const xmlChar *name, - const xmlChar *ns); -XMLPUBFUN int XMLCALL - xmlStreamPop (xmlStreamCtxtPtr stream); -XMLPUBFUN int XMLCALL - xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_PATTERN_ENABLED */ - -#endif /* __XML_PATTERN_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/relaxng.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/relaxng.h deleted file mode 100644 index f269c9e..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/relaxng.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Summary: implementation of the Relax-NG validation - * Description: implementation of the Relax-NG validation - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_RELAX_NG__ -#define __XML_RELAX_NG__ - -#include -#include -#include - -#ifdef LIBXML_SCHEMAS_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _xmlRelaxNG xmlRelaxNG; -typedef xmlRelaxNG *xmlRelaxNGPtr; - - -/** - * xmlRelaxNGValidityErrorFunc: - * @ctx: the validation context - * @msg: the message - * @...: extra arguments - * - * Signature of an error callback from a Relax-NG validation - */ -typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, - const char *msg, - ...) LIBXML_ATTR_FORMAT(2,3); - -/** - * xmlRelaxNGValidityWarningFunc: - * @ctx: the validation context - * @msg: the message - * @...: extra arguments - * - * Signature of a warning callback from a Relax-NG validation - */ -typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, - const char *msg, - ...) LIBXML_ATTR_FORMAT(2,3); - -/** - * A schemas validation context - */ -typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt; -typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr; - -typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt; -typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr; - -/* - * xmlRelaxNGValidErr: - * - * List of possible Relax NG validation errors - */ -typedef enum { - XML_RELAXNG_OK = 0, - XML_RELAXNG_ERR_MEMORY, - XML_RELAXNG_ERR_TYPE, - XML_RELAXNG_ERR_TYPEVAL, - XML_RELAXNG_ERR_DUPID, - XML_RELAXNG_ERR_TYPECMP, - XML_RELAXNG_ERR_NOSTATE, - XML_RELAXNG_ERR_NODEFINE, - XML_RELAXNG_ERR_LISTEXTRA, - XML_RELAXNG_ERR_LISTEMPTY, - XML_RELAXNG_ERR_INTERNODATA, - XML_RELAXNG_ERR_INTERSEQ, - XML_RELAXNG_ERR_INTEREXTRA, - XML_RELAXNG_ERR_ELEMNAME, - XML_RELAXNG_ERR_ATTRNAME, - XML_RELAXNG_ERR_ELEMNONS, - XML_RELAXNG_ERR_ATTRNONS, - XML_RELAXNG_ERR_ELEMWRONGNS, - XML_RELAXNG_ERR_ATTRWRONGNS, - XML_RELAXNG_ERR_ELEMEXTRANS, - XML_RELAXNG_ERR_ATTREXTRANS, - XML_RELAXNG_ERR_ELEMNOTEMPTY, - XML_RELAXNG_ERR_NOELEM, - XML_RELAXNG_ERR_NOTELEM, - XML_RELAXNG_ERR_ATTRVALID, - XML_RELAXNG_ERR_CONTENTVALID, - XML_RELAXNG_ERR_EXTRACONTENT, - XML_RELAXNG_ERR_INVALIDATTR, - XML_RELAXNG_ERR_DATAELEM, - XML_RELAXNG_ERR_VALELEM, - XML_RELAXNG_ERR_LISTELEM, - XML_RELAXNG_ERR_DATATYPE, - XML_RELAXNG_ERR_VALUE, - XML_RELAXNG_ERR_LIST, - XML_RELAXNG_ERR_NOGRAMMAR, - XML_RELAXNG_ERR_EXTRADATA, - XML_RELAXNG_ERR_LACKDATA, - XML_RELAXNG_ERR_INTERNAL, - XML_RELAXNG_ERR_ELEMWRONG, - XML_RELAXNG_ERR_TEXTWRONG -} xmlRelaxNGValidErr; - -/* - * xmlRelaxNGParserFlags: - * - * List of possible Relax NG Parser flags - */ -typedef enum { - XML_RELAXNGP_NONE = 0, - XML_RELAXNGP_FREE_DOC = 1, - XML_RELAXNGP_CRNG = 2 -} xmlRelaxNGParserFlag; - -XMLPUBFUN int XMLCALL - xmlRelaxNGInitTypes (void); -XMLPUBFUN void XMLCALL - xmlRelaxNGCleanupTypes (void); - -/* - * Interfaces for parsing. - */ -XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL - xmlRelaxNGNewParserCtxt (const char *URL); -XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL - xmlRelaxNGNewMemParserCtxt (const char *buffer, - int size); -XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL - xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc); - -XMLPUBFUN int XMLCALL - xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt, - int flag); - -XMLPUBFUN void XMLCALL - xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, - xmlRelaxNGValidityErrorFunc err, - xmlRelaxNGValidityWarningFunc warn, - void *ctx); -XMLPUBFUN int XMLCALL - xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, - xmlRelaxNGValidityErrorFunc *err, - xmlRelaxNGValidityWarningFunc *warn, - void **ctx); -XMLPUBFUN void XMLCALL - xmlRelaxNGSetParserStructuredErrors( - xmlRelaxNGParserCtxtPtr ctxt, - xmlStructuredErrorFunc serror, - void *ctx); -XMLPUBFUN xmlRelaxNGPtr XMLCALL - xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlRelaxNGFree (xmlRelaxNGPtr schema); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlRelaxNGDump (FILE *output, - xmlRelaxNGPtr schema); -XMLPUBFUN void XMLCALL - xmlRelaxNGDumpTree (FILE * output, - xmlRelaxNGPtr schema); -#endif /* LIBXML_OUTPUT_ENABLED */ -/* - * Interfaces for validating - */ -XMLPUBFUN void XMLCALL - xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, - xmlRelaxNGValidityErrorFunc err, - xmlRelaxNGValidityWarningFunc warn, - void *ctx); -XMLPUBFUN int XMLCALL - xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, - xmlRelaxNGValidityErrorFunc *err, - xmlRelaxNGValidityWarningFunc *warn, - void **ctx); -XMLPUBFUN void XMLCALL - xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, void *ctx); -XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL - xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema); -XMLPUBFUN void XMLCALL - xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt, - xmlDocPtr doc); -/* - * Interfaces for progressive validation when possible - */ -XMLPUBFUN int XMLCALL - xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); -XMLPUBFUN int XMLCALL - xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt, - const xmlChar *data, - int len); -XMLPUBFUN int XMLCALL - xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); -XMLPUBFUN int XMLCALL - xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_SCHEMAS_ENABLED */ - -#endif /* __XML_RELAX_NG__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/schemasInternals.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/schemasInternals.h deleted file mode 100644 index 6fb7113..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/schemasInternals.h +++ /dev/null @@ -1,958 +0,0 @@ -/* - * Summary: internal interfaces for XML Schemas - * Description: internal interfaces for the XML Schemas handling - * and schema validity checking - * The Schemas development is a Work In Progress. - * Some of those interfaces are not guaranteed to be API or ABI stable ! - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - - -#ifndef __XML_SCHEMA_INTERNALS_H__ -#define __XML_SCHEMA_INTERNALS_H__ - -#include - -#ifdef LIBXML_SCHEMAS_ENABLED - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - XML_SCHEMAS_UNKNOWN = 0, - XML_SCHEMAS_STRING = 1, - XML_SCHEMAS_NORMSTRING = 2, - XML_SCHEMAS_DECIMAL = 3, - XML_SCHEMAS_TIME = 4, - XML_SCHEMAS_GDAY = 5, - XML_SCHEMAS_GMONTH = 6, - XML_SCHEMAS_GMONTHDAY = 7, - XML_SCHEMAS_GYEAR = 8, - XML_SCHEMAS_GYEARMONTH = 9, - XML_SCHEMAS_DATE = 10, - XML_SCHEMAS_DATETIME = 11, - XML_SCHEMAS_DURATION = 12, - XML_SCHEMAS_FLOAT = 13, - XML_SCHEMAS_DOUBLE = 14, - XML_SCHEMAS_BOOLEAN = 15, - XML_SCHEMAS_TOKEN = 16, - XML_SCHEMAS_LANGUAGE = 17, - XML_SCHEMAS_NMTOKEN = 18, - XML_SCHEMAS_NMTOKENS = 19, - XML_SCHEMAS_NAME = 20, - XML_SCHEMAS_QNAME = 21, - XML_SCHEMAS_NCNAME = 22, - XML_SCHEMAS_ID = 23, - XML_SCHEMAS_IDREF = 24, - XML_SCHEMAS_IDREFS = 25, - XML_SCHEMAS_ENTITY = 26, - XML_SCHEMAS_ENTITIES = 27, - XML_SCHEMAS_NOTATION = 28, - XML_SCHEMAS_ANYURI = 29, - XML_SCHEMAS_INTEGER = 30, - XML_SCHEMAS_NPINTEGER = 31, - XML_SCHEMAS_NINTEGER = 32, - XML_SCHEMAS_NNINTEGER = 33, - XML_SCHEMAS_PINTEGER = 34, - XML_SCHEMAS_INT = 35, - XML_SCHEMAS_UINT = 36, - XML_SCHEMAS_LONG = 37, - XML_SCHEMAS_ULONG = 38, - XML_SCHEMAS_SHORT = 39, - XML_SCHEMAS_USHORT = 40, - XML_SCHEMAS_BYTE = 41, - XML_SCHEMAS_UBYTE = 42, - XML_SCHEMAS_HEXBINARY = 43, - XML_SCHEMAS_BASE64BINARY = 44, - XML_SCHEMAS_ANYTYPE = 45, - XML_SCHEMAS_ANYSIMPLETYPE = 46 -} xmlSchemaValType; - -/* - * XML Schemas defines multiple type of types. - */ -typedef enum { - XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */ - XML_SCHEMA_TYPE_ANY, - XML_SCHEMA_TYPE_FACET, - XML_SCHEMA_TYPE_SIMPLE, - XML_SCHEMA_TYPE_COMPLEX, - XML_SCHEMA_TYPE_SEQUENCE = 6, - XML_SCHEMA_TYPE_CHOICE, - XML_SCHEMA_TYPE_ALL, - XML_SCHEMA_TYPE_SIMPLE_CONTENT, - XML_SCHEMA_TYPE_COMPLEX_CONTENT, - XML_SCHEMA_TYPE_UR, - XML_SCHEMA_TYPE_RESTRICTION, - XML_SCHEMA_TYPE_EXTENSION, - XML_SCHEMA_TYPE_ELEMENT, - XML_SCHEMA_TYPE_ATTRIBUTE, - XML_SCHEMA_TYPE_ATTRIBUTEGROUP, - XML_SCHEMA_TYPE_GROUP, - XML_SCHEMA_TYPE_NOTATION, - XML_SCHEMA_TYPE_LIST, - XML_SCHEMA_TYPE_UNION, - XML_SCHEMA_TYPE_ANY_ATTRIBUTE, - XML_SCHEMA_TYPE_IDC_UNIQUE, - XML_SCHEMA_TYPE_IDC_KEY, - XML_SCHEMA_TYPE_IDC_KEYREF, - XML_SCHEMA_TYPE_PARTICLE = 25, - XML_SCHEMA_TYPE_ATTRIBUTE_USE, - XML_SCHEMA_FACET_MININCLUSIVE = 1000, - XML_SCHEMA_FACET_MINEXCLUSIVE, - XML_SCHEMA_FACET_MAXINCLUSIVE, - XML_SCHEMA_FACET_MAXEXCLUSIVE, - XML_SCHEMA_FACET_TOTALDIGITS, - XML_SCHEMA_FACET_FRACTIONDIGITS, - XML_SCHEMA_FACET_PATTERN, - XML_SCHEMA_FACET_ENUMERATION, - XML_SCHEMA_FACET_WHITESPACE, - XML_SCHEMA_FACET_LENGTH, - XML_SCHEMA_FACET_MAXLENGTH, - XML_SCHEMA_FACET_MINLENGTH, - XML_SCHEMA_EXTRA_QNAMEREF = 2000, - XML_SCHEMA_EXTRA_ATTR_USE_PROHIB -} xmlSchemaTypeType; - -typedef enum { - XML_SCHEMA_CONTENT_UNKNOWN = 0, - XML_SCHEMA_CONTENT_EMPTY = 1, - XML_SCHEMA_CONTENT_ELEMENTS, - XML_SCHEMA_CONTENT_MIXED, - XML_SCHEMA_CONTENT_SIMPLE, - XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */ - XML_SCHEMA_CONTENT_BASIC, - XML_SCHEMA_CONTENT_ANY -} xmlSchemaContentType; - -typedef struct _xmlSchemaVal xmlSchemaVal; -typedef xmlSchemaVal *xmlSchemaValPtr; - -typedef struct _xmlSchemaType xmlSchemaType; -typedef xmlSchemaType *xmlSchemaTypePtr; - -typedef struct _xmlSchemaFacet xmlSchemaFacet; -typedef xmlSchemaFacet *xmlSchemaFacetPtr; - -/** - * Annotation - */ -typedef struct _xmlSchemaAnnot xmlSchemaAnnot; -typedef xmlSchemaAnnot *xmlSchemaAnnotPtr; -struct _xmlSchemaAnnot { - struct _xmlSchemaAnnot *next; - xmlNodePtr content; /* the annotation */ -}; - -/** - * XML_SCHEMAS_ANYATTR_SKIP: - * - * Skip unknown attribute from validation - * Obsolete, not used anymore. - */ -#define XML_SCHEMAS_ANYATTR_SKIP 1 -/** - * XML_SCHEMAS_ANYATTR_LAX: - * - * Ignore validation non definition on attributes - * Obsolete, not used anymore. - */ -#define XML_SCHEMAS_ANYATTR_LAX 2 -/** - * XML_SCHEMAS_ANYATTR_STRICT: - * - * Apply strict validation rules on attributes - * Obsolete, not used anymore. - */ -#define XML_SCHEMAS_ANYATTR_STRICT 3 -/** - * XML_SCHEMAS_ANY_SKIP: - * - * Skip unknown attribute from validation - */ -#define XML_SCHEMAS_ANY_SKIP 1 -/** - * XML_SCHEMAS_ANY_LAX: - * - * Used by wildcards. - * Validate if type found, don't worry if not found - */ -#define XML_SCHEMAS_ANY_LAX 2 -/** - * XML_SCHEMAS_ANY_STRICT: - * - * Used by wildcards. - * Apply strict validation rules - */ -#define XML_SCHEMAS_ANY_STRICT 3 -/** - * XML_SCHEMAS_ATTR_USE_PROHIBITED: - * - * Used by wildcards. - * The attribute is prohibited. - */ -#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0 -/** - * XML_SCHEMAS_ATTR_USE_REQUIRED: - * - * The attribute is required. - */ -#define XML_SCHEMAS_ATTR_USE_REQUIRED 1 -/** - * XML_SCHEMAS_ATTR_USE_OPTIONAL: - * - * The attribute is optional. - */ -#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2 -/** - * XML_SCHEMAS_ATTR_GLOBAL: - * - * allow elements in no namespace - */ -#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0 -/** - * XML_SCHEMAS_ATTR_NSDEFAULT: - * - * allow elements in no namespace - */ -#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7 -/** - * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED: - * - * this is set when the "type" and "ref" references - * have been resolved. - */ -#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8 -/** - * XML_SCHEMAS_ATTR_FIXED: - * - * the attribute has a fixed value - */ -#define XML_SCHEMAS_ATTR_FIXED 1 << 9 - -/** - * xmlSchemaAttribute: - * An attribute definition. - */ - -typedef struct _xmlSchemaAttribute xmlSchemaAttribute; -typedef xmlSchemaAttribute *xmlSchemaAttributePtr; -struct _xmlSchemaAttribute { - xmlSchemaTypeType type; - struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */ - const xmlChar *name; /* the name of the declaration */ - const xmlChar *id; /* Deprecated; not used */ - const xmlChar *ref; /* Deprecated; not used */ - const xmlChar *refNs; /* Deprecated; not used */ - const xmlChar *typeName; /* the local name of the type definition */ - const xmlChar *typeNs; /* the ns URI of the type definition */ - xmlSchemaAnnotPtr annot; - - xmlSchemaTypePtr base; /* Deprecated; not used */ - int occurs; /* Deprecated; not used */ - const xmlChar *defValue; /* The initial value of the value constraint */ - xmlSchemaTypePtr subtypes; /* the type definition */ - xmlNodePtr node; - const xmlChar *targetNamespace; - int flags; - const xmlChar *refPrefix; /* Deprecated; not used */ - xmlSchemaValPtr defVal; /* The compiled value constraint */ - xmlSchemaAttributePtr refDecl; /* Deprecated; not used */ -}; - -/** - * xmlSchemaAttributeLink: - * Used to build a list of attribute uses on complexType definitions. - * WARNING: Deprecated; not used. - */ -typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink; -typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr; -struct _xmlSchemaAttributeLink { - struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */ - struct _xmlSchemaAttribute *attr;/* the linked attribute */ -}; - -/** - * XML_SCHEMAS_WILDCARD_COMPLETE: - * - * If the wildcard is complete. - */ -#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0 - -/** - * xmlSchemaCharValueLink: - * Used to build a list of namespaces on wildcards. - */ -typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs; -typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr; -struct _xmlSchemaWildcardNs { - struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */ - const xmlChar *value;/* the value */ -}; - -/** - * xmlSchemaWildcard. - * A wildcard. - */ -typedef struct _xmlSchemaWildcard xmlSchemaWildcard; -typedef xmlSchemaWildcard *xmlSchemaWildcardPtr; -struct _xmlSchemaWildcard { - xmlSchemaTypeType type; /* The kind of type */ - const xmlChar *id; /* Deprecated; not used */ - xmlSchemaAnnotPtr annot; - xmlNodePtr node; - int minOccurs; /* Deprecated; not used */ - int maxOccurs; /* Deprecated; not used */ - int processContents; - int any; /* Indicates if the ns constraint is of ##any */ - xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */ - xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */ - int flags; -}; - -/** - * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED: - * - * The attribute wildcard has been already builded. - */ -#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0 -/** - * XML_SCHEMAS_ATTRGROUP_GLOBAL: - * - * The attribute wildcard has been already builded. - */ -#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1 -/** - * XML_SCHEMAS_ATTRGROUP_MARKED: - * - * Marks the attr group as marked; used for circular checks. - */ -#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2 - -/** - * XML_SCHEMAS_ATTRGROUP_REDEFINED: - * - * The attr group was redefined. - */ -#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3 -/** - * XML_SCHEMAS_ATTRGROUP_HAS_REFS: - * - * Whether this attr. group contains attr. group references. - */ -#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4 - -/** - * An attribute group definition. - * - * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures - * must be kept similar - */ -typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup; -typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr; -struct _xmlSchemaAttributeGroup { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */ - const xmlChar *name; - const xmlChar *id; - const xmlChar *ref; /* Deprecated; not used */ - const xmlChar *refNs; /* Deprecated; not used */ - xmlSchemaAnnotPtr annot; - - xmlSchemaAttributePtr attributes; /* Deprecated; not used */ - xmlNodePtr node; - int flags; - xmlSchemaWildcardPtr attributeWildcard; - const xmlChar *refPrefix; /* Deprecated; not used */ - xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */ - const xmlChar *targetNamespace; - void *attrUses; -}; - -/** - * xmlSchemaTypeLink: - * Used to build a list of types (e.g. member types of - * simpleType with variety "union"). - */ -typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink; -typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr; -struct _xmlSchemaTypeLink { - struct _xmlSchemaTypeLink *next;/* the next type link ... */ - xmlSchemaTypePtr type;/* the linked type */ -}; - -/** - * xmlSchemaFacetLink: - * Used to build a list of facets. - */ -typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink; -typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr; -struct _xmlSchemaFacetLink { - struct _xmlSchemaFacetLink *next;/* the next facet link ... */ - xmlSchemaFacetPtr facet;/* the linked facet */ -}; - -/** - * XML_SCHEMAS_TYPE_MIXED: - * - * the element content type is mixed - */ -#define XML_SCHEMAS_TYPE_MIXED 1 << 0 -/** - * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION: - * - * the simple or complex type has a derivation method of "extension". - */ -#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1 -/** - * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION: - * - * the simple or complex type has a derivation method of "restriction". - */ -#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2 -/** - * XML_SCHEMAS_TYPE_GLOBAL: - * - * the type is global - */ -#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3 -/** - * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD: - * - * the complexType owns an attribute wildcard, i.e. - * it can be freed by the complexType - */ -#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */ -/** - * XML_SCHEMAS_TYPE_VARIETY_ABSENT: - * - * the simpleType has a variety of "absent". - * TODO: Actually not necessary :-/, since if - * none of the variety flags occur then it's - * automatically absent. - */ -#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5 -/** - * XML_SCHEMAS_TYPE_VARIETY_LIST: - * - * the simpleType has a variety of "list". - */ -#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6 -/** - * XML_SCHEMAS_TYPE_VARIETY_UNION: - * - * the simpleType has a variety of "union". - */ -#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7 -/** - * XML_SCHEMAS_TYPE_VARIETY_ATOMIC: - * - * the simpleType has a variety of "union". - */ -#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8 -/** - * XML_SCHEMAS_TYPE_FINAL_EXTENSION: - * - * the complexType has a final of "extension". - */ -#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9 -/** - * XML_SCHEMAS_TYPE_FINAL_RESTRICTION: - * - * the simpleType/complexType has a final of "restriction". - */ -#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10 -/** - * XML_SCHEMAS_TYPE_FINAL_LIST: - * - * the simpleType has a final of "list". - */ -#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11 -/** - * XML_SCHEMAS_TYPE_FINAL_UNION: - * - * the simpleType has a final of "union". - */ -#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12 -/** - * XML_SCHEMAS_TYPE_FINAL_DEFAULT: - * - * the simpleType has a final of "default". - */ -#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13 -/** - * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE: - * - * Marks the item as a builtin primitive. - */ -#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14 -/** - * XML_SCHEMAS_TYPE_MARKED: - * - * Marks the item as marked; used for circular checks. - */ -#define XML_SCHEMAS_TYPE_MARKED 1 << 16 -/** - * XML_SCHEMAS_TYPE_BLOCK_DEFAULT: - * - * the complexType did not specify 'block' so use the default of the - * item. - */ -#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17 -/** - * XML_SCHEMAS_TYPE_BLOCK_EXTENSION: - * - * the complexType has a 'block' of "extension". - */ -#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18 -/** - * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION: - * - * the complexType has a 'block' of "restriction". - */ -#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19 -/** - * XML_SCHEMAS_TYPE_ABSTRACT: - * - * the simple/complexType is abstract. - */ -#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20 -/** - * XML_SCHEMAS_TYPE_FACETSNEEDVALUE: - * - * indicates if the facets need a computed value - */ -#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21 -/** - * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED: - * - * indicates that the type was typefixed - */ -#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22 -/** - * XML_SCHEMAS_TYPE_INTERNAL_INVALID: - * - * indicates that the type is invalid - */ -#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23 -/** - * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE: - * - * a whitespace-facet value of "preserve" - */ -#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24 -/** - * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE: - * - * a whitespace-facet value of "replace" - */ -#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25 -/** - * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE: - * - * a whitespace-facet value of "collapse" - */ -#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26 -/** - * XML_SCHEMAS_TYPE_HAS_FACETS: - * - * has facets - */ -#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27 -/** - * XML_SCHEMAS_TYPE_NORMVALUENEEDED: - * - * indicates if the facets (pattern) need a normalized value - */ -#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28 - -/** - * XML_SCHEMAS_TYPE_FIXUP_1: - * - * First stage of fixup was done. - */ -#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29 - -/** - * XML_SCHEMAS_TYPE_REDEFINED: - * - * The type was redefined. - */ -#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30 -/** - * XML_SCHEMAS_TYPE_REDEFINING: - * - * The type redefines an other type. - */ -/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */ - -/** - * _xmlSchemaType: - * - * Schemas type definition. - */ -struct _xmlSchemaType { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaType *next; /* the next type if in a sequence ... */ - const xmlChar *name; - const xmlChar *id ; /* Deprecated; not used */ - const xmlChar *ref; /* Deprecated; not used */ - const xmlChar *refNs; /* Deprecated; not used */ - xmlSchemaAnnotPtr annot; - xmlSchemaTypePtr subtypes; - xmlSchemaAttributePtr attributes; /* Deprecated; not used */ - xmlNodePtr node; - int minOccurs; /* Deprecated; not used */ - int maxOccurs; /* Deprecated; not used */ - - int flags; - xmlSchemaContentType contentType; - const xmlChar *base; /* Base type's local name */ - const xmlChar *baseNs; /* Base type's target namespace */ - xmlSchemaTypePtr baseType; /* The base type component */ - xmlSchemaFacetPtr facets; /* Local facets */ - struct _xmlSchemaType *redef; /* Deprecated; not used */ - int recurse; /* Obsolete */ - xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */ - xmlSchemaWildcardPtr attributeWildcard; - int builtInType; /* Type of built-in types. */ - xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */ - xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */ - const xmlChar *refPrefix; /* Deprecated; not used */ - xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types. - Could we use @subtypes for this? */ - xmlRegexpPtr contModel; /* Holds the automaton of the content model */ - const xmlChar *targetNamespace; - void *attrUses; -}; - -/* - * xmlSchemaElement: - * An element definition. - * - * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of - * structures must be kept similar - */ -/** - * XML_SCHEMAS_ELEM_NILLABLE: - * - * the element is nillable - */ -#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0 -/** - * XML_SCHEMAS_ELEM_GLOBAL: - * - * the element is global - */ -#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1 -/** - * XML_SCHEMAS_ELEM_DEFAULT: - * - * the element has a default value - */ -#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2 -/** - * XML_SCHEMAS_ELEM_FIXED: - * - * the element has a fixed value - */ -#define XML_SCHEMAS_ELEM_FIXED 1 << 3 -/** - * XML_SCHEMAS_ELEM_ABSTRACT: - * - * the element is abstract - */ -#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4 -/** - * XML_SCHEMAS_ELEM_TOPLEVEL: - * - * the element is top level - * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead - */ -#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5 -/** - * XML_SCHEMAS_ELEM_REF: - * - * the element is a reference to a type - */ -#define XML_SCHEMAS_ELEM_REF 1 << 6 -/** - * XML_SCHEMAS_ELEM_NSDEFAULT: - * - * allow elements in no namespace - * Obsolete, not used anymore. - */ -#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7 -/** - * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED: - * - * this is set when "type", "ref", "substitutionGroup" - * references have been resolved. - */ -#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8 - /** - * XML_SCHEMAS_ELEM_CIRCULAR: - * - * a helper flag for the search of circular references. - */ -#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9 -/** - * XML_SCHEMAS_ELEM_BLOCK_ABSENT: - * - * the "block" attribute is absent - */ -#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10 -/** - * XML_SCHEMAS_ELEM_BLOCK_EXTENSION: - * - * disallowed substitutions are absent - */ -#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11 -/** - * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION: - * - * disallowed substitutions: "restriction" - */ -#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12 -/** - * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION: - * - * disallowed substitutions: "substituion" - */ -#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13 -/** - * XML_SCHEMAS_ELEM_FINAL_ABSENT: - * - * substitution group exclusions are absent - */ -#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14 -/** - * XML_SCHEMAS_ELEM_FINAL_EXTENSION: - * - * substitution group exclusions: "extension" - */ -#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15 -/** - * XML_SCHEMAS_ELEM_FINAL_RESTRICTION: - * - * substitution group exclusions: "restriction" - */ -#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16 -/** - * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD: - * - * the declaration is a substitution group head - */ -#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17 -/** - * XML_SCHEMAS_ELEM_INTERNAL_CHECKED: - * - * this is set when the elem decl has been checked against - * all constraints - */ -#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18 - -typedef struct _xmlSchemaElement xmlSchemaElement; -typedef xmlSchemaElement *xmlSchemaElementPtr; -struct _xmlSchemaElement { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaType *next; /* Not used? */ - const xmlChar *name; - const xmlChar *id; /* Deprecated; not used */ - const xmlChar *ref; /* Deprecated; not used */ - const xmlChar *refNs; /* Deprecated; not used */ - xmlSchemaAnnotPtr annot; - xmlSchemaTypePtr subtypes; /* the type definition */ - xmlSchemaAttributePtr attributes; - xmlNodePtr node; - int minOccurs; /* Deprecated; not used */ - int maxOccurs; /* Deprecated; not used */ - - int flags; - const xmlChar *targetNamespace; - const xmlChar *namedType; - const xmlChar *namedTypeNs; - const xmlChar *substGroup; - const xmlChar *substGroupNs; - const xmlChar *scope; - const xmlChar *value; /* The original value of the value constraint. */ - struct _xmlSchemaElement *refDecl; /* This will now be used for the - substitution group affiliation */ - xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */ - xmlSchemaContentType contentType; - const xmlChar *refPrefix; /* Deprecated; not used */ - xmlSchemaValPtr defVal; /* The compiled value contraint. */ - void *idcs; /* The identity-constraint defs */ -}; - -/* - * XML_SCHEMAS_FACET_UNKNOWN: - * - * unknown facet handling - */ -#define XML_SCHEMAS_FACET_UNKNOWN 0 -/* - * XML_SCHEMAS_FACET_PRESERVE: - * - * preserve the type of the facet - */ -#define XML_SCHEMAS_FACET_PRESERVE 1 -/* - * XML_SCHEMAS_FACET_REPLACE: - * - * replace the type of the facet - */ -#define XML_SCHEMAS_FACET_REPLACE 2 -/* - * XML_SCHEMAS_FACET_COLLAPSE: - * - * collapse the types of the facet - */ -#define XML_SCHEMAS_FACET_COLLAPSE 3 -/** - * A facet definition. - */ -struct _xmlSchemaFacet { - xmlSchemaTypeType type; /* The kind of type */ - struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */ - const xmlChar *value; /* The original value */ - const xmlChar *id; /* Obsolete */ - xmlSchemaAnnotPtr annot; - xmlNodePtr node; - int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */ - int whitespace; - xmlSchemaValPtr val; /* The compiled value */ - xmlRegexpPtr regexp; /* The regex for patterns */ -}; - -/** - * A notation definition. - */ -typedef struct _xmlSchemaNotation xmlSchemaNotation; -typedef xmlSchemaNotation *xmlSchemaNotationPtr; -struct _xmlSchemaNotation { - xmlSchemaTypeType type; /* The kind of type */ - const xmlChar *name; - xmlSchemaAnnotPtr annot; - const xmlChar *identifier; - const xmlChar *targetNamespace; -}; - -/* -* TODO: Actually all those flags used for the schema should sit -* on the schema parser context, since they are used only -* during parsing an XML schema document, and not available -* on the component level as per spec. -*/ -/** - * XML_SCHEMAS_QUALIF_ELEM: - * - * Reflects elementFormDefault == qualified in - * an XML schema document. - */ -#define XML_SCHEMAS_QUALIF_ELEM 1 << 0 -/** - * XML_SCHEMAS_QUALIF_ATTR: - * - * Reflects attributeFormDefault == qualified in - * an XML schema document. - */ -#define XML_SCHEMAS_QUALIF_ATTR 1 << 1 -/** - * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION: - * - * the schema has "extension" in the set of finalDefault. - */ -#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2 -/** - * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION: - * - * the schema has "restriction" in the set of finalDefault. - */ -#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3 -/** - * XML_SCHEMAS_FINAL_DEFAULT_LIST: - * - * the cshema has "list" in the set of finalDefault. - */ -#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4 -/** - * XML_SCHEMAS_FINAL_DEFAULT_UNION: - * - * the schema has "union" in the set of finalDefault. - */ -#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5 -/** - * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION: - * - * the schema has "extension" in the set of blockDefault. - */ -#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6 -/** - * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION: - * - * the schema has "restriction" in the set of blockDefault. - */ -#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7 -/** - * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION: - * - * the schema has "substitution" in the set of blockDefault. - */ -#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8 -/** - * XML_SCHEMAS_INCLUDING_CONVERT_NS: - * - * the schema is currently including an other schema with - * no target namespace. - */ -#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9 -/** - * _xmlSchema: - * - * A Schemas definition - */ -struct _xmlSchema { - const xmlChar *name; /* schema name */ - const xmlChar *targetNamespace; /* the target namespace */ - const xmlChar *version; - const xmlChar *id; /* Obsolete */ - xmlDocPtr doc; - xmlSchemaAnnotPtr annot; - int flags; - - xmlHashTablePtr typeDecl; - xmlHashTablePtr attrDecl; - xmlHashTablePtr attrgrpDecl; - xmlHashTablePtr elemDecl; - xmlHashTablePtr notaDecl; - - xmlHashTablePtr schemasImports; - - void *_private; /* unused by the library for users or bindings */ - xmlHashTablePtr groupDecl; - xmlDictPtr dict; - void *includes; /* the includes, this is opaque for now */ - int preserve; /* whether to free the document */ - int counter; /* used to give ononymous components unique names */ - xmlHashTablePtr idcDef; /* All identity-constraint defs. */ - void *volatiles; /* Obsolete */ -}; - -XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); -XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_SCHEMAS_ENABLED */ -#endif /* __XML_SCHEMA_INTERNALS_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/schematron.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/schematron.h deleted file mode 100644 index 364eaec..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/schematron.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Summary: XML Schemastron implementation - * Description: interface to the XML Schematron validity checking. - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - - -#ifndef __XML_SCHEMATRON_H__ -#define __XML_SCHEMATRON_H__ - -#include - -#ifdef LIBXML_SCHEMATRON_ENABLED - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */ - XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */ - XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */ - XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */ - XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */ - XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */ - XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */ -} xmlSchematronValidOptions; - -/** - * The schemas related types are kept internal - */ -typedef struct _xmlSchematron xmlSchematron; -typedef xmlSchematron *xmlSchematronPtr; - -/** - * xmlSchematronValidityErrorFunc: - * @ctx: the validation context - * @msg: the message - * @...: extra arguments - * - * Signature of an error callback from a Schematron validation - */ -typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...); - -/** - * xmlSchematronValidityWarningFunc: - * @ctx: the validation context - * @msg: the message - * @...: extra arguments - * - * Signature of a warning callback from a Schematron validation - */ -typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...); - -/** - * A schemas validation context - */ -typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt; -typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr; - -typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt; -typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr; - -/* - * Interfaces for parsing. - */ -XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL - xmlSchematronNewParserCtxt (const char *URL); -XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL - xmlSchematronNewMemParserCtxt(const char *buffer, - int size); -XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL - xmlSchematronNewDocParserCtxt(xmlDocPtr doc); -XMLPUBFUN void XMLCALL - xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt); -/***** -XMLPUBFUN void XMLCALL - xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt, - xmlSchematronValidityErrorFunc err, - xmlSchematronValidityWarningFunc warn, - void *ctx); -XMLPUBFUN int XMLCALL - xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt, - xmlSchematronValidityErrorFunc * err, - xmlSchematronValidityWarningFunc * warn, - void **ctx); -XMLPUBFUN int XMLCALL - xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt); - *****/ -XMLPUBFUN xmlSchematronPtr XMLCALL - xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt); -XMLPUBFUN void XMLCALL - xmlSchematronFree (xmlSchematronPtr schema); -/* - * Interfaces for validating - */ -XMLPUBFUN void XMLCALL - xmlSchematronSetValidStructuredErrors( - xmlSchematronValidCtxtPtr ctxt, - xmlStructuredErrorFunc serror, - void *ctx); -/****** -XMLPUBFUN void XMLCALL - xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt, - xmlSchematronValidityErrorFunc err, - xmlSchematronValidityWarningFunc warn, - void *ctx); -XMLPUBFUN int XMLCALL - xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt, - xmlSchematronValidityErrorFunc *err, - xmlSchematronValidityWarningFunc *warn, - void **ctx); -XMLPUBFUN int XMLCALL - xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt, - int options); -XMLPUBFUN int XMLCALL - xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt, - xmlNodePtr elem); - *******/ - -XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL - xmlSchematronNewValidCtxt (xmlSchematronPtr schema, - int options); -XMLPUBFUN void XMLCALL - xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt, - xmlDocPtr instance); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_SCHEMATRON_ENABLED */ -#endif /* __XML_SCHEMATRON_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/threads.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/threads.h deleted file mode 100644 index 9969ae7..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/threads.h +++ /dev/null @@ -1,89 +0,0 @@ -/** - * Summary: interfaces for thread handling - * Description: set of generic threading related routines - * should work with pthreads, Windows native or TLS threads - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_THREADS_H__ -#define __XML_THREADS_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * xmlMutex are a simple mutual exception locks. - */ -typedef struct _xmlMutex xmlMutex; -typedef xmlMutex *xmlMutexPtr; - -/* - * xmlRMutex are reentrant mutual exception locks. - */ -typedef struct _xmlRMutex xmlRMutex; -typedef xmlRMutex *xmlRMutexPtr; - -#ifdef __cplusplus -} -#endif -#include -#ifdef __cplusplus -extern "C" { -#endif -XMLPUBFUN xmlMutexPtr XMLCALL - xmlNewMutex (void); -XMLPUBFUN void XMLCALL - xmlMutexLock (xmlMutexPtr tok); -XMLPUBFUN void XMLCALL - xmlMutexUnlock (xmlMutexPtr tok); -XMLPUBFUN void XMLCALL - xmlFreeMutex (xmlMutexPtr tok); - -XMLPUBFUN xmlRMutexPtr XMLCALL - xmlNewRMutex (void); -XMLPUBFUN void XMLCALL - xmlRMutexLock (xmlRMutexPtr tok); -XMLPUBFUN void XMLCALL - xmlRMutexUnlock (xmlRMutexPtr tok); -XMLPUBFUN void XMLCALL - xmlFreeRMutex (xmlRMutexPtr tok); - -/* - * Library wide APIs. - */ -XMLPUBFUN void XMLCALL - xmlInitThreads (void); -XMLPUBFUN void XMLCALL - xmlLockLibrary (void); -XMLPUBFUN void XMLCALL - xmlUnlockLibrary(void); -XMLPUBFUN int XMLCALL - xmlGetThreadId (void); -XMLPUBFUN int XMLCALL - xmlIsMainThread (void); -XMLPUBFUN void XMLCALL - xmlCleanupThreads(void); -XMLPUBFUN xmlGlobalStatePtr XMLCALL - xmlGetGlobalState(void); - -#ifdef HAVE_PTHREAD_H -#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) -#if defined(LIBXML_STATIC_FOR_DLL) -int XMLCALL -xmlDllMain(void *hinstDLL, unsigned long fdwReason, - void *lpvReserved); -#endif -#endif - -#ifdef __cplusplus -} -#endif - - -#endif /* __XML_THREADS_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/tree.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/tree.h deleted file mode 100644 index 626ed6a..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/tree.h +++ /dev/null @@ -1,1311 +0,0 @@ -/* - * Summary: interfaces for tree manipulation - * Description: this module describes the structures found in an tree resulting - * from an XML or HTML parsing, as well as the API provided for - * various processing on that tree - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_TREE_H__ -#define __XML_TREE_H__ - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Some of the basic types pointer to structures: - */ -/* xmlIO.h */ -typedef struct _xmlParserInputBuffer xmlParserInputBuffer; -typedef xmlParserInputBuffer *xmlParserInputBufferPtr; - -typedef struct _xmlOutputBuffer xmlOutputBuffer; -typedef xmlOutputBuffer *xmlOutputBufferPtr; - -/* parser.h */ -typedef struct _xmlParserInput xmlParserInput; -typedef xmlParserInput *xmlParserInputPtr; - -typedef struct _xmlParserCtxt xmlParserCtxt; -typedef xmlParserCtxt *xmlParserCtxtPtr; - -typedef struct _xmlSAXLocator xmlSAXLocator; -typedef xmlSAXLocator *xmlSAXLocatorPtr; - -typedef struct _xmlSAXHandler xmlSAXHandler; -typedef xmlSAXHandler *xmlSAXHandlerPtr; - -/* entities.h */ -typedef struct _xmlEntity xmlEntity; -typedef xmlEntity *xmlEntityPtr; - -/** - * BASE_BUFFER_SIZE: - * - * default buffer size 4000. - */ -#define BASE_BUFFER_SIZE 4096 - -/** - * LIBXML_NAMESPACE_DICT: - * - * Defines experimental behaviour: - * 1) xmlNs gets an additional field @context (a xmlDoc) - * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc. - */ -/* #define LIBXML_NAMESPACE_DICT */ - -/** - * xmlBufferAllocationScheme: - * - * A buffer allocation scheme can be defined to either match exactly the - * need or double it's allocated size each time it is found too small. - */ - -typedef enum { - XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */ - XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */ - XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */ - XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */ - XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */ - XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */ -} xmlBufferAllocationScheme; - -/** - * xmlBuffer: - * - * A buffer structure, this old construct is limited to 2GB and - * is being deprecated, use API with xmlBuf instead - */ -typedef struct _xmlBuffer xmlBuffer; -typedef xmlBuffer *xmlBufferPtr; -struct _xmlBuffer { - xmlChar *content; /* The buffer content UTF8 */ - unsigned int use; /* The buffer size used */ - unsigned int size; /* The buffer size */ - xmlBufferAllocationScheme alloc; /* The realloc method */ - xmlChar *contentIO; /* in IO mode we may have a different base */ -}; - -/** - * xmlBuf: - * - * A buffer structure, new one, the actual structure internals are not public - */ - -typedef struct _xmlBuf xmlBuf; - -/** - * xmlBufPtr: - * - * A pointer to a buffer structure, the actual structure internals are not - * public - */ - -typedef xmlBuf *xmlBufPtr; - -/* - * A few public routines for xmlBuf. As those are expected to be used - * mostly internally the bulk of the routines are internal in buf.h - */ -XMLPUBFUN xmlChar* XMLCALL xmlBufContent (const xmlBuf* buf); -XMLPUBFUN xmlChar* XMLCALL xmlBufEnd (xmlBufPtr buf); -XMLPUBFUN size_t XMLCALL xmlBufUse (const xmlBufPtr buf); -XMLPUBFUN size_t XMLCALL xmlBufShrink (xmlBufPtr buf, size_t len); - -/* - * LIBXML2_NEW_BUFFER: - * - * Macro used to express that the API use the new buffers for - * xmlParserInputBuffer and xmlOutputBuffer. The change was - * introduced in 2.9.0. - */ -#define LIBXML2_NEW_BUFFER - -/** - * XML_XML_NAMESPACE: - * - * This is the namespace for the special xml: prefix predefined in the - * XML Namespace specification. - */ -#define XML_XML_NAMESPACE \ - (const xmlChar *) "http://www.w3.org/XML/1998/namespace" - -/** - * XML_XML_ID: - * - * This is the name for the special xml:id attribute - */ -#define XML_XML_ID (const xmlChar *) "xml:id" - -/* - * The different element types carried by an XML tree. - * - * NOTE: This is synchronized with DOM Level1 values - * See http://www.w3.org/TR/REC-DOM-Level-1/ - * - * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should - * be deprecated to use an XML_DTD_NODE. - */ -typedef enum { - XML_ELEMENT_NODE= 1, - XML_ATTRIBUTE_NODE= 2, - XML_TEXT_NODE= 3, - XML_CDATA_SECTION_NODE= 4, - XML_ENTITY_REF_NODE= 5, - XML_ENTITY_NODE= 6, - XML_PI_NODE= 7, - XML_COMMENT_NODE= 8, - XML_DOCUMENT_NODE= 9, - XML_DOCUMENT_TYPE_NODE= 10, - XML_DOCUMENT_FRAG_NODE= 11, - XML_NOTATION_NODE= 12, - XML_HTML_DOCUMENT_NODE= 13, - XML_DTD_NODE= 14, - XML_ELEMENT_DECL= 15, - XML_ATTRIBUTE_DECL= 16, - XML_ENTITY_DECL= 17, - XML_NAMESPACE_DECL= 18, - XML_XINCLUDE_START= 19, - XML_XINCLUDE_END= 20 -#ifdef LIBXML_DOCB_ENABLED - ,XML_DOCB_DOCUMENT_NODE= 21 -#endif -} xmlElementType; - - -/** - * xmlNotation: - * - * A DTD Notation definition. - */ - -typedef struct _xmlNotation xmlNotation; -typedef xmlNotation *xmlNotationPtr; -struct _xmlNotation { - const xmlChar *name; /* Notation name */ - const xmlChar *PublicID; /* Public identifier, if any */ - const xmlChar *SystemID; /* System identifier, if any */ -}; - -/** - * xmlAttributeType: - * - * A DTD Attribute type definition. - */ - -typedef enum { - XML_ATTRIBUTE_CDATA = 1, - XML_ATTRIBUTE_ID, - XML_ATTRIBUTE_IDREF , - XML_ATTRIBUTE_IDREFS, - XML_ATTRIBUTE_ENTITY, - XML_ATTRIBUTE_ENTITIES, - XML_ATTRIBUTE_NMTOKEN, - XML_ATTRIBUTE_NMTOKENS, - XML_ATTRIBUTE_ENUMERATION, - XML_ATTRIBUTE_NOTATION -} xmlAttributeType; - -/** - * xmlAttributeDefault: - * - * A DTD Attribute default definition. - */ - -typedef enum { - XML_ATTRIBUTE_NONE = 1, - XML_ATTRIBUTE_REQUIRED, - XML_ATTRIBUTE_IMPLIED, - XML_ATTRIBUTE_FIXED -} xmlAttributeDefault; - -/** - * xmlEnumeration: - * - * List structure used when there is an enumeration in DTDs. - */ - -typedef struct _xmlEnumeration xmlEnumeration; -typedef xmlEnumeration *xmlEnumerationPtr; -struct _xmlEnumeration { - struct _xmlEnumeration *next; /* next one */ - const xmlChar *name; /* Enumeration name */ -}; - -/** - * xmlAttribute: - * - * An Attribute declaration in a DTD. - */ - -typedef struct _xmlAttribute xmlAttribute; -typedef xmlAttribute *xmlAttributePtr; -struct _xmlAttribute { - void *_private; /* application data */ - xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ - const xmlChar *name; /* Attribute name */ - struct _xmlNode *children; /* NULL */ - struct _xmlNode *last; /* NULL */ - struct _xmlDtd *parent; /* -> DTD */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - struct _xmlAttribute *nexth; /* next in hash table */ - xmlAttributeType atype; /* The attribute type */ - xmlAttributeDefault def; /* the default */ - const xmlChar *defaultValue; /* or the default value */ - xmlEnumerationPtr tree; /* or the enumeration tree if any */ - const xmlChar *prefix; /* the namespace prefix if any */ - const xmlChar *elem; /* Element holding the attribute */ -}; - -/** - * xmlElementContentType: - * - * Possible definitions of element content types. - */ -typedef enum { - XML_ELEMENT_CONTENT_PCDATA = 1, - XML_ELEMENT_CONTENT_ELEMENT, - XML_ELEMENT_CONTENT_SEQ, - XML_ELEMENT_CONTENT_OR -} xmlElementContentType; - -/** - * xmlElementContentOccur: - * - * Possible definitions of element content occurrences. - */ -typedef enum { - XML_ELEMENT_CONTENT_ONCE = 1, - XML_ELEMENT_CONTENT_OPT, - XML_ELEMENT_CONTENT_MULT, - XML_ELEMENT_CONTENT_PLUS -} xmlElementContentOccur; - -/** - * xmlElementContent: - * - * An XML Element content as stored after parsing an element definition - * in a DTD. - */ - -typedef struct _xmlElementContent xmlElementContent; -typedef xmlElementContent *xmlElementContentPtr; -struct _xmlElementContent { - xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */ - xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */ - const xmlChar *name; /* Element name */ - struct _xmlElementContent *c1; /* first child */ - struct _xmlElementContent *c2; /* second child */ - struct _xmlElementContent *parent; /* parent */ - const xmlChar *prefix; /* Namespace prefix */ -}; - -/** - * xmlElementTypeVal: - * - * The different possibilities for an element content type. - */ - -typedef enum { - XML_ELEMENT_TYPE_UNDEFINED = 0, - XML_ELEMENT_TYPE_EMPTY = 1, - XML_ELEMENT_TYPE_ANY, - XML_ELEMENT_TYPE_MIXED, - XML_ELEMENT_TYPE_ELEMENT -} xmlElementTypeVal; - -#ifdef __cplusplus -} -#endif -#include -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlElement: - * - * An XML Element declaration from a DTD. - */ - -typedef struct _xmlElement xmlElement; -typedef xmlElement *xmlElementPtr; -struct _xmlElement { - void *_private; /* application data */ - xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ - const xmlChar *name; /* Element name */ - struct _xmlNode *children; /* NULL */ - struct _xmlNode *last; /* NULL */ - struct _xmlDtd *parent; /* -> DTD */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - xmlElementTypeVal etype; /* The type */ - xmlElementContentPtr content; /* the allowed element content */ - xmlAttributePtr attributes; /* List of the declared attributes */ - const xmlChar *prefix; /* the namespace prefix if any */ -#ifdef LIBXML_REGEXP_ENABLED - xmlRegexpPtr contModel; /* the validating regexp */ -#else - void *contModel; -#endif -}; - - -/** - * XML_LOCAL_NAMESPACE: - * - * A namespace declaration node. - */ -#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL -typedef xmlElementType xmlNsType; - -/** - * xmlNs: - * - * An XML namespace. - * Note that prefix == NULL is valid, it defines the default namespace - * within the subtree (until overridden). - * - * xmlNsType is unified with xmlElementType. - */ - -typedef struct _xmlNs xmlNs; -typedef xmlNs *xmlNsPtr; -struct _xmlNs { - struct _xmlNs *next; /* next Ns link for this node */ - xmlNsType type; /* global or local */ - const xmlChar *href; /* URL for the namespace */ - const xmlChar *prefix; /* prefix for the namespace */ - void *_private; /* application data */ - struct _xmlDoc *context; /* normally an xmlDoc */ -}; - -/** - * xmlDtd: - * - * An XML DTD, as defined by parent link */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - /* End of common part */ - void *notations; /* Hash table for notations if any */ - void *elements; /* Hash table for elements if any */ - void *attributes; /* Hash table for attributes if any */ - void *entities; /* Hash table for entities if any */ - const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */ - const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */ - void *pentities; /* Hash table for param entities if any */ -}; - -/** - * xmlAttr: - * - * An attribute on an XML node. - */ -typedef struct _xmlAttr xmlAttr; -typedef xmlAttr *xmlAttrPtr; -struct _xmlAttr { - void *_private; /* application data */ - xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ - const xmlChar *name; /* the name of the property */ - struct _xmlNode *children; /* the value of the property */ - struct _xmlNode *last; /* NULL */ - struct _xmlNode *parent; /* child->parent link */ - struct _xmlAttr *next; /* next sibling link */ - struct _xmlAttr *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - xmlNs *ns; /* pointer to the associated namespace */ - xmlAttributeType atype; /* the attribute type if validating */ - void *psvi; /* for type/PSVI informations */ -}; - -/** - * xmlID: - * - * An XML ID instance. - */ - -typedef struct _xmlID xmlID; -typedef xmlID *xmlIDPtr; -struct _xmlID { - struct _xmlID *next; /* next ID */ - const xmlChar *value; /* The ID name */ - xmlAttrPtr attr; /* The attribute holding it */ - const xmlChar *name; /* The attribute if attr is not available */ - int lineno; /* The line number if attr is not available */ - struct _xmlDoc *doc; /* The document holding the ID */ -}; - -/** - * xmlRef: - * - * An XML IDREF instance. - */ - -typedef struct _xmlRef xmlRef; -typedef xmlRef *xmlRefPtr; -struct _xmlRef { - struct _xmlRef *next; /* next Ref */ - const xmlChar *value; /* The Ref name */ - xmlAttrPtr attr; /* The attribute holding it */ - const xmlChar *name; /* The attribute if attr is not available */ - int lineno; /* The line number if attr is not available */ -}; - -/** - * xmlNode: - * - * A node in an XML tree. - */ -typedef struct _xmlNode xmlNode; -typedef xmlNode *xmlNodePtr; -struct _xmlNode { - void *_private; /* application data */ - xmlElementType type; /* type number, must be second ! */ - const xmlChar *name; /* the name of the node, or the entity */ - struct _xmlNode *children; /* parent->childs link */ - struct _xmlNode *last; /* last child link */ - struct _xmlNode *parent; /* child->parent link */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* the containing document */ - - /* End of common part */ - xmlNs *ns; /* pointer to the associated namespace */ - xmlChar *content; /* the content */ - struct _xmlAttr *properties;/* properties list */ - xmlNs *nsDef; /* namespace definitions on this node */ - void *psvi; /* for type/PSVI informations */ - unsigned short line; /* line number */ - unsigned short extra; /* extra data for XPath/XSLT */ -}; - -/** - * XML_GET_CONTENT: - * - * Macro to extract the content pointer of a node. - */ -#define XML_GET_CONTENT(n) \ - ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) - -/** - * XML_GET_LINE: - * - * Macro to extract the line number of an element node. - */ -#define XML_GET_LINE(n) \ - (xmlGetLineNo(n)) - -/** - * xmlDocProperty - * - * Set of properties of the document as found by the parser - * Some of them are linked to similary named xmlParserOption - */ -typedef enum { - XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */ - XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */ - XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */ - XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */ - XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */ - XML_DOC_USERBUILT = 1<<5, /* Document was built using the API - and not by parsing an instance */ - XML_DOC_INTERNAL = 1<<6, /* built for internal processing */ - XML_DOC_HTML = 1<<7 /* parsed or built HTML document */ -} xmlDocProperties; - -/** - * xmlDoc: - * - * An XML document. - */ -typedef struct _xmlDoc xmlDoc; -typedef xmlDoc *xmlDocPtr; -struct _xmlDoc { - void *_private; /* application data */ - xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ - char *name; /* name/filename/URI of the document */ - struct _xmlNode *children; /* the document tree */ - struct _xmlNode *last; /* last child link */ - struct _xmlNode *parent; /* child->parent link */ - struct _xmlNode *next; /* next sibling link */ - struct _xmlNode *prev; /* previous sibling link */ - struct _xmlDoc *doc; /* autoreference to itself */ - - /* End of common part */ - int compression;/* level of zlib compression */ - int standalone; /* standalone document (no external refs) - 1 if standalone="yes" - 0 if standalone="no" - -1 if there is no XML declaration - -2 if there is an XML declaration, but no - standalone attribute was specified */ - struct _xmlDtd *intSubset; /* the document internal subset */ - struct _xmlDtd *extSubset; /* the document external subset */ - struct _xmlNs *oldNs; /* Global namespace, the old way */ - const xmlChar *version; /* the XML version string */ - const xmlChar *encoding; /* external initial encoding, if any */ - void *ids; /* Hash table for ID attributes if any */ - void *refs; /* Hash table for IDREFs attributes if any */ - const xmlChar *URL; /* The URI for that document */ - int charset; /* Internal flag for charset handling, - actually an xmlCharEncoding */ - struct _xmlDict *dict; /* dict used to allocate names or NULL */ - void *psvi; /* for type/PSVI informations */ - int parseFlags; /* set of xmlParserOption used to parse the - document */ - int properties; /* set of xmlDocProperties for this document - set at the end of parsing */ -}; - - -typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt; -typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr; - -/** - * xmlDOMWrapAcquireNsFunction: - * @ctxt: a DOM wrapper context - * @node: the context node (element or attribute) - * @nsName: the requested namespace name - * @nsPrefix: the requested namespace prefix - * - * A function called to acquire namespaces (xmlNs) from the wrapper. - * - * Returns an xmlNsPtr or NULL in case of an error. - */ -typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt, - xmlNodePtr node, - const xmlChar *nsName, - const xmlChar *nsPrefix); - -/** - * xmlDOMWrapCtxt: - * - * Context for DOM wrapper-operations. - */ -struct _xmlDOMWrapCtxt { - void * _private; - /* - * The type of this context, just in case we need specialized - * contexts in the future. - */ - int type; - /* - * Internal namespace map used for various operations. - */ - void * namespaceMap; - /* - * Use this one to acquire an xmlNsPtr intended for node->ns. - * (Note that this is not intended for elem->nsDef). - */ - xmlDOMWrapAcquireNsFunction getNsForNodeFunc; -}; - -/** - * xmlChildrenNode: - * - * Macro for compatibility naming layer with libxml1. Maps - * to "children." - */ -#ifndef xmlChildrenNode -#define xmlChildrenNode children -#endif - -/** - * xmlRootNode: - * - * Macro for compatibility naming layer with libxml1. Maps - * to "children". - */ -#ifndef xmlRootNode -#define xmlRootNode children -#endif - -/* - * Variables. - */ - -/* - * Some helper functions - */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \ - defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \ - defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \ - defined(LIBXML_DOCB_ENABLED) || defined(LIBXML_LEGACY_ENABLED) -XMLPUBFUN int XMLCALL - xmlValidateNCName (const xmlChar *value, - int space); -#endif - -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN int XMLCALL - xmlValidateQName (const xmlChar *value, - int space); -XMLPUBFUN int XMLCALL - xmlValidateName (const xmlChar *value, - int space); -XMLPUBFUN int XMLCALL - xmlValidateNMToken (const xmlChar *value, - int space); -#endif - -XMLPUBFUN xmlChar * XMLCALL - xmlBuildQName (const xmlChar *ncname, - const xmlChar *prefix, - xmlChar *memory, - int len); -XMLPUBFUN xmlChar * XMLCALL - xmlSplitQName2 (const xmlChar *name, - xmlChar **prefix); -XMLPUBFUN const xmlChar * XMLCALL - xmlSplitQName3 (const xmlChar *name, - int *len); - -/* - * Handling Buffers, the old ones see @xmlBuf for the new ones. - */ - -XMLPUBFUN void XMLCALL - xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); -XMLPUBFUN xmlBufferAllocationScheme XMLCALL - xmlGetBufferAllocationScheme(void); - -XMLPUBFUN xmlBufferPtr XMLCALL - xmlBufferCreate (void); -XMLPUBFUN xmlBufferPtr XMLCALL - xmlBufferCreateSize (size_t size); -XMLPUBFUN xmlBufferPtr XMLCALL - xmlBufferCreateStatic (void *mem, - size_t size); -XMLPUBFUN int XMLCALL - xmlBufferResize (xmlBufferPtr buf, - unsigned int size); -XMLPUBFUN void XMLCALL - xmlBufferFree (xmlBufferPtr buf); -XMLPUBFUN int XMLCALL - xmlBufferDump (FILE *file, - xmlBufferPtr buf); -XMLPUBFUN int XMLCALL - xmlBufferAdd (xmlBufferPtr buf, - const xmlChar *str, - int len); -XMLPUBFUN int XMLCALL - xmlBufferAddHead (xmlBufferPtr buf, - const xmlChar *str, - int len); -XMLPUBFUN int XMLCALL - xmlBufferCat (xmlBufferPtr buf, - const xmlChar *str); -XMLPUBFUN int XMLCALL - xmlBufferCCat (xmlBufferPtr buf, - const char *str); -XMLPUBFUN int XMLCALL - xmlBufferShrink (xmlBufferPtr buf, - unsigned int len); -XMLPUBFUN int XMLCALL - xmlBufferGrow (xmlBufferPtr buf, - unsigned int len); -XMLPUBFUN void XMLCALL - xmlBufferEmpty (xmlBufferPtr buf); -XMLPUBFUN const xmlChar* XMLCALL - xmlBufferContent (const xmlBuffer *buf); -XMLPUBFUN xmlChar* XMLCALL - xmlBufferDetach (xmlBufferPtr buf); -XMLPUBFUN void XMLCALL - xmlBufferSetAllocationScheme(xmlBufferPtr buf, - xmlBufferAllocationScheme scheme); -XMLPUBFUN int XMLCALL - xmlBufferLength (const xmlBuffer *buf); - -/* - * Creating/freeing new structures. - */ -XMLPUBFUN xmlDtdPtr XMLCALL - xmlCreateIntSubset (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN xmlDtdPtr XMLCALL - xmlNewDtd (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *ExternalID, - const xmlChar *SystemID); -XMLPUBFUN xmlDtdPtr XMLCALL - xmlGetIntSubset (const xmlDoc *doc); -XMLPUBFUN void XMLCALL - xmlFreeDtd (xmlDtdPtr cur); -#ifdef LIBXML_LEGACY_ENABLED -XMLPUBFUN xmlNsPtr XMLCALL - xmlNewGlobalNs (xmlDocPtr doc, - const xmlChar *href, - const xmlChar *prefix); -#endif /* LIBXML_LEGACY_ENABLED */ -XMLPUBFUN xmlNsPtr XMLCALL - xmlNewNs (xmlNodePtr node, - const xmlChar *href, - const xmlChar *prefix); -XMLPUBFUN void XMLCALL - xmlFreeNs (xmlNsPtr cur); -XMLPUBFUN void XMLCALL - xmlFreeNsList (xmlNsPtr cur); -XMLPUBFUN xmlDocPtr XMLCALL - xmlNewDoc (const xmlChar *version); -XMLPUBFUN void XMLCALL - xmlFreeDoc (xmlDocPtr cur); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlNewDocProp (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *value); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN xmlAttrPtr XMLCALL - xmlNewProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *value); -#endif -XMLPUBFUN xmlAttrPtr XMLCALL - xmlNewNsProp (xmlNodePtr node, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *value); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlNewNsPropEatName (xmlNodePtr node, - xmlNsPtr ns, - xmlChar *name, - const xmlChar *value); -XMLPUBFUN void XMLCALL - xmlFreePropList (xmlAttrPtr cur); -XMLPUBFUN void XMLCALL - xmlFreeProp (xmlAttrPtr cur); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlCopyProp (xmlNodePtr target, - xmlAttrPtr cur); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlCopyPropList (xmlNodePtr target, - xmlAttrPtr cur); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlDtdPtr XMLCALL - xmlCopyDtd (xmlDtdPtr dtd); -#endif /* LIBXML_TREE_ENABLED */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN xmlDocPtr XMLCALL - xmlCopyDoc (xmlDocPtr doc, - int recursive); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ -/* - * Creating new nodes. - */ -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocNode (xmlDocPtr doc, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocNodeEatName (xmlDocPtr doc, - xmlNsPtr ns, - xmlChar *name, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewNode (xmlNsPtr ns, - const xmlChar *name); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewNodeEatName (xmlNsPtr ns, - xmlChar *name); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewChild (xmlNodePtr parent, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -#endif -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocText (const xmlDoc *doc, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewText (const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocPI (xmlDocPtr doc, - const xmlChar *name, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewPI (const xmlChar *name, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocTextLen (xmlDocPtr doc, - const xmlChar *content, - int len); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewTextLen (const xmlChar *content, - int len); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocComment (xmlDocPtr doc, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewComment (const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewCDataBlock (xmlDocPtr doc, - const xmlChar *content, - int len); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewCharRef (xmlDocPtr doc, - const xmlChar *name); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewReference (const xmlDoc *doc, - const xmlChar *name); -XMLPUBFUN xmlNodePtr XMLCALL - xmlCopyNode (xmlNodePtr node, - int recursive); -XMLPUBFUN xmlNodePtr XMLCALL - xmlDocCopyNode (xmlNodePtr node, - xmlDocPtr doc, - int recursive); -XMLPUBFUN xmlNodePtr XMLCALL - xmlDocCopyNodeList (xmlDocPtr doc, - xmlNodePtr node); -XMLPUBFUN xmlNodePtr XMLCALL - xmlCopyNodeList (xmlNodePtr node); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewTextChild (xmlNodePtr parent, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocRawNode (xmlDocPtr doc, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *content); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNewDocFragment (xmlDocPtr doc); -#endif /* LIBXML_TREE_ENABLED */ - -/* - * Navigating. - */ -XMLPUBFUN long XMLCALL - xmlGetLineNo (const xmlNode *node); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) -XMLPUBFUN xmlChar * XMLCALL - xmlGetNodePath (const xmlNode *node); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */ -XMLPUBFUN xmlNodePtr XMLCALL - xmlDocGetRootElement (const xmlDoc *doc); -XMLPUBFUN xmlNodePtr XMLCALL - xmlGetLastChild (const xmlNode *parent); -XMLPUBFUN int XMLCALL - xmlNodeIsText (const xmlNode *node); -XMLPUBFUN int XMLCALL - xmlIsBlankNode (const xmlNode *node); - -/* - * Changing the structure. - */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) -XMLPUBFUN xmlNodePtr XMLCALL - xmlDocSetRootElement (xmlDocPtr doc, - xmlNodePtr root); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN void XMLCALL - xmlNodeSetName (xmlNodePtr cur, - const xmlChar *name); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN xmlNodePtr XMLCALL - xmlAddChild (xmlNodePtr parent, - xmlNodePtr cur); -XMLPUBFUN xmlNodePtr XMLCALL - xmlAddChildList (xmlNodePtr parent, - xmlNodePtr cur); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) -XMLPUBFUN xmlNodePtr XMLCALL - xmlReplaceNode (xmlNodePtr old, - xmlNodePtr cur); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) -XMLPUBFUN xmlNodePtr XMLCALL - xmlAddPrevSibling (xmlNodePtr cur, - xmlNodePtr elem); -#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */ -XMLPUBFUN xmlNodePtr XMLCALL - xmlAddSibling (xmlNodePtr cur, - xmlNodePtr elem); -XMLPUBFUN xmlNodePtr XMLCALL - xmlAddNextSibling (xmlNodePtr cur, - xmlNodePtr elem); -XMLPUBFUN void XMLCALL - xmlUnlinkNode (xmlNodePtr cur); -XMLPUBFUN xmlNodePtr XMLCALL - xmlTextMerge (xmlNodePtr first, - xmlNodePtr second); -XMLPUBFUN int XMLCALL - xmlTextConcat (xmlNodePtr node, - const xmlChar *content, - int len); -XMLPUBFUN void XMLCALL - xmlFreeNodeList (xmlNodePtr cur); -XMLPUBFUN void XMLCALL - xmlFreeNode (xmlNodePtr cur); -XMLPUBFUN void XMLCALL - xmlSetTreeDoc (xmlNodePtr tree, - xmlDocPtr doc); -XMLPUBFUN void XMLCALL - xmlSetListDoc (xmlNodePtr list, - xmlDocPtr doc); -/* - * Namespaces. - */ -XMLPUBFUN xmlNsPtr XMLCALL - xmlSearchNs (xmlDocPtr doc, - xmlNodePtr node, - const xmlChar *nameSpace); -XMLPUBFUN xmlNsPtr XMLCALL - xmlSearchNsByHref (xmlDocPtr doc, - xmlNodePtr node, - const xmlChar *href); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN xmlNsPtr * XMLCALL - xmlGetNsList (const xmlDoc *doc, - const xmlNode *node); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */ - -XMLPUBFUN void XMLCALL - xmlSetNs (xmlNodePtr node, - xmlNsPtr ns); -XMLPUBFUN xmlNsPtr XMLCALL - xmlCopyNamespace (xmlNsPtr cur); -XMLPUBFUN xmlNsPtr XMLCALL - xmlCopyNamespaceList (xmlNsPtr cur); - -/* - * Changing the content. - */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) -XMLPUBFUN xmlAttrPtr XMLCALL - xmlSetProp (xmlNodePtr node, - const xmlChar *name, - const xmlChar *value); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlSetNsProp (xmlNodePtr node, - xmlNsPtr ns, - const xmlChar *name, - const xmlChar *value); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */ -XMLPUBFUN xmlChar * XMLCALL - xmlGetNoNsProp (const xmlNode *node, - const xmlChar *name); -XMLPUBFUN xmlChar * XMLCALL - xmlGetProp (const xmlNode *node, - const xmlChar *name); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlHasProp (const xmlNode *node, - const xmlChar *name); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlHasNsProp (const xmlNode *node, - const xmlChar *name, - const xmlChar *nameSpace); -XMLPUBFUN xmlChar * XMLCALL - xmlGetNsProp (const xmlNode *node, - const xmlChar *name, - const xmlChar *nameSpace); -XMLPUBFUN xmlNodePtr XMLCALL - xmlStringGetNodeList (const xmlDoc *doc, - const xmlChar *value); -XMLPUBFUN xmlNodePtr XMLCALL - xmlStringLenGetNodeList (const xmlDoc *doc, - const xmlChar *value, - int len); -XMLPUBFUN xmlChar * XMLCALL - xmlNodeListGetString (xmlDocPtr doc, - const xmlNode *list, - int inLine); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlChar * XMLCALL - xmlNodeListGetRawString (const xmlDoc *doc, - const xmlNode *list, - int inLine); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN void XMLCALL - xmlNodeSetContent (xmlNodePtr cur, - const xmlChar *content); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN void XMLCALL - xmlNodeSetContentLen (xmlNodePtr cur, - const xmlChar *content, - int len); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN void XMLCALL - xmlNodeAddContent (xmlNodePtr cur, - const xmlChar *content); -XMLPUBFUN void XMLCALL - xmlNodeAddContentLen (xmlNodePtr cur, - const xmlChar *content, - int len); -XMLPUBFUN xmlChar * XMLCALL - xmlNodeGetContent (const xmlNode *cur); - -XMLPUBFUN int XMLCALL - xmlNodeBufGetContent (xmlBufferPtr buffer, - const xmlNode *cur); -XMLPUBFUN int XMLCALL - xmlBufGetNodeContent (xmlBufPtr buf, - const xmlNode *cur); - -XMLPUBFUN xmlChar * XMLCALL - xmlNodeGetLang (const xmlNode *cur); -XMLPUBFUN int XMLCALL - xmlNodeGetSpacePreserve (const xmlNode *cur); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN void XMLCALL - xmlNodeSetLang (xmlNodePtr cur, - const xmlChar *lang); -XMLPUBFUN void XMLCALL - xmlNodeSetSpacePreserve (xmlNodePtr cur, - int val); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN xmlChar * XMLCALL - xmlNodeGetBase (const xmlDoc *doc, - const xmlNode *cur); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) -XMLPUBFUN void XMLCALL - xmlNodeSetBase (xmlNodePtr cur, - const xmlChar *uri); -#endif - -/* - * Removing content. - */ -XMLPUBFUN int XMLCALL - xmlRemoveProp (xmlAttrPtr cur); -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN int XMLCALL - xmlUnsetNsProp (xmlNodePtr node, - xmlNsPtr ns, - const xmlChar *name); -XMLPUBFUN int XMLCALL - xmlUnsetProp (xmlNodePtr node, - const xmlChar *name); -#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */ - -/* - * Internal, don't use. - */ -XMLPUBFUN void XMLCALL - xmlBufferWriteCHAR (xmlBufferPtr buf, - const xmlChar *string); -XMLPUBFUN void XMLCALL - xmlBufferWriteChar (xmlBufferPtr buf, - const char *string); -XMLPUBFUN void XMLCALL - xmlBufferWriteQuotedString(xmlBufferPtr buf, - const xmlChar *string); - -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf, - xmlDocPtr doc, - xmlAttrPtr attr, - const xmlChar *string); -#endif /* LIBXML_OUTPUT_ENABLED */ - -#ifdef LIBXML_TREE_ENABLED -/* - * Namespace handling. - */ -XMLPUBFUN int XMLCALL - xmlReconciliateNs (xmlDocPtr doc, - xmlNodePtr tree); -#endif - -#ifdef LIBXML_OUTPUT_ENABLED -/* - * Saving. - */ -XMLPUBFUN void XMLCALL - xmlDocDumpFormatMemory (xmlDocPtr cur, - xmlChar **mem, - int *size, - int format); -XMLPUBFUN void XMLCALL - xmlDocDumpMemory (xmlDocPtr cur, - xmlChar **mem, - int *size); -XMLPUBFUN void XMLCALL - xmlDocDumpMemoryEnc (xmlDocPtr out_doc, - xmlChar **doc_txt_ptr, - int * doc_txt_len, - const char *txt_encoding); -XMLPUBFUN void XMLCALL - xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, - xmlChar **doc_txt_ptr, - int * doc_txt_len, - const char *txt_encoding, - int format); -XMLPUBFUN int XMLCALL - xmlDocFormatDump (FILE *f, - xmlDocPtr cur, - int format); -XMLPUBFUN int XMLCALL - xmlDocDump (FILE *f, - xmlDocPtr cur); -XMLPUBFUN void XMLCALL - xmlElemDump (FILE *f, - xmlDocPtr doc, - xmlNodePtr cur); -XMLPUBFUN int XMLCALL - xmlSaveFile (const char *filename, - xmlDocPtr cur); -XMLPUBFUN int XMLCALL - xmlSaveFormatFile (const char *filename, - xmlDocPtr cur, - int format); -XMLPUBFUN size_t XMLCALL - xmlBufNodeDump (xmlBufPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - int level, - int format); -XMLPUBFUN int XMLCALL - xmlNodeDump (xmlBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - int level, - int format); - -XMLPUBFUN int XMLCALL - xmlSaveFileTo (xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding); -XMLPUBFUN int XMLCALL - xmlSaveFormatFileTo (xmlOutputBufferPtr buf, - xmlDocPtr cur, - const char *encoding, - int format); -XMLPUBFUN void XMLCALL - xmlNodeDumpOutput (xmlOutputBufferPtr buf, - xmlDocPtr doc, - xmlNodePtr cur, - int level, - int format, - const char *encoding); - -XMLPUBFUN int XMLCALL - xmlSaveFormatFileEnc (const char *filename, - xmlDocPtr cur, - const char *encoding, - int format); - -XMLPUBFUN int XMLCALL - xmlSaveFileEnc (const char *filename, - xmlDocPtr cur, - const char *encoding); - -#endif /* LIBXML_OUTPUT_ENABLED */ -/* - * XHTML - */ -XMLPUBFUN int XMLCALL - xmlIsXHTML (const xmlChar *systemID, - const xmlChar *publicID); - -/* - * Compression. - */ -XMLPUBFUN int XMLCALL - xmlGetDocCompressMode (const xmlDoc *doc); -XMLPUBFUN void XMLCALL - xmlSetDocCompressMode (xmlDocPtr doc, - int mode); -XMLPUBFUN int XMLCALL - xmlGetCompressMode (void); -XMLPUBFUN void XMLCALL - xmlSetCompressMode (int mode); - -/* -* DOM-wrapper helper functions. -*/ -XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL - xmlDOMWrapNewCtxt (void); -XMLPUBFUN void XMLCALL - xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, - xmlNodePtr elem, - int options); -XMLPUBFUN int XMLCALL - xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt, - xmlDocPtr sourceDoc, - xmlNodePtr node, - xmlDocPtr destDoc, - xmlNodePtr destParent, - int options); -XMLPUBFUN int XMLCALL - xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr node, - int options); -XMLPUBFUN int XMLCALL - xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt, - xmlDocPtr sourceDoc, - xmlNodePtr node, - xmlNodePtr *clonedNode, - xmlDocPtr destDoc, - xmlNodePtr destParent, - int deep, - int options); - -#ifdef LIBXML_TREE_ENABLED -/* - * 5 interfaces from DOM ElementTraversal, but different in entities - * traversal. - */ -XMLPUBFUN unsigned long XMLCALL - xmlChildElementCount (xmlNodePtr parent); -XMLPUBFUN xmlNodePtr XMLCALL - xmlNextElementSibling (xmlNodePtr node); -XMLPUBFUN xmlNodePtr XMLCALL - xmlFirstElementChild (xmlNodePtr parent); -XMLPUBFUN xmlNodePtr XMLCALL - xmlLastElementChild (xmlNodePtr parent); -XMLPUBFUN xmlNodePtr XMLCALL - xmlPreviousElementSibling (xmlNodePtr node); -#endif -#ifdef __cplusplus -} -#endif -#ifndef __XML_PARSER_H__ -#include -#endif - -#endif /* __XML_TREE_H__ */ - diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/uri.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/uri.h deleted file mode 100644 index db48262..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/uri.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Summary: library of generic URI related routines - * Description: library of generic URI related routines - * Implements RFC 2396 - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_URI_H__ -#define __XML_URI_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlURI: - * - * A parsed URI reference. This is a struct containing the various fields - * as described in RFC 2396 but separated for further processing. - * - * Note: query is a deprecated field which is incorrectly unescaped. - * query_raw takes precedence over query if the former is set. - * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127 - */ -typedef struct _xmlURI xmlURI; -typedef xmlURI *xmlURIPtr; -struct _xmlURI { - char *scheme; /* the URI scheme */ - char *opaque; /* opaque part */ - char *authority; /* the authority part */ - char *server; /* the server part */ - char *user; /* the user part */ - int port; /* the port number */ - char *path; /* the path string */ - char *query; /* the query string (deprecated - use with caution) */ - char *fragment; /* the fragment identifier */ - int cleanup; /* parsing potentially unclean URI */ - char *query_raw; /* the query string (as it appears in the URI) */ -}; - -/* - * This function is in tree.h: - * xmlChar * xmlNodeGetBase (xmlDocPtr doc, - * xmlNodePtr cur); - */ -XMLPUBFUN xmlURIPtr XMLCALL - xmlCreateURI (void); -XMLPUBFUN xmlChar * XMLCALL - xmlBuildURI (const xmlChar *URI, - const xmlChar *base); -XMLPUBFUN xmlChar * XMLCALL - xmlBuildRelativeURI (const xmlChar *URI, - const xmlChar *base); -XMLPUBFUN xmlURIPtr XMLCALL - xmlParseURI (const char *str); -XMLPUBFUN xmlURIPtr XMLCALL - xmlParseURIRaw (const char *str, - int raw); -XMLPUBFUN int XMLCALL - xmlParseURIReference (xmlURIPtr uri, - const char *str); -XMLPUBFUN xmlChar * XMLCALL - xmlSaveUri (xmlURIPtr uri); -XMLPUBFUN void XMLCALL - xmlPrintURI (FILE *stream, - xmlURIPtr uri); -XMLPUBFUN xmlChar * XMLCALL - xmlURIEscapeStr (const xmlChar *str, - const xmlChar *list); -XMLPUBFUN char * XMLCALL - xmlURIUnescapeString (const char *str, - int len, - char *target); -XMLPUBFUN int XMLCALL - xmlNormalizeURIPath (char *path); -XMLPUBFUN xmlChar * XMLCALL - xmlURIEscape (const xmlChar *str); -XMLPUBFUN void XMLCALL - xmlFreeURI (xmlURIPtr uri); -XMLPUBFUN xmlChar* XMLCALL - xmlCanonicPath (const xmlChar *path); -XMLPUBFUN xmlChar* XMLCALL - xmlPathToURI (const xmlChar *path); - -#ifdef __cplusplus -} -#endif -#endif /* __XML_URI_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/valid.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/valid.h deleted file mode 100644 index 2bc7b38..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/valid.h +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Summary: The DTD validation - * Description: API for the DTD handling and the validity checking - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - - -#ifndef __XML_VALID_H__ -#define __XML_VALID_H__ - -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Validation state added for non-determinist content model. - */ -typedef struct _xmlValidState xmlValidState; -typedef xmlValidState *xmlValidStatePtr; - -/** - * xmlValidityErrorFunc: - * @ctx: usually an xmlValidCtxtPtr to a validity error context, - * but comes from ctxt->userData (which normally contains such - * a pointer); ctxt->userData can be changed by the user. - * @msg: the string to format *printf like vararg - * @...: remaining arguments to the format - * - * Callback called when a validity error is found. This is a message - * oriented function similar to an *printf function. - */ -typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx, - const char *msg, - ...) LIBXML_ATTR_FORMAT(2,3); - -/** - * xmlValidityWarningFunc: - * @ctx: usually an xmlValidCtxtPtr to a validity error context, - * but comes from ctxt->userData (which normally contains such - * a pointer); ctxt->userData can be changed by the user. - * @msg: the string to format *printf like vararg - * @...: remaining arguments to the format - * - * Callback called when a validity warning is found. This is a message - * oriented function similar to an *printf function. - */ -typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx, - const char *msg, - ...) LIBXML_ATTR_FORMAT(2,3); - -#ifdef IN_LIBXML -/** - * XML_CTXT_FINISH_DTD_0: - * - * Special value for finishDtd field when embedded in an xmlParserCtxt - */ -#define XML_CTXT_FINISH_DTD_0 0xabcd1234 -/** - * XML_CTXT_FINISH_DTD_1: - * - * Special value for finishDtd field when embedded in an xmlParserCtxt - */ -#define XML_CTXT_FINISH_DTD_1 0xabcd1235 -#endif - -/* - * xmlValidCtxt: - * An xmlValidCtxt is used for error reporting when validating. - */ -typedef struct _xmlValidCtxt xmlValidCtxt; -typedef xmlValidCtxt *xmlValidCtxtPtr; -struct _xmlValidCtxt { - void *userData; /* user specific data block */ - xmlValidityErrorFunc error; /* the callback in case of errors */ - xmlValidityWarningFunc warning; /* the callback in case of warning */ - - /* Node analysis stack used when validating within entities */ - xmlNodePtr node; /* Current parsed Node */ - int nodeNr; /* Depth of the parsing stack */ - int nodeMax; /* Max depth of the parsing stack */ - xmlNodePtr *nodeTab; /* array of nodes */ - - unsigned int finishDtd; /* finished validating the Dtd ? */ - xmlDocPtr doc; /* the document */ - int valid; /* temporary validity check result */ - - /* state state used for non-determinist content validation */ - xmlValidState *vstate; /* current state */ - int vstateNr; /* Depth of the validation stack */ - int vstateMax; /* Max depth of the validation stack */ - xmlValidState *vstateTab; /* array of validation states */ - -#ifdef LIBXML_REGEXP_ENABLED - xmlAutomataPtr am; /* the automata */ - xmlAutomataStatePtr state; /* used to build the automata */ -#else - void *am; - void *state; -#endif -}; - -/* - * ALL notation declarations are stored in a table. - * There is one table per DTD. - */ - -typedef struct _xmlHashTable xmlNotationTable; -typedef xmlNotationTable *xmlNotationTablePtr; - -/* - * ALL element declarations are stored in a table. - * There is one table per DTD. - */ - -typedef struct _xmlHashTable xmlElementTable; -typedef xmlElementTable *xmlElementTablePtr; - -/* - * ALL attribute declarations are stored in a table. - * There is one table per DTD. - */ - -typedef struct _xmlHashTable xmlAttributeTable; -typedef xmlAttributeTable *xmlAttributeTablePtr; - -/* - * ALL IDs attributes are stored in a table. - * There is one table per document. - */ - -typedef struct _xmlHashTable xmlIDTable; -typedef xmlIDTable *xmlIDTablePtr; - -/* - * ALL Refs attributes are stored in a table. - * There is one table per document. - */ - -typedef struct _xmlHashTable xmlRefTable; -typedef xmlRefTable *xmlRefTablePtr; - -/* Notation */ -XMLPUBFUN xmlNotationPtr XMLCALL - xmlAddNotationDecl (xmlValidCtxtPtr ctxt, - xmlDtdPtr dtd, - const xmlChar *name, - const xmlChar *PublicID, - const xmlChar *SystemID); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlNotationTablePtr XMLCALL - xmlCopyNotationTable (xmlNotationTablePtr table); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN void XMLCALL - xmlFreeNotationTable (xmlNotationTablePtr table); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlDumpNotationDecl (xmlBufferPtr buf, - xmlNotationPtr nota); -XMLPUBFUN void XMLCALL - xmlDumpNotationTable (xmlBufferPtr buf, - xmlNotationTablePtr table); -#endif /* LIBXML_OUTPUT_ENABLED */ - -/* Element Content */ -/* the non Doc version are being deprecated */ -XMLPUBFUN xmlElementContentPtr XMLCALL - xmlNewElementContent (const xmlChar *name, - xmlElementContentType type); -XMLPUBFUN xmlElementContentPtr XMLCALL - xmlCopyElementContent (xmlElementContentPtr content); -XMLPUBFUN void XMLCALL - xmlFreeElementContent (xmlElementContentPtr cur); -/* the new versions with doc argument */ -XMLPUBFUN xmlElementContentPtr XMLCALL - xmlNewDocElementContent (xmlDocPtr doc, - const xmlChar *name, - xmlElementContentType type); -XMLPUBFUN xmlElementContentPtr XMLCALL - xmlCopyDocElementContent(xmlDocPtr doc, - xmlElementContentPtr content); -XMLPUBFUN void XMLCALL - xmlFreeDocElementContent(xmlDocPtr doc, - xmlElementContentPtr cur); -XMLPUBFUN void XMLCALL - xmlSnprintfElementContent(char *buf, - int size, - xmlElementContentPtr content, - int englob); -#ifdef LIBXML_OUTPUT_ENABLED -/* DEPRECATED */ -XMLPUBFUN void XMLCALL - xmlSprintfElementContent(char *buf, - xmlElementContentPtr content, - int englob); -#endif /* LIBXML_OUTPUT_ENABLED */ -/* DEPRECATED */ - -/* Element */ -XMLPUBFUN xmlElementPtr XMLCALL - xmlAddElementDecl (xmlValidCtxtPtr ctxt, - xmlDtdPtr dtd, - const xmlChar *name, - xmlElementTypeVal type, - xmlElementContentPtr content); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlElementTablePtr XMLCALL - xmlCopyElementTable (xmlElementTablePtr table); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN void XMLCALL - xmlFreeElementTable (xmlElementTablePtr table); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlDumpElementTable (xmlBufferPtr buf, - xmlElementTablePtr table); -XMLPUBFUN void XMLCALL - xmlDumpElementDecl (xmlBufferPtr buf, - xmlElementPtr elem); -#endif /* LIBXML_OUTPUT_ENABLED */ - -/* Enumeration */ -XMLPUBFUN xmlEnumerationPtr XMLCALL - xmlCreateEnumeration (const xmlChar *name); -XMLPUBFUN void XMLCALL - xmlFreeEnumeration (xmlEnumerationPtr cur); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlEnumerationPtr XMLCALL - xmlCopyEnumeration (xmlEnumerationPtr cur); -#endif /* LIBXML_TREE_ENABLED */ - -/* Attribute */ -XMLPUBFUN xmlAttributePtr XMLCALL - xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, - xmlDtdPtr dtd, - const xmlChar *elem, - const xmlChar *name, - const xmlChar *ns, - xmlAttributeType type, - xmlAttributeDefault def, - const xmlChar *defaultValue, - xmlEnumerationPtr tree); -#ifdef LIBXML_TREE_ENABLED -XMLPUBFUN xmlAttributeTablePtr XMLCALL - xmlCopyAttributeTable (xmlAttributeTablePtr table); -#endif /* LIBXML_TREE_ENABLED */ -XMLPUBFUN void XMLCALL - xmlFreeAttributeTable (xmlAttributeTablePtr table); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void XMLCALL - xmlDumpAttributeTable (xmlBufferPtr buf, - xmlAttributeTablePtr table); -XMLPUBFUN void XMLCALL - xmlDumpAttributeDecl (xmlBufferPtr buf, - xmlAttributePtr attr); -#endif /* LIBXML_OUTPUT_ENABLED */ - -/* IDs */ -XMLPUBFUN xmlIDPtr XMLCALL - xmlAddID (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - const xmlChar *value, - xmlAttrPtr attr); -XMLPUBFUN void XMLCALL - xmlFreeIDTable (xmlIDTablePtr table); -XMLPUBFUN xmlAttrPtr XMLCALL - xmlGetID (xmlDocPtr doc, - const xmlChar *ID); -XMLPUBFUN int XMLCALL - xmlIsID (xmlDocPtr doc, - xmlNodePtr elem, - xmlAttrPtr attr); -XMLPUBFUN int XMLCALL - xmlRemoveID (xmlDocPtr doc, - xmlAttrPtr attr); - -/* IDREFs */ -XMLPUBFUN xmlRefPtr XMLCALL - xmlAddRef (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - const xmlChar *value, - xmlAttrPtr attr); -XMLPUBFUN void XMLCALL - xmlFreeRefTable (xmlRefTablePtr table); -XMLPUBFUN int XMLCALL - xmlIsRef (xmlDocPtr doc, - xmlNodePtr elem, - xmlAttrPtr attr); -XMLPUBFUN int XMLCALL - xmlRemoveRef (xmlDocPtr doc, - xmlAttrPtr attr); -XMLPUBFUN xmlListPtr XMLCALL - xmlGetRefs (xmlDocPtr doc, - const xmlChar *ID); - -/** - * The public function calls related to validity checking. - */ -#ifdef LIBXML_VALID_ENABLED -/* Allocate/Release Validation Contexts */ -XMLPUBFUN xmlValidCtxtPtr XMLCALL - xmlNewValidCtxt(void); -XMLPUBFUN void XMLCALL - xmlFreeValidCtxt(xmlValidCtxtPtr); - -XMLPUBFUN int XMLCALL - xmlValidateRoot (xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -XMLPUBFUN int XMLCALL - xmlValidateElementDecl (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlElementPtr elem); -XMLPUBFUN xmlChar * XMLCALL - xmlValidNormalizeAttributeValue(xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *name, - const xmlChar *value); -XMLPUBFUN xmlChar * XMLCALL - xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *name, - const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlAttributePtr attr); -XMLPUBFUN int XMLCALL - xmlValidateAttributeValue(xmlAttributeType type, - const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNotationPtr nota); -XMLPUBFUN int XMLCALL - xmlValidateDtd (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlDtdPtr dtd); -XMLPUBFUN int XMLCALL - xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -XMLPUBFUN int XMLCALL - xmlValidateDocument (xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -XMLPUBFUN int XMLCALL - xmlValidateElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); -XMLPUBFUN int XMLCALL - xmlValidateOneElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem); -XMLPUBFUN int XMLCALL - xmlValidateOneAttribute (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - xmlAttrPtr attr, - const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateOneNamespace (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *prefix, - xmlNsPtr ns, - const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, - xmlDocPtr doc); -#endif /* LIBXML_VALID_ENABLED */ - -#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) -XMLPUBFUN int XMLCALL - xmlValidateNotationUse (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - const xmlChar *notationName); -#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */ - -XMLPUBFUN int XMLCALL - xmlIsMixedElement (xmlDocPtr doc, - const xmlChar *name); -XMLPUBFUN xmlAttributePtr XMLCALL - xmlGetDtdAttrDesc (xmlDtdPtr dtd, - const xmlChar *elem, - const xmlChar *name); -XMLPUBFUN xmlAttributePtr XMLCALL - xmlGetDtdQAttrDesc (xmlDtdPtr dtd, - const xmlChar *elem, - const xmlChar *name, - const xmlChar *prefix); -XMLPUBFUN xmlNotationPtr XMLCALL - xmlGetDtdNotationDesc (xmlDtdPtr dtd, - const xmlChar *name); -XMLPUBFUN xmlElementPtr XMLCALL - xmlGetDtdQElementDesc (xmlDtdPtr dtd, - const xmlChar *name, - const xmlChar *prefix); -XMLPUBFUN xmlElementPtr XMLCALL - xmlGetDtdElementDesc (xmlDtdPtr dtd, - const xmlChar *name); - -#ifdef LIBXML_VALID_ENABLED - -XMLPUBFUN int XMLCALL - xmlValidGetPotentialChildren(xmlElementContent *ctree, - const xmlChar **names, - int *len, - int max); - -XMLPUBFUN int XMLCALL - xmlValidGetValidElements(xmlNode *prev, - xmlNode *next, - const xmlChar **names, - int max); -XMLPUBFUN int XMLCALL - xmlValidateNameValue (const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateNamesValue (const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateNmtokenValue (const xmlChar *value); -XMLPUBFUN int XMLCALL - xmlValidateNmtokensValue(const xmlChar *value); - -#ifdef LIBXML_REGEXP_ENABLED -/* - * Validation based on the regexp support - */ -XMLPUBFUN int XMLCALL - xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, - xmlElementPtr elem); - -XMLPUBFUN int XMLCALL - xmlValidatePushElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *qname); -XMLPUBFUN int XMLCALL - xmlValidatePushCData (xmlValidCtxtPtr ctxt, - const xmlChar *data, - int len); -XMLPUBFUN int XMLCALL - xmlValidatePopElement (xmlValidCtxtPtr ctxt, - xmlDocPtr doc, - xmlNodePtr elem, - const xmlChar *qname); -#endif /* LIBXML_REGEXP_ENABLED */ -#endif /* LIBXML_VALID_ENABLED */ -#ifdef __cplusplus -} -#endif -#endif /* __XML_VALID_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xinclude.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xinclude.h deleted file mode 100644 index 863ab25..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xinclude.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Summary: implementation of XInclude - * Description: API to handle XInclude processing, - * implements the - * World Wide Web Consortium Last Call Working Draft 10 November 2003 - * http://www.w3.org/TR/2003/WD-xinclude-20031110 - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_XINCLUDE_H__ -#define __XML_XINCLUDE_H__ - -#include -#include - -#ifdef LIBXML_XINCLUDE_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * XINCLUDE_NS: - * - * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude - */ -#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude" -/** - * XINCLUDE_OLD_NS: - * - * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude - */ -#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude" -/** - * XINCLUDE_NODE: - * - * Macro defining "include" - */ -#define XINCLUDE_NODE (const xmlChar *) "include" -/** - * XINCLUDE_FALLBACK: - * - * Macro defining "fallback" - */ -#define XINCLUDE_FALLBACK (const xmlChar *) "fallback" -/** - * XINCLUDE_HREF: - * - * Macro defining "href" - */ -#define XINCLUDE_HREF (const xmlChar *) "href" -/** - * XINCLUDE_PARSE: - * - * Macro defining "parse" - */ -#define XINCLUDE_PARSE (const xmlChar *) "parse" -/** - * XINCLUDE_PARSE_XML: - * - * Macro defining "xml" - */ -#define XINCLUDE_PARSE_XML (const xmlChar *) "xml" -/** - * XINCLUDE_PARSE_TEXT: - * - * Macro defining "text" - */ -#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text" -/** - * XINCLUDE_PARSE_ENCODING: - * - * Macro defining "encoding" - */ -#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding" -/** - * XINCLUDE_PARSE_XPOINTER: - * - * Macro defining "xpointer" - */ -#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer" - -typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; -typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; - -/* - * standalone processing - */ -XMLPUBFUN int XMLCALL - xmlXIncludeProcess (xmlDocPtr doc); -XMLPUBFUN int XMLCALL - xmlXIncludeProcessFlags (xmlDocPtr doc, - int flags); -XMLPUBFUN int XMLCALL - xmlXIncludeProcessFlagsData(xmlDocPtr doc, - int flags, - void *data); -XMLPUBFUN int XMLCALL - xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, - int flags, - void *data); -XMLPUBFUN int XMLCALL - xmlXIncludeProcessTree (xmlNodePtr tree); -XMLPUBFUN int XMLCALL - xmlXIncludeProcessTreeFlags(xmlNodePtr tree, - int flags); -/* - * contextual processing - */ -XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL - xmlXIncludeNewContext (xmlDocPtr doc); -XMLPUBFUN int XMLCALL - xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt, - int flags); -XMLPUBFUN void XMLCALL - xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt); -XMLPUBFUN int XMLCALL - xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt, - xmlNodePtr tree); -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_XINCLUDE_ENABLED */ - -#endif /* __XML_XINCLUDE_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xlink.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xlink.h deleted file mode 100644 index a209a99..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xlink.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Summary: unfinished XLink detection module - * Description: unfinished XLink detection module - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_XLINK_H__ -#define __XML_XLINK_H__ - -#include -#include - -#ifdef LIBXML_XPTR_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Various defines for the various Link properties. - * - * NOTE: the link detection layer will try to resolve QName expansion - * of namespaces. If "foo" is the prefix for "http://foo.com/" - * then the link detection layer will expand role="foo:myrole" - * to "http://foo.com/:myrole". - * NOTE: the link detection layer will expand URI-Refences found on - * href attributes by using the base mechanism if found. - */ -typedef xmlChar *xlinkHRef; -typedef xmlChar *xlinkRole; -typedef xmlChar *xlinkTitle; - -typedef enum { - XLINK_TYPE_NONE = 0, - XLINK_TYPE_SIMPLE, - XLINK_TYPE_EXTENDED, - XLINK_TYPE_EXTENDED_SET -} xlinkType; - -typedef enum { - XLINK_SHOW_NONE = 0, - XLINK_SHOW_NEW, - XLINK_SHOW_EMBED, - XLINK_SHOW_REPLACE -} xlinkShow; - -typedef enum { - XLINK_ACTUATE_NONE = 0, - XLINK_ACTUATE_AUTO, - XLINK_ACTUATE_ONREQUEST -} xlinkActuate; - -/** - * xlinkNodeDetectFunc: - * @ctx: user data pointer - * @node: the node to check - * - * This is the prototype for the link detection routine. - * It calls the default link detection callbacks upon link detection. - */ -typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); - -/* - * The link detection module interact with the upper layers using - * a set of callback registered at parsing time. - */ - -/** - * xlinkSimpleLinkFunk: - * @ctx: user data pointer - * @node: the node carrying the link - * @href: the target of the link - * @role: the role string - * @title: the link title - * - * This is the prototype for a simple link detection callback. - */ -typedef void -(*xlinkSimpleLinkFunk) (void *ctx, - xmlNodePtr node, - const xlinkHRef href, - const xlinkRole role, - const xlinkTitle title); - -/** - * xlinkExtendedLinkFunk: - * @ctx: user data pointer - * @node: the node carrying the link - * @nbLocators: the number of locators detected on the link - * @hrefs: pointer to the array of locator hrefs - * @roles: pointer to the array of locator roles - * @nbArcs: the number of arcs detected on the link - * @from: pointer to the array of source roles found on the arcs - * @to: pointer to the array of target roles found on the arcs - * @show: array of values for the show attributes found on the arcs - * @actuate: array of values for the actuate attributes found on the arcs - * @nbTitles: the number of titles detected on the link - * @title: array of titles detected on the link - * @langs: array of xml:lang values for the titles - * - * This is the prototype for a extended link detection callback. - */ -typedef void -(*xlinkExtendedLinkFunk)(void *ctx, - xmlNodePtr node, - int nbLocators, - const xlinkHRef *hrefs, - const xlinkRole *roles, - int nbArcs, - const xlinkRole *from, - const xlinkRole *to, - xlinkShow *show, - xlinkActuate *actuate, - int nbTitles, - const xlinkTitle *titles, - const xmlChar **langs); - -/** - * xlinkExtendedLinkSetFunk: - * @ctx: user data pointer - * @node: the node carrying the link - * @nbLocators: the number of locators detected on the link - * @hrefs: pointer to the array of locator hrefs - * @roles: pointer to the array of locator roles - * @nbTitles: the number of titles detected on the link - * @title: array of titles detected on the link - * @langs: array of xml:lang values for the titles - * - * This is the prototype for a extended link set detection callback. - */ -typedef void -(*xlinkExtendedLinkSetFunk) (void *ctx, - xmlNodePtr node, - int nbLocators, - const xlinkHRef *hrefs, - const xlinkRole *roles, - int nbTitles, - const xlinkTitle *titles, - const xmlChar **langs); - -/** - * This is the structure containing a set of Links detection callbacks. - * - * There is no default xlink callbacks, if one want to get link - * recognition activated, those call backs must be provided before parsing. - */ -typedef struct _xlinkHandler xlinkHandler; -typedef xlinkHandler *xlinkHandlerPtr; -struct _xlinkHandler { - xlinkSimpleLinkFunk simple; - xlinkExtendedLinkFunk extended; - xlinkExtendedLinkSetFunk set; -}; - -/* - * The default detection routine, can be overridden, they call the default - * detection callbacks. - */ - -XMLPUBFUN xlinkNodeDetectFunc XMLCALL - xlinkGetDefaultDetect (void); -XMLPUBFUN void XMLCALL - xlinkSetDefaultDetect (xlinkNodeDetectFunc func); - -/* - * Routines to set/get the default handlers. - */ -XMLPUBFUN xlinkHandlerPtr XMLCALL - xlinkGetDefaultHandler (void); -XMLPUBFUN void XMLCALL - xlinkSetDefaultHandler (xlinkHandlerPtr handler); - -/* - * Link detection module itself. - */ -XMLPUBFUN xlinkType XMLCALL - xlinkIsLink (xmlDocPtr doc, - xmlNodePtr node); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_XPTR_ENABLED */ - -#endif /* __XML_XLINK_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlIO.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlIO.h deleted file mode 100644 index 3e41744..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlIO.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Summary: interface for the I/O interfaces used by the parser - * Description: interface for the I/O interfaces used by the parser - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_IO_H__ -#define __XML_IO_H__ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Those are the functions and datatypes for the parser input - * I/O structures. - */ - -/** - * xmlInputMatchCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Input API to detect if the current handler - * can provide input fonctionnalities for this resource. - * - * Returns 1 if yes and 0 if another Input module should be used - */ -typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename); -/** - * xmlInputOpenCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Input API to open the resource - * - * Returns an Input context or NULL in case or error - */ -typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename); -/** - * xmlInputReadCallback: - * @context: an Input context - * @buffer: the buffer to store data read - * @len: the length of the buffer in bytes - * - * Callback used in the I/O Input API to read the resource - * - * Returns the number of bytes read or -1 in case of error - */ -typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len); -/** - * xmlInputCloseCallback: - * @context: an Input context - * - * Callback used in the I/O Input API to close the resource - * - * Returns 0 or -1 in case of error - */ -typedef int (XMLCALL *xmlInputCloseCallback) (void * context); - -#ifdef LIBXML_OUTPUT_ENABLED -/* - * Those are the functions and datatypes for the library output - * I/O structures. - */ - -/** - * xmlOutputMatchCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Output API to detect if the current handler - * can provide output fonctionnalities for this resource. - * - * Returns 1 if yes and 0 if another Output module should be used - */ -typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename); -/** - * xmlOutputOpenCallback: - * @filename: the filename or URI - * - * Callback used in the I/O Output API to open the resource - * - * Returns an Output context or NULL in case or error - */ -typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename); -/** - * xmlOutputWriteCallback: - * @context: an Output context - * @buffer: the buffer of data to write - * @len: the length of the buffer in bytes - * - * Callback used in the I/O Output API to write to the resource - * - * Returns the number of bytes written or -1 in case of error - */ -typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer, - int len); -/** - * xmlOutputCloseCallback: - * @context: an Output context - * - * Callback used in the I/O Output API to close the resource - * - * Returns 0 or -1 in case of error - */ -typedef int (XMLCALL *xmlOutputCloseCallback) (void * context); -#endif /* LIBXML_OUTPUT_ENABLED */ - -#ifdef __cplusplus -} -#endif - -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -struct _xmlParserInputBuffer { - void* context; - xmlInputReadCallback readcallback; - xmlInputCloseCallback closecallback; - - xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ - - xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */ - xmlBufPtr raw; /* if encoder != NULL buffer for raw input */ - int compressed; /* -1=unknown, 0=not compressed, 1=compressed */ - int error; - unsigned long rawconsumed;/* amount consumed from raw */ -}; - - -#ifdef LIBXML_OUTPUT_ENABLED -struct _xmlOutputBuffer { - void* context; - xmlOutputWriteCallback writecallback; - xmlOutputCloseCallback closecallback; - - xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ - - xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */ - xmlBufPtr conv; /* if encoder != NULL buffer for output */ - int written; /* total number of byte written */ - int error; -}; -#endif /* LIBXML_OUTPUT_ENABLED */ - -/* - * Interfaces for input - */ -XMLPUBFUN void XMLCALL - xmlCleanupInputCallbacks (void); - -XMLPUBFUN int XMLCALL - xmlPopInputCallbacks (void); - -XMLPUBFUN void XMLCALL - xmlRegisterDefaultInputCallbacks (void); -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlAllocParserInputBuffer (xmlCharEncoding enc); - -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlParserInputBufferCreateFilename (const char *URI, - xmlCharEncoding enc); -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlParserInputBufferCreateFile (FILE *file, - xmlCharEncoding enc); -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlParserInputBufferCreateFd (int fd, - xmlCharEncoding enc); -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlParserInputBufferCreateMem (const char *mem, int size, - xmlCharEncoding enc); -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlParserInputBufferCreateStatic (const char *mem, int size, - xmlCharEncoding enc); -XMLPUBFUN xmlParserInputBufferPtr XMLCALL - xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, - xmlInputCloseCallback ioclose, - void *ioctx, - xmlCharEncoding enc); -XMLPUBFUN int XMLCALL - xmlParserInputBufferRead (xmlParserInputBufferPtr in, - int len); -XMLPUBFUN int XMLCALL - xmlParserInputBufferGrow (xmlParserInputBufferPtr in, - int len); -XMLPUBFUN int XMLCALL - xmlParserInputBufferPush (xmlParserInputBufferPtr in, - int len, - const char *buf); -XMLPUBFUN void XMLCALL - xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); -XMLPUBFUN char * XMLCALL - xmlParserGetDirectory (const char *filename); - -XMLPUBFUN int XMLCALL - xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, - xmlInputOpenCallback openFunc, - xmlInputReadCallback readFunc, - xmlInputCloseCallback closeFunc); - -xmlParserInputBufferPtr - __xmlParserInputBufferCreateFilename(const char *URI, - xmlCharEncoding enc); - -#ifdef LIBXML_OUTPUT_ENABLED -/* - * Interfaces for output - */ -XMLPUBFUN void XMLCALL - xmlCleanupOutputCallbacks (void); -XMLPUBFUN void XMLCALL - xmlRegisterDefaultOutputCallbacks(void); -XMLPUBFUN xmlOutputBufferPtr XMLCALL - xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); - -XMLPUBFUN xmlOutputBufferPtr XMLCALL - xmlOutputBufferCreateFilename (const char *URI, - xmlCharEncodingHandlerPtr encoder, - int compression); - -XMLPUBFUN xmlOutputBufferPtr XMLCALL - xmlOutputBufferCreateFile (FILE *file, - xmlCharEncodingHandlerPtr encoder); - -XMLPUBFUN xmlOutputBufferPtr XMLCALL - xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, - xmlCharEncodingHandlerPtr encoder); - -XMLPUBFUN xmlOutputBufferPtr XMLCALL - xmlOutputBufferCreateFd (int fd, - xmlCharEncodingHandlerPtr encoder); - -XMLPUBFUN xmlOutputBufferPtr XMLCALL - xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, - xmlOutputCloseCallback ioclose, - void *ioctx, - xmlCharEncodingHandlerPtr encoder); - -/* Couple of APIs to get the output without digging into the buffers */ -XMLPUBFUN const xmlChar * XMLCALL - xmlOutputBufferGetContent (xmlOutputBufferPtr out); -XMLPUBFUN size_t XMLCALL - xmlOutputBufferGetSize (xmlOutputBufferPtr out); - -XMLPUBFUN int XMLCALL - xmlOutputBufferWrite (xmlOutputBufferPtr out, - int len, - const char *buf); -XMLPUBFUN int XMLCALL - xmlOutputBufferWriteString (xmlOutputBufferPtr out, - const char *str); -XMLPUBFUN int XMLCALL - xmlOutputBufferWriteEscape (xmlOutputBufferPtr out, - const xmlChar *str, - xmlCharEncodingOutputFunc escaping); - -XMLPUBFUN int XMLCALL - xmlOutputBufferFlush (xmlOutputBufferPtr out); -XMLPUBFUN int XMLCALL - xmlOutputBufferClose (xmlOutputBufferPtr out); - -XMLPUBFUN int XMLCALL - xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, - xmlOutputOpenCallback openFunc, - xmlOutputWriteCallback writeFunc, - xmlOutputCloseCallback closeFunc); - -xmlOutputBufferPtr - __xmlOutputBufferCreateFilename(const char *URI, - xmlCharEncodingHandlerPtr encoder, - int compression); - -#ifdef LIBXML_HTTP_ENABLED -/* This function only exists if HTTP support built into the library */ -XMLPUBFUN void XMLCALL - xmlRegisterHTTPPostCallbacks (void ); -#endif /* LIBXML_HTTP_ENABLED */ - -#endif /* LIBXML_OUTPUT_ENABLED */ - -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlCheckHTTPInput (xmlParserCtxtPtr ctxt, - xmlParserInputPtr ret); - -/* - * A predefined entity loader disabling network accesses - */ -XMLPUBFUN xmlParserInputPtr XMLCALL - xmlNoNetExternalEntityLoader (const char *URL, - const char *ID, - xmlParserCtxtPtr ctxt); - -/* - * xmlNormalizeWindowsPath is obsolete, don't use it. - * Check xmlCanonicPath in uri.h for a better alternative. - */ -XMLPUBFUN xmlChar * XMLCALL - xmlNormalizeWindowsPath (const xmlChar *path); - -XMLPUBFUN int XMLCALL - xmlCheckFilename (const char *path); -/** - * Default 'file://' protocol callbacks - */ -XMLPUBFUN int XMLCALL - xmlFileMatch (const char *filename); -XMLPUBFUN void * XMLCALL - xmlFileOpen (const char *filename); -XMLPUBFUN int XMLCALL - xmlFileRead (void * context, - char * buffer, - int len); -XMLPUBFUN int XMLCALL - xmlFileClose (void * context); - -/** - * Default 'http://' protocol callbacks - */ -#ifdef LIBXML_HTTP_ENABLED -XMLPUBFUN int XMLCALL - xmlIOHTTPMatch (const char *filename); -XMLPUBFUN void * XMLCALL - xmlIOHTTPOpen (const char *filename); -#ifdef LIBXML_OUTPUT_ENABLED -XMLPUBFUN void * XMLCALL - xmlIOHTTPOpenW (const char * post_uri, - int compression ); -#endif /* LIBXML_OUTPUT_ENABLED */ -XMLPUBFUN int XMLCALL - xmlIOHTTPRead (void * context, - char * buffer, - int len); -XMLPUBFUN int XMLCALL - xmlIOHTTPClose (void * context); -#endif /* LIBXML_HTTP_ENABLED */ - -/** - * Default 'ftp://' protocol callbacks - */ -#ifdef LIBXML_FTP_ENABLED -XMLPUBFUN int XMLCALL - xmlIOFTPMatch (const char *filename); -XMLPUBFUN void * XMLCALL - xmlIOFTPOpen (const char *filename); -XMLPUBFUN int XMLCALL - xmlIOFTPRead (void * context, - char * buffer, - int len); -XMLPUBFUN int XMLCALL - xmlIOFTPClose (void * context); -#endif /* LIBXML_FTP_ENABLED */ - -#ifdef __cplusplus -} -#endif - -#endif /* __XML_IO_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlautomata.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlautomata.h deleted file mode 100644 index bf1b131..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlautomata.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Summary: API to build regexp automata - * Description: the API to build regexp automata - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#ifndef __XML_AUTOMATA_H__ -#define __XML_AUTOMATA_H__ - -#include -#include - -#ifdef LIBXML_REGEXP_ENABLED -#ifdef LIBXML_AUTOMATA_ENABLED -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlAutomataPtr: - * - * A libxml automata description, It can be compiled into a regexp - */ -typedef struct _xmlAutomata xmlAutomata; -typedef xmlAutomata *xmlAutomataPtr; - -/** - * xmlAutomataStatePtr: - * - * A state int the automata description, - */ -typedef struct _xmlAutomataState xmlAutomataState; -typedef xmlAutomataState *xmlAutomataStatePtr; - -/* - * Building API - */ -XMLPUBFUN xmlAutomataPtr XMLCALL - xmlNewAutomata (void); -XMLPUBFUN void XMLCALL - xmlFreeAutomata (xmlAutomataPtr am); - -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataGetInitState (xmlAutomataPtr am); -XMLPUBFUN int XMLCALL - xmlAutomataSetFinalState (xmlAutomataPtr am, - xmlAutomataStatePtr state); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewState (xmlAutomataPtr am); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewTransition (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - void *data); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewTransition2 (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - const xmlChar *token2, - void *data); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewNegTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - const xmlChar *token2, - void *data); - -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewCountTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - int min, - int max, - void *data); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewCountTrans2 (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - const xmlChar *token2, - int min, - int max, - void *data); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewOnceTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - int min, - int max, - void *data); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewOnceTrans2 (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - const xmlChar *token, - const xmlChar *token2, - int min, - int max, - void *data); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewAllTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - int lax); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewEpsilon (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewCountedTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - int counter); -XMLPUBFUN xmlAutomataStatePtr XMLCALL - xmlAutomataNewCounterTrans (xmlAutomataPtr am, - xmlAutomataStatePtr from, - xmlAutomataStatePtr to, - int counter); -XMLPUBFUN int XMLCALL - xmlAutomataNewCounter (xmlAutomataPtr am, - int min, - int max); - -XMLPUBFUN xmlRegexpPtr XMLCALL - xmlAutomataCompile (xmlAutomataPtr am); -XMLPUBFUN int XMLCALL - xmlAutomataIsDeterminist (xmlAutomataPtr am); - -#ifdef __cplusplus -} -#endif - -#endif /* LIBXML_AUTOMATA_ENABLED */ -#endif /* LIBXML_REGEXP_ENABLED */ - -#endif /* __XML_AUTOMATA_H__ */ diff --git a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlerror.h b/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlerror.h deleted file mode 100644 index 037c16d..0000000 --- a/dingux/opt/mipsel-linux-uclibc/include/libxml2/libxml/xmlerror.h +++ /dev/null @@ -1,945 +0,0 @@ -/* - * Summary: error handling - * Description: the API used to report errors - * - * Copy: See Copyright for the status of this software. - * - * Author: Daniel Veillard - */ - -#include - -#ifndef __XML_ERROR_H__ -#define __XML_ERROR_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * xmlErrorLevel: - * - * Indicates the level of an error - */ -typedef enum { - XML_ERR_NONE = 0, - XML_ERR_WARNING = 1, /* A simple warning */ - XML_ERR_ERROR = 2, /* A recoverable error */ - XML_ERR_FATAL = 3 /* A fatal error */ -} xmlErrorLevel; - -/** - * xmlErrorDomain: - * - * Indicates where an error may have come from - */ -typedef enum { - XML_FROM_NONE = 0, - XML_FROM_PARSER, /* The XML parser */ - XML_FROM_TREE, /* The tree module */ - XML_FROM_NAMESPACE, /* The XML Namespace module */ - XML_FROM_DTD, /* The XML DTD validation with parser context*/ - XML_FROM_HTML, /* The HTML parser */ - XML_FROM_MEMORY, /* The memory allocator */ - XML_FROM_OUTPUT, /* The serialization code */ - XML_FROM_IO, /* The Input/Output stack */ - XML_FROM_FTP, /* The FTP module */ - XML_FROM_HTTP, /* The HTTP module */ - XML_FROM_XINCLUDE, /* The XInclude processing */ - XML_FROM_XPATH, /* The XPath module */ - XML_FROM_XPOINTER, /* The XPointer module */ - XML_FROM_REGEXP, /* The regular expressions module */ - XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */ - XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */ - XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */ - XML_FROM_RELAXNGP, /* The Relax-NG parser module */ - XML_FROM_RELAXNGV, /* The Relax-NG validator module */ - XML_FROM_CATALOG, /* The Catalog module */ - XML_FROM_C14N, /* The Canonicalization module */ - XML_FROM_XSLT, /* The XSLT engine from libxslt */ - XML_FROM_VALID, /* The XML DTD validation with valid context */ - XML_FROM_CHECK, /* The error checking module */ - XML_FROM_WRITER, /* The xmlwriter module */ - XML_FROM_MODULE, /* The dynamically loaded module module*/ - XML_FROM_I18N, /* The module handling character conversion */ - XML_FROM_SCHEMATRONV,/* The Schematron validator module */ - XML_FROM_BUFFER, /* The buffers module */ - XML_FROM_URI /* The URI module */ -} xmlErrorDomain; - -/** - * xmlError: - * - * An XML Error instance. - */ - -typedef struct _xmlError xmlError; -typedef xmlError *xmlErrorPtr; -struct _xmlError { - int domain; /* What part of the library raised this error */ - int code; /* The error code, e.g. an xmlParserError */ - char *message;/* human-readable informative error message */ - xmlErrorLevel level;/* how consequent is the error */ - char *file; /* the filename */ - int line; /* the line number if available */ - char *str1; /* extra string information */ - char *str2; /* extra string information */ - char *str3; /* extra string information */ - int int1; /* extra number information */ - int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */ - void *ctxt; /* the parser context if available */ - void *node; /* the node in the tree */ -}; - -/** - * xmlParserError: - * - * This is an error that the XML (or HTML) parser can generate - */ -typedef enum { - XML_ERR_OK = 0, - XML_ERR_INTERNAL_ERROR, /* 1 */ - XML_ERR_NO_MEMORY, /* 2 */ - XML_ERR_DOCUMENT_START, /* 3 */ - XML_ERR_DOCUMENT_EMPTY, /* 4 */ - XML_ERR_DOCUMENT_END, /* 5 */ - XML_ERR_INVALID_HEX_CHARREF, /* 6 */ - XML_ERR_INVALID_DEC_CHARREF, /* 7 */ - XML_ERR_INVALID_CHARREF, /* 8 */ - XML_ERR_INVALID_CHAR, /* 9 */ - XML_ERR_CHARREF_AT_EOF, /* 10 */ - XML_ERR_CHARREF_IN_PROLOG, /* 11 */ - XML_ERR_CHARREF_IN_EPILOG, /* 12 */ - XML_ERR_CHARREF_IN_DTD, /* 13 */ - XML_ERR_ENTITYREF_AT_EOF, /* 14 */ - XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */ - XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */ - XML_ERR_ENTITYREF_IN_DTD, /* 17 */ - XML_ERR_PEREF_AT_EOF, /* 18 */ - XML_ERR_PEREF_IN_PROLOG, /* 19 */ - XML_ERR_PEREF_IN_EPILOG, /* 20 */ - XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */ - XML_ERR_ENTITYREF_NO_NAME, /* 22 */ - XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */ - XML_ERR_PEREF_NO_NAME, /* 24 */ - XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */ - XML_ERR_UNDECLARED_ENTITY, /* 26 */ - XML_WAR_UNDECLARED_ENTITY, /* 27 */ - XML_ERR_UNPARSED_ENTITY, /* 28 */ - XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */ - XML_ERR_ENTITY_IS_PARAMETER, /* 30 */ - XML_ERR_UNKNOWN_ENCODING, /* 31 */ - XML_ERR_UNSUPPORTED_ENCODING, /* 32 */ - XML_ERR_STRING_NOT_STARTED, /* 33 */ - XML_ERR_STRING_NOT_CLOSED, /* 34 */ - XML_ERR_NS_DECL_ERROR, /* 35 */ - XML_ERR_ENTITY_NOT_STARTED, /* 36 */ - XML_ERR_ENTITY_NOT_FINISHED, /* 37 */ - XML_ERR_LT_IN_ATTRIBUTE, /* 38 */ - XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */ - XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */ - XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */ - XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */ - XML_ERR_LITERAL_NOT_STARTED, /* 43 */ - XML_ERR_LITERAL_NOT_FINISHED, /* 44 */ - XML_ERR_COMMENT_NOT_FINISHED, /* 45 */ - XML_ERR_PI_NOT_STARTED, /* 46 */ - XML_ERR_PI_NOT_FINISHED, /* 47 */ - XML_ERR_NOTATION_NOT_STARTED, /* 48 */ - XML_ERR_NOTATION_NOT_FINISHED, /* 49 */ - XML_ERR_ATTLIST_NOT_STARTED, /* 50 */ - XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */ - XML_ERR_MIXED_NOT_STARTED, /* 52 */ - XML_ERR_MIXED_NOT_FINISHED, /* 53 */ - XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */ - XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */ - XML_ERR_XMLDECL_NOT_STARTED, /* 56 */ - XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */ - XML_ERR_CONDSEC_NOT_STARTED, /* 58 */ - XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */ - XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */ - XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */ - XML_ERR_MISPLACED_CDATA_END, /* 62 */ - XML_ERR_CDATA_NOT_FINISHED, /* 63 */ - XML_ERR_RESERVED_XML_NAME, /* 64 */ - XML_ERR_SPACE_REQUIRED, /* 65 */ - XML_ERR_SEPARATOR_REQUIRED, /* 66 */ - XML_ERR_NMTOKEN_REQUIRED, /* 67 */ - XML_ERR_NAME_REQUIRED, /* 68 */ - XML_ERR_PCDATA_REQUIRED, /* 69 */ - XML_ERR_URI_REQUIRED, /* 70 */ - XML_ERR_PUBID_REQUIRED, /* 71 */ - XML_ERR_LT_REQUIRED, /* 72 */ - XML_ERR_GT_REQUIRED, /* 73 */ - XML_ERR_LTSLASH_REQUIRED, /* 74 */ - XML_ERR_EQUAL_REQUIRED, /* 75 */ - XML_ERR_TAG_NAME_MISMATCH, /* 76 */ - XML_ERR_TAG_NOT_FINISHED, /* 77 */ - XML_ERR_STANDALONE_VALUE, /* 78 */ - XML_ERR_ENCODING_NAME, /* 79 */ - XML_ERR_HYPHEN_IN_COMMENT, /* 80 */ - XML_ERR_INVALID_ENCODING, /* 81 */ - XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */ - XML_ERR_CONDSEC_INVALID, /* 83 */ - XML_ERR_VALUE_REQUIRED, /* 84 */ - XML_ERR_NOT_WELL_BALANCED, /* 85 */ - XML_ERR_EXTRA_CONTENT, /* 86 */ - XML_ERR_ENTITY_CHAR_ERROR, /* 87 */ - XML_ERR_ENTITY_PE_INTERNAL, /* 88 */ - XML_ERR_ENTITY_LOOP, /* 89 */ - XML_ERR_ENTITY_BOUNDARY, /* 90 */ - XML_ERR_INVALID_URI, /* 91 */ - XML_ERR_URI_FRAGMENT, /* 92 */ - XML_WAR_CATALOG_PI, /* 93 */ - XML_ERR_NO_DTD, /* 94 */ - XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */ - XML_ERR_VERSION_MISSING, /* 96 */ - XML_WAR_UNKNOWN_VERSION, /* 97 */ - XML_WAR_LANG_VALUE, /* 98 */ - XML_WAR_NS_URI, /* 99 */ - XML_WAR_NS_URI_RELATIVE, /* 100 */ - XML_ERR_MISSING_ENCODING, /* 101 */ - XML_WAR_SPACE_VALUE, /* 102 */ - XML_ERR_NOT_STANDALONE, /* 103 */ - XML_ERR_ENTITY_PROCESSING, /* 104 */ - XML_ERR_NOTATION_PROCESSING, /* 105 */ - XML_WAR_NS_COLUMN, /* 106 */ - XML_WAR_ENTITY_REDEFINED, /* 107 */ - XML_ERR_UNKNOWN_VERSION, /* 108 */ - XML_ERR_VERSION_MISMATCH, /* 109 */ - XML_ERR_NAME_TOO_LONG, /* 110 */ - XML_ERR_USER_STOP, /* 111 */ - XML_NS_ERR_XML_NAMESPACE = 200, - XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */ - XML_NS_ERR_QNAME, /* 202 */ - XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */ - XML_NS_ERR_EMPTY, /* 204 */ - XML_NS_ERR_COLON, /* 205 */ - XML_DTD_ATTRIBUTE_DEFAULT = 500, - XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */ - XML_DTD_ATTRIBUTE_VALUE, /* 502 */ - XML_DTD_CONTENT_ERROR, /* 503 */ - XML_DTD_CONTENT_MODEL, /* 504 */ - XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */ - XML_DTD_DIFFERENT_PREFIX, /* 506 */ - XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */ - XML_DTD_ELEM_NAMESPACE, /* 508 */ - XML_DTD_ELEM_REDEFINED, /* 509 */ - XML_DTD_EMPTY_NOTATION, /* 510 */ - XML_DTD_ENTITY_TYPE, /* 511 */ - XML_DTD_ID_FIXED, /* 512 */ - XML_DTD_ID_REDEFINED, /* 513 */ - XML_DTD_ID_SUBSET, /* 514 */ - XML_DTD_INVALID_CHILD, /* 515 */ - XML_DTD_INVALID_DEFAULT, /* 516 */ - XML_DTD_LOAD_ERROR, /* 517 */ - XML_DTD_MISSING_ATTRIBUTE, /* 518 */ - XML_DTD_MIXED_CORRUPT, /* 519 */ - XML_DTD_MULTIPLE_ID, /* 520 */ - XML_DTD_NO_DOC, /* 521 */ - XML_DTD_NO_DTD, /* 522 */ - XML_DTD_NO_ELEM_NAME, /* 523 */ - XML_DTD_NO_PREFIX, /* 524 */ - XML_DTD_NO_ROOT, /* 525 */ - XML_DTD_NOTATION_REDEFINED, /* 526 */ - XML_DTD_NOTATION_VALUE, /* 527 */ - XML_DTD_NOT_EMPTY, /* 528 */ - XML_DTD_NOT_PCDATA, /* 529 */ - XML_DTD_NOT_STANDALONE, /* 530 */ - XML_DTD_ROOT_NAME, /* 531 */ - XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */ - XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */ - XML_DTD_UNKNOWN_ELEM, /* 534 */ - XML_DTD_UNKNOWN_ENTITY, /* 535 */ - XML_DTD_UNKNOWN_ID, /* 536 */ - XML_DTD_UNKNOWN_NOTATION, /* 537 */ - XML_DTD_STANDALONE_DEFAULTED, /* 538 */ - XML_DTD_XMLID_VALUE, /* 539 */ - XML_DTD_XMLID_TYPE, /* 540 */ - XML_DTD_DUP_TOKEN, /* 541 */ - XML_HTML_STRUCURE_ERROR = 800, - XML_HTML_UNKNOWN_TAG, /* 801 */ - XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000, - XML_RNGP_ATTR_CONFLICT, /* 1001 */ - XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */ - XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */ - XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */ - XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */ - XML_RNGP_CHOICE_CONTENT, /* 1006 */ - XML_RNGP_CHOICE_EMPTY, /* 1007 */ - XML_RNGP_CREATE_FAILURE, /* 1008 */ - XML_RNGP_DATA_CONTENT, /* 1009 */ - XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */ - XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */ - XML_RNGP_DEFINE_EMPTY, /* 1012 */ - XML_RNGP_DEFINE_MISSING, /* 1013 */ - XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */ - XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */ - XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */ - XML_RNGP_ELEMENT_EMPTY, /* 1017 */ - XML_RNGP_ELEMENT_CONTENT, /* 1018 */ - XML_RNGP_ELEMENT_NAME, /* 1019 */ - XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */ - XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */ - XML_RNGP_EMPTY, /* 1022 */ - XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */ - XML_RNGP_EMPTY_CONTENT, /* 1024 */ - XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */ - XML_RNGP_ERROR_TYPE_LIB, /* 1026 */ - XML_RNGP_EXCEPT_EMPTY, /* 1027 */ - XML_RNGP_EXCEPT_MISSING, /* 1028 */ - XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */ - XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */ - XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */ - XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */ - XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */ - XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */ - XML_RNGP_FOREIGN_ELEMENT, /* 1035 */ - XML_RNGP_GRAMMAR_CONTENT, /* 1036 */ - XML_RNGP_GRAMMAR_EMPTY, /* 1037 */ - XML_RNGP_GRAMMAR_MISSING, /* 1038 */ - XML_RNGP_GRAMMAR_NO_START, /* 1039 */ - XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */ - XML_RNGP_HREF_ERROR, /* 1041 */ - XML_RNGP_INCLUDE_EMPTY, /* 1042 */ - XML_RNGP_INCLUDE_FAILURE, /* 1043 */ - XML_RNGP_INCLUDE_RECURSE, /* 1044 */ - XML_RNGP_INTERLEAVE_ADD, /* 1045 */ - XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */ - XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */ - XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */ - XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */ - XML_RNGP_INVALID_URI, /* 1050 */ - XML_RNGP_INVALID_VALUE, /* 1051 */ - XML_RNGP_MISSING_HREF, /* 1052 */ - XML_RNGP_NAME_MISSING, /* 1053 */ - XML_RNGP_NEED_COMBINE, /* 1054 */ - XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */ - XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */ - XML_RNGP_NSNAME_NO_NS, /* 1057 */ - XML_RNGP_PARAM_FORBIDDEN, /* 1058 */ - XML_RNGP_PARAM_NAME_MISSING, /* 1059 */ - XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */ - XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */ - XML_RNGP_PARENTREF_NO_NAME, /* 1062 */ - XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */ - XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */ - XML_RNGP_PARSE_ERROR, /* 1065 */ - XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */ - XML_RNGP_PAT_ATTR_ATTR, /* 1067 */ - XML_RNGP_PAT_ATTR_ELEM, /* 1068 */ - XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */ - XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */ - XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */ - XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */ - XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */ - XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */ - XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */ - XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */ - XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */ - XML_RNGP_PAT_LIST_ATTR, /* 1078 */ - XML_RNGP_PAT_LIST_ELEM, /* 1079 */ - XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */ - XML_RNGP_PAT_LIST_LIST, /* 1081 */ - XML_RNGP_PAT_LIST_REF, /* 1082 */ - XML_RNGP_PAT_LIST_TEXT, /* 1083 */ - XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */ - XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */ - XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */ - XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */ - XML_RNGP_PAT_START_ATTR, /* 1088 */ - XML_RNGP_PAT_START_DATA, /* 1089 */ - XML_RNGP_PAT_START_EMPTY, /* 1090 */ - XML_RNGP_PAT_START_GROUP, /* 1091 */ - XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */ - XML_RNGP_PAT_START_LIST, /* 1093 */ - XML_RNGP_PAT_START_ONEMORE, /* 1094 */ - XML_RNGP_PAT_START_TEXT, /* 1095 */ - XML_RNGP_PAT_START_VALUE, /* 1096 */ - XML_RNGP_PREFIX_UNDEFINED, /* 1097 */ - XML_RNGP_REF_CREATE_FAILED, /* 1098 */ - XML_RNGP_REF_CYCLE, /* 1099 */ - XML_RNGP_REF_NAME_INVALID, /* 1100 */ - XML_RNGP_REF_NO_DEF, /* 1101 */ - XML_RNGP_REF_NO_NAME, /* 1102 */ - XML_RNGP_REF_NOT_EMPTY, /* 1103 */ - XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */ - XML_RNGP_START_CONTENT, /* 1105 */ - XML_RNGP_START_EMPTY, /* 1106 */ - XML_RNGP_START_MISSING, /* 1107 */ - XML_RNGP_TEXT_EXPECTED, /* 1108 */ - XML_RNGP_TEXT_HAS_CHILD, /* 1109 */ - XML_RNGP_TYPE_MISSING, /* 1110 */ - XML_RNGP_TYPE_NOT_FOUND, /* 1111 */ - XML_RNGP_TYPE_VALUE, /* 1112 */ - XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */ - XML_RNGP_UNKNOWN_COMBINE, /* 1114 */ - XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */ - XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */ - XML_RNGP_URI_FRAGMENT, /* 1117 */ - XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */ - XML_RNGP_VALUE_EMPTY, /* 1119 */ - XML_RNGP_VALUE_NO_CONTENT, /* 1120 */ - XML_RNGP_XMLNS_NAME, /* 1121 */ - XML_RNGP_XML_NS, /* 1122 */ - XML_XPATH_EXPRESSION_OK = 1200, - XML_XPATH_NUMBER_ERROR, /* 1201 */ - XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */ - XML_XPATH_START_LITERAL_ERROR, /* 1203 */ - XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */ - XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */ - XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */ - XML_XPATH_EXPR_ERROR, /* 1207 */ - XML_XPATH_UNCLOSED_ERROR, /* 1208 */ - XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */ - XML_XPATH_INVALID_OPERAND, /* 1210 */ - XML_XPATH_INVALID_TYPE, /* 1211 */ - XML_XPATH_INVALID_ARITY, /* 1212 */ - XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */ - XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */ - XML_XPATH_MEMORY_ERROR, /* 1215 */ - XML_XPTR_SYNTAX_ERROR, /* 1216 */ - XML_XPTR_RESOURCE_ERROR, /* 1217 */ - XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */ - XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */ - XML_XPATH_ENCODING_ERROR, /* 1220 */ - XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */ - XML_TREE_INVALID_HEX = 1300, - XML_TREE_INVALID_DEC, /* 1301 */ - XML_TREE_UNTERMINATED_ENTITY, /* 1302 */ - XML_TREE_NOT_UTF8, /* 1303 */ - XML_SAVE_NOT_UTF8 = 1400, - XML_SAVE_CHAR_INVALID, /* 1401 */ - XML_SAVE_NO_DOCTYPE, /* 1402 */ - XML_SAVE_UNKNOWN_ENCODING, /* 1403 */ - XML_REGEXP_COMPILE_ERROR = 1450, - XML_IO_UNKNOWN = 1500, - XML_IO_EACCES, /* 1501 */ - XML_IO_EAGAIN, /* 1502 */ - XML_IO_EBADF, /* 1503 */ - XML_IO_EBADMSG, /* 1504 */ - XML_IO_EBUSY, /* 1505 */ - XML_IO_ECANCELED, /* 1506 */ - XML_IO_ECHILD, /* 1507 */ - XML_IO_EDEADLK, /* 1508 */ - XML_IO_EDOM, /* 1509 */ - XML_IO_EEXIST, /* 1510 */ - XML_IO_EFAULT, /* 1511 */ - XML_IO_EFBIG, /* 1512 */ - XML_IO_EINPROGRESS, /* 1513 */ - XML_IO_EINTR, /* 1514 */ - XML_IO_EINVAL, /* 1515 */ - XML_IO_EIO, /* 1516 */ - XML_IO_EISDIR, /* 1517 */ - XML_IO_EMFILE, /* 1518 */ - XML_IO_EMLINK, /* 1519 */ - XML_IO_EMSGSIZE, /* 1520 */ - XML_IO_ENAMETOOLONG, /* 1521 */ - XML_IO_ENFILE, /* 1522 */ - XML_IO_ENODEV, /* 1523 */ - XML_IO_ENOENT, /* 1524 */ - XML_IO_ENOEXEC, /* 1525 */ - XML_IO_ENOLCK, /* 1526 */ - XML_IO_ENOMEM, /* 1527 */ - XML_IO_ENOSPC, /* 1528 */ - XML_IO_ENOSYS, /* 1529 */ - XML_IO_ENOTDIR, /* 1530 */ - XML_IO_ENOTEMPTY, /* 1531 */ - XML_IO_ENOTSUP, /* 1532 */ - XML_IO_ENOTTY, /* 1533 */ - XML_IO_ENXIO, /* 1534 */ - XML_IO_EPERM, /* 1535 */ - XML_IO_EPIPE, /* 1536 */ - XML_IO_ERANGE, /* 1537 */ - XML_IO_EROFS, /* 1538 */ - XML_IO_ESPIPE, /* 1539 */ - XML_IO_ESRCH, /* 1540 */ - XML_IO_ETIMEDOUT, /* 1541 */ - XML_IO_EXDEV, /* 1542 */ - XML_IO_NETWORK_ATTEMPT, /* 1543 */ - XML_IO_ENCODER, /* 1544 */ - XML_IO_FLUSH, /* 1545 */ - XML_IO_WRITE, /* 1546 */ - XML_IO_NO_INPUT, /* 1547 */ - XML_IO_BUFFER_FULL, /* 1548 */ - XML_IO_LOAD_ERROR, /* 1549 */ - XML_IO_ENOTSOCK, /* 1550 */ - XML_IO_EISCONN, /* 1551 */ - XML_IO_ECONNREFUSED, /* 1552 */ - XML_IO_ENETUNREACH, /* 1553 */ - XML_IO_EADDRINUSE, /* 1554 */ - XML_IO_EALREADY, /* 1555 */ - XML_IO_EAFNOSUPPORT, /* 1556 */ - XML_XINCLUDE_RECURSION=1600, - XML_XINCLUDE_PARSE_VALUE, /* 1601 */ - XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */ - XML_XINCLUDE_NO_HREF, /* 1603 */ - XML_XINCLUDE_NO_FALLBACK, /* 1604 */ - XML_XINCLUDE_HREF_URI, /* 1605 */ - XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */ - XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */ - XML_XINCLUDE_INVALID_CHAR, /* 1608 */ - XML_XINCLUDE_BUILD_FAILED, /* 1609 */ - XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */ - XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */ - XML_XINCLUDE_XPTR_FAILED, /* 1612 */ - XML_XINCLUDE_XPTR_RESULT, /* 1613 */ - XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */ - XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */ - XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */ - XML_XINCLUDE_DEPRECATED_NS, /* 1617 */ - XML_XINCLUDE_FRAGMENT_ID, /* 1618 */ - XML_CATALOG_MISSING_ATTR = 1650, - XML_CATALOG_ENTRY_BROKEN, /* 1651 */ - XML_CATALOG_PREFER_VALUE, /* 1652 */ - XML_CATALOG_NOT_CATALOG, /* 1653 */ - XML_CATALOG_RECURSION, /* 1654 */ - XML_SCHEMAP_PREFIX_UNDEFINED = 1700, - XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */ - XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */ - XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */ - XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */ - XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */ - XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */ - XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */ - XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */ - XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */ - XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */ - XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */ - XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */ - XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */ - XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */ - XML_SCHEMAP_INVALID_ENUM, /* 1715 */ - XML_SCHEMAP_INVALID_FACET, /* 1716 */ - XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */ - XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */ - XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */ - XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */ - XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */ - XML_SCHEMAP_NOATTR_NOREF, /* 1722 */ - XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */ - XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */ - XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */ - XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */ - XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */ - XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */ - XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */ - XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */ - XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */ - XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */ - XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */ - XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */ - XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */ - XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */ - XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */ - XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */ - XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */ - XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */ - XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */ - XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */ - XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */ - XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */ - XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */ - XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */ - XML_SCHEMAP_UNKNOWN_REF, /* 1747 */ - XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */ - XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */ - XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */ - XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */ - XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */ - XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */ - XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */ - XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */ - XML_SCHEMAP_REGEXP_INVALID, /* 1756 */ - XML_SCHEMAP_FAILED_LOAD, /* 1757 */ - XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */ - XML_SCHEMAP_NOROOT, /* 1759 */ - XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */ - XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */ - XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */ - XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */ - XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */ - XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */ - XML_SCHEMAP_FAILED_PARSE, /* 1766 */ - XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */ - XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */ - XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */ - XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */ - XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */ - XML_SCHEMAP_NOT_SCHEMA, /* 1772 */ - XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */ - XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */ - XML_SCHEMAP_RECURSIVE, /* 1775 */ - XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */ - XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */ - XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */ - XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */ - XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */ - XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */ - XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */ - XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */ - XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */ - XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */ - XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */ - XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */ - XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */ - XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */ - XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */ - XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */ - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */ - XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */ - XML_SCHEMAV_NOROOT = 1801, - XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */ - XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */ - XML_SCHEMAV_MISSING, /* 1804 */ - XML_SCHEMAV_WRONGELEM, /* 1805 */ - XML_SCHEMAV_NOTYPE, /* 1806 */ - XML_SCHEMAV_NOROLLBACK, /* 1807 */ - XML_SCHEMAV_ISABSTRACT, /* 1808 */ - XML_SCHEMAV_NOTEMPTY, /* 1809 */ - XML_SCHEMAV_ELEMCONT, /* 1810 */ - XML_SCHEMAV_HAVEDEFAULT, /* 1811 */ - XML_SCHEMAV_NOTNILLABLE, /* 1812 */ - XML_SCHEMAV_EXTRACONTENT, /* 1813 */ - XML_SCHEMAV_INVALIDATTR, /* 1814 */ - XML_SCHEMAV_INVALIDELEM, /* 1815 */ - XML_SCHEMAV_NOTDETERMINIST, /* 1816 */ - XML_SCHEMAV_CONSTRUCT, /* 1817 */ - XML_SCHEMAV_INTERNAL, /* 1818 */ - XML_SCHEMAV_NOTSIMPLE, /* 1819 */ - XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */ - XML_SCHEMAV_ATTRINVALID, /* 1821 */ - XML_SCHEMAV_VALUE, /* 1822 */ - XML_SCHEMAV_FACET, /* 1823 */ - XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */ - XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */ - XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */ - XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */ - XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */ - XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */ - XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */ - XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */ - XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */ - XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */ - XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */ - XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */ - XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */ - XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */ - XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */ - XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */ - XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */ - XML_SCHEMAV_CVC_ELT_1, /* 1845 */ - XML_SCHEMAV_CVC_ELT_2, /* 1846 */ - XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */ - XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */ - XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */ - XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */ - XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */ - XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */ - XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */ - XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */ - XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */ - XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */ - XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */ - XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */ - XML_SCHEMAV_CVC_ELT_6, /* 1859 */ - XML_SCHEMAV_CVC_ELT_7, /* 1860 */ - XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */ - XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */ - XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */ - XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */ - XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */ - XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */ - XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */ - X