Skip to content
Snippets Groups Projects
Commit d25339ad authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Suppression de la CAI de la CONF

parent 24a91975
Branches
Tags
No related merge requests found
Showing
with 0 additions and 2303 deletions
SUBDIRS(src inc)
# Version :$Header: README,v 1.5 01/01/15 15:24:06 cmf Exp $
INSTALLATION COUCHE_ACCES_IMAGE ATLAS
-------------------------------------
##########################################################################
# MOD : VERSION : 4.1 : DM : installation sur DEC UNIX
##########################################################################
##########################################################################
# MOD : VERSION : 4.3 : DM : installation sur HP64Bits, pCNT, PC LINUX
##########################################################################
La Couche Acces Image peut etre installee sur HP 32 bits et 64 bits Sun OS et SUN SOLARIS 32 bits et 64 bits, sur HP ITANIUM2 , sur DEC UNIX ainsi que PC LINUX et PC NT ainsi que station XEON EMT64 Linux Redhat
Pour la generer, quatre variables d'environnement doivent etre positionnees :
MACHINE_ATLAS represente le type de machine sur lequel se fait l'installation
Les valeurs possibles : SOLARIS, SOLARIS64, HPUX, HPUX64,
WIN, LINUX, ITANIUM2, AIX, DEC, SUNOS
RACINE_ATLAS indique le repertoire racine de stockage de CAI.
(exle : /home/ATALGO/regine/COUCHE_IMA_V5.2)
RACINE_HDF indique le repertoire racine de stockage du freeware HDF
(exle : /home/ATALGO/HDF)
##########################################################################
# MOD : VERSION : 4.0 : DM : s'affranchir du compilateur
##########################################################################
COMPILO : si cette variable n'est pas positionnee, le compilateur par defaut est
utilise : cc.
si elle est positionnee, c'est le compilateur indique qui est utilise
Pour generer, lancer $(RACINE_ATLAS)/ins/COUCHE_IMA.install
Si vous ne voulez pas de bibliotheque dynamique, dans le fichier COUCHE_IMA.install,
enlever l'appel au deuxieme makefile
Si vous n'avez pas la biblitheque HDF a votre disposition, dans le fichier
$(RACINE_ATLAS)/gen/genere.mk preciser all: CAI_NOHD
Remarque :
----------
Pour PC LINUX et PC NT et ITANIUM2 ainsi que XEON, seule la bibliotheque simple est generee
Vérifier que la variable d'environnement $PATH est à jour de façon à pouvoir
acceder au précompilateur cpp
INSTALLATION COUCHE_ACCES_IMAGE QIV SUR HP
------------------------------------------
Pour generer libimage.a , deux variables d'environnement doivent etre positionnees :
MACHINE_ATLAS represente le type de machine sur lequel se fait l'installation
Les valeurs possibles : HPUX
RACINE_HDF indique le repertoire racine de stockage du freeware HDF
(exle : /home/ATALGO/HDF)
Pour generer : sous gen :
make -f cai_libimage.mk
# Microsoft Developer Studio Project File - Name="cai_dll" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=cai_dll - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "cai_dll.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "cai_dll.mak" CFG="cai_dll - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "cai_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "cai_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "cai_dll - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAI_DLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAI_DLL_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "NDEBUG"
# ADD RSC /l 0x40c /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
!ELSEIF "$(CFG)" == "cai_dll - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAI_DLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "inc" /I "inc/inc_hdf" /I "inc/inc_unix2win" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CAI_DLL_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG"
# ADD RSC /l 0x40c /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 lib/hd421md.lib lib/hm421md.lib lib/libjpeg.lib lib/tiff.lib lib/unix2win.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libcmtd.lib" /out:"Debug/cai.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "cai_dll - Win32 Release"
# Name "cai_dll - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\src\cai_arcinfo.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_atg2.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_bandeau.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_bil.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_bip.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_bsq.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_DonAux.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_fonctions.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_gessimu.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_grilles.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_hdf.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_inria.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_jpeg.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_lum.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_mapsat.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_multis.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_onera.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_radar.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_rasterfile.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_spot.c
# End Source File
# Begin Source File
SOURCE=.\src\cai_tiff.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\inc\cai_image.h
# End Source File
# Begin Source File
SOURCE=.\inc\cderror.h
# End Source File
# Begin Source File
SOURCE=.\inc\cdjpeg.h
# End Source File
# Begin Source File
SOURCE=.\inc\g3states.h
# End Source File
# Begin Source File
SOURCE=.\inc\jchuff.h
# End Source File
# Begin Source File
SOURCE=.\inc\jconfig.h
# End Source File
# Begin Source File
SOURCE=.\inc\jdct.h
# End Source File
# Begin Source File
SOURCE=.\inc\jdhuff.h
# End Source File
# Begin Source File
SOURCE=.\inc\jerror.h
# End Source File
# Begin Source File
SOURCE=.\inc\jinclude.h
# End Source File
# Begin Source File
SOURCE=.\inc\jmemsys.h
# End Source File
# Begin Source File
SOURCE=.\inc\jmorecfg.h
# End Source File
# Begin Source File
SOURCE=.\inc\jpegint.h
# End Source File
# Begin Source File
SOURCE=.\inc\jpeglib.h
# End Source File
# Begin Source File
SOURCE=.\inc\jversion.h
# End Source File
# Begin Source File
SOURCE=.\inc\machdep.h
# End Source File
# Begin Source File
SOURCE=.\inc\port.h
# End Source File
# Begin Source File
SOURCE=.\inc\t4.h
# End Source File
# Begin Source File
SOURCE=.\inc\tif_dir.h
# End Source File
# Begin Source File
SOURCE=.\inc\tif_fax3.h
# End Source File
# Begin Source File
SOURCE=.\inc\tif_predict.h
# End Source File
# Begin Source File
SOURCE=.\inc\tiff.h
# End Source File
# Begin Source File
SOURCE=.\inc\tiffcomp.h
# End Source File
# Begin Source File
SOURCE=.\inc\tiffconf.h
# End Source File
# Begin Source File
SOURCE=.\inc\tiffio.h
# End Source File
# Begin Source File
SOURCE=.\inc\tiffiop.h
# End Source File
# Begin Source File
SOURCE=.\inc\uvcode.h
# End Source File
# Begin Source File
SOURCE=.\inc\version.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "cai_dll"=".\cai_dll.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
File deleted
File deleted
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: cai_dll - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
cai.dll - 0 error(s), 0 warning(s)
</pre>
</body>
</html>
File deleted
File deleted
File deleted
File deleted
File deleted
# Sources of non-templated classes.
INSTALL_FILES(/include/otb/Utilities/CAI "(\\.h)$")
SUBDIRS( inc_unix2win )
This diff is collapsed.
/*
* cderror.h
*
* Copyright (C) 1994, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file defines the error and message codes for the cjpeg/djpeg
* applications. These strings are not needed as part of the JPEG library
* proper.
* Edit this file to add new codes, or to translate the message strings to
* some other language.
*/
/*
* To define the enum list of message codes, include this file without
* defining macro JMESSAGE. To create a message string table, include it
* again with a suitable JMESSAGE definition (see jerror.c for an example).
*/
#ifndef JMESSAGE
#ifndef CDERROR_H
#define CDERROR_H
/* First time through, define the enum list */
#define JMAKE_ENUM_LIST
#else
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
#define JMESSAGE(code,string)
#endif /* CDERROR_H */
#endif /* JMESSAGE */
#ifdef JMAKE_ENUM_LIST
typedef enum {
#define JMESSAGE(code,string) code ,
#endif /* JMAKE_ENUM_LIST */
JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
#ifdef BMP_SUPPORTED
JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported")
JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length")
JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1")
JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image")
#endif /* BMP_SUPPORTED */
#ifdef GIF_SUPPORTED
JMESSAGE(JERR_GIF_BUG, "GIF output got confused")
JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d")
JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB")
JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file")
JMESSAGE(JERR_GIF_NOT, "Not a GIF file")
JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image")
JMESSAGE(JTRC_GIF_BADVERSION,
"Warning: unexpected GIF version number '%c%c%c'")
JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x")
JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input")
JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file")
JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring")
JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image")
JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
#endif /* GIF_SUPPORTED */
#ifdef PPM_SUPPORTED
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
JMESSAGE(JERR_PPM_NOT, "Not a PPM file")
JMESSAGE(JTRC_PGM, "%ux%u PGM image")
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
JMESSAGE(JTRC_PPM, "%ux%u PPM image")
JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image")
#endif /* PPM_SUPPORTED */
#ifdef RLE_SUPPORTED
JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library")
JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB")
JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE")
JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file")
JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header")
JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header")
JMESSAGE(JERR_RLE_NOT, "Not an RLE file")
JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE")
JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup")
JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file")
JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d")
JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file")
JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d")
JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d")
#endif /* RLE_SUPPORTED */
#ifdef TARGA_SUPPORTED
JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format")
JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file")
JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB")
JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image")
JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image")
JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image")
#else
JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled")
#endif /* TARGA_SUPPORTED */
JMESSAGE(JERR_BAD_CMAP_FILE,
"Color map file is invalid or of unsupported format")
JMESSAGE(JERR_TOO_MANY_COLORS,
"Output file format cannot handle %d colormap entries")
JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed")
#ifdef TARGA_SUPPORTED
JMESSAGE(JERR_UNKNOWN_FORMAT,
"Unrecognized input file format --- perhaps you need -targa")
#else
JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format")
#endif
JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format")
#ifdef JMAKE_ENUM_LIST
JMSG_LASTADDONCODE
} ADDON_MESSAGE_CODE;
#undef JMAKE_ENUM_LIST
#endif /* JMAKE_ENUM_LIST */
/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */
#undef JMESSAGE
/*
* cdjpeg.h
*
* Copyright (C) 1994-1996, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains common declarations for the sample applications
* cjpeg and djpeg. It is NOT used by the core JPEG library.
*/
#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */
#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */
#include "jinclude.h"
#include "jpeglib.h"
#include "jerror.h" /* get library error codes too */
#include "cderror.h" /* get application-specific error codes */
/*
* Object interface for cjpeg's source file decoding modules
*/
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
struct cjpeg_source_struct {
JMETHOD(void, start_input, (j_compress_ptr cinfo,
cjpeg_source_ptr sinfo));
JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
cjpeg_source_ptr sinfo));
JMETHOD(void, finish_input, (j_compress_ptr cinfo,
cjpeg_source_ptr sinfo));
FILE *input_file;
JSAMPARRAY buffer;
JDIMENSION buffer_height;
};
/*
* Object interface for djpeg's output file encoding modules
*/
typedef struct djpeg_dest_struct * djpeg_dest_ptr;
struct djpeg_dest_struct {
/* start_output is called after jpeg_start_decompress finishes.
* The color map will be ready at this time, if one is needed.
*/
JMETHOD(void, start_output, (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo));
/* Emit the specified number of pixel rows from the buffer. */
JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo,
JDIMENSION rows_supplied));
/* Finish up at the end of the image. */
JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
djpeg_dest_ptr dinfo));
/* Target file spec; filled in by djpeg.c after object is created. */
FILE * output_file;
/* Output pixel-row buffer. Created by module init or start_output.
* Width is cinfo->output_width * cinfo->output_components;
* height is buffer_height.
*/
JSAMPARRAY buffer;
JDIMENSION buffer_height;
};
/*
* cjpeg/djpeg may need to perform extra passes to convert to or from
* the source/destination file format. The JPEG library does not know
* about these passes, but we'd like them to be counted by the progress
* monitor. We use an expanded progress monitor object to hold the
* additional pass count.
*/
struct cdjpeg_progress_mgr {
struct jpeg_progress_mgr pub; /* fields known to JPEG library */
int completed_extra_passes; /* extra passes completed */
int total_extra_passes; /* total extra */
/* last printed percentage stored here to avoid multiple printouts */
int percent_done;
};
typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
/* Short forms of external names for systems with brain-damaged linkers. */
#ifdef NEED_SHORT_EXTERNAL_NAMES
#define jinit_read_bmp jIRdBMP
#define jinit_write_bmp jIWrBMP
#define jinit_read_gif jIRdGIF
#define jinit_write_gif jIWrGIF
#define jinit_read_ppm jIRdPPM
#define jinit_write_ppm jIWrPPM
#define jinit_read_rle jIRdRLE
#define jinit_write_rle jIWrRLE
#define jinit_read_targa jIRdTarga
#define jinit_write_targa jIWrTarga
#define read_quant_tables RdQTables
#define read_scan_script RdScnScript
#define set_quant_slots SetQSlots
#define set_sample_factors SetSFacts
#define read_color_map RdCMap
#define enable_signal_catcher EnSigCatcher
#define start_progress_monitor StProgMon
#define end_progress_monitor EnProgMon
#define read_stdin RdStdin
#define write_stdout WrStdout
#endif /* NEED_SHORT_EXTERNAL_NAMES */
/* Module selection routines for I/O modules. */
EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
boolean is_os2));
EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
/* cjpeg support routines (in rdswitch.c) */
EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
int scale_factor, boolean force_baseline));
EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
/* djpeg support routines (in rdcolmap.c) */
EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
/* common support routines (in cdjpeg.c) */
EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
cd_progress_ptr progress));
EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
EXTERN(FILE *) read_stdin JPP((void));
EXTERN(FILE *) write_stdout JPP((void));
/* miscellaneous useful macros */
#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */
#define READ_BINARY "r"
#define WRITE_BINARY "w"
#else
#define READ_BINARY "rb"
#define WRITE_BINARY "wb"
#endif
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
#define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
#ifdef VMS
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
#else
#define EXIT_SUCCESS 0
#endif
#endif
#ifndef EXIT_WARNING
#ifdef VMS
#define EXIT_WARNING 1 /* VMS is very nonstandard */
#else
#define EXIT_WARNING 2
#endif
#endif
/****************************************************************************
* NCSA HDF *
* Software Development Group *
* National Center for Supercomputing Applications *
* University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
* hdf/COPYING file. *
* *
****************************************************************************/
/* $Id$ */
/*-----------------------------------------------------------------------------
* File: atom.h
* Purpose: header file for atom API
* Dependencies:
* Invokes:
* Contents:
* Structure definitions:
* Constant definitions:
*---------------------------------------------------------------------------*/
/* avoid re-inclusion */
#ifndef __ATOM_H
#define __ATOM_H
/* Atom Features control */
/* Define the following macro for fast hash calculations (but limited hash sizes) */
#define HASH_SIZE_POWER_2
/* Define the following macro for atom caching over all the atoms */
#define ATOMS_ARE_CACHED
/* Define the following macro for "inline" atom lookups from the cache */
#ifdef ATOMS_ARE_CACHED /* required for this to work */
#define ATOMS_CACHE_INLINE
#endif /* ATOMS_ARE_CACHED */
#ifdef ATOMS_CACHE_INLINE
/* Do swap using XOR operator. Ugly but fast... -QAK */
#define HAIswap_cache(i,j) \
atom_id_cache[i]^=atom_id_cache[j], \
atom_obj_cache[i]=(void *)((hdf_pint_t)atom_obj_cache[j]^(hdf_pint_t)atom_obj_cache[i]), \
atom_id_cache[j]^=atom_id_cache[i], \
atom_obj_cache[j]=(void *)((hdf_pint_t)atom_obj_cache[i]^(hdf_pint_t)atom_obj_cache[j]), \
atom_id_cache[i]^=atom_id_cache[j], \
atom_obj_cache[i]=(void *)((hdf_pint_t)atom_obj_cache[i]^(hdf_pint_t)atom_obj_cache[j])
/* Note! This is hardwired to the atom cache value being 4 */
#define HAatom_object(atm) \
(atom_id_cache[0]==atm ? atom_obj_cache[0] : \
atom_id_cache[1]==atm ? (HAIswap_cache(0,1),atom_obj_cache[0]) : \
atom_id_cache[2]==atm ? (HAIswap_cache(1,2),atom_obj_cache[1]) : \
atom_id_cache[3]==atm ? (HAIswap_cache(2,3),atom_obj_cache[2]) : \
HAPatom_object(atm))
#endif /* ATOMS_CACHE_INLINE */
#include "hdf.h"
/* Group values allowed */
typedef enum {BADGROUP=(-1), /* Invalid Group */
DDGROUP=0, /* Group ID for DD objects */
AIDGROUP=1, /* Group ID for access ID objects */
FIDGROUP=2, /* Group ID for file ID objects */
VGIDGROUP=3, /* Group ID for Vgroup ID objects */
VSIDGROUP=4, /* Group ID for Vdata ID objects */
GRIDGROUP=5, /* Group ID for GR ID objects */
RIIDGROUP=6, /* Group ID for RI ID objects */
BITIDGROUP=7, /* Group ID for Bitfile ID objects */
ANIDGROUP=8, /* Group ID for Annotation ID objects */
MAXGROUP /* Highest group in group_t (Invalid as true group) */
} group_t;
/* Type of atoms to return to users */
typedef int32 atom_t;
/* Type of the function to compare objects & keys */
typedef intn (*HAsearch_func_t)(const void * obj, const void * key);
#if defined ATOM_MASTER | defined ATOM_TESTER
/* # of bits to use for Group ID in each atom (change if MAXGROUP>16) */
#define GROUP_BITS 4
#define GROUP_MASK 0x0F
/* # of bits to use for the Atom index in each atom (change if MAXGROUP>16) */
#define ATOM_BITS 28
#define ATOM_MASK 0x0FFFFFFF
#ifdef ATOMS_ARE_CACHED
/* # of previous atoms cached, change inline caching macros (HAatom_object & HAIswap_cache) if this changes */
#define ATOM_CACHE_SIZE 4
#endif /* ATOMS_ARE_CACHED */
/* Map an atom to a Group number */
#define ATOM_TO_GROUP(a) ((group_t)((((atom_t)(a))>>((sizeof(atom_t)*8)-GROUP_BITS))&GROUP_MASK))
#ifdef HASH_SIZE_POWER_2
/* Map an atom to a hash location (assumes s is a power of 2 and smaller than the ATOM_MASK constant) */
#define ATOM_TO_LOC(a,s) ((atom_t)(a)&((s)-1))
#else /* HASH_SIZE_POWER_2 */
/* Map an atom to a hash location */
#define ATOM_TO_LOC(a,s) (((atom_t)(a)&ATOM_MASK)%(s))
#endif /* HASH_SIZE_POWER_2 */
/* Combine a Group number and an atom index into an atom */
#define MAKE_ATOM(g,i) ((((atom_t)(g)&GROUP_MASK)<<((sizeof(atom_t)*8)-GROUP_BITS))|((atom_t)(i)&ATOM_MASK))
/* Atom information structure used */
typedef struct atom_info_struct_tag {
atom_t id; /* atom ID for this info */
VOIDP *obj_ptr; /* pointer associated with the atom */
struct atom_info_struct_tag *next; /* link to next atom (in case of hash-clash) */
}atom_info_t;
/* Atom group structure used */
typedef struct atom_group_struct_tag {
uintn count; /* # of times this group has been initialized */
intn hash_size; /* size of the hash table to store the atoms in */
uintn atoms; /* current number of atoms held */
uintn nextid; /* atom ID to use for the next atom */
atom_info_t **atom_list;/* pointer to an array of ptrs to atoms */
}atom_group_t;
/* Define this in only one place */
#ifdef ATOM_MASTER
/* Array of pointers to atomic groups */
static atom_group_t *atom_group_list[MAXGROUP]={NULL};
/* Pointer to the atom node free list */
static atom_info_t *atom_free_list=NULL;
#ifdef ATOMS_ARE_CACHED
/* Array of pointers to atomic groups */
#ifdef OLD_WAY
static atom_t atom_id_cache[ATOM_CACHE_SIZE]={-1,-1,-1,-1};
static VOIDP atom_obj_cache[ATOM_CACHE_SIZE]={NULL};
#else /* OLD_WAY */
atom_t atom_id_cache[ATOM_CACHE_SIZE]={-1,-1,-1,-1};
VOIDP atom_obj_cache[ATOM_CACHE_SIZE]={NULL};
#endif /* OLD_WAY */
#endif /* ATOMS_ARE_CACHED */
#endif /* ATOM_MASTER */
/* Useful routines for generally private use */
#endif /* ATOM_MASTER | ATOM_TESTER */
#ifndef ATOM_MASTER
extern atom_t atom_id_cache[];
extern VOIDP atom_obj_cache[];
#endif /* ATOM_MASTER */
#if defined c_plusplus || defined __cplusplus
extern "C"
{
#endif /* c_plusplus || __cplusplus */
/******************************************************************************
NAME
HAinit_group - Initialize an atomic group
DESCRIPTION
Creates an atomic group to store atoms in. If the group has already been
initialized, this routine just increments the count of # of initializations
and returns without trying to change the size of the hash table.
RETURNS
Returns SUCCEED if successful and FAIL otherwise
*******************************************************************************/
intn HAinit_group(group_t grp, /* IN: Group to initialize */
intn hash_size /* IN: Minimum hash table size to use for group */
);
/******************************************************************************
NAME
HAdestroy_group - Destroy an atomic group
DESCRIPTION
Destroys an atomic group which atoms are stored in. If the group still
has atoms which are registered, this routine fails. If there have been
multiple initializations of the group, this routine just decrements the
count of initializations and does not check the atoms out-standing.
RETURNS
Returns SUCCEED if successful and FAIL otherwise
*******************************************************************************/
intn HAdestroy_group(group_t grp /* IN: Group to destroy */
);
/******************************************************************************
NAME
HAregister_atom - Register an object in a group and get an atom for it.
DESCRIPTION
Registers an object in a group and returns an atom for it. This routine
does _not_ check for unique-ness of the objects, if you register an object
twice, you will get two different atoms for it. This routine does make
certain that each atom in a group is unique. Atoms are created by getting
a unique number for the group the atom is in and incorporating the group
into the atom which is returned to the user.
RETURNS
Returns atom if successful and FAIL otherwise
*******************************************************************************/
atom_t HAregister_atom(group_t grp, /* IN: Group to register the object in */
VOIDP object /* IN: Object to attach to atom */
);
/******************************************************************************
NAME
HAatom_object - Returns to the object ptr for the atom
DESCRIPTION
Retrieves the object ptr which is associated with the atom.
RETURNS
Returns object ptr if successful and NULL otherwise
*******************************************************************************/
#ifdef ATOMS_CACHE_INLINE
VOIDP HAPatom_object(atom_t atm /* IN: Atom to retrieve object for */
);
#else /* ATOMS_CACHE_INLINE */
VOIDP HAatom_object(atom_t atm /* IN: Atom to retrieve object for */
);
#endif /* ATOMS_CACHE_INLINE */
/******************************************************************************
NAME
HAatom_group - Returns to the group for the atom
DESCRIPTION
Retrieves the group which is associated with the atom.
RETURNS
Returns group if successful and FAIL otherwise
*******************************************************************************/
group_t HAatom_group(atom_t atm /* IN: Atom to retrieve group for */
);
/******************************************************************************
NAME
HAremove_atom - Removes an atom from a group
DESCRIPTION
Removes an atom from a group.
RETURNS
Returns atom's object if successful and FAIL otherwise
*******************************************************************************/
VOIDP HAremove_atom(atom_t atm /* IN: Atom to remove */
);
/******************************************************************************
NAME
HAsearch_atom - Search for an object in a group and get it's pointer.
DESCRIPTION
Searchs for an object in a group and returns the pointer to it.
This routine calls the function pointer passed in for each object in the
group until it finds a match. Currently there is no way to resume a
search.
RETURNS
Returns pointer an atom's object if successful and NULL otherwise
*******************************************************************************/
VOIDP HAsearch_atom(group_t grp, /* IN: Group to search for the object in */
HAsearch_func_t func, /* IN: Ptr to the comparison function */
const void * key /* IN: pointer to key to compare against */
);
/******************************************************************************
NAME
HAshutdown - Terminate various static buffers.
DESCRIPTION
Free various buffers allocated in the HA routines.
RETURNS
Returns SUCCEED/FAIL
*******************************************************************************/
intn HAshutdown(void);
#if defined c_plusplus || defined __cplusplus
}
#endif /* c_plusplus || __cplusplus */
#endif /* __ATOM_H */
This diff is collapsed.
/****************************************************************************
* NCSA HDF *
* Software Development Group *
* National Center for Supercomputing Applications *
* University of Illinois at Urbana-Champaign *
* 605 E. Springfield, Champaign IL 61820 *
* *
* For conditions of distribution and use, see the accompanying *
* hdf/COPYING file. *
* *
****************************************************************************/
/* $Id$ */
/*-----------------------------------------------------------------------------
* File: cdeflate.h
* Purpose: Header file for gzip 'deflate' encoding information.
* Dependencies: should only be included from hcompi.h
* Invokes: none
* Contents: Structures & definitions for gzip 'deflate' encoding.
* Structure definitions:
* Constant definitions:
*---------------------------------------------------------------------------*/
/* avoid re-inclusion */
#ifndef __CDEFLATE_H
#define __CDEFLATE_H
/* Get the gzip 'deflate' header */
#define intf zintf
#include "zlib.h"
#undef zintf
#if defined c_plusplus || defined __cplusplus
extern "C"
{
#endif /* c_plusplus || __cplusplus */
/*
** from cdeflate.c
*/
extern int32 HCPcdeflate_stread
(accrec_t * rec);
extern int32 HCPcdeflate_stwrite
(accrec_t * rec);
extern int32 HCPcdeflate_seek
(accrec_t * access_rec, int32 offset, int origin);
extern int32 HCPcdeflate_inquire
(accrec_t * access_rec, int32 *pfile_id, uint16 *ptag, uint16 *pref,
int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess,
int16 *pspecial);
extern int32 HCPcdeflate_read
(accrec_t * access_rec, int32 length, void * data);
extern int32 HCPcdeflate_write
(accrec_t * access_rec, int32 length, const void * data);
extern intn HCPcdeflate_endaccess
(accrec_t * access_rec);
#if defined c_plusplus || defined __cplusplus
}
#endif /* c_plusplus || __cplusplus */
/* Define the [default] size of the buffer to interact with the file. */
#define DEFLATE_BUF_SIZE 4096
#define DEFLATE_TMP_BUF_SIZE 16384
/* gzip [en|de]coding information */
typedef struct
{
intn deflate_level; /* how hard to try to compress this data */
int32 offset; /* offset in the de-compressed array */
intn acc_init; /* is access mode initialized? */
int16 acc_mode; /* access mode desired */
void * io_buf; /* buffer for I/O with the file */
z_stream deflate_context; /* pointer to the deflation context for each byte in the element */
}
comp_coder_deflate_info_t;
#ifndef CDEFLATE_MASTER
extern funclist_t cdeflate_funcs; /* functions to perform gzip encoding */
#else
funclist_t cdeflate_funcs =
{ /* functions to perform gzip encoding */
HCPcdeflate_stread,
HCPcdeflate_stwrite,
HCPcdeflate_seek,
HCPcdeflate_inquire,
HCPcdeflate_read,
HCPcdeflate_write,
HCPcdeflate_endaccess
};
#endif
#endif /* __CDEFLATE_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment