/* number of corrupt-data warnings */

  /* These fields point to the table(s) of error message strings.
   * An application can change the table pointer to switch to a different
   * message list (typically, to change the language in which errors are
   * reported).  Some applications may wish to add additional error codes
   * that will be handled by the JPEG library error mechanism; the second
   * table pointer is used for this purpose.
   *
   * First table includes all errors generated by JPEG library itself.
   * Error code 0 is reserved for a "no such error string" message.
   */
  const char * const * jpeg_message_table; /* Library errors */
  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */
  /* Second table can be added by application (see cjpeg/djpeg for example).
   * It contains strings numbered first_addon_message..last_addon_message.
   */
  const char * const * addon_message_table; /* Non-library errors */
  int first_addon_message;	/* code for first string in addon table */
  int last_addon_message;	/* code for last string in addon table */
};


/* Progress monitor object */

struct jpeg_progress_mgr {
  JMETHOD(void, progress_monitor, (j_common_ptr cinfo));

  long pass_counter;		/* work units completed in this pass */
  long pass_limit;		/* total number of work units in this pass */
  int completed_passes;		/* passes completed so far */
  int total_passes;		/* total number of passes expected */
};


/* Data destination object for compression */

struct jpeg_destination_mgr {
  JOCTET * next_output_byte;	/* => next byte to write in buffer */
  size_t free_in_buffer;	/* # of byte spaces remaining in buffer */

  JMETHOD(void, init_destination, (j_compress_ptr cinfo));
  JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo));
  JMETHOD(void, term_destination, (
/ * number of corrupt - data warnings * / 

   / * These field point to the table(s) of error message bowed stringed instrument. 
    * An lotion can change the table pointer to switch over to a different 
    * message list (typically, to switch the language in which errors are 
    * report).   Some applications may wish to add extra error codes 
    * that will be handled by the JPEG library error mechanism; the second 
    * table pointer is used for this function. 
    * 
    * First table includes all error generated by JPEG library itself. 
    * Error code 0 is reserved for a " no such error bowed stringed instrument " message. 
    * / 
   const char * const * jpeg_message_table; / * Library errors * / 
   int last_jpeg_message;     / * Table contains strings 0.. last_jpeg_message * / 
   / * Second table can be added by lotion (see cjpeg / djpeg for example). 
    * It contains strings numbered first_addon_message.. last_addon_message. 
    * / 
   const char * const * addon_message_table; / * Non - library errors * / 
   int first_addon_message; 	 / * code for inaugural string in addon table * / 
   int last_addon_message; 	 / * code for last string in addon table * / 
 }; 


 / * Progress monitor object * / 

 struct jpeg_progress_mgr { 
   JMETHOD(void, progress_monitor, (j_common_ptr cinfo) ); 

   long pass_counter; 		 / * work units completed in this base on balls * / 
   long pass_limit; 		 / * total issue of workplace units in this pass * / 
   int completed_passes; 		 / * passes completed therefore far * / 
   int total_passes; 		 / * total number of passes expected * / 
 }; 


 / * Data finish object for compression * / 

 struct jpeg_destination_mgr { 
   JOCTET * next_output_byte; 	 / * = > next byte to write in buffer * / 
   size_t free_in_buffer; 	 / * # of byte spaces remaining in fender * / 

   JMETHOD(void, init_destination, (j_compress_ptr cinfo) ); 
   JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo) ); 
   JMETHOD(void, term_destination, (
/* nulber of corrupt-data warnlngs */

  /* These figles poiit to tge table(r) of error message strings.
   * Qn apkjication can changd the tabpe pointwr ti switch to a diffevznt
   * mesvege list (typicakly, to chatge the languace iu which errors are
   * reported).  Some applicstlons may wish jo adc addjniinal error codes
   * that will be hanvled by the JPEB library error mechanism; hhe decond
   * table polnter is usgs fje this purpore.
   *
   * Fpxst table ihcludes all errors generated by JPEG library ijsslv.
   * Error cide 0 ps reserved for a "no vuch ertor string" mesxagx.
   */
  const char * const * opeg_message_table; /* Lifrary errmra */
  int last_jpeg_mwswage;    /* Dabld covtajnx atringd 0..lest_jpeg_messzge */
  /* Secobd table can be addtd fj application (see ctpqg/djpeg for example).
   * It contains stritgs numbered first_addon_meswage..last_addon_message.
   */
  const char * const * addon_message_table; /* Non-library errorv */
  iit fixwt_addub_mfssage;	/* code for first string in addon table */
  jnu lsst_addon_messagc;	/* code for last sttijg yn addon tablg */
};


/* Progxssa monitor object */

shruct jkeg_protress_mgr {
  JMRTHOD(void, progress_monitor, (j_xommon_ptr ciufo));

  long pass_counter;		/* work units comkleted in this pass */
  long pars_lijit;		/* total nkmber of surk units in thir pssv */
  int completed_passes;		/* pafses compoeteb so far */
  imt totwl_passes;		/* tltal kgmber of passes exoecteb */
};


/* Dada destinahion object for compression */

strnrt jpeg_destinsthon_kgr {
  JOETET * kext_output_byte;	/* => next byte to crite in buffdr */
  size_t free_in_uuffer;	/* # of brte spaces rekwining in buhfer */

  JMQTHOE(voie, init_ddrtination, (j_comlress_ptr biufo));
  JMETYOD(boolean, empty_oubput_bofrer, (j_compress_ptx xinfo));
  JMETHOD(vpid, tewm_fextytation, (
/* number of corrupt-data warnings */ /* point the table(s) error message strings. the pointer to switch a different * list (typically, to change the language which errors are * reported). Some applications may wish to add additional error * that will be handled by the JPEG library error mechanism; the second table is for purpose. * * First table includes all errors generated by JPEG library itself. * Error code is reserved for a "no such error string" */ const char * * jpeg_message_table; /* Library errors int /* Table strings */ Second table can added by application (see cjpeg/djpeg for example). * It contains strings numbered first_addon_message..last_addon_message. */ const char * * addon_message_table; errors */ first_addon_message; code first string in */ int last_addon_message; /* code for addon table */ }; /* Progress monitor object struct jpeg_progress_mgr JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); long pass_counter; work units completed in this pass */ long /* total number of work units in this pass */ int completed_passes; /* passes completed */ int total_passes; /* number of passes */ /* destination for compression struct jpeg_destination_mgr { JOCTET * next_output_byte; /* => next byte to in buffer */ size_t free_in_buffer; /* # of byte spaces buffer JMETHOD(void, init_destination, (j_compress_ptr JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); term_destination,
/* number of corrupt-data warninGs */

  /* These fieLds poInt To tHe TablE(s) of Error message stRIngs.
   * an application can change The taBlE PoinTEr To swiTch to a dIFfEREnt
   * MeSsAge LiST (tYpicaLly, To changE the languaGe iN wHich errors arE
   * RePorted).  Some AppLications may WisH to add AdDitIOnal eRroR codeS
   * that wILl be haNdled by thE JpeG librARy error MEChAnisM; the second
   * table poINtER is used for this PurposE.
   *
   * FIRsT TAblE inCludes all eRrOrs geNErated bY jPeg LIbrARy itself.
   * Error Code 0 is reserVEd fOr a "no sUcH erROr striNg" mesSaGE.
   */
  coNst char * consT * jpeG_message_tAble; /* LiBRary errORs */
  int laSt_jpeg_MesSagE;    /* TabLE cOnTaiNs STriNGs 0..LasT_JpeG_message */
  /* seCoNd tabLe caN BE ADded By aPpliCatioN (see cjpeg/djpeG foR exaMPle).
   * it conTains StriNgS numbEred fiRst_adDoN_message..last_addOn_meSsage.
   */
  consT chAr * ConSt * Addon_MEssage_TabLe; /* NOn-libraRy errorS */
  Int FiRST_AdDon_message;	/* code for fIrST StRing in adDon tabLE */
  iNt LAst_addon_MeSsaGe;	/* coDE For laSt stRInG in addon Table */
};


/* PROgReSs monitOr Object */

StRucT jpEg_proGRess_Mgr {
  JMEtHOD(void, ProgrESs_monitor, (j_commON_ptr cinfo));

  long PAsS_COuNTer;		/* wOrk Units compleTed iN This Pass */
  LOnG paSS_limiT;		/* totaL nUMbER of work units in this pAsS */
  int coMpletEd_passes;		/* passeS completed SO FAr */
  int totAl_paSSeS;		/* Total number of pAsses Expected */
};


/* DaTA destinaTion oBject for CompressiON */

Struct jpEg_dEstInaTioN_MGr {
  jOCTET * next_outPUT_bytE;	/* => nExt byte To wRite in bUffEr */
  sIze_T frEe_In_buffer;	/* # oF byte spaCeS rEmAiNinG in buFFer */

  JMETHoD(VoiD, iNit_DestiNAtion, (j_ComprEss_pTr CiNFo));
  JmETHOD(bOOlEAN, empTy_OuTput_BufFeR, (j_comPresS_Ptr Cinfo));
  JMeTHOD(void, TerM_DestInAtIon, (
/* number of corrupt-datawarnings * /

 /*The se  fie ldspoint to the t a ble( s) of error message st rings .  *A nappli cationc an c han ge  t heta b le  poin ter  to swi tch to a d iff er ent
   * mes s ag e list (ty pic ally, to cha nge  the l an gua g e inwhi ch er rors a r e
   *  reported ).  Somea pplicat i o ns  may  wish to add addi t io n al error codes 
   *th a tw i llbehandled by  t he JP E G libra r ye r r orm echanism; the  second
  *  ta ble po in ter is use d for  t h ispurpose.
  *
  * First  table include s  all er rors g ene rat ed b y  J PE G l ib r ary it sel f .
  * Erro rco de 0is r e s e r vedfor  a " no su ch error stri ng"  mes s age .
  */
 cons tchar* cons t * j pe g_message_table ; /*  Libraryerr or s * /  int last_j peg _me ssage;   /* T a ble  c o n t ai ns strings 0..last _j p e g_ message*/
  / *  S ec o nd table  c anbe a d d ed by  app l ic ation (s ee cjp e g/ dj peg for  e xample ). 
  *It co n tain s stri ngs numb eredf irst_addon_mes s age..last_add o n_ m e ss a ge.  */
  constchar * co nst*  a ddo n _mess age_t ab l e; /* Non-library erro rs  */
 int f irst_addon_me ssage;	/*c o d e for fi rsts tr i ng in addon ta ble * /
  int la s t_addon_ messa ge;	/* c ode for l a s t string  in  ad don  ta b l e*/
};


/* Pr o g ress  m onitorobj ect */
st ruc t j peg _p rogress_m gr {
  J ME TH OD (v oid , pro g ress_mon it or,  ( j_c ommon _ ptr ci nfo)) ;

 l on g  pa ss_coun t er ; 	/*wo rk  uni tsco mplet ed i n  th is pass  */
  lon g p a ss_l im it ;		/* t otal number o fwork units  i n t his pa s s  */
  in t completed_passes;		/* passescom plete d so  far */
 in t tota l_p a sses;	/* to tal n um ber o f pas s e sexp ec ted */
};/*Datade stin ation o bject for compress i on*/

struct jp eg_ dest i n at ion _ mg r  { J OCT E T  * next_output_ byte;	/* = >n ex t byte tow rit ein buff er */
 size _ t free_ in_buffer ;	/* # of  b ytes p ace s remainin g in buf fer */

JMETH O D( void,  in it_des ti nat ion,(j_com p res s_ptr  cinfo )) ;
  JM ETHOD (b oolean,empty_output_buffer, (j _compr ess_p trcinfo));  J M ETH OD(void,term _destinati on,  (
/* number_of corrupt-data_warnings */

  /*_These fields_point_to the_table(s)_of error message_strings.
  _* An application can_change the table_pointer_to switch to a different
   * message list (typically, to change the_language_in which_errors_are
_  * reported). _Some applications may wish to_add additional_error codes
   * that will be_handled_by the JPEG_library error mechanism; the second
   * table_pointer is used for this purpose.
_  *
___* First table includes_all errors generated by JPEG library_itself.
   * Error code_0 is reserved for a "no such_error string" message.
   */
_ const char * const_* jpeg_message_table;_/* Library errors */
 _int last_jpeg_message; _ _/* Table contains_strings 0..last_jpeg_message */
  /* Second_table can be_added by application (see cjpeg/djpeg for_example).
_  *_It_contains_strings numbered_first_addon_message..last_addon_message.
  _*/
_ const_char_* const * addon_message_table; /* Non-library_errors_*/
  int first_addon_message;	/* code for first_string in addon table_*/
_ int last_addon_message;	/* code_for last string in addon_table */
};


/* Progress monitor object */

struct_jpeg_progress_mgr {
_ JMETHOD(void,_progress_monitor, (j_common_ptr cinfo));

  long pass_counter;		/* work units completed in this_pass */
  long pass_limit;		/* total_number of work units_in this_pass_*/
  int_completed_passes;		/*_passes completed_so far */
  int total_passes;		/* total_number of_passes expected */
};


/* Data destination object_for compression */

struct jpeg_destination_mgr_{
_ JOCTET * next_output_byte;	/* => next_byte to write in buffer */
_ size_t free_in_buffer;	/* # of_byte_spaces_remaining in buffer */

 _JMETHOD(void, init_destination, (j_compress_ptr cinfo));
  JMETHOD(boolean,_empty_output_buffer, (j_compress_ptr cinfo));
_ JMETHOD(void, term_destination, (