diff --git a/src/grib2.h.in b/src/grib2.h.in index d8049c56..e31aed7f 100644 --- a/src/grib2.h.in +++ b/src/grib2.h.in @@ -291,8 +291,8 @@ g2int g2_gribend(unsigned char *cgrib); /* Constants to help with templates. */ #define G2C_MAX_GDS_TEMPLATE 31 /**< Maximum number of grid templates. */ #define G2C_MAX_GDS_TEMPLATE_MAPLEN 28 /**< Maximum grid template map length. */ -#define G2C_MAX_PDS_TEMPLATE 47 /**< Maximum number of PDS templates. */ -#define G2C_MAX_PDS_TEMPLATE_MAPLEN 45 /**< Maximum template map length. */ +#define G2C_MAX_PDS_TEMPLATE 102 /**< Maximum number of PDS templates. */ +#define G2C_MAX_PDS_TEMPLATE_MAPLEN 50 /**< Maximum template map length. */ #define G2C_MAX_DRS_TEMPLATE 10 /**< Maximum number of DRS templates. */ #define G2C_MAX_DRS_TEMPLATE_MAPLEN 18 /**< Maximum DRS template map length. */ diff --git a/src/pdstemplates.c b/src/pdstemplates.c index fdd29fb8..ccf71ce9 100644 --- a/src/pdstemplates.c +++ b/src/pdstemplates.c @@ -35,6 +35,8 @@ * 2013-08-05 | Vuong | Corrected 4.91 and added Templates 4.33,4.34,4.53,4.54 * 2015-10-07 | Vuong | Added Templates 4.57, 4.60, 4.61 and allow a forecast time to be negative * 2022-10-18 | Hartnett | Added g2c_get_pds_template() and g2c_get_pds_template_extension(). + * 2024-09-09 | Stahl | Added extension for Template 4.35 + * 2024-12-04 | Stahl | Added 55 missing templates, including those from July 2024 WMO updates. * * @author Stephen Gilbert @date 2001-06-28 */ @@ -222,8 +224,233 @@ static const struct pdstemplate templatespds[G2C_MAX_PDS_TEMPLATE] = 4.35: Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval. */ - {35, 6, 1, {1, 1, 1, 1, 1, 1}} - + {35, 6, 1, {1, 1, 1, 1, 1, 1}}, + /** PDT 4.49 (12/04/2024) + 4.49: Individual Ensemble Forecast, Control and Perturbed, + at a horizontal level or in a horizontal layer at a point in time + for Optical Properties of Aerosol for Optical Properties of Aerosol */ + {49, 29, 0, {1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.55 (12/04/2024) + 4.55: Spatio-temporal changing tiles + at a horizontal level or horizontal layer at a point in time */ + {55, 21, 0, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.58 (12/04/2024) + 4.58: Individual Ensemble Forecast, Control and Perturbed, at a + horizontal level or in a horizontal layer at a point in time interval for + Atmospheric Chemical Constituents based on a distribution function */ + {58, 7, 1, {1, 1, 2, 2, 2, 2, 1}}, + /** PDT 4.59 (12/04/2024) + 4.59: Individual Ensemble Forecast, Control and Perturbed, at a horizontal level or in + a horizontal layer at a point in time interval for Spatio-Temporal changing tile parameters */ + {59, 24, 0, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.62 (12/04/2024) + 4.62: Average, Accumulation and/or Extreme values or other + Statistically-processed values at a horizontal level or in a horizontal + layer in a continuous or non-continuous time interval for spatio-temporal + changing tiles at a horizontal level or horizontal layer at a point in time */ + {62, 35, 1, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.63 (12/04/2024) + 4.63: Individual ensemble forecast, control and perturbed, + at a horizontal level or in a horizontal layer in a continuous or + non-continuous time interval for spatio-temporal changing tiles */ + {63, 38, 1, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.67 (12/04/2024) + 4.67: Average, Accumulation, and/or Extreme values or Other + statistically-processed values at a horizontal level or in a + horizontal layer in a continuous or non-continuous time interval for + Atmospheric Chemical Constituents based on a distribution function */ + {67, 7, 1, {1, 1, 2, 2, 2, 2, 1}}, + /** PDT 4.68 (12/04/2024) + 4.68: Individual ensemble forecast, control and perturbed, at a horizontal level + or in a horizontal layer in a continuous or non-continuous time interval + for Atmospheric Chemical Constituents based on a distribution function */ + {68, 7, 1, {1, 1, 2, 2, 2, 2, 1}}, + /** PDT 4.70 (12/04/2024) + 4.70: Post-processing Analysis or Forecast at a + horizontal level or in a horizontal layer at a point in time */ + {70, 19, 0, {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.71 (12/04/2024) + 4.71: Post-processing Individual Ensemble Forecast, Control and + Perturbed, at a horizontal level or in a horizontal layer at a point in time */ + {71, 21, 0, {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.72 (12/04/2024) + 4.72: Post-processing Average, Accumulation, Extreme values + or other Statistically processed values at a horizontal level or in + a horizontal layer in a continuous or non-continuous time interval */ + {72, 32, 1, {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.73 (12/04/2024) + 4.73: Post-processing Individual Ensemble Forecast, Control and Perturbed, at a + horizontal level or in a horizontal layer in a continuous or non-continuous time interval */ + {73, 34, 1, {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.76 (12/04/2024) + 4.76: Analysis or forecast at a horizontal level or in a horizontal layer at a point in + time for atmospheric chemical constituents with source or sink */ + {76, 17, 0, {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.77 (12/04/2024) + 4.77: Individual ensemble forecast, control and perturbed, at a horizontal level or in + a horizontal layer at a point in time for atmospheric chemical constituents with source or sink */ + {77, 20, 0, {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.78 (12/04/2024) + 4.78: Average, accumulation, and/or extreme values or other statistically + processed values at a horizontal level or in a horizontal layer in a continuous or + non-continuous time interval for atmospheric chemical constituents with source or sink */ + {78, 31, 1, {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.79 (12/04/2024) + 4.79: Individual ensemble forecast, control and perturbed, at a horizontal level or in a + horizontal layer in a continuous or non-continuous time + interval for atmospheric chemical constituents with source or sink */ + {79, 34, 1, {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.80 (12/04/2024) + 4.80: Analysis or forecast at a horizontal level or in a horizontal layer + at a point in time for optical properties of aerosol with source or sink */ + {80, 27, 0, {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.81 (12/04/2024) + 4.81: Individual ensemble forecast, control and perturbed, at a horizonal level + or in a horizontal layer at a point in time for optical properties of aerosol with source or sink */ + {81, 30, 0, {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.82 (12/04/2024) + 4.82: Average, accumulation, and/or extreme values or other statistically processed values + at a horizontal level or in a horizontal layer in a continuous + or non-continuous time interval for aerosol with source or sink */ + {82, 36, 1, {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.83 (12/04/2024) + 4.83: Individual ensemble forecast, control and perturbed, at a horizontal level or in a + horizontal layer in a continuous or non-continuous time interval for aerosol with source or sink */ + {83, 40, 1, {1, 1, 1, 2, 1, 1, -1, -4, -1, -4, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.84 (12/04/2024) + 4.84: Average, accumulation, and/or extreme values or other statistically processed values + at a horizontal level or in a horizontal layer in a continuous + or non-continuous time interval for aerosol with source or sink */ + {84, 39, 1, {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.85 (12/04/2024) + 4.85: Individual ensemble forecast, control and perturbed, at a horizontal level + or in a horizontal layer in a continuous or non-continuous time interval for aerosol */ + {85, 38, 1, {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.86 (12/04/2024) + 4.86: Quantile forecasts at a horizontal level or in a horizontal layer at a point in time */ + {86, 17, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2}}, + /** PDT 4.87 (12/04/2024) + 4.87: Quantile forecasts at a horizontal level or in a horizontal layer + in a continuous or non-continuous time interval */ + {87, 31, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.88 (12/04/2024) + 4.88: Analysis or forecast at a horizontal level or in a horizontal layer at a specified local time */ + {88, 24, 1, {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.89 (12/04/2024) + 4.89: Post-processed quantile forecasts at a horizontal level or in a horizontal layer at a point in time */ + {89, 20, 0, {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2}}, + /** PDT 4.90 (12/04/2024) + 4.90: Post-processed quantile forecasts at a horizontal level or in a horizontal layer in a continuous + or non-continuous time interval */ + {90, 34, 1, {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.92 (12/04/2024) + 4.92: Individual ensemble forecast, control and perturbed, at a horizontal + level or in a horizontal layer at a specified local time. */ + {92, 27, 1, {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.93 (12/04/2024) + 4.93: Post-processing analysis or forecast at a horizontal level or in a horizontal layer at a specified local time */ + {93, 27, 1, {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.94 (12/04/2024) + 4.94: Post-processing individual ensemble forecast, control and perturbed, at a horizontal level + or in a horizontal layer at a specified local time */ + {94, 30, 1, {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.95 (12/04/2024) + 4.95: Average, accumulation, extreme values or other statistically processed value + at a horizontal level or in a horizontal layer at a local time */ + {95, 28, 1, {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.96 (12/04/2024) + 4.96: Average, accumulation, extreme values or other statistically processed values of an individual ensemble forecast, + control and perturbed, at a horizontal level or in a horizontal layer at a local time */ + {96, 31, 1, {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.97 (12/04/2024) + 4.97: Average, accumulation, extreme values or other statistically processed values of post-processing analysis or forecast + at a horizontal level or in a horizontal layer at a local time */ + {97, 31, 1, {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.98 (12/04/2024) + 4.98: Average, accumulation, extreme values or other statistically processed values of a post-processing individual + ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a local time */ + {98, 34, 1, {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}}, + /** PDT 4.99 (12/04/2024) + 4.99: Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra + with explicit list of frequencies and directions */ + {99, 14, 1, {1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, -4, -1}}, + /** PDT 4.100 (12/04/2024) + 4.100: Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a + point in time for wave 2D spectra with explicit list of frequencies and directions */ + {100, 17, 1, {1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, -4, 1, 1, 1, -1}}, + /** PDT 4.103 (12/04/2024) + 4.103: Analysis or forecast at a horizontal level or in a horizontal layer at a point in time + for waves selected by period range */ + {103, 20, 0, {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.104 (12/04/2024) + 4.104: Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point + in time for waves selected by period range */ + {104, 23, 0, {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.108 (12/04/2024) + 4.108: Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical products */ + {108, 20, 0, {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.109 (12/04/2024) + 4.109: Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a + point in time for generic optical products */ + {109, 23, 0, {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.110 (12/04/2024) + 4.110: Average, accumulation, extreme values or other statistically processed values at a horizontal level or + in a horizontal layer in a continuous or non-continuous time interval for generic optical products */ + {110, 34, 1, {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.111 (12/04/2024) + 4.111: Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, + in a continuous or non-continuous interval for generic optical products */ + {111, 37, 1, {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.113 (12/04/2024) + 4.113: Generalized tiles at a horizontal level or horizontal layer at a point in time */ + {113, 7, 1, {1, 1, 1, 2, 1, 1, 1}}, + /** PDT 4.114 (12/04/2024) + 4.114: Average, accumulation, and/or extreme values or other statistically processed values on generalized tiles at a + horizontal level or in a horizontal layer in a continuous or non-continuous time interval */ + {114, 7, 1, {1, 1, 1, 2, 1, 1, 1}}, + /** PDT 4.115 (12/04/2024) + 4.115: Individual ensemble forecast, control and perturbed on generalized tiles at a horizontal level or in a horizontal + layer at a point in time */ + {115, 7, 1, {1, 1, 1, 2, 1, 1, 1}}, + /** PDT 4.116 (12/04/2024) + 4.116: Individual ensemble forecast, control and perturbed on generalized tiles at a horizontal level or in a horizontal + layer in a continuous or non-continuous time interval */ + {116, 7, 1, {1, 1, 1, 2, 1, 1, 1}}, + /** PDT 4.117 (12/04/2024) + 4.117: Individual large ensemble forecast, control and perturbed, at a horizontal + level or in a horizontal layer at a point in time */ + {117, 18, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 4}}, + /** PDT 4.118 (12/04/2024) + 4.118: Individual large ensemble forecast, control and perturbed, at a horizontal + level or in a horizontal layer at a point in time */ + {118, 32, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.119 (12/04/2024) + 4.119: Probability forecasts from large ensemble at a horizontal level or in a + horizontal layer at a point in time */ + {119, 24, 0, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 1, 1, 1, -1, -4, -1, -4}}, + /** PDT 4.120 (12/04/2024) + 4.120: Probability forecasts from large ensemble at a horizontal level or in a + horizontal layer in a continuous or non-continuous time interval */ + {120, 38, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.121 (12/04/2024) + 4.121: Probability forecasts from large ensembles with spatiotemporal processing + based on focal (moving window) statistics at a horizontal level or in a horizontal layer at a point in time */ + {121, 26, 1, {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 1, 1, 1, -1, -4, -1, -4, 1, 1}}, + /** PDT 4.124 (12/04/2024) + 4.124: Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for radionuclides */ + {124, 32, 0, {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}}, + /** PDT 4.125 (12/04/2024) + 4.125: Individual ensemble forecast, control and perturbed, at a horizontal + level or in a horizontal layer at a point in time for radionuclides */ + {125, 35, 0, {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}}, + /** PDT 4.126 (12/04/2024) + 4.126: Average, accumulation, or extreme values or other statistically processed values at a horizontal level or in a horizontal + layer in a continuous or non-continuous time interval for radionuclides */ + {126, 47, 1, {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, + /** PDT 4.127 (12/04/2024) + 4.127: Individual ensemble forecast, control and perturbed, at a horizontal + level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides */ + {127, 50, 1, {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}}, }; /** @@ -732,6 +959,754 @@ extpdstemplate(g2int number, g2int *list) new->ext[l + 4] = 4; } } + /* PDT 4.58 (12/04/2024) */ + else if (number == 58) + { + k = list[6] * 2; + new->extlen = k + 16; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + l = i * 2; + new->ext[l] = -1; + new->ext[l + 1] = -4; + } + new->ext[k] = 1; + new->ext[k + 1] = 1; + new->ext[k + 2] = 1; + new->ext[k + 3] = 2; + new->ext[k + 4] = 1; + new->ext[k + 5] = 1; + new->ext[k + 6] = -4; + new->ext[k + 7] = 1; + new->ext[k + 8] = -1; + new->ext[k + 9] = -4; + new->ext[k + 10] = 1; + new->ext[k + 11] = -1; + new->ext[k + 12] = -4; + new->ext[k + 13] = 1; + new->ext[k + 14] = 1; + new->ext[k + 15] = 1; + } + /* PDT 4.62 (12/04/2024) */ + else if (number == 62) + { + if (list[27] > 1) + { + new->extlen = (list[27] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[27]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[29 + k]; + } + } + } + } + /* PDT 4.63 (12/04/2024) */ + else if (number == 63) + { + if (list[30] > 1) + { + new->extlen = (list[30] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[30]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[32 + k]; + } + } + } + } + /* PDT 4.67 (12/04/2024) */ + else if (number == 67) + { + k = list[6] * 2; + new->extlen = k + 27; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + l = i * 2; + new->ext[l] = -1; + new->ext[l + 1] = -4; + } + new->ext[k] = 1; + new->ext[k + 1] = 1; + new->ext[k + 2] = 1; + new->ext[k + 3] = 2; + new->ext[k + 4] = 1; + new->ext[k + 5] = 1; + new->ext[k + 6] = -4; + new->ext[k + 7] = 1; + new->ext[k + 8] = -1; + new->ext[k + 9] = -4; + new->ext[k + 10] = 1; + new->ext[k + 11] = -1; + new->ext[k + 12] = -4; + new->ext[k + 13] = 2; + new->ext[k + 14] = 1; + new->ext[k + 15] = 1; + new->ext[k + 16] = 1; + new->ext[k + 17] = 1; + new->ext[k + 18] = 1; + new->ext[k + 19] = 1; + new->ext[k + 20] = 4; + new->ext[k + 21] = 1; + new->ext[k + 22] = 1; + new->ext[k + 23] = 1; + new->ext[k + 24] = 4; + new->ext[k + 25] = 1; + new->ext[k + 26] = 4; + } + /* PDT 4.68 (12/04/2024) */ + else if (number == 68) + { + k = list[6] * 2; + new->extlen = k + 30; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + l = i * 2; + new->ext[l] = -1; + new->ext[l + 1] = -4; + } + new->ext[k] = 1; + new->ext[k + 1] = 1; + new->ext[k + 2] = 1; + new->ext[k + 3] = 2; + new->ext[k + 4] = 1; + new->ext[k + 5] = 1; + new->ext[k + 6] = -4; + new->ext[k + 7] = 1; + new->ext[k + 8] = -1; + new->ext[k + 9] = -4; + new->ext[k + 10] = 1; + new->ext[k + 11] = -1; + new->ext[k + 12] = -4; + new->ext[k + 13] = 1; + new->ext[k + 14] = 1; + new->ext[k + 15] = 1; + new->ext[k + 16] = 2; + new->ext[k + 17] = 1; + new->ext[k + 18] = 1; + new->ext[k + 19] = 1; + new->ext[k + 20] = 1; + new->ext[k + 21] = 1; + new->ext[k + 22] = 1; + new->ext[k + 23] = 2; + new->ext[k + 24] = 1; + new->ext[k + 25] = 1; + new->ext[k + 26] = 1; + new->ext[k + 27] = 4; + new->ext[k + 28] = 1; + new->ext[k + 29] = 4; + } + /* PDT 4.72 (12/04/2024) */ + else if (number == 72) + { + if (list[24] > 1) + { + new->extlen = (list[24] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[24]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[26 + k]; + } + } + } + } + /* PDT 4.73 (12/04/2024) */ + else if (number == 73) + { + if (list[27] > 1) + { + new->extlen = (list[27] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[27]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[29 + k]; + } + } + } + } + /* PDT 4.78 (12/04/2024) */ + else if (number == 78) + { + if (list[23] > 1) + { + new->extlen = (list[23] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[23]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[25 + k]; + } + } + } + } + /* PDT 4.79 (12/04/2024) */ + else if (number == 79) + { + if (list[26] > 1) + { + new->extlen = (list[26] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[26]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[28 + k]; + } + } + } + } + /* PDT 4.82 (12/04/2024) */ + else if (number == 82) + { + if (list[28] > 1) + { + new->extlen = (list[28] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[28]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[30 + k]; + } + } + } + } + /* PDT 4.83 (12/04/2024) */ + else if (number == 83) + { + if (list[31] > 1) + { + new->extlen = (list[31] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[31]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[34 + k]; + } + } + } + } + /* PDT 4.84 (12/04/2024) */ + else if (number == 84) + { + if (list[31] > 1) + { + new->extlen = (list[31] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[31]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[33 + k]; + } + } + } + } + /* PDT 4.85 (12/04/2024) */ + else if (number == 85) + { + if (list[30] > 1) + { + new->extlen = (list[30] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[30]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[32 + k]; + } + } + } + } + /* PDT 4.87 (12/04/2024) */ + else if (number == 87) + { + if (list[23] > 1) + { + new->extlen = (list[23] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[23]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[25 + k]; + } + } + } + } + /* PDT 4.88 (12/04/2024) */ + else if (number == 88) + { + if (list[12] > 1) + { + new->extlen = (list[12] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[12]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[13 + k]; + } + } + } + } + /* PDT 4.90 (12/04/2024) */ + else if (number == 90) + { + if (list[26] > 1) + { + new->extlen = (list[26] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[26]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[28 + k]; + } + } + } + } + /* PDT 4.92 (12/04/2024) */ + else if (number == 92) + { + if (list[15] > 1) + { + new->extlen = (list[15] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[15]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[16 + k]; + } + } + } + } + /* PDT 4.93 (12/04/2024) */ + else if (number == 93) + { + if (list[15] > 1) + { + new->extlen = (list[15] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[15]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[16 + k]; + } + } + } + } + /* PDT 4.94 (12/04/2024) */ + else if (number == 94) + { + if (list[18] > 1) + { + new->extlen = (list[18] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[18]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[19 + k]; + } + } + } + } + /* PDT 4.95 (12/04/2024) */ + else if (number == 95) + { + if (list[16] > 1) + { + new->extlen = (list[16] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[16]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[17 + k]; + } + } + } + } + /* PDT 4.96 (12/04/2024) */ + else if (number == 96) + { + if (list[19] > 1) + { + new->extlen = (list[19] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[19]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[20 + k]; + } + } + } + } + /* PDT 4.97 (12/04/2024) */ + else if (number == 97) + { + if (list[19] > 1) + { + new->extlen = (list[19] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[19]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[20 + k]; + } + } + } + } + /* PDT 4.98 (12/04/2024) */ + else if (number == 98) + { + if (list[22] > 1) + { + new->extlen = (list[22] - 1) * 11; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[22]; j++) + { + l = (j - 2) * 11; + for (k = 0; k < 11; k++) + { + new->ext[l + k] = new->map[23 + k]; + } + } + } + } + /* PDT 4.99 (12/04/2024) */ + else if (number == 99) + { + j = list[3]; + k = list[5]; + new->extlen = j + k + 1; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < j; i++) + { + new->ext[i] = -4; + } + new->ext[j] = -1; + for (i = 0; i < k; i++) + { + new->ext[j + 1 + i] = -4; + } + } + /* PDT 4.100 (12/04/2024) */ + else if (number == 100) + { + j = list[3]; + k = list[5]; + new->extlen = j + k + 1; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < j; i++) + { + new->ext[i] = -4; + } + new->ext[j] = -1; + for (i = 0; i < k; i++) + { + new->ext[j + 1 + i] = -4; + } + } + /* PDT 4.110 (12/04/2024) */ + else if (number == 110) + { + if (list[26] > 1) + { + new->extlen = (list[26] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[26]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[28 + k]; + } + } + } + } + /* PDT 4.111 (12/04/2024) */ + else if (number == 111) + { + if (list[29] > 1) + { + new->extlen = (list[29] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[29]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[31 + k]; + } + } + } + } + /* PDT 4.113 (12/04/2024) */ + else if (number == 113) + { + new->extlen = list[6] + 16; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + new->ext[i] = 1; + } + l = list[6]; + new->ext[l] = 1; + new->ext[l + 1] = 1; + new->ext[l + 2] = 16; + new->ext[l + 3] = 1; + new->ext[l + 4] = 1; + new->ext[l + 5] = 1; + new->ext[l + 6] = 2; + new->ext[l + 7] = 1; + new->ext[l + 8] = 1; + new->ext[l + 9] = -4; + new->ext[l + 10] = 1; + new->ext[l + 11] = -1; + new->ext[l + 12] = -4; + new->ext[l + 13] = 1; + new->ext[l + 14] = -1; + new->ext[l + 15] = -4; + } + /* PDT 4.114 (12/04/2024) */ + else if (number == 114) + { + new->extlen = list[6] + 30; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + new->ext[i] = 1; + } + l = list[6]; + new->ext[l] = 1; + new->ext[l + 1] = 1; + new->ext[l + 2] = 16; + new->ext[l + 3] = 1; + new->ext[l + 4] = 1; + new->ext[l + 5] = 1; + new->ext[l + 6] = 2; + new->ext[l + 7] = 1; + new->ext[l + 8] = 1; + new->ext[l + 9] = -4; + new->ext[l + 10] = 1; + new->ext[l + 11] = -1; + new->ext[l + 12] = -4; + new->ext[l + 13] = 1; + new->ext[l + 14] = -1; + new->ext[l + 15] = -4; + new->ext[l + 16] = 2; + new->ext[l + 17] = 1; + new->ext[l + 18] = 1; + new->ext[l + 19] = 1; + new->ext[l + 20] = 1; + new->ext[l + 21] = 1; + new->ext[l + 22] = 1; + new->ext[l + 23] = 4; + new->ext[l + 24] = 1; + new->ext[l + 25] = 1; + new->ext[l + 26] = 1; + new->ext[l + 27] = 4; + new->ext[l + 28] = 1; + new->ext[l + 29] = 4; + } + else if (number == 115) + { + new->extlen = list[6] + 19; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + new->ext[i] = 1; + } + l = list[6]; + new->ext[l] = 1; + new->ext[l + 1] = 1; + new->ext[l + 2] = 16; + new->ext[l + 3] = 1; + new->ext[l + 4] = 1; + new->ext[l + 5] = 1; + new->ext[l + 6] = 2; + new->ext[l + 7] = 1; + new->ext[l + 8] = 1; + new->ext[l + 9] = -4; + new->ext[l + 10] = 1; + new->ext[l + 11] = -1; + new->ext[l + 12] = -4; + new->ext[l + 13] = 1; + new->ext[l + 14] = -1; + new->ext[l + 15] = -4; + new->ext[l + 16] = 1; + new->ext[l + 17] = 4; + new->ext[l + 18] = 4; + } + /* PDT 4.116 (12/04/2024) */ + else if (number == 116) + { + new->extlen = list[6] + 33; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[6]; i++) + { + new->ext[i] = 1; + } + l = list[6]; + new->ext[l] = 1; + new->ext[l + 1] = 1; + new->ext[l + 2] = 16; + new->ext[l + 3] = 1; + new->ext[l + 4] = 1; + new->ext[l + 5] = 1; + new->ext[l + 6] = 2; + new->ext[l + 7] = 1; + new->ext[l + 8] = 1; + new->ext[l + 9] = -4; + new->ext[l + 10] = 1; + new->ext[l + 11] = -1; + new->ext[l + 12] = -4; + new->ext[l + 13] = 1; + new->ext[l + 14] = -1; + new->ext[l + 15] = -4; + new->ext[l + 16] = 1; + new->ext[l + 17] = 4; + new->ext[l + 18] = 4; + new->ext[l + 19] = 2; + new->ext[l + 20] = 1; + new->ext[l + 21] = 1; + new->ext[l + 22] = 1; + new->ext[l + 23] = 1; + new->ext[l + 24] = 1; + new->ext[l + 25] = 1; + new->ext[l + 26] = 4; + new->ext[l + 27] = 1; + new->ext[l + 28] = 1; + new->ext[l + 29] = 1; + new->ext[l + 30] = 4; + new->ext[l + 31] = 1; + new->ext[l + 32] = 4; + } + /* PDT 4.118 (12/04/2024) */ + else if (number == 118) + { + if (list[24] > 1) + { + new->extlen = (list[24] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[24]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[26 + k]; + } + } + } + } + /* PDT 4.120 (12/04/2024) */ + else if (number == 120) + { + if (list[30] > 1) + { + new->extlen = (list[30] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[30]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[32 + k]; + } + } + } + } + /* PDT 4.121 (12/04/2024) */ + else if (number == 121) + { + new->extlen = list[25] * 9; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (i = 0; i < list[25]; i++) + { + l = i * 9; + new->ext[l] = -4; + new->ext[l + 1] = 1; + new->ext[l + 2] = 2; + new->ext[l + 3] = 2; + new->ext[l + 4] = 1; + new->ext[l + 5] = 1; + new->ext[l + 6] = 1; + new->ext[l + 7] = 4; + new->ext[l + 8] = 4; + } + } + /* PDT 4.126 (12/04/2024) */ + else if (number == 126) + { + if (list[39] > 1) + { + new->extlen = (list[39] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[39]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[41 + k]; + } + } + } + } + /* PDT 4.127 (12/04/2024) */ + else if (number == 127) + { + if (list[42] > 1) + { + new->extlen = (list[42] - 1) * 6; + new->ext = malloc(sizeof(g2int) * new->extlen); + for (j = 2; j <= list[42]; j++) + { + l = (j - 2) * 6; + for (k = 0; k < 6; k++) + { + new->ext[l + k] = new->map[44 + k]; + } + } + } + } return new; } diff --git a/tests/tst_pdstemplates.c b/tests/tst_pdstemplates.c index 8f5d4622..dd051014 100644 --- a/tests/tst_pdstemplates.c +++ b/tests/tst_pdstemplates.c @@ -57,7 +57,7 @@ main() printf("ok!\n"); printf("Testing extpdstemplate() calls..."); { -#define MAX_LIST 40 +#define MAX_LIST 50 gtemplate *tmpl; g2int list[MAX_LIST]; int i; @@ -352,70 +352,530 @@ main() return G2C_ERROR; free(tmpl->ext); free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(58, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 58 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(62, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 62 || tmpl->maplen != 35 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(63, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 63 || tmpl->maplen != 38 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(67, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 67 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(68, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 68 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(72, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 72 || tmpl->maplen != 32 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(73, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 73 || tmpl->maplen != 34 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(78, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 78 || tmpl->maplen != 31 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(79, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 79 || tmpl->maplen != 34 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(82, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 82 || tmpl->maplen != 36 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(83, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 83 || tmpl->maplen != 40 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(84, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 84 || tmpl->maplen != 39 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(85, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 85 || tmpl->maplen != 38 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(87, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 87 || tmpl->maplen != 31 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(88, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 88 || tmpl->maplen != 24 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(90, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 90 || tmpl->maplen != 34 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(92, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 92 || tmpl->maplen != 27 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(93, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 93 || tmpl->maplen != 27 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(94, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 94 || tmpl->maplen != 30 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(95, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 95 || tmpl->maplen != 28 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(96, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 96 || tmpl->maplen != 31 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(97, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 97 || tmpl->maplen != 31 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(98, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 98 || tmpl->maplen != 34 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(99, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 99 || tmpl->maplen != 14 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(100, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 100 || tmpl->maplen != 17 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(110, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 110 || tmpl->maplen != 34 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(111, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 111 || tmpl->maplen != 37 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(113, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 113 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(114, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 114 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(115, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 115 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(116, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 116 || tmpl->maplen != 7 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(118, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 118 || tmpl->maplen != 32 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(120, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 120 || tmpl->maplen != 38 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(121, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 121 || tmpl->maplen != 26 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(126, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 126 || tmpl->maplen != 47 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); + + /* Check for one that's there but does need an extension. */ + tmpl = extpdstemplate(127, list); + if (!tmpl) + return G2C_ERROR; + if (tmpl->num != 127 || tmpl->maplen != 50 || !tmpl->needext) + return G2C_ERROR; + if (!tmpl->ext) + return G2C_ERROR; + free(tmpl->ext); + free(tmpl); } printf("ok!\n"); printf("Testing all getpdstemplate() calls with extensions...\n"); { -#define NUM_TEST 47 +#define NUM_TEST 102 int number[NUM_TEST] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20, 30, 31, 40, 41, 42, 43, 254, 1000, 1001, 1002, 1100, 1101, 32, 44, 45, 46, 47, 48, 50, 52, - 51, 91, 33, 34, 53, 54, 57, 60, 61, 35}; + 51, 91, 33, 34, 53, 54, 57, 60, 61, 35, 49, 55, 58, 59, 62, 63, 67, 68, 70, + 71, 72, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 103, 104, 108, 109, 110, 111, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127}; int expected_maplen[NUM_TEST] = { 15, 18, 17, 31, 30, 22, 16, 15, 29, 36, 30, 32, 31, 45, 44, 18, 19, 5, 5, 16, 19, 30, 33, 3, 9, 16, 15, 15, 22, 10, 21, 24, 35, 38, 26, 21, 15, 16, - 36, 18, 32, 19, 22, 7, 24, 38, 6}; + 36, 18, 32, 19, 22, 7, 24, 38, 6, 29, 21, 7, 24, 35, 38, 7, 7, 19, 21, 32, + 34, 17, 20, 31, 34, 27, 30, 36, 40, 39, 38, 17, 31, 24, 20, 34, 27, 27, 30, + 28, 31, 31, 34, 14, 17, 20, 23, 20, 23, 34, 37, 7, 7, 7, 7, 18, 32, 24, 38, + 26, 32, 35, 47, 50}; int expected_needext[NUM_TEST] = { 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1}; - int expected_map[NUM_TEST][48] = { - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 0 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 1 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1}, /* 2 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, 1, -1, 4, -1, 4}, /* 3 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, 1, -1, 4, -1, 4}, /* 4 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4}, /* 5 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}, /* 6 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 7 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 8 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 9 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 10 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 11 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 12 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 13 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 14 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 15 */ - {1, 1, 1, 1, 1, -4, 4, 2, 4, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2}, /* 20 */ - {1, 1, 1, 1, 1}, /* 30 */ - {1, 1, 1, 1, 1}, /* 31 */ - {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 40 */ - {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 41 */ - {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 42 */ - {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 43 */ - {1, 1, 4}, /* 254 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4}, /* 1000 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 4, 1, 1, 1, 4, 1, 4}, /* 1001 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 1, 1, 4, 4, 2}, /* 1002 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 1100 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 4, 1, 1, 1, 4, 1, 4}, /* 1101 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1}, /* 32 */ - {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -2, 1, -1, -4, 1, -1, -4}, /* 44 */ - {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 45 */ - {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 46 */ - {1, 1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 47 */ - {1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 48 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 4, 4, 4, 4}, /* 50 */ - {1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4}, /* 52 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}, /* 51 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 91 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1}, /* 33 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 34 */ - {1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 53 */ - {1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 54 */ - {1, 1, 2, 2, 2, 2, 1}, /* 57 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1}, /* 60 */ - {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 61 */ - {1, 1, 1, 1, 1, 1}, /* 35 */ + 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, + 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, + 1, 1}; + int expected_map[NUM_TEST][50] = { + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 0 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 1 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1}, /* 2 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, 1, -1, 4, -1, 4}, /* 3 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, 1, -1, 4, -1, 4}, /* 4 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4}, /* 5 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}, /* 6 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 7 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 8 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 9 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 10 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 11 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 12 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, -4, 4, 4, 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 13 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 1, 1, -4, 4, 4, 1, -1, 4, -1, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 14 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 15 */ + {1, 1, 1, 1, 1, -4, 4, 2, 4, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2}, /* 20 */ + {1, 1, 1, 1, 1}, /* 30 */ + {1, 1, 1, 1, 1}, /* 31 */ + {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 40 */ + {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 41 */ + {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 42 */ + {1, 1, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 43 */ + {1, 1, 4}, /* 254 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4}, /* 1000 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 4, 1, 1, 1, 4, 1, 4}, /* 1001 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 1, 1, 4, 4, 2}, /* 1002 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 1100 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 4, 1, 1, 1, 4, 1, 4}, /* 1101 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1}, /* 32 */ + {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -2, 1, -1, -4, 1, -1, -4}, /* 44 */ + {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 45 */ + {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 46 */ + {1, 1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 47 */ + {1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 48 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 4, 4, 4, 4}, /* 50 */ + {1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4}, /* 52 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1}, /* 51 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 91 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1}, /* 33 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, 2, 2, 2, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 34 */ + {1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 53 */ + {1, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 54 */ + {1, 1, 2, 2, 2, 2, 1}, /* 57 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1}, /* 60 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 61 */ + {1, 1, 1, 1, 1, 1}, /* 35 */ + {1, 1, 2, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 49 */ + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 55 */ + {1, 1, 2, 2, 2, 2, 1}, /* 58 */ + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 59 */ + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 62 */ + {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 63 */ + {1, 1, 2, 2, 2, 2, 1}, /* 67 */ + {1, 1, 2, 2, 2, 2, 1}, /* 68 */ + {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 70 */ + {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 71 */ + {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 72 */ + {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 73 */ + {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 76 */ + {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 77 */ + {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 78 */ + {1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 79 */ + {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 80 */ + {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 81 */ + {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 82 */ + {1, 1, 1, 2, 1, 1, -1, -4, -1, -4, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 4, 1, 4}, /* 83 */ + {1, 1, 2, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 84 */ + {1, 1, 2, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 85 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2}, /* 86 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 87 */ + {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 88 */ + {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2}, /* 89 */ + {1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 2, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 90 */ + {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 92 */ + {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 93 */ + {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 94 */ + {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 95 */ + {1, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 96 */ + {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 97 */ + {1, 1, 2, 2, 1, 1, 1, 1, 1, -1, -4, 1, -1, -4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 98 */ + {1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, -4, -1}, /* 99 */ + {1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, -4, 1, 1, 1, -1}, /* 100 */ + {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 103 */ + {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 104 */ + {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 108 */ + {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 109 */ + {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 110 */ + {1, 1, 1, -1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 111 */ + {1, 1, 1, 2, 1, 1, 1}, /* 113 */ + {1, 1, 1, 2, 1, 1, 1}, /* 114 */ + {1, 1, 1, 2, 1, 1, 1}, /* 115 */ + {1, 1, 1, 2, 1, 1, 1}, /* 116 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 4}, /* 117 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 118 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 1, 1, 1, -1, -4, -1, -4}, /* 119 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 1, 1, 1, -1, -4, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 120 */ + {1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 1, 1, 1, -1, -4, -1, -4, 1, 1}, /* 121 */ + {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 124 */ + {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 125 */ + {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 126 */ + {1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 127 */ }; int t; int ext_t = 0; @@ -457,35 +917,74 @@ main() if (map[m] != expected_map[t][m]) return G2C_ERROR; -#define NUM_EXT_TEST 25 +#define NUM_EXT_TEST 61 int template[G2C_MAX_PDS_TEMPLATE_MAPLEN]; - int expected_extlen[NUM_EXT_TEST] = {2, 2, 6, 6, 6, 6, 6, 8, 8, 10, 10, 6, 6, 10, 6, 6, 12, 8, 2, 8, 2, 2, 30, 6, 10}; + int expected_extlen[NUM_EXT_TEST] = { + 2, 2, 6, 6, 6, 6, 6, 8, 8, 10, 10, 6, 6, 10, 6, 6, 12, 8, 2, 8, 2, 2, 30, 6, + 10, 20, 6, 6, 31, 34, 6, 6, 6, 6, 6, 6, 6, 6, 6, 11, 6, 11, 11, 11, 11, 11, + 11, 11, 5, 5, 6, 6, 18, 32, 21, 35, 6, 6, 18, 6, 6}; int expected_ext[NUM_EXT_TEST][48] = { - {1, 1}, /* 3 */ - {1, 1}, /* 4 */ - {1, 1, 1, 4, 1, 4}, /* 8 */ - {1, 1, 1, 4, 1, 4}, /* 9 */ - {1, 1, 1, 4, 1, 4}, /* 10 */ - {1, 1, 1, 4, 1, 4}, /* 11 */ - {1, 1, 1, 4, 1, 4}, /* 12 */ - {1, 1, 1, 4, 1, 4, 1, 1}, /* 13 */ - {1, 1, 1, 4, 1, 4, 1, 1}, /* 14 */ - {2, 2, 1, 1, 4, 2, 2, 1, 1, 4}, /* 30 */ - {2, 2, 2, 1, 4, 2, 2, 2, 1, 4}, /* 31 */ - {1, 1, 1, 4, 1, 4}, /* 42 */ - {1, 1, 1, 4, 1, 4}, /* 43 */ - {2, 2, 2, -1, -4, 2, 2, 2, -1, -4}, /* 32 */ - {1, 1, 1, 4, 1, 4}, /* 46 */ - {1, 1, 1, 4, 1, 4}, /* 47 */ - {1, 1, -1, -4, -1, -4, 1, 1, -1, -4, -1, -4}, /* 51 */ - {1, 1, 1, 4, 1, 4, 1, 1}, /* 91 */ - {1, 1}, /* 33 */ - {1, 1, 1, 4, 1, 4, 1, 1}, /* 34 */ - {1, 1}, /* 53 */ - {1, 1}, /* 54 */ - {1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 57 */ - {1, 1, 1, 4, 1, 4}, /* 61 */ - {2, 2, 2, 1, 4, 2, 2, 2, 1, 4}, /* 35 */ + {1, 1}, /* 3 */ + {1, 1}, /* 4 */ + {1, 1, 1, 4, 1, 4}, /* 8 */ + {1, 1, 1, 4, 1, 4}, /* 9 */ + {1, 1, 1, 4, 1, 4}, /* 10 */ + {1, 1, 1, 4, 1, 4}, /* 11 */ + {1, 1, 1, 4, 1, 4}, /* 12 */ + {1, 1, 1, 4, 1, 4, 1, 1}, /* 13 */ + {1, 1, 1, 4, 1, 4, 1, 1}, /* 14 */ + {2, 2, 1, 1, 4, 2, 2, 1, 1, 4}, /* 30 */ + {2, 2, 2, 1, 4, 2, 2, 2, 1, 4}, /* 31 */ + {1, 1, 1, 4, 1, 4}, /* 42 */ + {1, 1, 1, 4, 1, 4}, /* 43 */ + {2, 2, 2, -1, -4, 2, 2, 2, -1, -4}, /* 32 */ + {1, 1, 1, 4, 1, 4}, /* 46 */ + {1, 1, 1, 4, 1, 4}, /* 47 */ + {1, 1, -1, -4, -1, -4, 1, 1, -1, -4, -1, -4}, /* 51 */ + {1, 1, 1, 4, 1, 4, 1, 1}, /* 91 */ + {1, 1}, /* 33 */ + {1, 1, 1, 4, 1, 4, 1, 1}, /* 34 */ + {1, 1}, /* 53 */ + {1, 1}, /* 54 */ + {1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 57 */ + {1, 1, 1, 4, 1, 4}, /* 61 */ + {2, 2, 2, 1, 4, 2, 2, 2, 1, 4}, /* 35 */ + {-1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1}, /* 58 */ + {1, 1, 1, 4, 1, 4}, /* 62 */ + {1, 1, 1, 4, 1, 4}, /* 63 */ + {-1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 67 */ + {-1, -4, -1, -4, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 4}, /* 68 */ + {1, 1, 1, 4, 1, 4}, /* 72 */ + {1, 1, 1, 4, 1, 4}, /* 73 */ + {1, 1, 1, 4, 1, 4}, /* 78 */ + {1, 1, 1, 4, 1, 4}, /* 79 */ + {1, 1, 1, 4, 1, 4}, /* 82 */ + {1, 1, 1, 4, 1, 4}, /* 83 */ + {1, 1, 1, 4, 1, 4}, /* 84 */ + {1, 1, 1, 4, 1, 4}, /* 85 */ + {1, 1, 1, 4, 1, 4}, /* 87 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 88 */ + {1, 1, 1, 4, 1, 4}, /* 90 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 92 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 93 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 94 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 95 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 96 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 97 */ + {2, 1, 1, 1, 1, 1, 1, -4, 1, 1, 4}, /* 98 */ + {-4, -4, -1, -4, -4}, /* 99 */ + {-4, -4, -1, -4, -4}, /* 100 */ + {1, 1, 1, 4, 1, 4}, /* 110 */ + {1, 1, 1, 4, 1, 4}, /* 111 */ + {1, 1, 1, 1, 16, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4}, /* 113 */ + {1, 1, 1, 1, 16, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 114 */ + {1, 1, 1, 1, 16, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 4}, /* 115 */ + {1, 1, 1, 1, 16, 1, 1, 1, 2, 1, 1, -4, 1, -1, -4, 1, -1, -4, 1, 4, 4, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 4}, /* 116 */ + {1, 1, 1, 4, 1, 4}, /* 118 */ + {1, 1, 1, 4, 1, 4}, /* 120 */ + {-4, 1, 2, 2, 1, 1, 1, 4, 4, -4, 1, 2, 2, 1, 1, 1, 4, 4}, /* 121 */ + {1, 1, 1, 4, 1, 4}, /* 126 */ + {1, 1, 1, 4, 1, 4}, /* 127 */ }; if (needext) @@ -577,6 +1076,116 @@ main() case 35: template[5] = 2; break; + case 58: + template[6] = 2; + break; + case 62: + template[27] = 2; + break; + case 63: + template[30] = 2; + break; + case 67: + template[6] = 2; + break; + case 68: + template[6] = 2; + break; + case 72: + template[24] = 2; + break; + case 73: + template[29] = 2; + break; + case 78: + template[23] = 2; + break; + case 79: + template[26] = 2; + break; + case 82: + template[28] = 2; + break; + case 83: + template[31] = 2; + break; + case 84: + template[31] = 2; + break; + case 85: + template[30] = 2; + break; + case 87: + template[23] = 2; + break; + case 88: + template[12] = 2; + break; + case 90: + template[26] = 2; + break; + case 92: + template[15] = 2; + break; + case 93: + template[15] = 2; + break; + case 94: + template[18] = 2; + break; + case 95: + template[16] = 2; + break; + case 96: + template[19] = 2; + break; + case 97: + template[19] = 2; + break; + case 98: + template[22] = 2; + break; + case 99: + template[3] = 2; + template[5] = 2; + break; + case 100: + template[3] = 2; + template[5] = 2; + break; + case 110: + template[26] = 2; + break; + case 111: + template[29] = 2; + break; + case 113: + template[6] = 2; + break; + case 114: + template[6] = 2; + break; + case 115: + template[6] = 2; + break; + case 116: + template[6] = 2; + break; + case 118: + template[24] = 2; + break; + case 120: + template[30] = 2; + break; + case 121: + template[25] = 2; + break; + case 126: + template[39] = 2; + break; + case 127: + template[42] = 2; + break; default: return G2C_ERROR; }