From: oetiker Date: Wed, 23 May 2007 21:33:45 +0000 (+0000) Subject: reindented everything according to .indent.pro X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2a6a270edfda89b04722b42b57992907f871c671;p=rrdtool.git reindented everything according to .indent.pro git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1078 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/.indent.pro b/src/.indent.pro index 66f8e13..4ba2c34 100644 --- a/src/.indent.pro +++ b/src/.indent.pro @@ -1,6 +1,7 @@ --blank-lines-after-declarations --blank-lines-after-procedures --break-before-boolean-operator +--break-function-decl-args --no-blank-lines-after-commas --braces-on-if-line --braces-on-struct-decl-line @@ -13,7 +14,7 @@ --else-endif-column33 --space-after-cast --line-comments-indentation0 ---declaration-indentation1 +--declaration-indentation10 --dont-format-first-column-comments --dont-format-comments --honour-newlines @@ -32,3 +33,8 @@ --case-brace-indentation0 --leave-preprocessor-space --no-tabs +-T rrd_t +-T info_t +-T time_t +-T off_t + diff --git a/src/art_rgba_svp.c b/src/art_rgba_svp.c index 25083d7..1cb96a6 100644 --- a/src/art_rgba_svp.c +++ b/src/art_rgba_svp.c @@ -36,190 +36,182 @@ #include "art_rgba_svp.h" #include "unused.h" -static void art_rgba_fill_run (art_u8 * linebuf, art_u8 r, art_u8 g, art_u8 b, int n); -static void art_rgba_run_alpha (art_u8 * linebuf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n); +static void art_rgba_fill_run( + art_u8 * linebuf, + art_u8 r, + art_u8 g, + art_u8 b, + int n); +static void art_rgba_run_alpha( + art_u8 * linebuf, + art_u8 r, + art_u8 g, + art_u8 b, + int alpha, + int n); typedef struct _ArtRgbaSVPAlphaData ArtRgbaSVPAlphaData; struct _ArtRgbaSVPAlphaData { - int alphatab[256]; - art_u8 r, g, b, alpha; - art_u8 *buf; - int rowstride; - int libart_x0, libart_x1; + int alphatab[256]; + art_u8 r, g, b, alpha; + art_u8 *buf; + int rowstride; + int libart_x0, libart_x1; }; -static void -art_rgba_svp_alpha_callback (void *callback_data, int UNUSED(y), - int start, ArtSVPRenderAAStep *steps, int n_steps) +static void art_rgba_svp_alpha_callback( + void *callback_data, + int UNUSED(y), + int start, + ArtSVPRenderAAStep * steps, + int n_steps) { - ArtRgbaSVPAlphaData *data = callback_data; - art_u8 *linebuf; - int run_x0, run_x1; - art_u32 running_sum = start; - int libart_x0, libart_x1; - int k; - art_u8 r, g, b; - int *alphatab; - int alpha; - - linebuf = data->buf; - libart_x0 = data->libart_x0; - libart_x1 = data->libart_x1; - - r = data->r; - g = data->g; - b = data->b; - alphatab = data->alphatab; - - if (n_steps > 0) - { - run_x1 = steps[0].x; - if (run_x1 > libart_x0) - { - alpha = (running_sum >> 16) & 0xff; - if (alpha) - art_rgba_run_alpha (linebuf, - r, g, b, alphatab[alpha], - run_x1 - libart_x0); - } - - /* render the steps into tmpbuf */ - for (k = 0; k < n_steps - 1; k++) - { - running_sum += steps[k].delta; - run_x0 = run_x1; - run_x1 = steps[k + 1].x; - if (run_x1 > run_x0) - { - alpha = (running_sum >> 16) & 0xff; - if (alpha) - art_rgba_run_alpha (linebuf + (run_x0 - libart_x0) * 4, - r, g, b, alphatab[alpha], - run_x1 - run_x0); - } - } - running_sum += steps[k].delta; - if (libart_x1 > run_x1) - { - alpha = (running_sum >> 16) & 0xff; - if (alpha) - art_rgba_run_alpha (linebuf + (run_x1 - libart_x0) * 4, - r, g, b, alphatab[alpha], - libart_x1 - run_x1); - } - } - else - { - alpha = (running_sum >> 16) & 0xff; - if (alpha) - art_rgba_run_alpha (linebuf, - r, g, b, alphatab[alpha], - libart_x1 - libart_x0); + ArtRgbaSVPAlphaData *data = callback_data; + art_u8 *linebuf; + int run_x0, run_x1; + art_u32 running_sum = start; + int libart_x0, libart_x1; + int k; + art_u8 r, g, b; + int *alphatab; + int alpha; + + linebuf = data->buf; + libart_x0 = data->libart_x0; + libart_x1 = data->libart_x1; + + r = data->r; + g = data->g; + b = data->b; + alphatab = data->alphatab; + + if (n_steps > 0) { + run_x1 = steps[0].x; + if (run_x1 > libart_x0) { + alpha = (running_sum >> 16) & 0xff; + if (alpha) + art_rgba_run_alpha(linebuf, + r, g, b, alphatab[alpha], + run_x1 - libart_x0); + } + + /* render the steps into tmpbuf */ + for (k = 0; k < n_steps - 1; k++) { + running_sum += steps[k].delta; + run_x0 = run_x1; + run_x1 = steps[k + 1].x; + if (run_x1 > run_x0) { + alpha = (running_sum >> 16) & 0xff; + if (alpha) + art_rgba_run_alpha(linebuf + (run_x0 - libart_x0) * 4, + r, g, b, alphatab[alpha], + run_x1 - run_x0); + } + } + running_sum += steps[k].delta; + if (libart_x1 > run_x1) { + alpha = (running_sum >> 16) & 0xff; + if (alpha) + art_rgba_run_alpha(linebuf + (run_x1 - libart_x0) * 4, + r, g, b, alphatab[alpha], + libart_x1 - run_x1); + } + } else { + alpha = (running_sum >> 16) & 0xff; + if (alpha) + art_rgba_run_alpha(linebuf, + r, g, b, alphatab[alpha], + libart_x1 - libart_x0); } - data->buf += data->rowstride; + data->buf += data->rowstride; } -static void -art_rgba_svp_alpha_opaque_callback (void *callback_data, int UNUSED(y), - int start, - ArtSVPRenderAAStep *steps, int n_steps) +static void art_rgba_svp_alpha_opaque_callback( + void *callback_data, + int UNUSED(y), + int start, + ArtSVPRenderAAStep * steps, + int n_steps) { - ArtRgbaSVPAlphaData *data = callback_data; - art_u8 *linebuf; - int run_x0, run_x1; - art_u32 running_sum = start; - int libart_x0, libart_x1; - int k; - art_u8 r, g, b; - int *alphatab; - int alpha; - - linebuf = data->buf; - libart_x0 = data->libart_x0; - libart_x1 = data->libart_x1; - - r = data->r; - g = data->g; - b = data->b; - alphatab = data->alphatab; - - if (n_steps > 0) - { - run_x1 = steps[0].x; - if (run_x1 > libart_x0) - { - alpha = running_sum >> 16; - if (alpha) - { - if (alpha >= 255) - art_rgba_fill_run (linebuf, - r, g, b, - run_x1 - libart_x0); - else - art_rgba_run_alpha (linebuf, - r, g, b, alphatab[alpha], - run_x1 - libart_x0); - } - } - - /* render the steps into tmpbuf */ - for (k = 0; k < n_steps - 1; k++) - { - running_sum += steps[k].delta; - run_x0 = run_x1; - run_x1 = steps[k + 1].x; - if (run_x1 > run_x0) - { - alpha = running_sum >> 16; - if (alpha) - { - if (alpha >= 255) - art_rgba_fill_run (linebuf + (run_x0 - libart_x0) * 4, - r, g, b, - run_x1 - run_x0); - else - art_rgba_run_alpha (linebuf + (run_x0 - libart_x0) * 4, - r, g, b, alphatab[alpha], - run_x1 - run_x0); - } - } - } - running_sum += steps[k].delta; - if (libart_x1 > run_x1) - { - alpha = running_sum >> 16; - if (alpha) - { - if (alpha >= 255) - art_rgba_fill_run (linebuf + (run_x1 - libart_x0) * 4, - r, g, b, - libart_x1 - run_x1); - else - art_rgba_run_alpha (linebuf + (run_x1 - libart_x0) * 4, - r, g, b, alphatab[alpha], - libart_x1 - run_x1); - } - } - } - else - { - alpha = running_sum >> 16; - if (alpha) - { - if (alpha >= 255) - art_rgba_fill_run (linebuf, - r, g, b, - libart_x1 - libart_x0); - else - art_rgba_run_alpha (linebuf, - r, g, b, alphatab[alpha], - libart_x1 - libart_x0); - } + ArtRgbaSVPAlphaData *data = callback_data; + art_u8 *linebuf; + int run_x0, run_x1; + art_u32 running_sum = start; + int libart_x0, libart_x1; + int k; + art_u8 r, g, b; + int *alphatab; + int alpha; + + linebuf = data->buf; + libart_x0 = data->libart_x0; + libart_x1 = data->libart_x1; + + r = data->r; + g = data->g; + b = data->b; + alphatab = data->alphatab; + + if (n_steps > 0) { + run_x1 = steps[0].x; + if (run_x1 > libart_x0) { + alpha = running_sum >> 16; + if (alpha) { + if (alpha >= 255) + art_rgba_fill_run(linebuf, r, g, b, run_x1 - libart_x0); + else + art_rgba_run_alpha(linebuf, + r, g, b, alphatab[alpha], + run_x1 - libart_x0); + } + } + + /* render the steps into tmpbuf */ + for (k = 0; k < n_steps - 1; k++) { + running_sum += steps[k].delta; + run_x0 = run_x1; + run_x1 = steps[k + 1].x; + if (run_x1 > run_x0) { + alpha = running_sum >> 16; + if (alpha) { + if (alpha >= 255) + art_rgba_fill_run(linebuf + (run_x0 - libart_x0) * 4, + r, g, b, run_x1 - run_x0); + else + art_rgba_run_alpha(linebuf + (run_x0 - libart_x0) * 4, + r, g, b, alphatab[alpha], + run_x1 - run_x0); + } + } + } + running_sum += steps[k].delta; + if (libart_x1 > run_x1) { + alpha = running_sum >> 16; + if (alpha) { + if (alpha >= 255) + art_rgba_fill_run(linebuf + (run_x1 - libart_x0) * 4, + r, g, b, libart_x1 - run_x1); + else + art_rgba_run_alpha(linebuf + (run_x1 - libart_x0) * 4, + r, g, b, alphatab[alpha], + libart_x1 - run_x1); + } + } + } else { + alpha = running_sum >> 16; + if (alpha) { + if (alpha >= 255) + art_rgba_fill_run(linebuf, r, g, b, libart_x1 - libart_x0); + else + art_rgba_run_alpha(linebuf, + r, g, b, alphatab[alpha], + libart_x1 - libart_x0); + } } - data->buf += data->rowstride; + data->buf += data->rowstride; } /** @@ -249,85 +241,96 @@ art_rgba_svp_alpha_opaque_callback (void *callback_data, int UNUSED(y), * according to the rule in @alphagamma, or default to linear if * @alphagamma is NULL. **/ -void -gnome_print_art_rgba_svp_alpha (const ArtSVP *svp, - int libart_x0, int libart_y0, int libart_x1, int libart_y1, - art_u32 rgba, - art_u8 *buf, int rowstride, - ArtAlphaGamma UNUSED(*alphagamma)) +void gnome_print_art_rgba_svp_alpha( + const ArtSVP * svp, + int libart_x0, + int libart_y0, + int libart_x1, + int libart_y1, + art_u32 rgba, + art_u8 * buf, + int rowstride, + ArtAlphaGamma UNUSED(*alphagamma)) { - ArtRgbaSVPAlphaData data; - int r, g, b, alpha; - int i; - int a, da; - - r = rgba >> 24; - g = (rgba >> 16) & 0xff; - b = (rgba >> 8) & 0xff; - alpha = rgba & 0xff; - - data.r = r; - data.g = g; - data.b = b; - data.alpha = alpha; - - a = 0x8000; - da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */ - - for (i = 0; i < 256; i++) - { - data.alphatab[i] = a >> 16; - a += da; + ArtRgbaSVPAlphaData data; + int r, g, b, alpha; + int i; + int a, da; + + r = rgba >> 24; + g = (rgba >> 16) & 0xff; + b = (rgba >> 8) & 0xff; + alpha = rgba & 0xff; + + data.r = r; + data.g = g; + data.b = b; + data.alpha = alpha; + + a = 0x8000; + da = (alpha * 66051 + 0x80) >> 8; /* 66051 equals 2 ^ 32 / (255 * 255) */ + + for (i = 0; i < 256; i++) { + data.alphatab[i] = a >> 16; + a += da; } - data.buf = buf; - data.rowstride = rowstride; - data.libart_x0 = libart_x0; - data.libart_x1 = libart_x1; - if (alpha == 255) - art_svp_render_aa (svp, libart_x0, libart_y0, libart_x1, libart_y1, art_rgba_svp_alpha_opaque_callback, - &data); - else - art_svp_render_aa (svp, libart_x0, libart_y0, libart_x1, libart_y1, art_rgba_svp_alpha_callback, &data); + data.buf = buf; + data.rowstride = rowstride; + data.libart_x0 = libart_x0; + data.libart_x1 = libart_x1; + if (alpha == 255) + art_svp_render_aa(svp, libart_x0, libart_y0, libart_x1, libart_y1, + art_rgba_svp_alpha_opaque_callback, &data); + else + art_svp_render_aa(svp, libart_x0, libart_y0, libart_x1, libart_y1, + art_rgba_svp_alpha_callback, &data); } -static void -art_rgba_fill_run (art_u8 * buf, art_u8 r, art_u8 g, art_u8 b, int n) +static void art_rgba_fill_run( + art_u8 * buf, + art_u8 r, + art_u8 g, + art_u8 b, + int n) { - int i; - - for (i = 0; i < n; i++) { - * buf++ = r; - * buf++ = g; - * buf++ = b; - * buf++ = 255; - } + int i; + + for (i = 0; i < n; i++) { + *buf++ = r; + *buf++ = g; + *buf++ = b; + *buf++ = 255; + } } /* fixme: this */ -static void -art_rgba_run_alpha (art_u8 * buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n) +static void art_rgba_run_alpha( + art_u8 * buf, + art_u8 r, + art_u8 g, + art_u8 b, + int alpha, + int n) { - int i; - int br, bg, bb, ba; - int cr, cg, cb; - - for (i = 0; i < n; i++) { - br = * (buf + 0); - bg = * (buf + 1); - bb = * (buf + 2); - ba = * (buf + 3); - - cr = (br * ba + 0x80) >> 8; - cg = (bg * ba + 0x80) >> 8; - cb = (bb * ba + 0x80) >> 8; - - * buf++ = cr + (((r - cr) * alpha + 0x80) >> 8); - * buf++ = cg + (((g - cg) * alpha + 0x80) >> 8); - * buf++ = cb + (((b - cb) * alpha + 0x80) >> 8); - * buf++ = ba + (((255 - ba) * alpha + 0x80) >> 8); - } + int i; + int br, bg, bb, ba; + int cr, cg, cb; + + for (i = 0; i < n; i++) { + br = *(buf + 0); + bg = *(buf + 1); + bb = *(buf + 2); + ba = *(buf + 3); + + cr = (br * ba + 0x80) >> 8; + cg = (bg * ba + 0x80) >> 8; + cb = (bb * ba + 0x80) >> 8; + + *buf++ = cr + (((r - cr) * alpha + 0x80) >> 8); + *buf++ = cg + (((g - cg) * alpha + 0x80) >> 8); + *buf++ = cb + (((b - cb) * alpha + 0x80) >> 8); + *buf++ = ba + (((255 - ba) * alpha + 0x80) >> 8); + } } - - diff --git a/src/art_rgba_svp.h b/src/art_rgba_svp.h index 4cac175..406cced 100644 --- a/src/art_rgba_svp.h +++ b/src/art_rgba_svp.h @@ -7,11 +7,15 @@ #include #include -void -gnome_print_art_rgba_svp_alpha (const ArtSVP *svp, - int x0, int y0, int x1, int y1, - art_u32 rgba, - art_u8 *buf, int rowstride, - ArtAlphaGamma *alphagamma); +void gnome_print_art_rgba_svp_alpha( + const ArtSVP * svp, + int x0, + int y0, + int x1, + int y1, + art_u32 rgba, + art_u8 * buf, + int rowstride, + ArtAlphaGamma * alphagamma); -#endif /* SP_ART_RGBA_SVP_H */ +#endif /* SP_ART_RGBA_SVP_H */ diff --git a/src/fnv.h b/src/fnv.h index e69f9ce..eaea66b 100644 --- a/src/fnv.h +++ b/src/fnv.h @@ -99,10 +99,16 @@ typedef unsigned long Fnv32_t; */ #define FNV1_32_INIT ((Fnv32_t)0x811c9dc5) -Fnv32_t fnv_32_buf(const void *, size_t, Fnv32_t); +Fnv32_t fnv_32_buf( + const void *, + size_t, + Fnv32_t); -Fnv32_t fnv_32_str(const char *, Fnv32_t ); +Fnv32_t fnv_32_str( + const char *, + Fnv32_t); -unsigned long FnvHash(const char *); +unsigned long FnvHash( + const char *); -#endif /* __FNV_H__ */ +#endif /* __FNV_H__ */ diff --git a/src/gdpng.c b/src/gdpng.c index 99e7db6..6b50166 100644 --- a/src/gdpng.c +++ b/src/gdpng.c @@ -9,54 +9,56 @@ #include typedef struct _jmpbuf_wrapper { - jmp_buf jmpbuf; + jmp_buf jmpbuf; } jmpbuf_wrapper; static jmpbuf_wrapper gdPngJmpbufStruct; -void gdImagePng(gdImagePtr im, FILE *out) +void gdImagePng( + gdImagePtr im, + FILE * out) { - int i; + int i; png_colorp palette; - png_structp png_write_ptr = - png_create_write_struct(PNG_LIBPNG_VER_STRING, - (png_voidp)NULL, - /* we would need to point to error handlers - here to do it properly */ - (png_error_ptr)NULL, (png_error_ptr)NULL); + png_structp png_write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, + (png_voidp) NULL, + /* we would need to point to error handlers + here to do it properly */ + (png_error_ptr) NULL, + (png_error_ptr) NULL); png_infop info_ptr = png_create_info_struct(png_write_ptr); if (setjmp(gdPngJmpbufStruct.jmpbuf)) { - png_destroy_write_struct(&png_write_ptr, &info_ptr); - return; + png_destroy_write_struct(&png_write_ptr, &info_ptr); + return; } - palette = (png_colorp)png_malloc (png_write_ptr, - im->colorsTotal*sizeof(png_color)); - if (palette == NULL){ - png_destroy_write_struct(&png_write_ptr, &info_ptr); - return; + palette = (png_colorp) png_malloc(png_write_ptr, + im->colorsTotal * sizeof(png_color)); + if (palette == NULL) { + png_destroy_write_struct(&png_write_ptr, &info_ptr); + return; } - - + + png_init_io(png_write_ptr, out); png_set_write_status_fn(png_write_ptr, NULL); - png_set_IHDR(png_write_ptr,info_ptr, - im->sx,im->sy,im->colorsTotal > 16 ? 8:4, - PNG_COLOR_TYPE_PALETTE, - im->interlace ? PNG_INTERLACE_ADAM7: PNG_INTERLACE_NONE , - PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - for(i=0;icolorsTotal;i++){ - palette[i].red = im->red[i]; - palette[i].green = im->green[i]; - palette[i].blue = im->blue[i]; + png_set_IHDR(png_write_ptr, info_ptr, + im->sx, im->sy, im->colorsTotal > 16 ? 8 : 4, + PNG_COLOR_TYPE_PALETTE, + im->interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + for (i = 0; i < im->colorsTotal; i++) { + palette[i].red = im->red[i]; + palette[i].green = im->green[i]; + palette[i].blue = im->blue[i]; } png_set_PLTE(png_write_ptr, info_ptr, palette, im->colorsTotal); /* choose between speed (1) and space (9) optimisation */ /* we want to be fast ... */ - png_set_compression_level(png_write_ptr,1); - png_set_filter(png_write_ptr,PNG_FILTER_TYPE_BASE,PNG_NO_FILTERS); + png_set_compression_level(png_write_ptr, 1); + png_set_filter(png_write_ptr, PNG_FILTER_TYPE_BASE, PNG_NO_FILTERS); /* store file info */ png_write_info(png_write_ptr, info_ptr); png_set_packing(png_write_ptr); @@ -65,7 +67,3 @@ void gdImagePng(gdImagePtr im, FILE *out) png_free(png_write_ptr, palette); png_destroy_write_struct(&png_write_ptr, &info_ptr); } - - - - diff --git a/src/hash_32.c b/src/hash_32.c index d7edbee..0473696 100644 --- a/src/hash_32.c +++ b/src/hash_32.c @@ -65,7 +65,7 @@ /* * 32 bit magic FNV-0 and FNV-1 prime */ -#define FNV_32_PRIME ((Fnv32_t)0x01000193) +#define FNV_32_PRIME ((Fnv32_t)0x01000193) /* @@ -85,22 +85,24 @@ * NOTE: To use the recommended 32 bit FNV-1 hash, use FNV1_32_INIT as the hval * argument on the first call to either fnv_32_buf() or fnv_32_str(). */ -Fnv32_t -fnv_32_buf(const void *buf, size_t len, Fnv32_t hval) +Fnv32_t fnv_32_buf( + const void *buf, + size_t len, + Fnv32_t hval) { - const unsigned char *bp = (const unsigned char *)buf; /* start of buffer */ - const unsigned char *be = bp + len; /* beyond end of buffer */ + const unsigned char *bp = (const unsigned char *) buf; /* start of buffer */ + const unsigned char *be = bp + len; /* beyond end of buffer */ /* * FNV-1 hash each octet in the buffer */ while (bp < be) { - /* multiply by the 32 bit FNV magic prime mod 2^64 */ - hval *= FNV_32_PRIME; + /* multiply by the 32 bit FNV magic prime mod 2^64 */ + hval *= FNV_32_PRIME; - /* xor the bottom with the current octet */ - hval ^= (Fnv32_t)*bp++; + /* xor the bottom with the current octet */ + hval ^= (Fnv32_t) * bp++; } /* return our new hash value */ @@ -124,21 +126,22 @@ fnv_32_buf(const void *buf, size_t len, Fnv32_t hval) * NOTE: To use the recommended 32 bit FNV-1 hash, use FNV1_32_INIT as the hval * argument on the first call to either fnv_32_buf() or fnv_32_str(). */ -Fnv32_t -fnv_32_str(const char *str, Fnv32_t hval) +Fnv32_t fnv_32_str( + const char *str, + Fnv32_t hval) { - const unsigned char *s = (const unsigned char *)str; /* unsigned string */ + const unsigned char *s = (const unsigned char *) str; /* unsigned string */ /* * FNV-1 hash each octet in the buffer */ while (*s) { - /* multiply by the 32 bit FNV magic prime mod 2^64 */ - hval *= FNV_32_PRIME; + /* multiply by the 32 bit FNV magic prime mod 2^64 */ + hval *= FNV_32_PRIME; - /* xor the bottom with the current octet */ - hval ^= (Fnv32_t)*s++; + /* xor the bottom with the current octet */ + hval ^= (Fnv32_t) * s++; } /* return our new hash value */ @@ -146,7 +149,8 @@ fnv_32_str(const char *str, Fnv32_t hval) } /* a wrapper function for fnv_32_str */ -unsigned long FnvHash(const char *str) +unsigned long FnvHash( + const char *str) { - return fnv_32_str(str,FNV1_32_INIT); + return fnv_32_str(str, FNV1_32_INIT); } diff --git a/src/parsetime.c b/src/parsetime.c index 919dd50..508546a 100644 --- a/src/parsetime.c +++ b/src/parsetime.c @@ -119,7 +119,7 @@ /* Structures and unions */ -enum { /* symbols */ +enum { /* symbols */ MIDNIGHT, NOON, TEATIME, PM, AM, YESTERDAY, TODAY, TOMORROW, NOW, START, END, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS, @@ -128,7 +128,7 @@ enum { /* symbols */ JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, SUN, MON, TUE, WED, THU, FRI, SAT - }; +}; /* the below is for plus_minus() */ #define PREVIOUS_OP (-1) @@ -136,94 +136,94 @@ enum { /* symbols */ /* parse translation table - table driven parsers can be your FRIEND! */ struct SpecialToken { - char *name; /* token name */ - int value; /* token id */ + char *name; /* token name */ + int value; /* token id */ }; static struct SpecialToken VariousWords[] = { - { "midnight", MIDNIGHT }, /* 00:00:00 of today or tomorrow */ - { "noon", NOON }, /* 12:00:00 of today or tomorrow */ - { "teatime", TEATIME }, /* 16:00:00 of today or tomorrow */ - { "am", AM }, /* morning times for 0-12 clock */ - { "pm", PM }, /* evening times for 0-12 clock */ - { "tomorrow", TOMORROW }, - { "yesterday", YESTERDAY }, - { "today", TODAY }, - { "now", NOW }, - { "n", NOW }, - { "start", START }, - { "s", START }, - { "end", END }, - { "e", END }, - - { "jan", JAN }, - { "feb", FEB }, - { "mar", MAR }, - { "apr", APR }, - { "may", MAY }, - { "jun", JUN }, - { "jul", JUL }, - { "aug", AUG }, - { "sep", SEP }, - { "oct", OCT }, - { "nov", NOV }, - { "dec", DEC }, - { "january", JAN }, - { "february", FEB }, - { "march", MAR }, - { "april", APR }, - { "may", MAY }, - { "june", JUN }, - { "july", JUL }, - { "august", AUG }, - { "september", SEP }, - { "october", OCT }, - { "november", NOV }, - { "december", DEC }, - { "sunday", SUN }, - { "sun", SUN }, - { "monday", MON }, - { "mon", MON }, - { "tuesday", TUE }, - { "tue", TUE }, - { "wednesday", WED }, - { "wed", WED }, - { "thursday", THU }, - { "thu", THU }, - { "friday", FRI }, - { "fri", FRI }, - { "saturday", SAT }, - { "sat", SAT }, - { NULL, 0 } /*** SENTINEL ***/ + {"midnight", MIDNIGHT}, /* 00:00:00 of today or tomorrow */ + {"noon", NOON}, /* 12:00:00 of today or tomorrow */ + {"teatime", TEATIME}, /* 16:00:00 of today or tomorrow */ + {"am", AM}, /* morning times for 0-12 clock */ + {"pm", PM}, /* evening times for 0-12 clock */ + {"tomorrow", TOMORROW}, + {"yesterday", YESTERDAY}, + {"today", TODAY}, + {"now", NOW}, + {"n", NOW}, + {"start", START}, + {"s", START}, + {"end", END}, + {"e", END}, + + {"jan", JAN}, + {"feb", FEB}, + {"mar", MAR}, + {"apr", APR}, + {"may", MAY}, + {"jun", JUN}, + {"jul", JUL}, + {"aug", AUG}, + {"sep", SEP}, + {"oct", OCT}, + {"nov", NOV}, + {"dec", DEC}, + {"january", JAN}, + {"february", FEB}, + {"march", MAR}, + {"april", APR}, + {"may", MAY}, + {"june", JUN}, + {"july", JUL}, + {"august", AUG}, + {"september", SEP}, + {"october", OCT}, + {"november", NOV}, + {"december", DEC}, + {"sunday", SUN}, + {"sun", SUN}, + {"monday", MON}, + {"mon", MON}, + {"tuesday", TUE}, + {"tue", TUE}, + {"wednesday", WED}, + {"wed", WED}, + {"thursday", THU}, + {"thu", THU}, + {"friday", FRI}, + {"fri", FRI}, + {"saturday", SAT}, + {"sat", SAT}, + {NULL, 0} /*** SENTINEL ***/ }; static struct SpecialToken TimeMultipliers[] = { - { "second", SECONDS }, /* seconds multiplier */ - { "seconds", SECONDS }, /* (pluralized) */ - { "sec", SECONDS }, /* (generic) */ - { "s", SECONDS }, /* (short generic) */ - { "minute", MINUTES }, /* minutes multiplier */ - { "minutes", MINUTES }, /* (pluralized) */ - { "min", MINUTES }, /* (generic) */ - { "m", MONTHS_MINUTES }, /* (short generic) */ - { "hour", HOURS }, /* hours ... */ - { "hours", HOURS }, /* (pluralized) */ - { "hr", HOURS }, /* (generic) */ - { "h", HOURS }, /* (short generic) */ - { "day", DAYS }, /* days ... */ - { "days", DAYS }, /* (pluralized) */ - { "d", DAYS }, /* (short generic) */ - { "week", WEEKS }, /* week ... */ - { "weeks", WEEKS }, /* (pluralized) */ - { "wk", WEEKS }, /* (generic) */ - { "w", WEEKS }, /* (short generic) */ - { "month", MONTHS }, /* week ... */ - { "months", MONTHS }, /* (pluralized) */ - { "mon", MONTHS }, /* (generic) */ - { "year", YEARS }, /* year ... */ - { "years", YEARS }, /* (pluralized) */ - { "yr", YEARS }, /* (generic) */ - { "y", YEARS }, /* (short generic) */ - { NULL, 0 } /*** SENTINEL ***/ + {"second", SECONDS}, /* seconds multiplier */ + {"seconds", SECONDS}, /* (pluralized) */ + {"sec", SECONDS}, /* (generic) */ + {"s", SECONDS}, /* (short generic) */ + {"minute", MINUTES}, /* minutes multiplier */ + {"minutes", MINUTES}, /* (pluralized) */ + {"min", MINUTES}, /* (generic) */ + {"m", MONTHS_MINUTES}, /* (short generic) */ + {"hour", HOURS}, /* hours ... */ + {"hours", HOURS}, /* (pluralized) */ + {"hr", HOURS}, /* (generic) */ + {"h", HOURS}, /* (short generic) */ + {"day", DAYS}, /* days ... */ + {"days", DAYS}, /* (pluralized) */ + {"d", DAYS}, /* (short generic) */ + {"week", WEEKS}, /* week ... */ + {"weeks", WEEKS}, /* (pluralized) */ + {"wk", WEEKS}, /* (generic) */ + {"w", WEEKS}, /* (short generic) */ + {"month", MONTHS}, /* week ... */ + {"months", MONTHS}, /* (pluralized) */ + {"mon", MONTHS}, /* (generic) */ + {"year", YEARS}, /* year ... */ + {"years", YEARS}, /* (pluralized) */ + {"yr", YEARS}, /* (generic) */ + {"y", YEARS}, /* (short generic) */ + {NULL, 0} /*** SENTINEL ***/ }; /* File scope variables */ @@ -234,24 +234,25 @@ static struct SpecialToken TimeMultipliers[] = { */ static struct SpecialToken *Specials; -static const char **scp; /* scanner - pointer at arglist */ -static char scc; /* scanner - count of remaining arguments */ -static const char *sct; /* scanner - next char pointer in current argument */ -static int need; /* scanner - need to advance to next argument */ +static const char **scp; /* scanner - pointer at arglist */ +static char scc; /* scanner - count of remaining arguments */ +static const char *sct; /* scanner - next char pointer in current argument */ +static int need; /* scanner - need to advance to next argument */ -static char *sc_token=NULL; /* scanner - token buffer */ +static char *sc_token = NULL; /* scanner - token buffer */ static size_t sc_len; /* scanner - length of token buffer */ -static int sc_tokid; /* scanner - token id */ +static int sc_tokid; /* scanner - token id */ /* Local functions */ -static void EnsureMemFree (void); +static void EnsureMemFree( + void); -static void EnsureMemFree (void) +static void EnsureMemFree( + void) { - if( sc_token ) - { - free(sc_token); - sc_token = NULL; + if (sc_token) { + free(sc_token); + sc_token = NULL; } } @@ -293,178 +294,189 @@ static void EnsureMemFree (void) * the most appropriate use for these is inside panic(...) */ #define MAX_ERR_MSG_LEN 1024 -static char errmsg[ MAX_ERR_MSG_LEN ]; +static char errmsg[MAX_ERR_MSG_LEN]; -static char * -ve ( char *fmt, va_list ap ) +static char *ve( + char *fmt, + va_list ap) { #ifdef HAVE_VSNPRINTF - vsnprintf( errmsg, MAX_ERR_MSG_LEN, fmt, ap ); + vsnprintf(errmsg, MAX_ERR_MSG_LEN, fmt, ap); #else - vsprintf( errmsg, fmt, ap ); + vsprintf(errmsg, fmt, ap); #endif - EnsureMemFree(); - return( errmsg ); + EnsureMemFree(); + return (errmsg); } -static char * -e ( char *fmt, ... ) +static char *e( + char *fmt, + ...) { - char *err; - va_list ap; - va_start( ap, fmt ); - err = ve( fmt, ap ); - va_end( ap ); - return( err ); + char *err; + va_list ap; + + va_start(ap, fmt); + err = ve(fmt, ap); + va_end(ap); + return (err); } /* Compare S1 and S2, ignoring case, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. -- copied from GNU libc*/ -static int -mystrcasecmp (s1, s2) - const char *s1; - const char *s2; +static int mystrcasecmp( + s1, + s2) + const char *s1; + const char *s2; { - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; + const unsigned char *p1 = (const unsigned char *) s1; + const unsigned char *p2 = (const unsigned char *) s2; + unsigned char c1, c2; - if (p1 == p2) - return 0; + if (p1 == p2) + return 0; - do - { - c1 = tolower (*p1++); - c2 = tolower (*p2++); - if (c1 == '\0') - break; + do { + c1 = tolower(*p1++); + c2 = tolower(*p2++); + if (c1 == '\0') + break; } - while (c1 == c2); + while (c1 == c2); - return c1 - c2; + return c1 - c2; } /* * parse a token, checking if it's something special to us */ -static int -parse_token(char *arg) +static int parse_token( + char *arg) { - int i; + int i; - for (i=0; Specials[i].name != NULL; i++) - if (mystrcasecmp(Specials[i].name, arg) == 0) - return sc_tokid = Specials[i].value; + for (i = 0; Specials[i].name != NULL; i++) + if (mystrcasecmp(Specials[i].name, arg) == 0) + return sc_tokid = Specials[i].value; /* not special - must be some random id */ return sc_tokid = ID; -} /* parse_token */ +} /* parse_token */ /* * init_scanner() sets up the scanner to eat arguments */ -static char * -init_scanner(int argc, const char **argv) +static char *init_scanner( + int argc, + const char **argv) { scp = argv; scc = argc; need = 1; sc_len = 1; while (argc-- > 0) - sc_len += strlen(*argv++); + sc_len += strlen(*argv++); - sc_token = (char *) malloc(sc_len*sizeof(char)); - if( sc_token == NULL ) - return "Failed to allocate memory"; + sc_token = (char *) malloc(sc_len * sizeof(char)); + if (sc_token == NULL) + return "Failed to allocate memory"; return TIME_OK; -} /* init_scanner */ +} /* init_scanner */ /* * token() fetches a token from the input stream */ -static int -token() +static int token( + ) { - int idx; + int idx; while (1) { - memset(sc_token, '\0', sc_len); - sc_tokid = EOF; - idx = 0; - - /* if we need to read another argument, walk along the argument list; - * when we fall off the arglist, we'll just return EOF forever - */ - if (need) { - if (scc < 1) - return sc_tokid; - sct = *scp; - scp++; - scc--; - need = 0; - } - /* eat whitespace now - if we walk off the end of the argument, - * we'll continue, which puts us up at the top of the while loop - * to fetch the next argument in - */ - while (isspace((unsigned char)*sct) || *sct == '_' || *sct == ',' ) - ++sct; - if (!*sct) { - need = 1; - continue; - } - - /* preserve the first character of the new token - */ - sc_token[0] = *sct++; - - /* then see what it is - */ - if (isdigit((unsigned char)(sc_token[0]))) { - while (isdigit((unsigned char)(*sct))) - sc_token[++idx] = *sct++; - sc_token[++idx] = '\0'; - return sc_tokid = NUMBER; - } - else if (isalpha((unsigned char)(sc_token[0]))) { - while (isalpha((unsigned char)(*sct))) - sc_token[++idx] = *sct++; - sc_token[++idx] = '\0'; - return parse_token(sc_token); - } - else switch(sc_token[0]) { - case ':': return sc_tokid = COLON; - case '.': return sc_tokid = DOT; - case '+': return sc_tokid = PLUS; - case '-': return sc_tokid = MINUS; - case '/': return sc_tokid = SLASH; - default: - /*OK, we did not make it ... */ - sct--; - return sc_tokid = EOF; - } - } /* while (1) */ -} /* token */ + memset(sc_token, '\0', sc_len); + sc_tokid = EOF; + idx = 0; + + /* if we need to read another argument, walk along the argument list; + * when we fall off the arglist, we'll just return EOF forever + */ + if (need) { + if (scc < 1) + return sc_tokid; + sct = *scp; + scp++; + scc--; + need = 0; + } + /* eat whitespace now - if we walk off the end of the argument, + * we'll continue, which puts us up at the top of the while loop + * to fetch the next argument in + */ + while (isspace((unsigned char) *sct) || *sct == '_' || *sct == ',') + ++sct; + if (!*sct) { + need = 1; + continue; + } + + /* preserve the first character of the new token + */ + sc_token[0] = *sct++; + + /* then see what it is + */ + if (isdigit((unsigned char) (sc_token[0]))) { + while (isdigit((unsigned char) (*sct))) + sc_token[++idx] = *sct++; + sc_token[++idx] = '\0'; + return sc_tokid = NUMBER; + } else if (isalpha((unsigned char) (sc_token[0]))) { + while (isalpha((unsigned char) (*sct))) + sc_token[++idx] = *sct++; + sc_token[++idx] = '\0'; + return parse_token(sc_token); + } else + switch (sc_token[0]) { + case ':': + return sc_tokid = COLON; + case '.': + return sc_tokid = DOT; + case '+': + return sc_tokid = PLUS; + case '-': + return sc_tokid = MINUS; + case '/': + return sc_tokid = SLASH; + default: + /*OK, we did not make it ... */ + sct--; + return sc_tokid = EOF; + } + } /* while (1) */ +} /* token */ /* * expect2() gets a token and complains if it's not the token we want */ -static char * -expect2(int desired, char *complain_fmt, ...) +static char *expect2( + int desired, + char *complain_fmt, + ...) { - va_list ap; - va_start( ap, complain_fmt ); + va_list ap; + + va_start(ap, complain_fmt); if (token() != desired) { - panic(ve( complain_fmt, ap )); + panic(ve(complain_fmt, ap)); } - va_end( ap ); + va_end(ap); return TIME_OK; - -} /* expect2 */ + +} /* expect2 */ /* @@ -472,303 +484,327 @@ expect2(int desired, char *complain_fmt, ...) * for the OFFSET-SPEC. * It also applies those m-guessing heuristics. */ -static char * -plus_minus(struct rrd_time_value *ptv, int doop) +static char *plus_minus( + struct rrd_time_value *ptv, + int doop) { static int op = PLUS; static int prev_multiplier = -1; - int delta; - - if( doop >= 0 ) - { - op = doop; - try(expect2(NUMBER,"There should be number after '%c'", op == PLUS ? '+' : '-')); - prev_multiplier = -1; /* reset months-minutes guessing mechanics */ - } + int delta; + + if (doop >= 0) { + op = doop; + try(expect2 + (NUMBER, "There should be number after '%c'", + op == PLUS ? '+' : '-')); + prev_multiplier = -1; /* reset months-minutes guessing mechanics */ + } /* if doop is < 0 then we repeat the previous op * with the prefetched number */ delta = atoi(sc_token); - if( token() == MONTHS_MINUTES ) - { - /* hard job to guess what does that -5m means: -5mon or -5min? */ - switch(prev_multiplier) - { + if (token() == MONTHS_MINUTES) { + /* hard job to guess what does that -5m means: -5mon or -5min? */ + switch (prev_multiplier) { case DAYS: case WEEKS: case MONTHS: case YEARS: - sc_tokid = MONTHS; - break; + sc_tokid = MONTHS; + break; case SECONDS: case MINUTES: case HOURS: - sc_tokid = MINUTES; - break; + sc_tokid = MINUTES; + break; default: - if( delta < 6 ) /* it may be some other value but in the context - * of RRD who needs less than 6 min deltas? */ - sc_tokid = MONTHS; - else - sc_tokid = MINUTES; + if (delta < 6) /* it may be some other value but in the context + * of RRD who needs less than 6 min deltas? */ + sc_tokid = MONTHS; + else + sc_tokid = MINUTES; } - } + } prev_multiplier = sc_tokid; switch (sc_tokid) { case YEARS: - ptv->tm.tm_year += (op == PLUS) ? delta : -delta; - return TIME_OK; + ptv->tm.tm_year += (op == PLUS) ? delta : -delta; + return TIME_OK; case MONTHS: - ptv->tm.tm_mon += (op == PLUS) ? delta : -delta; - return TIME_OK; + ptv->tm.tm_mon += (op == PLUS) ? delta : -delta; + return TIME_OK; case WEEKS: - delta *= 7; - /* FALLTHRU */ + delta *= 7; + /* FALLTHRU */ case DAYS: - ptv->tm.tm_mday += (op == PLUS) ? delta : -delta; - return TIME_OK; + ptv->tm.tm_mday += (op == PLUS) ? delta : -delta; + return TIME_OK; case HOURS: - ptv->offset += (op == PLUS) ? delta*60*60 : -delta*60*60; - return TIME_OK; + ptv->offset += (op == PLUS) ? delta * 60 * 60 : -delta * 60 * 60; + return TIME_OK; case MINUTES: - ptv->offset += (op == PLUS) ? delta*60 : -delta*60; - return TIME_OK; + ptv->offset += (op == PLUS) ? delta * 60 : -delta * 60; + return TIME_OK; case SECONDS: - ptv->offset += (op == PLUS) ? delta : -delta; - return TIME_OK; - default: /*default unit is seconds */ - ptv->offset += (op == PLUS) ? delta : -delta; - return TIME_OK; + ptv->offset += (op == PLUS) ? delta : -delta; + return TIME_OK; + default: /*default unit is seconds */ + ptv->offset += (op == PLUS) ? delta : -delta; + return TIME_OK; } panic(e("well-known time unit expected after %d", delta)); /* NORETURN */ - return TIME_OK; /* to make compiler happy :) */ -} /* plus_minus */ + return TIME_OK; /* to make compiler happy :) */ +} /* plus_minus */ /* * tod() computes the time of day (TIME-OF-DAY-SPEC) */ -static char * -tod(struct rrd_time_value *ptv) +static char *tod( + struct rrd_time_value *ptv) { - int hour, minute = 0; - int tlen; + int hour, minute = 0; + int tlen; + /* save token status in case we must abort */ - int scc_sv = scc; - const char *sct_sv = sct; - int sc_tokid_sv = sc_tokid; + int scc_sv = scc; + const char *sct_sv = sct; + int sc_tokid_sv = sc_tokid; tlen = strlen(sc_token); - + /* first pick out the time of day - we assume a HH (COLON|DOT) MM time - */ + */ if (tlen > 2) { - return TIME_OK; + return TIME_OK; } - + hour = atoi(sc_token); token(); if (sc_tokid == SLASH || sc_tokid == DOT) { - /* guess we are looking at a date */ - scc = scc_sv; - sct = sct_sv; - sc_tokid = sc_tokid_sv; - sprintf (sc_token,"%d", hour); - return TIME_OK; + /* guess we are looking at a date */ + scc = scc_sv; + sct = sct_sv; + sc_tokid = sc_tokid_sv; + sprintf(sc_token, "%d", hour); + return TIME_OK; } - if (sc_tokid == COLON ) { - try(expect2(NUMBER, - "Parsing HH:MM syntax, expecting MM as number, got none")); - minute = atoi(sc_token); - if (minute > 59) { - panic(e("parsing HH:MM syntax, got MM = %d (>59!)", minute )); - } - token(); + if (sc_tokid == COLON) { + try(expect2(NUMBER, + "Parsing HH:MM syntax, expecting MM as number, got none")); + minute = atoi(sc_token); + if (minute > 59) { + panic(e("parsing HH:MM syntax, got MM = %d (>59!)", minute)); + } + token(); } /* check if an AM or PM specifier was given */ if (sc_tokid == AM || sc_tokid == PM) { - if (hour > 12) { - panic(e("there cannot be more than 12 AM or PM hours")); - } - if (sc_tokid == PM) { - if (hour != 12) /* 12:xx PM is 12:xx, not 24:xx */ - hour += 12; - } else { - if (hour == 12) /* 12:xx AM is 00:xx, not 12:xx */ - hour = 0; - } - token(); - } - else if (hour > 23) { - /* guess it was not a time then ... */ - scc = scc_sv; - sct = sct_sv; - sc_tokid = sc_tokid_sv; - sprintf (sc_token,"%d", hour); - return TIME_OK; + if (hour > 12) { + panic(e("there cannot be more than 12 AM or PM hours")); + } + if (sc_tokid == PM) { + if (hour != 12) /* 12:xx PM is 12:xx, not 24:xx */ + hour += 12; + } else { + if (hour == 12) /* 12:xx AM is 00:xx, not 12:xx */ + hour = 0; + } + token(); + } else if (hour > 23) { + /* guess it was not a time then ... */ + scc = scc_sv; + sct = sct_sv; + sc_tokid = sc_tokid_sv; + sprintf(sc_token, "%d", hour); + return TIME_OK; } ptv->tm.tm_hour = hour; ptv->tm.tm_min = minute; ptv->tm.tm_sec = 0; if (ptv->tm.tm_hour == 24) { - ptv->tm.tm_hour = 0; - ptv->tm.tm_mday++; + ptv->tm.tm_hour = 0; + ptv->tm.tm_mday++; } - return TIME_OK; -} /* tod */ + return TIME_OK; +} /* tod */ /* * assign_date() assigns a date, adjusting year as appropriate */ -static char * -assign_date(struct rrd_time_value *ptv, long mday, long mon, long year) +static char *assign_date( + struct rrd_time_value *ptv, + long mday, + long mon, + long year) { if (year > 138) { - if (year > 1970) - year -= 1900; - else { - panic(e("invalid year %d (should be either 00-99 or >1900)", + if (year > 1970) + year -= 1900; + else { + panic(e("invalid year %d (should be either 00-99 or >1900)", year)); - } - } else if( year >= 0 && year < 38 ) { - year += 100; /* Allow year 2000-2037 to be specified as */ - } /* 00-37 until the problem of 2038 year will */ - /* arise for unices with 32-bit time_t :) */ + } + } else if (year >= 0 && year < 38) { + year += 100; /* Allow year 2000-2037 to be specified as */ + } + /* 00-37 until the problem of 2038 year will */ + /* arise for unices with 32-bit time_t :) */ if (year < 70) { - panic(e("won't handle dates before epoch (01/01/1970), sorry")); + panic(e("won't handle dates before epoch (01/01/1970), sorry")); } ptv->tm.tm_mday = mday; ptv->tm.tm_mon = mon; ptv->tm.tm_year = year; - return TIME_OK; -} /* assign_date */ + return TIME_OK; +} /* assign_date */ /* * day() picks apart DAY-SPEC-[12] */ -static char * -day(struct rrd_time_value *ptv) +static char *day( + struct rrd_time_value *ptv) { - /* using time_t seems to help portability with 64bit oses */ - time_t mday=0, wday, mon, year = ptv->tm.tm_year; - int tlen; + /* using time_t seems to help portability with 64bit oses */ + time_t mday = 0, wday, mon, year = ptv->tm.tm_year; + int tlen; switch (sc_tokid) { case YESTERDAY: - ptv->tm.tm_mday--; - /* FALLTRHU */ - case TODAY: /* force ourselves to stay in today - no further processing */ - token(); - break; + ptv->tm.tm_mday--; + /* FALLTRHU */ + case TODAY: /* force ourselves to stay in today - no further processing */ + token(); + break; case TOMORROW: - ptv->tm.tm_mday++; - token(); - break; - - case JAN: case FEB: case MAR: case APR: case MAY: case JUN: - case JUL: case AUG: case SEP: case OCT: case NOV: case DEC: - /* do month mday [year] - */ - mon = (sc_tokid-JAN); - try(expect2(NUMBER, - "the day of the month should follow month name")); - mday = atol(sc_token); - if (token() == NUMBER) { - year = atol(sc_token); - token(); - } - else - year = ptv->tm.tm_year; - try(assign_date(ptv, mday, mon, year)); - break; - - case SUN: case MON: case TUE: - case WED: case THU: case FRI: + ptv->tm.tm_mday++; + token(); + break; + + case JAN: + case FEB: + case MAR: + case APR: + case MAY: + case JUN: + case JUL: + case AUG: + case SEP: + case OCT: + case NOV: + case DEC: + /* do month mday [year] + */ + mon = (sc_tokid - JAN); + try(expect2(NUMBER, "the day of the month should follow month name")); + mday = atol(sc_token); + if (token() == NUMBER) { + year = atol(sc_token); + token(); + } else + year = ptv->tm.tm_year; + try(assign_date(ptv, mday, mon, year)); + break; + + case SUN: + case MON: + case TUE: + case WED: + case THU: + case FRI: case SAT: - /* do a particular day of the week - */ - wday = (sc_tokid-SUN); - ptv->tm.tm_mday += (wday - ptv->tm.tm_wday); + /* do a particular day of the week + */ + wday = (sc_tokid - SUN); + ptv->tm.tm_mday += (wday - ptv->tm.tm_wday); + token(); + break; + /* + mday = ptv->tm.tm_mday; + mday += (wday - ptv->tm.tm_wday); + ptv->tm.tm_wday = wday; + + try(assign_date(ptv, mday, ptv->tm.tm_mon, ptv->tm.tm_year)); + break; + */ + + case NUMBER: + /* get numeric , MM/DD/[YY]YY, or DD.MM.[YY]YY + */ + tlen = strlen(sc_token); + mon = atol(sc_token); + if (mon > 10 * 365 * 24 * 60 * 60) { + ptv->tm = *localtime(&mon); + token(); + break; + } + + if (mon > 19700101 && mon < 24000101) { /*works between 1900 and 2400 */ + char cmon[3], cmday[3], cyear[5]; + + strncpy(cyear, sc_token, 4); + cyear[4] = '\0'; + year = atol(cyear); + strncpy(cmon, &(sc_token[4]), 2); + cmon[2] = '\0'; + mon = atol(cmon); + strncpy(cmday, &(sc_token[6]), 2); + cmday[2] = '\0'; + mday = atol(cmday); + token(); + } else { token(); - break; - /* - mday = ptv->tm.tm_mday; - mday += (wday - ptv->tm.tm_wday); - ptv->tm.tm_wday = wday; - try(assign_date(ptv, mday, ptv->tm.tm_mon, ptv->tm.tm_year)); - break; - */ + if (mon <= 31 && (sc_tokid == SLASH || sc_tokid == DOT)) { + int sep; + + sep = sc_tokid; + try(expect2(NUMBER, "there should be %s number after '%c'", + sep == DOT ? "month" : "day", + sep == DOT ? '.' : '/')); + mday = atol(sc_token); + if (token() == sep) { + try(expect2 + (NUMBER, "there should be year number after '%c'", + sep == DOT ? '.' : '/')); + year = atol(sc_token); + token(); + } + + /* flip months and days for European timing + */ + if (sep == DOT) { + long x = mday; + + mday = mon; + mon = x; + } + } + } - case NUMBER: - /* get numeric , MM/DD/[YY]YY, or DD.MM.[YY]YY - */ - tlen = strlen(sc_token); - mon = atol(sc_token); - if (mon > 10*365*24*60*60) { - ptv->tm=*localtime(&mon); - token(); - break; - } - - if (mon > 19700101 && mon < 24000101){ /*works between 1900 and 2400 */ - char cmon[3],cmday[3],cyear[5]; - strncpy(cyear,sc_token,4);cyear[4]='\0'; - year = atol(cyear); - strncpy(cmon,&(sc_token[4]),2);cmon[2]='\0'; - mon = atol(cmon); - strncpy(cmday,&(sc_token[6]),2);cmday[2]='\0'; - mday = atol(cmday); - token(); - } else { - token(); - - if (mon <= 31 && (sc_tokid == SLASH || sc_tokid == DOT)) { - int sep; - sep = sc_tokid; - try(expect2(NUMBER,"there should be %s number after '%c'", - sep == DOT ? "month" : "day", sep == DOT ? '.' : '/')); - mday = atol(sc_token); - if (token() == sep) { - try(expect2(NUMBER,"there should be year number after '%c'", - sep == DOT ? '.' : '/')); - year = atol(sc_token); - token(); - } - - /* flip months and days for European timing - */ - if (sep == DOT) { - long x = mday; - mday = mon; - mon = x; - } - } - } - - mon--; - if(mon < 0 || mon > 11 ) { - panic(e("did you really mean month %d?", mon+1)); - } - if(mday < 1 || mday > 31) { - panic(e("I'm afraid that %d is not a valid day of the month", - mday)); - } - try(assign_date(ptv, mday, mon, year)); - break; - } /* case */ + mon--; + if (mon < 0 || mon > 11) { + panic(e("did you really mean month %d?", mon + 1)); + } + if (mday < 1 || mday > 31) { + panic(e("I'm afraid that %d is not a valid day of the month", + mday)); + } + try(assign_date(ptv, mday, mon, year)); + break; + } /* case */ return TIME_OK; -} /* month */ +} /* month */ /* Global functions */ @@ -783,199 +819,209 @@ day(struct rrd_time_value *ptv) * mktime() The return value is either TIME_OK (aka NULL) or * the pointer to the error message in the case of problems */ -char * -parsetime(const char *tspec, struct rrd_time_value *ptv) +char *parsetime( + const char *tspec, + struct rrd_time_value *ptv) { - time_t now = time(NULL); - int hr = 0; + time_t now = time(NULL); + int hr = 0; + /* this MUST be initialized to zero for midnight/noon/teatime */ - Specials = VariousWords; /* initialize special words context */ + Specials = VariousWords; /* initialize special words context */ - try(init_scanner( 1, &tspec )); + try(init_scanner(1, &tspec)); /* establish the default time reference */ ptv->type = ABSOLUTE_TIME; ptv->offset = 0; ptv->tm = *localtime(&now); - ptv->tm.tm_isdst = -1; /* mk time can figure this out for us ... */ + ptv->tm.tm_isdst = -1; /* mk time can figure this out for us ... */ token(); switch (sc_tokid) { case PLUS: case MINUS: - break; /* jump to OFFSET-SPEC part */ + break; /* jump to OFFSET-SPEC part */ case START: - ptv->type = RELATIVE_TO_START_TIME; - goto KeepItRelative; + ptv->type = RELATIVE_TO_START_TIME; + goto KeepItRelative; case END: - ptv->type = RELATIVE_TO_END_TIME; - KeepItRelative: - ptv->tm.tm_sec = 0; - ptv->tm.tm_min = 0; - ptv->tm.tm_hour = 0; - ptv->tm.tm_mday = 0; - ptv->tm.tm_mon = 0; - ptv->tm.tm_year = 0; - /* FALLTHRU */ + ptv->type = RELATIVE_TO_END_TIME; + KeepItRelative: + ptv->tm.tm_sec = 0; + ptv->tm.tm_min = 0; + ptv->tm.tm_hour = 0; + ptv->tm.tm_mday = 0; + ptv->tm.tm_mon = 0; + ptv->tm.tm_year = 0; + /* FALLTHRU */ case NOW: - { - int time_reference = sc_tokid; - token(); - if( sc_tokid == PLUS || sc_tokid == MINUS ) - break; - if( time_reference != NOW ) { - panic(e("'start' or 'end' MUST be followed by +|- offset")); - } - else - if( sc_tokid != EOF ) { - panic(e("if 'now' is followed by a token it must be +|- offset")); - } - }; - break; - - /* Only absolute time specifications below */ + { + int time_reference = sc_tokid; + + token(); + if (sc_tokid == PLUS || sc_tokid == MINUS) + break; + if (time_reference != NOW) { + panic(e("'start' or 'end' MUST be followed by +|- offset")); + } else if (sc_tokid != EOF) { + panic(e("if 'now' is followed by a token it must be +|- offset")); + } + }; + break; + + /* Only absolute time specifications below */ case NUMBER: - { - long hour_sv = ptv->tm.tm_hour; - long year_sv = ptv->tm.tm_year; - ptv->tm.tm_hour = 30; - ptv->tm.tm_year = 30000; - try(tod(ptv)) - try(day(ptv)) - if ( ptv->tm.tm_hour == 30 && ptv->tm.tm_year != 30000 ){ - try(tod(ptv)) - } - if ( ptv->tm.tm_hour == 30 ){ - ptv->tm.tm_hour = hour_sv; - } - if ( ptv->tm.tm_year == 30000 ){ - ptv->tm.tm_year = year_sv; - } - }; + { + long hour_sv = ptv->tm.tm_hour; + long year_sv = ptv->tm.tm_year; + + ptv->tm.tm_hour = 30; + ptv->tm.tm_year = 30000; + try(tod(ptv)) + try(day(ptv)) + if (ptv->tm.tm_hour == 30 && ptv->tm.tm_year != 30000) { + try(tod(ptv)) + } + if (ptv->tm.tm_hour == 30) { + ptv->tm.tm_hour = hour_sv; + } + if (ptv->tm.tm_year == 30000) { + ptv->tm.tm_year = year_sv; + } + }; + break; + /* fix month parsing */ + case JAN: + case FEB: + case MAR: + case APR: + case MAY: + case JUN: + case JUL: + case AUG: + case SEP: + case OCT: + case NOV: + case DEC: + try(day(ptv)); + if (sc_tokid != NUMBER) + break; + try(tod(ptv)) break; - /* fix month parsing */ - case JAN: case FEB: case MAR: case APR: case MAY: case JUN: - case JUL: case AUG: case SEP: case OCT: case NOV: case DEC: - try(day(ptv)); - if (sc_tokid != NUMBER) break; - try(tod(ptv)) - break; - - /* evil coding for TEATIME|NOON|MIDNIGHT - we've initialized - * hr to zero up above, then fall into this case in such a - * way so we add +12 +4 hours to it for teatime, +12 hours - * to it for noon, and nothing at all for midnight, then - * set our rettime to that hour before leaping into the - * month scanner - */ + + /* evil coding for TEATIME|NOON|MIDNIGHT - we've initialized + * hr to zero up above, then fall into this case in such a + * way so we add +12 +4 hours to it for teatime, +12 hours + * to it for noon, and nothing at all for midnight, then + * set our rettime to that hour before leaping into the + * month scanner + */ case TEATIME: - hr += 4; - /* FALLTHRU */ + hr += 4; + /* FALLTHRU */ case NOON: - hr += 12; - /* FALLTHRU */ + hr += 12; + /* FALLTHRU */ case MIDNIGHT: - /* if (ptv->tm.tm_hour >= hr) { - ptv->tm.tm_mday++; - ptv->tm.tm_wday++; - } */ /* shifting does not makes sense here ... noon is noon */ - ptv->tm.tm_hour = hr; - ptv->tm.tm_min = 0; - ptv->tm.tm_sec = 0; - token(); - try(day(ptv)); - break; + /* if (ptv->tm.tm_hour >= hr) { + ptv->tm.tm_mday++; + ptv->tm.tm_wday++; + } *//* shifting does not makes sense here ... noon is noon */ + ptv->tm.tm_hour = hr; + ptv->tm.tm_min = 0; + ptv->tm.tm_sec = 0; + token(); + try(day(ptv)); + break; default: - panic(e("unparsable time: %s%s",sc_token,sct)); - break; - } /* ugly case statement */ + panic(e("unparsable time: %s%s", sc_token, sct)); + break; + } /* ugly case statement */ /* * the OFFSET-SPEC part * * (NOTE, the sc_tokid was prefetched for us by the previous code) */ - if( sc_tokid == PLUS || sc_tokid == MINUS ) { - Specials = TimeMultipliers; /* switch special words context */ - while( sc_tokid == PLUS || sc_tokid == MINUS || - sc_tokid == NUMBER ) { - if( sc_tokid == NUMBER ) { - try(plus_minus(ptv, PREVIOUS_OP )); - } else - try(plus_minus(ptv, sc_tokid)); - token(); /* We will get EOF eventually but that's OK, since - token() will return us as many EOFs as needed */ - } + if (sc_tokid == PLUS || sc_tokid == MINUS) { + Specials = TimeMultipliers; /* switch special words context */ + while (sc_tokid == PLUS || sc_tokid == MINUS || sc_tokid == NUMBER) { + if (sc_tokid == NUMBER) { + try(plus_minus(ptv, PREVIOUS_OP)); + } else + try(plus_minus(ptv, sc_tokid)); + token(); /* We will get EOF eventually but that's OK, since + token() will return us as many EOFs as needed */ + } } /* now we should be at EOF */ - if( sc_tokid != EOF ) { - panic(e("unparsable trailing text: '...%s%s'", sc_token, sct)); + if (sc_tokid != EOF) { + panic(e("unparsable trailing text: '...%s%s'", sc_token, sct)); } - ptv->tm.tm_isdst = -1; /* for mktime to guess DST status */ - if( ptv->type == ABSOLUTE_TIME ) - if( mktime( &ptv->tm ) == -1 ) { /* normalize & check */ - /* can happen for "nonexistent" times, e.g. around 3am */ - /* when winter -> summer time correction eats a hour */ - panic(e("the specified time is incorrect (out of range?)")); - } + ptv->tm.tm_isdst = -1; /* for mktime to guess DST status */ + if (ptv->type == ABSOLUTE_TIME) + if (mktime(&ptv->tm) == -1) { /* normalize & check */ + /* can happen for "nonexistent" times, e.g. around 3am */ + /* when winter -> summer time correction eats a hour */ + panic(e("the specified time is incorrect (out of range?)")); + } EnsureMemFree(); return TIME_OK; -} /* parsetime */ - - -int proc_start_end (struct rrd_time_value *start_tv, - struct rrd_time_value *end_tv, - time_t *start, - time_t *end){ - if (start_tv->type == RELATIVE_TO_END_TIME && /* same as the line above */ - end_tv->type == RELATIVE_TO_START_TIME) { - rrd_set_error("the start and end times cannot be specified " - "relative to each other"); - return -1; +} /* parsetime */ + + +int proc_start_end( + struct rrd_time_value *start_tv, + struct rrd_time_value *end_tv, + time_t *start, + time_t *end) +{ + if (start_tv->type == RELATIVE_TO_END_TIME && /* same as the line above */ + end_tv->type == RELATIVE_TO_START_TIME) { + rrd_set_error("the start and end times cannot be specified " + "relative to each other"); + return -1; } if (start_tv->type == RELATIVE_TO_START_TIME) { - rrd_set_error("the start time cannot be specified relative to itself"); - return -1; + rrd_set_error + ("the start time cannot be specified relative to itself"); + return -1; } if (end_tv->type == RELATIVE_TO_END_TIME) { - rrd_set_error("the end time cannot be specified relative to itself"); - return -1; + rrd_set_error("the end time cannot be specified relative to itself"); + return -1; } - if( start_tv->type == RELATIVE_TO_END_TIME) { - struct tm tmtmp; - *end = mktime(&(end_tv->tm)) + end_tv->offset; - tmtmp = *localtime(end); /* reinit end including offset */ - tmtmp.tm_mday += start_tv->tm.tm_mday; - tmtmp.tm_mon += start_tv->tm.tm_mon; - tmtmp.tm_year += start_tv->tm.tm_year; - *start = mktime(&tmtmp) + start_tv->offset; + if (start_tv->type == RELATIVE_TO_END_TIME) { + struct tm tmtmp; + + *end = mktime(&(end_tv->tm)) + end_tv->offset; + tmtmp = *localtime(end); /* reinit end including offset */ + tmtmp.tm_mday += start_tv->tm.tm_mday; + tmtmp.tm_mon += start_tv->tm.tm_mon; + tmtmp.tm_year += start_tv->tm.tm_year; + *start = mktime(&tmtmp) + start_tv->offset; } else { - *start = mktime(&(start_tv->tm)) + start_tv->offset; + *start = mktime(&(start_tv->tm)) + start_tv->offset; } if (end_tv->type == RELATIVE_TO_START_TIME) { - struct tm tmtmp; - *start = mktime(&(start_tv->tm)) + start_tv->offset; - tmtmp = *localtime(start); - tmtmp.tm_mday += end_tv->tm.tm_mday; - tmtmp.tm_mon += end_tv->tm.tm_mon; - tmtmp.tm_year += end_tv->tm.tm_year; - *end = mktime(&tmtmp) + end_tv->offset; + struct tm tmtmp; + + *start = mktime(&(start_tv->tm)) + start_tv->offset; + tmtmp = *localtime(start); + tmtmp.tm_mday += end_tv->tm.tm_mday; + tmtmp.tm_mon += end_tv->tm.tm_mon; + tmtmp.tm_year += end_tv->tm.tm_year; + *end = mktime(&tmtmp) + end_tv->offset; } else { - *end = mktime(&(end_tv->tm)) + end_tv->offset; - } + *end = mktime(&(end_tv->tm)) + end_tv->offset; + } return 0; -} /* proc_start_end */ - - - - - - - +} /* proc_start_end */ diff --git a/src/pngsize.c b/src/pngsize.c index 78d0950..18e89c5 100644 --- a/src/pngsize.c +++ b/src/pngsize.c @@ -7,20 +7,22 @@ #include #include "rrd_tool.h" -int -PngSize(FILE *fd, long *width, long *height) +int PngSize( + FILE * fd, + long *width, + long *height) { - png_structp png_read_ptr = - png_create_read_struct(PNG_LIBPNG_VER_STRING, - (png_voidp)NULL, - /* we would need to point to error handlers - here to do it properly */ - (png_error_ptr)NULL, (png_error_ptr)NULL); - - png_infop info_ptr = png_create_info_struct(png_read_ptr); - - (*width)=0; - (*height)=0; + png_structp png_read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + (png_voidp) NULL, + /* we would need to point to error handlers + here to do it properly */ + (png_error_ptr) NULL, + (png_error_ptr) NULL); + + png_infop info_ptr = png_create_info_struct(png_read_ptr); + + (*width) = 0; + (*height) = 0; /* this is to make compile on aix work since they seem to define jmpbuf to be _jmpbuf which breaks compilation */ @@ -29,22 +31,19 @@ PngSize(FILE *fd, long *width, long *height) #undef jmpbuf #endif - if (setjmp(png_read_ptr->jmpbuf)){ - png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL); - return 0; - } - - png_init_io(png_read_ptr,fd); - png_read_info(png_read_ptr, info_ptr); - (*width)=png_get_image_width(png_read_ptr, info_ptr); - (*height)=png_get_image_height(png_read_ptr, info_ptr); - - png_destroy_read_struct(&png_read_ptr, &info_ptr, NULL); - if (*width >0 && *height >0) - return 1; - else - return 0; + if (setjmp(png_read_ptr->jmpbuf)) { + png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL); + return 0; + } + + png_init_io(png_read_ptr, fd); + png_read_info(png_read_ptr, info_ptr); + (*width) = png_get_image_width(png_read_ptr, info_ptr); + (*height) = png_get_image_height(png_read_ptr, info_ptr); + + png_destroy_read_struct(&png_read_ptr, &info_ptr, NULL); + if (*width > 0 && *height > 0) + return 1; + else + return 0; } - - - diff --git a/src/rrd.h b/src/rrd.h index ce712d5..1b79af3 100644 --- a/src/rrd.h +++ b/src/rrd.h @@ -46,117 +46,186 @@ * *****************************************************************************/ #ifdef __cplusplus -extern "C" { +extern "C" { #endif #ifndef _RRDLIB_H #define _RRDLIB_H -#include /* for off_t */ -#include /* for off_t */ +#include /* for off_t */ +#include /* for off_t */ #include -#include /* for FILE */ +#include /* for FILE */ /* Transplanted from rrd_format.h */ -typedef double rrd_value_t; /* the data storage type is - * double */ + typedef double rrd_value_t; /* the data storage type is + * double */ /* END rrd_format.h */ /* information about an rrd file */ -typedef struct rrd_file_t { - int fd; /* file descriptor if this rrd file */ - char* file_start; /* start address of an open rrd file */ - off_t header_len; /* length of the header of this rrd file */ - off_t file_len; /* total size of the rrd file */ - off_t pos; /* current pos in file */ -} rrd_file_t; + typedef struct rrd_file_t { + int fd; /* file descriptor if this rrd file */ + char *file_start; /* start address of an open rrd file */ + off_t header_len; /* length of the header of this rrd file */ + off_t file_len; /* total size of the rrd file */ + off_t pos; /* current pos in file */ + } rrd_file_t; /* main function blocks */ -int rrd_create(int, char **); -int rrd_update(int, char **); -int rrd_graph(int, char **, char ***, int *, int *, FILE *, double *, double *); -int rrd_fetch(int, char **, time_t *, time_t *, unsigned long *, - unsigned long *, char ***, rrd_value_t **); -int rrd_restore(int, char **); -int rrd_dump(int, char **); -int rrd_tune(int, char **); -time_t rrd_last(int, char **); -time_t rrd_first(int, char **); -int rrd_resize(int, char **); -char * rrd_strversion(void); -double rrd_version(void); -int rrd_xport(int, char **, int *, time_t *, time_t *, - unsigned long *, unsigned long *, - char ***, rrd_value_t **); + int rrd_create( + int, + char **); + int rrd_update( + int, + char **); + int rrd_graph( + int, + char **, + char ***, + int *, + int *, + FILE *, + double *, + double *); + int rrd_fetch( + int, + char **, + time_t *, + time_t *, + unsigned long *, + unsigned long *, + char ***, + rrd_value_t **); + int rrd_restore( + int, + char **); + int rrd_dump( + int, + char **); + int rrd_tune( + int, + char **); + time_t rrd_last( + int, + char **); + time_t rrd_first( + int, + char **); + int rrd_resize( + int, + char **); + char *rrd_strversion( + void); + double rrd_version( + void); + int rrd_xport( + int, + char **, + int *, + time_t *, + time_t *, + unsigned long *, + unsigned long *, + char ***, + rrd_value_t **); /* thread-safe (hopefully) */ -int rrd_create_r(const char *filename, - unsigned long pdp_step, time_t last_up, - int argc, const char **argv); + int rrd_create_r( + const char *filename, + unsigned long pdp_step, + time_t last_up, + int argc, + const char **argv); /* NOTE: rrd_update_r are only thread-safe if no at-style time specifications get used!!! */ -int rrd_update_r(const char *filename, const char *_template, - int argc, const char **argv); -int rrd_fetch_r(const char *filename, const char* cf, - time_t *start, time_t *end, - unsigned long *step, - unsigned long *ds_cnt, - char ***ds_namv, - rrd_value_t **data); -int rrd_dump_r(const char *filename, char *outname); -time_t rrd_last_r(const char *filename); -time_t rrd_first_r(const char *filename, int rraindex); + int rrd_update_r( + const char *filename, + const char *_template, + int argc, + const char **argv); + int rrd_fetch_r( + const char *filename, + const char *cf, + time_t *start, + time_t *end, + unsigned long *step, + unsigned long *ds_cnt, + char ***ds_namv, + rrd_value_t ** data); + int rrd_dump_r( + const char *filename, + char *outname); + time_t rrd_last_r( + const char *filename); + time_t rrd_first_r( + const char *filename, + int rraindex); /* Transplanted from parsetime.h */ -typedef enum { + typedef enum { ABSOLUTE_TIME, - RELATIVE_TO_START_TIME, + RELATIVE_TO_START_TIME, RELATIVE_TO_END_TIME -} timetype; + } timetype; #define TIME_OK NULL -struct rrd_time_value { - timetype type; - long offset; - struct tm tm; -}; + struct rrd_time_value { + timetype type; + long offset; + struct tm tm; + }; -char *parsetime(const char *spec, struct rrd_time_value *ptv); + char *parsetime( + const char *spec, + struct rrd_time_value *ptv); /* END parsetime.h */ -struct rrd_context { - int len; - int errlen; - char *lib_errstr; - char *rrd_error; -}; + struct rrd_context { + int len; + int errlen; + char *lib_errstr; + char *rrd_error; + }; /* returns the current per-thread rrd_context */ -struct rrd_context *rrd_get_context(void); + struct rrd_context *rrd_get_context( + void); -int proc_start_end (struct rrd_time_value *, struct rrd_time_value *, time_t *, time_t *); + int proc_start_end( + struct rrd_time_value *, + struct rrd_time_value *, + time_t *, + time_t *); /* HELPER FUNCTIONS */ -void rrd_set_error(char *,...); -void rrd_clear_error(void); -int rrd_test_error(void); -char *rrd_get_error(void); + void rrd_set_error( + char *, + ...); + void rrd_clear_error( + void); + int rrd_test_error( + void); + char *rrd_get_error( + void); /** MULTITHREADED HELPER FUNCTIONS */ -struct rrd_context *rrd_new_context(void); -void rrd_free_context (struct rrd_context *buf); + struct rrd_context *rrd_new_context( + void); + void rrd_free_context( + struct rrd_context *buf); /* void rrd_set_error_r (struct rrd_context *, char *, ...); */ /* void rrd_clear_error_r(struct rrd_context *); */ /* int rrd_test_error_r (struct rrd_context *); */ /* char *rrd_get_error_r (struct rrd_context *); */ -int LockRRD(int in_file); + int LockRRD( + int in_file); -#endif /* _RRDLIB_H */ +#endif /* _RRDLIB_H */ #ifdef __cplusplus } diff --git a/src/rrd_afm.c b/src/rrd_afm.c index c42e6fe..3c53fdd 100644 --- a/src/rrd_afm.c +++ b/src/rrd_afm.c @@ -30,7 +30,7 @@ # define DLOG(x) fprintf x #else # define DEBUG 0 -# define DLOG(x) +# define DLOG(x) #endif /* Adobe SVG View and Batik 1.1.1 can't handle ligatures. @@ -45,117 +45,136 @@ static const char *last_unknown_font = NULL; #define is_font(p, name) \ (!strcmp(p->postscript_name, name) || !strcmp(p->fullname, name)) -static const afm_fontinfo *afm_searchfont(const char *name) +static const afm_fontinfo *afm_searchfont( + const char *name) { - int i; - const afm_fontinfo *p = afm_last_used_font; - if (p && is_font(p, name)) - return p; - p = afm_fontinfolist; - for (i = 0; i < afm_fontinfo_count; i++, p++) { - if (is_font(p, name)) { - afm_last_used_font = p; - return p; + int i; + const afm_fontinfo *p = afm_last_used_font; + + if (p && is_font(p, name)) + return p; + p = afm_fontinfolist; + for (i = 0; i < afm_fontinfo_count; i++, p++) { + if (is_font(p, name)) { + afm_last_used_font = p; + return p; + } } - } - return NULL; + return NULL; } /* returns always a font, never NULL. The rest of the code depends on the result never being NULL. See rrd_afm.h */ -static const afm_fontinfo *afm_findfont(const char *name) +static const afm_fontinfo *afm_findfont( + const char *name) { - const afm_fontinfo *p = afm_searchfont(name); - if (p) - return p; - if (!last_unknown_font || strcmp(name, last_unknown_font)) { - fprintf(stderr, "Can't find font '%s'\n", name); - last_unknown_font = name; - } - p = afm_searchfont(RRD_AFM_DEFAULT_FONT); - if (p) - return p; - return afm_fontinfolist; /* anything, just anything. */ + const afm_fontinfo *p = afm_searchfont(name); + + if (p) + return p; + if (!last_unknown_font || strcmp(name, last_unknown_font)) { + fprintf(stderr, "Can't find font '%s'\n", name); + last_unknown_font = name; + } + p = afm_searchfont(RRD_AFM_DEFAULT_FONT); + if (p) + return p; + return afm_fontinfolist; /* anything, just anything. */ } -const char *afm_get_font_postscript_name(const char* font) +const char *afm_get_font_postscript_name( + const char *font) { - const afm_fontinfo *p = afm_findfont(font); - return p->postscript_name; + const afm_fontinfo *p = afm_findfont(font); + + return p->postscript_name; } -const char *afm_get_font_name(const char* font) +const char *afm_get_font_name( + const char *font) { - const afm_fontinfo *p = afm_findfont(font); - return p->fullname; + const afm_fontinfo *p = afm_findfont(font); + + return p->fullname; } -double afm_get_ascender(const char* font, double size) +double afm_get_ascender( + const char *font, + double size) { - const afm_fontinfo *p = afm_findfont(font); - return size * p->ascender / 1000.0; + const afm_fontinfo *p = afm_findfont(font); + + return size * p->ascender / 1000.0; } -double afm_get_descender(const char* font, double size) +double afm_get_descender( + const char *font, + double size) { - const afm_fontinfo *p = afm_findfont(font); - return size * p->descender / 1000.0; + const afm_fontinfo *p = afm_findfont(font); + + return size * p->descender / 1000.0; } -static int afm_find_char_index(const afm_fontinfo *fontinfo, +static int afm_find_char_index( + const afm_fontinfo * fontinfo, afm_cunicode ch1) { - int idx = ch1 - 32; - afm_cuint16 *indexP; - int numIndexChars, i; - if (idx <= 0) - return 0; - if (idx <= 126 - 32) - return idx; - indexP = fontinfo->highchars_index; - if (indexP == 0) - return 0; - numIndexChars = fontinfo->highchars_count; - DLOG((stderr, " find highbit, num = %d\n", numIndexChars)); - if (ch1 >= 161 && ch1 <= 255) { - idx = ch1 - 161; - DLOG((stderr, " 161, idx = %d -> %d\n", idx, indexP[idx])); - if (idx < numIndexChars && indexP[idx] == ch1) { - idx += 127 - 32; - DLOG((stderr, " 161-guessed ok to %d\n", idx)); - return idx; + int idx = ch1 - 32; + afm_cuint16 *indexP; + int numIndexChars, i; + + if (idx <= 0) + return 0; + if (idx <= 126 - 32) + return idx; + indexP = fontinfo->highchars_index; + if (indexP == 0) + return 0; + numIndexChars = fontinfo->highchars_count; + DLOG((stderr, " find highbit, num = %d\n", numIndexChars)); + if (ch1 >= 161 && ch1 <= 255) { + idx = ch1 - 161; + DLOG((stderr, " 161, idx = %d -> %d\n", idx, indexP[idx])); + if (idx < numIndexChars && indexP[idx] == ch1) { + idx += 127 - 32; + DLOG((stderr, " 161-guessed ok to %d\n", idx)); + return idx; + } } - } - for (i = 0; i < numIndexChars; i++) { - DLOG((stderr, " compares to %d -> %d\n", indexP[i], i)); - if (indexP[i] == ch1) - return i + 127 - 32; - } - DLOG((stderr, "Did not find %d in highchars_index ??\n", ch1)); - return 0; + for (i = 0; i < numIndexChars; i++) { + DLOG((stderr, " compares to %d -> %d\n", indexP[i], i)); + if (indexP[i] == ch1) + return i + 127 - 32; + } + DLOG((stderr, "Did not find %d in highchars_index ??\n", ch1)); + return 0; } #if ENABLE_LIGATURES -static afm_cunicode afm_find_combined_ligature(const afm_fontinfo *fontinfo, - afm_cunicode ch1, afm_cunicode ch2) +static afm_cunicode afm_find_combined_ligature( + const afm_fontinfo * fontinfo, + afm_cunicode ch1, + afm_cunicode ch2) { - afm_cunicode *p = fontinfo->ligatures; - int num = fontinfo->ligatures_count; - int i; - if (!num) - return 0; - DLOG((stderr, " find-lig, num = %d\n", num)); - for (i = 0; i < num; i++, p += 3) { - DLOG((stderr, " lig: %d + %d -> %d (%c %c %c)\n", - p[0], p[1], p[2], p[0], p[1], p[2])); - if (ch1 == *p && ch2 == p[1]) { - DLOG((stderr, " matches.\n")); - return p[2]; + afm_cunicode *p = fontinfo->ligatures; + int num = fontinfo->ligatures_count; + int i; + + if (!num) + return 0; + DLOG((stderr, " find-lig, num = %d\n", num)); + for (i = 0; i < num; i++, p += 3) { + DLOG((stderr, " lig: %d + %d -> %d (%c %c %c)\n", + p[0], p[1], p[2], p[0], p[1], p[2])); + if (ch1 == *p && ch2 == p[1]) { + DLOG((stderr, " matches.\n")); + return p[2]; + } } - } - return 0; + return 0; } #endif @@ -168,43 +187,52 @@ static afm_cunicode afm_find_combined_ligature(const afm_fontinfo *fontinfo, } -static long afm_find_kern(const afm_fontinfo *fontinfo, - int kern_idx, afm_cunicode ch2) +static long afm_find_kern( + const afm_fontinfo * fontinfo, + int kern_idx, + afm_cunicode ch2) { - afm_cuint8 *p8 = fontinfo->kerning_data + kern_idx; - int num; - READ_ESCAPED(p8, num); - DLOG((stderr, " find kern, num pairs = %d\n", num)); - while (num > 0) { - afm_unicode ch; - READ_ESCAPED(p8, ch); - DLOG((stderr, " pair-char = %d\n", ch)); - if (ch == ch2) { - DLOG((stderr, " got kern = %d\n", *(afm_csint8*)p8)); - return *(afm_csint8*)p8; + afm_cuint8 *p8 = fontinfo->kerning_data + kern_idx; + int num; + + READ_ESCAPED(p8, num); + DLOG((stderr, " find kern, num pairs = %d\n", num)); + while (num > 0) { + afm_unicode ch; + + READ_ESCAPED(p8, ch); + DLOG((stderr, " pair-char = %d\n", ch)); + if (ch == ch2) { + DLOG((stderr, " got kern = %d\n", *(afm_csint8 *) p8)); + return *(afm_csint8 *) p8; + } + p8++; + num--; } - p8++; - num--; - } - return 0; + return 0; } /* measure width of a text string */ -double afm_get_text_width( double start, const char* font, double size, - double tabwidth, const char* text) +double afm_get_text_width( + double start, + const char *font, + double size, + double tabwidth, + const char *text) { -#ifdef HAVE_MBSTOWCS - size_t clen = strlen(text) + 1; - wchar_t *cstr = malloc(sizeof(wchar_t) * clen); /* yes we are allocating probably too much here, I know */ - int text_count = mbstowcs(cstr, text, clen); - double w; +#ifdef HAVE_MBSTOWCS + size_t clen = strlen(text) + 1; + wchar_t *cstr = malloc(sizeof(wchar_t) * clen); /* yes we are allocating probably too much here, I know */ + int text_count = mbstowcs(cstr, text, clen); + double w; + if (text_count == -1) - text_count = mbstowcs(cstr, "Enc-Err", 6); + text_count = mbstowcs(cstr, "Enc-Err", 6); #ifdef __APPLE__ - while (text_count > 0) { - text_count--; - cstr[text_count] = afm_fix_osx_charset(cstr[text_count]); /* unsafe macro */ - } + while (text_count > 0) { + text_count--; + cstr[text_count] = afm_fix_osx_charset(cstr[text_count]); /* unsafe macro */ + } #endif w = afm_get_text_width_wide(start, font, size, tabwidth, cstr); free(cstr); @@ -214,74 +242,83 @@ double afm_get_text_width( double start, const char* font, double size, #endif } -double afm_get_text_width_wide( double UNUSED(start), const char* font, double size, - double UNUSED(tabwidth), const afm_char* text) +double afm_get_text_width_wide( + double UNUSED(start), + const char *font, + double size, + double UNUSED(tabwidth), + const afm_char * text) { - const afm_fontinfo *fontinfo = afm_findfont(font); - long width = 0; - double widthf; - const afm_char *up = text; - DLOG((stderr, "================= %s\n", text)); - if (fontinfo == NULL) { - while (*up) - up++; - return size * (up - text); - } - while (1) { - afm_unicode ch1, ch2; - int idx1, kern_idx; - if ((ch1 = *up) == 0) - break; - ch2 = *++up; - DLOG((stderr, "------------- Loop: %d + %d (%c%c) at %d\n", - ch1, ch2, ch1, ch2 ? ch2 : ' ', - (up - (const unsigned char*)text) - 1)); - idx1 = afm_find_char_index(fontinfo, ch1); - DLOG((stderr, " idx1 = %d\n", idx1)); -#if ENABLE_LIGATURES - if (ch2) { - int ch1_new = afm_find_combined_ligature(fontinfo, ch1, ch2); - DLOG((stderr, " lig-ch = %d\n", ch1_new)); - if (ch1_new) { - ch1 = ch1_new; - idx1 = afm_find_char_index(fontinfo, ch1); - ch2 = *++up; - DLOG((stderr, " -> idx1 = %d, ch2 = %d (%c)\n", - idx1, ch2, ch2 ? ch2 : ' ')); - } + const afm_fontinfo *fontinfo = afm_findfont(font); + long width = 0; + double widthf; + const afm_char *up = text; + + DLOG((stderr, "================= %s\n", text)); + if (fontinfo == NULL) { + while (*up) + up++; + return size * (up - text); } + while (1) { + afm_unicode ch1, ch2; + int idx1, kern_idx; + + if ((ch1 = *up) == 0) + break; + ch2 = *++up; + DLOG((stderr, "------------- Loop: %d + %d (%c%c) at %d\n", + ch1, ch2, ch1, ch2 ? ch2 : ' ', + (up - (const unsigned char *) text) - 1)); + idx1 = afm_find_char_index(fontinfo, ch1); + DLOG((stderr, " idx1 = %d\n", idx1)); +#if ENABLE_LIGATURES + if (ch2) { + int ch1_new = + afm_find_combined_ligature(fontinfo, ch1, ch2); + + DLOG((stderr, " lig-ch = %d\n", ch1_new)); + if (ch1_new) { + ch1 = ch1_new; + idx1 = afm_find_char_index(fontinfo, ch1); + ch2 = *++up; + DLOG((stderr, " -> idx1 = %d, ch2 = %d (%c)\n", + idx1, ch2, ch2 ? ch2 : ' ')); + } + } #endif - width += fontinfo->widths[idx1]; - DLOG((stderr, "Plain width of %d = %d\n", ch1, fontinfo->widths[idx1])); - if (fontinfo->kerning_index && ch2) { - kern_idx = fontinfo->kerning_index[idx1]; - DLOG((stderr, " kern_idx = %d\n", kern_idx)); - if (kern_idx > 0) - width += afm_find_kern(fontinfo, kern_idx, ch2); + width += fontinfo->widths[idx1]; + DLOG((stderr, "Plain width of %d = %d\n", ch1, + fontinfo->widths[idx1])); + if (fontinfo->kerning_index && ch2) { + kern_idx = fontinfo->kerning_index[idx1]; + DLOG((stderr, " kern_idx = %d\n", kern_idx)); + if (kern_idx > 0) + width += afm_find_kern(fontinfo, kern_idx, ch2); + } } - } - widthf = (width * 6 / 1000.0) * size; - DLOG((stderr, "Returns %ld (%ld) -> %f\n", width, width * 6, widthf)); - return widthf; + widthf = (width * 6 / 1000.0) * size; + DLOG((stderr, "Returns %ld (%ld) -> %f\n", width, width * 6, widthf)); + return widthf; } #ifdef __APPLE__ const unsigned char afm_mac2iso[128] = { - '\xC4', '\xC5', '\xC7', '\xC9', '\xD1', '\xD6', '\xDC', '\xE1', /* 80 */ - '\xE0', '\xE2', '\xE4', '\xE3', '\xE5', '\xE7', '\xE9', '\xE8', /* 88 */ - '\xEA', '\xEB', '\xED', '\xEC', '\xEE', '\xEF', '\xF1', '\xF3', /* 90 */ - '\xF2', '\xF4', '\xF6', '\xF5', '\xFA', '\xF9', '\xFB', '\xFC', /* 98 */ - '\xDD', '\xB0', '\xA2', '\xA3', '\xA7', ' ', '\xB6', '\xDF', /* A0 */ - '\xAE', '\xA9', ' ', '\xB4', '\xA8', ' ', '\xC6', '\xD8', /* A8 */ - ' ', '\xB1', '\xBE', ' ', '\xA5', '\xB5', ' ', ' ', /* B0 */ - '\xBD', '\xBC', ' ', '\xAA', '\xBA', ' ', '\xE6', '\xF8', /* B8 */ - '\xBF', '\xA1', '\xAC', ' ', ' ', ' ', ' ', '\xAB', /* C0 */ - '\xBB', ' ', '\xA0', '\xC0', '\xC3', '\xD5', ' ', '\xA6', /* C8 */ - '\xAD', ' ', '"', '"', '\'', '\'', '\xF7', '\xD7', /* D0 */ - '\xFF', ' ', ' ', '\xA4', '\xD0', '\xF0', '\xDE', '\xFE', /* D8 */ - '\xFD', '\xB7', ' ', ' ', ' ', '\xC2', '\xCA', '\xC1', /* E0 */ - '\xCB', '\xC8', '\xCD', '\xCE', '\xCF', '\xCC', '\xD3', '\xD4', /* E8 */ - ' ', '\xD2', '\xDA', '\xDB', '\xD9', ' ', ' ', ' ', /* F0 */ - '\xAF', ' ', ' ', ' ', '\xB8', ' ', ' ', ' ', /* F8 */ + '\xC4', '\xC5', '\xC7', '\xC9', '\xD1', '\xD6', '\xDC', '\xE1', /* 80 */ + '\xE0', '\xE2', '\xE4', '\xE3', '\xE5', '\xE7', '\xE9', '\xE8', /* 88 */ + '\xEA', '\xEB', '\xED', '\xEC', '\xEE', '\xEF', '\xF1', '\xF3', /* 90 */ + '\xF2', '\xF4', '\xF6', '\xF5', '\xFA', '\xF9', '\xFB', '\xFC', /* 98 */ + '\xDD', '\xB0', '\xA2', '\xA3', '\xA7', ' ', '\xB6', '\xDF', /* A0 */ + '\xAE', '\xA9', ' ', '\xB4', '\xA8', ' ', '\xC6', '\xD8', /* A8 */ + ' ', '\xB1', '\xBE', ' ', '\xA5', '\xB5', ' ', ' ', /* B0 */ + '\xBD', '\xBC', ' ', '\xAA', '\xBA', ' ', '\xE6', '\xF8', /* B8 */ + '\xBF', '\xA1', '\xAC', ' ', ' ', ' ', ' ', '\xAB', /* C0 */ + '\xBB', ' ', '\xA0', '\xC0', '\xC3', '\xD5', ' ', '\xA6', /* C8 */ + '\xAD', ' ', '"', '"', '\'', '\'', '\xF7', '\xD7', /* D0 */ + '\xFF', ' ', ' ', '\xA4', '\xD0', '\xF0', '\xDE', '\xFE', /* D8 */ + '\xFD', '\xB7', ' ', ' ', ' ', '\xC2', '\xCA', '\xC1', /* E0 */ + '\xCB', '\xC8', '\xCD', '\xCE', '\xCF', '\xCC', '\xD3', '\xD4', /* E8 */ + ' ', '\xD2', '\xDA', '\xDB', '\xD9', ' ', ' ', ' ', /* F0 */ + '\xAF', ' ', ' ', ' ', '\xB8', ' ', ' ', ' ', /* F8 */ }; #endif diff --git a/src/rrd_afm.h b/src/rrd_afm.h index 20350ff..e333cbf 100644 --- a/src/rrd_afm.h +++ b/src/rrd_afm.h @@ -8,7 +8,7 @@ #define RRD_AFM_H #include - + #ifdef HAVE_MBSTOWCS #define afm_char wchar_t #else @@ -28,22 +28,37 @@ /* measure width of a text string */ /* fontname can be full name or postscript name */ -double afm_get_text_width( double start, const char* font, double size, - double tabwidth, const char* text); -double afm_get_text_width_wide( double start, const char* font, double size, - double tabwidth, const afm_char* text); +double afm_get_text_width( + double start, + const char *font, + double size, + double tabwidth, + const char *text); +double afm_get_text_width_wide( + double start, + const char *font, + double size, + double tabwidth, + const afm_char * text); -double afm_get_ascender(const char* font, double size); -double afm_get_descender(const char* font, double size); +double afm_get_ascender( + const char *font, + double size); +double afm_get_descender( + const char *font, + double size); /* get postscript name from fullname or postscript name */ -const char *afm_get_font_postscript_name ( const char* font); -const char *afm_get_font_name(const char* font); +const char *afm_get_font_postscript_name( + const char *font); +const char *afm_get_font_name( + const char *font); /* cc -E -dM /dev/null */ #ifdef __APPLE__ /* need charset conversion from macintosh to unicode. */ extern const unsigned char afm_mac2iso[128]; + #define afm_fix_osx_charset(c) \ ( (c) >= 128 && (c) <= 255 ? afm_mac2iso[(c) - 128] : (c)) #else diff --git a/src/rrd_afm_data.c b/src/rrd_afm_data.c index fccf586..c922163 100644 --- a/src/rrd_afm_data.c +++ b/src/rrd_afm_data.c @@ -17,47 +17,80 @@ /* FontName: Courier */ /* FullName: Courier */ /* FamilyName: Courier */ -static afm_cuint8 afm_Courier_widths[] = { /* 315 */ - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100 +static afm_cuint8 afm_Courier_widths[] = { /* 315 */ + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; -static afm_cuint16 afm_Courier_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Courier_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; static afm_cunicode afm_Courier_ligatures[] = { /* 3 */ - 102,105,64257 + 102, 105, 64257 }; @@ -66,46 +99,79 @@ static afm_cunicode afm_Courier_ligatures[] = { /* 3 */ /* FullName: Courier Bold */ /* FamilyName: Courier */ static afm_cuint8 afm_Courier_Bold_widths[] = { /* 315 */ - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100 + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; -static afm_cuint16 afm_Courier_Bold_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Courier_Bold_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Courier_Bold_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Courier_Bold_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -113,47 +179,80 @@ static afm_cunicode afm_Courier_Bold_ligatures[] = { /* 3 */ /* FontName: Courier-BoldOblique */ /* FullName: Courier Bold Oblique */ /* FamilyName: Courier */ -static afm_cuint8 afm_Courier_BoldOblique_widths[] = { /* 315 */ - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100 +static afm_cuint8 afm_Courier_BoldOblique_widths[] = { /* 315 */ + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; -static afm_cuint16 afm_Courier_BoldOblique_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Courier_BoldOblique_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; static afm_cunicode afm_Courier_BoldOblique_ligatures[] = { /* 3 */ - 102,105,64257 + 102, 105, 64257 }; @@ -161,47 +260,80 @@ static afm_cunicode afm_Courier_BoldOblique_ligatures[] = { /* 3 */ /* FontName: Courier-Oblique */ /* FullName: Courier Oblique */ /* FamilyName: Courier */ -static afm_cuint8 afm_Courier_Oblique_widths[] = { /* 315 */ - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, - 100,100,100,100,100,100,100,100,100,100,100 +static afm_cuint8 afm_Courier_Oblique_widths[] = { /* 315 */ + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 }; -static afm_cuint16 afm_Courier_Oblique_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Courier_Oblique_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; static afm_cunicode afm_Courier_Oblique_ligatures[] = { /* 3 */ - 102,105,64257 + 102, 105, 64257 }; @@ -209,408 +341,796 @@ static afm_cunicode afm_Courier_Oblique_ligatures[] = { /* 3 */ /* FontName: Helvetica */ /* FullName: Helvetica */ /* FamilyName: Helvetica */ -static afm_cuint8 afm_Helvetica_widths[] = { /* 315 */ - 46,46,59,93,93,148,111,32,56,56,65,97,46,56,46,46,93,93,93,93,93, - 93,93,93,93,93,46,46,97,97,97,93,169,111,111,120,120,111,102,130, - 120,46,83,111,93,139,120,130,111,130,120,111,102,120,111,157,111, - 111,102,46,46,46,78,93,56,93,93,83,93,93,46,93,93,37,37,83,37,139, - 93,93,93,93,56,83,46,93,83,120,83,83,83,56,43,56,97,56,93,93,93, - 93,43,93,56,123,62,93,97,123,56,67,97,56,56,56,93,90,46,56,56,61, - 93,139,139,139,102,111,111,111,111,111,111,167,120,111,111,111,111, - 46,46,46,46,120,120,130,130,130,130,130,97,130,120,120,120,120,111, - 111,102,93,93,93,93,93,93,148,83,93,93,93,93,46,46,46,46,93,93,93, - 93,93,93,93,97,102,93,93,93,93,83,93,83,111,93,111,93,111,93,120, - 83,120,83,120,107,120,93,111,93,111,93,111,93,111,93,130,93,130, - 93,46,46,46,37,46,46,111,83,93,37,93,37,93,50,93,37,120,93,120,93, - 120,93,130,93,130,93,167,157,120,56,120,56,120,56,111,83,111,83, - 111,83,102,46,102,53,120,93,120,93,120,93,120,93,111,102,83,102, - 83,102,83,93,111,83,56,56,56,56,56,56,56,56,93,167,37,37,37,56,56, - 56,93,93,58,167,167,56,56,28,93,167,79,102,100,97,76,92,92,92,79, - 42,83,83 +static afm_cuint8 afm_Helvetica_widths[] = { /* 315 */ + 46, 46, 59, 93, 93, 148, 111, 32, 56, 56, 65, 97, 46, 56, 46, 46, 93, 93, + 93, 93, 93, + 93, 93, 93, 93, 93, 46, 46, 97, 97, 97, 93, 169, 111, 111, 120, 120, 111, + 102, 130, + 120, 46, 83, 111, 93, 139, 120, 130, 111, 130, 120, 111, 102, 120, 111, + 157, 111, + 111, 102, 46, 46, 46, 78, 93, 56, 93, 93, 83, 93, 93, 46, 93, 93, 37, 37, + 83, 37, 139, + 93, 93, 93, 93, 56, 83, 46, 93, 83, 120, 83, 83, 83, 56, 43, 56, 97, 56, + 93, 93, 93, + 93, 43, 93, 56, 123, 62, 93, 97, 123, 56, 67, 97, 56, 56, 56, 93, 90, 46, + 56, 56, 61, + 93, 139, 139, 139, 102, 111, 111, 111, 111, 111, 111, 167, 120, 111, 111, + 111, 111, + 46, 46, 46, 46, 120, 120, 130, 130, 130, 130, 130, 97, 130, 120, 120, 120, + 120, 111, + 111, 102, 93, 93, 93, 93, 93, 93, 148, 83, 93, 93, 93, 93, 46, 46, 46, 46, + 93, 93, 93, + 93, 93, 93, 93, 97, 102, 93, 93, 93, 93, 83, 93, 83, 111, 93, 111, 93, + 111, 93, 120, + 83, 120, 83, 120, 107, 120, 93, 111, 93, 111, 93, 111, 93, 111, 93, 130, + 93, 130, + 93, 46, 46, 46, 37, 46, 46, 111, 83, 93, 37, 93, 37, 93, 50, 93, 37, 120, + 93, 120, 93, + 120, 93, 130, 93, 130, 93, 167, 157, 120, 56, 120, 56, 120, 56, 111, 83, + 111, 83, + 111, 83, 102, 46, 102, 53, 120, 93, 120, 93, 120, 93, 120, 93, 111, 102, + 83, 102, + 83, 102, 83, 93, 111, 83, 56, 56, 56, 56, 56, 56, 56, 56, 93, 167, 37, 37, + 37, 56, 56, + 56, 93, 93, 58, 167, 167, 56, 56, 28, 93, 167, 79, 102, 100, 97, 76, 92, + 92, 92, 79, + 42, 83, 83 }; static afm_sint16 afm_Helvetica_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,29,0,38,0,0,0,0,0,0,0,0,0,0,0,49,52,0,0, - 0,0,0,55,170,197,202,0,241,0,0,0,345,418,510,0,0,545,594,687,710, - 772,777,938,966,1115,0,1259,0,0,0,0,0,0,0,1407,1419,1468,0,1476, - 1494,1575,1587,0,0,1595,0,1638,1668,1700,1718,0,1730,1847,0,0,1854, - 1924,1994,2017,2087,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,2130,2245,2360,2475,2590,2705,0,2820,0,0, - 0,0,0,0,0,0,0,0,2825,2874,2923,2972,3021,0,3070,3119,3147,3175,3203, - 3231,0,0,3379,3391,3403,3415,3427,3439,0,3451,3459,3477,3495,3513, - 0,0,0,0,0,3531,3563,3581,3599,3617,3635,0,3653,0,0,0,0,3882,0,3952, - 4022,4137,4149,4264,4276,4391,4403,4408,4416,4421,4429,0,4468,0, - 0,4507,0,4525,0,4543,0,4561,0,4579,0,4591,0,0,0,0,0,0,4603,4695, - 4738,0,4773,0,4808,0,4843,0,0,4878,0,4910,0,4942,4974,5023,5041, - 5090,0,0,5108,5170,5287,5349,5466,5528,5645,5650,5657,5662,5669, - 5674,5681,0,5842,0,6003,0,6031,0,6059,0,6087,0,6115,0,6263,0,6306, - 0,6349,0,6392,6397,0,0,0,0,0,0,0,0,0,0,6404,6409,0,0,6447,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 49, 52, 0, 0, + 0, 0, 0, 55, 170, 197, 202, 0, 241, 0, 0, 0, 345, 418, 510, 0, 0, 545, + 594, 687, 710, + 772, 777, 938, 966, 1115, 0, 1259, 0, 0, 0, 0, 0, 0, 0, 1407, 1419, 1468, + 0, 1476, + 1494, 1575, 1587, 0, 0, 1595, 0, 1638, 1668, 1700, 1718, 0, 1730, 1847, 0, + 0, 1854, + 1924, 1994, 2017, 2087, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2130, 2245, 2360, 2475, 2590, 2705, 0, + 2820, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2825, 2874, 2923, 2972, 3021, 0, 3070, 3119, 3147, + 3175, 3203, + 3231, 0, 0, 3379, 3391, 3403, 3415, 3427, 3439, 0, 3451, 3459, 3477, 3495, + 3513, + 0, 0, 0, 0, 0, 3531, 3563, 3581, 3599, 3617, 3635, 0, 3653, 0, 0, 0, 0, + 3882, 0, 3952, + 4022, 4137, 4149, 4264, 4276, 4391, 4403, 4408, 4416, 4421, 4429, 0, 4468, + 0, + 0, 4507, 0, 4525, 0, 4543, 0, 4561, 0, 4579, 0, 4591, 0, 0, 0, 0, 0, 0, + 4603, 4695, + 4738, 0, 4773, 0, 4808, 0, 4843, 0, 0, 4878, 0, 4910, 0, 4942, 4974, 5023, + 5041, + 5090, 0, 0, 5108, 5170, 5287, 5349, 5466, 5528, 5645, 5650, 5657, 5662, + 5669, + 5674, 5681, 0, 5842, 0, 6003, 0, 6031, 0, 6059, 0, 6087, 0, 6115, 0, 6263, + 0, 6306, + 0, 6349, 0, 6392, 6397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6404, 6409, 0, 0, + 6447, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static afm_cuint8 afm_Helvetica_kerning_data[] = { /* 6450 */ - 42,11,85,249,87,249,88,250,90,242,222,242,0,100,249,0,102,249,0, - 122,242,1,32,24,247,1,32,28,252,3,1,32,25,240,1,32,29,240,4,33,247, - 1,32,25,240,1,32,29,240,2,33,249,2,33,249,49,68,252,72,252,80,252, - 82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250,120,250, - 122,250,200,252,211,252,212,252,213,252,214,252,215,252,217,252, - 218,249,219,249,220,249,221,249,222,240,250,252,251,252,252,252, - 253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252,0,78, - 252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112,249,0, - 113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240,12,45, - 254,47,254,86,255,218,255,219,255,220,255,221,255,0,108,255,0,112, - 255,0,114,255,0,116,255,3,45,252,47,252,18,45,245,47,245,66,250, - 87,245,88,250,90,242,193,250,194,250,195,250,196,250,197,250,198, - 250,222,242,0,2,250,0,4,250,0,6,250,0,122,242,45,45,232,47,232,66, - 244,98,249,102,252,112,252,115,249,193,244,194,244,195,244,196,244, - 197,244,198,244,225,249,226,249,227,249,228,249,229,249,230,249, - 233,252,234,252,235,252,236,252,243,252,244,252,245,252,246,252, - 247,252,249,252,0,2,244,0,3,249,0,4,244,0,5,249,0,6,244,0,7,249, - 0,21,252,0,25,252,0,27,252,0,29,252,0,79,252,0,83,252,0,87,249,0, - 89,249,0,91,249,32,45,252,47,252,66,254,98,254,118,254,193,254,194, - 254,195,254,196,254,197,254,198,254,225,254,226,254,227,254,228, - 254,229,254,230,254,250,254,251,254,252,254,253,254,0,2,254,0,3, - 254,0,4,254,0,5,254,0,6,254,0,7,254,0,109,254,0,113,254,0,115,254, - 0,117,254,40,80,249,102,250,112,250,118,252,122,249,211,249,212, - 249,213,249,214,249,215,249,217,249,233,250,234,250,235,250,236, - 250,243,250,244,250,245,250,246,250,247,250,249,250,250,252,251, - 252,252,252,253,252,254,249,0,1,249,0,21,250,0,25,250,0,27,250,0, - 29,250,0,78,249,0,79,250,0,82,249,0,83,250,0,109,252,0,113,252,0, - 115,252,0,117,252,14,85,239,87,239,88,245,90,234,122,252,222,234, - 254,252,0,1,252,0,100,239,0,102,239,0,122,234,1,32,25,230,1,32,29, - 234,22,45,250,47,250,66,254,85,250,87,249,88,252,89,247,90,245,193, - 254,194,254,195,254,196,254,197,254,198,254,222,245,0,2,254,0,4, - 254,0,6,254,0,100,250,0,102,250,0,122,245,41,45,227,47,227,66,237, - 98,250,102,249,112,249,193,237,194,237,195,237,196,237,197,237,198, - 237,225,250,226,250,227,250,228,250,229,250,230,250,233,249,234, - 249,235,249,236,249,243,249,244,249,245,249,246,249,247,249,249, - 249,0,2,237,0,3,250,0,4,237,0,5,250,0,6,237,0,7,250,0,21,249,0,25, - 249,0,27,249,0,29,249,0,79,249,0,83,249,10,86,255,218,255,219,255, - 220,255,221,255,0,108,255,0,112,255,0,114,255,0,116,255,27,80,254, - 85,252,86,250,87,249,88,252,90,249,211,254,212,254,213,254,214,254, - 215,254,217,254,218,250,219,250,220,250,221,250,222,249,0,78,254, - 0,82,254,0,100,252,0,102,252,0,108,250,0,112,250,0,114,250,0,116, - 250,0,122,249,3,45,254,47,254,70,45,237,46,234,47,237,59,254,60, - 254,66,237,80,250,98,237,102,237,112,237,115,237,118,237,120,237, - 122,237,193,237,194,237,195,237,196,237,197,237,198,237,211,250, - 212,250,213,250,214,250,215,250,217,250,225,237,226,237,227,237, - 228,247,229,237,230,237,233,247,234,237,235,237,236,237,243,237, - 244,237,245,237,246,247,247,237,249,237,250,237,251,237,252,237, - 253,237,254,237,0,1,247,0,2,237,0,3,247,0,4,237,0,5,247,0,6,237, - 0,7,237,0,21,247,0,25,237,0,27,237,0,29,237,0,78,250,0,79,247,0, - 82,250,0,83,237,0,87,237,0,89,237,0,91,237,0,109,247,0,113,237,0, - 115,237,0,117,237,13,45,250,47,250,66,250,193,250,194,250,195,250, - 196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,65,45,236,46,244, - 47,236,59,250,60,250,66,244,72,250,80,250,98,245,102,244,112,244, - 118,245,193,244,194,244,195,244,196,244,197,244,198,244,211,250, - 212,250,213,250,214,250,215,250,217,250,225,245,226,245,227,245, - 228,245,229,245,230,245,233,244,234,244,235,244,236,244,243,244, - 244,244,245,244,246,244,247,244,249,244,250,245,251,245,252,245, - 253,245,0,2,244,0,3,245,0,4,244,0,5,245,0,6,244,0,7,245,0,21,244, - 0,25,244,0,27,244,0,29,244,0,32,250,0,36,250,0,78,250,0,79,244,0, - 82,250,0,83,244,0,109,245,0,113,245,0,115,245,0,117,245,63,45,244, - 46,250,47,244,66,249,80,254,98,250,102,252,112,252,118,252,122,254, - 193,249,194,249,195,249,196,249,197,249,198,249,211,254,212,254, - 213,254,214,254,215,254,217,254,225,250,226,250,227,250,228,250, - 229,250,230,250,233,252,234,252,235,252,236,252,243,252,244,252, - 245,252,246,252,247,252,249,252,250,252,251,252,252,252,253,252, - 254,254,0,1,254,0,2,249,0,3,250,0,4,249,0,5,250,0,6,249,0,7,250, - 0,21,252,0,25,252,0,27,252,0,29,252,0,78,254,0,79,252,0,82,254,0, - 83,252,0,109,252,0,113,252,0,115,252,0,117,252,65,45,234,46,234, - 47,234,59,247,60,247,66,239,80,243,98,234,102,234,106,254,112,234, - 118,239,193,239,194,239,195,239,196,239,197,239,198,239,211,243, - 212,243,213,243,214,243,215,243,217,243,225,234,226,234,227,234, - 228,234,229,234,230,234,233,234,234,234,235,234,236,234,238,254, - 243,234,244,234,245,234,246,234,247,234,249,234,250,239,251,239, - 252,239,253,239,0,2,239,0,3,245,0,4,239,0,5,245,0,6,239,0,7,234, - 0,21,245,0,25,234,0,27,234,0,29,234,0,49,254,0,78,243,0,79,234,0, - 82,243,0,83,234,0,109,239,0,113,239,0,115,239,0,117,239,6,119,254, - 120,254,122,252,254,252,0,1,252,21,45,250,47,250,99,255,109,254, - 118,254,119,254,122,254,250,254,251,254,252,254,253,254,254,254, - 0,1,254,0,60,254,0,62,254,0,68,254,0,109,254,0,113,254,0,115,254, - 0,117,254,4,45,254,108,254,0,57,254,9,45,254,47,254,119,252,120, - 254,121,252,122,254,254,254,0,1,254,34,45,252,47,252,98,252,102, - 252,112,252,225,252,226,252,227,252,228,252,229,252,230,252,233, - 252,234,252,235,252,236,252,243,252,244,252,245,252,246,252,247, - 252,249,252,0,3,252,0,5,252,0,7,252,0,21,252,0,25,252,0,27,252,0, - 29,252,0,51,252,0,79,252,0,83,252,1,32,25,8,1,32,29,10,5,115,255, - 0,87,255,0,89,255,0,91,255,4,122,252,254,252,0,1,252,19,102,254, - 112,254,233,254,234,254,235,254,236,254,243,254,244,254,245,254, - 246,254,247,254,249,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79, - 254,0,83,254,13,118,255,122,254,250,255,251,255,252,255,253,255, - 254,254,0,1,254,0,109,255,0,113,255,0,115,255,0,117,255,14,118,255, - 119,254,122,254,250,255,251,255,252,255,253,255,254,254,0,1,254, - 0,109,255,0,113,255,0,115,255,0,117,255,9,45,250,47,250,119,254, - 120,254,121,252,122,252,254,252,0,1,252,6,45,251,47,251,122,252, - 254,252,0,1,252,50,45,249,47,249,59,5,60,5,98,255,106,3,108,3,109, - 3,110,4,111,4,113,5,117,7,118,3,119,5,122,5,225,255,226,255,227, - 255,228,255,229,255,230,255,237,3,238,3,239,3,240,3,242,4,250,3, - 251,3,252,3,253,3,254,5,0,1,5,0,3,255,0,5,255,0,7,255,0,45,3,0,49, - 3,0,57,3,0,60,3,0,62,3,0,68,3,0,70,4,0,72,4,0,74,4,0,101,7,0,109, - 3,0,113,3,0,115,3,0,117,3,4,45,254,47,254,120,252,31,45,244,47,244, - 98,253,102,253,112,253,225,253,226,253,227,253,228,253,229,253,230, - 253,233,253,234,253,235,253,236,253,243,253,244,253,245,253,246, - 253,247,253,249,253,0,3,253,0,5,253,0,7,253,0,21,253,0,25,253,0, - 27,253,0,29,253,0,79,253,0,83,253,31,45,247,47,247,98,254,102,255, - 112,255,225,254,226,254,227,254,228,254,229,254,230,254,233,255, - 234,255,235,255,236,255,243,255,244,255,245,255,246,255,247,255, - 249,255,0,3,254,0,5,254,0,7,254,0,21,255,0,25,255,0,27,255,0,29, - 255,0,79,255,0,83,255,10,102,252,233,252,234,252,235,252,236,252, - 0,21,252,0,25,252,0,27,252,0,29,252,31,45,240,47,240,98,254,102, - 254,112,254,225,254,226,254,227,254,228,254,229,254,230,254,233, - 254,234,254,235,254,236,254,243,254,244,254,245,254,246,254,247, - 254,249,254,0,3,254,0,5,254,0,7,254,0,21,254,0,25,254,0,27,254,0, - 29,254,0,79,254,0,83,254,19,102,254,112,254,233,254,234,254,235, - 254,236,254,243,254,244,254,245,254,246,254,247,254,249,254,0,21, - 254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,49,68,252,72,252, - 80,252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250, - 120,250,122,250,200,252,211,252,212,252,213,252,214,252,215,252, - 217,252,218,249,219,249,220,249,221,249,222,240,250,252,251,252, - 252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252, - 0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112, - 249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240, - 49,68,252,72,252,80,252,82,252,85,237,86,249,87,245,88,249,90,240, - 118,252,119,250,120,250,122,250,200,252,211,252,212,252,213,252, - 214,252,215,252,217,252,218,249,219,249,220,249,221,249,222,240, - 250,252,251,252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252, - 0,32,252,0,36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,240,49,68,252,72,252,80,252,82,252,85,237,86,249,87,245, - 88,249,90,240,118,252,119,250,120,250,122,250,200,252,211,252,212, - 252,213,252,214,252,215,252,217,252,218,249,219,249,220,249,221, - 249,222,240,250,252,251,252,252,252,253,252,254,250,0,1,250,0,8, - 252,0,14,252,0,32,252,0,36,252,0,78,252,0,82,252,0,100,237,0,102, - 237,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252, - 0,116,249,0,117,252,0,122,240,49,68,252,72,252,80,252,82,252,85, - 237,86,249,87,245,88,249,90,240,118,252,119,250,120,250,122,250, - 200,252,211,252,212,252,213,252,214,252,215,252,217,252,218,249, - 219,249,220,249,221,249,222,240,250,252,251,252,252,252,253,252, - 254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252,0,78,252,0,82, - 252,0,100,237,0,102,237,0,108,249,0,109,252,0,112,249,0,113,252, - 0,114,249,0,115,252,0,116,249,0,117,252,0,122,240,49,68,252,72,252, - 80,252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250, - 120,250,122,250,200,252,211,252,212,252,213,252,214,252,215,252, - 217,252,218,249,219,249,220,249,221,249,222,240,250,252,251,252, - 252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252, - 0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112, - 249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240, - 49,68,252,72,252,80,252,82,252,85,237,86,249,87,245,88,249,90,240, - 118,252,119,250,120,250,122,250,200,252,211,252,212,252,213,252, - 214,252,215,252,217,252,218,249,219,249,220,249,221,249,222,240, - 250,252,251,252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252, - 0,32,252,0,36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,240,3,45,252,47,252,22,45,250,47,250,66,254,85,250,87, - 249,88,252,89,247,90,245,193,254,194,254,195,254,196,254,197,254, - 198,254,222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102,250,0,122, - 245,22,45,250,47,250,66,254,85,250,87,249,88,252,89,247,90,245,193, - 254,194,254,195,254,196,254,197,254,198,254,222,245,0,2,254,0,4, - 254,0,6,254,0,100,250,0,102,250,0,122,245,22,45,250,47,250,66,254, - 85,250,87,249,88,252,89,247,90,245,193,254,194,254,195,254,196,254, - 197,254,198,254,222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102, - 250,0,122,245,22,45,250,47,250,66,254,85,250,87,249,88,252,89,247, - 90,245,193,254,194,254,195,254,196,254,197,254,198,254,222,245,0, - 2,254,0,4,254,0,6,254,0,100,250,0,102,250,0,122,245,22,45,250,47, - 250,66,254,85,250,87,249,88,252,89,247,90,245,193,254,194,254,195, - 254,196,254,197,254,198,254,222,245,0,2,254,0,4,254,0,6,254,0,100, - 250,0,102,250,0,122,245,22,45,250,47,250,66,254,85,250,87,249,88, - 252,89,247,90,245,193,254,194,254,195,254,196,254,197,254,198,254, - 222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102,250,0,122,245,13, - 45,250,47,250,66,250,193,250,194,250,195,250,196,250,197,250,198, - 250,0,2,250,0,4,250,0,6,250,13,45,250,47,250,66,250,193,250,194, - 250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,13,45, - 250,47,250,66,250,193,250,194,250,195,250,196,250,197,250,198,250, - 0,2,250,0,4,250,0,6,250,13,45,250,47,250,66,250,193,250,194,250, - 195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,65,45,234, - 46,234,47,234,59,247,60,247,66,239,80,243,98,234,102,234,106,254, - 112,234,118,239,193,239,194,239,195,239,196,239,197,239,198,239, - 211,243,212,243,213,243,214,243,215,243,217,243,225,234,226,234, - 227,234,228,245,229,234,230,234,233,234,234,234,235,234,236,234, - 238,254,243,234,244,234,245,234,246,234,247,234,249,234,250,239, - 251,239,252,239,253,239,0,2,239,0,3,245,0,4,239,0,5,245,0,6,239, - 0,7,234,0,21,245,0,25,234,0,27,234,0,29,234,0,49,254,0,78,243,0, - 79,245,0,82,243,0,83,234,0,109,239,0,113,239,0,115,239,0,117,239, - 6,119,254,120,254,122,252,254,252,0,1,252,6,119,254,120,254,122, - 252,254,252,0,1,252,6,119,254,120,254,122,252,254,252,0,1,252,6, - 119,254,120,254,122,252,254,252,0,1,252,6,119,254,120,254,122,252, - 254,252,0,1,252,6,119,254,120,254,122,252,254,252,0,1,252,4,45,254, - 108,254,0,57,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,14,118,255,119,254,122,254,250,255,251,255,252,255, - 253,255,254,254,0,1,254,0,109,255,0,113,255,0,115,255,0,117,255, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 95,45,241,47,241,98,248,99,248,100,248,101,248,102,248,103,248,104, - 248,105,248,106,248,107,248,108,248,109,248,110,248,111,248,112, - 248,113,248,114,248,115,248,116,248,117,248,118,248,119,245,120, - 245,121,243,122,245,123,248,225,248,226,248,227,248,228,248,229, - 248,230,248,232,248,233,248,234,248,235,248,236,248,237,248,238, - 248,239,248,240,248,242,248,243,248,244,248,245,248,246,248,247, - 248,249,248,250,248,251,248,252,248,253,248,254,245,0,1,245,0,3, - 248,0,5,248,0,7,248,0,9,248,0,15,248,0,19,248,0,21,248,0,25,248, - 0,27,248,0,29,248,0,33,248,0,37,248,0,45,248,0,49,248,0,57,248,0, - 60,248,0,62,248,0,68,248,0,70,248,0,72,248,0,74,248,0,79,248,0,83, - 248,0,87,248,0,89,248,0,91,248,0,93,248,0,97,248,0,99,248,0,101, - 248,0,109,248,0,113,248,0,115,248,0,117,248,0,124,248,0,126,248, - 0,128,248,1,2,25,248,31,45,240,47,240,98,254,102,254,112,254,225, - 254,226,254,227,254,228,254,229,254,230,254,233,254,234,254,235, - 254,236,254,243,254,244,254,245,254,246,254,247,254,249,254,0,3, - 254,0,5,254,0,7,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254, - 0,83,254,31,45,240,47,240,98,254,102,254,112,254,225,254,226,254, - 227,254,228,254,229,254,230,254,233,254,234,254,235,254,236,254, - 243,254,244,254,245,254,246,254,247,254,249,254,0,3,254,0,5,254, - 0,7,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,49, - 68,252,72,252,80,252,82,252,85,237,86,249,87,245,88,249,90,240,118, - 252,119,250,120,250,122,250,200,252,211,252,212,252,213,252,214, - 252,215,252,217,252,218,249,219,249,220,249,221,249,222,240,250, - 252,251,252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32, - 252,0,36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109, - 252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252, - 0,122,240,6,119,254,120,254,122,252,254,252,0,1,252,49,68,252,72, - 252,80,252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119, - 250,120,250,122,250,200,252,211,252,212,252,213,252,214,252,215, - 252,217,252,218,249,219,249,220,249,221,249,222,240,250,252,251, - 252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0, - 36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252, - 0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122, - 240,6,119,254,120,254,122,252,254,252,0,1,252,49,68,252,72,252,80, - 252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250,120, - 250,122,250,200,252,211,252,212,252,213,252,214,252,215,252,217, - 252,218,249,219,249,220,249,221,249,222,240,250,252,251,252,252, - 252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252,0, - 78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112,249, - 0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240,6,119, - 254,120,254,122,252,254,252,0,1,252,3,45,252,47,252,4,45,254,108, - 254,0,57,254,3,45,252,47,252,4,45,254,108,254,0,57,254,18,45,245, - 47,245,66,250,87,245,88,250,90,242,193,250,194,250,195,250,196,250, - 197,250,198,250,222,242,0,2,250,0,4,250,0,6,250,0,122,242,18,45, - 245,47,245,66,250,87,245,88,250,90,242,193,250,194,250,195,250,196, - 250,197,250,198,250,222,242,0,2,250,0,4,250,0,6,250,0,122,242,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,5, - 115,255,0,87,255,0,89,255,0,91,255,5,115,255,0,87,255,0,89,255,0, - 91,255,40,80,249,102,250,112,250,118,252,122,249,211,249,212,249, - 213,249,214,249,215,249,217,249,233,250,234,250,235,250,236,250, - 243,250,244,250,245,250,246,250,247,250,249,250,250,252,251,252, - 252,252,253,252,254,249,0,1,249,0,21,250,0,25,250,0,27,250,0,29, - 250,0,78,249,0,79,250,0,82,249,0,83,250,0,109,252,0,113,252,0,115, - 252,0,117,252,19,102,254,112,254,233,254,234,254,235,254,236,254, - 243,254,244,254,245,254,246,254,247,254,249,254,0,21,254,0,25,254, - 0,27,254,0,29,254,0,79,254,0,83,254,14,85,239,87,239,88,245,90,234, - 122,252,222,234,254,252,0,1,252,0,100,239,0,102,239,0,122,234,1, - 32,25,230,1,32,29,234,14,85,239,87,239,88,245,90,234,122,252,222, - 234,254,252,0,1,252,0,100,239,0,102,239,0,122,234,1,32,25,230,1, - 32,29,234,14,85,239,87,239,88,245,90,234,122,252,222,234,254,252, - 0,1,252,0,100,239,0,102,239,0,122,234,1,32,25,230,1,32,29,234,14, - 85,239,87,239,88,245,90,234,122,252,222,234,254,252,0,1,252,0,100, - 239,0,102,239,0,122,234,1,32,25,230,1,32,29,234,14,118,255,119,254, - 122,254,250,255,251,255,252,255,253,255,254,254,0,1,254,0,109,255, - 0,113,255,0,115,255,0,117,255,14,118,255,119,254,122,254,250,255, - 251,255,252,255,253,255,254,254,0,1,254,0,109,255,0,113,255,0,115, - 255,0,117,255,14,118,255,119,254,122,254,250,255,251,255,252,255, - 253,255,254,254,0,1,254,0,109,255,0,113,255,0,115,255,0,117,255, - 22,45,250,47,250,66,254,85,250,87,249,88,252,89,247,90,245,193,254, - 194,254,195,254,196,254,197,254,198,254,222,245,0,2,254,0,4,254, - 0,6,254,0,100,250,0,102,250,0,122,245,9,45,250,47,250,119,254,120, - 254,121,252,122,252,254,252,0,1,252,22,45,250,47,250,66,254,85,250, - 87,249,88,252,89,247,90,245,193,254,194,254,195,254,196,254,197, - 254,198,254,222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102,250, - 0,122,245,9,45,250,47,250,119,254,120,254,121,252,122,252,254,252, - 0,1,252,27,80,254,85,252,86,250,87,249,88,252,90,249,211,254,212, - 254,213,254,214,254,215,254,217,254,218,250,219,250,220,250,221, - 250,222,249,0,78,254,0,82,254,0,100,252,0,102,252,0,108,250,0,112, - 250,0,114,250,0,116,250,0,122,249,50,45,249,47,249,59,5,60,5,98, - 255,106,3,108,3,109,3,110,4,111,4,113,5,117,7,118,3,119,5,122,5, - 225,255,226,255,227,255,228,255,229,255,230,255,237,3,238,3,239, - 3,240,3,242,4,250,3,251,3,252,3,253,3,254,5,0,1,5,0,3,255,0,5,255, - 0,7,255,0,45,3,0,49,3,0,57,3,0,60,3,0,62,3,0,68,3,0,70,4,0,72,4, - 0,74,4,0,101,7,0,109,3,0,113,3,0,115,3,0,117,3,27,80,254,85,252, - 86,250,87,249,88,252,90,249,211,254,212,254,213,254,214,254,215, - 254,217,254,218,250,219,250,220,250,221,250,222,249,0,78,254,0,82, - 254,0,100,252,0,102,252,0,108,250,0,112,250,0,114,250,0,116,250, - 0,122,249,50,45,249,47,249,59,5,60,5,98,255,106,3,108,3,109,3,110, - 4,111,4,113,5,117,7,118,3,119,5,122,5,225,255,226,255,227,255,228, - 255,229,255,230,255,237,3,238,3,239,3,240,3,242,4,250,3,251,3,252, - 3,253,3,254,5,0,1,5,0,3,255,0,5,255,0,7,255,0,45,3,0,49,3,0,57,3, - 0,60,3,0,62,3,0,68,3,0,70,4,0,72,4,0,74,4,0,101,7,0,109,3,0,113, - 3,0,115,3,0,117,3,27,80,254,85,252,86,250,87,249,88,252,90,249,211, - 254,212,254,213,254,214,254,215,254,217,254,218,250,219,250,220, - 250,221,250,222,249,0,78,254,0,82,254,0,100,252,0,102,252,0,108, - 250,0,112,250,0,114,250,0,116,250,0,122,249,50,45,249,47,249,59, - 5,60,5,98,255,106,3,108,3,109,3,110,4,111,4,113,5,117,7,118,3,119, - 5,122,5,225,255,226,255,227,255,228,255,229,255,230,255,237,3,238, - 3,239,3,240,3,242,4,250,3,251,3,252,3,253,3,254,5,0,1,5,0,3,255, - 0,5,255,0,7,255,0,45,3,0,49,3,0,57,3,0,60,3,0,62,3,0,68,3,0,70,4, - 0,72,4,0,74,4,0,101,7,0,109,3,0,113,3,0,115,3,0,117,3,3,45,254,47, - 254,4,45,254,47,254,120,252,3,45,254,47,254,4,45,254,47,254,120, - 252,3,45,254,47,254,4,45,254,47,254,120,252,70,45,237,46,234,47, - 237,59,254,60,254,66,237,80,250,98,237,102,237,112,237,115,237,118, - 237,120,237,122,237,193,237,194,237,195,237,196,237,197,237,198, - 237,211,250,212,250,213,250,214,250,215,250,217,250,225,237,226, - 237,227,237,228,247,229,237,230,237,233,247,234,237,235,237,236, - 237,243,237,244,237,245,237,246,247,247,237,249,237,250,237,251, - 237,252,237,253,237,254,237,0,1,247,0,2,237,0,3,247,0,4,237,0,5, - 247,0,6,237,0,7,237,0,21,247,0,25,237,0,27,237,0,29,237,0,78,250, - 0,79,247,0,82,250,0,83,237,0,87,237,0,89,237,0,91,237,0,109,247, - 0,113,237,0,115,237,0,117,237,70,45,237,46,234,47,237,59,254,60, - 254,66,237,80,250,98,237,102,237,112,237,115,237,118,237,120,237, - 122,237,193,237,194,237,195,237,196,237,197,237,198,237,211,250, - 212,250,213,250,214,250,215,250,217,250,225,237,226,237,227,237, - 228,247,229,237,230,237,233,247,234,237,235,237,236,237,243,237, - 244,237,245,237,246,247,247,237,249,237,250,237,251,237,252,237, - 253,237,254,237,0,1,247,0,2,237,0,3,247,0,4,237,0,5,247,0,6,237, - 0,7,237,0,21,247,0,25,237,0,27,237,0,29,237,0,78,250,0,79,247,0, - 82,250,0,83,237,0,87,237,0,89,237,0,91,237,0,109,247,0,113,237,0, - 115,237,0,117,237,13,45,250,47,250,66,250,193,250,194,250,195,250, - 196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,13,45,250,47,250, - 66,250,193,250,194,250,195,250,196,250,197,250,198,250,0,2,250,0, - 4,250,0,6,250,13,45,250,47,250,66,250,193,250,194,250,195,250,196, - 250,197,250,198,250,0,2,250,0,4,250,0,6,250,13,45,250,47,250,66, - 250,193,250,194,250,195,250,196,250,197,250,198,250,0,2,250,0,4, - 250,0,6,250,65,45,234,46,234,47,234,59,247,60,247,66,239,80,243, - 98,234,102,234,106,254,112,234,118,239,193,239,194,239,195,239,196, - 239,197,239,198,239,211,243,212,243,213,243,214,243,215,243,217, - 243,225,234,226,234,227,234,228,245,229,234,230,234,233,234,234, - 234,235,234,236,234,238,254,243,234,244,234,245,234,246,234,247, - 234,249,234,250,239,251,239,252,239,253,239,0,2,239,0,3,245,0,4, - 239,0,5,245,0,6,239,0,7,234,0,21,245,0,25,234,0,27,234,0,29,234, - 0,49,254,0,78,243,0,79,234,0,82,243,0,83,234,0,109,239,0,113,239, - 0,115,239,0,117,239,19,102,254,112,254,233,254,234,254,235,254,236, - 254,243,254,244,254,245,254,246,254,247,254,249,254,0,21,254,0,25, - 254,0,27,254,0,29,254,0,79,254,0,83,254,19,102,254,112,254,233,254, - 234,254,235,254,236,254,243,254,244,254,245,254,246,254,247,254, - 249,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,19, - 102,254,112,254,233,254,234,254,235,254,236,254,243,254,244,254, - 245,254,246,254,247,254,249,254,0,21,254,0,25,254,0,27,254,0,29, - 254,0,79,254,0,83,254,3,45,254,47,254,4,45,254,47,254,120,252,2, - 1,32,24,247,14,33,245,101,249,115,249,116,249,0,19,249,0,87,249, - 0,89,249,0,91,249,0,93,249,0,97,249,0,99,249,1,2,25,249,1,32,25, - 247,2,33,250 +static afm_cuint8 afm_Helvetica_kerning_data[] = { /* 6450 */ + 42, 11, 85, 249, 87, 249, 88, 250, 90, 242, 222, 242, 0, 100, 249, 0, 102, + 249, 0, + 122, 242, 1, 32, 24, 247, 1, 32, 28, 252, 3, 1, 32, 25, 240, 1, 32, 29, + 240, 4, 33, 247, + 1, 32, 25, 240, 1, 32, 29, 240, 2, 33, 249, 2, 33, 249, 49, 68, 252, 72, + 252, 80, 252, + 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, 119, 250, + 120, 250, + 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, + 252, + 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, 252, 252, + 252, + 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, 252, 0, 36, + 252, 0, 78, + 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, 252, 0, + 112, 249, 0, + 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 240, + 12, 45, + 254, 47, 254, 86, 255, 218, 255, 219, 255, 220, 255, 221, 255, 0, 108, + 255, 0, 112, + 255, 0, 114, 255, 0, 116, 255, 3, 45, 252, 47, 252, 18, 45, 245, 47, 245, + 66, 250, + 87, 245, 88, 250, 90, 242, 193, 250, 194, 250, 195, 250, 196, 250, 197, + 250, 198, + 250, 222, 242, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 242, 45, 45, 232, + 47, 232, 66, + 244, 98, 249, 102, 252, 112, 252, 115, 249, 193, 244, 194, 244, 195, 244, + 196, 244, + 197, 244, 198, 244, 225, 249, 226, 249, 227, 249, 228, 249, 229, 249, 230, + 249, + 233, 252, 234, 252, 235, 252, 236, 252, 243, 252, 244, 252, 245, 252, 246, + 252, + 247, 252, 249, 252, 0, 2, 244, 0, 3, 249, 0, 4, 244, 0, 5, 249, 0, 6, 244, + 0, 7, 249, + 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 0, 79, 252, 0, 83, 252, 0, + 87, 249, 0, + 89, 249, 0, 91, 249, 32, 45, 252, 47, 252, 66, 254, 98, 254, 118, 254, + 193, 254, 194, + 254, 195, 254, 196, 254, 197, 254, 198, 254, 225, 254, 226, 254, 227, 254, + 228, + 254, 229, 254, 230, 254, 250, 254, 251, 254, 252, 254, 253, 254, 0, 2, + 254, 0, 3, + 254, 0, 4, 254, 0, 5, 254, 0, 6, 254, 0, 7, 254, 0, 109, 254, 0, 113, 254, + 0, 115, 254, + 0, 117, 254, 40, 80, 249, 102, 250, 112, 250, 118, 252, 122, 249, 211, + 249, 212, + 249, 213, 249, 214, 249, 215, 249, 217, 249, 233, 250, 234, 250, 235, 250, + 236, + 250, 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, 249, 250, 250, 252, + 251, + 252, 252, 252, 253, 252, 254, 249, 0, 1, 249, 0, 21, 250, 0, 25, 250, 0, + 27, 250, 0, + 29, 250, 0, 78, 249, 0, 79, 250, 0, 82, 249, 0, 83, 250, 0, 109, 252, 0, + 113, 252, 0, + 115, 252, 0, 117, 252, 14, 85, 239, 87, 239, 88, 245, 90, 234, 122, 252, + 222, 234, + 254, 252, 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, 234, 1, 32, 25, + 230, 1, 32, 29, + 234, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, + 90, 245, 193, + 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, + 254, 0, 4, + 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 41, 45, 227, 47, + 227, 66, 237, + 98, 250, 102, 249, 112, 249, 193, 237, 194, 237, 195, 237, 196, 237, 197, + 237, 198, + 237, 225, 250, 226, 250, 227, 250, 228, 250, 229, 250, 230, 250, 233, 249, + 234, + 249, 235, 249, 236, 249, 243, 249, 244, 249, 245, 249, 246, 249, 247, 249, + 249, + 249, 0, 2, 237, 0, 3, 250, 0, 4, 237, 0, 5, 250, 0, 6, 237, 0, 7, 250, 0, + 21, 249, 0, 25, + 249, 0, 27, 249, 0, 29, 249, 0, 79, 249, 0, 83, 249, 10, 86, 255, 218, + 255, 219, 255, + 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, + 27, 80, 254, + 85, 252, 86, 250, 87, 249, 88, 252, 90, 249, 211, 254, 212, 254, 213, 254, + 214, 254, + 215, 254, 217, 254, 218, 250, 219, 250, 220, 250, 221, 250, 222, 249, 0, + 78, 254, + 0, 82, 254, 0, 100, 252, 0, 102, 252, 0, 108, 250, 0, 112, 250, 0, 114, + 250, 0, 116, + 250, 0, 122, 249, 3, 45, 254, 47, 254, 70, 45, 237, 46, 234, 47, 237, 59, + 254, 60, + 254, 66, 237, 80, 250, 98, 237, 102, 237, 112, 237, 115, 237, 118, 237, + 120, 237, + 122, 237, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 237, 226, 237, 227, + 237, + 228, 247, 229, 237, 230, 237, 233, 247, 234, 237, 235, 237, 236, 237, 243, + 237, + 244, 237, 245, 237, 246, 247, 247, 237, 249, 237, 250, 237, 251, 237, 252, + 237, + 253, 237, 254, 237, 0, 1, 247, 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 247, + 0, 6, 237, + 0, 7, 237, 0, 21, 247, 0, 25, 237, 0, 27, 237, 0, 29, 237, 0, 78, 250, 0, + 79, 247, 0, + 82, 250, 0, 83, 237, 0, 87, 237, 0, 89, 237, 0, 91, 237, 0, 109, 247, 0, + 113, 237, 0, + 115, 237, 0, 117, 237, 13, 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, + 195, 250, + 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 65, 45, + 236, 46, 244, + 47, 236, 59, 250, 60, 250, 66, 244, 72, 250, 80, 250, 98, 245, 102, 244, + 112, 244, + 118, 245, 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 245, 226, 245, 227, + 245, + 228, 245, 229, 245, 230, 245, 233, 244, 234, 244, 235, 244, 236, 244, 243, + 244, + 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, 245, 251, 245, 252, + 245, + 253, 245, 0, 2, 244, 0, 3, 245, 0, 4, 244, 0, 5, 245, 0, 6, 244, 0, 7, + 245, 0, 21, 244, + 0, 25, 244, 0, 27, 244, 0, 29, 244, 0, 32, 250, 0, 36, 250, 0, 78, 250, 0, + 79, 244, 0, + 82, 250, 0, 83, 244, 0, 109, 245, 0, 113, 245, 0, 115, 245, 0, 117, 245, + 63, 45, 244, + 46, 250, 47, 244, 66, 249, 80, 254, 98, 250, 102, 252, 112, 252, 118, 252, + 122, 254, + 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 211, 254, 212, + 254, + 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, 226, 250, 227, 250, 228, + 250, + 229, 250, 230, 250, 233, 252, 234, 252, 235, 252, 236, 252, 243, 252, 244, + 252, + 245, 252, 246, 252, 247, 252, 249, 252, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 254, 0, 1, 254, 0, 2, 249, 0, 3, 250, 0, 4, 249, 0, 5, 250, 0, 6, + 249, 0, 7, 250, + 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 0, 78, 254, 0, 79, 252, 0, + 82, 254, 0, + 83, 252, 0, 109, 252, 0, 113, 252, 0, 115, 252, 0, 117, 252, 65, 45, 234, + 46, 234, + 47, 234, 59, 247, 60, 247, 66, 239, 80, 243, 98, 234, 102, 234, 106, 254, + 112, 234, + 118, 239, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, + 243, + 212, 243, 213, 243, 214, 243, 215, 243, 217, 243, 225, 234, 226, 234, 227, + 234, + 228, 234, 229, 234, 230, 234, 233, 234, 234, 234, 235, 234, 236, 234, 238, + 254, + 243, 234, 244, 234, 245, 234, 246, 234, 247, 234, 249, 234, 250, 239, 251, + 239, + 252, 239, 253, 239, 0, 2, 239, 0, 3, 245, 0, 4, 239, 0, 5, 245, 0, 6, 239, + 0, 7, 234, + 0, 21, 245, 0, 25, 234, 0, 27, 234, 0, 29, 234, 0, 49, 254, 0, 78, 243, 0, + 79, 234, 0, + 82, 243, 0, 83, 234, 0, 109, 239, 0, 113, 239, 0, 115, 239, 0, 117, 239, + 6, 119, 254, + 120, 254, 122, 252, 254, 252, 0, 1, 252, 21, 45, 250, 47, 250, 99, 255, + 109, 254, + 118, 254, 119, 254, 122, 254, 250, 254, 251, 254, 252, 254, 253, 254, 254, + 254, + 0, 1, 254, 0, 60, 254, 0, 62, 254, 0, 68, 254, 0, 109, 254, 0, 113, 254, + 0, 115, 254, + 0, 117, 254, 4, 45, 254, 108, 254, 0, 57, 254, 9, 45, 254, 47, 254, 119, + 252, 120, + 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, 34, 45, 252, 47, 252, 98, + 252, 102, + 252, 112, 252, 225, 252, 226, 252, 227, 252, 228, 252, 229, 252, 230, 252, + 233, + 252, 234, 252, 235, 252, 236, 252, 243, 252, 244, 252, 245, 252, 246, 252, + 247, + 252, 249, 252, 0, 3, 252, 0, 5, 252, 0, 7, 252, 0, 21, 252, 0, 25, 252, 0, + 27, 252, 0, + 29, 252, 0, 51, 252, 0, 79, 252, 0, 83, 252, 1, 32, 25, 8, 1, 32, 29, 10, + 5, 115, 255, + 0, 87, 255, 0, 89, 255, 0, 91, 255, 4, 122, 252, 254, 252, 0, 1, 252, 19, + 102, 254, + 112, 254, 233, 254, 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, + 254, + 246, 254, 247, 254, 249, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, + 254, 0, 79, + 254, 0, 83, 254, 13, 118, 255, 122, 254, 250, 255, 251, 255, 252, 255, + 253, 255, + 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, + 14, 118, 255, + 119, 254, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, + 1, 254, + 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 9, 45, 250, 47, 250, + 119, 254, + 120, 254, 121, 252, 122, 252, 254, 252, 0, 1, 252, 6, 45, 251, 47, 251, + 122, 252, + 254, 252, 0, 1, 252, 50, 45, 249, 47, 249, 59, 5, 60, 5, 98, 255, 106, 3, + 108, 3, 109, + 3, 110, 4, 111, 4, 113, 5, 117, 7, 118, 3, 119, 5, 122, 5, 225, 255, 226, + 255, 227, + 255, 228, 255, 229, 255, 230, 255, 237, 3, 238, 3, 239, 3, 240, 3, 242, 4, + 250, 3, + 251, 3, 252, 3, 253, 3, 254, 5, 0, 1, 5, 0, 3, 255, 0, 5, 255, 0, 7, 255, + 0, 45, 3, 0, 49, + 3, 0, 57, 3, 0, 60, 3, 0, 62, 3, 0, 68, 3, 0, 70, 4, 0, 72, 4, 0, 74, 4, + 0, 101, 7, 0, 109, + 3, 0, 113, 3, 0, 115, 3, 0, 117, 3, 4, 45, 254, 47, 254, 120, 252, 31, 45, + 244, 47, 244, + 98, 253, 102, 253, 112, 253, 225, 253, 226, 253, 227, 253, 228, 253, 229, + 253, 230, + 253, 233, 253, 234, 253, 235, 253, 236, 253, 243, 253, 244, 253, 245, 253, + 246, + 253, 247, 253, 249, 253, 0, 3, 253, 0, 5, 253, 0, 7, 253, 0, 21, 253, 0, + 25, 253, 0, + 27, 253, 0, 29, 253, 0, 79, 253, 0, 83, 253, 31, 45, 247, 47, 247, 98, + 254, 102, 255, + 112, 255, 225, 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, 233, + 255, + 234, 255, 235, 255, 236, 255, 243, 255, 244, 255, 245, 255, 246, 255, 247, + 255, + 249, 255, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 21, 255, 0, 25, 255, 0, 27, + 255, 0, 29, + 255, 0, 79, 255, 0, 83, 255, 10, 102, 252, 233, 252, 234, 252, 235, 252, + 236, 252, + 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 31, 45, 240, 47, 240, 98, + 254, 102, + 254, 112, 254, 225, 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, + 233, + 254, 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, + 247, + 254, 249, 254, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 21, 254, 0, 25, 254, 0, + 27, 254, 0, + 29, 254, 0, 79, 254, 0, 83, 254, 19, 102, 254, 112, 254, 233, 254, 234, + 254, 235, + 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, + 0, 21, + 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 49, 68, + 252, 72, 252, + 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, + 119, 250, + 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, + 252, + 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, + 252, 0, 36, 252, + 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, + 252, 0, 112, + 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, + 122, 240, + 49, 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, + 249, 90, 240, + 118, 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, + 252, + 214, 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 240, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, + 14, 252, + 0, 32, 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 240, 49, 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, + 249, 87, 245, + 88, 249, 90, 240, 118, 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, + 252, 212, + 252, 213, 252, 214, 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 240, 250, 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, + 250, 0, 8, + 252, 0, 14, 252, 0, 32, 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, + 237, 0, 102, + 237, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, + 115, 252, + 0, 116, 249, 0, 117, 252, 0, 122, 240, 49, 68, 252, 72, 252, 80, 252, 82, + 252, 85, + 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, 119, 250, 120, 250, + 122, 250, + 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 218, + 249, + 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, 252, 0, 36, 252, 0, 78, + 252, 0, 82, + 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, + 113, 252, + 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 240, 49, 68, + 252, 72, 252, + 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, + 119, 250, + 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, + 252, + 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, + 252, 0, 36, 252, + 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, + 252, 0, 112, + 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, + 122, 240, + 49, 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, + 249, 90, 240, + 118, 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, + 252, + 214, 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 240, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, + 14, 252, + 0, 32, 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 240, 3, 45, 252, 47, 252, 22, 45, 250, 47, 250, 66, 254, 85, + 250, 87, + 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, 196, 254, + 197, 254, + 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, 102, + 250, 0, 122, + 245, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, + 90, 245, 193, + 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, + 254, 0, 4, + 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, + 250, 66, 254, + 85, 250, 87, 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, + 196, 254, + 197, 254, 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, + 250, 0, 102, + 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, + 252, 89, 247, + 90, 245, 193, 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, + 245, 0, + 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, + 45, 250, 47, + 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, + 254, 195, + 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, + 254, 0, 100, + 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, + 249, 88, + 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, 196, 254, 197, 254, + 198, 254, + 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, + 122, 245, 13, + 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, + 250, 198, + 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 250, 47, 250, 66, 250, 193, + 250, 194, + 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, + 250, 13, 45, + 250, 47, 250, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, + 198, 250, + 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 250, 47, 250, 66, 250, 193, 250, + 194, 250, + 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, + 65, 45, 234, + 46, 234, 47, 234, 59, 247, 60, 247, 66, 239, 80, 243, 98, 234, 102, 234, + 106, 254, + 112, 234, 118, 239, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, + 239, + 211, 243, 212, 243, 213, 243, 214, 243, 215, 243, 217, 243, 225, 234, 226, + 234, + 227, 234, 228, 245, 229, 234, 230, 234, 233, 234, 234, 234, 235, 234, 236, + 234, + 238, 254, 243, 234, 244, 234, 245, 234, 246, 234, 247, 234, 249, 234, 250, + 239, + 251, 239, 252, 239, 253, 239, 0, 2, 239, 0, 3, 245, 0, 4, 239, 0, 5, 245, + 0, 6, 239, + 0, 7, 234, 0, 21, 245, 0, 25, 234, 0, 27, 234, 0, 29, 234, 0, 49, 254, 0, + 78, 243, 0, + 79, 245, 0, 82, 243, 0, 83, 234, 0, 109, 239, 0, 113, 239, 0, 115, 239, 0, + 117, 239, + 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 6, 119, 254, 120, + 254, 122, + 252, 254, 252, 0, 1, 252, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, + 252, 6, + 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 6, 119, 254, 120, 254, + 122, 252, + 254, 252, 0, 1, 252, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, + 4, 45, 254, + 108, 254, 0, 57, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 14, 118, 255, 119, 254, 122, 254, 250, 255, 251, 255, + 252, 255, + 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, + 117, 255, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 95, 45, 241, 47, 241, 98, 248, 99, 248, 100, 248, 101, 248, 102, 248, 103, + 248, 104, + 248, 105, 248, 106, 248, 107, 248, 108, 248, 109, 248, 110, 248, 111, 248, + 112, + 248, 113, 248, 114, 248, 115, 248, 116, 248, 117, 248, 118, 248, 119, 245, + 120, + 245, 121, 243, 122, 245, 123, 248, 225, 248, 226, 248, 227, 248, 228, 248, + 229, + 248, 230, 248, 232, 248, 233, 248, 234, 248, 235, 248, 236, 248, 237, 248, + 238, + 248, 239, 248, 240, 248, 242, 248, 243, 248, 244, 248, 245, 248, 246, 248, + 247, + 248, 249, 248, 250, 248, 251, 248, 252, 248, 253, 248, 254, 245, 0, 1, + 245, 0, 3, + 248, 0, 5, 248, 0, 7, 248, 0, 9, 248, 0, 15, 248, 0, 19, 248, 0, 21, 248, + 0, 25, 248, + 0, 27, 248, 0, 29, 248, 0, 33, 248, 0, 37, 248, 0, 45, 248, 0, 49, 248, 0, + 57, 248, 0, + 60, 248, 0, 62, 248, 0, 68, 248, 0, 70, 248, 0, 72, 248, 0, 74, 248, 0, + 79, 248, 0, 83, + 248, 0, 87, 248, 0, 89, 248, 0, 91, 248, 0, 93, 248, 0, 97, 248, 0, 99, + 248, 0, 101, + 248, 0, 109, 248, 0, 113, 248, 0, 115, 248, 0, 117, 248, 0, 124, 248, 0, + 126, 248, + 0, 128, 248, 1, 2, 25, 248, 31, 45, 240, 47, 240, 98, 254, 102, 254, 112, + 254, 225, + 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, 233, 254, 234, 254, + 235, + 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, + 0, 3, + 254, 0, 5, 254, 0, 7, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, + 0, 79, 254, + 0, 83, 254, 31, 45, 240, 47, 240, 98, 254, 102, 254, 112, 254, 225, 254, + 226, 254, + 227, 254, 228, 254, 229, 254, 230, 254, 233, 254, 234, 254, 235, 254, 236, + 254, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 3, 254, 0, + 5, 254, + 0, 7, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, + 83, 254, 49, + 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, + 90, 240, 118, + 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, + 214, + 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, + 250, + 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, + 252, 0, 32, + 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, + 249, 0, 109, + 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, + 117, 252, + 0, 122, 240, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 49, 68, + 252, 72, + 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, + 252, 119, + 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, + 215, + 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, + 251, + 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, + 32, 252, 0, + 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, + 109, 252, + 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, + 252, 0, 122, + 240, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 49, 68, 252, + 72, 252, 80, + 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, 119, + 250, 120, + 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, + 217, + 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, 252, 0, + 36, 252, 0, + 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, 252, + 0, 112, 249, + 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, + 240, 6, 119, + 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 3, 45, 252, 47, 252, 4, 45, + 254, 108, + 254, 0, 57, 254, 3, 45, 252, 47, 252, 4, 45, 254, 108, 254, 0, 57, 254, + 18, 45, 245, + 47, 245, 66, 250, 87, 245, 88, 250, 90, 242, 193, 250, 194, 250, 195, 250, + 196, 250, + 197, 250, 198, 250, 222, 242, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, + 242, 18, 45, + 245, 47, 245, 66, 250, 87, 245, 88, 250, 90, 242, 193, 250, 194, 250, 195, + 250, 196, + 250, 197, 250, 198, 250, 222, 242, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, + 122, 242, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 5, + 115, 255, 0, 87, 255, 0, 89, 255, 0, 91, 255, 5, 115, 255, 0, 87, 255, 0, + 89, 255, 0, + 91, 255, 40, 80, 249, 102, 250, 112, 250, 118, 252, 122, 249, 211, 249, + 212, 249, + 213, 249, 214, 249, 215, 249, 217, 249, 233, 250, 234, 250, 235, 250, 236, + 250, + 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, 249, 250, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 249, 0, 1, 249, 0, 21, 250, 0, 25, 250, 0, 27, + 250, 0, 29, + 250, 0, 78, 249, 0, 79, 250, 0, 82, 249, 0, 83, 250, 0, 109, 252, 0, 113, + 252, 0, 115, + 252, 0, 117, 252, 19, 102, 254, 112, 254, 233, 254, 234, 254, 235, 254, + 236, 254, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, 254, 0, + 25, 254, + 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 14, 85, 239, 87, 239, 88, + 245, 90, 234, + 122, 252, 222, 234, 254, 252, 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, + 234, 1, + 32, 25, 230, 1, 32, 29, 234, 14, 85, 239, 87, 239, 88, 245, 90, 234, 122, + 252, 222, + 234, 254, 252, 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, 234, 1, 32, + 25, 230, 1, + 32, 29, 234, 14, 85, 239, 87, 239, 88, 245, 90, 234, 122, 252, 222, 234, + 254, 252, + 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, 234, 1, 32, 25, 230, 1, 32, + 29, 234, 14, + 85, 239, 87, 239, 88, 245, 90, 234, 122, 252, 222, 234, 254, 252, 0, 1, + 252, 0, 100, + 239, 0, 102, 239, 0, 122, 234, 1, 32, 25, 230, 1, 32, 29, 234, 14, 118, + 255, 119, 254, + 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, + 109, 255, + 0, 113, 255, 0, 115, 255, 0, 117, 255, 14, 118, 255, 119, 254, 122, 254, + 250, 255, + 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, + 255, 0, 115, + 255, 0, 117, 255, 14, 118, 255, 119, 254, 122, 254, 250, 255, 251, 255, + 252, 255, + 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, + 117, 255, + 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, 90, + 245, 193, 254, + 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, 254, 0, + 4, 254, + 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 9, 45, 250, 47, 250, + 119, 254, 120, + 254, 121, 252, 122, 252, 254, 252, 0, 1, 252, 22, 45, 250, 47, 250, 66, + 254, 85, 250, + 87, 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, 196, + 254, 197, + 254, 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, + 102, 250, + 0, 122, 245, 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, + 254, 252, + 0, 1, 252, 27, 80, 254, 85, 252, 86, 250, 87, 249, 88, 252, 90, 249, 211, + 254, 212, + 254, 213, 254, 214, 254, 215, 254, 217, 254, 218, 250, 219, 250, 220, 250, + 221, + 250, 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 252, 0, 102, 252, 0, 108, + 250, 0, 112, + 250, 0, 114, 250, 0, 116, 250, 0, 122, 249, 50, 45, 249, 47, 249, 59, 5, + 60, 5, 98, + 255, 106, 3, 108, 3, 109, 3, 110, 4, 111, 4, 113, 5, 117, 7, 118, 3, 119, + 5, 122, 5, + 225, 255, 226, 255, 227, 255, 228, 255, 229, 255, 230, 255, 237, 3, 238, + 3, 239, + 3, 240, 3, 242, 4, 250, 3, 251, 3, 252, 3, 253, 3, 254, 5, 0, 1, 5, 0, 3, + 255, 0, 5, 255, + 0, 7, 255, 0, 45, 3, 0, 49, 3, 0, 57, 3, 0, 60, 3, 0, 62, 3, 0, 68, 3, 0, + 70, 4, 0, 72, 4, + 0, 74, 4, 0, 101, 7, 0, 109, 3, 0, 113, 3, 0, 115, 3, 0, 117, 3, 27, 80, + 254, 85, 252, + 86, 250, 87, 249, 88, 252, 90, 249, 211, 254, 212, 254, 213, 254, 214, + 254, 215, + 254, 217, 254, 218, 250, 219, 250, 220, 250, 221, 250, 222, 249, 0, 78, + 254, 0, 82, + 254, 0, 100, 252, 0, 102, 252, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, + 116, 250, + 0, 122, 249, 50, 45, 249, 47, 249, 59, 5, 60, 5, 98, 255, 106, 3, 108, 3, + 109, 3, 110, + 4, 111, 4, 113, 5, 117, 7, 118, 3, 119, 5, 122, 5, 225, 255, 226, 255, + 227, 255, 228, + 255, 229, 255, 230, 255, 237, 3, 238, 3, 239, 3, 240, 3, 242, 4, 250, 3, + 251, 3, 252, + 3, 253, 3, 254, 5, 0, 1, 5, 0, 3, 255, 0, 5, 255, 0, 7, 255, 0, 45, 3, 0, + 49, 3, 0, 57, 3, + 0, 60, 3, 0, 62, 3, 0, 68, 3, 0, 70, 4, 0, 72, 4, 0, 74, 4, 0, 101, 7, 0, + 109, 3, 0, 113, + 3, 0, 115, 3, 0, 117, 3, 27, 80, 254, 85, 252, 86, 250, 87, 249, 88, 252, + 90, 249, 211, + 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 218, 250, 219, 250, + 220, + 250, 221, 250, 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 252, 0, 102, 252, + 0, 108, + 250, 0, 112, 250, 0, 114, 250, 0, 116, 250, 0, 122, 249, 50, 45, 249, 47, + 249, 59, + 5, 60, 5, 98, 255, 106, 3, 108, 3, 109, 3, 110, 4, 111, 4, 113, 5, 117, 7, + 118, 3, 119, + 5, 122, 5, 225, 255, 226, 255, 227, 255, 228, 255, 229, 255, 230, 255, + 237, 3, 238, + 3, 239, 3, 240, 3, 242, 4, 250, 3, 251, 3, 252, 3, 253, 3, 254, 5, 0, 1, + 5, 0, 3, 255, + 0, 5, 255, 0, 7, 255, 0, 45, 3, 0, 49, 3, 0, 57, 3, 0, 60, 3, 0, 62, 3, 0, + 68, 3, 0, 70, 4, + 0, 72, 4, 0, 74, 4, 0, 101, 7, 0, 109, 3, 0, 113, 3, 0, 115, 3, 0, 117, 3, + 3, 45, 254, 47, + 254, 4, 45, 254, 47, 254, 120, 252, 3, 45, 254, 47, 254, 4, 45, 254, 47, + 254, 120, + 252, 3, 45, 254, 47, 254, 4, 45, 254, 47, 254, 120, 252, 70, 45, 237, 46, + 234, 47, + 237, 59, 254, 60, 254, 66, 237, 80, 250, 98, 237, 102, 237, 112, 237, 115, + 237, 118, + 237, 120, 237, 122, 237, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, + 198, + 237, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 237, + 226, + 237, 227, 237, 228, 247, 229, 237, 230, 237, 233, 247, 234, 237, 235, 237, + 236, + 237, 243, 237, 244, 237, 245, 237, 246, 247, 247, 237, 249, 237, 250, 237, + 251, + 237, 252, 237, 253, 237, 254, 237, 0, 1, 247, 0, 2, 237, 0, 3, 247, 0, 4, + 237, 0, 5, + 247, 0, 6, 237, 0, 7, 237, 0, 21, 247, 0, 25, 237, 0, 27, 237, 0, 29, 237, + 0, 78, 250, + 0, 79, 247, 0, 82, 250, 0, 83, 237, 0, 87, 237, 0, 89, 237, 0, 91, 237, 0, + 109, 247, + 0, 113, 237, 0, 115, 237, 0, 117, 237, 70, 45, 237, 46, 234, 47, 237, 59, + 254, 60, + 254, 66, 237, 80, 250, 98, 237, 102, 237, 112, 237, 115, 237, 118, 237, + 120, 237, + 122, 237, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 237, 226, 237, 227, + 237, + 228, 247, 229, 237, 230, 237, 233, 247, 234, 237, 235, 237, 236, 237, 243, + 237, + 244, 237, 245, 237, 246, 247, 247, 237, 249, 237, 250, 237, 251, 237, 252, + 237, + 253, 237, 254, 237, 0, 1, 247, 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 247, + 0, 6, 237, + 0, 7, 237, 0, 21, 247, 0, 25, 237, 0, 27, 237, 0, 29, 237, 0, 78, 250, 0, + 79, 247, 0, + 82, 250, 0, 83, 237, 0, 87, 237, 0, 89, 237, 0, 91, 237, 0, 109, 247, 0, + 113, 237, 0, + 115, 237, 0, 117, 237, 13, 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, + 195, 250, + 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, + 250, 47, 250, + 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, + 250, 0, + 4, 250, 0, 6, 250, 13, 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, 195, + 250, 196, + 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 250, 47, + 250, 66, + 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, + 250, 0, 4, + 250, 0, 6, 250, 65, 45, 234, 46, 234, 47, 234, 59, 247, 60, 247, 66, 239, + 80, 243, + 98, 234, 102, 234, 106, 254, 112, 234, 118, 239, 193, 239, 194, 239, 195, + 239, 196, + 239, 197, 239, 198, 239, 211, 243, 212, 243, 213, 243, 214, 243, 215, 243, + 217, + 243, 225, 234, 226, 234, 227, 234, 228, 245, 229, 234, 230, 234, 233, 234, + 234, + 234, 235, 234, 236, 234, 238, 254, 243, 234, 244, 234, 245, 234, 246, 234, + 247, + 234, 249, 234, 250, 239, 251, 239, 252, 239, 253, 239, 0, 2, 239, 0, 3, + 245, 0, 4, + 239, 0, 5, 245, 0, 6, 239, 0, 7, 234, 0, 21, 245, 0, 25, 234, 0, 27, 234, + 0, 29, 234, + 0, 49, 254, 0, 78, 243, 0, 79, 234, 0, 82, 243, 0, 83, 234, 0, 109, 239, + 0, 113, 239, + 0, 115, 239, 0, 117, 239, 19, 102, 254, 112, 254, 233, 254, 234, 254, 235, + 254, 236, + 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, + 254, 0, 25, + 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 19, 102, 254, 112, + 254, 233, 254, + 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, + 254, + 249, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, + 83, 254, 19, + 102, 254, 112, 254, 233, 254, 234, 254, 235, 254, 236, 254, 243, 254, 244, + 254, + 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, 254, 0, 25, 254, 0, 27, + 254, 0, 29, + 254, 0, 79, 254, 0, 83, 254, 3, 45, 254, 47, 254, 4, 45, 254, 47, 254, + 120, 252, 2, + 1, 32, 24, 247, 14, 33, 245, 101, 249, 115, 249, 116, 249, 0, 19, 249, 0, + 87, 249, + 0, 89, 249, 0, 91, 249, 0, 93, 249, 0, 97, 249, 0, 99, 249, 1, 2, 25, 249, + 1, 32, 25, + 247, 2, 33, 250 }; -static afm_cuint16 afm_Helvetica_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Helvetica_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Helvetica_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Helvetica_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -618,381 +1138,742 @@ static afm_cunicode afm_Helvetica_ligatures[] = { /* 3 */ /* FontName: Helvetica-Bold */ /* FullName: Helvetica Bold */ /* FamilyName: Helvetica */ -static afm_cuint8 afm_Helvetica_Bold_widths[] = { /* 315 */ - 46,56,79,93,93,148,120,40,56,56,65,97,46,56,46,46,93,93,93,93,93, - 93,93,93,93,93,56,56,97,97,97,102,163,120,120,120,120,111,102,130, - 120,46,93,120,102,139,120,130,111,130,120,111,102,120,111,157,111, - 111,102,56,46,56,97,93,56,93,102,93,102,93,56,102,102,46,46,93,46, - 148,102,102,102,102,65,93,56,102,93,130,93,93,83,65,47,65,97,56, - 93,93,93,93,47,93,56,123,62,93,97,123,56,67,97,56,56,56,102,93,46, - 56,56,61,93,139,139,139,102,120,120,120,120,120,120,167,120,111, - 111,111,111,46,46,46,46,120,120,130,130,130,130,130,97,130,120,120, - 120,120,111,111,102,93,93,93,93,93,93,148,93,93,93,93,93,46,46,46, - 46,102,102,102,102,102,102,102,97,102,102,102,102,102,93,102,93, - 120,93,120,93,120,93,120,93,120,93,120,124,120,102,111,93,111,93, - 111,93,111,93,130,102,130,102,46,46,46,46,46,46,120,93,102,46,102, - 46,102,67,102,46,120,102,120,102,120,102,130,102,130,102,167,157, - 120,65,120,65,120,65,111,93,111,93,111,93,102,56,102,65,120,102, - 120,102,120,102,120,102,111,102,83,102,83,102,83,93,111,93,56,56, - 56,56,56,56,56,56,93,167,46,46,46,83,83,83,93,93,58,167,167,56,56, - 28,93,167,82,102,100,97,92,92,92,92,82,42,102,102 +static afm_cuint8 afm_Helvetica_Bold_widths[] = { /* 315 */ + 46, 56, 79, 93, 93, 148, 120, 40, 56, 56, 65, 97, 46, 56, 46, 46, 93, 93, + 93, 93, 93, + 93, 93, 93, 93, 93, 56, 56, 97, 97, 97, 102, 163, 120, 120, 120, 120, 111, + 102, 130, + 120, 46, 93, 120, 102, 139, 120, 130, 111, 130, 120, 111, 102, 120, 111, + 157, 111, + 111, 102, 56, 46, 56, 97, 93, 56, 93, 102, 93, 102, 93, 56, 102, 102, 46, + 46, 93, 46, + 148, 102, 102, 102, 102, 65, 93, 56, 102, 93, 130, 93, 93, 83, 65, 47, 65, + 97, 56, + 93, 93, 93, 93, 47, 93, 56, 123, 62, 93, 97, 123, 56, 67, 97, 56, 56, 56, + 102, 93, 46, + 56, 56, 61, 93, 139, 139, 139, 102, 120, 120, 120, 120, 120, 120, 167, + 120, 111, + 111, 111, 111, 46, 46, 46, 46, 120, 120, 130, 130, 130, 130, 130, 97, 130, + 120, 120, + 120, 120, 111, 111, 102, 93, 93, 93, 93, 93, 93, 148, 93, 93, 93, 93, 93, + 46, 46, 46, + 46, 102, 102, 102, 102, 102, 102, 102, 97, 102, 102, 102, 102, 102, 93, + 102, 93, + 120, 93, 120, 93, 120, 93, 120, 93, 120, 93, 120, 124, 120, 102, 111, 93, + 111, 93, + 111, 93, 111, 93, 130, 102, 130, 102, 46, 46, 46, 46, 46, 46, 120, 93, + 102, 46, 102, + 46, 102, 67, 102, 46, 120, 102, 120, 102, 120, 102, 130, 102, 130, 102, + 167, 157, + 120, 65, 120, 65, 120, 65, 111, 93, 111, 93, 111, 93, 102, 56, 102, 65, + 120, 102, + 120, 102, 120, 102, 120, 102, 111, 102, 83, 102, 83, 102, 83, 93, 111, 93, + 56, 56, + 56, 56, 56, 56, 56, 56, 93, 167, 46, 46, 46, 83, 83, 83, 93, 93, 58, 167, + 167, 56, 56, + 28, 93, 167, 82, 102, 100, 97, 92, 92, 92, 92, 82, 42, 102, 102 }; -static afm_sint16 afm_Helvetica_Bold_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,29,0,40,0,0,0,0,0,0,0,0,0,0,0,51,54,0,0, - 0,0,0,57,172,0,218,0,257,0,0,0,308,358,450,0,0,485,534,627,654,0, - 716,874,902,1051,0,1199,0,0,0,0,0,0,0,1338,1358,1401,1427,1444,1462, - 1517,1548,0,0,1556,1577,1587,1617,1649,1663,0,1671,1752,0,0,1755, - 1803,1828,1851,1921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,1944,2059,2174,2289,2404,2519,0,0,0,0,0, - 0,0,0,0,0,0,0,2634,2683,2732,2781,2830,0,2879,2928,2956,2984,3012, - 3040,0,0,3179,3199,3219,3239,3259,3279,0,3299,3325,3343,3361,3379, - 0,0,0,0,0,3397,3429,3443,3457,3471,3485,0,3499,0,0,0,0,3513,0,3583, - 3653,3768,3788,3903,3923,4038,0,4058,0,4084,4110,0,4149,4188,0,4205, - 0,4223,0,4241,0,4259,0,4277,0,4308,0,0,0,0,0,0,4339,4431,4452,4487, - 4497,4532,0,0,4542,4577,0,4587,0,4619,0,4651,4683,4732,4746,4795, - 0,0,4809,4871,4952,5014,5095,5157,0,5238,0,5241,0,5244,5247,0,5405, - 0,5563,0,5591,0,5619,0,5647,0,5675,0,5814,0,5837,0,5860,0,0,5883, - 0,0,0,0,0,0,0,0,0,0,5886,5891,0,0,5942,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0 +static afm_sint16 afm_Helvetica_Bold_kerning_index[] = { /* 315 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 51, 54, 0, 0, + 0, 0, 0, 57, 172, 0, 218, 0, 257, 0, 0, 0, 308, 358, 450, 0, 0, 485, 534, + 627, 654, 0, + 716, 874, 902, 1051, 0, 1199, 0, 0, 0, 0, 0, 0, 0, 1338, 1358, 1401, 1427, + 1444, 1462, + 1517, 1548, 0, 0, 1556, 1577, 1587, 1617, 1649, 1663, 0, 1671, 1752, 0, 0, + 1755, + 1803, 1828, 1851, 1921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1944, 2059, 2174, 2289, 2404, 2519, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2634, 2683, 2732, 2781, 2830, 0, 2879, 2928, 2956, + 2984, 3012, + 3040, 0, 0, 3179, 3199, 3219, 3239, 3259, 3279, 0, 3299, 3325, 3343, 3361, + 3379, + 0, 0, 0, 0, 0, 3397, 3429, 3443, 3457, 3471, 3485, 0, 3499, 0, 0, 0, 0, + 3513, 0, 3583, + 3653, 3768, 3788, 3903, 3923, 4038, 0, 4058, 0, 4084, 4110, 0, 4149, 4188, + 0, 4205, + 0, 4223, 0, 4241, 0, 4259, 0, 4277, 0, 4308, 0, 0, 0, 0, 0, 0, 4339, 4431, + 4452, 4487, + 4497, 4532, 0, 0, 4542, 4577, 0, 4587, 0, 4619, 0, 4651, 4683, 4732, 4746, + 4795, + 0, 0, 4809, 4871, 4952, 5014, 5095, 5157, 0, 5238, 0, 5241, 0, 5244, 5247, + 0, 5405, + 0, 5563, 0, 5591, 0, 5619, 0, 5647, 0, 5675, 0, 5814, 0, 5837, 0, 5860, 0, + 0, 5883, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5886, 5891, 0, 0, 5942, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static afm_cuint8 afm_Helvetica_Bold_kerning_data[] = { /* 5945 */ - 42,11,85,240,87,244,88,244,90,237,222,237,0,100,240,0,102,240,0, - 122,237,1,32,24,247,1,32,28,244,4,33,250,1,32,25,237,1,32,29,237, - 4,33,250,1,32,25,237,1,32,29,237,2,33,250,2,33,250,49,68,250,72, - 249,80,250,82,250,85,242,86,249,87,244,88,247,90,239,118,252,119, - 250,120,252,122,252,200,250,211,250,212,250,213,250,214,250,215, - 250,217,250,218,249,219,249,220,249,221,249,222,239,250,252,251, - 252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250,0,32,249,0, - 36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249,0,109,252, - 0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122, - 239,20,66,252,86,255,193,252,194,252,195,252,196,252,197,252,198, - 252,218,255,219,255,220,255,221,255,0,2,252,0,4,252,0,6,252,0,108, - 255,0,112,255,0,114,255,0,116,255,18,45,252,47,252,66,250,87,250, - 88,250,90,245,193,250,194,250,195,250,196,250,197,250,198,250,222, - 245,0,2,250,0,4,250,0,6,250,0,122,245,23,45,240,47,240,66,244,98, - 254,193,244,194,244,195,244,196,244,197,244,198,244,225,254,226, - 254,227,254,228,254,229,254,230,254,0,2,244,0,3,254,0,4,244,0,5, - 254,0,6,244,0,7,254,22,45,254,47,254,66,254,118,254,193,254,194, - 254,195,254,196,254,197,254,198,254,250,254,251,254,252,254,253, - 254,0,2,254,0,4,254,0,6,254,0,109,254,0,113,254,0,115,254,0,117, - 254,40,80,252,102,254,112,251,118,252,122,250,211,252,212,252,213, - 252,214,252,215,252,217,252,233,254,234,254,235,254,236,254,243, - 251,244,251,245,251,246,251,247,251,249,251,250,252,251,252,252, - 252,253,252,254,250,0,1,250,0,21,254,0,25,254,0,27,254,0,29,254, - 0,78,252,0,79,251,0,82,252,0,83,251,0,109,252,0,113,252,0,115,252, - 0,117,252,14,85,242,87,239,88,244,90,237,122,252,222,237,254,252, - 0,1,252,0,100,242,0,102,242,0,122,237,1,32,25,234,1,32,29,234,22, - 45,250,47,250,66,249,85,250,87,249,88,249,89,249,90,245,193,249, - 194,249,195,249,196,249,197,249,198,249,222,245,0,2,249,0,4,249, - 0,6,249,0,100,250,0,102,250,0,122,245,41,45,237,47,237,66,240,98, - 252,102,252,112,250,193,240,194,240,195,240,196,240,197,240,198, - 240,225,252,226,252,227,252,228,252,229,252,230,252,233,252,234, - 252,235,252,236,252,243,250,244,250,245,250,246,250,247,250,249, - 250,0,2,240,0,3,252,0,4,240,0,5,252,0,6,240,0,7,252,0,21,252,0,25, - 252,0,27,252,0,29,252,0,79,250,0,83,250,12,45,3,47,3,86,255,218, - 255,219,255,220,255,221,255,0,108,255,0,112,255,0,114,255,0,116, - 255,27,80,254,85,254,86,254,87,249,88,250,90,249,211,254,212,254, - 213,254,214,254,215,254,217,254,218,254,219,254,220,254,221,254, - 222,249,0,78,254,0,82,254,0,100,254,0,102,254,0,108,254,0,112,254, - 0,114,254,0,116,254,0,122,249,69,45,244,46,237,47,244,59,250,60, - 250,66,242,80,250,98,244,102,247,112,244,115,244,118,242,120,247, - 122,247,193,242,194,242,195,242,196,242,197,242,198,242,211,250, - 212,250,213,250,214,250,215,250,217,250,225,244,226,244,227,244, - 228,244,229,244,230,244,233,247,234,247,235,247,236,247,243,244, - 244,244,245,244,246,244,247,244,249,244,250,242,251,242,252,242, - 253,242,254,247,0,1,247,0,2,242,0,3,244,0,4,242,0,5,244,0,6,242, - 0,7,244,0,21,247,0,25,247,0,27,247,0,29,247,0,78,250,0,79,244,0, - 82,250,0,83,244,0,87,244,0,89,244,0,109,242,0,113,242,0,115,242, - 0,117,242,13,45,252,47,252,66,249,193,249,194,249,195,249,196,249, - 197,249,198,249,0,2,249,0,4,249,0,6,249,65,45,237,46,244,47,237, - 59,250,60,250,66,244,72,249,80,249,98,247,102,249,112,242,118,247, - 193,244,194,244,195,244,196,244,197,244,198,244,211,249,212,249, - 213,249,214,249,215,249,217,249,225,247,226,247,227,247,228,247, - 229,247,230,247,233,249,234,249,235,249,236,249,243,242,244,242, - 245,242,246,242,247,242,249,242,250,247,251,247,252,247,253,247, - 0,2,244,0,3,247,0,4,244,0,5,247,0,6,244,0,7,247,0,21,249,0,25,249, - 0,27,249,0,29,249,0,32,249,0,36,249,0,78,249,0,79,242,0,82,249,0, - 83,242,0,109,247,0,113,247,0,115,247,0,117,247,65,45,244,46,250, - 47,244,59,255,60,255,66,247,80,254,98,250,102,251,112,247,118,249, - 122,254,193,247,194,247,195,247,196,247,197,247,198,247,211,254, - 212,254,213,254,214,254,215,254,217,254,225,250,226,250,227,250, - 228,250,229,250,230,250,233,251,234,251,235,251,236,251,243,247, - 244,247,245,247,246,247,247,247,249,247,250,249,251,249,252,249, - 253,249,254,254,0,1,254,0,2,247,0,3,250,0,4,247,0,5,250,0,6,247, - 0,7,250,0,21,251,0,25,251,0,27,251,0,29,251,0,78,254,0,79,247,0, - 82,254,0,83,247,0,109,249,0,113,249,0,115,249,0,117,249,61,45,240, - 47,240,59,249,60,249,66,239,80,245,98,242,102,244,112,240,118,240, - 193,239,194,239,195,239,196,239,197,239,198,239,211,245,212,245, - 213,245,214,245,215,245,217,245,225,242,226,242,227,242,228,242, - 229,242,230,242,233,244,234,244,235,244,236,244,243,240,244,240, - 245,240,246,240,247,240,249,240,250,240,251,240,252,240,253,240, - 0,2,239,0,3,242,0,4,239,0,5,242,0,6,239,0,7,242,0,21,244,0,25,244, - 0,27,244,0,29,244,0,78,245,0,79,240,0,82,245,0,83,240,0,109,240, - 0,113,240,0,115,240,0,117,240,9,104,255,119,254,120,254,122,254, - 254,254,0,1,254,0,33,255,0,37,255,18,109,255,118,254,119,254,122, - 254,250,254,251,254,252,254,253,254,254,254,0,1,254,0,60,255,0,62, - 255,0,68,255,0,109,254,0,113,254,0,115,254,0,117,254,11,105,255, - 108,254,109,254,122,255,254,255,0,1,255,0,57,254,0,60,254,0,62,254, - 0,68,254,8,101,255,119,254,120,254,122,254,254,254,0,1,254,0,19, - 255,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254, - 23,45,255,47,255,102,255,112,254,233,255,234,255,235,255,236,255, - 243,254,244,254,245,254,246,254,247,254,249,254,0,21,255,0,25,255, - 0,27,255,0,29,255,0,79,254,0,83,254,1,32,25,5,1,32,29,5,13,102,2, - 104,255,233,2,234,2,235,2,236,2,0,21,2,0,25,2,0,27,2,0,29,2,0,33, - 255,0,37,255,4,122,254,254,254,0,1,254,10,112,254,243,254,244,254, - 245,254,246,254,247,254,249,254,0,79,254,0,83,254,5,120,254,122, - 254,254,254,0,1,254,13,118,254,122,252,250,254,251,254,252,254,253, - 254,254,252,0,1,252,0,109,254,0,113,254,0,115,254,0,117,254,14,118, - 255,119,250,122,254,250,255,251,255,252,255,253,255,254,254,0,1, - 254,0,109,255,0,113,255,0,115,255,0,117,255,7,119,254,120,254,121, - 252,122,254,254,254,0,1,254,4,122,254,254,254,0,1,254,34,45,247, - 46,254,47,247,100,254,101,254,104,254,112,254,114,254,116,254,117, - 3,119,2,122,2,232,254,243,254,244,254,245,254,246,254,247,254,249, - 254,254,2,0,1,2,0,9,254,0,15,254,0,19,254,0,33,254,0,37,254,0,79, - 254,0,83,254,0,93,254,0,97,254,0,99,254,0,101,3,1,2,25,254,2,120, - 254,22,45,244,47,244,98,254,112,252,225,254,226,254,227,254,228, - 254,229,254,230,254,243,252,244,252,245,252,246,252,247,252,249, - 252,0,3,254,0,5,254,0,7,254,0,79,252,0,83,252,12,45,250,47,250,112, - 254,243,254,244,254,245,254,246,254,247,254,249,254,0,79,254,0,83, - 254,10,102,255,233,255,234,255,235,255,236,255,0,21,255,0,25,255, - 0,27,255,0,29,255,31,45,244,47,244,98,252,102,255,112,253,225,252, - 226,252,227,252,228,252,229,252,230,252,233,255,234,255,235,255, - 236,255,243,253,244,253,245,253,246,253,247,253,249,253,0,3,252, - 0,5,252,0,7,252,0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83, - 253,10,102,2,233,2,234,2,235,2,236,2,0,21,2,0,25,2,0,27,2,0,29,2, - 49,68,250,72,249,80,250,82,250,85,242,86,249,87,244,88,247,90,239, - 118,252,119,250,120,252,122,252,200,250,211,250,212,250,213,250, - 214,250,215,250,217,250,218,249,219,249,220,249,221,249,222,239, - 250,252,251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250, - 0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,239,49,68,250,72,249,80,250,82,250,85,242,86,249,87,244, - 88,247,90,239,118,252,119,250,120,252,122,252,200,250,211,250,212, - 250,213,250,214,250,215,250,217,250,218,249,219,249,220,249,221, - 249,222,239,250,252,251,252,252,252,253,252,254,252,0,1,252,0,8, - 250,0,14,250,0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102, - 242,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252, - 0,116,249,0,117,252,0,122,239,49,68,250,72,249,80,250,82,250,85, - 242,86,249,87,244,88,247,90,239,118,252,119,250,120,252,122,252, - 200,250,211,250,212,250,213,250,214,250,215,250,217,250,218,249, - 219,249,220,249,221,249,222,239,250,252,251,252,252,252,253,252, - 254,252,0,1,252,0,8,250,0,14,250,0,32,249,0,36,249,0,78,250,0,82, - 250,0,100,242,0,102,242,0,108,249,0,109,252,0,112,249,0,113,252, - 0,114,249,0,115,252,0,116,249,0,117,252,0,122,239,49,68,250,72,249, - 80,250,82,250,85,242,86,249,87,244,88,247,90,239,118,252,119,250, - 120,252,122,252,200,250,211,250,212,250,213,250,214,250,215,250, - 217,250,218,249,219,249,220,249,221,249,222,239,250,252,251,252, - 252,252,253,252,254,252,0,1,252,0,8,250,0,14,250,0,32,249,0,36,249, - 0,78,250,0,82,250,0,100,242,0,102,242,0,108,249,0,109,252,0,112, - 249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,239, - 49,68,250,72,249,80,250,82,250,85,242,86,249,87,244,88,247,90,239, - 118,252,119,250,120,252,122,252,200,250,211,250,212,250,213,250, - 214,250,215,250,217,250,218,249,219,249,220,249,221,249,222,239, - 250,252,251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250, - 0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,239,49,68,250,72,249,80,250,82,250,85,242,86,249,87,244, - 88,247,90,239,118,252,119,250,120,252,122,252,200,250,211,250,212, - 250,213,250,214,250,215,250,217,250,218,249,219,249,220,249,221, - 249,222,239,250,252,251,252,252,252,253,252,254,252,0,1,252,0,8, - 250,0,14,250,0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102, - 242,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252, - 0,116,249,0,117,252,0,122,239,22,45,250,47,250,66,249,85,250,87, - 249,88,249,89,249,90,245,193,249,194,249,195,249,196,249,197,249, - 198,249,222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122, - 245,22,45,250,47,250,66,249,85,250,87,249,88,249,89,249,90,245,193, - 249,194,249,195,249,196,249,197,249,198,249,222,245,0,2,249,0,4, - 249,0,6,249,0,100,250,0,102,250,0,122,245,22,45,250,47,250,66,249, - 85,250,87,249,88,249,89,249,90,245,193,249,194,249,195,249,196,249, - 197,249,198,249,222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102, - 250,0,122,245,22,45,250,47,250,66,249,85,250,87,249,88,249,89,249, - 90,245,193,249,194,249,195,249,196,249,197,249,198,249,222,245,0, - 2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122,245,22,45,250,47, - 250,66,249,85,250,87,249,88,249,89,249,90,245,193,249,194,249,195, - 249,196,249,197,249,198,249,222,245,0,2,249,0,4,249,0,6,249,0,100, - 250,0,102,250,0,122,245,22,45,250,47,250,66,249,85,250,87,249,88, - 249,89,249,90,245,193,249,194,249,195,249,196,249,197,249,198,249, - 222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122,245,13, - 45,252,47,252,66,249,193,249,194,249,195,249,196,249,197,249,198, - 249,0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249,194, - 249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249,13,45, - 252,47,252,66,249,193,249,194,249,195,249,196,249,197,249,198,249, - 0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249,194,249, - 195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249,61,45,240, - 47,240,59,249,60,249,66,239,80,245,98,242,102,244,112,240,118,240, - 193,239,194,239,195,239,196,239,197,239,198,239,211,245,212,245, - 213,245,214,245,215,245,217,245,225,242,226,242,227,242,228,242, - 229,242,230,242,233,244,234,244,235,244,236,244,243,240,244,240, - 245,240,246,240,247,240,249,240,250,240,251,240,252,240,253,240, - 0,2,239,0,3,242,0,4,239,0,5,242,0,6,239,0,7,242,0,21,244,0,25,244, - 0,27,244,0,29,244,0,78,245,0,79,240,0,82,245,0,83,240,0,109,240, - 0,113,240,0,115,240,0,117,240,9,104,255,119,254,120,254,122,254, - 254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254,120,254,122, - 254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254,120,254, - 122,254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254,120, - 254,122,254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254, - 120,254,122,254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119, - 254,120,254,122,254,254,254,0,1,254,0,33,255,0,37,255,11,105,255, - 108,254,109,254,122,255,254,255,0,1,255,0,57,254,0,60,254,0,62,254, - 0,68,254,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1, - 254,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254, - 9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254,9,45, - 2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254,14,118,255, - 119,250,122,254,250,255,251,255,252,255,253,255,254,254,0,1,254, - 0,109,255,0,113,255,0,115,255,0,117,255,7,119,254,120,254,121,252, - 122,254,254,254,0,1,254,7,119,254,120,254,121,252,122,254,254,254, - 0,1,254,7,119,254,120,254,121,252,122,254,254,254,0,1,254,7,119, - 254,120,254,121,252,122,254,254,254,0,1,254,7,119,254,120,254,121, - 252,122,254,254,254,0,1,254,7,119,254,120,254,121,252,122,254,254, - 254,0,1,254,31,45,244,47,244,98,252,102,255,112,253,225,252,226, - 252,227,252,228,252,229,252,230,252,233,255,234,255,235,255,236, - 255,243,253,244,253,245,253,246,253,247,253,249,253,0,3,252,0,5, - 252,0,7,252,0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83,253, - 31,45,244,47,244,98,252,102,255,112,253,225,252,226,252,227,252, - 228,252,229,252,230,252,233,255,234,255,235,255,236,255,243,253, - 244,253,245,253,246,253,247,253,249,253,0,3,252,0,5,252,0,7,252, - 0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83,253,49,68,250, - 72,249,80,250,82,250,85,242,86,249,87,244,88,247,90,239,118,252, - 119,250,120,252,122,252,200,250,211,250,212,250,213,250,214,250, - 215,250,217,250,218,249,219,249,220,249,221,249,222,239,250,252, - 251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250,0,32,249, - 0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249,0,109,252, - 0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122, - 239,9,104,255,119,254,120,254,122,254,254,254,0,1,254,0,33,255,0, - 37,255,49,68,250,72,249,80,250,82,250,85,242,86,249,87,244,88,247, - 90,239,118,252,119,250,120,252,122,252,200,250,211,250,212,250,213, - 250,214,250,215,250,217,250,218,249,219,249,220,249,221,249,222, - 239,250,252,251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14, - 250,0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108, - 249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249, - 0,117,252,0,122,239,9,104,255,119,254,120,254,122,254,254,254,0, - 1,254,0,33,255,0,37,255,49,68,250,72,249,80,250,82,250,85,242,86, - 249,87,244,88,247,90,239,118,252,119,250,120,252,122,252,200,250, - 211,250,212,250,213,250,214,250,215,250,217,250,218,249,219,249, - 220,249,221,249,222,239,250,252,251,252,252,252,253,252,254,252, - 0,1,252,0,8,250,0,14,250,0,32,249,0,36,249,0,78,250,0,82,250,0,100, - 242,0,102,242,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249, - 0,115,252,0,116,249,0,117,252,0,122,239,9,104,255,119,254,120,254, - 122,254,254,254,0,1,254,0,33,255,0,37,255,11,105,255,108,254,109, - 254,122,255,254,255,0,1,255,0,57,254,0,60,254,0,62,254,0,68,254, - 11,105,255,108,254,109,254,122,255,254,255,0,1,255,0,57,254,0,60, - 254,0,62,254,0,68,254,18,45,252,47,252,66,250,87,250,88,250,90,245, - 193,250,194,250,195,250,196,250,197,250,198,250,222,245,0,2,250, - 0,4,250,0,6,250,0,122,245,18,45,252,47,252,66,250,87,250,88,250, - 90,245,193,250,194,250,195,250,196,250,197,250,198,250,222,245,0, - 2,250,0,4,250,0,6,250,0,122,245,8,101,255,119,254,120,254,122,254, - 254,254,0,1,254,0,19,255,9,45,2,47,3,119,254,120,254,121,254,122, - 254,254,254,0,1,254,9,45,2,47,3,119,254,120,254,121,254,122,254, - 254,254,0,1,254,9,45,2,47,3,119,254,120,254,121,254,122,254,254, - 254,0,1,254,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254, - 0,1,254,13,102,2,104,255,233,2,234,2,235,2,236,2,0,21,2,0,25,2,0, - 27,2,0,29,2,0,33,255,0,37,255,13,102,2,104,255,233,2,234,2,235,2, - 236,2,0,21,2,0,25,2,0,27,2,0,29,2,0,33,255,0,37,255,40,80,252,102, - 254,112,251,118,252,122,250,211,252,212,252,213,252,214,252,215, - 252,217,252,233,254,234,254,235,254,236,254,243,251,244,251,245, - 251,246,251,247,251,249,251,250,252,251,252,252,252,253,252,254, - 250,0,1,250,0,21,254,0,25,254,0,27,254,0,29,254,0,78,252,0,79,251, - 0,82,252,0,83,251,0,109,252,0,113,252,0,115,252,0,117,252,10,112, - 254,243,254,244,254,245,254,246,254,247,254,249,254,0,79,254,0,83, - 254,14,85,242,87,239,88,244,90,237,122,252,222,237,254,252,0,1,252, - 0,100,242,0,102,242,0,122,237,1,32,25,234,1,32,29,234,5,120,254, - 122,254,254,254,0,1,254,14,85,242,87,239,88,244,90,237,122,252,222, - 237,254,252,0,1,252,0,100,242,0,102,242,0,122,237,1,32,25,234,1, - 32,29,234,5,120,254,122,254,254,254,0,1,254,14,85,242,87,239,88, - 244,90,237,122,252,222,237,254,252,0,1,252,0,100,242,0,102,242,0, - 122,237,1,32,25,234,1,32,29,234,5,120,254,122,254,254,254,0,1,254, - 14,118,255,119,250,122,254,250,255,251,255,252,255,253,255,254,254, - 0,1,254,0,109,255,0,113,255,0,115,255,0,117,255,14,118,255,119,250, - 122,254,250,255,251,255,252,255,253,255,254,254,0,1,254,0,109,255, - 0,113,255,0,115,255,0,117,255,14,118,255,119,250,122,254,250,255, - 251,255,252,255,253,255,254,254,0,1,254,0,109,255,0,113,255,0,115, - 255,0,117,255,22,45,250,47,250,66,249,85,250,87,249,88,249,89,249, - 90,245,193,249,194,249,195,249,196,249,197,249,198,249,222,245,0, - 2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122,245,7,119,254,120, - 254,121,252,122,254,254,254,0,1,254,22,45,250,47,250,66,249,85,250, - 87,249,88,249,89,249,90,245,193,249,194,249,195,249,196,249,197, - 249,198,249,222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102,250, - 0,122,245,7,119,254,120,254,121,252,122,254,254,254,0,1,254,27,80, - 254,85,254,86,254,87,249,88,250,90,249,211,254,212,254,213,254,214, - 254,215,254,217,254,218,254,219,254,220,254,221,254,222,249,0,78, - 254,0,82,254,0,100,254,0,102,254,0,108,254,0,112,254,0,114,254,0, - 116,254,0,122,249,34,45,247,46,254,47,247,100,254,101,254,104,254, - 112,254,114,254,116,254,117,3,119,2,122,2,232,254,243,254,244,254, - 245,254,246,254,247,254,249,254,254,2,0,1,2,0,9,254,0,15,254,0,19, - 254,0,33,254,0,37,254,0,79,254,0,83,254,0,93,254,0,97,254,0,99,254, - 0,101,3,1,2,25,254,27,80,254,85,254,86,254,87,249,88,250,90,249, - 211,254,212,254,213,254,214,254,215,254,217,254,218,254,219,254, - 220,254,221,254,222,249,0,78,254,0,82,254,0,100,254,0,102,254,0, - 108,254,0,112,254,0,114,254,0,116,254,0,122,249,34,45,247,46,254, - 47,247,100,254,101,254,104,254,112,254,114,254,116,254,117,3,119, - 2,122,2,232,254,243,254,244,254,245,254,246,254,247,254,249,254, - 254,2,0,1,2,0,9,254,0,15,254,0,19,254,0,33,254,0,37,254,0,79,254, - 0,83,254,0,93,254,0,97,254,0,99,254,0,101,3,1,2,25,254,27,80,254, - 85,254,86,254,87,249,88,250,90,249,211,254,212,254,213,254,214,254, - 215,254,217,254,218,254,219,254,220,254,221,254,222,249,0,78,254, - 0,82,254,0,100,254,0,102,254,0,108,254,0,112,254,0,114,254,0,116, - 254,0,122,249,34,45,247,46,254,47,247,100,254,101,254,104,254,112, - 254,114,254,116,254,117,3,119,2,122,2,232,254,243,254,244,254,245, - 254,246,254,247,254,249,254,254,2,0,1,2,0,9,254,0,15,254,0,19,254, - 0,33,254,0,37,254,0,79,254,0,83,254,0,93,254,0,97,254,0,99,254,0, - 101,3,1,2,25,254,2,120,254,2,120,254,2,120,254,69,45,244,46,237, - 47,244,59,250,60,250,66,242,80,250,98,244,102,247,112,244,115,244, - 118,242,120,247,122,247,193,242,194,242,195,242,196,242,197,242, - 198,242,211,250,212,250,213,250,214,250,215,250,217,250,225,244, - 226,244,227,244,228,244,229,244,230,244,233,247,234,247,235,247, - 236,247,243,244,244,244,245,244,246,244,247,244,249,244,250,242, - 251,242,252,242,253,242,254,247,0,1,247,0,2,242,0,3,244,0,4,242, - 0,5,244,0,6,242,0,7,244,0,21,247,0,25,247,0,27,247,0,29,247,0,78, - 250,0,79,244,0,82,250,0,83,244,0,87,244,0,89,244,0,109,242,0,113, - 242,0,115,242,0,117,242,69,45,244,46,237,47,244,59,250,60,250,66, - 242,80,250,98,244,102,247,112,244,115,244,118,242,120,247,122,247, - 193,242,194,242,195,242,196,242,197,242,198,242,211,250,212,250, - 213,250,214,250,215,250,217,250,225,244,226,244,227,244,228,244, - 229,244,230,244,233,247,234,247,235,247,236,247,243,244,244,244, - 245,244,246,244,247,244,249,244,250,242,251,242,252,242,253,242, - 254,247,0,1,247,0,2,242,0,3,244,0,4,242,0,5,244,0,6,242,0,7,244, - 0,21,247,0,25,247,0,27,247,0,29,247,0,78,250,0,79,244,0,82,250,0, - 83,244,0,87,244,0,89,244,0,109,242,0,113,242,0,115,242,0,117,242, - 13,45,252,47,252,66,249,193,249,194,249,195,249,196,249,197,249, - 198,249,0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249, - 194,249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249, - 13,45,252,47,252,66,249,193,249,194,249,195,249,196,249,197,249, - 198,249,0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249, - 194,249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249, - 61,45,240,47,240,59,249,60,249,66,239,80,245,98,242,102,244,112, - 240,118,240,193,239,194,239,195,239,196,239,197,239,198,239,211, - 245,212,245,213,245,214,245,215,245,217,245,225,242,226,242,227, - 242,228,242,229,242,230,242,233,244,234,244,235,244,236,244,243, - 240,244,240,245,240,246,240,247,240,249,240,250,240,251,240,252, - 240,253,240,0,2,239,0,3,242,0,4,239,0,5,242,0,6,239,0,7,242,0,21, - 244,0,25,244,0,27,244,0,29,244,0,78,245,0,79,240,0,82,245,0,83,240, - 0,109,240,0,113,240,0,115,240,0,117,240,10,102,2,233,2,234,2,235, - 2,236,2,0,21,2,0,25,2,0,27,2,0,29,2,10,102,2,233,2,234,2,235,2,236, - 2,0,21,2,0,25,2,0,27,2,0,29,2,10,102,2,233,2,234,2,235,2,236,2,0, - 21,2,0,25,2,0,27,2,0,29,2,2,120,254,2,1,32,24,249,19,33,244,101, - 244,109,254,115,250,116,247,119,254,0,19,244,0,60,254,0,62,254,0, - 68,254,0,87,250,0,89,250,0,91,250,0,93,247,0,97,247,0,99,247,1,2, - 25,247,1,32,25,249,2,33,244 + 42, 11, 85, 240, 87, 244, 88, 244, 90, 237, 222, 237, 0, 100, 240, 0, 102, + 240, 0, + 122, 237, 1, 32, 24, 247, 1, 32, 28, 244, 4, 33, 250, 1, 32, 25, 237, 1, + 32, 29, 237, + 4, 33, 250, 1, 32, 25, 237, 1, 32, 29, 237, 2, 33, 250, 2, 33, 250, 49, + 68, 250, 72, + 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, 247, 90, 239, 118, + 252, 119, + 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, 250, 214, 250, + 215, + 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 239, 250, 252, + 251, + 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, + 32, 249, 0, + 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, 0, + 109, 252, + 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, + 252, 0, 122, + 239, 20, 66, 252, 86, 255, 193, 252, 194, 252, 195, 252, 196, 252, 197, + 252, 198, + 252, 218, 255, 219, 255, 220, 255, 221, 255, 0, 2, 252, 0, 4, 252, 0, 6, + 252, 0, 108, + 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, 18, 45, 252, 47, 252, 66, 250, + 87, 250, + 88, 250, 90, 245, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, + 250, 222, + 245, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 245, 23, 45, 240, 47, 240, + 66, 244, 98, + 254, 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 225, 254, + 226, + 254, 227, 254, 228, 254, 229, 254, 230, 254, 0, 2, 244, 0, 3, 254, 0, 4, + 244, 0, 5, + 254, 0, 6, 244, 0, 7, 254, 22, 45, 254, 47, 254, 66, 254, 118, 254, 193, + 254, 194, + 254, 195, 254, 196, 254, 197, 254, 198, 254, 250, 254, 251, 254, 252, 254, + 253, + 254, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 109, 254, 0, 113, 254, 0, 115, + 254, 0, 117, + 254, 40, 80, 252, 102, 254, 112, 251, 118, 252, 122, 250, 211, 252, 212, + 252, 213, + 252, 214, 252, 215, 252, 217, 252, 233, 254, 234, 254, 235, 254, 236, 254, + 243, + 251, 244, 251, 245, 251, 246, 251, 247, 251, 249, 251, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 250, 0, 1, 250, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, + 29, 254, + 0, 78, 252, 0, 79, 251, 0, 82, 252, 0, 83, 251, 0, 109, 252, 0, 113, 252, + 0, 115, 252, + 0, 117, 252, 14, 85, 242, 87, 239, 88, 244, 90, 237, 122, 252, 222, 237, + 254, 252, + 0, 1, 252, 0, 100, 242, 0, 102, 242, 0, 122, 237, 1, 32, 25, 234, 1, 32, + 29, 234, 22, + 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, 249, 89, 249, 90, 245, + 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, 245, 0, 2, 249, 0, + 4, 249, + 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 41, 45, 237, 47, 237, + 66, 240, 98, + 252, 102, 252, 112, 250, 193, 240, 194, 240, 195, 240, 196, 240, 197, 240, + 198, + 240, 225, 252, 226, 252, 227, 252, 228, 252, 229, 252, 230, 252, 233, 252, + 234, + 252, 235, 252, 236, 252, 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, + 249, + 250, 0, 2, 240, 0, 3, 252, 0, 4, 240, 0, 5, 252, 0, 6, 240, 0, 7, 252, 0, + 21, 252, 0, 25, + 252, 0, 27, 252, 0, 29, 252, 0, 79, 250, 0, 83, 250, 12, 45, 3, 47, 3, 86, + 255, 218, + 255, 219, 255, 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, 255, + 0, 116, + 255, 27, 80, 254, 85, 254, 86, 254, 87, 249, 88, 250, 90, 249, 211, 254, + 212, 254, + 213, 254, 214, 254, 215, 254, 217, 254, 218, 254, 219, 254, 220, 254, 221, + 254, + 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 254, 0, 102, 254, 0, 108, 254, + 0, 112, 254, + 0, 114, 254, 0, 116, 254, 0, 122, 249, 69, 45, 244, 46, 237, 47, 244, 59, + 250, 60, + 250, 66, 242, 80, 250, 98, 244, 102, 247, 112, 244, 115, 244, 118, 242, + 120, 247, + 122, 247, 193, 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, 242, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 244, 226, 244, 227, + 244, + 228, 244, 229, 244, 230, 244, 233, 247, 234, 247, 235, 247, 236, 247, 243, + 244, + 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, 242, 251, 242, 252, + 242, + 253, 242, 254, 247, 0, 1, 247, 0, 2, 242, 0, 3, 244, 0, 4, 242, 0, 5, 244, + 0, 6, 242, + 0, 7, 244, 0, 21, 247, 0, 25, 247, 0, 27, 247, 0, 29, 247, 0, 78, 250, 0, + 79, 244, 0, + 82, 250, 0, 83, 244, 0, 87, 244, 0, 89, 244, 0, 109, 242, 0, 113, 242, 0, + 115, 242, + 0, 117, 242, 13, 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, + 196, 249, + 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 65, 45, 237, 46, 244, + 47, 237, + 59, 250, 60, 250, 66, 244, 72, 249, 80, 249, 98, 247, 102, 249, 112, 242, + 118, 247, + 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 211, 249, 212, + 249, + 213, 249, 214, 249, 215, 249, 217, 249, 225, 247, 226, 247, 227, 247, 228, + 247, + 229, 247, 230, 247, 233, 249, 234, 249, 235, 249, 236, 249, 243, 242, 244, + 242, + 245, 242, 246, 242, 247, 242, 249, 242, 250, 247, 251, 247, 252, 247, 253, + 247, + 0, 2, 244, 0, 3, 247, 0, 4, 244, 0, 5, 247, 0, 6, 244, 0, 7, 247, 0, 21, + 249, 0, 25, 249, + 0, 27, 249, 0, 29, 249, 0, 32, 249, 0, 36, 249, 0, 78, 249, 0, 79, 242, 0, + 82, 249, 0, + 83, 242, 0, 109, 247, 0, 113, 247, 0, 115, 247, 0, 117, 247, 65, 45, 244, + 46, 250, + 47, 244, 59, 255, 60, 255, 66, 247, 80, 254, 98, 250, 102, 251, 112, 247, + 118, 249, + 122, 254, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, 247, 211, + 254, + 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, 226, 250, 227, + 250, + 228, 250, 229, 250, 230, 250, 233, 251, 234, 251, 235, 251, 236, 251, 243, + 247, + 244, 247, 245, 247, 246, 247, 247, 247, 249, 247, 250, 249, 251, 249, 252, + 249, + 253, 249, 254, 254, 0, 1, 254, 0, 2, 247, 0, 3, 250, 0, 4, 247, 0, 5, 250, + 0, 6, 247, + 0, 7, 250, 0, 21, 251, 0, 25, 251, 0, 27, 251, 0, 29, 251, 0, 78, 254, 0, + 79, 247, 0, + 82, 254, 0, 83, 247, 0, 109, 249, 0, 113, 249, 0, 115, 249, 0, 117, 249, + 61, 45, 240, + 47, 240, 59, 249, 60, 249, 66, 239, 80, 245, 98, 242, 102, 244, 112, 240, + 118, 240, + 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, 245, 212, + 245, + 213, 245, 214, 245, 215, 245, 217, 245, 225, 242, 226, 242, 227, 242, 228, + 242, + 229, 242, 230, 242, 233, 244, 234, 244, 235, 244, 236, 244, 243, 240, 244, + 240, + 245, 240, 246, 240, 247, 240, 249, 240, 250, 240, 251, 240, 252, 240, 253, + 240, + 0, 2, 239, 0, 3, 242, 0, 4, 239, 0, 5, 242, 0, 6, 239, 0, 7, 242, 0, 21, + 244, 0, 25, 244, + 0, 27, 244, 0, 29, 244, 0, 78, 245, 0, 79, 240, 0, 82, 245, 0, 83, 240, 0, + 109, 240, + 0, 113, 240, 0, 115, 240, 0, 117, 240, 9, 104, 255, 119, 254, 120, 254, + 122, 254, + 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 18, 109, 255, 118, 254, 119, + 254, 122, + 254, 250, 254, 251, 254, 252, 254, 253, 254, 254, 254, 0, 1, 254, 0, 60, + 255, 0, 62, + 255, 0, 68, 255, 0, 109, 254, 0, 113, 254, 0, 115, 254, 0, 117, 254, 11, + 105, 255, + 108, 254, 109, 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, 254, 0, 60, 254, + 0, 62, 254, + 0, 68, 254, 8, 101, 255, 119, 254, 120, 254, 122, 254, 254, 254, 0, 1, + 254, 0, 19, + 255, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, + 1, 254, + 23, 45, 255, 47, 255, 102, 255, 112, 254, 233, 255, 234, 255, 235, 255, + 236, 255, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, 255, 0, + 25, 255, + 0, 27, 255, 0, 29, 255, 0, 79, 254, 0, 83, 254, 1, 32, 25, 5, 1, 32, 29, + 5, 13, 102, 2, + 104, 255, 233, 2, 234, 2, 235, 2, 236, 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, + 29, 2, 0, 33, + 255, 0, 37, 255, 4, 122, 254, 254, 254, 0, 1, 254, 10, 112, 254, 243, 254, + 244, 254, + 245, 254, 246, 254, 247, 254, 249, 254, 0, 79, 254, 0, 83, 254, 5, 120, + 254, 122, + 254, 254, 254, 0, 1, 254, 13, 118, 254, 122, 252, 250, 254, 251, 254, 252, + 254, 253, + 254, 254, 252, 0, 1, 252, 0, 109, 254, 0, 113, 254, 0, 115, 254, 0, 117, + 254, 14, 118, + 255, 119, 250, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, + 0, 1, + 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 7, 119, 254, 120, + 254, 121, + 252, 122, 254, 254, 254, 0, 1, 254, 4, 122, 254, 254, 254, 0, 1, 254, 34, + 45, 247, + 46, 254, 47, 247, 100, 254, 101, 254, 104, 254, 112, 254, 114, 254, 116, + 254, 117, + 3, 119, 2, 122, 2, 232, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, + 254, 249, + 254, 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, 254, 0, 19, 254, 0, 33, 254, 0, + 37, 254, 0, 79, + 254, 0, 83, 254, 0, 93, 254, 0, 97, 254, 0, 99, 254, 0, 101, 3, 1, 2, 25, + 254, 2, 120, + 254, 22, 45, 244, 47, 244, 98, 254, 112, 252, 225, 254, 226, 254, 227, + 254, 228, + 254, 229, 254, 230, 254, 243, 252, 244, 252, 245, 252, 246, 252, 247, 252, + 249, + 252, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 79, 252, 0, 83, 252, 12, 45, 250, + 47, 250, 112, + 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 79, + 254, 0, 83, + 254, 10, 102, 255, 233, 255, 234, 255, 235, 255, 236, 255, 0, 21, 255, 0, + 25, 255, + 0, 27, 255, 0, 29, 255, 31, 45, 244, 47, 244, 98, 252, 102, 255, 112, 253, + 225, 252, + 226, 252, 227, 252, 228, 252, 229, 252, 230, 252, 233, 255, 234, 255, 235, + 255, + 236, 255, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 0, + 3, 252, + 0, 5, 252, 0, 7, 252, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, + 79, 253, 0, 83, + 253, 10, 102, 2, 233, 2, 234, 2, 235, 2, 236, 2, 0, 21, 2, 0, 25, 2, 0, + 27, 2, 0, 29, 2, + 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, + 247, 90, 239, + 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, + 250, + 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 239, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, + 14, 250, + 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 239, 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, + 249, 87, 244, + 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, + 250, 212, + 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, + 252, 0, 8, + 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, + 242, 0, 102, + 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, + 115, 252, + 0, 116, 249, 0, 117, 252, 0, 122, 239, 49, 68, 250, 72, 249, 80, 250, 82, + 250, 85, + 242, 86, 249, 87, 244, 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, + 122, 252, + 200, 250, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, + 249, + 219, 249, 220, 249, 221, 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, + 250, 0, 82, + 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, + 113, 252, + 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 239, 49, 68, + 250, 72, 249, + 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, 247, 90, 239, 118, 252, + 119, 250, + 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, 250, 214, 250, 215, + 250, + 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 239, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, 32, + 249, 0, 36, 249, + 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, 0, 109, + 252, 0, 112, + 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, + 122, 239, + 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, + 247, 90, 239, + 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, + 250, + 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 239, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, + 14, 250, + 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 239, 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, + 249, 87, 244, + 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, + 250, 212, + 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, + 252, 0, 8, + 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, + 242, 0, 102, + 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, + 115, 252, + 0, 116, 249, 0, 117, 252, 0, 122, 239, 22, 45, 250, 47, 250, 66, 249, 85, + 250, 87, + 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, + 250, 0, 122, + 245, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, 249, 89, 249, + 90, 245, 193, + 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, 245, 0, 2, + 249, 0, 4, + 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, + 250, 66, 249, + 85, 250, 87, 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, + 196, 249, + 197, 249, 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, + 250, 0, 102, + 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, + 249, 89, 249, + 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, + 245, 0, + 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, + 45, 250, 47, + 250, 66, 249, 85, 250, 87, 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, + 249, 195, + 249, 196, 249, 197, 249, 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, + 249, 0, 100, + 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, + 249, 88, + 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, + 198, 249, + 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, + 122, 245, 13, + 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, 197, + 249, 198, + 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, 193, + 249, 194, + 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, + 249, 13, 45, + 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, + 198, 249, + 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, 193, 249, + 194, 249, + 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, + 61, 45, 240, + 47, 240, 59, 249, 60, 249, 66, 239, 80, 245, 98, 242, 102, 244, 112, 240, + 118, 240, + 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, 245, 212, + 245, + 213, 245, 214, 245, 215, 245, 217, 245, 225, 242, 226, 242, 227, 242, 228, + 242, + 229, 242, 230, 242, 233, 244, 234, 244, 235, 244, 236, 244, 243, 240, 244, + 240, + 245, 240, 246, 240, 247, 240, 249, 240, 250, 240, 251, 240, 252, 240, 253, + 240, + 0, 2, 239, 0, 3, 242, 0, 4, 239, 0, 5, 242, 0, 6, 239, 0, 7, 242, 0, 21, + 244, 0, 25, 244, + 0, 27, 244, 0, 29, 244, 0, 78, 245, 0, 79, 240, 0, 82, 245, 0, 83, 240, 0, + 109, 240, + 0, 113, 240, 0, 115, 240, 0, 117, 240, 9, 104, 255, 119, 254, 120, 254, + 122, 254, + 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, 119, 254, 120, + 254, 122, + 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, 119, 254, + 120, 254, + 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, 119, + 254, 120, + 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, + 119, 254, + 120, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, + 255, 119, + 254, 120, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 11, + 105, 255, + 108, 254, 109, 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, 254, 0, 60, 254, + 0, 62, 254, + 0, 68, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, + 254, 0, 1, + 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, + 1, 254, + 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, 1, + 254, 9, 45, + 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, 1, 254, 14, + 118, 255, + 119, 250, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, + 1, 254, + 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 7, 119, 254, 120, 254, + 121, 252, + 122, 254, 254, 254, 0, 1, 254, 7, 119, 254, 120, 254, 121, 252, 122, 254, + 254, 254, + 0, 1, 254, 7, 119, 254, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, + 7, 119, + 254, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, 7, 119, 254, 120, + 254, 121, + 252, 122, 254, 254, 254, 0, 1, 254, 7, 119, 254, 120, 254, 121, 252, 122, + 254, 254, + 254, 0, 1, 254, 31, 45, 244, 47, 244, 98, 252, 102, 255, 112, 253, 225, + 252, 226, + 252, 227, 252, 228, 252, 229, 252, 230, 252, 233, 255, 234, 255, 235, 255, + 236, + 255, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 0, 3, + 252, 0, 5, + 252, 0, 7, 252, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, + 253, 0, 83, 253, + 31, 45, 244, 47, 244, 98, 252, 102, 255, 112, 253, 225, 252, 226, 252, + 227, 252, + 228, 252, 229, 252, 230, 252, 233, 255, 234, 255, 235, 255, 236, 255, 243, + 253, + 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 0, 3, 252, 0, 5, 252, 0, + 7, 252, + 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 253, 0, 83, 253, + 49, 68, 250, + 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, 247, 90, 239, + 118, 252, + 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, 250, 214, + 250, + 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 239, 250, + 252, + 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, + 0, 32, 249, + 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, + 0, 109, 252, + 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, + 252, 0, 122, + 239, 9, 104, 255, 119, 254, 120, 254, 122, 254, 254, 254, 0, 1, 254, 0, + 33, 255, 0, + 37, 255, 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, + 244, 88, 247, + 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, + 250, 213, + 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, + 250, 0, 14, + 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, + 242, 0, 108, + 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, + 116, 249, + 0, 117, 252, 0, 122, 239, 9, 104, 255, 119, 254, 120, 254, 122, 254, 254, + 254, 0, + 1, 254, 0, 33, 255, 0, 37, 255, 49, 68, 250, 72, 249, 80, 250, 82, 250, + 85, 242, 86, + 249, 87, 244, 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, + 200, 250, + 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, + 249, + 220, 249, 221, 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, + 252, + 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, + 82, 250, 0, 100, + 242, 0, 102, 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, + 114, 249, + 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 239, 9, 104, 255, 119, 254, + 120, 254, + 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 11, 105, 255, 108, + 254, 109, + 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, 254, 0, 60, 254, 0, 62, 254, 0, + 68, 254, + 11, 105, 255, 108, 254, 109, 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, + 254, 0, 60, + 254, 0, 62, 254, 0, 68, 254, 18, 45, 252, 47, 252, 66, 250, 87, 250, 88, + 250, 90, 245, + 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 245, 0, + 2, 250, + 0, 4, 250, 0, 6, 250, 0, 122, 245, 18, 45, 252, 47, 252, 66, 250, 87, 250, + 88, 250, + 90, 245, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, + 245, 0, + 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 245, 8, 101, 255, 119, 254, 120, + 254, 122, 254, + 254, 254, 0, 1, 254, 0, 19, 255, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, + 254, 122, + 254, 254, 254, 0, 1, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, + 254, 254, + 254, 0, 1, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, + 254, 254, + 0, 1, 254, 13, 102, 2, 104, 255, 233, 2, 234, 2, 235, 2, 236, 2, 0, 21, 2, + 0, 25, 2, 0, + 27, 2, 0, 29, 2, 0, 33, 255, 0, 37, 255, 13, 102, 2, 104, 255, 233, 2, + 234, 2, 235, 2, + 236, 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 0, 33, 255, 0, 37, 255, + 40, 80, 252, 102, + 254, 112, 251, 118, 252, 122, 250, 211, 252, 212, 252, 213, 252, 214, 252, + 215, + 252, 217, 252, 233, 254, 234, 254, 235, 254, 236, 254, 243, 251, 244, 251, + 245, + 251, 246, 251, 247, 251, 249, 251, 250, 252, 251, 252, 252, 252, 253, 252, + 254, + 250, 0, 1, 250, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 78, + 252, 0, 79, 251, + 0, 82, 252, 0, 83, 251, 0, 109, 252, 0, 113, 252, 0, 115, 252, 0, 117, + 252, 10, 112, + 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 79, + 254, 0, 83, + 254, 14, 85, 242, 87, 239, 88, 244, 90, 237, 122, 252, 222, 237, 254, 252, + 0, 1, 252, + 0, 100, 242, 0, 102, 242, 0, 122, 237, 1, 32, 25, 234, 1, 32, 29, 234, 5, + 120, 254, + 122, 254, 254, 254, 0, 1, 254, 14, 85, 242, 87, 239, 88, 244, 90, 237, + 122, 252, 222, + 237, 254, 252, 0, 1, 252, 0, 100, 242, 0, 102, 242, 0, 122, 237, 1, 32, + 25, 234, 1, + 32, 29, 234, 5, 120, 254, 122, 254, 254, 254, 0, 1, 254, 14, 85, 242, 87, + 239, 88, + 244, 90, 237, 122, 252, 222, 237, 254, 252, 0, 1, 252, 0, 100, 242, 0, + 102, 242, 0, + 122, 237, 1, 32, 25, 234, 1, 32, 29, 234, 5, 120, 254, 122, 254, 254, 254, + 0, 1, 254, + 14, 118, 255, 119, 250, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, + 254, 254, + 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 14, 118, + 255, 119, 250, + 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, + 109, 255, + 0, 113, 255, 0, 115, 255, 0, 117, 255, 14, 118, 255, 119, 250, 122, 254, + 250, 255, + 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, + 255, 0, 115, + 255, 0, 117, 255, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, + 249, 89, 249, + 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, + 245, 0, + 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 7, + 119, 254, 120, + 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, 22, 45, 250, 47, 250, 66, + 249, 85, 250, + 87, 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, 196, + 249, 197, + 249, 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, + 102, 250, + 0, 122, 245, 7, 119, 254, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 27, 80, + 254, 85, 254, 86, 254, 87, 249, 88, 250, 90, 249, 211, 254, 212, 254, 213, + 254, 214, + 254, 215, 254, 217, 254, 218, 254, 219, 254, 220, 254, 221, 254, 222, 249, + 0, 78, + 254, 0, 82, 254, 0, 100, 254, 0, 102, 254, 0, 108, 254, 0, 112, 254, 0, + 114, 254, 0, + 116, 254, 0, 122, 249, 34, 45, 247, 46, 254, 47, 247, 100, 254, 101, 254, + 104, 254, + 112, 254, 114, 254, 116, 254, 117, 3, 119, 2, 122, 2, 232, 254, 243, 254, + 244, 254, + 245, 254, 246, 254, 247, 254, 249, 254, 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, + 254, 0, 19, + 254, 0, 33, 254, 0, 37, 254, 0, 79, 254, 0, 83, 254, 0, 93, 254, 0, 97, + 254, 0, 99, 254, + 0, 101, 3, 1, 2, 25, 254, 27, 80, 254, 85, 254, 86, 254, 87, 249, 88, 250, + 90, 249, + 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 218, 254, 219, + 254, + 220, 254, 221, 254, 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 254, 0, 102, + 254, 0, + 108, 254, 0, 112, 254, 0, 114, 254, 0, 116, 254, 0, 122, 249, 34, 45, 247, + 46, 254, + 47, 247, 100, 254, 101, 254, 104, 254, 112, 254, 114, 254, 116, 254, 117, + 3, 119, + 2, 122, 2, 232, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, + 249, 254, + 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, 254, 0, 19, 254, 0, 33, 254, 0, 37, + 254, 0, 79, 254, + 0, 83, 254, 0, 93, 254, 0, 97, 254, 0, 99, 254, 0, 101, 3, 1, 2, 25, 254, + 27, 80, 254, + 85, 254, 86, 254, 87, 249, 88, 250, 90, 249, 211, 254, 212, 254, 213, 254, + 214, 254, + 215, 254, 217, 254, 218, 254, 219, 254, 220, 254, 221, 254, 222, 249, 0, + 78, 254, + 0, 82, 254, 0, 100, 254, 0, 102, 254, 0, 108, 254, 0, 112, 254, 0, 114, + 254, 0, 116, + 254, 0, 122, 249, 34, 45, 247, 46, 254, 47, 247, 100, 254, 101, 254, 104, + 254, 112, + 254, 114, 254, 116, 254, 117, 3, 119, 2, 122, 2, 232, 254, 243, 254, 244, + 254, 245, + 254, 246, 254, 247, 254, 249, 254, 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, 254, + 0, 19, 254, + 0, 33, 254, 0, 37, 254, 0, 79, 254, 0, 83, 254, 0, 93, 254, 0, 97, 254, 0, + 99, 254, 0, + 101, 3, 1, 2, 25, 254, 2, 120, 254, 2, 120, 254, 2, 120, 254, 69, 45, 244, + 46, 237, + 47, 244, 59, 250, 60, 250, 66, 242, 80, 250, 98, 244, 102, 247, 112, 244, + 115, 244, + 118, 242, 120, 247, 122, 247, 193, 242, 194, 242, 195, 242, 196, 242, 197, + 242, + 198, 242, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, + 244, + 226, 244, 227, 244, 228, 244, 229, 244, 230, 244, 233, 247, 234, 247, 235, + 247, + 236, 247, 243, 244, 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, + 242, + 251, 242, 252, 242, 253, 242, 254, 247, 0, 1, 247, 0, 2, 242, 0, 3, 244, + 0, 4, 242, + 0, 5, 244, 0, 6, 242, 0, 7, 244, 0, 21, 247, 0, 25, 247, 0, 27, 247, 0, + 29, 247, 0, 78, + 250, 0, 79, 244, 0, 82, 250, 0, 83, 244, 0, 87, 244, 0, 89, 244, 0, 109, + 242, 0, 113, + 242, 0, 115, 242, 0, 117, 242, 69, 45, 244, 46, 237, 47, 244, 59, 250, 60, + 250, 66, + 242, 80, 250, 98, 244, 102, 247, 112, 244, 115, 244, 118, 242, 120, 247, + 122, 247, + 193, 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, 242, 211, 250, 212, + 250, + 213, 250, 214, 250, 215, 250, 217, 250, 225, 244, 226, 244, 227, 244, 228, + 244, + 229, 244, 230, 244, 233, 247, 234, 247, 235, 247, 236, 247, 243, 244, 244, + 244, + 245, 244, 246, 244, 247, 244, 249, 244, 250, 242, 251, 242, 252, 242, 253, + 242, + 254, 247, 0, 1, 247, 0, 2, 242, 0, 3, 244, 0, 4, 242, 0, 5, 244, 0, 6, + 242, 0, 7, 244, + 0, 21, 247, 0, 25, 247, 0, 27, 247, 0, 29, 247, 0, 78, 250, 0, 79, 244, 0, + 82, 250, 0, + 83, 244, 0, 87, 244, 0, 89, 244, 0, 109, 242, 0, 113, 242, 0, 115, 242, 0, + 117, 242, + 13, 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, + 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, + 6, 249, + 13, 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, + 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, + 6, 249, + 61, 45, 240, 47, 240, 59, 249, 60, 249, 66, 239, 80, 245, 98, 242, 102, + 244, 112, + 240, 118, 240, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, + 211, + 245, 212, 245, 213, 245, 214, 245, 215, 245, 217, 245, 225, 242, 226, 242, + 227, + 242, 228, 242, 229, 242, 230, 242, 233, 244, 234, 244, 235, 244, 236, 244, + 243, + 240, 244, 240, 245, 240, 246, 240, 247, 240, 249, 240, 250, 240, 251, 240, + 252, + 240, 253, 240, 0, 2, 239, 0, 3, 242, 0, 4, 239, 0, 5, 242, 0, 6, 239, 0, + 7, 242, 0, 21, + 244, 0, 25, 244, 0, 27, 244, 0, 29, 244, 0, 78, 245, 0, 79, 240, 0, 82, + 245, 0, 83, 240, + 0, 109, 240, 0, 113, 240, 0, 115, 240, 0, 117, 240, 10, 102, 2, 233, 2, + 234, 2, 235, + 2, 236, 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 10, 102, 2, 233, 2, + 234, 2, 235, 2, 236, + 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 10, 102, 2, 233, 2, 234, 2, + 235, 2, 236, 2, 0, + 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 2, 120, 254, 2, 1, 32, 24, 249, 19, + 33, 244, 101, + 244, 109, 254, 115, 250, 116, 247, 119, 254, 0, 19, 244, 0, 60, 254, 0, + 62, 254, 0, + 68, 254, 0, 87, 250, 0, 89, 250, 0, 91, 250, 0, 93, 247, 0, 97, 247, 0, + 99, 247, 1, 2, + 25, 247, 1, 32, 25, 249, 2, 33, 244 }; static afm_cuint16 afm_Helvetica_Bold_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Helvetica_Bold_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Helvetica_Bold_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -1000,381 +1881,742 @@ static afm_cunicode afm_Helvetica_Bold_ligatures[] = { /* 3 */ /* FontName: Helvetica-BoldOblique */ /* FullName: Helvetica Bold Oblique */ /* FamilyName: Helvetica */ -static afm_cuint8 afm_Helvetica_BoldOblique_widths[] = { /* 315 */ - 46,56,79,93,93,148,120,40,56,56,65,97,46,56,46,46,93,93,93,93,93, - 93,93,93,93,93,56,56,97,97,97,102,163,120,120,120,120,111,102,130, - 120,46,93,120,102,139,120,130,111,130,120,111,102,120,111,157,111, - 111,102,56,46,56,97,93,56,93,102,93,102,93,56,102,102,46,46,93,46, - 148,102,102,102,102,65,93,56,102,93,130,93,93,83,65,47,65,97,56, - 93,93,93,93,47,93,56,123,62,93,97,123,56,67,97,56,56,56,102,93,46, - 56,56,61,93,139,139,139,102,120,120,120,120,120,120,167,120,111, - 111,111,111,46,46,46,46,120,120,130,130,130,130,130,97,130,120,120, - 120,120,111,111,102,93,93,93,93,93,93,148,93,93,93,93,93,46,46,46, - 46,102,102,102,102,102,102,102,97,102,102,102,102,102,93,102,93, - 120,93,120,93,120,93,120,93,120,93,120,124,120,102,111,93,111,93, - 111,93,111,93,130,102,130,102,46,46,46,46,46,46,120,93,102,46,102, - 46,102,67,102,46,120,102,120,102,120,102,130,102,130,102,167,157, - 120,65,120,65,120,65,111,93,111,93,111,93,102,56,102,65,120,102, - 120,102,120,102,120,102,111,102,83,102,83,102,83,93,111,93,56,56, - 56,56,56,56,56,56,93,167,46,46,46,83,83,83,93,93,58,167,167,56,56, - 28,93,167,82,102,100,97,92,92,92,92,82,42,102,102 +static afm_cuint8 afm_Helvetica_BoldOblique_widths[] = { /* 315 */ + 46, 56, 79, 93, 93, 148, 120, 40, 56, 56, 65, 97, 46, 56, 46, 46, 93, 93, + 93, 93, 93, + 93, 93, 93, 93, 93, 56, 56, 97, 97, 97, 102, 163, 120, 120, 120, 120, 111, + 102, 130, + 120, 46, 93, 120, 102, 139, 120, 130, 111, 130, 120, 111, 102, 120, 111, + 157, 111, + 111, 102, 56, 46, 56, 97, 93, 56, 93, 102, 93, 102, 93, 56, 102, 102, 46, + 46, 93, 46, + 148, 102, 102, 102, 102, 65, 93, 56, 102, 93, 130, 93, 93, 83, 65, 47, 65, + 97, 56, + 93, 93, 93, 93, 47, 93, 56, 123, 62, 93, 97, 123, 56, 67, 97, 56, 56, 56, + 102, 93, 46, + 56, 56, 61, 93, 139, 139, 139, 102, 120, 120, 120, 120, 120, 120, 167, + 120, 111, + 111, 111, 111, 46, 46, 46, 46, 120, 120, 130, 130, 130, 130, 130, 97, 130, + 120, 120, + 120, 120, 111, 111, 102, 93, 93, 93, 93, 93, 93, 148, 93, 93, 93, 93, 93, + 46, 46, 46, + 46, 102, 102, 102, 102, 102, 102, 102, 97, 102, 102, 102, 102, 102, 93, + 102, 93, + 120, 93, 120, 93, 120, 93, 120, 93, 120, 93, 120, 124, 120, 102, 111, 93, + 111, 93, + 111, 93, 111, 93, 130, 102, 130, 102, 46, 46, 46, 46, 46, 46, 120, 93, + 102, 46, 102, + 46, 102, 67, 102, 46, 120, 102, 120, 102, 120, 102, 130, 102, 130, 102, + 167, 157, + 120, 65, 120, 65, 120, 65, 111, 93, 111, 93, 111, 93, 102, 56, 102, 65, + 120, 102, + 120, 102, 120, 102, 120, 102, 111, 102, 83, 102, 83, 102, 83, 93, 111, 93, + 56, 56, + 56, 56, 56, 56, 56, 56, 93, 167, 46, 46, 46, 83, 83, 83, 93, 93, 58, 167, + 167, 56, 56, + 28, 93, 167, 82, 102, 100, 97, 92, 92, 92, 92, 82, 42, 102, 102 }; static afm_sint16 afm_Helvetica_BoldOblique_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,29,0,40,0,0,0,0,0,0,0,0,0,0,0,51,54,0,0, - 0,0,0,57,172,0,218,0,257,0,0,0,308,358,450,0,0,485,534,627,654,0, - 716,874,902,1051,0,1199,0,0,0,0,0,0,0,1338,1358,1401,1427,1444,1462, - 1517,1548,0,0,1556,1577,1587,1617,1649,1663,0,1671,1752,0,0,1755, - 1803,1828,1851,1921,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,1944,2059,2174,2289,2404,2519,0,0,0,0,0, - 0,0,0,0,0,0,0,2634,2683,2732,2781,2830,0,2879,2928,2956,2984,3012, - 3040,0,0,3179,3199,3219,3239,3259,3279,0,3299,3325,3343,3361,3379, - 0,0,0,0,0,3397,3429,3443,3457,3471,3485,0,3499,0,0,0,0,3513,0,3583, - 3653,3768,3788,3903,3923,4038,0,4058,0,4084,4110,0,4149,4188,0,4205, - 0,4223,0,4241,0,4259,0,4277,0,4308,0,0,0,0,0,0,4339,4431,4452,4487, - 4497,4532,0,0,4542,4577,0,4587,0,4619,0,4651,4683,4732,4746,4795, - 0,0,4809,4871,4952,5014,5095,5157,0,5238,0,5241,0,5244,5247,0,5405, - 0,5563,0,5591,0,5619,0,5647,0,5675,0,5814,0,5837,0,5860,0,0,5883, - 0,0,0,0,0,0,0,0,0,0,5886,5891,0,0,5942,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0 + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 51, 54, 0, 0, + 0, 0, 0, 57, 172, 0, 218, 0, 257, 0, 0, 0, 308, 358, 450, 0, 0, 485, 534, + 627, 654, 0, + 716, 874, 902, 1051, 0, 1199, 0, 0, 0, 0, 0, 0, 0, 1338, 1358, 1401, 1427, + 1444, 1462, + 1517, 1548, 0, 0, 1556, 1577, 1587, 1617, 1649, 1663, 0, 1671, 1752, 0, 0, + 1755, + 1803, 1828, 1851, 1921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1944, 2059, 2174, 2289, 2404, 2519, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 2634, 2683, 2732, 2781, 2830, 0, 2879, 2928, 2956, + 2984, 3012, + 3040, 0, 0, 3179, 3199, 3219, 3239, 3259, 3279, 0, 3299, 3325, 3343, 3361, + 3379, + 0, 0, 0, 0, 0, 3397, 3429, 3443, 3457, 3471, 3485, 0, 3499, 0, 0, 0, 0, + 3513, 0, 3583, + 3653, 3768, 3788, 3903, 3923, 4038, 0, 4058, 0, 4084, 4110, 0, 4149, 4188, + 0, 4205, + 0, 4223, 0, 4241, 0, 4259, 0, 4277, 0, 4308, 0, 0, 0, 0, 0, 0, 4339, 4431, + 4452, 4487, + 4497, 4532, 0, 0, 4542, 4577, 0, 4587, 0, 4619, 0, 4651, 4683, 4732, 4746, + 4795, + 0, 0, 4809, 4871, 4952, 5014, 5095, 5157, 0, 5238, 0, 5241, 0, 5244, 5247, + 0, 5405, + 0, 5563, 0, 5591, 0, 5619, 0, 5647, 0, 5675, 0, 5814, 0, 5837, 0, 5860, 0, + 0, 5883, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5886, 5891, 0, 0, 5942, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static afm_cuint8 afm_Helvetica_BoldOblique_kerning_data[] = { /* 5945 */ - 42,11,85,240,87,244,88,244,90,237,222,237,0,100,240,0,102,240,0, - 122,237,1,32,24,247,1,32,28,244,4,33,250,1,32,25,237,1,32,29,237, - 4,33,250,1,32,25,237,1,32,29,237,2,33,250,2,33,250,49,68,250,72, - 249,80,250,82,250,85,242,86,249,87,244,88,247,90,239,118,252,119, - 250,120,252,122,252,200,250,211,250,212,250,213,250,214,250,215, - 250,217,250,218,249,219,249,220,249,221,249,222,239,250,252,251, - 252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250,0,32,249,0, - 36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249,0,109,252, - 0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122, - 239,20,66,252,86,255,193,252,194,252,195,252,196,252,197,252,198, - 252,218,255,219,255,220,255,221,255,0,2,252,0,4,252,0,6,252,0,108, - 255,0,112,255,0,114,255,0,116,255,18,45,252,47,252,66,250,87,250, - 88,250,90,245,193,250,194,250,195,250,196,250,197,250,198,250,222, - 245,0,2,250,0,4,250,0,6,250,0,122,245,23,45,240,47,240,66,244,98, - 254,193,244,194,244,195,244,196,244,197,244,198,244,225,254,226, - 254,227,254,228,254,229,254,230,254,0,2,244,0,3,254,0,4,244,0,5, - 254,0,6,244,0,7,254,22,45,254,47,254,66,254,118,254,193,254,194, - 254,195,254,196,254,197,254,198,254,250,254,251,254,252,254,253, - 254,0,2,254,0,4,254,0,6,254,0,109,254,0,113,254,0,115,254,0,117, - 254,40,80,252,102,254,112,251,118,252,122,250,211,252,212,252,213, - 252,214,252,215,252,217,252,233,254,234,254,235,254,236,254,243, - 251,244,251,245,251,246,251,247,251,249,251,250,252,251,252,252, - 252,253,252,254,250,0,1,250,0,21,254,0,25,254,0,27,254,0,29,254, - 0,78,252,0,79,251,0,82,252,0,83,251,0,109,252,0,113,252,0,115,252, - 0,117,252,14,85,242,87,239,88,244,90,237,122,252,222,237,254,252, - 0,1,252,0,100,242,0,102,242,0,122,237,1,32,25,234,1,32,29,234,22, - 45,250,47,250,66,249,85,250,87,249,88,249,89,249,90,245,193,249, - 194,249,195,249,196,249,197,249,198,249,222,245,0,2,249,0,4,249, - 0,6,249,0,100,250,0,102,250,0,122,245,41,45,237,47,237,66,240,98, - 252,102,252,112,250,193,240,194,240,195,240,196,240,197,240,198, - 240,225,252,226,252,227,252,228,252,229,252,230,252,233,252,234, - 252,235,252,236,252,243,250,244,250,245,250,246,250,247,250,249, - 250,0,2,240,0,3,252,0,4,240,0,5,252,0,6,240,0,7,252,0,21,252,0,25, - 252,0,27,252,0,29,252,0,79,250,0,83,250,12,45,3,47,3,86,255,218, - 255,219,255,220,255,221,255,0,108,255,0,112,255,0,114,255,0,116, - 255,27,80,254,85,254,86,254,87,249,88,250,90,249,211,254,212,254, - 213,254,214,254,215,254,217,254,218,254,219,254,220,254,221,254, - 222,249,0,78,254,0,82,254,0,100,254,0,102,254,0,108,254,0,112,254, - 0,114,254,0,116,254,0,122,249,69,45,244,46,237,47,244,59,250,60, - 250,66,242,80,250,98,244,102,247,112,244,115,244,118,242,120,247, - 122,247,193,242,194,242,195,242,196,242,197,242,198,242,211,250, - 212,250,213,250,214,250,215,250,217,250,225,244,226,244,227,244, - 228,244,229,244,230,244,233,247,234,247,235,247,236,247,243,244, - 244,244,245,244,246,244,247,244,249,244,250,242,251,242,252,242, - 253,242,254,247,0,1,247,0,2,242,0,3,244,0,4,242,0,5,244,0,6,242, - 0,7,244,0,21,247,0,25,247,0,27,247,0,29,247,0,78,250,0,79,244,0, - 82,250,0,83,244,0,87,244,0,89,244,0,109,242,0,113,242,0,115,242, - 0,117,242,13,45,252,47,252,66,249,193,249,194,249,195,249,196,249, - 197,249,198,249,0,2,249,0,4,249,0,6,249,65,45,237,46,244,47,237, - 59,250,60,250,66,244,72,249,80,249,98,247,102,249,112,242,118,247, - 193,244,194,244,195,244,196,244,197,244,198,244,211,249,212,249, - 213,249,214,249,215,249,217,249,225,247,226,247,227,247,228,247, - 229,247,230,247,233,249,234,249,235,249,236,249,243,242,244,242, - 245,242,246,242,247,242,249,242,250,247,251,247,252,247,253,247, - 0,2,244,0,3,247,0,4,244,0,5,247,0,6,244,0,7,247,0,21,249,0,25,249, - 0,27,249,0,29,249,0,32,249,0,36,249,0,78,249,0,79,242,0,82,249,0, - 83,242,0,109,247,0,113,247,0,115,247,0,117,247,65,45,244,46,250, - 47,244,59,255,60,255,66,247,80,254,98,250,102,251,112,247,118,249, - 122,254,193,247,194,247,195,247,196,247,197,247,198,247,211,254, - 212,254,213,254,214,254,215,254,217,254,225,250,226,250,227,250, - 228,250,229,250,230,250,233,251,234,251,235,251,236,251,243,247, - 244,247,245,247,246,247,247,247,249,247,250,249,251,249,252,249, - 253,249,254,254,0,1,254,0,2,247,0,3,250,0,4,247,0,5,250,0,6,247, - 0,7,250,0,21,251,0,25,251,0,27,251,0,29,251,0,78,254,0,79,247,0, - 82,254,0,83,247,0,109,249,0,113,249,0,115,249,0,117,249,61,45,240, - 47,240,59,249,60,249,66,239,80,245,98,242,102,244,112,240,118,240, - 193,239,194,239,195,239,196,239,197,239,198,239,211,245,212,245, - 213,245,214,245,215,245,217,245,225,242,226,242,227,242,228,242, - 229,242,230,242,233,244,234,244,235,244,236,244,243,240,244,240, - 245,240,246,240,247,240,249,240,250,240,251,240,252,240,253,240, - 0,2,239,0,3,242,0,4,239,0,5,242,0,6,239,0,7,242,0,21,244,0,25,244, - 0,27,244,0,29,244,0,78,245,0,79,240,0,82,245,0,83,240,0,109,240, - 0,113,240,0,115,240,0,117,240,9,104,255,119,254,120,254,122,254, - 254,254,0,1,254,0,33,255,0,37,255,18,109,255,118,254,119,254,122, - 254,250,254,251,254,252,254,253,254,254,254,0,1,254,0,60,255,0,62, - 255,0,68,255,0,109,254,0,113,254,0,115,254,0,117,254,11,105,255, - 108,254,109,254,122,255,254,255,0,1,255,0,57,254,0,60,254,0,62,254, - 0,68,254,8,101,255,119,254,120,254,122,254,254,254,0,1,254,0,19, - 255,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254, - 23,45,255,47,255,102,255,112,254,233,255,234,255,235,255,236,255, - 243,254,244,254,245,254,246,254,247,254,249,254,0,21,255,0,25,255, - 0,27,255,0,29,255,0,79,254,0,83,254,1,32,25,5,1,32,29,5,13,102,2, - 104,255,233,2,234,2,235,2,236,2,0,21,2,0,25,2,0,27,2,0,29,2,0,33, - 255,0,37,255,4,122,254,254,254,0,1,254,10,112,254,243,254,244,254, - 245,254,246,254,247,254,249,254,0,79,254,0,83,254,5,120,254,122, - 254,254,254,0,1,254,13,118,254,122,252,250,254,251,254,252,254,253, - 254,254,252,0,1,252,0,109,254,0,113,254,0,115,254,0,117,254,14,118, - 255,119,250,122,254,250,255,251,255,252,255,253,255,254,254,0,1, - 254,0,109,255,0,113,255,0,115,255,0,117,255,7,119,254,120,254,121, - 252,122,254,254,254,0,1,254,4,122,254,254,254,0,1,254,34,45,247, - 46,254,47,247,100,254,101,254,104,254,112,254,114,254,116,254,117, - 3,119,2,122,2,232,254,243,254,244,254,245,254,246,254,247,254,249, - 254,254,2,0,1,2,0,9,254,0,15,254,0,19,254,0,33,254,0,37,254,0,79, - 254,0,83,254,0,93,254,0,97,254,0,99,254,0,101,3,1,2,25,254,2,120, - 254,22,45,244,47,244,98,254,112,252,225,254,226,254,227,254,228, - 254,229,254,230,254,243,252,244,252,245,252,246,252,247,252,249, - 252,0,3,254,0,5,254,0,7,254,0,79,252,0,83,252,12,45,250,47,250,112, - 254,243,254,244,254,245,254,246,254,247,254,249,254,0,79,254,0,83, - 254,10,102,255,233,255,234,255,235,255,236,255,0,21,255,0,25,255, - 0,27,255,0,29,255,31,45,244,47,244,98,252,102,255,112,253,225,252, - 226,252,227,252,228,252,229,252,230,252,233,255,234,255,235,255, - 236,255,243,253,244,253,245,253,246,253,247,253,249,253,0,3,252, - 0,5,252,0,7,252,0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83, - 253,10,102,2,233,2,234,2,235,2,236,2,0,21,2,0,25,2,0,27,2,0,29,2, - 49,68,250,72,249,80,250,82,250,85,242,86,249,87,244,88,247,90,239, - 118,252,119,250,120,252,122,252,200,250,211,250,212,250,213,250, - 214,250,215,250,217,250,218,249,219,249,220,249,221,249,222,239, - 250,252,251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250, - 0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,239,49,68,250,72,249,80,250,82,250,85,242,86,249,87,244, - 88,247,90,239,118,252,119,250,120,252,122,252,200,250,211,250,212, - 250,213,250,214,250,215,250,217,250,218,249,219,249,220,249,221, - 249,222,239,250,252,251,252,252,252,253,252,254,252,0,1,252,0,8, - 250,0,14,250,0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102, - 242,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252, - 0,116,249,0,117,252,0,122,239,49,68,250,72,249,80,250,82,250,85, - 242,86,249,87,244,88,247,90,239,118,252,119,250,120,252,122,252, - 200,250,211,250,212,250,213,250,214,250,215,250,217,250,218,249, - 219,249,220,249,221,249,222,239,250,252,251,252,252,252,253,252, - 254,252,0,1,252,0,8,250,0,14,250,0,32,249,0,36,249,0,78,250,0,82, - 250,0,100,242,0,102,242,0,108,249,0,109,252,0,112,249,0,113,252, - 0,114,249,0,115,252,0,116,249,0,117,252,0,122,239,49,68,250,72,249, - 80,250,82,250,85,242,86,249,87,244,88,247,90,239,118,252,119,250, - 120,252,122,252,200,250,211,250,212,250,213,250,214,250,215,250, - 217,250,218,249,219,249,220,249,221,249,222,239,250,252,251,252, - 252,252,253,252,254,252,0,1,252,0,8,250,0,14,250,0,32,249,0,36,249, - 0,78,250,0,82,250,0,100,242,0,102,242,0,108,249,0,109,252,0,112, - 249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,239, - 49,68,250,72,249,80,250,82,250,85,242,86,249,87,244,88,247,90,239, - 118,252,119,250,120,252,122,252,200,250,211,250,212,250,213,250, - 214,250,215,250,217,250,218,249,219,249,220,249,221,249,222,239, - 250,252,251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250, - 0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,239,49,68,250,72,249,80,250,82,250,85,242,86,249,87,244, - 88,247,90,239,118,252,119,250,120,252,122,252,200,250,211,250,212, - 250,213,250,214,250,215,250,217,250,218,249,219,249,220,249,221, - 249,222,239,250,252,251,252,252,252,253,252,254,252,0,1,252,0,8, - 250,0,14,250,0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102, - 242,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252, - 0,116,249,0,117,252,0,122,239,22,45,250,47,250,66,249,85,250,87, - 249,88,249,89,249,90,245,193,249,194,249,195,249,196,249,197,249, - 198,249,222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122, - 245,22,45,250,47,250,66,249,85,250,87,249,88,249,89,249,90,245,193, - 249,194,249,195,249,196,249,197,249,198,249,222,245,0,2,249,0,4, - 249,0,6,249,0,100,250,0,102,250,0,122,245,22,45,250,47,250,66,249, - 85,250,87,249,88,249,89,249,90,245,193,249,194,249,195,249,196,249, - 197,249,198,249,222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102, - 250,0,122,245,22,45,250,47,250,66,249,85,250,87,249,88,249,89,249, - 90,245,193,249,194,249,195,249,196,249,197,249,198,249,222,245,0, - 2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122,245,22,45,250,47, - 250,66,249,85,250,87,249,88,249,89,249,90,245,193,249,194,249,195, - 249,196,249,197,249,198,249,222,245,0,2,249,0,4,249,0,6,249,0,100, - 250,0,102,250,0,122,245,22,45,250,47,250,66,249,85,250,87,249,88, - 249,89,249,90,245,193,249,194,249,195,249,196,249,197,249,198,249, - 222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122,245,13, - 45,252,47,252,66,249,193,249,194,249,195,249,196,249,197,249,198, - 249,0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249,194, - 249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249,13,45, - 252,47,252,66,249,193,249,194,249,195,249,196,249,197,249,198,249, - 0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249,194,249, - 195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249,61,45,240, - 47,240,59,249,60,249,66,239,80,245,98,242,102,244,112,240,118,240, - 193,239,194,239,195,239,196,239,197,239,198,239,211,245,212,245, - 213,245,214,245,215,245,217,245,225,242,226,242,227,242,228,242, - 229,242,230,242,233,244,234,244,235,244,236,244,243,240,244,240, - 245,240,246,240,247,240,249,240,250,240,251,240,252,240,253,240, - 0,2,239,0,3,242,0,4,239,0,5,242,0,6,239,0,7,242,0,21,244,0,25,244, - 0,27,244,0,29,244,0,78,245,0,79,240,0,82,245,0,83,240,0,109,240, - 0,113,240,0,115,240,0,117,240,9,104,255,119,254,120,254,122,254, - 254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254,120,254,122, - 254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254,120,254, - 122,254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254,120, - 254,122,254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119,254, - 120,254,122,254,254,254,0,1,254,0,33,255,0,37,255,9,104,255,119, - 254,120,254,122,254,254,254,0,1,254,0,33,255,0,37,255,11,105,255, - 108,254,109,254,122,255,254,255,0,1,255,0,57,254,0,60,254,0,62,254, - 0,68,254,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1, - 254,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254, - 9,45,2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254,9,45, - 2,47,3,119,254,120,254,121,254,122,254,254,254,0,1,254,14,118,255, - 119,250,122,254,250,255,251,255,252,255,253,255,254,254,0,1,254, - 0,109,255,0,113,255,0,115,255,0,117,255,7,119,254,120,254,121,252, - 122,254,254,254,0,1,254,7,119,254,120,254,121,252,122,254,254,254, - 0,1,254,7,119,254,120,254,121,252,122,254,254,254,0,1,254,7,119, - 254,120,254,121,252,122,254,254,254,0,1,254,7,119,254,120,254,121, - 252,122,254,254,254,0,1,254,7,119,254,120,254,121,252,122,254,254, - 254,0,1,254,31,45,244,47,244,98,252,102,255,112,253,225,252,226, - 252,227,252,228,252,229,252,230,252,233,255,234,255,235,255,236, - 255,243,253,244,253,245,253,246,253,247,253,249,253,0,3,252,0,5, - 252,0,7,252,0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83,253, - 31,45,244,47,244,98,252,102,255,112,253,225,252,226,252,227,252, - 228,252,229,252,230,252,233,255,234,255,235,255,236,255,243,253, - 244,253,245,253,246,253,247,253,249,253,0,3,252,0,5,252,0,7,252, - 0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83,253,49,68,250, - 72,249,80,250,82,250,85,242,86,249,87,244,88,247,90,239,118,252, - 119,250,120,252,122,252,200,250,211,250,212,250,213,250,214,250, - 215,250,217,250,218,249,219,249,220,249,221,249,222,239,250,252, - 251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14,250,0,32,249, - 0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108,249,0,109,252, - 0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122, - 239,9,104,255,119,254,120,254,122,254,254,254,0,1,254,0,33,255,0, - 37,255,49,68,250,72,249,80,250,82,250,85,242,86,249,87,244,88,247, - 90,239,118,252,119,250,120,252,122,252,200,250,211,250,212,250,213, - 250,214,250,215,250,217,250,218,249,219,249,220,249,221,249,222, - 239,250,252,251,252,252,252,253,252,254,252,0,1,252,0,8,250,0,14, - 250,0,32,249,0,36,249,0,78,250,0,82,250,0,100,242,0,102,242,0,108, - 249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249, - 0,117,252,0,122,239,9,104,255,119,254,120,254,122,254,254,254,0, - 1,254,0,33,255,0,37,255,49,68,250,72,249,80,250,82,250,85,242,86, - 249,87,244,88,247,90,239,118,252,119,250,120,252,122,252,200,250, - 211,250,212,250,213,250,214,250,215,250,217,250,218,249,219,249, - 220,249,221,249,222,239,250,252,251,252,252,252,253,252,254,252, - 0,1,252,0,8,250,0,14,250,0,32,249,0,36,249,0,78,250,0,82,250,0,100, - 242,0,102,242,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249, - 0,115,252,0,116,249,0,117,252,0,122,239,9,104,255,119,254,120,254, - 122,254,254,254,0,1,254,0,33,255,0,37,255,11,105,255,108,254,109, - 254,122,255,254,255,0,1,255,0,57,254,0,60,254,0,62,254,0,68,254, - 11,105,255,108,254,109,254,122,255,254,255,0,1,255,0,57,254,0,60, - 254,0,62,254,0,68,254,18,45,252,47,252,66,250,87,250,88,250,90,245, - 193,250,194,250,195,250,196,250,197,250,198,250,222,245,0,2,250, - 0,4,250,0,6,250,0,122,245,18,45,252,47,252,66,250,87,250,88,250, - 90,245,193,250,194,250,195,250,196,250,197,250,198,250,222,245,0, - 2,250,0,4,250,0,6,250,0,122,245,8,101,255,119,254,120,254,122,254, - 254,254,0,1,254,0,19,255,9,45,2,47,3,119,254,120,254,121,254,122, - 254,254,254,0,1,254,9,45,2,47,3,119,254,120,254,121,254,122,254, - 254,254,0,1,254,9,45,2,47,3,119,254,120,254,121,254,122,254,254, - 254,0,1,254,9,45,2,47,3,119,254,120,254,121,254,122,254,254,254, - 0,1,254,13,102,2,104,255,233,2,234,2,235,2,236,2,0,21,2,0,25,2,0, - 27,2,0,29,2,0,33,255,0,37,255,13,102,2,104,255,233,2,234,2,235,2, - 236,2,0,21,2,0,25,2,0,27,2,0,29,2,0,33,255,0,37,255,40,80,252,102, - 254,112,251,118,252,122,250,211,252,212,252,213,252,214,252,215, - 252,217,252,233,254,234,254,235,254,236,254,243,251,244,251,245, - 251,246,251,247,251,249,251,250,252,251,252,252,252,253,252,254, - 250,0,1,250,0,21,254,0,25,254,0,27,254,0,29,254,0,78,252,0,79,251, - 0,82,252,0,83,251,0,109,252,0,113,252,0,115,252,0,117,252,10,112, - 254,243,254,244,254,245,254,246,254,247,254,249,254,0,79,254,0,83, - 254,14,85,242,87,239,88,244,90,237,122,252,222,237,254,252,0,1,252, - 0,100,242,0,102,242,0,122,237,1,32,25,234,1,32,29,234,5,120,254, - 122,254,254,254,0,1,254,14,85,242,87,239,88,244,90,237,122,252,222, - 237,254,252,0,1,252,0,100,242,0,102,242,0,122,237,1,32,25,234,1, - 32,29,234,5,120,254,122,254,254,254,0,1,254,14,85,242,87,239,88, - 244,90,237,122,252,222,237,254,252,0,1,252,0,100,242,0,102,242,0, - 122,237,1,32,25,234,1,32,29,234,5,120,254,122,254,254,254,0,1,254, - 14,118,255,119,250,122,254,250,255,251,255,252,255,253,255,254,254, - 0,1,254,0,109,255,0,113,255,0,115,255,0,117,255,14,118,255,119,250, - 122,254,250,255,251,255,252,255,253,255,254,254,0,1,254,0,109,255, - 0,113,255,0,115,255,0,117,255,14,118,255,119,250,122,254,250,255, - 251,255,252,255,253,255,254,254,0,1,254,0,109,255,0,113,255,0,115, - 255,0,117,255,22,45,250,47,250,66,249,85,250,87,249,88,249,89,249, - 90,245,193,249,194,249,195,249,196,249,197,249,198,249,222,245,0, - 2,249,0,4,249,0,6,249,0,100,250,0,102,250,0,122,245,7,119,254,120, - 254,121,252,122,254,254,254,0,1,254,22,45,250,47,250,66,249,85,250, - 87,249,88,249,89,249,90,245,193,249,194,249,195,249,196,249,197, - 249,198,249,222,245,0,2,249,0,4,249,0,6,249,0,100,250,0,102,250, - 0,122,245,7,119,254,120,254,121,252,122,254,254,254,0,1,254,27,80, - 254,85,254,86,254,87,249,88,250,90,249,211,254,212,254,213,254,214, - 254,215,254,217,254,218,254,219,254,220,254,221,254,222,249,0,78, - 254,0,82,254,0,100,254,0,102,254,0,108,254,0,112,254,0,114,254,0, - 116,254,0,122,249,34,45,247,46,254,47,247,100,254,101,254,104,254, - 112,254,114,254,116,254,117,3,119,2,122,2,232,254,243,254,244,254, - 245,254,246,254,247,254,249,254,254,2,0,1,2,0,9,254,0,15,254,0,19, - 254,0,33,254,0,37,254,0,79,254,0,83,254,0,93,254,0,97,254,0,99,254, - 0,101,3,1,2,25,254,27,80,254,85,254,86,254,87,249,88,250,90,249, - 211,254,212,254,213,254,214,254,215,254,217,254,218,254,219,254, - 220,254,221,254,222,249,0,78,254,0,82,254,0,100,254,0,102,254,0, - 108,254,0,112,254,0,114,254,0,116,254,0,122,249,34,45,247,46,254, - 47,247,100,254,101,254,104,254,112,254,114,254,116,254,117,3,119, - 2,122,2,232,254,243,254,244,254,245,254,246,254,247,254,249,254, - 254,2,0,1,2,0,9,254,0,15,254,0,19,254,0,33,254,0,37,254,0,79,254, - 0,83,254,0,93,254,0,97,254,0,99,254,0,101,3,1,2,25,254,27,80,254, - 85,254,86,254,87,249,88,250,90,249,211,254,212,254,213,254,214,254, - 215,254,217,254,218,254,219,254,220,254,221,254,222,249,0,78,254, - 0,82,254,0,100,254,0,102,254,0,108,254,0,112,254,0,114,254,0,116, - 254,0,122,249,34,45,247,46,254,47,247,100,254,101,254,104,254,112, - 254,114,254,116,254,117,3,119,2,122,2,232,254,243,254,244,254,245, - 254,246,254,247,254,249,254,254,2,0,1,2,0,9,254,0,15,254,0,19,254, - 0,33,254,0,37,254,0,79,254,0,83,254,0,93,254,0,97,254,0,99,254,0, - 101,3,1,2,25,254,2,120,254,2,120,254,2,120,254,69,45,244,46,237, - 47,244,59,250,60,250,66,242,80,250,98,244,102,247,112,244,115,244, - 118,242,120,247,122,247,193,242,194,242,195,242,196,242,197,242, - 198,242,211,250,212,250,213,250,214,250,215,250,217,250,225,244, - 226,244,227,244,228,244,229,244,230,244,233,247,234,247,235,247, - 236,247,243,244,244,244,245,244,246,244,247,244,249,244,250,242, - 251,242,252,242,253,242,254,247,0,1,247,0,2,242,0,3,244,0,4,242, - 0,5,244,0,6,242,0,7,244,0,21,247,0,25,247,0,27,247,0,29,247,0,78, - 250,0,79,244,0,82,250,0,83,244,0,87,244,0,89,244,0,109,242,0,113, - 242,0,115,242,0,117,242,69,45,244,46,237,47,244,59,250,60,250,66, - 242,80,250,98,244,102,247,112,244,115,244,118,242,120,247,122,247, - 193,242,194,242,195,242,196,242,197,242,198,242,211,250,212,250, - 213,250,214,250,215,250,217,250,225,244,226,244,227,244,228,244, - 229,244,230,244,233,247,234,247,235,247,236,247,243,244,244,244, - 245,244,246,244,247,244,249,244,250,242,251,242,252,242,253,242, - 254,247,0,1,247,0,2,242,0,3,244,0,4,242,0,5,244,0,6,242,0,7,244, - 0,21,247,0,25,247,0,27,247,0,29,247,0,78,250,0,79,244,0,82,250,0, - 83,244,0,87,244,0,89,244,0,109,242,0,113,242,0,115,242,0,117,242, - 13,45,252,47,252,66,249,193,249,194,249,195,249,196,249,197,249, - 198,249,0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249, - 194,249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249, - 13,45,252,47,252,66,249,193,249,194,249,195,249,196,249,197,249, - 198,249,0,2,249,0,4,249,0,6,249,13,45,252,47,252,66,249,193,249, - 194,249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249, - 61,45,240,47,240,59,249,60,249,66,239,80,245,98,242,102,244,112, - 240,118,240,193,239,194,239,195,239,196,239,197,239,198,239,211, - 245,212,245,213,245,214,245,215,245,217,245,225,242,226,242,227, - 242,228,242,229,242,230,242,233,244,234,244,235,244,236,244,243, - 240,244,240,245,240,246,240,247,240,249,240,250,240,251,240,252, - 240,253,240,0,2,239,0,3,242,0,4,239,0,5,242,0,6,239,0,7,242,0,21, - 244,0,25,244,0,27,244,0,29,244,0,78,245,0,79,240,0,82,245,0,83,240, - 0,109,240,0,113,240,0,115,240,0,117,240,10,102,2,233,2,234,2,235, - 2,236,2,0,21,2,0,25,2,0,27,2,0,29,2,10,102,2,233,2,234,2,235,2,236, - 2,0,21,2,0,25,2,0,27,2,0,29,2,10,102,2,233,2,234,2,235,2,236,2,0, - 21,2,0,25,2,0,27,2,0,29,2,2,120,254,2,1,32,24,249,19,33,244,101, - 244,109,254,115,250,116,247,119,254,0,19,244,0,60,254,0,62,254,0, - 68,254,0,87,250,0,89,250,0,91,250,0,93,247,0,97,247,0,99,247,1,2, - 25,247,1,32,25,249,2,33,244 +static afm_cuint8 afm_Helvetica_BoldOblique_kerning_data[] = { /* 5945 */ + 42, 11, 85, 240, 87, 244, 88, 244, 90, 237, 222, 237, 0, 100, 240, 0, 102, + 240, 0, + 122, 237, 1, 32, 24, 247, 1, 32, 28, 244, 4, 33, 250, 1, 32, 25, 237, 1, + 32, 29, 237, + 4, 33, 250, 1, 32, 25, 237, 1, 32, 29, 237, 2, 33, 250, 2, 33, 250, 49, + 68, 250, 72, + 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, 247, 90, 239, 118, + 252, 119, + 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, 250, 214, 250, + 215, + 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 239, 250, 252, + 251, + 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, + 32, 249, 0, + 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, 0, + 109, 252, + 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, + 252, 0, 122, + 239, 20, 66, 252, 86, 255, 193, 252, 194, 252, 195, 252, 196, 252, 197, + 252, 198, + 252, 218, 255, 219, 255, 220, 255, 221, 255, 0, 2, 252, 0, 4, 252, 0, 6, + 252, 0, 108, + 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, 18, 45, 252, 47, 252, 66, 250, + 87, 250, + 88, 250, 90, 245, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, + 250, 222, + 245, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 245, 23, 45, 240, 47, 240, + 66, 244, 98, + 254, 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 225, 254, + 226, + 254, 227, 254, 228, 254, 229, 254, 230, 254, 0, 2, 244, 0, 3, 254, 0, 4, + 244, 0, 5, + 254, 0, 6, 244, 0, 7, 254, 22, 45, 254, 47, 254, 66, 254, 118, 254, 193, + 254, 194, + 254, 195, 254, 196, 254, 197, 254, 198, 254, 250, 254, 251, 254, 252, 254, + 253, + 254, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 109, 254, 0, 113, 254, 0, 115, + 254, 0, 117, + 254, 40, 80, 252, 102, 254, 112, 251, 118, 252, 122, 250, 211, 252, 212, + 252, 213, + 252, 214, 252, 215, 252, 217, 252, 233, 254, 234, 254, 235, 254, 236, 254, + 243, + 251, 244, 251, 245, 251, 246, 251, 247, 251, 249, 251, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 250, 0, 1, 250, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, + 29, 254, + 0, 78, 252, 0, 79, 251, 0, 82, 252, 0, 83, 251, 0, 109, 252, 0, 113, 252, + 0, 115, 252, + 0, 117, 252, 14, 85, 242, 87, 239, 88, 244, 90, 237, 122, 252, 222, 237, + 254, 252, + 0, 1, 252, 0, 100, 242, 0, 102, 242, 0, 122, 237, 1, 32, 25, 234, 1, 32, + 29, 234, 22, + 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, 249, 89, 249, 90, 245, + 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, 245, 0, 2, 249, 0, + 4, 249, + 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 41, 45, 237, 47, 237, + 66, 240, 98, + 252, 102, 252, 112, 250, 193, 240, 194, 240, 195, 240, 196, 240, 197, 240, + 198, + 240, 225, 252, 226, 252, 227, 252, 228, 252, 229, 252, 230, 252, 233, 252, + 234, + 252, 235, 252, 236, 252, 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, + 249, + 250, 0, 2, 240, 0, 3, 252, 0, 4, 240, 0, 5, 252, 0, 6, 240, 0, 7, 252, 0, + 21, 252, 0, 25, + 252, 0, 27, 252, 0, 29, 252, 0, 79, 250, 0, 83, 250, 12, 45, 3, 47, 3, 86, + 255, 218, + 255, 219, 255, 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, 255, + 0, 116, + 255, 27, 80, 254, 85, 254, 86, 254, 87, 249, 88, 250, 90, 249, 211, 254, + 212, 254, + 213, 254, 214, 254, 215, 254, 217, 254, 218, 254, 219, 254, 220, 254, 221, + 254, + 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 254, 0, 102, 254, 0, 108, 254, + 0, 112, 254, + 0, 114, 254, 0, 116, 254, 0, 122, 249, 69, 45, 244, 46, 237, 47, 244, 59, + 250, 60, + 250, 66, 242, 80, 250, 98, 244, 102, 247, 112, 244, 115, 244, 118, 242, + 120, 247, + 122, 247, 193, 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, 242, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 244, 226, 244, 227, + 244, + 228, 244, 229, 244, 230, 244, 233, 247, 234, 247, 235, 247, 236, 247, 243, + 244, + 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, 242, 251, 242, 252, + 242, + 253, 242, 254, 247, 0, 1, 247, 0, 2, 242, 0, 3, 244, 0, 4, 242, 0, 5, 244, + 0, 6, 242, + 0, 7, 244, 0, 21, 247, 0, 25, 247, 0, 27, 247, 0, 29, 247, 0, 78, 250, 0, + 79, 244, 0, + 82, 250, 0, 83, 244, 0, 87, 244, 0, 89, 244, 0, 109, 242, 0, 113, 242, 0, + 115, 242, + 0, 117, 242, 13, 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, + 196, 249, + 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 65, 45, 237, 46, 244, + 47, 237, + 59, 250, 60, 250, 66, 244, 72, 249, 80, 249, 98, 247, 102, 249, 112, 242, + 118, 247, + 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 211, 249, 212, + 249, + 213, 249, 214, 249, 215, 249, 217, 249, 225, 247, 226, 247, 227, 247, 228, + 247, + 229, 247, 230, 247, 233, 249, 234, 249, 235, 249, 236, 249, 243, 242, 244, + 242, + 245, 242, 246, 242, 247, 242, 249, 242, 250, 247, 251, 247, 252, 247, 253, + 247, + 0, 2, 244, 0, 3, 247, 0, 4, 244, 0, 5, 247, 0, 6, 244, 0, 7, 247, 0, 21, + 249, 0, 25, 249, + 0, 27, 249, 0, 29, 249, 0, 32, 249, 0, 36, 249, 0, 78, 249, 0, 79, 242, 0, + 82, 249, 0, + 83, 242, 0, 109, 247, 0, 113, 247, 0, 115, 247, 0, 117, 247, 65, 45, 244, + 46, 250, + 47, 244, 59, 255, 60, 255, 66, 247, 80, 254, 98, 250, 102, 251, 112, 247, + 118, 249, + 122, 254, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, 247, 211, + 254, + 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, 226, 250, 227, + 250, + 228, 250, 229, 250, 230, 250, 233, 251, 234, 251, 235, 251, 236, 251, 243, + 247, + 244, 247, 245, 247, 246, 247, 247, 247, 249, 247, 250, 249, 251, 249, 252, + 249, + 253, 249, 254, 254, 0, 1, 254, 0, 2, 247, 0, 3, 250, 0, 4, 247, 0, 5, 250, + 0, 6, 247, + 0, 7, 250, 0, 21, 251, 0, 25, 251, 0, 27, 251, 0, 29, 251, 0, 78, 254, 0, + 79, 247, 0, + 82, 254, 0, 83, 247, 0, 109, 249, 0, 113, 249, 0, 115, 249, 0, 117, 249, + 61, 45, 240, + 47, 240, 59, 249, 60, 249, 66, 239, 80, 245, 98, 242, 102, 244, 112, 240, + 118, 240, + 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, 245, 212, + 245, + 213, 245, 214, 245, 215, 245, 217, 245, 225, 242, 226, 242, 227, 242, 228, + 242, + 229, 242, 230, 242, 233, 244, 234, 244, 235, 244, 236, 244, 243, 240, 244, + 240, + 245, 240, 246, 240, 247, 240, 249, 240, 250, 240, 251, 240, 252, 240, 253, + 240, + 0, 2, 239, 0, 3, 242, 0, 4, 239, 0, 5, 242, 0, 6, 239, 0, 7, 242, 0, 21, + 244, 0, 25, 244, + 0, 27, 244, 0, 29, 244, 0, 78, 245, 0, 79, 240, 0, 82, 245, 0, 83, 240, 0, + 109, 240, + 0, 113, 240, 0, 115, 240, 0, 117, 240, 9, 104, 255, 119, 254, 120, 254, + 122, 254, + 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 18, 109, 255, 118, 254, 119, + 254, 122, + 254, 250, 254, 251, 254, 252, 254, 253, 254, 254, 254, 0, 1, 254, 0, 60, + 255, 0, 62, + 255, 0, 68, 255, 0, 109, 254, 0, 113, 254, 0, 115, 254, 0, 117, 254, 11, + 105, 255, + 108, 254, 109, 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, 254, 0, 60, 254, + 0, 62, 254, + 0, 68, 254, 8, 101, 255, 119, 254, 120, 254, 122, 254, 254, 254, 0, 1, + 254, 0, 19, + 255, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, + 1, 254, + 23, 45, 255, 47, 255, 102, 255, 112, 254, 233, 255, 234, 255, 235, 255, + 236, 255, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, 255, 0, + 25, 255, + 0, 27, 255, 0, 29, 255, 0, 79, 254, 0, 83, 254, 1, 32, 25, 5, 1, 32, 29, + 5, 13, 102, 2, + 104, 255, 233, 2, 234, 2, 235, 2, 236, 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, + 29, 2, 0, 33, + 255, 0, 37, 255, 4, 122, 254, 254, 254, 0, 1, 254, 10, 112, 254, 243, 254, + 244, 254, + 245, 254, 246, 254, 247, 254, 249, 254, 0, 79, 254, 0, 83, 254, 5, 120, + 254, 122, + 254, 254, 254, 0, 1, 254, 13, 118, 254, 122, 252, 250, 254, 251, 254, 252, + 254, 253, + 254, 254, 252, 0, 1, 252, 0, 109, 254, 0, 113, 254, 0, 115, 254, 0, 117, + 254, 14, 118, + 255, 119, 250, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, + 0, 1, + 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 7, 119, 254, 120, + 254, 121, + 252, 122, 254, 254, 254, 0, 1, 254, 4, 122, 254, 254, 254, 0, 1, 254, 34, + 45, 247, + 46, 254, 47, 247, 100, 254, 101, 254, 104, 254, 112, 254, 114, 254, 116, + 254, 117, + 3, 119, 2, 122, 2, 232, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, + 254, 249, + 254, 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, 254, 0, 19, 254, 0, 33, 254, 0, + 37, 254, 0, 79, + 254, 0, 83, 254, 0, 93, 254, 0, 97, 254, 0, 99, 254, 0, 101, 3, 1, 2, 25, + 254, 2, 120, + 254, 22, 45, 244, 47, 244, 98, 254, 112, 252, 225, 254, 226, 254, 227, + 254, 228, + 254, 229, 254, 230, 254, 243, 252, 244, 252, 245, 252, 246, 252, 247, 252, + 249, + 252, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 79, 252, 0, 83, 252, 12, 45, 250, + 47, 250, 112, + 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 79, + 254, 0, 83, + 254, 10, 102, 255, 233, 255, 234, 255, 235, 255, 236, 255, 0, 21, 255, 0, + 25, 255, + 0, 27, 255, 0, 29, 255, 31, 45, 244, 47, 244, 98, 252, 102, 255, 112, 253, + 225, 252, + 226, 252, 227, 252, 228, 252, 229, 252, 230, 252, 233, 255, 234, 255, 235, + 255, + 236, 255, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 0, + 3, 252, + 0, 5, 252, 0, 7, 252, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, + 79, 253, 0, 83, + 253, 10, 102, 2, 233, 2, 234, 2, 235, 2, 236, 2, 0, 21, 2, 0, 25, 2, 0, + 27, 2, 0, 29, 2, + 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, + 247, 90, 239, + 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, + 250, + 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 239, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, + 14, 250, + 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 239, 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, + 249, 87, 244, + 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, + 250, 212, + 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, + 252, 0, 8, + 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, + 242, 0, 102, + 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, + 115, 252, + 0, 116, 249, 0, 117, 252, 0, 122, 239, 49, 68, 250, 72, 249, 80, 250, 82, + 250, 85, + 242, 86, 249, 87, 244, 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, + 122, 252, + 200, 250, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, + 249, + 219, 249, 220, 249, 221, 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, + 250, 0, 82, + 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, + 113, 252, + 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 239, 49, 68, + 250, 72, 249, + 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, 247, 90, 239, 118, 252, + 119, 250, + 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, 250, 214, 250, 215, + 250, + 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 239, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, 32, + 249, 0, 36, 249, + 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, 0, 109, + 252, 0, 112, + 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, + 122, 239, + 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, + 247, 90, 239, + 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, + 250, + 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 239, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, + 14, 250, + 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 239, 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, + 249, 87, 244, + 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, + 250, 212, + 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, + 252, 0, 8, + 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, + 242, 0, 102, + 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, + 115, 252, + 0, 116, 249, 0, 117, 252, 0, 122, 239, 22, 45, 250, 47, 250, 66, 249, 85, + 250, 87, + 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, + 250, 0, 122, + 245, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, 249, 89, 249, + 90, 245, 193, + 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, 245, 0, 2, + 249, 0, 4, + 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, + 250, 66, 249, + 85, 250, 87, 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, + 196, 249, + 197, 249, 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, + 250, 0, 102, + 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, + 249, 89, 249, + 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, + 245, 0, + 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, + 45, 250, 47, + 250, 66, 249, 85, 250, 87, 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, + 249, 195, + 249, 196, 249, 197, 249, 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, + 249, 0, 100, + 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, + 249, 88, + 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, + 198, 249, + 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, + 122, 245, 13, + 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, 197, + 249, 198, + 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, 193, + 249, 194, + 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, + 249, 13, 45, + 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, + 198, 249, + 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, 193, 249, + 194, 249, + 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, + 61, 45, 240, + 47, 240, 59, 249, 60, 249, 66, 239, 80, 245, 98, 242, 102, 244, 112, 240, + 118, 240, + 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, 245, 212, + 245, + 213, 245, 214, 245, 215, 245, 217, 245, 225, 242, 226, 242, 227, 242, 228, + 242, + 229, 242, 230, 242, 233, 244, 234, 244, 235, 244, 236, 244, 243, 240, 244, + 240, + 245, 240, 246, 240, 247, 240, 249, 240, 250, 240, 251, 240, 252, 240, 253, + 240, + 0, 2, 239, 0, 3, 242, 0, 4, 239, 0, 5, 242, 0, 6, 239, 0, 7, 242, 0, 21, + 244, 0, 25, 244, + 0, 27, 244, 0, 29, 244, 0, 78, 245, 0, 79, 240, 0, 82, 245, 0, 83, 240, 0, + 109, 240, + 0, 113, 240, 0, 115, 240, 0, 117, 240, 9, 104, 255, 119, 254, 120, 254, + 122, 254, + 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, 119, 254, 120, + 254, 122, + 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, 119, 254, + 120, 254, + 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, 119, + 254, 120, + 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, 255, + 119, 254, + 120, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 9, 104, + 255, 119, + 254, 120, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 11, + 105, 255, + 108, 254, 109, 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, 254, 0, 60, 254, + 0, 62, 254, + 0, 68, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, + 254, 0, 1, + 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, + 1, 254, + 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, 1, + 254, 9, 45, + 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, 254, 254, 0, 1, 254, 14, + 118, 255, + 119, 250, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, + 1, 254, + 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 7, 119, 254, 120, 254, + 121, 252, + 122, 254, 254, 254, 0, 1, 254, 7, 119, 254, 120, 254, 121, 252, 122, 254, + 254, 254, + 0, 1, 254, 7, 119, 254, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, + 7, 119, + 254, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, 7, 119, 254, 120, + 254, 121, + 252, 122, 254, 254, 254, 0, 1, 254, 7, 119, 254, 120, 254, 121, 252, 122, + 254, 254, + 254, 0, 1, 254, 31, 45, 244, 47, 244, 98, 252, 102, 255, 112, 253, 225, + 252, 226, + 252, 227, 252, 228, 252, 229, 252, 230, 252, 233, 255, 234, 255, 235, 255, + 236, + 255, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 0, 3, + 252, 0, 5, + 252, 0, 7, 252, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, + 253, 0, 83, 253, + 31, 45, 244, 47, 244, 98, 252, 102, 255, 112, 253, 225, 252, 226, 252, + 227, 252, + 228, 252, 229, 252, 230, 252, 233, 255, 234, 255, 235, 255, 236, 255, 243, + 253, + 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 0, 3, 252, 0, 5, 252, 0, + 7, 252, + 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 253, 0, 83, 253, + 49, 68, 250, + 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, 244, 88, 247, 90, 239, + 118, 252, + 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, 250, 213, 250, 214, + 250, + 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 239, 250, + 252, + 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, 250, 0, 14, 250, + 0, 32, 249, + 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, 242, 0, 108, 249, + 0, 109, 252, + 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, + 252, 0, 122, + 239, 9, 104, 255, 119, 254, 120, 254, 122, 254, 254, 254, 0, 1, 254, 0, + 33, 255, 0, + 37, 255, 49, 68, 250, 72, 249, 80, 250, 82, 250, 85, 242, 86, 249, 87, + 244, 88, 247, + 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, 200, 250, 211, 250, 212, + 250, 213, + 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, 252, 0, 1, 252, 0, 8, + 250, 0, 14, + 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, 82, 250, 0, 100, 242, 0, 102, + 242, 0, 108, + 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, + 116, 249, + 0, 117, 252, 0, 122, 239, 9, 104, 255, 119, 254, 120, 254, 122, 254, 254, + 254, 0, + 1, 254, 0, 33, 255, 0, 37, 255, 49, 68, 250, 72, 249, 80, 250, 82, 250, + 85, 242, 86, + 249, 87, 244, 88, 247, 90, 239, 118, 252, 119, 250, 120, 252, 122, 252, + 200, 250, + 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, + 249, + 220, 249, 221, 249, 222, 239, 250, 252, 251, 252, 252, 252, 253, 252, 254, + 252, + 0, 1, 252, 0, 8, 250, 0, 14, 250, 0, 32, 249, 0, 36, 249, 0, 78, 250, 0, + 82, 250, 0, 100, + 242, 0, 102, 242, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, + 114, 249, + 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 239, 9, 104, 255, 119, 254, + 120, 254, + 122, 254, 254, 254, 0, 1, 254, 0, 33, 255, 0, 37, 255, 11, 105, 255, 108, + 254, 109, + 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, 254, 0, 60, 254, 0, 62, 254, 0, + 68, 254, + 11, 105, 255, 108, 254, 109, 254, 122, 255, 254, 255, 0, 1, 255, 0, 57, + 254, 0, 60, + 254, 0, 62, 254, 0, 68, 254, 18, 45, 252, 47, 252, 66, 250, 87, 250, 88, + 250, 90, 245, + 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 245, 0, + 2, 250, + 0, 4, 250, 0, 6, 250, 0, 122, 245, 18, 45, 252, 47, 252, 66, 250, 87, 250, + 88, 250, + 90, 245, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, + 245, 0, + 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 245, 8, 101, 255, 119, 254, 120, + 254, 122, 254, + 254, 254, 0, 1, 254, 0, 19, 255, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, + 254, 122, + 254, 254, 254, 0, 1, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, + 254, 254, + 254, 0, 1, 254, 9, 45, 2, 47, 3, 119, 254, 120, 254, 121, 254, 122, 254, + 254, 254, + 0, 1, 254, 13, 102, 2, 104, 255, 233, 2, 234, 2, 235, 2, 236, 2, 0, 21, 2, + 0, 25, 2, 0, + 27, 2, 0, 29, 2, 0, 33, 255, 0, 37, 255, 13, 102, 2, 104, 255, 233, 2, + 234, 2, 235, 2, + 236, 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 0, 33, 255, 0, 37, 255, + 40, 80, 252, 102, + 254, 112, 251, 118, 252, 122, 250, 211, 252, 212, 252, 213, 252, 214, 252, + 215, + 252, 217, 252, 233, 254, 234, 254, 235, 254, 236, 254, 243, 251, 244, 251, + 245, + 251, 246, 251, 247, 251, 249, 251, 250, 252, 251, 252, 252, 252, 253, 252, + 254, + 250, 0, 1, 250, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 78, + 252, 0, 79, 251, + 0, 82, 252, 0, 83, 251, 0, 109, 252, 0, 113, 252, 0, 115, 252, 0, 117, + 252, 10, 112, + 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 79, + 254, 0, 83, + 254, 14, 85, 242, 87, 239, 88, 244, 90, 237, 122, 252, 222, 237, 254, 252, + 0, 1, 252, + 0, 100, 242, 0, 102, 242, 0, 122, 237, 1, 32, 25, 234, 1, 32, 29, 234, 5, + 120, 254, + 122, 254, 254, 254, 0, 1, 254, 14, 85, 242, 87, 239, 88, 244, 90, 237, + 122, 252, 222, + 237, 254, 252, 0, 1, 252, 0, 100, 242, 0, 102, 242, 0, 122, 237, 1, 32, + 25, 234, 1, + 32, 29, 234, 5, 120, 254, 122, 254, 254, 254, 0, 1, 254, 14, 85, 242, 87, + 239, 88, + 244, 90, 237, 122, 252, 222, 237, 254, 252, 0, 1, 252, 0, 100, 242, 0, + 102, 242, 0, + 122, 237, 1, 32, 25, 234, 1, 32, 29, 234, 5, 120, 254, 122, 254, 254, 254, + 0, 1, 254, + 14, 118, 255, 119, 250, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, + 254, 254, + 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 14, 118, + 255, 119, 250, + 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, + 109, 255, + 0, 113, 255, 0, 115, 255, 0, 117, 255, 14, 118, 255, 119, 250, 122, 254, + 250, 255, + 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, + 255, 0, 115, + 255, 0, 117, 255, 22, 45, 250, 47, 250, 66, 249, 85, 250, 87, 249, 88, + 249, 89, 249, + 90, 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 222, + 245, 0, + 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, 102, 250, 0, 122, 245, 7, + 119, 254, 120, + 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, 22, 45, 250, 47, 250, 66, + 249, 85, 250, + 87, 249, 88, 249, 89, 249, 90, 245, 193, 249, 194, 249, 195, 249, 196, + 249, 197, + 249, 198, 249, 222, 245, 0, 2, 249, 0, 4, 249, 0, 6, 249, 0, 100, 250, 0, + 102, 250, + 0, 122, 245, 7, 119, 254, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 27, 80, + 254, 85, 254, 86, 254, 87, 249, 88, 250, 90, 249, 211, 254, 212, 254, 213, + 254, 214, + 254, 215, 254, 217, 254, 218, 254, 219, 254, 220, 254, 221, 254, 222, 249, + 0, 78, + 254, 0, 82, 254, 0, 100, 254, 0, 102, 254, 0, 108, 254, 0, 112, 254, 0, + 114, 254, 0, + 116, 254, 0, 122, 249, 34, 45, 247, 46, 254, 47, 247, 100, 254, 101, 254, + 104, 254, + 112, 254, 114, 254, 116, 254, 117, 3, 119, 2, 122, 2, 232, 254, 243, 254, + 244, 254, + 245, 254, 246, 254, 247, 254, 249, 254, 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, + 254, 0, 19, + 254, 0, 33, 254, 0, 37, 254, 0, 79, 254, 0, 83, 254, 0, 93, 254, 0, 97, + 254, 0, 99, 254, + 0, 101, 3, 1, 2, 25, 254, 27, 80, 254, 85, 254, 86, 254, 87, 249, 88, 250, + 90, 249, + 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 218, 254, 219, + 254, + 220, 254, 221, 254, 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 254, 0, 102, + 254, 0, + 108, 254, 0, 112, 254, 0, 114, 254, 0, 116, 254, 0, 122, 249, 34, 45, 247, + 46, 254, + 47, 247, 100, 254, 101, 254, 104, 254, 112, 254, 114, 254, 116, 254, 117, + 3, 119, + 2, 122, 2, 232, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, + 249, 254, + 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, 254, 0, 19, 254, 0, 33, 254, 0, 37, + 254, 0, 79, 254, + 0, 83, 254, 0, 93, 254, 0, 97, 254, 0, 99, 254, 0, 101, 3, 1, 2, 25, 254, + 27, 80, 254, + 85, 254, 86, 254, 87, 249, 88, 250, 90, 249, 211, 254, 212, 254, 213, 254, + 214, 254, + 215, 254, 217, 254, 218, 254, 219, 254, 220, 254, 221, 254, 222, 249, 0, + 78, 254, + 0, 82, 254, 0, 100, 254, 0, 102, 254, 0, 108, 254, 0, 112, 254, 0, 114, + 254, 0, 116, + 254, 0, 122, 249, 34, 45, 247, 46, 254, 47, 247, 100, 254, 101, 254, 104, + 254, 112, + 254, 114, 254, 116, 254, 117, 3, 119, 2, 122, 2, 232, 254, 243, 254, 244, + 254, 245, + 254, 246, 254, 247, 254, 249, 254, 254, 2, 0, 1, 2, 0, 9, 254, 0, 15, 254, + 0, 19, 254, + 0, 33, 254, 0, 37, 254, 0, 79, 254, 0, 83, 254, 0, 93, 254, 0, 97, 254, 0, + 99, 254, 0, + 101, 3, 1, 2, 25, 254, 2, 120, 254, 2, 120, 254, 2, 120, 254, 69, 45, 244, + 46, 237, + 47, 244, 59, 250, 60, 250, 66, 242, 80, 250, 98, 244, 102, 247, 112, 244, + 115, 244, + 118, 242, 120, 247, 122, 247, 193, 242, 194, 242, 195, 242, 196, 242, 197, + 242, + 198, 242, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, + 244, + 226, 244, 227, 244, 228, 244, 229, 244, 230, 244, 233, 247, 234, 247, 235, + 247, + 236, 247, 243, 244, 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, + 242, + 251, 242, 252, 242, 253, 242, 254, 247, 0, 1, 247, 0, 2, 242, 0, 3, 244, + 0, 4, 242, + 0, 5, 244, 0, 6, 242, 0, 7, 244, 0, 21, 247, 0, 25, 247, 0, 27, 247, 0, + 29, 247, 0, 78, + 250, 0, 79, 244, 0, 82, 250, 0, 83, 244, 0, 87, 244, 0, 89, 244, 0, 109, + 242, 0, 113, + 242, 0, 115, 242, 0, 117, 242, 69, 45, 244, 46, 237, 47, 244, 59, 250, 60, + 250, 66, + 242, 80, 250, 98, 244, 102, 247, 112, 244, 115, 244, 118, 242, 120, 247, + 122, 247, + 193, 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, 242, 211, 250, 212, + 250, + 213, 250, 214, 250, 215, 250, 217, 250, 225, 244, 226, 244, 227, 244, 228, + 244, + 229, 244, 230, 244, 233, 247, 234, 247, 235, 247, 236, 247, 243, 244, 244, + 244, + 245, 244, 246, 244, 247, 244, 249, 244, 250, 242, 251, 242, 252, 242, 253, + 242, + 254, 247, 0, 1, 247, 0, 2, 242, 0, 3, 244, 0, 4, 242, 0, 5, 244, 0, 6, + 242, 0, 7, 244, + 0, 21, 247, 0, 25, 247, 0, 27, 247, 0, 29, 247, 0, 78, 250, 0, 79, 244, 0, + 82, 250, 0, + 83, 244, 0, 87, 244, 0, 89, 244, 0, 109, 242, 0, 113, 242, 0, 115, 242, 0, + 117, 242, + 13, 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, + 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, + 6, 249, + 13, 45, 252, 47, 252, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 13, 45, 252, 47, 252, 66, 249, + 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, + 6, 249, + 61, 45, 240, 47, 240, 59, 249, 60, 249, 66, 239, 80, 245, 98, 242, 102, + 244, 112, + 240, 118, 240, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, + 211, + 245, 212, 245, 213, 245, 214, 245, 215, 245, 217, 245, 225, 242, 226, 242, + 227, + 242, 228, 242, 229, 242, 230, 242, 233, 244, 234, 244, 235, 244, 236, 244, + 243, + 240, 244, 240, 245, 240, 246, 240, 247, 240, 249, 240, 250, 240, 251, 240, + 252, + 240, 253, 240, 0, 2, 239, 0, 3, 242, 0, 4, 239, 0, 5, 242, 0, 6, 239, 0, + 7, 242, 0, 21, + 244, 0, 25, 244, 0, 27, 244, 0, 29, 244, 0, 78, 245, 0, 79, 240, 0, 82, + 245, 0, 83, 240, + 0, 109, 240, 0, 113, 240, 0, 115, 240, 0, 117, 240, 10, 102, 2, 233, 2, + 234, 2, 235, + 2, 236, 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 10, 102, 2, 233, 2, + 234, 2, 235, 2, 236, + 2, 0, 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 10, 102, 2, 233, 2, 234, 2, + 235, 2, 236, 2, 0, + 21, 2, 0, 25, 2, 0, 27, 2, 0, 29, 2, 2, 120, 254, 2, 1, 32, 24, 249, 19, + 33, 244, 101, + 244, 109, 254, 115, 250, 116, 247, 119, 254, 0, 19, 244, 0, 60, 254, 0, + 62, 254, 0, + 68, 254, 0, 87, 250, 0, 89, 250, 0, 91, 250, 0, 93, 247, 0, 97, 247, 0, + 99, 247, 1, 2, + 25, 247, 1, 32, 25, 249, 2, 33, 244 }; -static afm_cuint16 afm_Helvetica_BoldOblique_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Helvetica_BoldOblique_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Helvetica_BoldOblique_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Helvetica_BoldOblique_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -1382,408 +2624,796 @@ static afm_cunicode afm_Helvetica_BoldOblique_ligatures[] = { /* 3 */ /* FontName: Helvetica-Oblique */ /* FullName: Helvetica Oblique */ /* FamilyName: Helvetica */ -static afm_cuint8 afm_Helvetica_Oblique_widths[] = { /* 315 */ - 46,46,59,93,93,148,111,32,56,56,65,97,46,56,46,46,93,93,93,93,93, - 93,93,93,93,93,46,46,97,97,97,93,169,111,111,120,120,111,102,130, - 120,46,83,111,93,139,120,130,111,130,120,111,102,120,111,157,111, - 111,102,46,46,46,78,93,56,93,93,83,93,93,46,93,93,37,37,83,37,139, - 93,93,93,93,56,83,46,93,83,120,83,83,83,56,43,56,97,56,93,93,93, - 93,43,93,56,123,62,93,97,123,56,67,97,56,56,56,93,90,46,56,56,61, - 93,139,139,139,102,111,111,111,111,111,111,167,120,111,111,111,111, - 46,46,46,46,120,120,130,130,130,130,130,97,130,120,120,120,120,111, - 111,102,93,93,93,93,93,93,148,83,93,93,93,93,46,46,46,46,93,93,93, - 93,93,93,93,97,102,93,93,93,93,83,93,83,111,93,111,93,111,93,120, - 83,120,83,120,107,120,93,111,93,111,93,111,93,111,93,130,93,130, - 93,46,46,46,37,46,46,111,83,93,37,93,37,93,50,93,37,120,93,120,93, - 120,93,130,93,130,93,167,157,120,56,120,56,120,56,111,83,111,83, - 111,83,102,46,102,53,120,93,120,93,120,93,120,93,111,102,83,102, - 83,102,83,93,111,83,56,56,56,56,56,56,56,56,93,167,37,37,37,56,56, - 56,93,93,58,167,167,56,56,28,93,167,79,102,100,97,76,92,92,92,79, - 42,83,83 +static afm_cuint8 afm_Helvetica_Oblique_widths[] = { /* 315 */ + 46, 46, 59, 93, 93, 148, 111, 32, 56, 56, 65, 97, 46, 56, 46, 46, 93, 93, + 93, 93, 93, + 93, 93, 93, 93, 93, 46, 46, 97, 97, 97, 93, 169, 111, 111, 120, 120, 111, + 102, 130, + 120, 46, 83, 111, 93, 139, 120, 130, 111, 130, 120, 111, 102, 120, 111, + 157, 111, + 111, 102, 46, 46, 46, 78, 93, 56, 93, 93, 83, 93, 93, 46, 93, 93, 37, 37, + 83, 37, 139, + 93, 93, 93, 93, 56, 83, 46, 93, 83, 120, 83, 83, 83, 56, 43, 56, 97, 56, + 93, 93, 93, + 93, 43, 93, 56, 123, 62, 93, 97, 123, 56, 67, 97, 56, 56, 56, 93, 90, 46, + 56, 56, 61, + 93, 139, 139, 139, 102, 111, 111, 111, 111, 111, 111, 167, 120, 111, 111, + 111, 111, + 46, 46, 46, 46, 120, 120, 130, 130, 130, 130, 130, 97, 130, 120, 120, 120, + 120, 111, + 111, 102, 93, 93, 93, 93, 93, 93, 148, 83, 93, 93, 93, 93, 46, 46, 46, 46, + 93, 93, 93, + 93, 93, 93, 93, 97, 102, 93, 93, 93, 93, 83, 93, 83, 111, 93, 111, 93, + 111, 93, 120, + 83, 120, 83, 120, 107, 120, 93, 111, 93, 111, 93, 111, 93, 111, 93, 130, + 93, 130, + 93, 46, 46, 46, 37, 46, 46, 111, 83, 93, 37, 93, 37, 93, 50, 93, 37, 120, + 93, 120, 93, + 120, 93, 130, 93, 130, 93, 167, 157, 120, 56, 120, 56, 120, 56, 111, 83, + 111, 83, + 111, 83, 102, 46, 102, 53, 120, 93, 120, 93, 120, 93, 120, 93, 111, 102, + 83, 102, + 83, 102, 83, 93, 111, 83, 56, 56, 56, 56, 56, 56, 56, 56, 93, 167, 37, 37, + 37, 56, 56, + 56, 93, 93, 58, 167, 167, 56, 56, 28, 93, 167, 79, 102, 100, 97, 76, 92, + 92, 92, 79, + 42, 83, 83 }; static afm_sint16 afm_Helvetica_Oblique_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,29,0,38,0,0,0,0,0,0,0,0,0,0,0,49,52,0,0, - 0,0,0,55,170,197,202,0,241,0,0,0,345,418,510,0,0,545,594,687,710, - 772,777,938,966,1115,0,1259,0,0,0,0,0,0,0,1407,1419,1468,0,1476, - 1494,1575,1587,0,0,1595,0,1638,1668,1700,1718,0,1730,1847,0,0,1854, - 1924,1994,2017,2087,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,2130,2245,2360,2475,2590,2705,0,2820,0,0, - 0,0,0,0,0,0,0,0,2825,2874,2923,2972,3021,0,3070,3119,3147,3175,3203, - 3231,0,0,3379,3391,3403,3415,3427,3439,0,3451,3459,3477,3495,3513, - 0,0,0,0,0,3531,3563,3581,3599,3617,3635,0,3653,0,0,0,0,3882,0,3952, - 4022,4137,4149,4264,4276,4391,4403,4408,4416,4421,4429,0,4468,0, - 0,4507,0,4525,0,4543,0,4561,0,4579,0,4591,0,0,0,0,0,0,4603,4695, - 4738,0,4773,0,4808,0,4843,0,0,4878,0,4910,0,4942,4974,5023,5041, - 5090,0,0,5108,5170,5287,5349,5466,5528,5645,5650,5657,5662,5669, - 5674,5681,0,5842,0,6003,0,6031,0,6059,0,6087,0,6115,0,6263,0,6306, - 0,6349,0,6392,6397,0,0,0,0,0,0,0,0,0,0,6404,6409,0,0,6447,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 49, 52, 0, 0, + 0, 0, 0, 55, 170, 197, 202, 0, 241, 0, 0, 0, 345, 418, 510, 0, 0, 545, + 594, 687, 710, + 772, 777, 938, 966, 1115, 0, 1259, 0, 0, 0, 0, 0, 0, 0, 1407, 1419, 1468, + 0, 1476, + 1494, 1575, 1587, 0, 0, 1595, 0, 1638, 1668, 1700, 1718, 0, 1730, 1847, 0, + 0, 1854, + 1924, 1994, 2017, 2087, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2130, 2245, 2360, 2475, 2590, 2705, 0, + 2820, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2825, 2874, 2923, 2972, 3021, 0, 3070, 3119, 3147, + 3175, 3203, + 3231, 0, 0, 3379, 3391, 3403, 3415, 3427, 3439, 0, 3451, 3459, 3477, 3495, + 3513, + 0, 0, 0, 0, 0, 3531, 3563, 3581, 3599, 3617, 3635, 0, 3653, 0, 0, 0, 0, + 3882, 0, 3952, + 4022, 4137, 4149, 4264, 4276, 4391, 4403, 4408, 4416, 4421, 4429, 0, 4468, + 0, + 0, 4507, 0, 4525, 0, 4543, 0, 4561, 0, 4579, 0, 4591, 0, 0, 0, 0, 0, 0, + 4603, 4695, + 4738, 0, 4773, 0, 4808, 0, 4843, 0, 0, 4878, 0, 4910, 0, 4942, 4974, 5023, + 5041, + 5090, 0, 0, 5108, 5170, 5287, 5349, 5466, 5528, 5645, 5650, 5657, 5662, + 5669, + 5674, 5681, 0, 5842, 0, 6003, 0, 6031, 0, 6059, 0, 6087, 0, 6115, 0, 6263, + 0, 6306, + 0, 6349, 0, 6392, 6397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6404, 6409, 0, 0, + 6447, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static afm_cuint8 afm_Helvetica_Oblique_kerning_data[] = { /* 6450 */ - 42,11,85,249,87,249,88,250,90,242,222,242,0,100,249,0,102,249,0, - 122,242,1,32,24,247,1,32,28,252,3,1,32,25,240,1,32,29,240,4,33,247, - 1,32,25,240,1,32,29,240,2,33,249,2,33,249,49,68,252,72,252,80,252, - 82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250,120,250, - 122,250,200,252,211,252,212,252,213,252,214,252,215,252,217,252, - 218,249,219,249,220,249,221,249,222,240,250,252,251,252,252,252, - 253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252,0,78, - 252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112,249,0, - 113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240,12,45, - 254,47,254,86,255,218,255,219,255,220,255,221,255,0,108,255,0,112, - 255,0,114,255,0,116,255,3,45,252,47,252,18,45,245,47,245,66,250, - 87,245,88,250,90,242,193,250,194,250,195,250,196,250,197,250,198, - 250,222,242,0,2,250,0,4,250,0,6,250,0,122,242,45,45,232,47,232,66, - 244,98,249,102,252,112,252,115,249,193,244,194,244,195,244,196,244, - 197,244,198,244,225,249,226,249,227,249,228,249,229,249,230,249, - 233,252,234,252,235,252,236,252,243,252,244,252,245,252,246,252, - 247,252,249,252,0,2,244,0,3,249,0,4,244,0,5,249,0,6,244,0,7,249, - 0,21,252,0,25,252,0,27,252,0,29,252,0,79,252,0,83,252,0,87,249,0, - 89,249,0,91,249,32,45,252,47,252,66,254,98,254,118,254,193,254,194, - 254,195,254,196,254,197,254,198,254,225,254,226,254,227,254,228, - 254,229,254,230,254,250,254,251,254,252,254,253,254,0,2,254,0,3, - 254,0,4,254,0,5,254,0,6,254,0,7,254,0,109,254,0,113,254,0,115,254, - 0,117,254,40,80,249,102,250,112,250,118,252,122,249,211,249,212, - 249,213,249,214,249,215,249,217,249,233,250,234,250,235,250,236, - 250,243,250,244,250,245,250,246,250,247,250,249,250,250,252,251, - 252,252,252,253,252,254,249,0,1,249,0,21,250,0,25,250,0,27,250,0, - 29,250,0,78,249,0,79,250,0,82,249,0,83,250,0,109,252,0,113,252,0, - 115,252,0,117,252,14,85,239,87,239,88,245,90,234,122,252,222,234, - 254,252,0,1,252,0,100,239,0,102,239,0,122,234,1,32,25,230,1,32,29, - 234,22,45,250,47,250,66,254,85,250,87,249,88,252,89,247,90,245,193, - 254,194,254,195,254,196,254,197,254,198,254,222,245,0,2,254,0,4, - 254,0,6,254,0,100,250,0,102,250,0,122,245,41,45,227,47,227,66,237, - 98,250,102,249,112,249,193,237,194,237,195,237,196,237,197,237,198, - 237,225,250,226,250,227,250,228,250,229,250,230,250,233,249,234, - 249,235,249,236,249,243,249,244,249,245,249,246,249,247,249,249, - 249,0,2,237,0,3,250,0,4,237,0,5,250,0,6,237,0,7,250,0,21,249,0,25, - 249,0,27,249,0,29,249,0,79,249,0,83,249,10,86,255,218,255,219,255, - 220,255,221,255,0,108,255,0,112,255,0,114,255,0,116,255,27,80,254, - 85,252,86,250,87,249,88,252,90,249,211,254,212,254,213,254,214,254, - 215,254,217,254,218,250,219,250,220,250,221,250,222,249,0,78,254, - 0,82,254,0,100,252,0,102,252,0,108,250,0,112,250,0,114,250,0,116, - 250,0,122,249,3,45,254,47,254,70,45,237,46,234,47,237,59,254,60, - 254,66,237,80,250,98,237,102,237,112,237,115,237,118,237,120,237, - 122,237,193,237,194,237,195,237,196,237,197,237,198,237,211,250, - 212,250,213,250,214,250,215,250,217,250,225,237,226,237,227,237, - 228,247,229,237,230,237,233,247,234,237,235,237,236,237,243,237, - 244,237,245,237,246,247,247,237,249,237,250,237,251,237,252,237, - 253,237,254,237,0,1,247,0,2,237,0,3,247,0,4,237,0,5,247,0,6,237, - 0,7,237,0,21,247,0,25,237,0,27,237,0,29,237,0,78,250,0,79,247,0, - 82,250,0,83,237,0,87,237,0,89,237,0,91,237,0,109,247,0,113,237,0, - 115,237,0,117,237,13,45,250,47,250,66,250,193,250,194,250,195,250, - 196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,65,45,236,46,244, - 47,236,59,250,60,250,66,244,72,250,80,250,98,245,102,244,112,244, - 118,245,193,244,194,244,195,244,196,244,197,244,198,244,211,250, - 212,250,213,250,214,250,215,250,217,250,225,245,226,245,227,245, - 228,245,229,245,230,245,233,244,234,244,235,244,236,244,243,244, - 244,244,245,244,246,244,247,244,249,244,250,245,251,245,252,245, - 253,245,0,2,244,0,3,245,0,4,244,0,5,245,0,6,244,0,7,245,0,21,244, - 0,25,244,0,27,244,0,29,244,0,32,250,0,36,250,0,78,250,0,79,244,0, - 82,250,0,83,244,0,109,245,0,113,245,0,115,245,0,117,245,63,45,244, - 46,250,47,244,66,249,80,254,98,250,102,252,112,252,118,252,122,254, - 193,249,194,249,195,249,196,249,197,249,198,249,211,254,212,254, - 213,254,214,254,215,254,217,254,225,250,226,250,227,250,228,250, - 229,250,230,250,233,252,234,252,235,252,236,252,243,252,244,252, - 245,252,246,252,247,252,249,252,250,252,251,252,252,252,253,252, - 254,254,0,1,254,0,2,249,0,3,250,0,4,249,0,5,250,0,6,249,0,7,250, - 0,21,252,0,25,252,0,27,252,0,29,252,0,78,254,0,79,252,0,82,254,0, - 83,252,0,109,252,0,113,252,0,115,252,0,117,252,65,45,234,46,234, - 47,234,59,247,60,247,66,239,80,243,98,234,102,234,106,254,112,234, - 118,239,193,239,194,239,195,239,196,239,197,239,198,239,211,243, - 212,243,213,243,214,243,215,243,217,243,225,234,226,234,227,234, - 228,234,229,234,230,234,233,234,234,234,235,234,236,234,238,254, - 243,234,244,234,245,234,246,234,247,234,249,234,250,239,251,239, - 252,239,253,239,0,2,239,0,3,245,0,4,239,0,5,245,0,6,239,0,7,234, - 0,21,245,0,25,234,0,27,234,0,29,234,0,49,254,0,78,243,0,79,234,0, - 82,243,0,83,234,0,109,239,0,113,239,0,115,239,0,117,239,6,119,254, - 120,254,122,252,254,252,0,1,252,21,45,250,47,250,99,255,109,254, - 118,254,119,254,122,254,250,254,251,254,252,254,253,254,254,254, - 0,1,254,0,60,254,0,62,254,0,68,254,0,109,254,0,113,254,0,115,254, - 0,117,254,4,45,254,108,254,0,57,254,9,45,254,47,254,119,252,120, - 254,121,252,122,254,254,254,0,1,254,34,45,252,47,252,98,252,102, - 252,112,252,225,252,226,252,227,252,228,252,229,252,230,252,233, - 252,234,252,235,252,236,252,243,252,244,252,245,252,246,252,247, - 252,249,252,0,3,252,0,5,252,0,7,252,0,21,252,0,25,252,0,27,252,0, - 29,252,0,51,252,0,79,252,0,83,252,1,32,25,8,1,32,29,10,5,115,255, - 0,87,255,0,89,255,0,91,255,4,122,252,254,252,0,1,252,19,102,254, - 112,254,233,254,234,254,235,254,236,254,243,254,244,254,245,254, - 246,254,247,254,249,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79, - 254,0,83,254,13,118,255,122,254,250,255,251,255,252,255,253,255, - 254,254,0,1,254,0,109,255,0,113,255,0,115,255,0,117,255,14,118,255, - 119,254,122,254,250,255,251,255,252,255,253,255,254,254,0,1,254, - 0,109,255,0,113,255,0,115,255,0,117,255,9,45,250,47,250,119,254, - 120,254,121,252,122,252,254,252,0,1,252,6,45,251,47,251,122,252, - 254,252,0,1,252,50,45,249,47,249,59,5,60,5,98,255,106,3,108,3,109, - 3,110,4,111,4,113,5,117,7,118,3,119,5,122,5,225,255,226,255,227, - 255,228,255,229,255,230,255,237,3,238,3,239,3,240,3,242,4,250,3, - 251,3,252,3,253,3,254,5,0,1,5,0,3,255,0,5,255,0,7,255,0,45,3,0,49, - 3,0,57,3,0,60,3,0,62,3,0,68,3,0,70,4,0,72,4,0,74,4,0,101,7,0,109, - 3,0,113,3,0,115,3,0,117,3,4,45,254,47,254,120,252,31,45,244,47,244, - 98,253,102,253,112,253,225,253,226,253,227,253,228,253,229,253,230, - 253,233,253,234,253,235,253,236,253,243,253,244,253,245,253,246, - 253,247,253,249,253,0,3,253,0,5,253,0,7,253,0,21,253,0,25,253,0, - 27,253,0,29,253,0,79,253,0,83,253,31,45,247,47,247,98,254,102,255, - 112,255,225,254,226,254,227,254,228,254,229,254,230,254,233,255, - 234,255,235,255,236,255,243,255,244,255,245,255,246,255,247,255, - 249,255,0,3,254,0,5,254,0,7,254,0,21,255,0,25,255,0,27,255,0,29, - 255,0,79,255,0,83,255,10,102,252,233,252,234,252,235,252,236,252, - 0,21,252,0,25,252,0,27,252,0,29,252,31,45,240,47,240,98,254,102, - 254,112,254,225,254,226,254,227,254,228,254,229,254,230,254,233, - 254,234,254,235,254,236,254,243,254,244,254,245,254,246,254,247, - 254,249,254,0,3,254,0,5,254,0,7,254,0,21,254,0,25,254,0,27,254,0, - 29,254,0,79,254,0,83,254,19,102,254,112,254,233,254,234,254,235, - 254,236,254,243,254,244,254,245,254,246,254,247,254,249,254,0,21, - 254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,49,68,252,72,252, - 80,252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250, - 120,250,122,250,200,252,211,252,212,252,213,252,214,252,215,252, - 217,252,218,249,219,249,220,249,221,249,222,240,250,252,251,252, - 252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252, - 0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112, - 249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240, - 49,68,252,72,252,80,252,82,252,85,237,86,249,87,245,88,249,90,240, - 118,252,119,250,120,250,122,250,200,252,211,252,212,252,213,252, - 214,252,215,252,217,252,218,249,219,249,220,249,221,249,222,240, - 250,252,251,252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252, - 0,32,252,0,36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,240,49,68,252,72,252,80,252,82,252,85,237,86,249,87,245, - 88,249,90,240,118,252,119,250,120,250,122,250,200,252,211,252,212, - 252,213,252,214,252,215,252,217,252,218,249,219,249,220,249,221, - 249,222,240,250,252,251,252,252,252,253,252,254,250,0,1,250,0,8, - 252,0,14,252,0,32,252,0,36,252,0,78,252,0,82,252,0,100,237,0,102, - 237,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252, - 0,116,249,0,117,252,0,122,240,49,68,252,72,252,80,252,82,252,85, - 237,86,249,87,245,88,249,90,240,118,252,119,250,120,250,122,250, - 200,252,211,252,212,252,213,252,214,252,215,252,217,252,218,249, - 219,249,220,249,221,249,222,240,250,252,251,252,252,252,253,252, - 254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252,0,78,252,0,82, - 252,0,100,237,0,102,237,0,108,249,0,109,252,0,112,249,0,113,252, - 0,114,249,0,115,252,0,116,249,0,117,252,0,122,240,49,68,252,72,252, - 80,252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250, - 120,250,122,250,200,252,211,252,212,252,213,252,214,252,215,252, - 217,252,218,249,219,249,220,249,221,249,222,240,250,252,251,252, - 252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252, - 0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112, - 249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240, - 49,68,252,72,252,80,252,82,252,85,237,86,249,87,245,88,249,90,240, - 118,252,119,250,120,250,122,250,200,252,211,252,212,252,213,252, - 214,252,215,252,217,252,218,249,219,249,220,249,221,249,222,240, - 250,252,251,252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252, - 0,32,252,0,36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249, - 0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117, - 252,0,122,240,3,45,252,47,252,22,45,250,47,250,66,254,85,250,87, - 249,88,252,89,247,90,245,193,254,194,254,195,254,196,254,197,254, - 198,254,222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102,250,0,122, - 245,22,45,250,47,250,66,254,85,250,87,249,88,252,89,247,90,245,193, - 254,194,254,195,254,196,254,197,254,198,254,222,245,0,2,254,0,4, - 254,0,6,254,0,100,250,0,102,250,0,122,245,22,45,250,47,250,66,254, - 85,250,87,249,88,252,89,247,90,245,193,254,194,254,195,254,196,254, - 197,254,198,254,222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102, - 250,0,122,245,22,45,250,47,250,66,254,85,250,87,249,88,252,89,247, - 90,245,193,254,194,254,195,254,196,254,197,254,198,254,222,245,0, - 2,254,0,4,254,0,6,254,0,100,250,0,102,250,0,122,245,22,45,250,47, - 250,66,254,85,250,87,249,88,252,89,247,90,245,193,254,194,254,195, - 254,196,254,197,254,198,254,222,245,0,2,254,0,4,254,0,6,254,0,100, - 250,0,102,250,0,122,245,22,45,250,47,250,66,254,85,250,87,249,88, - 252,89,247,90,245,193,254,194,254,195,254,196,254,197,254,198,254, - 222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102,250,0,122,245,13, - 45,250,47,250,66,250,193,250,194,250,195,250,196,250,197,250,198, - 250,0,2,250,0,4,250,0,6,250,13,45,250,47,250,66,250,193,250,194, - 250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,13,45, - 250,47,250,66,250,193,250,194,250,195,250,196,250,197,250,198,250, - 0,2,250,0,4,250,0,6,250,13,45,250,47,250,66,250,193,250,194,250, - 195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,65,45,234, - 46,234,47,234,59,247,60,247,66,239,80,243,98,234,102,234,106,254, - 112,234,118,239,193,239,194,239,195,239,196,239,197,239,198,239, - 211,243,212,243,213,243,214,243,215,243,217,243,225,234,226,234, - 227,234,228,245,229,234,230,234,233,234,234,234,235,234,236,234, - 238,254,243,234,244,234,245,234,246,234,247,234,249,234,250,239, - 251,239,252,239,253,239,0,2,239,0,3,245,0,4,239,0,5,245,0,6,239, - 0,7,234,0,21,245,0,25,234,0,27,234,0,29,234,0,49,254,0,78,243,0, - 79,245,0,82,243,0,83,234,0,109,239,0,113,239,0,115,239,0,117,239, - 6,119,254,120,254,122,252,254,252,0,1,252,6,119,254,120,254,122, - 252,254,252,0,1,252,6,119,254,120,254,122,252,254,252,0,1,252,6, - 119,254,120,254,122,252,254,252,0,1,252,6,119,254,120,254,122,252, - 254,252,0,1,252,6,119,254,120,254,122,252,254,252,0,1,252,4,45,254, - 108,254,0,57,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,9,45,254,47,254,119,252,120,254,121,252,122,254, - 254,254,0,1,254,14,118,255,119,254,122,254,250,255,251,255,252,255, - 253,255,254,254,0,1,254,0,109,255,0,113,255,0,115,255,0,117,255, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 9,45,250,47,250,119,254,120,254,121,252,122,252,254,252,0,1,252, - 95,45,241,47,241,98,248,99,248,100,248,101,248,102,248,103,248,104, - 248,105,248,106,248,107,248,108,248,109,248,110,248,111,248,112, - 248,113,248,114,248,115,248,116,248,117,248,118,248,119,245,120, - 245,121,243,122,245,123,248,225,248,226,248,227,248,228,248,229, - 248,230,248,232,248,233,248,234,248,235,248,236,248,237,248,238, - 248,239,248,240,248,242,248,243,248,244,248,245,248,246,248,247, - 248,249,248,250,248,251,248,252,248,253,248,254,245,0,1,245,0,3, - 248,0,5,248,0,7,248,0,9,248,0,15,248,0,19,248,0,21,248,0,25,248, - 0,27,248,0,29,248,0,33,248,0,37,248,0,45,248,0,49,248,0,57,248,0, - 60,248,0,62,248,0,68,248,0,70,248,0,72,248,0,74,248,0,79,248,0,83, - 248,0,87,248,0,89,248,0,91,248,0,93,248,0,97,248,0,99,248,0,101, - 248,0,109,248,0,113,248,0,115,248,0,117,248,0,124,248,0,126,248, - 0,128,248,1,2,25,248,31,45,240,47,240,98,254,102,254,112,254,225, - 254,226,254,227,254,228,254,229,254,230,254,233,254,234,254,235, - 254,236,254,243,254,244,254,245,254,246,254,247,254,249,254,0,3, - 254,0,5,254,0,7,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254, - 0,83,254,31,45,240,47,240,98,254,102,254,112,254,225,254,226,254, - 227,254,228,254,229,254,230,254,233,254,234,254,235,254,236,254, - 243,254,244,254,245,254,246,254,247,254,249,254,0,3,254,0,5,254, - 0,7,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,49, - 68,252,72,252,80,252,82,252,85,237,86,249,87,245,88,249,90,240,118, - 252,119,250,120,250,122,250,200,252,211,252,212,252,213,252,214, - 252,215,252,217,252,218,249,219,249,220,249,221,249,222,240,250, - 252,251,252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32, - 252,0,36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109, - 252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252, - 0,122,240,6,119,254,120,254,122,252,254,252,0,1,252,49,68,252,72, - 252,80,252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119, - 250,120,250,122,250,200,252,211,252,212,252,213,252,214,252,215, - 252,217,252,218,249,219,249,220,249,221,249,222,240,250,252,251, - 252,252,252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0, - 36,252,0,78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252, - 0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122, - 240,6,119,254,120,254,122,252,254,252,0,1,252,49,68,252,72,252,80, - 252,82,252,85,237,86,249,87,245,88,249,90,240,118,252,119,250,120, - 250,122,250,200,252,211,252,212,252,213,252,214,252,215,252,217, - 252,218,249,219,249,220,249,221,249,222,240,250,252,251,252,252, - 252,253,252,254,250,0,1,250,0,8,252,0,14,252,0,32,252,0,36,252,0, - 78,252,0,82,252,0,100,237,0,102,237,0,108,249,0,109,252,0,112,249, - 0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,240,6,119, - 254,120,254,122,252,254,252,0,1,252,3,45,252,47,252,4,45,254,108, - 254,0,57,254,3,45,252,47,252,4,45,254,108,254,0,57,254,18,45,245, - 47,245,66,250,87,245,88,250,90,242,193,250,194,250,195,250,196,250, - 197,250,198,250,222,242,0,2,250,0,4,250,0,6,250,0,122,242,18,45, - 245,47,245,66,250,87,245,88,250,90,242,193,250,194,250,195,250,196, - 250,197,250,198,250,222,242,0,2,250,0,4,250,0,6,250,0,122,242,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,9, - 45,254,47,254,119,252,120,254,121,252,122,254,254,254,0,1,254,5, - 115,255,0,87,255,0,89,255,0,91,255,5,115,255,0,87,255,0,89,255,0, - 91,255,40,80,249,102,250,112,250,118,252,122,249,211,249,212,249, - 213,249,214,249,215,249,217,249,233,250,234,250,235,250,236,250, - 243,250,244,250,245,250,246,250,247,250,249,250,250,252,251,252, - 252,252,253,252,254,249,0,1,249,0,21,250,0,25,250,0,27,250,0,29, - 250,0,78,249,0,79,250,0,82,249,0,83,250,0,109,252,0,113,252,0,115, - 252,0,117,252,19,102,254,112,254,233,254,234,254,235,254,236,254, - 243,254,244,254,245,254,246,254,247,254,249,254,0,21,254,0,25,254, - 0,27,254,0,29,254,0,79,254,0,83,254,14,85,239,87,239,88,245,90,234, - 122,252,222,234,254,252,0,1,252,0,100,239,0,102,239,0,122,234,1, - 32,25,230,1,32,29,234,14,85,239,87,239,88,245,90,234,122,252,222, - 234,254,252,0,1,252,0,100,239,0,102,239,0,122,234,1,32,25,230,1, - 32,29,234,14,85,239,87,239,88,245,90,234,122,252,222,234,254,252, - 0,1,252,0,100,239,0,102,239,0,122,234,1,32,25,230,1,32,29,234,14, - 85,239,87,239,88,245,90,234,122,252,222,234,254,252,0,1,252,0,100, - 239,0,102,239,0,122,234,1,32,25,230,1,32,29,234,14,118,255,119,254, - 122,254,250,255,251,255,252,255,253,255,254,254,0,1,254,0,109,255, - 0,113,255,0,115,255,0,117,255,14,118,255,119,254,122,254,250,255, - 251,255,252,255,253,255,254,254,0,1,254,0,109,255,0,113,255,0,115, - 255,0,117,255,14,118,255,119,254,122,254,250,255,251,255,252,255, - 253,255,254,254,0,1,254,0,109,255,0,113,255,0,115,255,0,117,255, - 22,45,250,47,250,66,254,85,250,87,249,88,252,89,247,90,245,193,254, - 194,254,195,254,196,254,197,254,198,254,222,245,0,2,254,0,4,254, - 0,6,254,0,100,250,0,102,250,0,122,245,9,45,250,47,250,119,254,120, - 254,121,252,122,252,254,252,0,1,252,22,45,250,47,250,66,254,85,250, - 87,249,88,252,89,247,90,245,193,254,194,254,195,254,196,254,197, - 254,198,254,222,245,0,2,254,0,4,254,0,6,254,0,100,250,0,102,250, - 0,122,245,9,45,250,47,250,119,254,120,254,121,252,122,252,254,252, - 0,1,252,27,80,254,85,252,86,250,87,249,88,252,90,249,211,254,212, - 254,213,254,214,254,215,254,217,254,218,250,219,250,220,250,221, - 250,222,249,0,78,254,0,82,254,0,100,252,0,102,252,0,108,250,0,112, - 250,0,114,250,0,116,250,0,122,249,50,45,249,47,249,59,5,60,5,98, - 255,106,3,108,3,109,3,110,4,111,4,113,5,117,7,118,3,119,5,122,5, - 225,255,226,255,227,255,228,255,229,255,230,255,237,3,238,3,239, - 3,240,3,242,4,250,3,251,3,252,3,253,3,254,5,0,1,5,0,3,255,0,5,255, - 0,7,255,0,45,3,0,49,3,0,57,3,0,60,3,0,62,3,0,68,3,0,70,4,0,72,4, - 0,74,4,0,101,7,0,109,3,0,113,3,0,115,3,0,117,3,27,80,254,85,252, - 86,250,87,249,88,252,90,249,211,254,212,254,213,254,214,254,215, - 254,217,254,218,250,219,250,220,250,221,250,222,249,0,78,254,0,82, - 254,0,100,252,0,102,252,0,108,250,0,112,250,0,114,250,0,116,250, - 0,122,249,50,45,249,47,249,59,5,60,5,98,255,106,3,108,3,109,3,110, - 4,111,4,113,5,117,7,118,3,119,5,122,5,225,255,226,255,227,255,228, - 255,229,255,230,255,237,3,238,3,239,3,240,3,242,4,250,3,251,3,252, - 3,253,3,254,5,0,1,5,0,3,255,0,5,255,0,7,255,0,45,3,0,49,3,0,57,3, - 0,60,3,0,62,3,0,68,3,0,70,4,0,72,4,0,74,4,0,101,7,0,109,3,0,113, - 3,0,115,3,0,117,3,27,80,254,85,252,86,250,87,249,88,252,90,249,211, - 254,212,254,213,254,214,254,215,254,217,254,218,250,219,250,220, - 250,221,250,222,249,0,78,254,0,82,254,0,100,252,0,102,252,0,108, - 250,0,112,250,0,114,250,0,116,250,0,122,249,50,45,249,47,249,59, - 5,60,5,98,255,106,3,108,3,109,3,110,4,111,4,113,5,117,7,118,3,119, - 5,122,5,225,255,226,255,227,255,228,255,229,255,230,255,237,3,238, - 3,239,3,240,3,242,4,250,3,251,3,252,3,253,3,254,5,0,1,5,0,3,255, - 0,5,255,0,7,255,0,45,3,0,49,3,0,57,3,0,60,3,0,62,3,0,68,3,0,70,4, - 0,72,4,0,74,4,0,101,7,0,109,3,0,113,3,0,115,3,0,117,3,3,45,254,47, - 254,4,45,254,47,254,120,252,3,45,254,47,254,4,45,254,47,254,120, - 252,3,45,254,47,254,4,45,254,47,254,120,252,70,45,237,46,234,47, - 237,59,254,60,254,66,237,80,250,98,237,102,237,112,237,115,237,118, - 237,120,237,122,237,193,237,194,237,195,237,196,237,197,237,198, - 237,211,250,212,250,213,250,214,250,215,250,217,250,225,237,226, - 237,227,237,228,247,229,237,230,237,233,247,234,237,235,237,236, - 237,243,237,244,237,245,237,246,247,247,237,249,237,250,237,251, - 237,252,237,253,237,254,237,0,1,247,0,2,237,0,3,247,0,4,237,0,5, - 247,0,6,237,0,7,237,0,21,247,0,25,237,0,27,237,0,29,237,0,78,250, - 0,79,247,0,82,250,0,83,237,0,87,237,0,89,237,0,91,237,0,109,247, - 0,113,237,0,115,237,0,117,237,70,45,237,46,234,47,237,59,254,60, - 254,66,237,80,250,98,237,102,237,112,237,115,237,118,237,120,237, - 122,237,193,237,194,237,195,237,196,237,197,237,198,237,211,250, - 212,250,213,250,214,250,215,250,217,250,225,237,226,237,227,237, - 228,247,229,237,230,237,233,247,234,237,235,237,236,237,243,237, - 244,237,245,237,246,247,247,237,249,237,250,237,251,237,252,237, - 253,237,254,237,0,1,247,0,2,237,0,3,247,0,4,237,0,5,247,0,6,237, - 0,7,237,0,21,247,0,25,237,0,27,237,0,29,237,0,78,250,0,79,247,0, - 82,250,0,83,237,0,87,237,0,89,237,0,91,237,0,109,247,0,113,237,0, - 115,237,0,117,237,13,45,250,47,250,66,250,193,250,194,250,195,250, - 196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,13,45,250,47,250, - 66,250,193,250,194,250,195,250,196,250,197,250,198,250,0,2,250,0, - 4,250,0,6,250,13,45,250,47,250,66,250,193,250,194,250,195,250,196, - 250,197,250,198,250,0,2,250,0,4,250,0,6,250,13,45,250,47,250,66, - 250,193,250,194,250,195,250,196,250,197,250,198,250,0,2,250,0,4, - 250,0,6,250,65,45,234,46,234,47,234,59,247,60,247,66,239,80,243, - 98,234,102,234,106,254,112,234,118,239,193,239,194,239,195,239,196, - 239,197,239,198,239,211,243,212,243,213,243,214,243,215,243,217, - 243,225,234,226,234,227,234,228,245,229,234,230,234,233,234,234, - 234,235,234,236,234,238,254,243,234,244,234,245,234,246,234,247, - 234,249,234,250,239,251,239,252,239,253,239,0,2,239,0,3,245,0,4, - 239,0,5,245,0,6,239,0,7,234,0,21,245,0,25,234,0,27,234,0,29,234, - 0,49,254,0,78,243,0,79,234,0,82,243,0,83,234,0,109,239,0,113,239, - 0,115,239,0,117,239,19,102,254,112,254,233,254,234,254,235,254,236, - 254,243,254,244,254,245,254,246,254,247,254,249,254,0,21,254,0,25, - 254,0,27,254,0,29,254,0,79,254,0,83,254,19,102,254,112,254,233,254, - 234,254,235,254,236,254,243,254,244,254,245,254,246,254,247,254, - 249,254,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,19, - 102,254,112,254,233,254,234,254,235,254,236,254,243,254,244,254, - 245,254,246,254,247,254,249,254,0,21,254,0,25,254,0,27,254,0,29, - 254,0,79,254,0,83,254,3,45,254,47,254,4,45,254,47,254,120,252,2, - 1,32,24,247,14,33,245,101,249,115,249,116,249,0,19,249,0,87,249, - 0,89,249,0,91,249,0,93,249,0,97,249,0,99,249,1,2,25,249,1,32,25, - 247,2,33,250 +static afm_cuint8 afm_Helvetica_Oblique_kerning_data[] = { /* 6450 */ + 42, 11, 85, 249, 87, 249, 88, 250, 90, 242, 222, 242, 0, 100, 249, 0, 102, + 249, 0, + 122, 242, 1, 32, 24, 247, 1, 32, 28, 252, 3, 1, 32, 25, 240, 1, 32, 29, + 240, 4, 33, 247, + 1, 32, 25, 240, 1, 32, 29, 240, 2, 33, 249, 2, 33, 249, 49, 68, 252, 72, + 252, 80, 252, + 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, 119, 250, + 120, 250, + 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, + 252, + 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, 252, 252, + 252, + 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, 252, 0, 36, + 252, 0, 78, + 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, 252, 0, + 112, 249, 0, + 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 240, + 12, 45, + 254, 47, 254, 86, 255, 218, 255, 219, 255, 220, 255, 221, 255, 0, 108, + 255, 0, 112, + 255, 0, 114, 255, 0, 116, 255, 3, 45, 252, 47, 252, 18, 45, 245, 47, 245, + 66, 250, + 87, 245, 88, 250, 90, 242, 193, 250, 194, 250, 195, 250, 196, 250, 197, + 250, 198, + 250, 222, 242, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 242, 45, 45, 232, + 47, 232, 66, + 244, 98, 249, 102, 252, 112, 252, 115, 249, 193, 244, 194, 244, 195, 244, + 196, 244, + 197, 244, 198, 244, 225, 249, 226, 249, 227, 249, 228, 249, 229, 249, 230, + 249, + 233, 252, 234, 252, 235, 252, 236, 252, 243, 252, 244, 252, 245, 252, 246, + 252, + 247, 252, 249, 252, 0, 2, 244, 0, 3, 249, 0, 4, 244, 0, 5, 249, 0, 6, 244, + 0, 7, 249, + 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 0, 79, 252, 0, 83, 252, 0, + 87, 249, 0, + 89, 249, 0, 91, 249, 32, 45, 252, 47, 252, 66, 254, 98, 254, 118, 254, + 193, 254, 194, + 254, 195, 254, 196, 254, 197, 254, 198, 254, 225, 254, 226, 254, 227, 254, + 228, + 254, 229, 254, 230, 254, 250, 254, 251, 254, 252, 254, 253, 254, 0, 2, + 254, 0, 3, + 254, 0, 4, 254, 0, 5, 254, 0, 6, 254, 0, 7, 254, 0, 109, 254, 0, 113, 254, + 0, 115, 254, + 0, 117, 254, 40, 80, 249, 102, 250, 112, 250, 118, 252, 122, 249, 211, + 249, 212, + 249, 213, 249, 214, 249, 215, 249, 217, 249, 233, 250, 234, 250, 235, 250, + 236, + 250, 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, 249, 250, 250, 252, + 251, + 252, 252, 252, 253, 252, 254, 249, 0, 1, 249, 0, 21, 250, 0, 25, 250, 0, + 27, 250, 0, + 29, 250, 0, 78, 249, 0, 79, 250, 0, 82, 249, 0, 83, 250, 0, 109, 252, 0, + 113, 252, 0, + 115, 252, 0, 117, 252, 14, 85, 239, 87, 239, 88, 245, 90, 234, 122, 252, + 222, 234, + 254, 252, 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, 234, 1, 32, 25, + 230, 1, 32, 29, + 234, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, + 90, 245, 193, + 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, + 254, 0, 4, + 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 41, 45, 227, 47, + 227, 66, 237, + 98, 250, 102, 249, 112, 249, 193, 237, 194, 237, 195, 237, 196, 237, 197, + 237, 198, + 237, 225, 250, 226, 250, 227, 250, 228, 250, 229, 250, 230, 250, 233, 249, + 234, + 249, 235, 249, 236, 249, 243, 249, 244, 249, 245, 249, 246, 249, 247, 249, + 249, + 249, 0, 2, 237, 0, 3, 250, 0, 4, 237, 0, 5, 250, 0, 6, 237, 0, 7, 250, 0, + 21, 249, 0, 25, + 249, 0, 27, 249, 0, 29, 249, 0, 79, 249, 0, 83, 249, 10, 86, 255, 218, + 255, 219, 255, + 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, + 27, 80, 254, + 85, 252, 86, 250, 87, 249, 88, 252, 90, 249, 211, 254, 212, 254, 213, 254, + 214, 254, + 215, 254, 217, 254, 218, 250, 219, 250, 220, 250, 221, 250, 222, 249, 0, + 78, 254, + 0, 82, 254, 0, 100, 252, 0, 102, 252, 0, 108, 250, 0, 112, 250, 0, 114, + 250, 0, 116, + 250, 0, 122, 249, 3, 45, 254, 47, 254, 70, 45, 237, 46, 234, 47, 237, 59, + 254, 60, + 254, 66, 237, 80, 250, 98, 237, 102, 237, 112, 237, 115, 237, 118, 237, + 120, 237, + 122, 237, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 237, 226, 237, 227, + 237, + 228, 247, 229, 237, 230, 237, 233, 247, 234, 237, 235, 237, 236, 237, 243, + 237, + 244, 237, 245, 237, 246, 247, 247, 237, 249, 237, 250, 237, 251, 237, 252, + 237, + 253, 237, 254, 237, 0, 1, 247, 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 247, + 0, 6, 237, + 0, 7, 237, 0, 21, 247, 0, 25, 237, 0, 27, 237, 0, 29, 237, 0, 78, 250, 0, + 79, 247, 0, + 82, 250, 0, 83, 237, 0, 87, 237, 0, 89, 237, 0, 91, 237, 0, 109, 247, 0, + 113, 237, 0, + 115, 237, 0, 117, 237, 13, 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, + 195, 250, + 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 65, 45, + 236, 46, 244, + 47, 236, 59, 250, 60, 250, 66, 244, 72, 250, 80, 250, 98, 245, 102, 244, + 112, 244, + 118, 245, 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 245, 226, 245, 227, + 245, + 228, 245, 229, 245, 230, 245, 233, 244, 234, 244, 235, 244, 236, 244, 243, + 244, + 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, 245, 251, 245, 252, + 245, + 253, 245, 0, 2, 244, 0, 3, 245, 0, 4, 244, 0, 5, 245, 0, 6, 244, 0, 7, + 245, 0, 21, 244, + 0, 25, 244, 0, 27, 244, 0, 29, 244, 0, 32, 250, 0, 36, 250, 0, 78, 250, 0, + 79, 244, 0, + 82, 250, 0, 83, 244, 0, 109, 245, 0, 113, 245, 0, 115, 245, 0, 117, 245, + 63, 45, 244, + 46, 250, 47, 244, 66, 249, 80, 254, 98, 250, 102, 252, 112, 252, 118, 252, + 122, 254, + 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 211, 254, 212, + 254, + 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, 226, 250, 227, 250, 228, + 250, + 229, 250, 230, 250, 233, 252, 234, 252, 235, 252, 236, 252, 243, 252, 244, + 252, + 245, 252, 246, 252, 247, 252, 249, 252, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 254, 0, 1, 254, 0, 2, 249, 0, 3, 250, 0, 4, 249, 0, 5, 250, 0, 6, + 249, 0, 7, 250, + 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 0, 78, 254, 0, 79, 252, 0, + 82, 254, 0, + 83, 252, 0, 109, 252, 0, 113, 252, 0, 115, 252, 0, 117, 252, 65, 45, 234, + 46, 234, + 47, 234, 59, 247, 60, 247, 66, 239, 80, 243, 98, 234, 102, 234, 106, 254, + 112, 234, + 118, 239, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, + 243, + 212, 243, 213, 243, 214, 243, 215, 243, 217, 243, 225, 234, 226, 234, 227, + 234, + 228, 234, 229, 234, 230, 234, 233, 234, 234, 234, 235, 234, 236, 234, 238, + 254, + 243, 234, 244, 234, 245, 234, 246, 234, 247, 234, 249, 234, 250, 239, 251, + 239, + 252, 239, 253, 239, 0, 2, 239, 0, 3, 245, 0, 4, 239, 0, 5, 245, 0, 6, 239, + 0, 7, 234, + 0, 21, 245, 0, 25, 234, 0, 27, 234, 0, 29, 234, 0, 49, 254, 0, 78, 243, 0, + 79, 234, 0, + 82, 243, 0, 83, 234, 0, 109, 239, 0, 113, 239, 0, 115, 239, 0, 117, 239, + 6, 119, 254, + 120, 254, 122, 252, 254, 252, 0, 1, 252, 21, 45, 250, 47, 250, 99, 255, + 109, 254, + 118, 254, 119, 254, 122, 254, 250, 254, 251, 254, 252, 254, 253, 254, 254, + 254, + 0, 1, 254, 0, 60, 254, 0, 62, 254, 0, 68, 254, 0, 109, 254, 0, 113, 254, + 0, 115, 254, + 0, 117, 254, 4, 45, 254, 108, 254, 0, 57, 254, 9, 45, 254, 47, 254, 119, + 252, 120, + 254, 121, 252, 122, 254, 254, 254, 0, 1, 254, 34, 45, 252, 47, 252, 98, + 252, 102, + 252, 112, 252, 225, 252, 226, 252, 227, 252, 228, 252, 229, 252, 230, 252, + 233, + 252, 234, 252, 235, 252, 236, 252, 243, 252, 244, 252, 245, 252, 246, 252, + 247, + 252, 249, 252, 0, 3, 252, 0, 5, 252, 0, 7, 252, 0, 21, 252, 0, 25, 252, 0, + 27, 252, 0, + 29, 252, 0, 51, 252, 0, 79, 252, 0, 83, 252, 1, 32, 25, 8, 1, 32, 29, 10, + 5, 115, 255, + 0, 87, 255, 0, 89, 255, 0, 91, 255, 4, 122, 252, 254, 252, 0, 1, 252, 19, + 102, 254, + 112, 254, 233, 254, 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, + 254, + 246, 254, 247, 254, 249, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, + 254, 0, 79, + 254, 0, 83, 254, 13, 118, 255, 122, 254, 250, 255, 251, 255, 252, 255, + 253, 255, + 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, + 14, 118, 255, + 119, 254, 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, + 1, 254, + 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, 117, 255, 9, 45, 250, 47, 250, + 119, 254, + 120, 254, 121, 252, 122, 252, 254, 252, 0, 1, 252, 6, 45, 251, 47, 251, + 122, 252, + 254, 252, 0, 1, 252, 50, 45, 249, 47, 249, 59, 5, 60, 5, 98, 255, 106, 3, + 108, 3, 109, + 3, 110, 4, 111, 4, 113, 5, 117, 7, 118, 3, 119, 5, 122, 5, 225, 255, 226, + 255, 227, + 255, 228, 255, 229, 255, 230, 255, 237, 3, 238, 3, 239, 3, 240, 3, 242, 4, + 250, 3, + 251, 3, 252, 3, 253, 3, 254, 5, 0, 1, 5, 0, 3, 255, 0, 5, 255, 0, 7, 255, + 0, 45, 3, 0, 49, + 3, 0, 57, 3, 0, 60, 3, 0, 62, 3, 0, 68, 3, 0, 70, 4, 0, 72, 4, 0, 74, 4, + 0, 101, 7, 0, 109, + 3, 0, 113, 3, 0, 115, 3, 0, 117, 3, 4, 45, 254, 47, 254, 120, 252, 31, 45, + 244, 47, 244, + 98, 253, 102, 253, 112, 253, 225, 253, 226, 253, 227, 253, 228, 253, 229, + 253, 230, + 253, 233, 253, 234, 253, 235, 253, 236, 253, 243, 253, 244, 253, 245, 253, + 246, + 253, 247, 253, 249, 253, 0, 3, 253, 0, 5, 253, 0, 7, 253, 0, 21, 253, 0, + 25, 253, 0, + 27, 253, 0, 29, 253, 0, 79, 253, 0, 83, 253, 31, 45, 247, 47, 247, 98, + 254, 102, 255, + 112, 255, 225, 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, 233, + 255, + 234, 255, 235, 255, 236, 255, 243, 255, 244, 255, 245, 255, 246, 255, 247, + 255, + 249, 255, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 21, 255, 0, 25, 255, 0, 27, + 255, 0, 29, + 255, 0, 79, 255, 0, 83, 255, 10, 102, 252, 233, 252, 234, 252, 235, 252, + 236, 252, + 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 31, 45, 240, 47, 240, 98, + 254, 102, + 254, 112, 254, 225, 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, + 233, + 254, 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, + 247, + 254, 249, 254, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 21, 254, 0, 25, 254, 0, + 27, 254, 0, + 29, 254, 0, 79, 254, 0, 83, 254, 19, 102, 254, 112, 254, 233, 254, 234, + 254, 235, + 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, + 0, 21, + 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 49, 68, + 252, 72, 252, + 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, + 119, 250, + 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, + 252, + 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, + 252, 0, 36, 252, + 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, + 252, 0, 112, + 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, + 122, 240, + 49, 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, + 249, 90, 240, + 118, 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, + 252, + 214, 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 240, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, + 14, 252, + 0, 32, 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 240, 49, 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, + 249, 87, 245, + 88, 249, 90, 240, 118, 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, + 252, 212, + 252, 213, 252, 214, 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 240, 250, 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, + 250, 0, 8, + 252, 0, 14, 252, 0, 32, 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, + 237, 0, 102, + 237, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, + 115, 252, + 0, 116, 249, 0, 117, 252, 0, 122, 240, 49, 68, 252, 72, 252, 80, 252, 82, + 252, 85, + 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, 119, 250, 120, 250, + 122, 250, + 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 218, + 249, + 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, 252, 0, 36, 252, 0, 78, + 252, 0, 82, + 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, + 113, 252, + 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 240, 49, 68, + 252, 72, 252, + 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, + 119, 250, + 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, + 252, + 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, + 252, 0, 36, 252, + 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, + 252, 0, 112, + 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, + 122, 240, + 49, 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, + 249, 90, 240, + 118, 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, + 252, + 214, 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, + 240, + 250, 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, + 14, 252, + 0, 32, 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, + 0, 108, 249, + 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, + 249, 0, 117, + 252, 0, 122, 240, 3, 45, 252, 47, 252, 22, 45, 250, 47, 250, 66, 254, 85, + 250, 87, + 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, 196, 254, + 197, 254, + 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, 102, + 250, 0, 122, + 245, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, + 90, 245, 193, + 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, + 254, 0, 4, + 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, + 250, 66, 254, + 85, 250, 87, 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, + 196, 254, + 197, 254, 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, + 250, 0, 102, + 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, + 252, 89, 247, + 90, 245, 193, 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, + 245, 0, + 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 22, + 45, 250, 47, + 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, + 254, 195, + 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, + 254, 0, 100, + 250, 0, 102, 250, 0, 122, 245, 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, + 249, 88, + 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, 196, 254, 197, 254, + 198, 254, + 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, + 122, 245, 13, + 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, + 250, 198, + 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 250, 47, 250, 66, 250, 193, + 250, 194, + 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, + 250, 13, 45, + 250, 47, 250, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, + 198, 250, + 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 250, 47, 250, 66, 250, 193, 250, + 194, 250, + 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, + 65, 45, 234, + 46, 234, 47, 234, 59, 247, 60, 247, 66, 239, 80, 243, 98, 234, 102, 234, + 106, 254, + 112, 234, 118, 239, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, + 239, + 211, 243, 212, 243, 213, 243, 214, 243, 215, 243, 217, 243, 225, 234, 226, + 234, + 227, 234, 228, 245, 229, 234, 230, 234, 233, 234, 234, 234, 235, 234, 236, + 234, + 238, 254, 243, 234, 244, 234, 245, 234, 246, 234, 247, 234, 249, 234, 250, + 239, + 251, 239, 252, 239, 253, 239, 0, 2, 239, 0, 3, 245, 0, 4, 239, 0, 5, 245, + 0, 6, 239, + 0, 7, 234, 0, 21, 245, 0, 25, 234, 0, 27, 234, 0, 29, 234, 0, 49, 254, 0, + 78, 243, 0, + 79, 245, 0, 82, 243, 0, 83, 234, 0, 109, 239, 0, 113, 239, 0, 115, 239, 0, + 117, 239, + 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 6, 119, 254, 120, + 254, 122, + 252, 254, 252, 0, 1, 252, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, + 252, 6, + 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 6, 119, 254, 120, 254, + 122, 252, + 254, 252, 0, 1, 252, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, + 4, 45, 254, + 108, 254, 0, 57, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 9, 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, + 122, 254, + 254, 254, 0, 1, 254, 14, 118, 255, 119, 254, 122, 254, 250, 255, 251, 255, + 252, 255, + 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, + 117, 255, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, 254, 252, 0, + 1, 252, + 95, 45, 241, 47, 241, 98, 248, 99, 248, 100, 248, 101, 248, 102, 248, 103, + 248, 104, + 248, 105, 248, 106, 248, 107, 248, 108, 248, 109, 248, 110, 248, 111, 248, + 112, + 248, 113, 248, 114, 248, 115, 248, 116, 248, 117, 248, 118, 248, 119, 245, + 120, + 245, 121, 243, 122, 245, 123, 248, 225, 248, 226, 248, 227, 248, 228, 248, + 229, + 248, 230, 248, 232, 248, 233, 248, 234, 248, 235, 248, 236, 248, 237, 248, + 238, + 248, 239, 248, 240, 248, 242, 248, 243, 248, 244, 248, 245, 248, 246, 248, + 247, + 248, 249, 248, 250, 248, 251, 248, 252, 248, 253, 248, 254, 245, 0, 1, + 245, 0, 3, + 248, 0, 5, 248, 0, 7, 248, 0, 9, 248, 0, 15, 248, 0, 19, 248, 0, 21, 248, + 0, 25, 248, + 0, 27, 248, 0, 29, 248, 0, 33, 248, 0, 37, 248, 0, 45, 248, 0, 49, 248, 0, + 57, 248, 0, + 60, 248, 0, 62, 248, 0, 68, 248, 0, 70, 248, 0, 72, 248, 0, 74, 248, 0, + 79, 248, 0, 83, + 248, 0, 87, 248, 0, 89, 248, 0, 91, 248, 0, 93, 248, 0, 97, 248, 0, 99, + 248, 0, 101, + 248, 0, 109, 248, 0, 113, 248, 0, 115, 248, 0, 117, 248, 0, 124, 248, 0, + 126, 248, + 0, 128, 248, 1, 2, 25, 248, 31, 45, 240, 47, 240, 98, 254, 102, 254, 112, + 254, 225, + 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, 233, 254, 234, 254, + 235, + 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, + 0, 3, + 254, 0, 5, 254, 0, 7, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, + 0, 79, 254, + 0, 83, 254, 31, 45, 240, 47, 240, 98, 254, 102, 254, 112, 254, 225, 254, + 226, 254, + 227, 254, 228, 254, 229, 254, 230, 254, 233, 254, 234, 254, 235, 254, 236, + 254, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 3, 254, 0, + 5, 254, + 0, 7, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, + 83, 254, 49, + 68, 252, 72, 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, + 90, 240, 118, + 252, 119, 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, + 214, + 252, 215, 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, + 250, + 252, 251, 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, + 252, 0, 32, + 252, 0, 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, + 249, 0, 109, + 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, + 117, 252, + 0, 122, 240, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 49, 68, + 252, 72, + 252, 80, 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, + 252, 119, + 250, 120, 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, + 215, + 252, 217, 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, + 251, + 252, 252, 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, + 32, 252, 0, + 36, 252, 0, 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, + 109, 252, + 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, + 252, 0, 122, + 240, 6, 119, 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 49, 68, 252, + 72, 252, 80, + 252, 82, 252, 85, 237, 86, 249, 87, 245, 88, 249, 90, 240, 118, 252, 119, + 250, 120, + 250, 122, 250, 200, 252, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, + 217, + 252, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 250, 0, 1, 250, 0, 8, 252, 0, 14, 252, 0, 32, 252, 0, + 36, 252, 0, + 78, 252, 0, 82, 252, 0, 100, 237, 0, 102, 237, 0, 108, 249, 0, 109, 252, + 0, 112, 249, + 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, + 240, 6, 119, + 254, 120, 254, 122, 252, 254, 252, 0, 1, 252, 3, 45, 252, 47, 252, 4, 45, + 254, 108, + 254, 0, 57, 254, 3, 45, 252, 47, 252, 4, 45, 254, 108, 254, 0, 57, 254, + 18, 45, 245, + 47, 245, 66, 250, 87, 245, 88, 250, 90, 242, 193, 250, 194, 250, 195, 250, + 196, 250, + 197, 250, 198, 250, 222, 242, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, + 242, 18, 45, + 245, 47, 245, 66, 250, 87, 245, 88, 250, 90, 242, 193, 250, 194, 250, 195, + 250, 196, + 250, 197, 250, 198, 250, 222, 242, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, + 122, 242, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 9, + 45, 254, 47, 254, 119, 252, 120, 254, 121, 252, 122, 254, 254, 254, 0, 1, + 254, 5, + 115, 255, 0, 87, 255, 0, 89, 255, 0, 91, 255, 5, 115, 255, 0, 87, 255, 0, + 89, 255, 0, + 91, 255, 40, 80, 249, 102, 250, 112, 250, 118, 252, 122, 249, 211, 249, + 212, 249, + 213, 249, 214, 249, 215, 249, 217, 249, 233, 250, 234, 250, 235, 250, 236, + 250, + 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, 249, 250, 250, 252, 251, + 252, + 252, 252, 253, 252, 254, 249, 0, 1, 249, 0, 21, 250, 0, 25, 250, 0, 27, + 250, 0, 29, + 250, 0, 78, 249, 0, 79, 250, 0, 82, 249, 0, 83, 250, 0, 109, 252, 0, 113, + 252, 0, 115, + 252, 0, 117, 252, 19, 102, 254, 112, 254, 233, 254, 234, 254, 235, 254, + 236, 254, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, 254, 0, + 25, 254, + 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 14, 85, 239, 87, 239, 88, + 245, 90, 234, + 122, 252, 222, 234, 254, 252, 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, + 234, 1, + 32, 25, 230, 1, 32, 29, 234, 14, 85, 239, 87, 239, 88, 245, 90, 234, 122, + 252, 222, + 234, 254, 252, 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, 234, 1, 32, + 25, 230, 1, + 32, 29, 234, 14, 85, 239, 87, 239, 88, 245, 90, 234, 122, 252, 222, 234, + 254, 252, + 0, 1, 252, 0, 100, 239, 0, 102, 239, 0, 122, 234, 1, 32, 25, 230, 1, 32, + 29, 234, 14, + 85, 239, 87, 239, 88, 245, 90, 234, 122, 252, 222, 234, 254, 252, 0, 1, + 252, 0, 100, + 239, 0, 102, 239, 0, 122, 234, 1, 32, 25, 230, 1, 32, 29, 234, 14, 118, + 255, 119, 254, + 122, 254, 250, 255, 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, + 109, 255, + 0, 113, 255, 0, 115, 255, 0, 117, 255, 14, 118, 255, 119, 254, 122, 254, + 250, 255, + 251, 255, 252, 255, 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, + 255, 0, 115, + 255, 0, 117, 255, 14, 118, 255, 119, 254, 122, 254, 250, 255, 251, 255, + 252, 255, + 253, 255, 254, 254, 0, 1, 254, 0, 109, 255, 0, 113, 255, 0, 115, 255, 0, + 117, 255, + 22, 45, 250, 47, 250, 66, 254, 85, 250, 87, 249, 88, 252, 89, 247, 90, + 245, 193, 254, + 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 222, 245, 0, 2, 254, 0, + 4, 254, + 0, 6, 254, 0, 100, 250, 0, 102, 250, 0, 122, 245, 9, 45, 250, 47, 250, + 119, 254, 120, + 254, 121, 252, 122, 252, 254, 252, 0, 1, 252, 22, 45, 250, 47, 250, 66, + 254, 85, 250, + 87, 249, 88, 252, 89, 247, 90, 245, 193, 254, 194, 254, 195, 254, 196, + 254, 197, + 254, 198, 254, 222, 245, 0, 2, 254, 0, 4, 254, 0, 6, 254, 0, 100, 250, 0, + 102, 250, + 0, 122, 245, 9, 45, 250, 47, 250, 119, 254, 120, 254, 121, 252, 122, 252, + 254, 252, + 0, 1, 252, 27, 80, 254, 85, 252, 86, 250, 87, 249, 88, 252, 90, 249, 211, + 254, 212, + 254, 213, 254, 214, 254, 215, 254, 217, 254, 218, 250, 219, 250, 220, 250, + 221, + 250, 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 252, 0, 102, 252, 0, 108, + 250, 0, 112, + 250, 0, 114, 250, 0, 116, 250, 0, 122, 249, 50, 45, 249, 47, 249, 59, 5, + 60, 5, 98, + 255, 106, 3, 108, 3, 109, 3, 110, 4, 111, 4, 113, 5, 117, 7, 118, 3, 119, + 5, 122, 5, + 225, 255, 226, 255, 227, 255, 228, 255, 229, 255, 230, 255, 237, 3, 238, + 3, 239, + 3, 240, 3, 242, 4, 250, 3, 251, 3, 252, 3, 253, 3, 254, 5, 0, 1, 5, 0, 3, + 255, 0, 5, 255, + 0, 7, 255, 0, 45, 3, 0, 49, 3, 0, 57, 3, 0, 60, 3, 0, 62, 3, 0, 68, 3, 0, + 70, 4, 0, 72, 4, + 0, 74, 4, 0, 101, 7, 0, 109, 3, 0, 113, 3, 0, 115, 3, 0, 117, 3, 27, 80, + 254, 85, 252, + 86, 250, 87, 249, 88, 252, 90, 249, 211, 254, 212, 254, 213, 254, 214, + 254, 215, + 254, 217, 254, 218, 250, 219, 250, 220, 250, 221, 250, 222, 249, 0, 78, + 254, 0, 82, + 254, 0, 100, 252, 0, 102, 252, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, + 116, 250, + 0, 122, 249, 50, 45, 249, 47, 249, 59, 5, 60, 5, 98, 255, 106, 3, 108, 3, + 109, 3, 110, + 4, 111, 4, 113, 5, 117, 7, 118, 3, 119, 5, 122, 5, 225, 255, 226, 255, + 227, 255, 228, + 255, 229, 255, 230, 255, 237, 3, 238, 3, 239, 3, 240, 3, 242, 4, 250, 3, + 251, 3, 252, + 3, 253, 3, 254, 5, 0, 1, 5, 0, 3, 255, 0, 5, 255, 0, 7, 255, 0, 45, 3, 0, + 49, 3, 0, 57, 3, + 0, 60, 3, 0, 62, 3, 0, 68, 3, 0, 70, 4, 0, 72, 4, 0, 74, 4, 0, 101, 7, 0, + 109, 3, 0, 113, + 3, 0, 115, 3, 0, 117, 3, 27, 80, 254, 85, 252, 86, 250, 87, 249, 88, 252, + 90, 249, 211, + 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 218, 250, 219, 250, + 220, + 250, 221, 250, 222, 249, 0, 78, 254, 0, 82, 254, 0, 100, 252, 0, 102, 252, + 0, 108, + 250, 0, 112, 250, 0, 114, 250, 0, 116, 250, 0, 122, 249, 50, 45, 249, 47, + 249, 59, + 5, 60, 5, 98, 255, 106, 3, 108, 3, 109, 3, 110, 4, 111, 4, 113, 5, 117, 7, + 118, 3, 119, + 5, 122, 5, 225, 255, 226, 255, 227, 255, 228, 255, 229, 255, 230, 255, + 237, 3, 238, + 3, 239, 3, 240, 3, 242, 4, 250, 3, 251, 3, 252, 3, 253, 3, 254, 5, 0, 1, + 5, 0, 3, 255, + 0, 5, 255, 0, 7, 255, 0, 45, 3, 0, 49, 3, 0, 57, 3, 0, 60, 3, 0, 62, 3, 0, + 68, 3, 0, 70, 4, + 0, 72, 4, 0, 74, 4, 0, 101, 7, 0, 109, 3, 0, 113, 3, 0, 115, 3, 0, 117, 3, + 3, 45, 254, 47, + 254, 4, 45, 254, 47, 254, 120, 252, 3, 45, 254, 47, 254, 4, 45, 254, 47, + 254, 120, + 252, 3, 45, 254, 47, 254, 4, 45, 254, 47, 254, 120, 252, 70, 45, 237, 46, + 234, 47, + 237, 59, 254, 60, 254, 66, 237, 80, 250, 98, 237, 102, 237, 112, 237, 115, + 237, 118, + 237, 120, 237, 122, 237, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, + 198, + 237, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 237, + 226, + 237, 227, 237, 228, 247, 229, 237, 230, 237, 233, 247, 234, 237, 235, 237, + 236, + 237, 243, 237, 244, 237, 245, 237, 246, 247, 247, 237, 249, 237, 250, 237, + 251, + 237, 252, 237, 253, 237, 254, 237, 0, 1, 247, 0, 2, 237, 0, 3, 247, 0, 4, + 237, 0, 5, + 247, 0, 6, 237, 0, 7, 237, 0, 21, 247, 0, 25, 237, 0, 27, 237, 0, 29, 237, + 0, 78, 250, + 0, 79, 247, 0, 82, 250, 0, 83, 237, 0, 87, 237, 0, 89, 237, 0, 91, 237, 0, + 109, 247, + 0, 113, 237, 0, 115, 237, 0, 117, 237, 70, 45, 237, 46, 234, 47, 237, 59, + 254, 60, + 254, 66, 237, 80, 250, 98, 237, 102, 237, 112, 237, 115, 237, 118, 237, + 120, 237, + 122, 237, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, + 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 225, 237, 226, 237, 227, + 237, + 228, 247, 229, 237, 230, 237, 233, 247, 234, 237, 235, 237, 236, 237, 243, + 237, + 244, 237, 245, 237, 246, 247, 247, 237, 249, 237, 250, 237, 251, 237, 252, + 237, + 253, 237, 254, 237, 0, 1, 247, 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 247, + 0, 6, 237, + 0, 7, 237, 0, 21, 247, 0, 25, 237, 0, 27, 237, 0, 29, 237, 0, 78, 250, 0, + 79, 247, 0, + 82, 250, 0, 83, 237, 0, 87, 237, 0, 89, 237, 0, 91, 237, 0, 109, 247, 0, + 113, 237, 0, + 115, 237, 0, 117, 237, 13, 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, + 195, 250, + 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, + 250, 47, 250, + 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, + 250, 0, + 4, 250, 0, 6, 250, 13, 45, 250, 47, 250, 66, 250, 193, 250, 194, 250, 195, + 250, 196, + 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 250, 47, + 250, 66, + 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, + 250, 0, 4, + 250, 0, 6, 250, 65, 45, 234, 46, 234, 47, 234, 59, 247, 60, 247, 66, 239, + 80, 243, + 98, 234, 102, 234, 106, 254, 112, 234, 118, 239, 193, 239, 194, 239, 195, + 239, 196, + 239, 197, 239, 198, 239, 211, 243, 212, 243, 213, 243, 214, 243, 215, 243, + 217, + 243, 225, 234, 226, 234, 227, 234, 228, 245, 229, 234, 230, 234, 233, 234, + 234, + 234, 235, 234, 236, 234, 238, 254, 243, 234, 244, 234, 245, 234, 246, 234, + 247, + 234, 249, 234, 250, 239, 251, 239, 252, 239, 253, 239, 0, 2, 239, 0, 3, + 245, 0, 4, + 239, 0, 5, 245, 0, 6, 239, 0, 7, 234, 0, 21, 245, 0, 25, 234, 0, 27, 234, + 0, 29, 234, + 0, 49, 254, 0, 78, 243, 0, 79, 234, 0, 82, 243, 0, 83, 234, 0, 109, 239, + 0, 113, 239, + 0, 115, 239, 0, 117, 239, 19, 102, 254, 112, 254, 233, 254, 234, 254, 235, + 254, 236, + 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, + 254, 0, 25, + 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 19, 102, 254, 112, + 254, 233, 254, + 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, + 254, + 249, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, + 83, 254, 19, + 102, 254, 112, 254, 233, 254, 234, 254, 235, 254, 236, 254, 243, 254, 244, + 254, + 245, 254, 246, 254, 247, 254, 249, 254, 0, 21, 254, 0, 25, 254, 0, 27, + 254, 0, 29, + 254, 0, 79, 254, 0, 83, 254, 3, 45, 254, 47, 254, 4, 45, 254, 47, 254, + 120, 252, 2, + 1, 32, 24, 247, 14, 33, 245, 101, 249, 115, 249, 116, 249, 0, 19, 249, 0, + 87, 249, + 0, 89, 249, 0, 91, 249, 0, 93, 249, 0, 97, 249, 0, 99, 249, 1, 2, 25, 249, + 1, 32, 25, + 247, 2, 33, 250 }; -static afm_cuint16 afm_Helvetica_Oblique_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Helvetica_Oblique_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Helvetica_Oblique_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Helvetica_Oblique_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -1792,27 +3422,44 @@ static afm_cunicode afm_Helvetica_Oblique_ligatures[] = { /* 3 */ /* FullName: ITC Zapf Dingbats */ /* FamilyName: ZapfDingbats */ static afm_cuint8 afm_ZapfDingbats_widths[] = { /* 202 */ - 46,162,160,162,163,120,132,132,132,115,160,157,92,143,152,156,152, - 158,162,126,141,127,127,95,113,127,127,127,126,82,92,90,96,115,131, - 131,131,132,132,132,136,137,132,140,137,139,136,139,154,124,121, - 125,132,132,116,129,128,132,127,118,118,114,117,138,136,132,132, - 118,115,116,115,131,131,119,132,131,132,146,127,127,127,127,127, - 149,149,131,131,73,23,46,69,65,65,111,111,65,65,53,53,46,46,85,85, - 68,68,39,39,56,56,122,91,91,152,111,127,127,129,99,116,104,131,131, - 131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131, - 131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131, - 131,131,131,131,131,131,149,140,169,76,125,154,125,153,155,155,155, - 139,146,138,154,154,153,155,155,77,147,139,139,145,145,116,116,146, - 146,127,158,129,144,129,148,161,148,139,146,155,162,153 + 46, 162, 160, 162, 163, 120, 132, 132, 132, 115, 160, 157, 92, 143, 152, + 156, 152, + 158, 162, 126, 141, 127, 127, 95, 113, 127, 127, 127, 126, 82, 92, 90, 96, + 115, 131, + 131, 131, 132, 132, 132, 136, 137, 132, 140, 137, 139, 136, 139, 154, 124, + 121, + 125, 132, 132, 116, 129, 128, 132, 127, 118, 118, 114, 117, 138, 136, 132, + 132, + 118, 115, 116, 115, 131, 131, 119, 132, 131, 132, 146, 127, 127, 127, 127, + 127, + 149, 149, 131, 131, 73, 23, 46, 69, 65, 65, 111, 111, 65, 65, 53, 53, 46, + 46, 85, 85, + 68, 68, 39, 39, 56, 56, 122, 91, 91, 152, 111, 127, 127, 129, 99, 116, + 104, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, + 131, 131, 131, 131, 131, 131, 149, 140, 169, 76, 125, 154, 125, 153, 155, + 155, 155, + 139, 146, 138, 154, 154, 153, 155, 155, 77, 147, 139, 139, 145, 145, 116, + 116, 146, + 146, 127, 158, 129, 144, 129, 148, 161, 148, 139, 146, 155, 162, 153 }; -static afm_cuint16 afm_ZapfDingbats_highchars_index[] = { /* 107 */ - 128,129,130,131,132,133,134,135,136,137,138,139,140,141,161,162, - 163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178, - 179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194, - 195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210, - 211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226, - 227,228,229,230,231,232,233,234,235,236,237,238,239,241,242,243, - 244,245,246,247,248,249,250,251,252,253,254 +static afm_cuint16 afm_ZapfDingbats_highchars_index[] = { /* 107 */ + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 161, + 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 241, 242, + 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254 }; @@ -1820,33 +3467,56 @@ static afm_cuint16 afm_ZapfDingbats_highchars_index[] = { /* 107 */ /* FontName: Symbol */ /* FullName: Symbol */ /* FamilyName: Symbol */ -static afm_cuint8 afm_Symbol_widths[] = { /* 251 */ - 42,56,0,83,0,139,130,0,56,56,0,92,42,0,42,46,83,83,83,83,83,83,83, - 83,83,83,46,46,92,92,92,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,56,0,56,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,80,33,80,0,119,67,92,96,92,92,83,120,111,101,102, - 102,120,124,56,120,114,148,120,108,120,128,93,99,102,115,127,120, - 133,105,92,69,82,73,82,101,87,55,92,92,87,82,92,92,92,73,101,73, - 96,87,92,114,114,105,103,101,119,77,167,41,69,28,125,114,165,133, - 128,137,165,101,165,101,174,110,165,101,165,101,174,119,82,92,137, - 102,119,119,119,73,137,119,92,83,92,119,119,128,101,101,128,128, - 46,144,92,92,92,92,92,92,92,119,119,119,119,119,128,128,110,42,114, - 114,55,55,82,126,126,126,126,132,132,148,83,101,167,132,132,131, - 64,64,64,64,64,64,82,82,82,82,114,64,64,64,64,64,64,82,82,82 +static afm_cuint8 afm_Symbol_widths[] = { /* 251 */ + 42, 56, 0, 83, 0, 139, 130, 0, 56, 56, 0, 92, 42, 0, 42, 46, 83, 83, 83, + 83, 83, 83, 83, + 83, 83, 83, 46, 46, 92, 92, 92, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 56, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 33, 80, 0, 119, 67, 92, 96, 92, 92, 83, + 120, 111, 101, 102, + 102, 120, 124, 56, 120, 114, 148, 120, 108, 120, 128, 93, 99, 102, 115, + 127, 120, + 133, 105, 92, 69, 82, 73, 82, 101, 87, 55, 92, 92, 87, 82, 92, 92, 92, 73, + 101, 73, + 96, 87, 92, 114, 114, 105, 103, 101, 119, 77, 167, 41, 69, 28, 125, 114, + 165, 133, + 128, 137, 165, 101, 165, 101, 174, 110, 165, 101, 165, 101, 174, 119, 82, + 92, 137, + 102, 119, 119, 119, 73, 137, 119, 92, 83, 92, 119, 119, 128, 101, 101, + 128, 128, + 46, 144, 92, 92, 92, 92, 92, 92, 92, 119, 119, 119, 119, 119, 128, 128, + 110, 42, 114, + 114, 55, 55, 82, 126, 126, 126, 126, 132, 132, 148, 83, 101, 167, 132, + 132, 131, + 64, 64, 64, 64, 64, 64, 82, 82, 82, 82, 114, 64, 64, 64, 64, 64, 64, 82, + 82, 82 }; static afm_cuint16 afm_Symbol_highchars_index[] = { /* 156 */ - 172,176,177,181,215,247,402,913,914,915,917,918,919,920,921,922, - 923,924,925,926,927,928,929,931,932,933,934,935,936,945,946,947, - 948,949,950,951,952,953,954,955,957,958,959,960,961,962,963,964, - 965,966,967,968,969,977,978,981,982,8226,8230,8242,8243,8260,8364, - 8465,8472,8476,8486,8501,8592,8593,8594,8595,8596,8629,8656,8657, - 8658,8659,8660,8704,8706,8707,8709,8710,8711,8712,8713,8715,8719, - 8721,8722,8727,8730,8733,8734,8736,8743,8744,8745,8746,8747,8756, - 8764,8773,8776,8800,8801,8804,8805,8834,8835,8836,8838,8839,8853, - 8855,8869,8901,8992,8993,9001,9002,9674,9824,9827,9829,9830,63193, - 63194,63195,63717,63718,63719,63720,63721,63722,63723,63724,63725, - 63726,63727,63728,63729,63730,63731,63732,63733,63734,63735,63736, - 63737,63738,63739,63740,63741,63742 + 172, 176, 177, 181, 215, 247, 402, 913, 914, 915, 917, 918, 919, 920, 921, + 922, + 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 945, 946, + 947, + 948, 949, 950, 951, 952, 953, 954, 955, 957, 958, 959, 960, 961, 962, 963, + 964, + 965, 966, 967, 968, 969, 977, 978, 981, 982, 8226, 8230, 8242, 8243, 8260, + 8364, + 8465, 8472, 8476, 8486, 8501, 8592, 8593, 8594, 8595, 8596, 8629, 8656, + 8657, + 8658, 8659, 8660, 8704, 8706, 8707, 8709, 8710, 8711, 8712, 8713, 8715, + 8719, + 8721, 8722, 8727, 8730, 8733, 8734, 8736, 8743, 8744, 8745, 8746, 8747, + 8756, + 8764, 8773, 8776, 8800, 8801, 8804, 8805, 8834, 8835, 8836, 8838, 8839, + 8853, + 8855, 8869, 8901, 8992, 8993, 9001, 9002, 9674, 9824, 9827, 9829, 9830, + 63193, + 63194, 63195, 63717, 63718, 63719, 63720, 63721, 63722, 63723, 63724, + 63725, + 63726, 63727, 63728, 63729, 63730, 63731, 63732, 63733, 63734, 63735, + 63736, + 63737, 63738, 63739, 63740, 63741, 63742 }; @@ -1854,353 +3524,687 @@ static afm_cuint16 afm_Symbol_highchars_index[] = { /* 156 */ /* FontName: Times-Bold */ /* FullName: Times Bold */ /* FamilyName: Times */ -static afm_cuint8 afm_Times_Bold_widths[] = { /* 315 */ - 42,56,93,83,83,167,139,46,56,56,83,95,42,56,42,46,83,83,83,83,83, - 83,83,83,83,83,56,56,95,95,95,83,155,120,111,120,120,111,102,130, - 130,65,83,130,111,157,120,130,102,130,120,93,111,120,120,167,120, - 120,111,56,46,56,97,83,56,83,93,74,93,74,56,83,93,46,56,93,46,139, - 93,83,93,93,74,65,56,93,83,120,83,83,74,66,37,66,87,56,83,83,83, - 83,37,83,56,125,50,83,95,125,56,67,95,50,50,56,93,90,42,56,50,55, - 83,125,125,125,83,120,120,120,120,120,120,167,120,111,111,111,111, - 65,65,65,65,120,120,130,130,130,130,130,95,130,120,120,120,120,120, - 102,93,83,83,83,83,83,83,120,74,74,74,74,74,46,46,46,46,83,93,83, - 83,83,83,83,95,83,93,93,93,93,83,93,83,120,83,120,83,120,83,120, - 74,120,74,120,112,120,93,111,74,111,74,111,74,111,74,130,83,130, - 83,65,46,65,46,65,46,130,93,111,46,111,46,111,66,111,46,120,93,120, - 93,120,93,130,83,130,83,167,120,120,74,120,74,120,74,93,65,93,65, - 93,65,111,56,111,69,120,93,120,93,120,93,120,93,120,111,74,111,74, - 111,74,83,93,65,56,56,56,56,56,56,56,56,83,167,56,56,56,83,83,83, - 83,83,58,167,167,56,56,28,83,167,82,102,100,95,92,92,92,92,82,42, - 93,93 +static afm_cuint8 afm_Times_Bold_widths[] = { /* 315 */ + 42, 56, 93, 83, 83, 167, 139, 46, 56, 56, 83, 95, 42, 56, 42, 46, 83, 83, + 83, 83, 83, + 83, 83, 83, 83, 83, 56, 56, 95, 95, 95, 83, 155, 120, 111, 120, 120, 111, + 102, 130, + 130, 65, 83, 130, 111, 157, 120, 130, 102, 130, 120, 93, 111, 120, 120, + 167, 120, + 120, 111, 56, 46, 56, 97, 83, 56, 83, 93, 74, 93, 74, 56, 83, 93, 46, 56, + 93, 46, 139, + 93, 83, 93, 93, 74, 65, 56, 93, 83, 120, 83, 83, 74, 66, 37, 66, 87, 56, + 83, 83, 83, + 83, 37, 83, 56, 125, 50, 83, 95, 125, 56, 67, 95, 50, 50, 56, 93, 90, 42, + 56, 50, 55, + 83, 125, 125, 125, 83, 120, 120, 120, 120, 120, 120, 167, 120, 111, 111, + 111, 111, + 65, 65, 65, 65, 120, 120, 130, 130, 130, 130, 130, 95, 130, 120, 120, 120, + 120, 120, + 102, 93, 83, 83, 83, 83, 83, 83, 120, 74, 74, 74, 74, 74, 46, 46, 46, 46, + 83, 93, 83, + 83, 83, 83, 83, 95, 83, 93, 93, 93, 93, 83, 93, 83, 120, 83, 120, 83, 120, + 83, 120, + 74, 120, 74, 120, 112, 120, 93, 111, 74, 111, 74, 111, 74, 111, 74, 130, + 83, 130, + 83, 65, 46, 65, 46, 65, 46, 130, 93, 111, 46, 111, 46, 111, 66, 111, 46, + 120, 93, 120, + 93, 120, 93, 130, 83, 130, 83, 167, 120, 120, 74, 120, 74, 120, 74, 93, + 65, 93, 65, + 93, 65, 111, 56, 111, 69, 120, 93, 120, 93, 120, 93, 120, 93, 120, 111, + 74, 111, 74, + 111, 74, 83, 93, 65, 56, 56, 56, 56, 56, 56, 56, 56, 83, 167, 56, 56, 56, + 83, 83, 83, + 83, 83, 58, 167, 167, 56, 56, 28, 83, 167, 82, 102, 100, 95, 92, 92, 92, + 92, 82, 42, + 93, 93 }; -static afm_sint16 afm_Times_Bold_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,44,0,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,62,183,0,229,0,266,0,0,0,359,472,564,0,599,623,668,761,786,0, - 848,1016,1044,1209,0,1364,0,0,0,0,0,0,0,1512,1515,0,1544,1547,1550, - 1588,1591,1599,0,1602,0,0,1652,1655,0,0,1660,0,0,0,1746,1816,0,1841, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,1888,2009,2130,2251,2372,2493,0,0,0,0,0,0,0,0,0,0,0,2614,2638, - 2683,2728,2773,2818,0,2863,2908,2936,2964,2992,3020,0,0,3168,3171, - 3174,3177,3180,3183,0,0,3186,3189,3192,3195,3198,3201,3204,3207, - 0,3210,3213,3218,3223,3228,3233,0,3238,0,0,0,0,3243,0,3290,3337, - 3458,3461,3582,3585,3706,0,0,0,0,3709,0,3746,3783,0,3786,0,3789, - 0,3792,0,3795,0,3798,0,3801,0,3804,0,3807,0,0,3810,3902,3952,0,3987, - 0,0,0,4022,0,4057,4081,4084,4108,4111,4135,4138,4183,4188,4233,0, - 0,4238,4300,4386,4448,4534,4596,0,0,0,0,0,0,4682,0,4850,0,5018,0, - 5046,0,5074,0,5102,0,5130,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 5278,5306,0,5346,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +static afm_sint16 afm_Times_Bold_kerning_index[] = { /* 315 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 62, 183, 0, 229, 0, 266, 0, 0, 0, 359, 472, 564, 0, 599, 623, 668, + 761, 786, 0, + 848, 1016, 1044, 1209, 0, 1364, 0, 0, 0, 0, 0, 0, 0, 1512, 1515, 0, 1544, + 1547, 1550, + 1588, 1591, 1599, 0, 1602, 0, 0, 1652, 1655, 0, 0, 1660, 0, 0, 0, 1746, + 1816, 0, 1841, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1888, 2009, 2130, 2251, 2372, 2493, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2614, 2638, + 2683, 2728, 2773, 2818, 0, 2863, 2908, 2936, 2964, 2992, 3020, 0, 0, 3168, + 3171, + 3174, 3177, 3180, 3183, 0, 0, 3186, 3189, 3192, 3195, 3198, 3201, 3204, + 3207, + 0, 3210, 3213, 3218, 3223, 3228, 3233, 0, 3238, 0, 0, 0, 0, 3243, 0, 3290, + 3337, + 3458, 3461, 3582, 3585, 3706, 0, 0, 0, 0, 3709, 0, 3746, 3783, 0, 3786, 0, + 3789, + 0, 3792, 0, 3795, 0, 3798, 0, 3801, 0, 3804, 0, 3807, 0, 0, 3810, 3902, + 3952, 0, 3987, + 0, 0, 0, 4022, 0, 4057, 4081, 4084, 4108, 4111, 4135, 4138, 4183, 4188, + 4233, 0, + 0, 4238, 4300, 4386, 4448, 4534, 4596, 0, 0, 0, 0, 0, 0, 4682, 0, 4850, 0, + 5018, 0, + 5046, 0, 5074, 0, 5102, 0, 5130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 5278, 5306, 0, 5346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 }; static afm_cuint8 afm_Times_Bold_kerning_data[] = { /* 5370 */ - 42,19,66,248,85,252,87,249,88,252,90,248,193,248,194,248,195,248, - 196,248,197,248,198,248,222,248,0,2,248,0,4,248,0,6,248,0,100,252, - 0,102,252,0,122,248,3,1,32,25,248,1,32,29,249,3,1,32,25,248,1,32, - 29,248,51,68,248,72,248,80,249,82,249,85,241,86,249,87,233,88,235, - 90,240,113,253,118,249,119,240,120,242,122,245,200,248,211,249,212, - 249,213,249,214,249,215,249,217,249,218,249,219,249,220,249,221, - 249,222,240,250,249,251,249,252,249,253,249,254,245,0,1,245,0,8, - 248,0,14,248,0,32,248,0,36,248,0,78,249,0,82,249,0,100,241,0,102, - 241,0,108,249,0,109,249,0,112,249,0,113,249,0,114,249,0,115,249, - 0,116,249,0,117,249,0,122,240,1,32,25,245,20,66,252,86,255,193,252, - 194,252,195,252,196,252,197,252,198,252,218,255,219,255,220,255, - 221,255,0,2,252,0,4,252,0,6,252,0,108,255,0,112,255,0,114,255,0, - 116,255,17,47,254,66,251,87,250,88,250,90,250,193,251,194,251,195, - 251,196,251,197,251,198,251,222,250,0,2,251,0,4,251,0,6,251,0,122, - 250,41,45,242,47,239,66,242,98,253,102,253,112,253,193,242,194,242, - 195,242,196,242,197,242,198,242,225,253,226,253,227,253,228,253, - 229,253,230,253,233,253,234,253,235,253,236,253,243,253,244,253, - 245,253,246,253,247,253,249,253,0,2,242,0,3,253,0,4,242,0,5,253, - 0,6,242,0,7,253,0,21,253,0,25,253,0,27,253,0,29,253,0,79,253,0,83, - 253,49,47,254,66,252,98,254,102,254,112,254,118,254,193,252,194, - 252,195,252,196,252,197,252,198,252,225,254,226,254,227,254,228, - 254,229,254,230,254,233,254,234,254,235,254,236,254,243,254,244, - 254,245,254,246,254,247,254,249,254,250,254,251,254,252,254,253, - 254,0,2,252,0,3,254,0,4,252,0,5,254,0,6,252,0,7,254,0,21,254,0,25, - 254,0,27,254,0,29,254,0,79,254,0,83,254,0,109,254,0,113,254,0,115, - 254,0,117,254,40,80,252,102,253,112,253,118,254,122,249,211,252, - 212,252,213,252,214,252,215,252,217,252,233,253,234,253,235,253, - 236,253,243,253,244,253,245,253,246,253,247,253,249,253,250,254, - 251,254,252,254,253,254,254,249,0,1,249,0,21,253,0,25,253,0,27,253, - 0,29,253,0,78,252,0,79,253,0,82,252,0,83,253,0,109,254,0,113,254, - 0,115,254,0,117,254,14,85,242,87,242,88,242,90,242,122,248,222,242, - 254,248,0,1,248,0,100,242,0,102,242,0,122,242,1,32,25,239,1,32,29, - 254,11,66,254,193,254,194,254,195,254,196,254,197,254,198,254,0, - 2,254,0,4,254,0,6,254,20,66,250,85,250,87,249,88,249,89,250,90,249, - 193,250,194,250,195,250,196,250,197,250,198,250,222,249,0,2,250, - 0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,41,45,242,47,239,66, - 245,98,255,102,254,112,254,193,245,194,245,195,245,196,245,197,245, - 198,245,225,255,226,255,227,255,228,255,229,255,230,255,233,254, - 234,254,235,254,236,254,243,254,244,254,245,254,246,254,247,254, - 249,254,0,2,245,0,3,255,0,4,245,0,5,255,0,6,245,0,7,255,0,21,254, - 0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,11,47,254,86,255,218, - 255,219,255,220,255,221,255,0,108,255,0,112,255,0,114,255,0,116, - 255,27,80,252,85,250,86,252,87,248,88,251,90,251,211,252,212,252, - 213,252,214,252,215,252,217,252,218,252,219,252,220,252,221,252, - 222,251,0,78,252,0,82,252,0,100,250,0,102,250,0,108,252,0,112,252, - 0,114,252,0,116,252,0,122,251,73,45,245,46,242,47,242,59,245,60, - 245,66,242,80,254,98,242,102,242,106,254,112,242,115,245,118,242, - 120,245,122,251,193,242,194,242,195,242,196,242,197,242,198,242, - 211,254,212,254,213,254,214,254,215,254,217,254,225,248,226,242, - 227,248,228,248,229,248,230,242,233,248,234,242,235,242,236,248, - 238,254,243,242,244,242,245,242,246,242,247,242,249,242,250,242, - 251,242,252,242,253,242,254,251,0,1,251,0,2,242,0,3,248,0,4,242, - 0,5,248,0,6,242,0,7,242,0,21,248,0,25,242,0,27,242,0,29,242,0,49, - 254,0,78,254,0,79,242,0,82,254,0,83,242,0,87,245,0,89,245,0,91,245, - 0,109,242,0,113,242,0,115,242,0,117,242,13,45,249,47,249,66,247, - 193,247,194,247,195,247,196,247,197,247,198,247,0,2,247,0,4,247, - 0,6,247,72,45,235,46,245,47,233,59,242,60,242,66,234,72,252,80,249, - 98,242,102,240,106,251,112,240,118,242,193,234,194,234,195,234,196, - 234,197,234,198,234,211,249,212,249,213,249,214,249,215,249,217, - 249,225,242,226,242,227,242,228,242,229,242,230,242,233,240,234, - 240,235,240,236,240,237,251,238,251,239,251,240,251,243,240,244, - 240,245,240,246,240,247,240,249,240,250,242,251,242,252,242,253, - 242,0,2,234,0,3,242,0,4,234,0,5,242,0,6,234,0,7,242,0,21,240,0,25, - 240,0,27,240,0,29,240,0,32,252,0,36,252,0,45,251,0,49,251,0,78,249, - 0,79,240,0,82,249,0,83,240,0,109,242,0,113,242,0,115,242,0,117,242, - 68,45,242,46,251,47,242,59,248,60,248,66,237,80,255,98,246,102,246, - 106,254,112,244,118,249,122,247,193,237,194,237,195,237,196,237, - 197,237,198,237,211,255,212,255,213,255,214,255,215,255,217,255, - 225,246,226,246,227,246,228,246,229,246,230,246,233,246,234,246, - 235,246,236,246,238,254,243,244,244,244,245,244,246,244,247,244, - 249,244,250,249,251,249,252,249,253,249,254,247,0,1,247,0,2,237, - 0,3,246,0,4,237,0,5,246,0,6,237,0,7,246,0,21,246,0,25,246,0,27,246, - 0,29,246,0,49,254,0,78,255,0,79,244,0,82,255,0,83,244,0,109,249, - 0,113,249,0,115,249,0,117,249,65,45,242,46,242,47,242,59,242,60, - 242,66,239,80,251,98,243,102,238,106,251,112,238,118,242,193,239, - 194,239,195,239,196,239,197,239,198,239,211,251,212,251,213,251, - 214,251,215,251,217,251,225,243,226,243,227,243,228,243,229,243, - 230,243,233,245,234,238,235,238,236,245,238,251,243,238,244,238, - 245,238,246,238,247,238,249,238,250,242,251,242,252,242,253,242, - 0,2,239,0,3,243,0,4,239,0,5,243,0,6,239,0,7,243,0,21,245,0,25,238, - 0,27,238,0,29,238,0,49,251,0,78,251,0,79,238,0,82,251,0,83,238,0, - 109,242,0,113,242,0,115,242,0,117,242,2,119,253,13,47,250,99,255, - 118,254,119,254,250,254,251,254,252,254,253,254,0,109,254,0,113, - 254,0,115,254,0,117,254,2,120,254,2,119,254,16,45,254,47,254,106, - 253,112,253,243,253,244,253,245,253,246,253,247,253,249,253,0,51, - 251,0,79,253,0,83,253,1,32,25,9,1,32,29,8,2,47,254,4,122,254,254, - 254,0,1,254,2,119,255,22,102,255,112,254,122,254,233,255,234,255, - 235,255,236,255,243,254,244,254,245,254,246,254,247,254,249,254, - 254,254,0,1,254,0,21,255,0,25,255,0,27,255,0,29,255,0,79,254,0,83, - 254,2,119,250,3,119,255,120,255,37,45,242,46,251,47,240,100,254, - 102,254,104,255,111,254,112,254,113,255,114,254,119,255,232,254, - 233,254,234,254,235,254,236,254,242,254,243,254,244,254,245,254, - 246,254,247,254,249,254,0,9,254,0,15,254,0,21,254,0,25,254,0,27, - 254,0,29,254,0,33,255,0,37,255,0,70,254,0,72,254,0,74,254,0,79,254, - 0,83,254,31,45,248,47,245,98,255,102,255,112,255,225,255,226,255, - 227,255,228,255,229,255,230,255,233,255,234,255,235,255,236,255, - 243,255,244,255,245,255,246,255,247,255,249,255,0,3,255,0,5,255, - 0,7,255,0,21,255,0,25,255,0,27,255,0,29,255,0,79,255,0,83,255,12, - 45,248,47,245,112,255,243,255,244,255,245,255,246,255,247,255,249, - 255,0,79,255,0,83,255,21,45,248,47,245,102,255,112,253,233,255,234, - 255,235,255,236,255,243,253,244,253,245,253,246,253,247,253,249, - 253,0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83,253,51,68, - 248,72,248,80,249,82,249,85,241,86,249,87,233,88,235,90,240,113, - 253,118,249,119,240,120,242,122,245,200,248,211,249,212,249,213, - 249,214,249,215,249,217,249,218,249,219,249,220,249,221,249,222, - 240,250,249,251,249,252,249,253,249,254,245,0,1,245,0,8,248,0,14, - 248,0,32,248,0,36,248,0,78,249,0,82,249,0,100,241,0,102,241,0,108, - 249,0,109,249,0,112,249,0,113,249,0,114,249,0,115,249,0,116,249, - 0,117,249,0,122,240,1,32,25,245,51,68,248,72,248,80,249,82,249,85, - 241,86,249,87,233,88,235,90,240,113,253,118,249,119,240,120,242, - 122,245,200,248,211,249,212,249,213,249,214,249,215,249,217,249, - 218,249,219,249,220,249,221,249,222,240,250,249,251,249,252,249, - 253,249,254,245,0,1,245,0,8,248,0,14,248,0,32,248,0,36,248,0,78, - 249,0,82,249,0,100,241,0,102,241,0,108,249,0,109,249,0,112,249,0, - 113,249,0,114,249,0,115,249,0,116,249,0,117,249,0,122,240,1,32,25, - 245,51,68,248,72,248,80,249,82,249,85,241,86,249,87,233,88,235,90, - 240,113,253,118,249,119,240,120,242,122,245,200,248,211,249,212, - 249,213,249,214,249,215,249,217,249,218,249,219,249,220,249,221, - 249,222,240,250,249,251,249,252,249,253,249,254,245,0,1,245,0,8, - 248,0,14,248,0,32,248,0,36,248,0,78,249,0,82,249,0,100,241,0,102, - 241,0,108,249,0,109,249,0,112,249,0,113,249,0,114,249,0,115,249, - 0,116,249,0,117,249,0,122,240,1,32,25,245,51,68,248,72,248,80,249, - 82,249,85,241,86,249,87,233,88,235,90,240,113,253,118,249,119,240, - 120,242,122,245,200,248,211,249,212,249,213,249,214,249,215,249, - 217,249,218,249,219,249,220,249,221,249,222,240,250,249,251,249, - 252,249,253,249,254,245,0,1,245,0,8,248,0,14,248,0,32,248,0,36,248, - 0,78,249,0,82,249,0,100,241,0,102,241,0,108,249,0,109,249,0,112, - 249,0,113,249,0,114,249,0,115,249,0,116,249,0,117,249,0,122,240, - 1,32,25,245,51,68,248,72,248,80,249,82,249,85,241,86,249,87,233, - 88,235,90,240,113,253,118,249,119,240,120,242,122,245,200,248,211, - 249,212,249,213,249,214,249,215,249,217,249,218,249,219,249,220, - 249,221,249,222,240,250,249,251,249,252,249,253,249,254,245,0,1, - 245,0,8,248,0,14,248,0,32,248,0,36,248,0,78,249,0,82,249,0,100,241, - 0,102,241,0,108,249,0,109,249,0,112,249,0,113,249,0,114,249,0,115, - 249,0,116,249,0,117,249,0,122,240,1,32,25,245,51,68,248,72,248,80, - 249,82,249,85,241,86,249,87,233,88,235,90,240,113,253,118,249,119, - 240,120,242,122,245,200,248,211,249,212,249,213,249,214,249,215, - 249,217,249,218,249,219,249,220,249,221,249,222,240,250,249,251, - 249,252,249,253,249,254,245,0,1,245,0,8,248,0,14,248,0,32,248,0, - 36,248,0,78,249,0,82,249,0,100,241,0,102,241,0,108,249,0,109,249, - 0,112,249,0,113,249,0,114,249,0,115,249,0,116,249,0,117,249,0,122, - 240,1,32,25,245,11,66,254,193,254,194,254,195,254,196,254,197,254, - 198,254,0,2,254,0,4,254,0,6,254,20,66,250,85,250,87,249,88,249,89, - 250,90,249,193,250,194,250,195,250,196,250,197,250,198,250,222,249, - 0,2,250,0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,20,66,250, - 85,250,87,249,88,249,89,250,90,249,193,250,194,250,195,250,196,250, - 197,250,198,250,222,249,0,2,250,0,4,250,0,6,250,0,100,250,0,102, - 250,0,122,249,20,66,250,85,250,87,249,88,249,89,250,90,249,193,250, - 194,250,195,250,196,250,197,250,198,250,222,249,0,2,250,0,4,250, - 0,6,250,0,100,250,0,102,250,0,122,249,20,66,250,85,250,87,249,88, - 249,89,250,90,249,193,250,194,250,195,250,196,250,197,250,198,250, - 222,249,0,2,250,0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,20, - 66,250,85,250,87,249,88,249,89,250,90,249,193,250,194,250,195,250, - 196,250,197,250,198,250,222,249,0,2,250,0,4,250,0,6,250,0,100,250, - 0,102,250,0,122,249,20,66,250,85,250,87,249,88,249,89,250,90,249, - 193,250,194,250,195,250,196,250,197,250,198,250,222,249,0,2,250, - 0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,13,45,249,47,249,66, - 247,193,247,194,247,195,247,196,247,197,247,198,247,0,2,247,0,4, - 247,0,6,247,13,45,249,47,249,66,247,193,247,194,247,195,247,196, - 247,197,247,198,247,0,2,247,0,4,247,0,6,247,13,45,249,47,249,66, - 247,193,247,194,247,195,247,196,247,197,247,198,247,0,2,247,0,4, - 247,0,6,247,13,45,249,47,249,66,247,193,247,194,247,195,247,196, - 247,197,247,198,247,0,2,247,0,4,247,0,6,247,65,45,242,46,242,47, - 242,59,242,60,242,66,239,80,251,98,243,102,238,106,251,112,238,118, - 242,193,239,194,239,195,239,196,239,197,239,198,239,211,251,212, - 251,213,251,214,251,215,251,217,251,225,243,226,243,227,243,228, - 243,229,243,230,243,233,245,234,238,235,238,236,245,238,251,243, - 238,244,238,245,238,246,238,247,238,249,238,250,242,251,242,252, - 242,253,242,0,2,239,0,3,243,0,4,239,0,5,243,0,6,239,0,7,243,0,21, - 245,0,25,238,0,27,238,0,29,238,0,49,251,0,78,251,0,79,238,0,82,251, - 0,83,238,0,109,242,0,113,242,0,115,242,0,117,242,2,119,253,2,119, - 253,2,119,253,2,119,253,2,119,253,2,119,253,2,119,254,2,119,254, - 2,119,254,2,119,254,2,119,255,2,119,255,2,119,255,2,119,255,2,119, - 250,3,119,255,120,255,3,119,255,120,255,3,119,255,120,255,3,119, - 255,120,255,3,119,255,120,255,3,119,255,120,255,21,45,248,47,245, - 102,255,112,253,233,255,234,255,235,255,236,255,243,253,244,253, - 245,253,246,253,247,253,249,253,0,21,255,0,25,255,0,27,255,0,29, - 255,0,79,253,0,83,253,21,45,248,47,245,102,255,112,253,233,255,234, - 255,235,255,236,255,243,253,244,253,245,253,246,253,247,253,249, - 253,0,21,255,0,25,255,0,27,255,0,29,255,0,79,253,0,83,253,51,68, - 248,72,248,80,249,82,249,85,241,86,249,87,233,88,235,90,240,113, - 253,118,249,119,240,120,242,122,245,200,248,211,249,212,249,213, - 249,214,249,215,249,217,249,218,249,219,249,220,249,221,249,222, - 240,250,249,251,249,252,249,253,249,254,245,0,1,245,0,8,248,0,14, - 248,0,32,248,0,36,248,0,78,249,0,82,249,0,100,241,0,102,241,0,108, - 249,0,109,249,0,112,249,0,113,249,0,114,249,0,115,249,0,116,249, - 0,117,249,0,122,240,1,32,25,245,2,119,253,51,68,248,72,248,80,249, - 82,249,85,241,86,249,87,233,88,235,90,240,113,253,118,249,119,240, - 120,242,122,245,200,248,211,249,212,249,213,249,214,249,215,249, - 217,249,218,249,219,249,220,249,221,249,222,240,250,249,251,249, - 252,249,253,249,254,245,0,1,245,0,8,248,0,14,248,0,32,248,0,36,248, - 0,78,249,0,82,249,0,100,241,0,102,241,0,108,249,0,109,249,0,112, - 249,0,113,249,0,114,249,0,115,249,0,116,249,0,117,249,0,122,240, - 1,32,25,245,2,119,253,51,68,248,72,248,80,249,82,249,85,241,86,249, - 87,233,88,235,90,240,113,253,118,249,119,240,120,242,122,251,200, - 248,211,249,212,249,213,249,214,249,215,249,217,249,218,249,219, - 249,220,249,221,249,222,240,250,249,251,249,252,249,253,249,254, - 251,0,1,251,0,8,248,0,14,248,0,32,248,0,36,248,0,78,249,0,82,249, - 0,100,241,0,102,241,0,108,249,0,109,249,0,112,249,0,113,249,0,114, - 249,0,115,249,0,116,249,0,117,249,0,122,240,1,32,25,245,2,119,253, - 17,47,254,66,251,87,250,88,250,90,250,193,251,194,251,195,251,196, - 251,197,251,198,251,222,250,0,2,251,0,4,251,0,6,251,0,122,250,17, - 47,254,66,251,87,250,88,250,90,250,193,251,194,251,195,251,196,251, - 197,251,198,251,222,250,0,2,251,0,4,251,0,6,251,0,122,250,2,120, - 254,2,119,254,2,119,254,2,119,254,2,119,254,2,47,254,2,47,254,2, - 119,255,2,119,255,40,80,252,102,253,112,253,118,254,122,249,211, - 252,212,252,213,252,214,252,215,252,217,252,233,253,234,253,235, - 253,236,253,243,253,244,253,245,253,246,253,247,253,249,253,250, - 254,251,254,252,254,253,254,254,249,0,1,249,0,21,253,0,25,253,0, - 27,253,0,29,253,0,78,252,0,79,253,0,82,252,0,83,253,0,109,254,0, - 113,254,0,115,254,0,117,254,22,102,255,112,254,122,254,233,255,234, - 255,235,255,236,255,243,254,244,254,245,254,246,254,247,254,249, - 254,254,254,0,1,254,0,21,255,0,25,255,0,27,255,0,29,255,0,79,254, - 0,83,254,14,85,242,87,242,88,242,90,242,122,248,222,242,254,248, - 0,1,248,0,100,242,0,102,242,0,122,242,1,32,25,239,1,32,29,254,14, - 85,242,87,242,88,242,90,242,122,248,222,242,254,248,0,1,248,0,100, - 242,0,102,242,0,122,242,1,32,25,239,1,32,29,254,14,85,242,87,242, - 88,242,90,242,122,248,222,242,254,248,0,1,248,0,100,242,0,102,242, - 0,122,242,1,32,25,239,1,32,29,254,11,66,254,193,254,194,254,195, - 254,196,254,197,254,198,254,0,2,254,0,4,254,0,6,254,2,119,250,11, - 66,254,193,254,194,254,195,254,196,254,197,254,198,254,0,2,254,0, - 4,254,0,6,254,2,119,250,11,66,254,193,254,194,254,195,254,196,254, - 197,254,198,254,0,2,254,0,4,254,0,6,254,2,119,250,20,66,250,85,250, - 87,249,88,249,89,250,90,249,193,250,194,250,195,250,196,250,197, - 250,198,250,222,249,0,2,250,0,4,250,0,6,250,0,100,250,0,102,250, - 0,122,249,3,119,255,120,255,20,66,250,85,250,87,249,88,249,89,250, - 90,249,193,250,194,250,195,250,196,250,197,250,198,250,222,249,0, - 2,250,0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,3,119,255,120, - 255,27,80,252,85,250,86,252,87,248,88,251,90,251,211,252,212,252, - 213,252,214,252,215,252,217,252,218,252,219,252,220,252,221,252, - 222,251,0,78,252,0,82,252,0,100,250,0,102,250,0,108,252,0,112,252, - 0,114,252,0,116,252,0,122,251,37,45,242,46,251,47,240,100,254,102, - 254,104,255,111,254,112,254,113,255,114,254,119,255,232,254,233, - 254,234,254,235,254,236,254,242,254,243,254,244,254,245,254,246, - 254,247,254,249,254,0,9,254,0,15,254,0,21,254,0,25,254,0,27,254, - 0,29,254,0,33,255,0,37,255,0,70,254,0,72,254,0,74,254,0,79,254,0, - 83,254,27,80,252,85,250,86,252,87,248,88,251,90,251,211,252,212, - 252,213,252,214,252,215,252,217,252,218,252,219,252,220,252,221, - 252,222,251,0,78,252,0,82,252,0,100,250,0,102,250,0,108,252,0,112, - 252,0,114,252,0,116,252,0,122,251,37,45,242,46,251,47,240,100,254, - 102,254,104,255,111,254,112,254,113,255,114,254,119,255,232,254, - 233,254,234,254,235,254,236,254,242,254,243,254,244,254,245,254, - 246,254,247,254,249,254,0,9,254,0,15,254,0,21,254,0,25,254,0,27, - 254,0,29,254,0,33,255,0,37,255,0,70,254,0,72,254,0,74,254,0,79,254, - 0,83,254,27,80,252,85,250,86,252,87,248,88,251,90,251,211,252,212, - 252,213,252,214,252,215,252,217,252,218,252,219,252,220,252,221, - 252,222,251,0,78,252,0,82,252,0,100,250,0,102,250,0,108,252,0,112, - 252,0,114,252,0,116,252,0,122,251,37,45,242,46,251,47,240,100,254, - 102,254,104,255,111,254,112,254,113,255,114,254,119,255,232,254, - 233,254,234,254,235,254,236,254,242,254,243,254,244,254,245,254, - 246,254,247,254,249,254,0,9,254,0,15,254,0,21,254,0,25,254,0,27, - 254,0,29,254,0,33,255,0,37,255,0,70,254,0,72,254,0,74,254,0,79,254, - 0,83,254,73,45,245,46,242,47,242,59,245,60,245,66,242,80,254,98, - 242,102,242,106,254,112,242,115,245,118,242,120,245,122,251,193, - 242,194,242,195,242,196,242,197,242,198,242,211,254,212,254,213, - 254,214,254,215,254,217,254,225,248,226,242,227,248,228,248,229, - 248,230,242,233,248,234,242,235,242,236,248,238,254,243,242,244, - 242,245,242,246,242,247,242,249,242,250,242,251,242,252,242,253, - 242,254,251,0,1,251,0,2,242,0,3,248,0,4,242,0,5,248,0,6,242,0,7, - 242,0,21,248,0,25,242,0,27,242,0,29,242,0,49,254,0,78,254,0,79,242, - 0,82,254,0,83,242,0,87,245,0,89,245,0,91,245,0,109,242,0,113,242, - 0,115,242,0,117,242,73,45,245,46,242,47,242,59,245,60,245,66,242, - 80,254,98,242,102,242,106,254,112,242,115,245,118,242,120,245,122, - 251,193,242,194,242,195,242,196,242,197,242,198,242,211,254,212, - 254,213,254,214,254,215,254,217,254,225,248,226,242,227,248,228, - 248,229,248,230,242,233,248,234,242,235,242,236,248,238,254,243, - 242,244,242,245,242,246,242,247,242,249,242,250,242,251,242,252, - 242,253,242,254,251,0,1,251,0,2,242,0,3,248,0,4,242,0,5,248,0,6, - 242,0,7,242,0,21,248,0,25,242,0,27,242,0,29,242,0,49,254,0,78,254, - 0,79,242,0,82,254,0,83,242,0,87,245,0,89,245,0,91,245,0,109,242, - 0,113,242,0,115,242,0,117,242,13,45,249,47,249,66,247,193,247,194, - 247,195,247,196,247,197,247,198,247,0,2,247,0,4,247,0,6,247,13,45, - 249,47,249,66,247,193,247,194,247,195,247,196,247,197,247,198,247, - 0,2,247,0,4,247,0,6,247,13,45,249,47,249,66,247,193,247,194,247, - 195,247,196,247,197,247,198,247,0,2,247,0,4,247,0,6,247,13,45,249, - 47,249,66,247,193,247,194,247,195,247,196,247,197,247,198,247,0, - 2,247,0,4,247,0,6,247,65,45,242,46,242,47,242,59,242,60,242,66,239, - 80,251,98,243,102,238,106,251,112,238,118,242,193,239,194,239,195, - 239,196,239,197,239,198,239,211,251,212,251,213,251,214,251,215, - 251,217,251,225,243,226,243,227,243,228,243,229,243,230,243,233, - 245,234,238,235,238,236,245,238,251,243,238,244,238,245,238,246, - 238,247,238,249,238,250,242,251,242,252,242,253,242,0,2,239,0,3, - 243,0,4,239,0,5,243,0,6,239,0,7,243,0,21,245,0,25,238,0,27,238,0, - 29,238,0,49,251,0,78,251,0,79,238,0,82,251,0,83,238,0,109,242,0, - 113,242,0,115,242,0,117,242,12,66,255,193,255,194,255,195,255,196, - 255,197,255,198,255,0,2,255,0,4,255,0,6,255,1,32,24,246,15,33,245, - 101,254,115,254,116,251,119,254,0,19,254,0,87,254,0,89,254,0,91, - 254,0,93,251,0,97,251,0,99,251,1,2,25,251,1,32,25,246,11,66,255, - 193,255,194,255,195,255,196,255,197,255,198,255,0,2,255,0,4,255, - 0,6,255 + 42, 19, 66, 248, 85, 252, 87, 249, 88, 252, 90, 248, 193, 248, 194, 248, + 195, 248, + 196, 248, 197, 248, 198, 248, 222, 248, 0, 2, 248, 0, 4, 248, 0, 6, 248, + 0, 100, 252, + 0, 102, 252, 0, 122, 248, 3, 1, 32, 25, 248, 1, 32, 29, 249, 3, 1, 32, 25, + 248, 1, 32, + 29, 248, 51, 68, 248, 72, 248, 80, 249, 82, 249, 85, 241, 86, 249, 87, + 233, 88, 235, + 90, 240, 113, 253, 118, 249, 119, 240, 120, 242, 122, 245, 200, 248, 211, + 249, 212, + 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 240, 250, 249, 251, 249, 252, 249, 253, 249, 254, 245, 0, 1, + 245, 0, 8, + 248, 0, 14, 248, 0, 32, 248, 0, 36, 248, 0, 78, 249, 0, 82, 249, 0, 100, + 241, 0, 102, + 241, 0, 108, 249, 0, 109, 249, 0, 112, 249, 0, 113, 249, 0, 114, 249, 0, + 115, 249, + 0, 116, 249, 0, 117, 249, 0, 122, 240, 1, 32, 25, 245, 20, 66, 252, 86, + 255, 193, 252, + 194, 252, 195, 252, 196, 252, 197, 252, 198, 252, 218, 255, 219, 255, 220, + 255, + 221, 255, 0, 2, 252, 0, 4, 252, 0, 6, 252, 0, 108, 255, 0, 112, 255, 0, + 114, 255, 0, + 116, 255, 17, 47, 254, 66, 251, 87, 250, 88, 250, 90, 250, 193, 251, 194, + 251, 195, + 251, 196, 251, 197, 251, 198, 251, 222, 250, 0, 2, 251, 0, 4, 251, 0, 6, + 251, 0, 122, + 250, 41, 45, 242, 47, 239, 66, 242, 98, 253, 102, 253, 112, 253, 193, 242, + 194, 242, + 195, 242, 196, 242, 197, 242, 198, 242, 225, 253, 226, 253, 227, 253, 228, + 253, + 229, 253, 230, 253, 233, 253, 234, 253, 235, 253, 236, 253, 243, 253, 244, + 253, + 245, 253, 246, 253, 247, 253, 249, 253, 0, 2, 242, 0, 3, 253, 0, 4, 242, + 0, 5, 253, + 0, 6, 242, 0, 7, 253, 0, 21, 253, 0, 25, 253, 0, 27, 253, 0, 29, 253, 0, + 79, 253, 0, 83, + 253, 49, 47, 254, 66, 252, 98, 254, 102, 254, 112, 254, 118, 254, 193, + 252, 194, + 252, 195, 252, 196, 252, 197, 252, 198, 252, 225, 254, 226, 254, 227, 254, + 228, + 254, 229, 254, 230, 254, 233, 254, 234, 254, 235, 254, 236, 254, 243, 254, + 244, + 254, 245, 254, 246, 254, 247, 254, 249, 254, 250, 254, 251, 254, 252, 254, + 253, + 254, 0, 2, 252, 0, 3, 254, 0, 4, 252, 0, 5, 254, 0, 6, 252, 0, 7, 254, 0, + 21, 254, 0, 25, + 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 0, 109, 254, 0, 113, + 254, 0, 115, + 254, 0, 117, 254, 40, 80, 252, 102, 253, 112, 253, 118, 254, 122, 249, + 211, 252, + 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 233, 253, 234, 253, 235, + 253, + 236, 253, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 250, + 254, + 251, 254, 252, 254, 253, 254, 254, 249, 0, 1, 249, 0, 21, 253, 0, 25, 253, + 0, 27, 253, + 0, 29, 253, 0, 78, 252, 0, 79, 253, 0, 82, 252, 0, 83, 253, 0, 109, 254, + 0, 113, 254, + 0, 115, 254, 0, 117, 254, 14, 85, 242, 87, 242, 88, 242, 90, 242, 122, + 248, 222, 242, + 254, 248, 0, 1, 248, 0, 100, 242, 0, 102, 242, 0, 122, 242, 1, 32, 25, + 239, 1, 32, 29, + 254, 11, 66, 254, 193, 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, + 254, 0, + 2, 254, 0, 4, 254, 0, 6, 254, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, + 250, 90, 249, + 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, + 2, 250, + 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 41, 45, 242, + 47, 239, 66, + 245, 98, 255, 102, 254, 112, 254, 193, 245, 194, 245, 195, 245, 196, 245, + 197, 245, + 198, 245, 225, 255, 226, 255, 227, 255, 228, 255, 229, 255, 230, 255, 233, + 254, + 234, 254, 235, 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, + 254, + 249, 254, 0, 2, 245, 0, 3, 255, 0, 4, 245, 0, 5, 255, 0, 6, 245, 0, 7, + 255, 0, 21, 254, + 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, 11, 47, 254, + 86, 255, 218, + 255, 219, 255, 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, 255, + 0, 116, + 255, 27, 80, 252, 85, 250, 86, 252, 87, 248, 88, 251, 90, 251, 211, 252, + 212, 252, + 213, 252, 214, 252, 215, 252, 217, 252, 218, 252, 219, 252, 220, 252, 221, + 252, + 222, 251, 0, 78, 252, 0, 82, 252, 0, 100, 250, 0, 102, 250, 0, 108, 252, + 0, 112, 252, + 0, 114, 252, 0, 116, 252, 0, 122, 251, 73, 45, 245, 46, 242, 47, 242, 59, + 245, 60, + 245, 66, 242, 80, 254, 98, 242, 102, 242, 106, 254, 112, 242, 115, 245, + 118, 242, + 120, 245, 122, 251, 193, 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, + 242, + 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 248, 226, + 242, + 227, 248, 228, 248, 229, 248, 230, 242, 233, 248, 234, 242, 235, 242, 236, + 248, + 238, 254, 243, 242, 244, 242, 245, 242, 246, 242, 247, 242, 249, 242, 250, + 242, + 251, 242, 252, 242, 253, 242, 254, 251, 0, 1, 251, 0, 2, 242, 0, 3, 248, + 0, 4, 242, + 0, 5, 248, 0, 6, 242, 0, 7, 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, + 29, 242, 0, 49, + 254, 0, 78, 254, 0, 79, 242, 0, 82, 254, 0, 83, 242, 0, 87, 245, 0, 89, + 245, 0, 91, 245, + 0, 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 13, 45, 249, 47, 249, + 66, 247, + 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, 247, 0, 2, 247, 0, + 4, 247, + 0, 6, 247, 72, 45, 235, 46, 245, 47, 233, 59, 242, 60, 242, 66, 234, 72, + 252, 80, 249, + 98, 242, 102, 240, 106, 251, 112, 240, 118, 242, 193, 234, 194, 234, 195, + 234, 196, + 234, 197, 234, 198, 234, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, + 217, + 249, 225, 242, 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, 240, + 234, + 240, 235, 240, 236, 240, 237, 251, 238, 251, 239, 251, 240, 251, 243, 240, + 244, + 240, 245, 240, 246, 240, 247, 240, 249, 240, 250, 242, 251, 242, 252, 242, + 253, + 242, 0, 2, 234, 0, 3, 242, 0, 4, 234, 0, 5, 242, 0, 6, 234, 0, 7, 242, 0, + 21, 240, 0, 25, + 240, 0, 27, 240, 0, 29, 240, 0, 32, 252, 0, 36, 252, 0, 45, 251, 0, 49, + 251, 0, 78, 249, + 0, 79, 240, 0, 82, 249, 0, 83, 240, 0, 109, 242, 0, 113, 242, 0, 115, 242, + 0, 117, 242, + 68, 45, 242, 46, 251, 47, 242, 59, 248, 60, 248, 66, 237, 80, 255, 98, + 246, 102, 246, + 106, 254, 112, 244, 118, 249, 122, 247, 193, 237, 194, 237, 195, 237, 196, + 237, + 197, 237, 198, 237, 211, 255, 212, 255, 213, 255, 214, 255, 215, 255, 217, + 255, + 225, 246, 226, 246, 227, 246, 228, 246, 229, 246, 230, 246, 233, 246, 234, + 246, + 235, 246, 236, 246, 238, 254, 243, 244, 244, 244, 245, 244, 246, 244, 247, + 244, + 249, 244, 250, 249, 251, 249, 252, 249, 253, 249, 254, 247, 0, 1, 247, 0, + 2, 237, + 0, 3, 246, 0, 4, 237, 0, 5, 246, 0, 6, 237, 0, 7, 246, 0, 21, 246, 0, 25, + 246, 0, 27, 246, + 0, 29, 246, 0, 49, 254, 0, 78, 255, 0, 79, 244, 0, 82, 255, 0, 83, 244, 0, + 109, 249, + 0, 113, 249, 0, 115, 249, 0, 117, 249, 65, 45, 242, 46, 242, 47, 242, 59, + 242, 60, + 242, 66, 239, 80, 251, 98, 243, 102, 238, 106, 251, 112, 238, 118, 242, + 193, 239, + 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, 251, 212, 251, 213, + 251, + 214, 251, 215, 251, 217, 251, 225, 243, 226, 243, 227, 243, 228, 243, 229, + 243, + 230, 243, 233, 245, 234, 238, 235, 238, 236, 245, 238, 251, 243, 238, 244, + 238, + 245, 238, 246, 238, 247, 238, 249, 238, 250, 242, 251, 242, 252, 242, 253, + 242, + 0, 2, 239, 0, 3, 243, 0, 4, 239, 0, 5, 243, 0, 6, 239, 0, 7, 243, 0, 21, + 245, 0, 25, 238, + 0, 27, 238, 0, 29, 238, 0, 49, 251, 0, 78, 251, 0, 79, 238, 0, 82, 251, 0, + 83, 238, 0, + 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 2, 119, 253, 13, 47, 250, + 99, 255, + 118, 254, 119, 254, 250, 254, 251, 254, 252, 254, 253, 254, 0, 109, 254, + 0, 113, + 254, 0, 115, 254, 0, 117, 254, 2, 120, 254, 2, 119, 254, 16, 45, 254, 47, + 254, 106, + 253, 112, 253, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, + 0, 51, + 251, 0, 79, 253, 0, 83, 253, 1, 32, 25, 9, 1, 32, 29, 8, 2, 47, 254, 4, + 122, 254, 254, + 254, 0, 1, 254, 2, 119, 255, 22, 102, 255, 112, 254, 122, 254, 233, 255, + 234, 255, + 235, 255, 236, 255, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, + 254, + 254, 254, 0, 1, 254, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, + 79, 254, 0, 83, + 254, 2, 119, 250, 3, 119, 255, 120, 255, 37, 45, 242, 46, 251, 47, 240, + 100, 254, + 102, 254, 104, 255, 111, 254, 112, 254, 113, 255, 114, 254, 119, 255, 232, + 254, + 233, 254, 234, 254, 235, 254, 236, 254, 242, 254, 243, 254, 244, 254, 245, + 254, + 246, 254, 247, 254, 249, 254, 0, 9, 254, 0, 15, 254, 0, 21, 254, 0, 25, + 254, 0, 27, + 254, 0, 29, 254, 0, 33, 255, 0, 37, 255, 0, 70, 254, 0, 72, 254, 0, 74, + 254, 0, 79, 254, + 0, 83, 254, 31, 45, 248, 47, 245, 98, 255, 102, 255, 112, 255, 225, 255, + 226, 255, + 227, 255, 228, 255, 229, 255, 230, 255, 233, 255, 234, 255, 235, 255, 236, + 255, + 243, 255, 244, 255, 245, 255, 246, 255, 247, 255, 249, 255, 0, 3, 255, 0, + 5, 255, + 0, 7, 255, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 255, 0, + 83, 255, 12, + 45, 248, 47, 245, 112, 255, 243, 255, 244, 255, 245, 255, 246, 255, 247, + 255, 249, + 255, 0, 79, 255, 0, 83, 255, 21, 45, 248, 47, 245, 102, 255, 112, 253, + 233, 255, 234, + 255, 235, 255, 236, 255, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, + 249, + 253, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 253, 0, 83, + 253, 51, 68, + 248, 72, 248, 80, 249, 82, 249, 85, 241, 86, 249, 87, 233, 88, 235, 90, + 240, 113, + 253, 118, 249, 119, 240, 120, 242, 122, 245, 200, 248, 211, 249, 212, 249, + 213, + 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 240, 250, 249, 251, 249, 252, 249, 253, 249, 254, 245, 0, 1, 245, 0, 8, + 248, 0, 14, + 248, 0, 32, 248, 0, 36, 248, 0, 78, 249, 0, 82, 249, 0, 100, 241, 0, 102, + 241, 0, 108, + 249, 0, 109, 249, 0, 112, 249, 0, 113, 249, 0, 114, 249, 0, 115, 249, 0, + 116, 249, + 0, 117, 249, 0, 122, 240, 1, 32, 25, 245, 51, 68, 248, 72, 248, 80, 249, + 82, 249, 85, + 241, 86, 249, 87, 233, 88, 235, 90, 240, 113, 253, 118, 249, 119, 240, + 120, 242, + 122, 245, 200, 248, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, + 249, + 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 249, 251, 249, 252, + 249, + 253, 249, 254, 245, 0, 1, 245, 0, 8, 248, 0, 14, 248, 0, 32, 248, 0, 36, + 248, 0, 78, + 249, 0, 82, 249, 0, 100, 241, 0, 102, 241, 0, 108, 249, 0, 109, 249, 0, + 112, 249, 0, + 113, 249, 0, 114, 249, 0, 115, 249, 0, 116, 249, 0, 117, 249, 0, 122, 240, + 1, 32, 25, + 245, 51, 68, 248, 72, 248, 80, 249, 82, 249, 85, 241, 86, 249, 87, 233, + 88, 235, 90, + 240, 113, 253, 118, 249, 119, 240, 120, 242, 122, 245, 200, 248, 211, 249, + 212, + 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, + 221, + 249, 222, 240, 250, 249, 251, 249, 252, 249, 253, 249, 254, 245, 0, 1, + 245, 0, 8, + 248, 0, 14, 248, 0, 32, 248, 0, 36, 248, 0, 78, 249, 0, 82, 249, 0, 100, + 241, 0, 102, + 241, 0, 108, 249, 0, 109, 249, 0, 112, 249, 0, 113, 249, 0, 114, 249, 0, + 115, 249, + 0, 116, 249, 0, 117, 249, 0, 122, 240, 1, 32, 25, 245, 51, 68, 248, 72, + 248, 80, 249, + 82, 249, 85, 241, 86, 249, 87, 233, 88, 235, 90, 240, 113, 253, 118, 249, + 119, 240, + 120, 242, 122, 245, 200, 248, 211, 249, 212, 249, 213, 249, 214, 249, 215, + 249, + 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 249, 251, + 249, + 252, 249, 253, 249, 254, 245, 0, 1, 245, 0, 8, 248, 0, 14, 248, 0, 32, + 248, 0, 36, 248, + 0, 78, 249, 0, 82, 249, 0, 100, 241, 0, 102, 241, 0, 108, 249, 0, 109, + 249, 0, 112, + 249, 0, 113, 249, 0, 114, 249, 0, 115, 249, 0, 116, 249, 0, 117, 249, 0, + 122, 240, + 1, 32, 25, 245, 51, 68, 248, 72, 248, 80, 249, 82, 249, 85, 241, 86, 249, + 87, 233, + 88, 235, 90, 240, 113, 253, 118, 249, 119, 240, 120, 242, 122, 245, 200, + 248, 211, + 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, + 220, + 249, 221, 249, 222, 240, 250, 249, 251, 249, 252, 249, 253, 249, 254, 245, + 0, 1, + 245, 0, 8, 248, 0, 14, 248, 0, 32, 248, 0, 36, 248, 0, 78, 249, 0, 82, + 249, 0, 100, 241, + 0, 102, 241, 0, 108, 249, 0, 109, 249, 0, 112, 249, 0, 113, 249, 0, 114, + 249, 0, 115, + 249, 0, 116, 249, 0, 117, 249, 0, 122, 240, 1, 32, 25, 245, 51, 68, 248, + 72, 248, 80, + 249, 82, 249, 85, 241, 86, 249, 87, 233, 88, 235, 90, 240, 113, 253, 118, + 249, 119, + 240, 120, 242, 122, 245, 200, 248, 211, 249, 212, 249, 213, 249, 214, 249, + 215, + 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 249, + 251, + 249, 252, 249, 253, 249, 254, 245, 0, 1, 245, 0, 8, 248, 0, 14, 248, 0, + 32, 248, 0, + 36, 248, 0, 78, 249, 0, 82, 249, 0, 100, 241, 0, 102, 241, 0, 108, 249, 0, + 109, 249, + 0, 112, 249, 0, 113, 249, 0, 114, 249, 0, 115, 249, 0, 116, 249, 0, 117, + 249, 0, 122, + 240, 1, 32, 25, 245, 11, 66, 254, 193, 254, 194, 254, 195, 254, 196, 254, + 197, 254, + 198, 254, 0, 2, 254, 0, 4, 254, 0, 6, 254, 20, 66, 250, 85, 250, 87, 249, + 88, 249, 89, + 250, 90, 249, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, + 222, 249, + 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, + 20, 66, 250, + 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, 193, 250, 194, 250, 195, 250, + 196, 250, + 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, + 250, 0, 102, + 250, 0, 122, 249, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, 90, + 249, 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, + 4, 250, + 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, 66, 250, 85, 250, + 87, 249, 88, + 249, 89, 250, 90, 249, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, + 198, 250, + 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, + 122, 249, 20, + 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, 193, 250, 194, 250, + 195, 250, + 196, 250, 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, + 0, 100, 250, + 0, 102, 250, 0, 122, 249, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, + 90, 249, + 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, + 2, 250, + 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 13, 45, 249, + 47, 249, 66, + 247, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, 247, 0, 2, + 247, 0, 4, + 247, 0, 6, 247, 13, 45, 249, 47, 249, 66, 247, 193, 247, 194, 247, 195, + 247, 196, + 247, 197, 247, 198, 247, 0, 2, 247, 0, 4, 247, 0, 6, 247, 13, 45, 249, 47, + 249, 66, + 247, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, 247, 0, 2, + 247, 0, 4, + 247, 0, 6, 247, 13, 45, 249, 47, 249, 66, 247, 193, 247, 194, 247, 195, + 247, 196, + 247, 197, 247, 198, 247, 0, 2, 247, 0, 4, 247, 0, 6, 247, 65, 45, 242, 46, + 242, 47, + 242, 59, 242, 60, 242, 66, 239, 80, 251, 98, 243, 102, 238, 106, 251, 112, + 238, 118, + 242, 193, 239, 194, 239, 195, 239, 196, 239, 197, 239, 198, 239, 211, 251, + 212, + 251, 213, 251, 214, 251, 215, 251, 217, 251, 225, 243, 226, 243, 227, 243, + 228, + 243, 229, 243, 230, 243, 233, 245, 234, 238, 235, 238, 236, 245, 238, 251, + 243, + 238, 244, 238, 245, 238, 246, 238, 247, 238, 249, 238, 250, 242, 251, 242, + 252, + 242, 253, 242, 0, 2, 239, 0, 3, 243, 0, 4, 239, 0, 5, 243, 0, 6, 239, 0, + 7, 243, 0, 21, + 245, 0, 25, 238, 0, 27, 238, 0, 29, 238, 0, 49, 251, 0, 78, 251, 0, 79, + 238, 0, 82, 251, + 0, 83, 238, 0, 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 2, 119, + 253, 2, 119, + 253, 2, 119, 253, 2, 119, 253, 2, 119, 253, 2, 119, 253, 2, 119, 254, 2, + 119, 254, + 2, 119, 254, 2, 119, 254, 2, 119, 255, 2, 119, 255, 2, 119, 255, 2, 119, + 255, 2, 119, + 250, 3, 119, 255, 120, 255, 3, 119, 255, 120, 255, 3, 119, 255, 120, 255, + 3, 119, + 255, 120, 255, 3, 119, 255, 120, 255, 3, 119, 255, 120, 255, 21, 45, 248, + 47, 245, + 102, 255, 112, 253, 233, 255, 234, 255, 235, 255, 236, 255, 243, 253, 244, + 253, + 245, 253, 246, 253, 247, 253, 249, 253, 0, 21, 255, 0, 25, 255, 0, 27, + 255, 0, 29, + 255, 0, 79, 253, 0, 83, 253, 21, 45, 248, 47, 245, 102, 255, 112, 253, + 233, 255, 234, + 255, 235, 255, 236, 255, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, + 249, + 253, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 253, 0, 83, + 253, 51, 68, + 248, 72, 248, 80, 249, 82, 249, 85, 241, 86, 249, 87, 233, 88, 235, 90, + 240, 113, + 253, 118, 249, 119, 240, 120, 242, 122, 245, 200, 248, 211, 249, 212, 249, + 213, + 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 240, 250, 249, 251, 249, 252, 249, 253, 249, 254, 245, 0, 1, 245, 0, 8, + 248, 0, 14, + 248, 0, 32, 248, 0, 36, 248, 0, 78, 249, 0, 82, 249, 0, 100, 241, 0, 102, + 241, 0, 108, + 249, 0, 109, 249, 0, 112, 249, 0, 113, 249, 0, 114, 249, 0, 115, 249, 0, + 116, 249, + 0, 117, 249, 0, 122, 240, 1, 32, 25, 245, 2, 119, 253, 51, 68, 248, 72, + 248, 80, 249, + 82, 249, 85, 241, 86, 249, 87, 233, 88, 235, 90, 240, 113, 253, 118, 249, + 119, 240, + 120, 242, 122, 245, 200, 248, 211, 249, 212, 249, 213, 249, 214, 249, 215, + 249, + 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 240, 250, 249, 251, + 249, + 252, 249, 253, 249, 254, 245, 0, 1, 245, 0, 8, 248, 0, 14, 248, 0, 32, + 248, 0, 36, 248, + 0, 78, 249, 0, 82, 249, 0, 100, 241, 0, 102, 241, 0, 108, 249, 0, 109, + 249, 0, 112, + 249, 0, 113, 249, 0, 114, 249, 0, 115, 249, 0, 116, 249, 0, 117, 249, 0, + 122, 240, + 1, 32, 25, 245, 2, 119, 253, 51, 68, 248, 72, 248, 80, 249, 82, 249, 85, + 241, 86, 249, + 87, 233, 88, 235, 90, 240, 113, 253, 118, 249, 119, 240, 120, 242, 122, + 251, 200, + 248, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, 249, + 219, + 249, 220, 249, 221, 249, 222, 240, 250, 249, 251, 249, 252, 249, 253, 249, + 254, + 251, 0, 1, 251, 0, 8, 248, 0, 14, 248, 0, 32, 248, 0, 36, 248, 0, 78, 249, + 0, 82, 249, + 0, 100, 241, 0, 102, 241, 0, 108, 249, 0, 109, 249, 0, 112, 249, 0, 113, + 249, 0, 114, + 249, 0, 115, 249, 0, 116, 249, 0, 117, 249, 0, 122, 240, 1, 32, 25, 245, + 2, 119, 253, + 17, 47, 254, 66, 251, 87, 250, 88, 250, 90, 250, 193, 251, 194, 251, 195, + 251, 196, + 251, 197, 251, 198, 251, 222, 250, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, + 122, 250, 17, + 47, 254, 66, 251, 87, 250, 88, 250, 90, 250, 193, 251, 194, 251, 195, 251, + 196, 251, + 197, 251, 198, 251, 222, 250, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, 122, + 250, 2, 120, + 254, 2, 119, 254, 2, 119, 254, 2, 119, 254, 2, 119, 254, 2, 47, 254, 2, + 47, 254, 2, + 119, 255, 2, 119, 255, 40, 80, 252, 102, 253, 112, 253, 118, 254, 122, + 249, 211, + 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 233, 253, 234, 253, + 235, + 253, 236, 253, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, + 250, + 254, 251, 254, 252, 254, 253, 254, 254, 249, 0, 1, 249, 0, 21, 253, 0, 25, + 253, 0, + 27, 253, 0, 29, 253, 0, 78, 252, 0, 79, 253, 0, 82, 252, 0, 83, 253, 0, + 109, 254, 0, + 113, 254, 0, 115, 254, 0, 117, 254, 22, 102, 255, 112, 254, 122, 254, 233, + 255, 234, + 255, 235, 255, 236, 255, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, + 249, + 254, 254, 254, 0, 1, 254, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, + 0, 79, 254, + 0, 83, 254, 14, 85, 242, 87, 242, 88, 242, 90, 242, 122, 248, 222, 242, + 254, 248, + 0, 1, 248, 0, 100, 242, 0, 102, 242, 0, 122, 242, 1, 32, 25, 239, 1, 32, + 29, 254, 14, + 85, 242, 87, 242, 88, 242, 90, 242, 122, 248, 222, 242, 254, 248, 0, 1, + 248, 0, 100, + 242, 0, 102, 242, 0, 122, 242, 1, 32, 25, 239, 1, 32, 29, 254, 14, 85, + 242, 87, 242, + 88, 242, 90, 242, 122, 248, 222, 242, 254, 248, 0, 1, 248, 0, 100, 242, 0, + 102, 242, + 0, 122, 242, 1, 32, 25, 239, 1, 32, 29, 254, 11, 66, 254, 193, 254, 194, + 254, 195, + 254, 196, 254, 197, 254, 198, 254, 0, 2, 254, 0, 4, 254, 0, 6, 254, 2, + 119, 250, 11, + 66, 254, 193, 254, 194, 254, 195, 254, 196, 254, 197, 254, 198, 254, 0, 2, + 254, 0, + 4, 254, 0, 6, 254, 2, 119, 250, 11, 66, 254, 193, 254, 194, 254, 195, 254, + 196, 254, + 197, 254, 198, 254, 0, 2, 254, 0, 4, 254, 0, 6, 254, 2, 119, 250, 20, 66, + 250, 85, 250, + 87, 249, 88, 249, 89, 250, 90, 249, 193, 250, 194, 250, 195, 250, 196, + 250, 197, + 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, + 102, 250, + 0, 122, 249, 3, 119, 255, 120, 255, 20, 66, 250, 85, 250, 87, 249, 88, + 249, 89, 250, + 90, 249, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, + 249, 0, + 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 3, + 119, 255, 120, + 255, 27, 80, 252, 85, 250, 86, 252, 87, 248, 88, 251, 90, 251, 211, 252, + 212, 252, + 213, 252, 214, 252, 215, 252, 217, 252, 218, 252, 219, 252, 220, 252, 221, + 252, + 222, 251, 0, 78, 252, 0, 82, 252, 0, 100, 250, 0, 102, 250, 0, 108, 252, + 0, 112, 252, + 0, 114, 252, 0, 116, 252, 0, 122, 251, 37, 45, 242, 46, 251, 47, 240, 100, + 254, 102, + 254, 104, 255, 111, 254, 112, 254, 113, 255, 114, 254, 119, 255, 232, 254, + 233, + 254, 234, 254, 235, 254, 236, 254, 242, 254, 243, 254, 244, 254, 245, 254, + 246, + 254, 247, 254, 249, 254, 0, 9, 254, 0, 15, 254, 0, 21, 254, 0, 25, 254, 0, + 27, 254, + 0, 29, 254, 0, 33, 255, 0, 37, 255, 0, 70, 254, 0, 72, 254, 0, 74, 254, 0, + 79, 254, 0, + 83, 254, 27, 80, 252, 85, 250, 86, 252, 87, 248, 88, 251, 90, 251, 211, + 252, 212, + 252, 213, 252, 214, 252, 215, 252, 217, 252, 218, 252, 219, 252, 220, 252, + 221, + 252, 222, 251, 0, 78, 252, 0, 82, 252, 0, 100, 250, 0, 102, 250, 0, 108, + 252, 0, 112, + 252, 0, 114, 252, 0, 116, 252, 0, 122, 251, 37, 45, 242, 46, 251, 47, 240, + 100, 254, + 102, 254, 104, 255, 111, 254, 112, 254, 113, 255, 114, 254, 119, 255, 232, + 254, + 233, 254, 234, 254, 235, 254, 236, 254, 242, 254, 243, 254, 244, 254, 245, + 254, + 246, 254, 247, 254, 249, 254, 0, 9, 254, 0, 15, 254, 0, 21, 254, 0, 25, + 254, 0, 27, + 254, 0, 29, 254, 0, 33, 255, 0, 37, 255, 0, 70, 254, 0, 72, 254, 0, 74, + 254, 0, 79, 254, + 0, 83, 254, 27, 80, 252, 85, 250, 86, 252, 87, 248, 88, 251, 90, 251, 211, + 252, 212, + 252, 213, 252, 214, 252, 215, 252, 217, 252, 218, 252, 219, 252, 220, 252, + 221, + 252, 222, 251, 0, 78, 252, 0, 82, 252, 0, 100, 250, 0, 102, 250, 0, 108, + 252, 0, 112, + 252, 0, 114, 252, 0, 116, 252, 0, 122, 251, 37, 45, 242, 46, 251, 47, 240, + 100, 254, + 102, 254, 104, 255, 111, 254, 112, 254, 113, 255, 114, 254, 119, 255, 232, + 254, + 233, 254, 234, 254, 235, 254, 236, 254, 242, 254, 243, 254, 244, 254, 245, + 254, + 246, 254, 247, 254, 249, 254, 0, 9, 254, 0, 15, 254, 0, 21, 254, 0, 25, + 254, 0, 27, + 254, 0, 29, 254, 0, 33, 255, 0, 37, 255, 0, 70, 254, 0, 72, 254, 0, 74, + 254, 0, 79, 254, + 0, 83, 254, 73, 45, 245, 46, 242, 47, 242, 59, 245, 60, 245, 66, 242, 80, + 254, 98, + 242, 102, 242, 106, 254, 112, 242, 115, 245, 118, 242, 120, 245, 122, 251, + 193, + 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, 242, 211, 254, 212, 254, + 213, + 254, 214, 254, 215, 254, 217, 254, 225, 248, 226, 242, 227, 248, 228, 248, + 229, + 248, 230, 242, 233, 248, 234, 242, 235, 242, 236, 248, 238, 254, 243, 242, + 244, + 242, 245, 242, 246, 242, 247, 242, 249, 242, 250, 242, 251, 242, 252, 242, + 253, + 242, 254, 251, 0, 1, 251, 0, 2, 242, 0, 3, 248, 0, 4, 242, 0, 5, 248, 0, + 6, 242, 0, 7, + 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, 29, 242, 0, 49, 254, 0, 78, + 254, 0, 79, 242, + 0, 82, 254, 0, 83, 242, 0, 87, 245, 0, 89, 245, 0, 91, 245, 0, 109, 242, + 0, 113, 242, + 0, 115, 242, 0, 117, 242, 73, 45, 245, 46, 242, 47, 242, 59, 245, 60, 245, + 66, 242, + 80, 254, 98, 242, 102, 242, 106, 254, 112, 242, 115, 245, 118, 242, 120, + 245, 122, + 251, 193, 242, 194, 242, 195, 242, 196, 242, 197, 242, 198, 242, 211, 254, + 212, + 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 248, 226, 242, 227, 248, + 228, + 248, 229, 248, 230, 242, 233, 248, 234, 242, 235, 242, 236, 248, 238, 254, + 243, + 242, 244, 242, 245, 242, 246, 242, 247, 242, 249, 242, 250, 242, 251, 242, + 252, + 242, 253, 242, 254, 251, 0, 1, 251, 0, 2, 242, 0, 3, 248, 0, 4, 242, 0, 5, + 248, 0, 6, + 242, 0, 7, 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, 29, 242, 0, 49, + 254, 0, 78, 254, + 0, 79, 242, 0, 82, 254, 0, 83, 242, 0, 87, 245, 0, 89, 245, 0, 91, 245, 0, + 109, 242, + 0, 113, 242, 0, 115, 242, 0, 117, 242, 13, 45, 249, 47, 249, 66, 247, 193, + 247, 194, + 247, 195, 247, 196, 247, 197, 247, 198, 247, 0, 2, 247, 0, 4, 247, 0, 6, + 247, 13, 45, + 249, 47, 249, 66, 247, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, + 198, 247, + 0, 2, 247, 0, 4, 247, 0, 6, 247, 13, 45, 249, 47, 249, 66, 247, 193, 247, + 194, 247, + 195, 247, 196, 247, 197, 247, 198, 247, 0, 2, 247, 0, 4, 247, 0, 6, 247, + 13, 45, 249, + 47, 249, 66, 247, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, + 247, 0, + 2, 247, 0, 4, 247, 0, 6, 247, 65, 45, 242, 46, 242, 47, 242, 59, 242, 60, + 242, 66, 239, + 80, 251, 98, 243, 102, 238, 106, 251, 112, 238, 118, 242, 193, 239, 194, + 239, 195, + 239, 196, 239, 197, 239, 198, 239, 211, 251, 212, 251, 213, 251, 214, 251, + 215, + 251, 217, 251, 225, 243, 226, 243, 227, 243, 228, 243, 229, 243, 230, 243, + 233, + 245, 234, 238, 235, 238, 236, 245, 238, 251, 243, 238, 244, 238, 245, 238, + 246, + 238, 247, 238, 249, 238, 250, 242, 251, 242, 252, 242, 253, 242, 0, 2, + 239, 0, 3, + 243, 0, 4, 239, 0, 5, 243, 0, 6, 239, 0, 7, 243, 0, 21, 245, 0, 25, 238, + 0, 27, 238, 0, + 29, 238, 0, 49, 251, 0, 78, 251, 0, 79, 238, 0, 82, 251, 0, 83, 238, 0, + 109, 242, 0, + 113, 242, 0, 115, 242, 0, 117, 242, 12, 66, 255, 193, 255, 194, 255, 195, + 255, 196, + 255, 197, 255, 198, 255, 0, 2, 255, 0, 4, 255, 0, 6, 255, 1, 32, 24, 246, + 15, 33, 245, + 101, 254, 115, 254, 116, 251, 119, 254, 0, 19, 254, 0, 87, 254, 0, 89, + 254, 0, 91, + 254, 0, 93, 251, 0, 97, 251, 0, 99, 251, 1, 2, 25, 251, 1, 32, 25, 246, + 11, 66, 255, + 193, 255, 194, 255, 195, 255, 196, 255, 197, 255, 198, 255, 0, 2, 255, 0, + 4, 255, + 0, 6, 255 }; static afm_cuint16 afm_Times_Bold_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Times_Bold_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Times_Bold_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -2209,325 +4213,631 @@ static afm_cunicode afm_Times_Bold_ligatures[] = { /* 3 */ /* FullName: Times Bold Italic */ /* FamilyName: Times */ static afm_cuint8 afm_Times_BoldItalic_widths[] = { /* 315 */ - 42,65,93,83,83,139,130,46,56,56,83,95,42,56,42,46,83,83,83,83,83, - 83,83,83,83,83,56,56,95,95,95,83,139,111,111,111,120,111,111,120, - 130,65,83,111,102,148,120,120,102,120,111,93,102,120,111,148,111, - 102,102,56,46,56,95,83,56,83,83,74,83,74,56,83,93,46,46,83,46,130, - 93,83,83,83,65,65,46,93,74,111,83,74,65,58,37,58,95,65,83,83,83, - 83,37,83,56,125,44,83,101,125,56,67,95,50,50,56,96,83,42,56,50,50, - 83,125,125,125,83,111,111,111,111,111,111,157,111,111,111,111,111, - 65,65,65,65,120,120,120,120,120,120,120,95,120,120,120,120,120,102, - 102,83,83,83,83,83,83,83,120,74,74,74,74,74,46,46,46,46,83,93,83, - 83,83,83,83,95,83,93,93,93,93,74,83,74,111,83,111,83,111,83,111, - 74,111,74,120,101,120,83,111,74,111,74,111,74,111,74,120,83,120, - 83,65,46,65,46,65,46,111,83,102,46,102,46,102,64,102,46,120,93,120, - 93,120,93,120,83,120,83,157,120,111,65,111,65,111,65,93,65,93,65, - 93,65,102,46,102,61,120,93,120,93,120,93,120,93,102,102,65,102,65, - 102,65,83,93,65,56,56,56,56,56,56,56,56,83,167,56,56,56,83,83,83, - 83,83,58,167,167,56,56,28,83,167,82,102,100,101,92,92,92,92,82,42, - 93,93 + 42, 65, 93, 83, 83, 139, 130, 46, 56, 56, 83, 95, 42, 56, 42, 46, 83, 83, + 83, 83, 83, + 83, 83, 83, 83, 83, 56, 56, 95, 95, 95, 83, 139, 111, 111, 111, 120, 111, + 111, 120, + 130, 65, 83, 111, 102, 148, 120, 120, 102, 120, 111, 93, 102, 120, 111, + 148, 111, + 102, 102, 56, 46, 56, 95, 83, 56, 83, 83, 74, 83, 74, 56, 83, 93, 46, 46, + 83, 46, 130, + 93, 83, 83, 83, 65, 65, 46, 93, 74, 111, 83, 74, 65, 58, 37, 58, 95, 65, + 83, 83, 83, + 83, 37, 83, 56, 125, 44, 83, 101, 125, 56, 67, 95, 50, 50, 56, 96, 83, 42, + 56, 50, 50, + 83, 125, 125, 125, 83, 111, 111, 111, 111, 111, 111, 157, 111, 111, 111, + 111, 111, + 65, 65, 65, 65, 120, 120, 120, 120, 120, 120, 120, 95, 120, 120, 120, 120, + 120, 102, + 102, 83, 83, 83, 83, 83, 83, 83, 120, 74, 74, 74, 74, 74, 46, 46, 46, 46, + 83, 93, 83, + 83, 83, 83, 83, 95, 83, 93, 93, 93, 93, 74, 83, 74, 111, 83, 111, 83, 111, + 83, 111, + 74, 111, 74, 120, 101, 120, 83, 111, 74, 111, 74, 111, 74, 111, 74, 120, + 83, 120, + 83, 65, 46, 65, 46, 65, 46, 111, 83, 102, 46, 102, 46, 102, 64, 102, 46, + 120, 93, 120, + 93, 120, 93, 120, 83, 120, 83, 157, 120, 111, 65, 111, 65, 111, 65, 93, + 65, 93, 65, + 93, 65, 102, 46, 102, 61, 120, 93, 120, 93, 120, 93, 120, 93, 102, 102, + 65, 102, 65, + 102, 65, 83, 93, 65, 56, 56, 56, 56, 56, 56, 56, 56, 83, 167, 56, 56, 56, + 83, 83, 83, + 83, 83, 58, 167, 167, 56, 56, 28, 83, 167, 82, 102, 100, 101, 92, 92, 92, + 92, 82, 42, + 93, 93 }; -static afm_sint16 afm_Times_BoldItalic_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,36,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,54,173,0,219,0,254,0,0,0,374,489,581,0,612,636,681,774,797,0, - 859,1027,1051,1207,0,1362,0,0,0,0,0,0,0,0,1510,1537,0,1545,1548, - 0,0,0,0,1587,0,0,1630,1633,0,0,1647,0,0,0,1652,1699,1769,1792,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,1797,1916,2035,2154,2273,2392,0,0,0,0,0,0,0,0,0,0,0,2511,2535, - 2580,2625,2670,2715,0,2760,2805,2829,2853,2877,2901,0,0,0,0,0,0, - 0,0,0,3049,3057,3060,3063,3066,0,0,0,0,0,3069,3072,3086,3100,3114, - 3128,0,3142,0,0,0,0,3156,0,3161,3166,0,3285,0,3404,0,0,3523,0,3531, - 3539,0,3574,0,0,3609,0,3612,0,3615,0,3618,0,0,0,0,0,0,0,0,0,0,3621, - 3713,3756,0,3787,0,0,0,3818,0,3849,3873,3876,3900,3903,3927,3930, - 3975,3989,4034,0,0,4048,4110,4115,4177,4182,4244,0,0,0,0,0,0,4249, - 0,4417,0,4585,0,4609,0,4633,0,4657,0,4681,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,4829,4834,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0 +static afm_sint16 afm_Times_BoldItalic_kerning_index[] = { /* 315 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 54, 173, 0, 219, 0, 254, 0, 0, 0, 374, 489, 581, 0, 612, 636, 681, + 774, 797, 0, + 859, 1027, 1051, 1207, 0, 1362, 0, 0, 0, 0, 0, 0, 0, 0, 1510, 1537, 0, + 1545, 1548, + 0, 0, 0, 0, 1587, 0, 0, 1630, 1633, 0, 0, 1647, 0, 0, 0, 1652, 1699, 1769, + 1792, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1797, 1916, 2035, 2154, 2273, 2392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2511, 2535, + 2580, 2625, 2670, 2715, 0, 2760, 2805, 2829, 2853, 2877, 2901, 0, 0, 0, 0, + 0, 0, + 0, 0, 0, 3049, 3057, 3060, 3063, 3066, 0, 0, 0, 0, 0, 3069, 3072, 3086, + 3100, 3114, + 3128, 0, 3142, 0, 0, 0, 0, 3156, 0, 3161, 3166, 0, 3285, 0, 3404, 0, 0, + 3523, 0, 3531, + 3539, 0, 3574, 0, 0, 3609, 0, 3612, 0, 3615, 0, 3618, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 3621, + 3713, 3756, 0, 3787, 0, 0, 0, 3818, 0, 3849, 3873, 3876, 3900, 3903, 3927, + 3930, + 3975, 3989, 4034, 0, 0, 4048, 4110, 4115, 4177, 4182, 4244, 0, 0, 0, 0, 0, + 0, 4249, + 0, 4417, 0, 4585, 0, 4609, 0, 4633, 0, 4657, 0, 4681, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4829, 4834, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 }; -static afm_cuint8 afm_Times_BoldItalic_kerning_data[] = { /* 4879 */ - 42,16,66,251,87,245,88,245,90,245,193,251,194,251,195,251,196,251, - 197,251,198,251,222,245,0,2,251,0,4,251,0,6,251,0,122,245,3,1,32, - 25,241,1,32,29,241,3,1,32,25,241,1,32,29,241,50,68,246,72,247,80, - 249,82,248,85,248,86,249,87,241,88,240,90,245,118,252,119,245,120, - 245,122,245,200,246,211,249,212,249,213,249,214,249,215,249,217, - 249,218,249,219,249,220,249,221,249,222,245,250,252,251,252,252, - 252,253,252,254,245,0,1,245,0,8,246,0,14,246,0,32,247,0,36,247,0, - 78,249,0,82,249,0,100,248,0,102,248,0,108,249,0,109,252,0,112,249, - 0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,245,1,32, - 25,245,20,66,253,86,255,193,253,194,253,195,253,196,253,197,253, - 198,253,218,255,219,255,220,255,221,255,0,2,253,0,4,253,0,6,253, - 0,108,255,0,112,255,0,114,255,0,116,255,16,66,253,87,249,88,250, - 90,249,193,253,194,253,195,253,196,253,197,253,198,253,222,249,0, - 2,253,0,4,253,0,6,253,0,122,249,52,45,235,47,235,66,240,98,241,102, - 240,106,250,112,245,115,249,193,240,194,240,195,240,196,240,197, - 240,198,240,225,241,226,241,227,241,228,241,229,241,230,241,233, - 240,234,240,235,240,236,240,237,250,238,250,239,250,240,250,243, - 245,244,245,245,245,246,245,247,245,249,245,0,2,240,0,3,241,0,4, - 240,0,5,241,0,6,240,0,7,241,0,21,240,0,25,240,0,27,240,0,29,240, - 0,45,250,0,49,250,0,79,245,0,83,245,0,87,249,0,89,249,0,91,249,50, - 45,255,47,255,66,253,98,250,102,250,112,250,118,250,193,253,194, - 253,195,253,196,253,197,253,198,253,225,250,226,250,227,250,228, - 250,229,250,230,250,233,250,234,250,235,250,236,250,243,250,244, - 250,245,250,246,250,247,250,249,250,250,250,251,250,252,250,253, - 250,0,2,253,0,3,250,0,4,253,0,5,250,0,6,253,0,7,250,0,21,250,0,25, - 250,0,27,250,0,29,250,0,79,250,0,83,250,0,109,250,0,113,250,0,115, - 250,0,117,250,40,80,252,102,253,112,253,118,254,122,254,211,252, - 212,252,213,252,214,252,215,252,217,252,233,253,234,253,235,253, - 236,253,243,253,244,253,245,253,246,253,247,253,249,253,250,254, - 251,254,252,254,253,254,254,254,0,1,254,0,21,253,0,25,253,0,27,253, - 0,29,253,0,78,252,0,79,253,0,82,252,0,83,253,0,109,254,0,113,254, - 0,115,254,0,117,254,13,85,254,87,251,88,251,90,251,122,251,222,251, - 254,251,0,1,251,0,100,254,0,102,254,0,122,251,1,32,25,248,11,66, - 252,193,252,194,252,195,252,196,252,197,252,198,252,0,2,252,0,4, - 252,0,6,252,20,66,250,85,250,87,249,88,249,89,250,90,249,193,250, - 194,250,195,250,196,250,197,250,198,250,222,249,0,2,250,0,4,250, - 0,6,250,0,100,250,0,102,250,0,122,249,41,45,235,47,235,66,243,98, - 250,102,249,112,248,193,243,194,243,195,243,196,243,197,243,198, - 243,225,250,226,250,227,250,228,250,229,250,230,250,233,249,234, - 249,235,249,236,249,243,248,244,248,245,248,246,248,247,248,249, - 248,0,2,243,0,3,250,0,4,243,0,5,250,0,6,243,0,7,250,0,21,249,0,25, - 249,0,27,249,0,29,249,0,79,248,0,83,248,10,86,255,218,255,219,255, - 220,255,221,255,0,108,255,0,112,255,0,114,255,0,116,255,27,80,250, - 85,252,86,250,87,254,88,254,90,254,211,250,212,250,213,250,214,250, - 215,250,217,250,218,250,219,250,220,250,221,250,222,254,0,78,250, - 0,82,250,0,100,252,0,102,252,0,108,250,0,112,250,0,114,250,0,116, - 250,0,122,254,73,45,242,46,242,47,242,59,245,60,245,66,248,80,254, - 98,242,102,242,106,251,112,241,115,251,118,251,120,251,122,251,193, - 248,194,248,195,248,196,248,197,248,198,248,211,254,212,254,213, - 254,214,254,215,254,217,254,225,242,226,242,227,242,228,242,229, - 242,230,242,233,248,234,242,235,242,236,248,238,251,243,241,244, - 241,245,241,246,241,247,241,249,241,250,251,251,251,252,251,253, - 251,254,251,0,1,251,0,2,248,0,3,242,0,4,248,0,5,242,0,6,248,0,7, - 242,0,21,248,0,25,242,0,27,242,0,29,242,0,49,251,0,78,254,0,79,241, - 0,82,254,0,83,241,0,87,251,0,89,251,0,91,251,0,109,251,0,113,251, - 0,115,251,0,117,251,11,66,249,193,249,194,249,195,249,196,249,197, - 249,198,249,0,2,249,0,4,249,0,6,249,68,45,235,46,245,47,235,59,245, - 60,245,66,243,72,255,80,252,98,238,102,238,106,248,112,238,118,248, - 193,243,194,243,195,243,196,243,197,243,198,243,211,252,212,252, - 213,252,214,252,215,252,217,252,225,238,226,238,227,238,228,238, - 229,238,230,238,233,245,234,238,235,238,236,245,238,248,243,238, - 244,238,245,238,246,238,247,238,249,238,250,248,251,248,252,248, - 253,248,0,2,243,0,3,238,0,4,243,0,5,238,0,6,243,0,7,238,0,21,245, - 0,25,238,0,27,238,0,29,238,0,32,255,0,36,255,0,49,248,0,78,252,0, - 79,238,0,82,252,0,83,238,0,109,248,0,113,248,0,115,248,0,117,248, - 68,45,245,46,249,47,245,59,248,60,248,66,245,80,254,98,243,102,242, - 106,251,112,244,118,248,122,248,193,245,194,245,195,245,196,245, - 197,245,198,245,211,254,212,254,213,254,214,254,215,254,217,254, - 225,243,226,243,227,243,228,243,229,243,230,243,233,249,234,242, - 235,242,236,249,238,251,243,244,244,244,245,244,246,244,247,244, - 249,244,250,248,251,248,252,248,253,248,254,248,0,1,248,0,2,245, - 0,3,243,0,4,245,0,5,243,0,6,245,0,7,243,0,21,249,0,25,242,0,27,242, - 0,29,242,0,49,251,0,78,254,0,79,244,0,82,254,0,83,244,0,109,248, - 0,113,248,0,115,248,0,117,248,65,45,242,46,242,47,245,59,242,60, - 242,66,245,80,253,98,242,102,238,106,248,112,238,118,242,193,245, - 194,245,195,245,196,245,197,245,198,245,211,253,212,253,213,253, - 214,253,215,253,217,253,225,242,226,242,227,242,228,242,229,242, - 230,242,233,245,234,238,235,245,236,245,238,248,243,238,244,238, - 245,238,246,238,247,238,249,238,250,242,251,242,252,242,253,242, - 0,2,245,0,3,242,0,4,245,0,5,242,0,6,245,0,7,242,0,21,245,0,25,238, - 0,27,238,0,29,238,0,49,248,0,78,253,0,79,238,0,82,253,0,83,238,0, - 109,242,0,113,242,0,115,242,0,117,242,12,47,250,99,255,118,254,250, - 254,251,254,252,254,253,254,0,109,254,0,113,254,0,115,254,0,117, - 254,4,105,255,108,255,0,57,255,2,99,255,17,45,255,47,255,102,255, - 103,254,112,255,234,255,243,255,244,255,245,255,246,255,249,255, - 0,25,255,0,27,255,0,51,252,0,83,255,1,32,25,9,19,102,252,112,255, - 233,252,234,252,235,252,236,252,243,255,244,255,245,255,246,255, - 247,255,249,255,0,21,252,0,25,252,0,27,252,0,29,252,0,79,255,0,83, - 255,2,119,250,7,119,254,120,253,121,255,122,255,254,255,0,1,255, - 3,45,246,47,246,21,45,251,47,251,102,254,112,254,233,254,234,254, - 235,254,236,254,243,254,244,254,245,254,246,254,247,254,249,254, - 0,21,254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,31,45,251, - 47,251,98,255,102,255,112,254,225,255,226,255,227,255,228,255,229, - 255,230,255,233,255,234,255,235,255,236,255,243,254,244,254,245, - 254,246,254,247,254,249,254,0,3,255,0,5,255,0,7,255,0,21,255,0,25, - 255,0,27,255,0,29,255,0,79,254,0,83,254,10,102,255,233,255,234,255, - 235,255,236,255,0,21,255,0,25,255,0,27,255,0,29,255,3,45,251,47, - 251,50,68,246,72,247,80,249,82,248,85,248,86,249,87,241,88,240,90, - 245,118,252,119,245,120,245,122,245,200,246,211,249,212,249,213, - 249,214,249,215,249,217,249,218,249,219,249,220,249,221,249,222, - 245,250,252,251,252,252,252,253,252,254,245,0,1,245,0,8,246,0,14, - 246,0,32,247,0,36,247,0,78,249,0,82,249,0,100,248,0,102,248,0,108, - 249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249, - 0,117,252,0,122,245,1,32,25,245,50,68,246,72,247,80,249,82,248,85, - 248,86,249,87,241,88,240,90,245,118,252,119,245,120,245,122,245, - 200,246,211,249,212,249,213,249,214,249,215,249,217,249,218,249, - 219,249,220,249,221,249,222,245,250,252,251,252,252,252,253,252, - 254,245,0,1,245,0,8,246,0,14,246,0,32,247,0,36,247,0,78,249,0,82, - 249,0,100,248,0,102,248,0,108,249,0,109,252,0,112,249,0,113,252, - 0,114,249,0,115,252,0,116,249,0,117,252,0,122,245,1,32,25,245,50, - 68,246,72,247,80,249,82,248,85,248,86,249,87,241,88,240,90,245,118, - 252,119,245,120,245,122,245,200,246,211,249,212,249,213,249,214, - 249,215,249,217,249,218,249,219,249,220,249,221,249,222,245,250, - 252,251,252,252,252,253,252,254,245,0,1,245,0,8,246,0,14,246,0,32, - 247,0,36,247,0,78,249,0,82,249,0,100,248,0,102,248,0,108,249,0,109, - 252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249,0,117,252, - 0,122,245,1,32,25,245,50,68,246,72,247,80,249,82,248,85,248,86,249, - 87,241,88,240,90,245,118,252,119,245,120,245,122,245,200,246,211, - 249,212,249,213,249,214,249,215,249,217,249,218,249,219,249,220, - 249,221,249,222,245,250,252,251,252,252,252,253,252,254,245,0,1, - 245,0,8,246,0,14,246,0,32,247,0,36,247,0,78,249,0,82,249,0,100,248, - 0,102,248,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115, - 252,0,116,249,0,117,252,0,122,245,1,32,25,245,50,68,246,72,247,80, - 249,82,248,85,248,86,249,87,241,88,240,90,245,118,252,119,245,120, - 245,122,245,200,246,211,249,212,249,213,249,214,249,215,249,217, - 249,218,249,219,249,220,249,221,249,222,245,250,252,251,252,252, - 252,253,252,254,245,0,1,245,0,8,246,0,14,246,0,32,247,0,36,247,0, - 78,249,0,82,249,0,100,248,0,102,248,0,108,249,0,109,252,0,112,249, - 0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,245,1,32, - 25,245,50,68,246,72,247,80,249,82,248,85,248,86,249,87,241,88,240, - 90,245,118,252,119,245,120,245,122,245,200,246,211,249,212,249,213, - 249,214,249,215,249,217,249,218,249,219,249,220,249,221,249,222, - 245,250,252,251,252,252,252,253,252,254,245,0,1,245,0,8,246,0,14, - 246,0,32,247,0,36,247,0,78,249,0,82,249,0,100,248,0,102,248,0,108, - 249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249, - 0,117,252,0,122,245,1,32,25,245,11,66,252,193,252,194,252,195,252, - 196,252,197,252,198,252,0,2,252,0,4,252,0,6,252,20,66,250,85,250, - 87,249,88,249,89,250,90,249,193,250,194,250,195,250,196,250,197, - 250,198,250,222,249,0,2,250,0,4,250,0,6,250,0,100,250,0,102,250, - 0,122,249,20,66,250,85,250,87,249,88,249,89,250,90,249,193,250,194, - 250,195,250,196,250,197,250,198,250,222,249,0,2,250,0,4,250,0,6, - 250,0,100,250,0,102,250,0,122,249,20,66,250,85,250,87,249,88,249, - 89,250,90,249,193,250,194,250,195,250,196,250,197,250,198,250,222, - 249,0,2,250,0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,20,66, - 250,85,250,87,249,88,249,89,250,90,249,193,250,194,250,195,250,196, - 250,197,250,198,250,222,249,0,2,250,0,4,250,0,6,250,0,100,250,0, - 102,250,0,122,249,20,66,250,85,250,87,249,88,249,89,250,90,249,193, - 250,194,250,195,250,196,250,197,250,198,250,222,249,0,2,250,0,4, - 250,0,6,250,0,100,250,0,102,250,0,122,249,20,66,250,85,250,87,249, - 88,249,89,250,90,249,193,250,194,250,195,250,196,250,197,250,198, - 250,222,249,0,2,250,0,4,250,0,6,250,0,100,250,0,102,250,0,122,249, - 11,66,249,193,249,194,249,195,249,196,249,197,249,198,249,0,2,249, - 0,4,249,0,6,249,11,66,249,193,249,194,249,195,249,196,249,197,249, - 198,249,0,2,249,0,4,249,0,6,249,11,66,249,193,249,194,249,195,249, - 196,249,197,249,198,249,0,2,249,0,4,249,0,6,249,11,66,249,193,249, - 194,249,195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249, - 65,45,242,46,242,47,245,59,242,60,242,66,245,80,253,98,242,102,238, - 106,248,112,238,118,242,193,245,194,245,195,245,196,245,197,245, - 198,245,211,253,212,253,213,253,214,253,215,253,217,253,225,242, - 226,242,227,242,228,242,229,242,230,242,233,245,234,238,235,245, - 236,245,238,248,243,238,244,238,245,238,246,238,247,238,249,238, - 250,242,251,242,252,242,253,242,0,2,245,0,3,242,0,4,245,0,5,242, - 0,6,245,0,7,242,0,21,245,0,25,238,0,27,238,0,29,238,0,49,248,0,78, - 253,0,79,238,0,82,253,0,83,238,0,109,242,0,113,242,0,115,242,0,117, - 242,4,105,255,108,255,0,57,255,2,99,255,2,99,255,2,99,255,2,99,255, - 2,119,250,7,119,254,120,253,121,255,122,255,254,255,0,1,255,7,119, - 254,120,253,121,255,122,255,254,255,0,1,255,7,119,254,120,253,121, - 255,122,255,254,255,0,1,255,7,119,254,120,253,121,255,122,255,254, - 255,0,1,255,7,119,254,120,253,121,255,122,255,254,255,0,1,255,7, - 119,254,120,253,121,255,122,255,254,255,0,1,255,3,45,251,47,251, - 3,45,251,47,251,50,68,246,72,247,80,249,82,248,85,248,86,249,87, - 241,88,240,90,245,118,252,119,245,120,245,122,245,200,246,211,249, - 212,249,213,249,214,249,215,249,217,249,218,249,219,249,220,249, - 221,249,222,245,250,252,251,252,252,252,253,252,254,245,0,1,245, - 0,8,246,0,14,246,0,32,247,0,36,247,0,78,249,0,82,249,0,100,248,0, - 102,248,0,108,249,0,109,252,0,112,249,0,113,252,0,114,249,0,115, - 252,0,116,249,0,117,252,0,122,245,1,32,25,245,50,68,246,72,247,80, - 249,82,248,85,248,86,249,87,241,88,240,90,245,118,252,119,245,120, - 245,122,245,200,246,211,249,212,249,213,249,214,249,215,249,217, - 249,218,249,219,249,220,249,221,249,222,245,250,252,251,252,252, - 252,253,252,254,245,0,1,245,0,8,246,0,14,246,0,32,247,0,36,247,0, - 78,249,0,82,249,0,100,248,0,102,248,0,108,249,0,109,252,0,112,249, - 0,113,252,0,114,249,0,115,252,0,116,249,0,117,252,0,122,245,1,32, - 25,245,50,68,246,72,247,80,249,82,248,85,248,86,249,87,241,88,240, - 90,245,118,252,119,245,120,245,122,251,200,246,211,249,212,249,213, - 249,214,249,215,249,217,249,218,249,219,249,220,249,221,249,222, - 245,250,252,251,252,252,252,253,252,254,251,0,1,251,0,8,246,0,14, - 246,0,32,247,0,36,247,0,78,249,0,82,249,0,100,248,0,102,248,0,108, - 249,0,109,252,0,112,249,0,113,252,0,114,249,0,115,252,0,116,249, - 0,117,252,0,122,245,1,32,25,245,4,105,255,108,255,0,57,255,4,105, - 255,108,255,0,57,255,16,66,253,87,249,88,250,90,249,193,253,194, - 253,195,253,196,253,197,253,198,253,222,249,0,2,253,0,4,253,0,6, - 253,0,122,249,16,66,253,87,249,88,250,90,249,193,253,194,253,195, - 253,196,253,197,253,198,253,222,249,0,2,253,0,4,253,0,6,253,0,122, - 249,2,99,255,2,99,255,2,99,255,2,99,255,40,80,252,102,253,112,253, - 118,254,122,254,211,252,212,252,213,252,214,252,215,252,217,252, - 233,253,234,253,235,253,236,253,243,253,244,253,245,253,246,253, - 247,253,249,253,250,254,251,254,252,254,253,254,254,254,0,1,254, - 0,21,253,0,25,253,0,27,253,0,29,253,0,78,252,0,79,253,0,82,252,0, - 83,253,0,109,254,0,113,254,0,115,254,0,117,254,19,102,252,112,255, - 233,252,234,252,235,252,236,252,243,255,244,255,245,255,246,255, - 247,255,249,255,0,21,252,0,25,252,0,27,252,0,29,252,0,79,255,0,83, - 255,13,85,254,87,251,88,251,90,251,122,251,222,251,254,251,0,1,251, - 0,100,254,0,102,254,0,122,251,1,32,25,248,13,85,254,87,251,88,251, - 90,251,122,251,222,251,254,251,0,1,251,0,100,254,0,102,254,0,122, - 251,1,32,25,248,13,85,254,87,251,88,251,90,251,122,251,222,251,254, - 251,0,1,251,0,100,254,0,102,254,0,122,251,1,32,25,248,11,66,252, - 193,252,194,252,195,252,196,252,197,252,198,252,0,2,252,0,4,252, - 0,6,252,2,119,250,11,66,252,193,252,194,252,195,252,196,252,197, - 252,198,252,0,2,252,0,4,252,0,6,252,2,119,250,11,66,252,193,252, - 194,252,195,252,196,252,197,252,198,252,0,2,252,0,4,252,0,6,252, - 2,119,250,20,66,250,85,250,87,249,88,249,89,250,90,249,193,250,194, - 250,195,250,196,250,197,250,198,250,222,249,0,2,250,0,4,250,0,6, - 250,0,100,250,0,102,250,0,122,249,7,119,254,120,253,121,255,122, - 255,254,255,0,1,255,20,66,250,85,250,87,249,88,249,89,250,90,249, - 193,250,194,250,195,250,196,250,197,250,198,250,222,249,0,2,250, - 0,4,250,0,6,250,0,100,250,0,102,250,0,122,249,7,119,254,120,253, - 121,255,122,255,254,255,0,1,255,27,80,250,85,252,86,250,87,254,88, - 254,90,254,211,250,212,250,213,250,214,250,215,250,217,250,218,250, - 219,250,220,250,221,250,222,254,0,78,250,0,82,250,0,100,252,0,102, - 252,0,108,250,0,112,250,0,114,250,0,116,250,0,122,254,3,45,246,47, - 246,27,80,250,85,252,86,250,87,254,88,254,90,254,211,250,212,250, - 213,250,214,250,215,250,217,250,218,250,219,250,220,250,221,250, - 222,254,0,78,250,0,82,250,0,100,252,0,102,252,0,108,250,0,112,250, - 0,114,250,0,116,250,0,122,254,3,45,246,47,246,27,80,250,85,252,86, - 250,87,254,88,254,90,254,211,250,212,250,213,250,214,250,215,250, - 217,250,218,250,219,250,220,250,221,250,222,254,0,78,250,0,82,250, - 0,100,252,0,102,252,0,108,250,0,112,250,0,114,250,0,116,250,0,122, - 254,3,45,246,47,246,73,45,242,46,242,47,242,59,245,60,245,66,248, - 80,254,98,242,102,242,106,251,112,241,115,251,118,251,120,251,122, - 251,193,248,194,248,195,248,196,248,197,248,198,248,211,254,212, - 254,213,254,214,254,215,254,217,254,225,242,226,242,227,242,228, - 242,229,242,230,242,233,248,234,242,235,242,236,248,238,251,243, - 241,244,241,245,241,246,241,247,241,249,241,250,251,251,251,252, - 251,253,251,254,251,0,1,251,0,2,248,0,3,242,0,4,248,0,5,242,0,6, - 248,0,7,242,0,21,248,0,25,242,0,27,242,0,29,242,0,49,251,0,78,254, - 0,79,241,0,82,254,0,83,241,0,87,251,0,89,251,0,91,251,0,109,251, - 0,113,251,0,115,251,0,117,251,73,45,242,46,242,47,242,59,245,60, - 245,66,248,80,254,98,242,102,242,106,251,112,241,115,251,118,251, - 120,251,122,251,193,248,194,248,195,248,196,248,197,248,198,248, - 211,254,212,254,213,254,214,254,215,254,217,254,225,242,226,242, - 227,242,228,242,229,242,230,242,233,248,234,242,235,242,236,248, - 238,251,243,241,244,241,245,241,246,241,247,241,249,241,250,251, - 251,251,252,251,253,251,254,251,0,1,251,0,2,248,0,3,242,0,4,248, - 0,5,242,0,6,248,0,7,242,0,21,248,0,25,242,0,27,242,0,29,242,0,49, - 251,0,78,254,0,79,241,0,82,254,0,83,241,0,87,251,0,89,251,0,91,251, - 0,109,251,0,113,251,0,115,251,0,117,251,11,66,249,193,249,194,249, - 195,249,196,249,197,249,198,249,0,2,249,0,4,249,0,6,249,11,66,249, - 193,249,194,249,195,249,196,249,197,249,198,249,0,2,249,0,4,249, - 0,6,249,11,66,249,193,249,194,249,195,249,196,249,197,249,198,249, - 0,2,249,0,4,249,0,6,249,11,66,249,193,249,194,249,195,249,196,249, - 197,249,198,249,0,2,249,0,4,249,0,6,249,65,45,242,46,242,47,245, - 59,242,60,242,66,245,80,253,98,242,102,238,106,248,112,238,118,242, - 193,245,194,245,195,245,196,245,197,245,198,245,211,253,212,253, - 213,253,214,253,215,253,217,253,225,242,226,242,227,242,228,242, - 229,242,230,242,233,245,234,238,235,245,236,245,238,248,243,238, - 244,238,245,238,246,238,247,238,249,238,250,242,251,242,252,242, - 253,242,0,2,245,0,3,242,0,4,245,0,5,242,0,6,245,0,7,242,0,21,245, - 0,25,238,0,27,238,0,29,238,0,49,248,0,78,253,0,79,238,0,82,253,0, - 83,238,0,109,242,0,113,242,0,115,242,0,117,242,2,1,32,24,245,17, - 33,245,101,254,115,254,116,245,117,251,119,254,0,19,254,0,87,254, - 0,89,254,0,91,254,0,93,245,0,97,245,0,99,245,0,101,251,1,2,25,245, - 1,32,25,245 +static afm_cuint8 afm_Times_BoldItalic_kerning_data[] = { /* 4879 */ + 42, 16, 66, 251, 87, 245, 88, 245, 90, 245, 193, 251, 194, 251, 195, 251, + 196, 251, + 197, 251, 198, 251, 222, 245, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, 122, + 245, 3, 1, 32, + 25, 241, 1, 32, 29, 241, 3, 1, 32, 25, 241, 1, 32, 29, 241, 50, 68, 246, + 72, 247, 80, + 249, 82, 248, 85, 248, 86, 249, 87, 241, 88, 240, 90, 245, 118, 252, 119, + 245, 120, + 245, 122, 245, 200, 246, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, + 217, + 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 245, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 245, 0, 1, 245, 0, 8, 246, 0, 14, 246, 0, 32, 247, 0, + 36, 247, 0, + 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, 248, 0, 108, 249, 0, 109, 252, + 0, 112, 249, + 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, + 245, 1, 32, + 25, 245, 20, 66, 253, 86, 255, 193, 253, 194, 253, 195, 253, 196, 253, + 197, 253, + 198, 253, 218, 255, 219, 255, 220, 255, 221, 255, 0, 2, 253, 0, 4, 253, 0, + 6, 253, + 0, 108, 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, 16, 66, 253, 87, 249, + 88, 250, + 90, 249, 193, 253, 194, 253, 195, 253, 196, 253, 197, 253, 198, 253, 222, + 249, 0, + 2, 253, 0, 4, 253, 0, 6, 253, 0, 122, 249, 52, 45, 235, 47, 235, 66, 240, + 98, 241, 102, + 240, 106, 250, 112, 245, 115, 249, 193, 240, 194, 240, 195, 240, 196, 240, + 197, + 240, 198, 240, 225, 241, 226, 241, 227, 241, 228, 241, 229, 241, 230, 241, + 233, + 240, 234, 240, 235, 240, 236, 240, 237, 250, 238, 250, 239, 250, 240, 250, + 243, + 245, 244, 245, 245, 245, 246, 245, 247, 245, 249, 245, 0, 2, 240, 0, 3, + 241, 0, 4, + 240, 0, 5, 241, 0, 6, 240, 0, 7, 241, 0, 21, 240, 0, 25, 240, 0, 27, 240, + 0, 29, 240, + 0, 45, 250, 0, 49, 250, 0, 79, 245, 0, 83, 245, 0, 87, 249, 0, 89, 249, 0, + 91, 249, 50, + 45, 255, 47, 255, 66, 253, 98, 250, 102, 250, 112, 250, 118, 250, 193, + 253, 194, + 253, 195, 253, 196, 253, 197, 253, 198, 253, 225, 250, 226, 250, 227, 250, + 228, + 250, 229, 250, 230, 250, 233, 250, 234, 250, 235, 250, 236, 250, 243, 250, + 244, + 250, 245, 250, 246, 250, 247, 250, 249, 250, 250, 250, 251, 250, 252, 250, + 253, + 250, 0, 2, 253, 0, 3, 250, 0, 4, 253, 0, 5, 250, 0, 6, 253, 0, 7, 250, 0, + 21, 250, 0, 25, + 250, 0, 27, 250, 0, 29, 250, 0, 79, 250, 0, 83, 250, 0, 109, 250, 0, 113, + 250, 0, 115, + 250, 0, 117, 250, 40, 80, 252, 102, 253, 112, 253, 118, 254, 122, 254, + 211, 252, + 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 233, 253, 234, 253, 235, + 253, + 236, 253, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 250, + 254, + 251, 254, 252, 254, 253, 254, 254, 254, 0, 1, 254, 0, 21, 253, 0, 25, 253, + 0, 27, 253, + 0, 29, 253, 0, 78, 252, 0, 79, 253, 0, 82, 252, 0, 83, 253, 0, 109, 254, + 0, 113, 254, + 0, 115, 254, 0, 117, 254, 13, 85, 254, 87, 251, 88, 251, 90, 251, 122, + 251, 222, 251, + 254, 251, 0, 1, 251, 0, 100, 254, 0, 102, 254, 0, 122, 251, 1, 32, 25, + 248, 11, 66, + 252, 193, 252, 194, 252, 195, 252, 196, 252, 197, 252, 198, 252, 0, 2, + 252, 0, 4, + 252, 0, 6, 252, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, + 4, 250, + 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 41, 45, 235, 47, 235, + 66, 243, 98, + 250, 102, 249, 112, 248, 193, 243, 194, 243, 195, 243, 196, 243, 197, 243, + 198, + 243, 225, 250, 226, 250, 227, 250, 228, 250, 229, 250, 230, 250, 233, 249, + 234, + 249, 235, 249, 236, 249, 243, 248, 244, 248, 245, 248, 246, 248, 247, 248, + 249, + 248, 0, 2, 243, 0, 3, 250, 0, 4, 243, 0, 5, 250, 0, 6, 243, 0, 7, 250, 0, + 21, 249, 0, 25, + 249, 0, 27, 249, 0, 29, 249, 0, 79, 248, 0, 83, 248, 10, 86, 255, 218, + 255, 219, 255, + 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, + 27, 80, 250, + 85, 252, 86, 250, 87, 254, 88, 254, 90, 254, 211, 250, 212, 250, 213, 250, + 214, 250, + 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, 222, 254, 0, + 78, 250, + 0, 82, 250, 0, 100, 252, 0, 102, 252, 0, 108, 250, 0, 112, 250, 0, 114, + 250, 0, 116, + 250, 0, 122, 254, 73, 45, 242, 46, 242, 47, 242, 59, 245, 60, 245, 66, + 248, 80, 254, + 98, 242, 102, 242, 106, 251, 112, 241, 115, 251, 118, 251, 120, 251, 122, + 251, 193, + 248, 194, 248, 195, 248, 196, 248, 197, 248, 198, 248, 211, 254, 212, 254, + 213, + 254, 214, 254, 215, 254, 217, 254, 225, 242, 226, 242, 227, 242, 228, 242, + 229, + 242, 230, 242, 233, 248, 234, 242, 235, 242, 236, 248, 238, 251, 243, 241, + 244, + 241, 245, 241, 246, 241, 247, 241, 249, 241, 250, 251, 251, 251, 252, 251, + 253, + 251, 254, 251, 0, 1, 251, 0, 2, 248, 0, 3, 242, 0, 4, 248, 0, 5, 242, 0, + 6, 248, 0, 7, + 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, 29, 242, 0, 49, 251, 0, 78, + 254, 0, 79, 241, + 0, 82, 254, 0, 83, 241, 0, 87, 251, 0, 89, 251, 0, 91, 251, 0, 109, 251, + 0, 113, 251, + 0, 115, 251, 0, 117, 251, 11, 66, 249, 193, 249, 194, 249, 195, 249, 196, + 249, 197, + 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 68, 45, 235, 46, 245, 47, + 235, 59, 245, + 60, 245, 66, 243, 72, 255, 80, 252, 98, 238, 102, 238, 106, 248, 112, 238, + 118, 248, + 193, 243, 194, 243, 195, 243, 196, 243, 197, 243, 198, 243, 211, 252, 212, + 252, + 213, 252, 214, 252, 215, 252, 217, 252, 225, 238, 226, 238, 227, 238, 228, + 238, + 229, 238, 230, 238, 233, 245, 234, 238, 235, 238, 236, 245, 238, 248, 243, + 238, + 244, 238, 245, 238, 246, 238, 247, 238, 249, 238, 250, 248, 251, 248, 252, + 248, + 253, 248, 0, 2, 243, 0, 3, 238, 0, 4, 243, 0, 5, 238, 0, 6, 243, 0, 7, + 238, 0, 21, 245, + 0, 25, 238, 0, 27, 238, 0, 29, 238, 0, 32, 255, 0, 36, 255, 0, 49, 248, 0, + 78, 252, 0, + 79, 238, 0, 82, 252, 0, 83, 238, 0, 109, 248, 0, 113, 248, 0, 115, 248, 0, + 117, 248, + 68, 45, 245, 46, 249, 47, 245, 59, 248, 60, 248, 66, 245, 80, 254, 98, + 243, 102, 242, + 106, 251, 112, 244, 118, 248, 122, 248, 193, 245, 194, 245, 195, 245, 196, + 245, + 197, 245, 198, 245, 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, + 254, + 225, 243, 226, 243, 227, 243, 228, 243, 229, 243, 230, 243, 233, 249, 234, + 242, + 235, 242, 236, 249, 238, 251, 243, 244, 244, 244, 245, 244, 246, 244, 247, + 244, + 249, 244, 250, 248, 251, 248, 252, 248, 253, 248, 254, 248, 0, 1, 248, 0, + 2, 245, + 0, 3, 243, 0, 4, 245, 0, 5, 243, 0, 6, 245, 0, 7, 243, 0, 21, 249, 0, 25, + 242, 0, 27, 242, + 0, 29, 242, 0, 49, 251, 0, 78, 254, 0, 79, 244, 0, 82, 254, 0, 83, 244, 0, + 109, 248, + 0, 113, 248, 0, 115, 248, 0, 117, 248, 65, 45, 242, 46, 242, 47, 245, 59, + 242, 60, + 242, 66, 245, 80, 253, 98, 242, 102, 238, 106, 248, 112, 238, 118, 242, + 193, 245, + 194, 245, 195, 245, 196, 245, 197, 245, 198, 245, 211, 253, 212, 253, 213, + 253, + 214, 253, 215, 253, 217, 253, 225, 242, 226, 242, 227, 242, 228, 242, 229, + 242, + 230, 242, 233, 245, 234, 238, 235, 245, 236, 245, 238, 248, 243, 238, 244, + 238, + 245, 238, 246, 238, 247, 238, 249, 238, 250, 242, 251, 242, 252, 242, 253, + 242, + 0, 2, 245, 0, 3, 242, 0, 4, 245, 0, 5, 242, 0, 6, 245, 0, 7, 242, 0, 21, + 245, 0, 25, 238, + 0, 27, 238, 0, 29, 238, 0, 49, 248, 0, 78, 253, 0, 79, 238, 0, 82, 253, 0, + 83, 238, 0, + 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 12, 47, 250, 99, 255, + 118, 254, 250, + 254, 251, 254, 252, 254, 253, 254, 0, 109, 254, 0, 113, 254, 0, 115, 254, + 0, 117, + 254, 4, 105, 255, 108, 255, 0, 57, 255, 2, 99, 255, 17, 45, 255, 47, 255, + 102, 255, + 103, 254, 112, 255, 234, 255, 243, 255, 244, 255, 245, 255, 246, 255, 249, + 255, + 0, 25, 255, 0, 27, 255, 0, 51, 252, 0, 83, 255, 1, 32, 25, 9, 19, 102, + 252, 112, 255, + 233, 252, 234, 252, 235, 252, 236, 252, 243, 255, 244, 255, 245, 255, 246, + 255, + 247, 255, 249, 255, 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 0, 79, + 255, 0, 83, + 255, 2, 119, 250, 7, 119, 254, 120, 253, 121, 255, 122, 255, 254, 255, 0, + 1, 255, + 3, 45, 246, 47, 246, 21, 45, 251, 47, 251, 102, 254, 112, 254, 233, 254, + 234, 254, + 235, 254, 236, 254, 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, + 254, + 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, 83, 254, + 31, 45, 251, + 47, 251, 98, 255, 102, 255, 112, 254, 225, 255, 226, 255, 227, 255, 228, + 255, 229, + 255, 230, 255, 233, 255, 234, 255, 235, 255, 236, 255, 243, 254, 244, 254, + 245, + 254, 246, 254, 247, 254, 249, 254, 0, 3, 255, 0, 5, 255, 0, 7, 255, 0, 21, + 255, 0, 25, + 255, 0, 27, 255, 0, 29, 255, 0, 79, 254, 0, 83, 254, 10, 102, 255, 233, + 255, 234, 255, + 235, 255, 236, 255, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 3, 45, + 251, 47, + 251, 50, 68, 246, 72, 247, 80, 249, 82, 248, 85, 248, 86, 249, 87, 241, + 88, 240, 90, + 245, 118, 252, 119, 245, 120, 245, 122, 245, 200, 246, 211, 249, 212, 249, + 213, + 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 245, 250, 252, 251, 252, 252, 252, 253, 252, 254, 245, 0, 1, 245, 0, 8, + 246, 0, 14, + 246, 0, 32, 247, 0, 36, 247, 0, 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, + 248, 0, 108, + 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, + 116, 249, + 0, 117, 252, 0, 122, 245, 1, 32, 25, 245, 50, 68, 246, 72, 247, 80, 249, + 82, 248, 85, + 248, 86, 249, 87, 241, 88, 240, 90, 245, 118, 252, 119, 245, 120, 245, + 122, 245, + 200, 246, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, + 249, + 219, 249, 220, 249, 221, 249, 222, 245, 250, 252, 251, 252, 252, 252, 253, + 252, + 254, 245, 0, 1, 245, 0, 8, 246, 0, 14, 246, 0, 32, 247, 0, 36, 247, 0, 78, + 249, 0, 82, + 249, 0, 100, 248, 0, 102, 248, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, + 113, 252, + 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, 245, 1, 32, + 25, 245, 50, + 68, 246, 72, 247, 80, 249, 82, 248, 85, 248, 86, 249, 87, 241, 88, 240, + 90, 245, 118, + 252, 119, 245, 120, 245, 122, 245, 200, 246, 211, 249, 212, 249, 213, 249, + 214, + 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 245, + 250, + 252, 251, 252, 252, 252, 253, 252, 254, 245, 0, 1, 245, 0, 8, 246, 0, 14, + 246, 0, 32, + 247, 0, 36, 247, 0, 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, 248, 0, 108, + 249, 0, 109, + 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, + 117, 252, + 0, 122, 245, 1, 32, 25, 245, 50, 68, 246, 72, 247, 80, 249, 82, 248, 85, + 248, 86, 249, + 87, 241, 88, 240, 90, 245, 118, 252, 119, 245, 120, 245, 122, 245, 200, + 246, 211, + 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, + 220, + 249, 221, 249, 222, 245, 250, 252, 251, 252, 252, 252, 253, 252, 254, 245, + 0, 1, + 245, 0, 8, 246, 0, 14, 246, 0, 32, 247, 0, 36, 247, 0, 78, 249, 0, 82, + 249, 0, 100, 248, + 0, 102, 248, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, + 249, 0, 115, + 252, 0, 116, 249, 0, 117, 252, 0, 122, 245, 1, 32, 25, 245, 50, 68, 246, + 72, 247, 80, + 249, 82, 248, 85, 248, 86, 249, 87, 241, 88, 240, 90, 245, 118, 252, 119, + 245, 120, + 245, 122, 245, 200, 246, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, + 217, + 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 245, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 245, 0, 1, 245, 0, 8, 246, 0, 14, 246, 0, 32, 247, 0, + 36, 247, 0, + 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, 248, 0, 108, 249, 0, 109, 252, + 0, 112, 249, + 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, + 245, 1, 32, + 25, 245, 50, 68, 246, 72, 247, 80, 249, 82, 248, 85, 248, 86, 249, 87, + 241, 88, 240, + 90, 245, 118, 252, 119, 245, 120, 245, 122, 245, 200, 246, 211, 249, 212, + 249, 213, + 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 245, 250, 252, 251, 252, 252, 252, 253, 252, 254, 245, 0, 1, 245, 0, 8, + 246, 0, 14, + 246, 0, 32, 247, 0, 36, 247, 0, 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, + 248, 0, 108, + 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, + 116, 249, + 0, 117, 252, 0, 122, 245, 1, 32, 25, 245, 11, 66, 252, 193, 252, 194, 252, + 195, 252, + 196, 252, 197, 252, 198, 252, 0, 2, 252, 0, 4, 252, 0, 6, 252, 20, 66, + 250, 85, 250, + 87, 249, 88, 249, 89, 250, 90, 249, 193, 250, 194, 250, 195, 250, 196, + 250, 197, + 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, + 102, 250, + 0, 122, 249, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, + 193, 250, 194, + 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, + 250, 0, 6, + 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, 66, 250, 85, 250, 87, 249, + 88, 249, + 89, 250, 90, 249, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, + 250, 222, + 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, + 249, 20, 66, + 250, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, 193, 250, 194, 250, 195, + 250, 196, + 250, 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, + 100, 250, 0, + 102, 250, 0, 122, 249, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, + 90, 249, 193, + 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, 2, + 250, 0, 4, + 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, 66, 250, 85, + 250, 87, 249, + 88, 249, 89, 250, 90, 249, 193, 250, 194, 250, 195, 250, 196, 250, 197, + 250, 198, + 250, 222, 249, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, + 0, 122, 249, + 11, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, + 0, 2, 249, + 0, 4, 249, 0, 6, 249, 11, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, + 197, 249, + 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 11, 66, 249, 193, 249, 194, + 249, 195, 249, + 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 11, 66, + 249, 193, 249, + 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, + 6, 249, + 65, 45, 242, 46, 242, 47, 245, 59, 242, 60, 242, 66, 245, 80, 253, 98, + 242, 102, 238, + 106, 248, 112, 238, 118, 242, 193, 245, 194, 245, 195, 245, 196, 245, 197, + 245, + 198, 245, 211, 253, 212, 253, 213, 253, 214, 253, 215, 253, 217, 253, 225, + 242, + 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, 245, 234, 238, 235, + 245, + 236, 245, 238, 248, 243, 238, 244, 238, 245, 238, 246, 238, 247, 238, 249, + 238, + 250, 242, 251, 242, 252, 242, 253, 242, 0, 2, 245, 0, 3, 242, 0, 4, 245, + 0, 5, 242, + 0, 6, 245, 0, 7, 242, 0, 21, 245, 0, 25, 238, 0, 27, 238, 0, 29, 238, 0, + 49, 248, 0, 78, + 253, 0, 79, 238, 0, 82, 253, 0, 83, 238, 0, 109, 242, 0, 113, 242, 0, 115, + 242, 0, 117, + 242, 4, 105, 255, 108, 255, 0, 57, 255, 2, 99, 255, 2, 99, 255, 2, 99, + 255, 2, 99, 255, + 2, 119, 250, 7, 119, 254, 120, 253, 121, 255, 122, 255, 254, 255, 0, 1, + 255, 7, 119, + 254, 120, 253, 121, 255, 122, 255, 254, 255, 0, 1, 255, 7, 119, 254, 120, + 253, 121, + 255, 122, 255, 254, 255, 0, 1, 255, 7, 119, 254, 120, 253, 121, 255, 122, + 255, 254, + 255, 0, 1, 255, 7, 119, 254, 120, 253, 121, 255, 122, 255, 254, 255, 0, 1, + 255, 7, + 119, 254, 120, 253, 121, 255, 122, 255, 254, 255, 0, 1, 255, 3, 45, 251, + 47, 251, + 3, 45, 251, 47, 251, 50, 68, 246, 72, 247, 80, 249, 82, 248, 85, 248, 86, + 249, 87, + 241, 88, 240, 90, 245, 118, 252, 119, 245, 120, 245, 122, 245, 200, 246, + 211, 249, + 212, 249, 213, 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, + 249, + 221, 249, 222, 245, 250, 252, 251, 252, 252, 252, 253, 252, 254, 245, 0, + 1, 245, + 0, 8, 246, 0, 14, 246, 0, 32, 247, 0, 36, 247, 0, 78, 249, 0, 82, 249, 0, + 100, 248, 0, + 102, 248, 0, 108, 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, + 0, 115, + 252, 0, 116, 249, 0, 117, 252, 0, 122, 245, 1, 32, 25, 245, 50, 68, 246, + 72, 247, 80, + 249, 82, 248, 85, 248, 86, 249, 87, 241, 88, 240, 90, 245, 118, 252, 119, + 245, 120, + 245, 122, 245, 200, 246, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, + 217, + 249, 218, 249, 219, 249, 220, 249, 221, 249, 222, 245, 250, 252, 251, 252, + 252, + 252, 253, 252, 254, 245, 0, 1, 245, 0, 8, 246, 0, 14, 246, 0, 32, 247, 0, + 36, 247, 0, + 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, 248, 0, 108, 249, 0, 109, 252, + 0, 112, 249, + 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, 116, 249, 0, 117, 252, 0, 122, + 245, 1, 32, + 25, 245, 50, 68, 246, 72, 247, 80, 249, 82, 248, 85, 248, 86, 249, 87, + 241, 88, 240, + 90, 245, 118, 252, 119, 245, 120, 245, 122, 251, 200, 246, 211, 249, 212, + 249, 213, + 249, 214, 249, 215, 249, 217, 249, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 245, 250, 252, 251, 252, 252, 252, 253, 252, 254, 251, 0, 1, 251, 0, 8, + 246, 0, 14, + 246, 0, 32, 247, 0, 36, 247, 0, 78, 249, 0, 82, 249, 0, 100, 248, 0, 102, + 248, 0, 108, + 249, 0, 109, 252, 0, 112, 249, 0, 113, 252, 0, 114, 249, 0, 115, 252, 0, + 116, 249, + 0, 117, 252, 0, 122, 245, 1, 32, 25, 245, 4, 105, 255, 108, 255, 0, 57, + 255, 4, 105, + 255, 108, 255, 0, 57, 255, 16, 66, 253, 87, 249, 88, 250, 90, 249, 193, + 253, 194, + 253, 195, 253, 196, 253, 197, 253, 198, 253, 222, 249, 0, 2, 253, 0, 4, + 253, 0, 6, + 253, 0, 122, 249, 16, 66, 253, 87, 249, 88, 250, 90, 249, 193, 253, 194, + 253, 195, + 253, 196, 253, 197, 253, 198, 253, 222, 249, 0, 2, 253, 0, 4, 253, 0, 6, + 253, 0, 122, + 249, 2, 99, 255, 2, 99, 255, 2, 99, 255, 2, 99, 255, 40, 80, 252, 102, + 253, 112, 253, + 118, 254, 122, 254, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, + 252, + 233, 253, 234, 253, 235, 253, 236, 253, 243, 253, 244, 253, 245, 253, 246, + 253, + 247, 253, 249, 253, 250, 254, 251, 254, 252, 254, 253, 254, 254, 254, 0, + 1, 254, + 0, 21, 253, 0, 25, 253, 0, 27, 253, 0, 29, 253, 0, 78, 252, 0, 79, 253, 0, + 82, 252, 0, + 83, 253, 0, 109, 254, 0, 113, 254, 0, 115, 254, 0, 117, 254, 19, 102, 252, + 112, 255, + 233, 252, 234, 252, 235, 252, 236, 252, 243, 255, 244, 255, 245, 255, 246, + 255, + 247, 255, 249, 255, 0, 21, 252, 0, 25, 252, 0, 27, 252, 0, 29, 252, 0, 79, + 255, 0, 83, + 255, 13, 85, 254, 87, 251, 88, 251, 90, 251, 122, 251, 222, 251, 254, 251, + 0, 1, 251, + 0, 100, 254, 0, 102, 254, 0, 122, 251, 1, 32, 25, 248, 13, 85, 254, 87, + 251, 88, 251, + 90, 251, 122, 251, 222, 251, 254, 251, 0, 1, 251, 0, 100, 254, 0, 102, + 254, 0, 122, + 251, 1, 32, 25, 248, 13, 85, 254, 87, 251, 88, 251, 90, 251, 122, 251, + 222, 251, 254, + 251, 0, 1, 251, 0, 100, 254, 0, 102, 254, 0, 122, 251, 1, 32, 25, 248, 11, + 66, 252, + 193, 252, 194, 252, 195, 252, 196, 252, 197, 252, 198, 252, 0, 2, 252, 0, + 4, 252, + 0, 6, 252, 2, 119, 250, 11, 66, 252, 193, 252, 194, 252, 195, 252, 196, + 252, 197, + 252, 198, 252, 0, 2, 252, 0, 4, 252, 0, 6, 252, 2, 119, 250, 11, 66, 252, + 193, 252, + 194, 252, 195, 252, 196, 252, 197, 252, 198, 252, 0, 2, 252, 0, 4, 252, 0, + 6, 252, + 2, 119, 250, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, + 193, 250, 194, + 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, 2, 250, 0, 4, + 250, 0, 6, + 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 7, 119, 254, 120, 253, 121, + 255, 122, + 255, 254, 255, 0, 1, 255, 20, 66, 250, 85, 250, 87, 249, 88, 249, 89, 250, + 90, 249, + 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 222, 249, 0, + 2, 250, + 0, 4, 250, 0, 6, 250, 0, 100, 250, 0, 102, 250, 0, 122, 249, 7, 119, 254, + 120, 253, + 121, 255, 122, 255, 254, 255, 0, 1, 255, 27, 80, 250, 85, 252, 86, 250, + 87, 254, 88, + 254, 90, 254, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, + 218, 250, + 219, 250, 220, 250, 221, 250, 222, 254, 0, 78, 250, 0, 82, 250, 0, 100, + 252, 0, 102, + 252, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, 116, 250, 0, 122, 254, 3, + 45, 246, 47, + 246, 27, 80, 250, 85, 252, 86, 250, 87, 254, 88, 254, 90, 254, 211, 250, + 212, 250, + 213, 250, 214, 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, + 250, + 222, 254, 0, 78, 250, 0, 82, 250, 0, 100, 252, 0, 102, 252, 0, 108, 250, + 0, 112, 250, + 0, 114, 250, 0, 116, 250, 0, 122, 254, 3, 45, 246, 47, 246, 27, 80, 250, + 85, 252, 86, + 250, 87, 254, 88, 254, 90, 254, 211, 250, 212, 250, 213, 250, 214, 250, + 215, 250, + 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, 222, 254, 0, 78, 250, 0, + 82, 250, + 0, 100, 252, 0, 102, 252, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, 116, + 250, 0, 122, + 254, 3, 45, 246, 47, 246, 73, 45, 242, 46, 242, 47, 242, 59, 245, 60, 245, + 66, 248, + 80, 254, 98, 242, 102, 242, 106, 251, 112, 241, 115, 251, 118, 251, 120, + 251, 122, + 251, 193, 248, 194, 248, 195, 248, 196, 248, 197, 248, 198, 248, 211, 254, + 212, + 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 242, 226, 242, 227, 242, + 228, + 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, 242, 236, 248, 238, 251, + 243, + 241, 244, 241, 245, 241, 246, 241, 247, 241, 249, 241, 250, 251, 251, 251, + 252, + 251, 253, 251, 254, 251, 0, 1, 251, 0, 2, 248, 0, 3, 242, 0, 4, 248, 0, 5, + 242, 0, 6, + 248, 0, 7, 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, 29, 242, 0, 49, + 251, 0, 78, 254, + 0, 79, 241, 0, 82, 254, 0, 83, 241, 0, 87, 251, 0, 89, 251, 0, 91, 251, 0, + 109, 251, + 0, 113, 251, 0, 115, 251, 0, 117, 251, 73, 45, 242, 46, 242, 47, 242, 59, + 245, 60, + 245, 66, 248, 80, 254, 98, 242, 102, 242, 106, 251, 112, 241, 115, 251, + 118, 251, + 120, 251, 122, 251, 193, 248, 194, 248, 195, 248, 196, 248, 197, 248, 198, + 248, + 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 242, 226, + 242, + 227, 242, 228, 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, 242, 236, + 248, + 238, 251, 243, 241, 244, 241, 245, 241, 246, 241, 247, 241, 249, 241, 250, + 251, + 251, 251, 252, 251, 253, 251, 254, 251, 0, 1, 251, 0, 2, 248, 0, 3, 242, + 0, 4, 248, + 0, 5, 242, 0, 6, 248, 0, 7, 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, + 29, 242, 0, 49, + 251, 0, 78, 254, 0, 79, 241, 0, 82, 254, 0, 83, 241, 0, 87, 251, 0, 89, + 251, 0, 91, 251, + 0, 109, 251, 0, 113, 251, 0, 115, 251, 0, 117, 251, 11, 66, 249, 193, 249, + 194, 249, + 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, + 11, 66, 249, + 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 0, 2, 249, 0, + 4, 249, + 0, 6, 249, 11, 66, 249, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, + 198, 249, + 0, 2, 249, 0, 4, 249, 0, 6, 249, 11, 66, 249, 193, 249, 194, 249, 195, + 249, 196, 249, + 197, 249, 198, 249, 0, 2, 249, 0, 4, 249, 0, 6, 249, 65, 45, 242, 46, 242, + 47, 245, + 59, 242, 60, 242, 66, 245, 80, 253, 98, 242, 102, 238, 106, 248, 112, 238, + 118, 242, + 193, 245, 194, 245, 195, 245, 196, 245, 197, 245, 198, 245, 211, 253, 212, + 253, + 213, 253, 214, 253, 215, 253, 217, 253, 225, 242, 226, 242, 227, 242, 228, + 242, + 229, 242, 230, 242, 233, 245, 234, 238, 235, 245, 236, 245, 238, 248, 243, + 238, + 244, 238, 245, 238, 246, 238, 247, 238, 249, 238, 250, 242, 251, 242, 252, + 242, + 253, 242, 0, 2, 245, 0, 3, 242, 0, 4, 245, 0, 5, 242, 0, 6, 245, 0, 7, + 242, 0, 21, 245, + 0, 25, 238, 0, 27, 238, 0, 29, 238, 0, 49, 248, 0, 78, 253, 0, 79, 238, 0, + 82, 253, 0, + 83, 238, 0, 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 2, 1, 32, 24, + 245, 17, + 33, 245, 101, 254, 115, 254, 116, 245, 117, 251, 119, 254, 0, 19, 254, 0, + 87, 254, + 0, 89, 254, 0, 91, 254, 0, 93, 245, 0, 97, 245, 0, 99, 245, 0, 101, 251, + 1, 2, 25, 245, + 1, 32, 25, 245 }; -static afm_cuint16 afm_Times_BoldItalic_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Times_BoldItalic_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Times_BoldItalic_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Times_BoldItalic_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -2536,361 +4846,704 @@ static afm_cunicode afm_Times_BoldItalic_ligatures[] = { /* 3 */ /* FullName: Times Italic */ /* FamilyName: Times */ static afm_cuint8 afm_Times_Italic_widths[] = { /* 315 */ - 42,56,70,83,83,139,130,36,56,56,83,113,42,56,42,46,83,83,83,83,83, - 83,83,83,83,83,56,56,113,113,113,83,153,102,102,111,120,102,102, - 120,120,56,74,111,93,139,111,120,102,120,102,83,93,120,102,139,102, - 93,93,65,46,65,70,83,56,83,83,74,83,74,46,83,83,46,46,74,46,120, - 83,83,83,83,65,65,46,83,74,111,74,74,65,67,46,67,90,65,83,83,83, - 83,46,83,56,127,46,83,113,127,56,67,113,50,50,56,83,87,42,56,50, - 52,83,125,125,125,83,102,102,102,102,102,102,148,111,102,102,102, - 102,56,56,56,56,120,111,120,120,120,120,120,113,120,120,120,120, - 120,93,102,83,83,83,83,83,83,83,111,74,74,74,74,74,46,46,46,46,83, - 83,83,83,83,83,83,113,83,83,83,83,83,74,83,74,102,83,102,83,102, - 83,111,74,111,74,120,91,120,83,102,74,102,74,102,74,102,74,120,83, - 120,83,56,46,56,46,56,46,111,74,93,46,93,46,102,50,93,46,111,83, - 111,83,111,83,120,83,120,83,157,111,102,65,102,65,102,65,83,65,83, - 65,83,65,93,46,93,50,120,83,120,83,120,83,120,83,93,93,65,93,65, - 93,65,83,83,65,56,56,56,56,56,56,56,56,83,148,56,56,56,93,93,93, - 83,83,58,148,167,56,56,28,83,163,79,102,100,113,76,92,92,92,79,42, - 83,83 + 42, 56, 70, 83, 83, 139, 130, 36, 56, 56, 83, 113, 42, 56, 42, 46, 83, 83, + 83, 83, 83, + 83, 83, 83, 83, 83, 56, 56, 113, 113, 113, 83, 153, 102, 102, 111, 120, + 102, 102, + 120, 120, 56, 74, 111, 93, 139, 111, 120, 102, 120, 102, 83, 93, 120, 102, + 139, 102, + 93, 93, 65, 46, 65, 70, 83, 56, 83, 83, 74, 83, 74, 46, 83, 83, 46, 46, + 74, 46, 120, + 83, 83, 83, 83, 65, 65, 46, 83, 74, 111, 74, 74, 65, 67, 46, 67, 90, 65, + 83, 83, 83, + 83, 46, 83, 56, 127, 46, 83, 113, 127, 56, 67, 113, 50, 50, 56, 83, 87, + 42, 56, 50, + 52, 83, 125, 125, 125, 83, 102, 102, 102, 102, 102, 102, 148, 111, 102, + 102, 102, + 102, 56, 56, 56, 56, 120, 111, 120, 120, 120, 120, 120, 113, 120, 120, + 120, 120, + 120, 93, 102, 83, 83, 83, 83, 83, 83, 83, 111, 74, 74, 74, 74, 74, 46, 46, + 46, 46, 83, + 83, 83, 83, 83, 83, 83, 113, 83, 83, 83, 83, 83, 74, 83, 74, 102, 83, 102, + 83, 102, + 83, 111, 74, 111, 74, 120, 91, 120, 83, 102, 74, 102, 74, 102, 74, 102, + 74, 120, 83, + 120, 83, 56, 46, 56, 46, 56, 46, 111, 74, 93, 46, 93, 46, 102, 50, 93, 46, + 111, 83, + 111, 83, 111, 83, 120, 83, 120, 83, 157, 111, 102, 65, 102, 65, 102, 65, + 83, 65, 83, + 65, 83, 65, 93, 46, 93, 50, 120, 83, 120, 83, 120, 83, 120, 83, 93, 93, + 65, 93, 65, + 93, 65, 83, 83, 65, 56, 56, 56, 56, 56, 56, 56, 56, 83, 148, 56, 56, 56, + 93, 93, 93, + 83, 83, 58, 148, 167, 56, 56, 28, 83, 163, 79, 102, 100, 113, 76, 92, 92, + 92, 79, 42, + 83, 83 }; -static afm_sint16 afm_Times_Italic_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,44,0,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,62,181,0,227,0,262,0,0,0,382,497,589,0,620,644,689,782,805,0, - 859,1027,1055,1212,0,1367,0,0,0,0,0,0,0,1524,1533,1558,0,1566,1592, - 1611,0,0,0,1646,0,0,1696,1699,0,0,1710,0,0,0,1822,1827,0,1832,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,1837,1956,2075,2194,2313,2432,0,0,0,0,0,0,0,0,0,0,0,2551,2575, - 2620,2665,2710,2755,0,2800,2845,2873,2901,2929,2957,0,0,3114,3123, - 3132,3141,3150,3159,0,3168,3176,3202,3228,3254,0,0,0,0,0,3280,3283, - 3294,3305,3316,3327,0,3338,0,0,0,0,3349,0,3354,3359,3478,3487,3606, - 3615,3734,0,3743,0,3751,3759,0,3794,0,0,3829,0,3855,0,3881,0,3907, - 0,3933,0,3968,0,0,0,0,0,0,4003,4095,4145,0,4176,0,0,0,4207,0,4238, - 4262,4265,4289,4292,4316,4319,4364,4375,4420,0,0,4431,4485,4597, - 4651,4763,4817,0,0,0,0,0,0,4929,0,5097,0,5265,0,5293,0,5321,0,5349, - 0,5377,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5534,5539,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +static afm_sint16 afm_Times_Italic_kerning_index[] = { /* 315 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 62, 181, 0, 227, 0, 262, 0, 0, 0, 382, 497, 589, 0, 620, 644, 689, + 782, 805, 0, + 859, 1027, 1055, 1212, 0, 1367, 0, 0, 0, 0, 0, 0, 0, 1524, 1533, 1558, 0, + 1566, 1592, + 1611, 0, 0, 0, 1646, 0, 0, 1696, 1699, 0, 0, 1710, 0, 0, 0, 1822, 1827, 0, + 1832, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1837, 1956, 2075, 2194, 2313, 2432, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2551, 2575, + 2620, 2665, 2710, 2755, 0, 2800, 2845, 2873, 2901, 2929, 2957, 0, 0, 3114, + 3123, + 3132, 3141, 3150, 3159, 0, 3168, 3176, 3202, 3228, 3254, 0, 0, 0, 0, 0, + 3280, 3283, + 3294, 3305, 3316, 3327, 0, 3338, 0, 0, 0, 0, 3349, 0, 3354, 3359, 3478, + 3487, 3606, + 3615, 3734, 0, 3743, 0, 3751, 3759, 0, 3794, 0, 0, 3829, 0, 3855, 0, 3881, + 0, 3907, + 0, 3933, 0, 3968, 0, 0, 0, 0, 0, 0, 4003, 4095, 4145, 0, 4176, 0, 0, 0, + 4207, 0, 4238, + 4262, 4265, 4289, 4292, 4316, 4319, 4364, 4375, 4420, 0, 0, 4431, 4485, + 4597, + 4651, 4763, 4817, 0, 0, 0, 0, 0, 0, 4929, 0, 5097, 0, 5265, 0, 5293, 0, + 5321, 0, 5349, + 0, 5377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5534, + 5539, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static afm_cuint8 afm_Times_Italic_kerning_data[] = { /* 5584 */ - 42,19,66,254,85,254,87,251,88,250,90,244,193,254,194,254,195,254, - 196,254,197,254,198,254,222,244,0,2,254,0,4,254,0,6,254,0,100,254, - 0,102,254,0,122,244,3,1,32,25,234,1,32,29,234,3,1,32,25,234,1,32, - 29,234,50,68,252,72,251,80,250,82,250,85,251,86,249,87,239,88,241, - 90,248,118,254,119,248,120,248,122,248,200,252,211,250,212,250,213, - 250,214,250,215,250,217,250,218,249,219,249,220,249,221,249,222, - 248,250,254,251,254,252,254,253,254,254,248,0,1,248,0,8,252,0,14, - 252,0,32,251,0,36,251,0,78,250,0,82,250,0,100,251,0,102,251,0,108, - 249,0,109,254,0,112,249,0,113,254,0,114,249,0,115,254,0,116,249, - 0,117,254,0,122,248,1,32,25,251,20,66,253,86,255,193,253,194,253, - 195,253,196,253,197,253,198,253,218,255,219,255,220,255,221,255, - 0,2,253,0,4,253,0,6,253,0,108,255,0,112,255,0,114,255,0,116,255, - 16,66,251,87,250,88,250,90,250,193,251,194,251,195,251,196,251,197, - 251,198,251,222,250,0,2,251,0,4,251,0,6,251,0,122,250,52,45,234, - 47,234,66,238,98,244,102,244,106,249,112,239,115,248,193,238,194, - 238,195,238,196,238,197,238,198,238,225,244,226,244,227,244,228, - 244,229,244,230,244,233,244,234,244,235,244,236,244,237,249,238, - 249,239,249,240,249,243,239,244,239,245,239,246,239,247,239,249, - 239,0,2,238,0,3,244,0,4,238,0,5,244,0,6,238,0,7,244,0,21,244,0,25, - 244,0,27,244,0,29,244,0,45,249,0,49,249,0,79,239,0,83,239,0,87,248, - 0,89,248,0,91,248,50,45,253,47,253,66,250,98,251,102,253,112,253, - 118,251,193,250,194,250,195,250,196,250,197,250,198,250,225,251, - 226,251,227,251,228,251,229,251,230,251,233,253,234,253,235,253, - 236,253,243,253,244,253,245,253,246,253,247,253,249,253,250,251, - 251,251,252,251,253,251,0,2,250,0,3,251,0,4,250,0,5,251,0,6,250, - 0,7,251,0,21,253,0,25,253,0,27,253,0,29,253,0,79,253,0,83,253,0, - 109,251,0,113,251,0,115,251,0,117,251,40,80,249,102,251,112,250, - 118,250,122,250,211,249,212,249,213,249,214,249,215,249,217,249, - 233,251,234,251,235,251,236,251,243,250,244,250,245,250,246,250, - 247,250,249,250,250,250,251,250,252,250,253,250,254,250,0,1,250, - 0,21,251,0,25,251,0,27,251,0,29,251,0,78,249,0,79,250,0,82,249,0, - 83,250,0,109,250,0,113,250,0,115,250,0,117,250,13,85,254,87,248, - 88,248,90,254,122,252,222,254,254,252,0,1,252,0,100,254,0,102,254, - 0,122,254,1,32,25,251,11,66,252,193,252,194,252,195,252,196,252, - 197,252,198,252,0,2,252,0,4,252,0,6,252,20,66,248,85,250,87,249, - 88,249,89,250,90,249,193,248,194,248,195,248,196,248,197,248,198, - 248,222,249,0,2,248,0,4,248,0,6,248,0,100,250,0,102,250,0,122,249, - 41,45,234,47,234,66,242,98,244,102,244,112,244,193,242,194,242,195, - 242,196,242,197,242,198,242,225,244,226,244,227,244,228,244,229, - 244,230,244,233,244,234,244,235,244,236,244,243,244,244,244,245, - 244,246,244,247,244,249,244,0,2,242,0,3,244,0,4,242,0,5,244,0,6, - 242,0,7,244,0,21,244,0,25,244,0,27,244,0,29,244,0,79,244,0,83,244, - 10,86,255,218,255,219,255,220,255,221,255,0,108,255,0,112,255,0, - 114,255,0,116,255,24,80,250,86,250,87,254,88,254,90,254,211,250, - 212,250,213,250,214,250,215,250,217,250,218,250,219,250,220,250, - 221,250,222,254,0,78,250,0,82,250,0,108,250,0,112,250,0,114,250, - 0,116,250,0,122,254,73,45,245,46,245,47,245,59,248,60,246,66,249, - 80,254,98,242,102,242,106,248,112,242,115,248,118,248,120,245,122, - 245,193,249,194,249,195,249,196,249,197,249,198,249,211,254,212, - 254,213,254,214,254,215,254,217,254,225,242,226,242,227,242,228, - 242,229,242,230,242,233,248,234,242,235,248,236,248,238,248,243, - 242,244,242,245,242,246,242,247,242,249,242,250,248,251,248,252, - 248,253,248,254,245,0,1,251,0,2,249,0,3,242,0,4,249,0,5,242,0,6, - 249,0,7,242,0,21,248,0,25,242,0,27,242,0,29,242,0,49,248,0,78,254, - 0,79,242,0,82,254,0,83,242,0,87,248,0,89,248,0,91,248,0,109,248, - 0,113,248,0,115,248,0,117,248,13,45,253,47,253,66,250,193,250,194, - 250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,69,45, - 235,46,248,47,235,59,246,60,245,66,247,80,252,98,238,102,238,106, - 245,112,238,118,245,193,247,194,247,195,247,196,247,197,247,198, - 247,211,252,212,252,213,252,214,252,215,252,217,252,225,238,226, - 238,227,238,228,238,229,238,230,238,233,245,234,238,235,238,236, - 245,237,251,238,245,239,251,240,251,243,238,244,238,245,238,246, - 238,247,238,249,238,250,245,251,245,252,245,253,245,0,2,247,0,3, - 238,0,4,247,0,5,238,0,6,247,0,7,238,0,21,245,0,25,238,0,27,238,0, - 29,238,0,45,251,0,49,245,0,78,252,0,79,238,0,82,252,0,83,238,0,109, - 245,0,113,245,0,115,245,0,117,245,68,45,242,46,251,47,242,59,246, - 60,246,66,247,80,253,98,242,102,242,106,248,112,242,118,248,122, - 245,193,247,194,247,195,247,196,247,197,247,198,247,211,253,212, - 253,213,253,214,253,215,253,217,253,225,242,226,242,227,242,228, - 242,229,242,230,242,233,248,234,242,235,242,236,248,238,248,243, - 242,244,242,245,242,246,242,247,242,249,242,250,248,251,248,252, - 248,253,248,254,245,0,1,245,0,2,247,0,3,242,0,4,247,0,5,242,0,6, - 247,0,7,242,0,21,248,0,25,242,0,27,242,0,29,242,0,49,248,0,78,253, - 0,79,242,0,82,253,0,83,242,0,109,248,0,113,248,0,115,248,0,117,248, - 69,45,242,46,245,47,242,59,246,60,246,66,249,80,254,98,242,102,242, - 106,245,112,242,118,242,193,249,194,249,195,249,196,249,197,249, - 198,249,211,254,212,254,213,254,214,254,215,254,217,254,225,242, - 226,242,227,242,228,242,229,242,230,242,233,248,234,242,235,242, - 236,248,237,251,238,245,239,251,240,251,243,242,244,242,245,242, - 246,242,247,242,249,242,250,242,251,242,252,242,253,242,0,2,249, - 0,3,242,0,4,249,0,5,242,0,6,249,0,7,242,0,21,248,0,25,242,0,27,242, - 0,29,242,0,45,251,0,49,245,0,78,254,0,79,242,0,82,254,0,83,242,0, - 109,242,0,113,242,0,115,242,0,117,242,4,104,255,0,33,255,0,37,255, - 11,47,250,118,254,250,254,251,254,252,254,253,254,0,109,254,0,113, - 254,0,115,254,0,117,254,4,105,254,108,254,0,57,254,12,45,255,47, - 254,104,250,119,254,120,254,121,254,122,252,254,252,0,1,252,0,33, - 250,0,37,250,8,45,255,47,254,103,254,106,254,0,49,254,0,51,247,1, - 32,25,15,15,45,255,47,254,102,255,104,255,233,255,234,255,235,255, - 236,255,0,21,255,0,25,255,0,27,255,0,29,255,0,33,255,0,37,255,22, - 102,255,112,255,122,255,233,255,234,255,235,255,236,255,243,255, - 244,255,245,255,246,255,247,255,249,255,254,255,0,1,255,0,21,255, - 0,25,255,0,27,255,0,29,255,0,79,255,0,83,255,2,119,250,5,104,255, - 119,255,0,33,255,0,37,255,47,45,238,46,254,47,238,98,254,100,251, - 101,251,102,251,104,251,112,249,114,251,116,255,225,254,226,254, - 227,254,228,254,229,254,230,254,232,251,233,251,234,251,235,251, - 236,251,243,249,244,249,245,249,246,249,247,249,249,249,0,3,254, - 0,5,254,0,7,254,0,9,251,0,15,251,0,19,251,0,21,251,0,25,251,0,27, - 251,0,29,251,0,33,251,0,37,251,0,79,249,0,83,249,0,93,255,0,97,255, - 0,99,255,1,2,25,255,3,45,245,47,245,3,45,245,47,245,3,45,248,47, - 248,50,68,252,72,251,80,250,82,250,85,251,86,249,87,239,88,241,90, - 248,118,254,119,248,120,248,122,248,200,252,211,250,212,250,213, - 250,214,250,215,250,217,250,218,249,219,249,220,249,221,249,222, - 248,250,254,251,254,252,254,253,254,254,248,0,1,248,0,8,252,0,14, - 252,0,32,251,0,36,251,0,78,250,0,82,250,0,100,251,0,102,251,0,108, - 249,0,109,254,0,112,249,0,113,254,0,114,249,0,115,254,0,116,249, - 0,117,254,0,122,248,1,32,25,251,50,68,252,72,251,80,250,82,250,85, - 251,86,249,87,239,88,241,90,248,118,254,119,248,120,248,122,248, - 200,252,211,250,212,250,213,250,214,250,215,250,217,250,218,249, - 219,249,220,249,221,249,222,248,250,254,251,254,252,254,253,254, - 254,248,0,1,248,0,8,252,0,14,252,0,32,251,0,36,251,0,78,250,0,82, - 250,0,100,251,0,102,251,0,108,249,0,109,254,0,112,249,0,113,254, - 0,114,249,0,115,254,0,116,249,0,117,254,0,122,248,1,32,25,251,50, - 68,252,72,251,80,250,82,250,85,251,86,249,87,239,88,241,90,248,118, - 254,119,248,120,248,122,248,200,252,211,250,212,250,213,250,214, - 250,215,250,217,250,218,249,219,249,220,249,221,249,222,248,250, - 254,251,254,252,254,253,254,254,248,0,1,248,0,8,252,0,14,252,0,32, - 251,0,36,251,0,78,250,0,82,250,0,100,251,0,102,251,0,108,249,0,109, - 254,0,112,249,0,113,254,0,114,249,0,115,254,0,116,249,0,117,254, - 0,122,248,1,32,25,251,50,68,252,72,251,80,250,82,250,85,251,86,249, - 87,239,88,241,90,248,118,254,119,248,120,248,122,248,200,252,211, - 250,212,250,213,250,214,250,215,250,217,250,218,249,219,249,220, - 249,221,249,222,248,250,254,251,254,252,254,253,254,254,248,0,1, - 248,0,8,252,0,14,252,0,32,251,0,36,251,0,78,250,0,82,250,0,100,251, - 0,102,251,0,108,249,0,109,254,0,112,249,0,113,254,0,114,249,0,115, - 254,0,116,249,0,117,254,0,122,248,1,32,25,251,50,68,252,72,251,80, - 250,82,250,85,251,86,249,87,239,88,241,90,248,118,254,119,248,120, - 248,122,248,200,252,211,250,212,250,213,250,214,250,215,250,217, - 250,218,249,219,249,220,249,221,249,222,248,250,254,251,254,252, - 254,253,254,254,248,0,1,248,0,8,252,0,14,252,0,32,251,0,36,251,0, - 78,250,0,82,250,0,100,251,0,102,251,0,108,249,0,109,254,0,112,249, - 0,113,254,0,114,249,0,115,254,0,116,249,0,117,254,0,122,248,1,32, - 25,251,50,68,252,72,251,80,250,82,250,85,251,86,249,87,239,88,241, - 90,248,118,254,119,248,120,248,122,248,200,252,211,250,212,250,213, - 250,214,250,215,250,217,250,218,249,219,249,220,249,221,249,222, - 248,250,254,251,254,252,254,253,254,254,248,0,1,248,0,8,252,0,14, - 252,0,32,251,0,36,251,0,78,250,0,82,250,0,100,251,0,102,251,0,108, - 249,0,109,254,0,112,249,0,113,254,0,114,249,0,115,254,0,116,249, - 0,117,254,0,122,248,1,32,25,251,11,66,252,193,252,194,252,195,252, - 196,252,197,252,198,252,0,2,252,0,4,252,0,6,252,20,66,248,85,250, - 87,249,88,249,89,250,90,249,193,248,194,248,195,248,196,248,197, - 248,198,248,222,249,0,2,248,0,4,248,0,6,248,0,100,250,0,102,250, - 0,122,249,20,66,248,85,250,87,249,88,249,89,250,90,249,193,248,194, - 248,195,248,196,248,197,248,198,248,222,249,0,2,248,0,4,248,0,6, - 248,0,100,250,0,102,250,0,122,249,20,66,248,85,250,87,249,88,249, - 89,250,90,249,193,248,194,248,195,248,196,248,197,248,198,248,222, - 249,0,2,248,0,4,248,0,6,248,0,100,250,0,102,250,0,122,249,20,66, - 248,85,250,87,249,88,249,89,250,90,249,193,248,194,248,195,248,196, - 248,197,248,198,248,222,249,0,2,248,0,4,248,0,6,248,0,100,250,0, - 102,250,0,122,249,20,66,248,85,250,87,249,88,249,89,250,90,249,193, - 248,194,248,195,248,196,248,197,248,198,248,222,249,0,2,248,0,4, - 248,0,6,248,0,100,250,0,102,250,0,122,249,20,66,248,85,250,87,249, - 88,249,89,250,90,249,193,248,194,248,195,248,196,248,197,248,198, - 248,222,249,0,2,248,0,4,248,0,6,248,0,100,250,0,102,250,0,122,249, - 13,45,253,47,253,66,250,193,250,194,250,195,250,196,250,197,250, - 198,250,0,2,250,0,4,250,0,6,250,13,45,253,47,253,66,250,193,250, - 194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250, - 13,45,253,47,253,66,250,193,250,194,250,195,250,196,250,197,250, - 198,250,0,2,250,0,4,250,0,6,250,13,45,253,47,253,66,250,193,250, - 194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250, - 69,45,242,46,245,47,242,59,246,60,246,66,249,80,254,98,242,102,242, - 106,245,112,242,118,242,193,249,194,249,195,249,196,249,197,249, - 198,249,211,254,212,254,213,254,214,254,215,254,217,254,225,242, - 226,242,227,242,228,242,229,242,230,242,233,248,234,242,235,242, - 236,248,237,251,238,245,239,251,240,251,243,242,244,242,245,242, - 246,242,247,242,249,242,250,242,251,242,252,242,253,242,0,2,249, - 0,3,242,0,4,249,0,5,242,0,6,249,0,7,242,0,21,248,0,25,242,0,27,242, - 0,29,242,0,45,251,0,49,245,0,78,254,0,79,242,0,82,254,0,83,242,0, - 109,242,0,113,242,0,115,242,0,117,242,4,104,255,0,33,255,0,37,255, - 4,104,255,0,33,255,0,37,255,4,104,255,0,33,255,0,37,255,4,104,255, - 0,33,255,0,37,255,4,104,255,0,33,255,0,37,255,4,104,255,0,33,255, - 0,37,255,4,105,254,108,254,0,57,254,12,45,255,47,254,104,250,119, - 254,120,254,121,254,122,252,254,252,0,1,252,0,33,250,0,37,250,12, - 45,255,47,254,104,250,119,254,120,254,121,254,122,252,254,252,0, - 1,252,0,33,250,0,37,250,12,45,255,47,254,104,250,119,254,120,254, - 121,254,122,252,254,252,0,1,252,0,33,250,0,37,250,12,45,255,47,254, - 104,250,119,254,120,254,121,254,122,252,254,252,0,1,252,0,33,250, - 0,37,250,2,119,250,5,104,255,119,255,0,33,255,0,37,255,5,104,255, - 119,255,0,33,255,0,37,255,5,104,255,119,255,0,33,255,0,37,255,5, - 104,255,119,255,0,33,255,0,37,255,5,104,255,119,255,0,33,255,0,37, - 255,5,104,255,119,255,0,33,255,0,37,255,3,45,248,47,248,3,45,248, - 47,248,50,68,252,72,251,80,250,82,250,85,251,86,249,87,239,88,241, - 90,248,118,254,119,248,120,248,122,248,200,252,211,250,212,250,213, - 250,214,250,215,250,217,250,218,249,219,249,220,249,221,249,222, - 248,250,254,251,254,252,254,253,254,254,248,0,1,248,0,8,252,0,14, - 252,0,32,251,0,36,251,0,78,250,0,82,250,0,100,251,0,102,251,0,108, - 249,0,109,254,0,112,249,0,113,254,0,114,249,0,115,254,0,116,249, - 0,117,254,0,122,248,1,32,25,251,4,104,255,0,33,255,0,37,255,50,68, - 252,72,251,80,250,82,250,85,251,86,249,87,239,88,241,90,248,118, - 254,119,248,120,248,122,248,200,252,211,250,212,250,213,250,214, - 250,215,250,217,250,218,249,219,249,220,249,221,249,222,248,250, - 254,251,254,252,254,253,254,254,248,0,1,248,0,8,252,0,14,252,0,32, - 251,0,36,251,0,78,250,0,82,250,0,100,251,0,102,251,0,108,249,0,109, - 254,0,112,249,0,113,254,0,114,249,0,115,254,0,116,249,0,117,254, - 0,122,248,1,32,25,251,4,104,255,0,33,255,0,37,255,50,68,252,72,251, - 80,250,82,250,85,251,86,249,87,239,88,241,90,248,118,254,119,248, - 120,248,122,248,200,252,211,250,212,250,213,250,214,250,215,250, - 217,250,218,249,219,249,220,249,221,249,222,248,250,254,251,254, - 252,254,253,254,254,248,0,1,248,0,8,252,0,14,252,0,32,251,0,36,251, - 0,78,250,0,82,250,0,100,251,0,102,251,0,108,249,0,109,254,0,112, - 249,0,113,254,0,114,249,0,115,254,0,116,249,0,117,254,0,122,248, - 1,32,25,251,4,104,255,0,33,255,0,37,255,4,105,254,108,254,0,57,254, - 4,105,254,108,254,0,57,254,16,66,251,87,250,88,250,90,250,193,251, - 194,251,195,251,196,251,197,251,198,251,222,250,0,2,251,0,4,251, - 0,6,251,0,122,250,16,66,251,87,250,88,250,90,250,193,251,194,251, - 195,251,196,251,197,251,198,251,222,250,0,2,251,0,4,251,0,6,251, - 0,122,250,12,45,255,47,254,104,250,119,254,120,254,121,254,122,252, - 254,252,0,1,252,0,33,250,0,37,250,12,45,255,47,254,104,250,119,254, - 120,254,121,254,122,252,254,252,0,1,252,0,33,250,0,37,250,12,45, - 255,47,254,104,250,119,254,120,254,121,254,122,252,254,252,0,1,252, - 0,33,250,0,37,250,12,45,255,47,254,104,250,119,254,120,254,121,254, - 122,252,254,252,0,1,252,0,33,250,0,37,250,15,45,255,47,254,102,255, - 104,255,233,255,234,255,235,255,236,255,0,21,255,0,25,255,0,27,255, - 0,29,255,0,33,255,0,37,255,15,45,255,47,254,102,255,104,255,233, - 255,234,255,235,255,236,255,0,21,255,0,25,255,0,27,255,0,29,255, - 0,33,255,0,37,255,40,80,249,102,251,112,250,118,250,122,250,211, - 249,212,249,213,249,214,249,215,249,217,249,233,251,234,251,235, - 251,236,251,243,250,244,250,245,250,246,250,247,250,249,250,250, - 250,251,250,252,250,253,250,254,250,0,1,250,0,21,251,0,25,251,0, - 27,251,0,29,251,0,78,249,0,79,250,0,82,249,0,83,250,0,109,250,0, - 113,250,0,115,250,0,117,250,22,102,255,112,255,122,255,233,255,234, - 255,235,255,236,255,243,255,244,255,245,255,246,255,247,255,249, - 255,254,255,0,1,255,0,21,255,0,25,255,0,27,255,0,29,255,0,79,255, - 0,83,255,13,85,254,87,248,88,248,90,254,122,252,222,254,254,252, - 0,1,252,0,100,254,0,102,254,0,122,254,1,32,25,251,13,85,254,87,248, - 88,248,90,254,122,252,222,254,254,252,0,1,252,0,100,254,0,102,254, - 0,122,254,1,32,25,251,13,85,254,87,248,88,248,90,254,122,252,222, - 254,254,252,0,1,252,0,100,254,0,102,254,0,122,254,1,32,25,251,11, - 66,252,193,252,194,252,195,252,196,252,197,252,198,252,0,2,252,0, - 4,252,0,6,252,2,119,250,11,66,252,193,252,194,252,195,252,196,252, - 197,252,198,252,0,2,252,0,4,252,0,6,252,2,119,250,11,66,252,193, - 252,194,252,195,252,196,252,197,252,198,252,0,2,252,0,4,252,0,6, - 252,2,119,250,20,66,248,85,250,87,249,88,249,89,250,90,249,193,248, - 194,248,195,248,196,248,197,248,198,248,222,249,0,2,248,0,4,248, - 0,6,248,0,100,250,0,102,250,0,122,249,5,104,255,119,255,0,33,255, - 0,37,255,20,66,248,85,250,87,249,88,249,89,250,90,249,193,248,194, - 248,195,248,196,248,197,248,198,248,222,249,0,2,248,0,4,248,0,6, - 248,0,100,250,0,102,250,0,122,249,5,104,255,119,255,0,33,255,0,37, - 255,24,80,250,86,250,87,254,88,254,90,254,211,250,212,250,213,250, - 214,250,215,250,217,250,218,250,219,250,220,250,221,250,222,254, - 0,78,250,0,82,250,0,108,250,0,112,250,0,114,250,0,116,250,0,122, - 254,47,45,238,46,254,47,238,98,254,100,251,101,251,102,251,104,251, - 112,249,114,251,116,255,225,254,226,254,227,254,228,254,229,254, - 230,254,232,251,233,251,234,251,235,251,236,251,243,249,244,249, - 245,249,246,249,247,249,249,249,0,3,254,0,5,254,0,7,254,0,9,251, - 0,15,251,0,19,251,0,21,251,0,25,251,0,27,251,0,29,251,0,33,251,0, - 37,251,0,79,249,0,83,249,0,93,255,0,97,255,0,99,255,1,2,25,255,24, - 80,250,86,250,87,254,88,254,90,254,211,250,212,250,213,250,214,250, - 215,250,217,250,218,250,219,250,220,250,221,250,222,254,0,78,250, - 0,82,250,0,108,250,0,112,250,0,114,250,0,116,250,0,122,254,47,45, - 238,46,254,47,238,98,254,100,251,101,251,102,251,104,251,112,249, - 114,251,116,255,225,254,226,254,227,254,228,254,229,254,230,254, - 232,251,233,251,234,251,235,251,236,251,243,249,244,249,245,249, - 246,249,247,249,249,249,0,3,254,0,5,254,0,7,254,0,9,251,0,15,251, - 0,19,251,0,21,251,0,25,251,0,27,251,0,29,251,0,33,251,0,37,251,0, - 79,249,0,83,249,0,93,255,0,97,255,0,99,255,1,2,25,255,24,80,250, - 86,250,87,254,88,254,90,254,211,250,212,250,213,250,214,250,215, - 250,217,250,218,250,219,250,220,250,221,250,222,254,0,78,250,0,82, - 250,0,108,250,0,112,250,0,114,250,0,116,250,0,122,254,47,45,238, - 46,254,47,238,98,254,100,251,101,251,102,251,104,251,112,249,114, - 251,116,255,225,254,226,254,227,254,228,254,229,254,230,254,232, - 251,233,251,234,251,235,251,236,251,243,249,244,249,245,249,246, - 249,247,249,249,249,0,3,254,0,5,254,0,7,254,0,9,251,0,15,251,0,19, - 251,0,21,251,0,25,251,0,27,251,0,29,251,0,33,251,0,37,251,0,79,249, - 0,83,249,0,93,255,0,97,255,0,99,255,1,2,25,255,73,45,245,46,245, - 47,245,59,248,60,246,66,249,80,254,98,242,102,242,106,248,112,242, - 115,248,118,248,120,245,122,245,193,249,194,249,195,249,196,249, - 197,249,198,249,211,254,212,254,213,254,214,254,215,254,217,254, - 225,242,226,242,227,242,228,242,229,242,230,242,233,248,234,242, - 235,248,236,248,238,248,243,242,244,242,245,242,246,242,247,242, - 249,242,250,248,251,248,252,248,253,248,254,245,0,1,251,0,2,249, - 0,3,242,0,4,249,0,5,242,0,6,249,0,7,242,0,21,248,0,25,242,0,27,242, - 0,29,242,0,49,248,0,78,254,0,79,242,0,82,254,0,83,242,0,87,248,0, - 89,248,0,91,248,0,109,248,0,113,248,0,115,248,0,117,248,73,45,245, - 46,245,47,245,59,248,60,246,66,249,80,254,98,242,102,242,106,248, - 112,242,115,248,118,248,120,245,122,245,193,249,194,249,195,249, - 196,249,197,249,198,249,211,254,212,254,213,254,214,254,215,254, - 217,254,225,242,226,242,227,242,228,242,229,242,230,242,233,248, - 234,242,235,248,236,248,238,248,243,242,244,242,245,242,246,242, - 247,242,249,242,250,248,251,248,252,248,253,248,254,245,0,1,251, - 0,2,249,0,3,242,0,4,249,0,5,242,0,6,249,0,7,242,0,21,248,0,25,242, - 0,27,242,0,29,242,0,49,248,0,78,254,0,79,242,0,82,254,0,83,242,0, - 87,248,0,89,248,0,91,248,0,109,248,0,113,248,0,115,248,0,117,248, - 13,45,253,47,253,66,250,193,250,194,250,195,250,196,250,197,250, - 198,250,0,2,250,0,4,250,0,6,250,13,45,253,47,253,66,250,193,250, - 194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250, - 13,45,253,47,253,66,250,193,250,194,250,195,250,196,250,197,250, - 198,250,0,2,250,0,4,250,0,6,250,13,45,253,47,253,66,250,193,250, - 194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250, - 69,45,242,46,245,47,242,59,246,60,246,66,249,80,254,98,242,102,242, - 106,245,112,242,118,242,193,249,194,249,195,249,196,249,197,249, - 198,249,211,254,212,254,213,254,214,254,215,254,217,254,225,242, - 226,242,227,242,228,242,229,242,230,242,233,248,234,242,235,242, - 236,248,237,251,238,245,239,251,240,251,243,242,244,242,245,242, - 246,242,247,242,249,242,250,242,251,242,252,242,253,242,0,2,249, - 0,3,242,0,4,249,0,5,242,0,6,249,0,7,242,0,21,248,0,25,242,0,27,242, - 0,29,242,0,45,251,0,49,245,0,78,254,0,79,242,0,82,254,0,83,242,0, - 109,242,0,113,242,0,115,242,0,117,242,2,1,32,24,238,17,33,238,101, - 253,115,253,116,250,117,252,119,255,0,19,253,0,87,253,0,89,253,0, - 91,253,0,93,250,0,97,250,0,99,250,0,101,252,1,2,25,250,1,32,25,238 +static afm_cuint8 afm_Times_Italic_kerning_data[] = { /* 5584 */ + 42, 19, 66, 254, 85, 254, 87, 251, 88, 250, 90, 244, 193, 254, 194, 254, + 195, 254, + 196, 254, 197, 254, 198, 254, 222, 244, 0, 2, 254, 0, 4, 254, 0, 6, 254, + 0, 100, 254, + 0, 102, 254, 0, 122, 244, 3, 1, 32, 25, 234, 1, 32, 29, 234, 3, 1, 32, 25, + 234, 1, 32, + 29, 234, 50, 68, 252, 72, 251, 80, 250, 82, 250, 85, 251, 86, 249, 87, + 239, 88, 241, + 90, 248, 118, 254, 119, 248, 120, 248, 122, 248, 200, 252, 211, 250, 212, + 250, 213, + 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 248, 250, 254, 251, 254, 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, + 252, 0, 14, + 252, 0, 32, 251, 0, 36, 251, 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, + 251, 0, 108, + 249, 0, 109, 254, 0, 112, 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, + 116, 249, + 0, 117, 254, 0, 122, 248, 1, 32, 25, 251, 20, 66, 253, 86, 255, 193, 253, + 194, 253, + 195, 253, 196, 253, 197, 253, 198, 253, 218, 255, 219, 255, 220, 255, 221, + 255, + 0, 2, 253, 0, 4, 253, 0, 6, 253, 0, 108, 255, 0, 112, 255, 0, 114, 255, 0, + 116, 255, + 16, 66, 251, 87, 250, 88, 250, 90, 250, 193, 251, 194, 251, 195, 251, 196, + 251, 197, + 251, 198, 251, 222, 250, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, 122, 250, 52, + 45, 234, + 47, 234, 66, 238, 98, 244, 102, 244, 106, 249, 112, 239, 115, 248, 193, + 238, 194, + 238, 195, 238, 196, 238, 197, 238, 198, 238, 225, 244, 226, 244, 227, 244, + 228, + 244, 229, 244, 230, 244, 233, 244, 234, 244, 235, 244, 236, 244, 237, 249, + 238, + 249, 239, 249, 240, 249, 243, 239, 244, 239, 245, 239, 246, 239, 247, 239, + 249, + 239, 0, 2, 238, 0, 3, 244, 0, 4, 238, 0, 5, 244, 0, 6, 238, 0, 7, 244, 0, + 21, 244, 0, 25, + 244, 0, 27, 244, 0, 29, 244, 0, 45, 249, 0, 49, 249, 0, 79, 239, 0, 83, + 239, 0, 87, 248, + 0, 89, 248, 0, 91, 248, 50, 45, 253, 47, 253, 66, 250, 98, 251, 102, 253, + 112, 253, + 118, 251, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 225, + 251, + 226, 251, 227, 251, 228, 251, 229, 251, 230, 251, 233, 253, 234, 253, 235, + 253, + 236, 253, 243, 253, 244, 253, 245, 253, 246, 253, 247, 253, 249, 253, 250, + 251, + 251, 251, 252, 251, 253, 251, 0, 2, 250, 0, 3, 251, 0, 4, 250, 0, 5, 251, + 0, 6, 250, + 0, 7, 251, 0, 21, 253, 0, 25, 253, 0, 27, 253, 0, 29, 253, 0, 79, 253, 0, + 83, 253, 0, + 109, 251, 0, 113, 251, 0, 115, 251, 0, 117, 251, 40, 80, 249, 102, 251, + 112, 250, + 118, 250, 122, 250, 211, 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, + 249, + 233, 251, 234, 251, 235, 251, 236, 251, 243, 250, 244, 250, 245, 250, 246, + 250, + 247, 250, 249, 250, 250, 250, 251, 250, 252, 250, 253, 250, 254, 250, 0, + 1, 250, + 0, 21, 251, 0, 25, 251, 0, 27, 251, 0, 29, 251, 0, 78, 249, 0, 79, 250, 0, + 82, 249, 0, + 83, 250, 0, 109, 250, 0, 113, 250, 0, 115, 250, 0, 117, 250, 13, 85, 254, + 87, 248, + 88, 248, 90, 254, 122, 252, 222, 254, 254, 252, 0, 1, 252, 0, 100, 254, 0, + 102, 254, + 0, 122, 254, 1, 32, 25, 251, 11, 66, 252, 193, 252, 194, 252, 195, 252, + 196, 252, + 197, 252, 198, 252, 0, 2, 252, 0, 4, 252, 0, 6, 252, 20, 66, 248, 85, 250, + 87, 249, + 88, 249, 89, 250, 90, 249, 193, 248, 194, 248, 195, 248, 196, 248, 197, + 248, 198, + 248, 222, 249, 0, 2, 248, 0, 4, 248, 0, 6, 248, 0, 100, 250, 0, 102, 250, + 0, 122, 249, + 41, 45, 234, 47, 234, 66, 242, 98, 244, 102, 244, 112, 244, 193, 242, 194, + 242, 195, + 242, 196, 242, 197, 242, 198, 242, 225, 244, 226, 244, 227, 244, 228, 244, + 229, + 244, 230, 244, 233, 244, 234, 244, 235, 244, 236, 244, 243, 244, 244, 244, + 245, + 244, 246, 244, 247, 244, 249, 244, 0, 2, 242, 0, 3, 244, 0, 4, 242, 0, 5, + 244, 0, 6, + 242, 0, 7, 244, 0, 21, 244, 0, 25, 244, 0, 27, 244, 0, 29, 244, 0, 79, + 244, 0, 83, 244, + 10, 86, 255, 218, 255, 219, 255, 220, 255, 221, 255, 0, 108, 255, 0, 112, + 255, 0, + 114, 255, 0, 116, 255, 24, 80, 250, 86, 250, 87, 254, 88, 254, 90, 254, + 211, 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, + 250, + 221, 250, 222, 254, 0, 78, 250, 0, 82, 250, 0, 108, 250, 0, 112, 250, 0, + 114, 250, + 0, 116, 250, 0, 122, 254, 73, 45, 245, 46, 245, 47, 245, 59, 248, 60, 246, + 66, 249, + 80, 254, 98, 242, 102, 242, 106, 248, 112, 242, 115, 248, 118, 248, 120, + 245, 122, + 245, 193, 249, 194, 249, 195, 249, 196, 249, 197, 249, 198, 249, 211, 254, + 212, + 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 242, 226, 242, 227, 242, + 228, + 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, 248, 236, 248, 238, 248, + 243, + 242, 244, 242, 245, 242, 246, 242, 247, 242, 249, 242, 250, 248, 251, 248, + 252, + 248, 253, 248, 254, 245, 0, 1, 251, 0, 2, 249, 0, 3, 242, 0, 4, 249, 0, 5, + 242, 0, 6, + 249, 0, 7, 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, 29, 242, 0, 49, + 248, 0, 78, 254, + 0, 79, 242, 0, 82, 254, 0, 83, 242, 0, 87, 248, 0, 89, 248, 0, 91, 248, 0, + 109, 248, + 0, 113, 248, 0, 115, 248, 0, 117, 248, 13, 45, 253, 47, 253, 66, 250, 193, + 250, 194, + 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, + 250, 69, 45, + 235, 46, 248, 47, 235, 59, 246, 60, 245, 66, 247, 80, 252, 98, 238, 102, + 238, 106, + 245, 112, 238, 118, 245, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, + 198, + 247, 211, 252, 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 225, 238, + 226, + 238, 227, 238, 228, 238, 229, 238, 230, 238, 233, 245, 234, 238, 235, 238, + 236, + 245, 237, 251, 238, 245, 239, 251, 240, 251, 243, 238, 244, 238, 245, 238, + 246, + 238, 247, 238, 249, 238, 250, 245, 251, 245, 252, 245, 253, 245, 0, 2, + 247, 0, 3, + 238, 0, 4, 247, 0, 5, 238, 0, 6, 247, 0, 7, 238, 0, 21, 245, 0, 25, 238, + 0, 27, 238, 0, + 29, 238, 0, 45, 251, 0, 49, 245, 0, 78, 252, 0, 79, 238, 0, 82, 252, 0, + 83, 238, 0, 109, + 245, 0, 113, 245, 0, 115, 245, 0, 117, 245, 68, 45, 242, 46, 251, 47, 242, + 59, 246, + 60, 246, 66, 247, 80, 253, 98, 242, 102, 242, 106, 248, 112, 242, 118, + 248, 122, + 245, 193, 247, 194, 247, 195, 247, 196, 247, 197, 247, 198, 247, 211, 253, + 212, + 253, 213, 253, 214, 253, 215, 253, 217, 253, 225, 242, 226, 242, 227, 242, + 228, + 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, 242, 236, 248, 238, 248, + 243, + 242, 244, 242, 245, 242, 246, 242, 247, 242, 249, 242, 250, 248, 251, 248, + 252, + 248, 253, 248, 254, 245, 0, 1, 245, 0, 2, 247, 0, 3, 242, 0, 4, 247, 0, 5, + 242, 0, 6, + 247, 0, 7, 242, 0, 21, 248, 0, 25, 242, 0, 27, 242, 0, 29, 242, 0, 49, + 248, 0, 78, 253, + 0, 79, 242, 0, 82, 253, 0, 83, 242, 0, 109, 248, 0, 113, 248, 0, 115, 248, + 0, 117, 248, + 69, 45, 242, 46, 245, 47, 242, 59, 246, 60, 246, 66, 249, 80, 254, 98, + 242, 102, 242, + 106, 245, 112, 242, 118, 242, 193, 249, 194, 249, 195, 249, 196, 249, 197, + 249, + 198, 249, 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, + 242, + 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, + 242, + 236, 248, 237, 251, 238, 245, 239, 251, 240, 251, 243, 242, 244, 242, 245, + 242, + 246, 242, 247, 242, 249, 242, 250, 242, 251, 242, 252, 242, 253, 242, 0, + 2, 249, + 0, 3, 242, 0, 4, 249, 0, 5, 242, 0, 6, 249, 0, 7, 242, 0, 21, 248, 0, 25, + 242, 0, 27, 242, + 0, 29, 242, 0, 45, 251, 0, 49, 245, 0, 78, 254, 0, 79, 242, 0, 82, 254, 0, + 83, 242, 0, + 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 4, 104, 255, 0, 33, 255, + 0, 37, 255, + 11, 47, 250, 118, 254, 250, 254, 251, 254, 252, 254, 253, 254, 0, 109, + 254, 0, 113, + 254, 0, 115, 254, 0, 117, 254, 4, 105, 254, 108, 254, 0, 57, 254, 12, 45, + 255, 47, + 254, 104, 250, 119, 254, 120, 254, 121, 254, 122, 252, 254, 252, 0, 1, + 252, 0, 33, + 250, 0, 37, 250, 8, 45, 255, 47, 254, 103, 254, 106, 254, 0, 49, 254, 0, + 51, 247, 1, + 32, 25, 15, 15, 45, 255, 47, 254, 102, 255, 104, 255, 233, 255, 234, 255, + 235, 255, + 236, 255, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 33, 255, 0, + 37, 255, 22, + 102, 255, 112, 255, 122, 255, 233, 255, 234, 255, 235, 255, 236, 255, 243, + 255, + 244, 255, 245, 255, 246, 255, 247, 255, 249, 255, 254, 255, 0, 1, 255, 0, + 21, 255, + 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 255, 0, 83, 255, 2, 119, 250, + 5, 104, 255, + 119, 255, 0, 33, 255, 0, 37, 255, 47, 45, 238, 46, 254, 47, 238, 98, 254, + 100, 251, + 101, 251, 102, 251, 104, 251, 112, 249, 114, 251, 116, 255, 225, 254, 226, + 254, + 227, 254, 228, 254, 229, 254, 230, 254, 232, 251, 233, 251, 234, 251, 235, + 251, + 236, 251, 243, 249, 244, 249, 245, 249, 246, 249, 247, 249, 249, 249, 0, + 3, 254, + 0, 5, 254, 0, 7, 254, 0, 9, 251, 0, 15, 251, 0, 19, 251, 0, 21, 251, 0, + 25, 251, 0, 27, + 251, 0, 29, 251, 0, 33, 251, 0, 37, 251, 0, 79, 249, 0, 83, 249, 0, 93, + 255, 0, 97, 255, + 0, 99, 255, 1, 2, 25, 255, 3, 45, 245, 47, 245, 3, 45, 245, 47, 245, 3, + 45, 248, 47, + 248, 50, 68, 252, 72, 251, 80, 250, 82, 250, 85, 251, 86, 249, 87, 239, + 88, 241, 90, + 248, 118, 254, 119, 248, 120, 248, 122, 248, 200, 252, 211, 250, 212, 250, + 213, + 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 248, 250, 254, 251, 254, 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, + 252, 0, 14, + 252, 0, 32, 251, 0, 36, 251, 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, + 251, 0, 108, + 249, 0, 109, 254, 0, 112, 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, + 116, 249, + 0, 117, 254, 0, 122, 248, 1, 32, 25, 251, 50, 68, 252, 72, 251, 80, 250, + 82, 250, 85, + 251, 86, 249, 87, 239, 88, 241, 90, 248, 118, 254, 119, 248, 120, 248, + 122, 248, + 200, 252, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, + 249, + 219, 249, 220, 249, 221, 249, 222, 248, 250, 254, 251, 254, 252, 254, 253, + 254, + 254, 248, 0, 1, 248, 0, 8, 252, 0, 14, 252, 0, 32, 251, 0, 36, 251, 0, 78, + 250, 0, 82, + 250, 0, 100, 251, 0, 102, 251, 0, 108, 249, 0, 109, 254, 0, 112, 249, 0, + 113, 254, + 0, 114, 249, 0, 115, 254, 0, 116, 249, 0, 117, 254, 0, 122, 248, 1, 32, + 25, 251, 50, + 68, 252, 72, 251, 80, 250, 82, 250, 85, 251, 86, 249, 87, 239, 88, 241, + 90, 248, 118, + 254, 119, 248, 120, 248, 122, 248, 200, 252, 211, 250, 212, 250, 213, 250, + 214, + 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 248, + 250, + 254, 251, 254, 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, 252, 0, 14, + 252, 0, 32, + 251, 0, 36, 251, 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, 251, 0, 108, + 249, 0, 109, + 254, 0, 112, 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, 116, 249, 0, + 117, 254, + 0, 122, 248, 1, 32, 25, 251, 50, 68, 252, 72, 251, 80, 250, 82, 250, 85, + 251, 86, 249, + 87, 239, 88, 241, 90, 248, 118, 254, 119, 248, 120, 248, 122, 248, 200, + 252, 211, + 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, + 220, + 249, 221, 249, 222, 248, 250, 254, 251, 254, 252, 254, 253, 254, 254, 248, + 0, 1, + 248, 0, 8, 252, 0, 14, 252, 0, 32, 251, 0, 36, 251, 0, 78, 250, 0, 82, + 250, 0, 100, 251, + 0, 102, 251, 0, 108, 249, 0, 109, 254, 0, 112, 249, 0, 113, 254, 0, 114, + 249, 0, 115, + 254, 0, 116, 249, 0, 117, 254, 0, 122, 248, 1, 32, 25, 251, 50, 68, 252, + 72, 251, 80, + 250, 82, 250, 85, 251, 86, 249, 87, 239, 88, 241, 90, 248, 118, 254, 119, + 248, 120, + 248, 122, 248, 200, 252, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, + 217, + 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 248, 250, 254, 251, 254, + 252, + 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, 252, 0, 14, 252, 0, 32, 251, 0, + 36, 251, 0, + 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, 251, 0, 108, 249, 0, 109, 254, + 0, 112, 249, + 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, 116, 249, 0, 117, 254, 0, 122, + 248, 1, 32, + 25, 251, 50, 68, 252, 72, 251, 80, 250, 82, 250, 85, 251, 86, 249, 87, + 239, 88, 241, + 90, 248, 118, 254, 119, 248, 120, 248, 122, 248, 200, 252, 211, 250, 212, + 250, 213, + 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 248, 250, 254, 251, 254, 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, + 252, 0, 14, + 252, 0, 32, 251, 0, 36, 251, 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, + 251, 0, 108, + 249, 0, 109, 254, 0, 112, 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, + 116, 249, + 0, 117, 254, 0, 122, 248, 1, 32, 25, 251, 11, 66, 252, 193, 252, 194, 252, + 195, 252, + 196, 252, 197, 252, 198, 252, 0, 2, 252, 0, 4, 252, 0, 6, 252, 20, 66, + 248, 85, 250, + 87, 249, 88, 249, 89, 250, 90, 249, 193, 248, 194, 248, 195, 248, 196, + 248, 197, + 248, 198, 248, 222, 249, 0, 2, 248, 0, 4, 248, 0, 6, 248, 0, 100, 250, 0, + 102, 250, + 0, 122, 249, 20, 66, 248, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, + 193, 248, 194, + 248, 195, 248, 196, 248, 197, 248, 198, 248, 222, 249, 0, 2, 248, 0, 4, + 248, 0, 6, + 248, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, 66, 248, 85, 250, 87, 249, + 88, 249, + 89, 250, 90, 249, 193, 248, 194, 248, 195, 248, 196, 248, 197, 248, 198, + 248, 222, + 249, 0, 2, 248, 0, 4, 248, 0, 6, 248, 0, 100, 250, 0, 102, 250, 0, 122, + 249, 20, 66, + 248, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, 193, 248, 194, 248, 195, + 248, 196, + 248, 197, 248, 198, 248, 222, 249, 0, 2, 248, 0, 4, 248, 0, 6, 248, 0, + 100, 250, 0, + 102, 250, 0, 122, 249, 20, 66, 248, 85, 250, 87, 249, 88, 249, 89, 250, + 90, 249, 193, + 248, 194, 248, 195, 248, 196, 248, 197, 248, 198, 248, 222, 249, 0, 2, + 248, 0, 4, + 248, 0, 6, 248, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, 66, 248, 85, + 250, 87, 249, + 88, 249, 89, 250, 90, 249, 193, 248, 194, 248, 195, 248, 196, 248, 197, + 248, 198, + 248, 222, 249, 0, 2, 248, 0, 4, 248, 0, 6, 248, 0, 100, 250, 0, 102, 250, + 0, 122, 249, + 13, 45, 253, 47, 253, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, + 197, 250, + 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 253, 47, 253, 66, 250, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, + 6, 250, + 13, 45, 253, 47, 253, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, + 197, 250, + 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 253, 47, 253, 66, 250, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, + 6, 250, + 69, 45, 242, 46, 245, 47, 242, 59, 246, 60, 246, 66, 249, 80, 254, 98, + 242, 102, 242, + 106, 245, 112, 242, 118, 242, 193, 249, 194, 249, 195, 249, 196, 249, 197, + 249, + 198, 249, 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, + 242, + 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, + 242, + 236, 248, 237, 251, 238, 245, 239, 251, 240, 251, 243, 242, 244, 242, 245, + 242, + 246, 242, 247, 242, 249, 242, 250, 242, 251, 242, 252, 242, 253, 242, 0, + 2, 249, + 0, 3, 242, 0, 4, 249, 0, 5, 242, 0, 6, 249, 0, 7, 242, 0, 21, 248, 0, 25, + 242, 0, 27, 242, + 0, 29, 242, 0, 45, 251, 0, 49, 245, 0, 78, 254, 0, 79, 242, 0, 82, 254, 0, + 83, 242, 0, + 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 4, 104, 255, 0, 33, 255, + 0, 37, 255, + 4, 104, 255, 0, 33, 255, 0, 37, 255, 4, 104, 255, 0, 33, 255, 0, 37, 255, + 4, 104, 255, + 0, 33, 255, 0, 37, 255, 4, 104, 255, 0, 33, 255, 0, 37, 255, 4, 104, 255, + 0, 33, 255, + 0, 37, 255, 4, 105, 254, 108, 254, 0, 57, 254, 12, 45, 255, 47, 254, 104, + 250, 119, + 254, 120, 254, 121, 254, 122, 252, 254, 252, 0, 1, 252, 0, 33, 250, 0, 37, + 250, 12, + 45, 255, 47, 254, 104, 250, 119, 254, 120, 254, 121, 254, 122, 252, 254, + 252, 0, + 1, 252, 0, 33, 250, 0, 37, 250, 12, 45, 255, 47, 254, 104, 250, 119, 254, + 120, 254, + 121, 254, 122, 252, 254, 252, 0, 1, 252, 0, 33, 250, 0, 37, 250, 12, 45, + 255, 47, 254, + 104, 250, 119, 254, 120, 254, 121, 254, 122, 252, 254, 252, 0, 1, 252, 0, + 33, 250, + 0, 37, 250, 2, 119, 250, 5, 104, 255, 119, 255, 0, 33, 255, 0, 37, 255, 5, + 104, 255, + 119, 255, 0, 33, 255, 0, 37, 255, 5, 104, 255, 119, 255, 0, 33, 255, 0, + 37, 255, 5, + 104, 255, 119, 255, 0, 33, 255, 0, 37, 255, 5, 104, 255, 119, 255, 0, 33, + 255, 0, 37, + 255, 5, 104, 255, 119, 255, 0, 33, 255, 0, 37, 255, 3, 45, 248, 47, 248, + 3, 45, 248, + 47, 248, 50, 68, 252, 72, 251, 80, 250, 82, 250, 85, 251, 86, 249, 87, + 239, 88, 241, + 90, 248, 118, 254, 119, 248, 120, 248, 122, 248, 200, 252, 211, 250, 212, + 250, 213, + 250, 214, 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, + 222, + 248, 250, 254, 251, 254, 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, + 252, 0, 14, + 252, 0, 32, 251, 0, 36, 251, 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, + 251, 0, 108, + 249, 0, 109, 254, 0, 112, 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, + 116, 249, + 0, 117, 254, 0, 122, 248, 1, 32, 25, 251, 4, 104, 255, 0, 33, 255, 0, 37, + 255, 50, 68, + 252, 72, 251, 80, 250, 82, 250, 85, 251, 86, 249, 87, 239, 88, 241, 90, + 248, 118, + 254, 119, 248, 120, 248, 122, 248, 200, 252, 211, 250, 212, 250, 213, 250, + 214, + 250, 215, 250, 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 248, + 250, + 254, 251, 254, 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, 252, 0, 14, + 252, 0, 32, + 251, 0, 36, 251, 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, 251, 0, 108, + 249, 0, 109, + 254, 0, 112, 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, 116, 249, 0, + 117, 254, + 0, 122, 248, 1, 32, 25, 251, 4, 104, 255, 0, 33, 255, 0, 37, 255, 50, 68, + 252, 72, 251, + 80, 250, 82, 250, 85, 251, 86, 249, 87, 239, 88, 241, 90, 248, 118, 254, + 119, 248, + 120, 248, 122, 248, 200, 252, 211, 250, 212, 250, 213, 250, 214, 250, 215, + 250, + 217, 250, 218, 249, 219, 249, 220, 249, 221, 249, 222, 248, 250, 254, 251, + 254, + 252, 254, 253, 254, 254, 248, 0, 1, 248, 0, 8, 252, 0, 14, 252, 0, 32, + 251, 0, 36, 251, + 0, 78, 250, 0, 82, 250, 0, 100, 251, 0, 102, 251, 0, 108, 249, 0, 109, + 254, 0, 112, + 249, 0, 113, 254, 0, 114, 249, 0, 115, 254, 0, 116, 249, 0, 117, 254, 0, + 122, 248, + 1, 32, 25, 251, 4, 104, 255, 0, 33, 255, 0, 37, 255, 4, 105, 254, 108, + 254, 0, 57, 254, + 4, 105, 254, 108, 254, 0, 57, 254, 16, 66, 251, 87, 250, 88, 250, 90, 250, + 193, 251, + 194, 251, 195, 251, 196, 251, 197, 251, 198, 251, 222, 250, 0, 2, 251, 0, + 4, 251, + 0, 6, 251, 0, 122, 250, 16, 66, 251, 87, 250, 88, 250, 90, 250, 193, 251, + 194, 251, + 195, 251, 196, 251, 197, 251, 198, 251, 222, 250, 0, 2, 251, 0, 4, 251, 0, + 6, 251, + 0, 122, 250, 12, 45, 255, 47, 254, 104, 250, 119, 254, 120, 254, 121, 254, + 122, 252, + 254, 252, 0, 1, 252, 0, 33, 250, 0, 37, 250, 12, 45, 255, 47, 254, 104, + 250, 119, 254, + 120, 254, 121, 254, 122, 252, 254, 252, 0, 1, 252, 0, 33, 250, 0, 37, 250, + 12, 45, + 255, 47, 254, 104, 250, 119, 254, 120, 254, 121, 254, 122, 252, 254, 252, + 0, 1, 252, + 0, 33, 250, 0, 37, 250, 12, 45, 255, 47, 254, 104, 250, 119, 254, 120, + 254, 121, 254, + 122, 252, 254, 252, 0, 1, 252, 0, 33, 250, 0, 37, 250, 15, 45, 255, 47, + 254, 102, 255, + 104, 255, 233, 255, 234, 255, 235, 255, 236, 255, 0, 21, 255, 0, 25, 255, + 0, 27, 255, + 0, 29, 255, 0, 33, 255, 0, 37, 255, 15, 45, 255, 47, 254, 102, 255, 104, + 255, 233, + 255, 234, 255, 235, 255, 236, 255, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, + 29, 255, + 0, 33, 255, 0, 37, 255, 40, 80, 249, 102, 251, 112, 250, 118, 250, 122, + 250, 211, + 249, 212, 249, 213, 249, 214, 249, 215, 249, 217, 249, 233, 251, 234, 251, + 235, + 251, 236, 251, 243, 250, 244, 250, 245, 250, 246, 250, 247, 250, 249, 250, + 250, + 250, 251, 250, 252, 250, 253, 250, 254, 250, 0, 1, 250, 0, 21, 251, 0, 25, + 251, 0, + 27, 251, 0, 29, 251, 0, 78, 249, 0, 79, 250, 0, 82, 249, 0, 83, 250, 0, + 109, 250, 0, + 113, 250, 0, 115, 250, 0, 117, 250, 22, 102, 255, 112, 255, 122, 255, 233, + 255, 234, + 255, 235, 255, 236, 255, 243, 255, 244, 255, 245, 255, 246, 255, 247, 255, + 249, + 255, 254, 255, 0, 1, 255, 0, 21, 255, 0, 25, 255, 0, 27, 255, 0, 29, 255, + 0, 79, 255, + 0, 83, 255, 13, 85, 254, 87, 248, 88, 248, 90, 254, 122, 252, 222, 254, + 254, 252, + 0, 1, 252, 0, 100, 254, 0, 102, 254, 0, 122, 254, 1, 32, 25, 251, 13, 85, + 254, 87, 248, + 88, 248, 90, 254, 122, 252, 222, 254, 254, 252, 0, 1, 252, 0, 100, 254, 0, + 102, 254, + 0, 122, 254, 1, 32, 25, 251, 13, 85, 254, 87, 248, 88, 248, 90, 254, 122, + 252, 222, + 254, 254, 252, 0, 1, 252, 0, 100, 254, 0, 102, 254, 0, 122, 254, 1, 32, + 25, 251, 11, + 66, 252, 193, 252, 194, 252, 195, 252, 196, 252, 197, 252, 198, 252, 0, 2, + 252, 0, + 4, 252, 0, 6, 252, 2, 119, 250, 11, 66, 252, 193, 252, 194, 252, 195, 252, + 196, 252, + 197, 252, 198, 252, 0, 2, 252, 0, 4, 252, 0, 6, 252, 2, 119, 250, 11, 66, + 252, 193, + 252, 194, 252, 195, 252, 196, 252, 197, 252, 198, 252, 0, 2, 252, 0, 4, + 252, 0, 6, + 252, 2, 119, 250, 20, 66, 248, 85, 250, 87, 249, 88, 249, 89, 250, 90, + 249, 193, 248, + 194, 248, 195, 248, 196, 248, 197, 248, 198, 248, 222, 249, 0, 2, 248, 0, + 4, 248, + 0, 6, 248, 0, 100, 250, 0, 102, 250, 0, 122, 249, 5, 104, 255, 119, 255, + 0, 33, 255, + 0, 37, 255, 20, 66, 248, 85, 250, 87, 249, 88, 249, 89, 250, 90, 249, 193, + 248, 194, + 248, 195, 248, 196, 248, 197, 248, 198, 248, 222, 249, 0, 2, 248, 0, 4, + 248, 0, 6, + 248, 0, 100, 250, 0, 102, 250, 0, 122, 249, 5, 104, 255, 119, 255, 0, 33, + 255, 0, 37, + 255, 24, 80, 250, 86, 250, 87, 254, 88, 254, 90, 254, 211, 250, 212, 250, + 213, 250, + 214, 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, 222, + 254, + 0, 78, 250, 0, 82, 250, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, 116, + 250, 0, 122, + 254, 47, 45, 238, 46, 254, 47, 238, 98, 254, 100, 251, 101, 251, 102, 251, + 104, 251, + 112, 249, 114, 251, 116, 255, 225, 254, 226, 254, 227, 254, 228, 254, 229, + 254, + 230, 254, 232, 251, 233, 251, 234, 251, 235, 251, 236, 251, 243, 249, 244, + 249, + 245, 249, 246, 249, 247, 249, 249, 249, 0, 3, 254, 0, 5, 254, 0, 7, 254, + 0, 9, 251, + 0, 15, 251, 0, 19, 251, 0, 21, 251, 0, 25, 251, 0, 27, 251, 0, 29, 251, 0, + 33, 251, 0, + 37, 251, 0, 79, 249, 0, 83, 249, 0, 93, 255, 0, 97, 255, 0, 99, 255, 1, 2, + 25, 255, 24, + 80, 250, 86, 250, 87, 254, 88, 254, 90, 254, 211, 250, 212, 250, 213, 250, + 214, 250, + 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, 222, 254, 0, + 78, 250, + 0, 82, 250, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, 116, 250, 0, 122, + 254, 47, 45, + 238, 46, 254, 47, 238, 98, 254, 100, 251, 101, 251, 102, 251, 104, 251, + 112, 249, + 114, 251, 116, 255, 225, 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, + 254, + 232, 251, 233, 251, 234, 251, 235, 251, 236, 251, 243, 249, 244, 249, 245, + 249, + 246, 249, 247, 249, 249, 249, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 9, 251, + 0, 15, 251, + 0, 19, 251, 0, 21, 251, 0, 25, 251, 0, 27, 251, 0, 29, 251, 0, 33, 251, 0, + 37, 251, 0, + 79, 249, 0, 83, 249, 0, 93, 255, 0, 97, 255, 0, 99, 255, 1, 2, 25, 255, + 24, 80, 250, + 86, 250, 87, 254, 88, 254, 90, 254, 211, 250, 212, 250, 213, 250, 214, + 250, 215, + 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, 222, 254, 0, 78, + 250, 0, 82, + 250, 0, 108, 250, 0, 112, 250, 0, 114, 250, 0, 116, 250, 0, 122, 254, 47, + 45, 238, + 46, 254, 47, 238, 98, 254, 100, 251, 101, 251, 102, 251, 104, 251, 112, + 249, 114, + 251, 116, 255, 225, 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, + 232, + 251, 233, 251, 234, 251, 235, 251, 236, 251, 243, 249, 244, 249, 245, 249, + 246, + 249, 247, 249, 249, 249, 0, 3, 254, 0, 5, 254, 0, 7, 254, 0, 9, 251, 0, + 15, 251, 0, 19, + 251, 0, 21, 251, 0, 25, 251, 0, 27, 251, 0, 29, 251, 0, 33, 251, 0, 37, + 251, 0, 79, 249, + 0, 83, 249, 0, 93, 255, 0, 97, 255, 0, 99, 255, 1, 2, 25, 255, 73, 45, + 245, 46, 245, + 47, 245, 59, 248, 60, 246, 66, 249, 80, 254, 98, 242, 102, 242, 106, 248, + 112, 242, + 115, 248, 118, 248, 120, 245, 122, 245, 193, 249, 194, 249, 195, 249, 196, + 249, + 197, 249, 198, 249, 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, + 254, + 225, 242, 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, 248, 234, + 242, + 235, 248, 236, 248, 238, 248, 243, 242, 244, 242, 245, 242, 246, 242, 247, + 242, + 249, 242, 250, 248, 251, 248, 252, 248, 253, 248, 254, 245, 0, 1, 251, 0, + 2, 249, + 0, 3, 242, 0, 4, 249, 0, 5, 242, 0, 6, 249, 0, 7, 242, 0, 21, 248, 0, 25, + 242, 0, 27, 242, + 0, 29, 242, 0, 49, 248, 0, 78, 254, 0, 79, 242, 0, 82, 254, 0, 83, 242, 0, + 87, 248, 0, + 89, 248, 0, 91, 248, 0, 109, 248, 0, 113, 248, 0, 115, 248, 0, 117, 248, + 73, 45, 245, + 46, 245, 47, 245, 59, 248, 60, 246, 66, 249, 80, 254, 98, 242, 102, 242, + 106, 248, + 112, 242, 115, 248, 118, 248, 120, 245, 122, 245, 193, 249, 194, 249, 195, + 249, + 196, 249, 197, 249, 198, 249, 211, 254, 212, 254, 213, 254, 214, 254, 215, + 254, + 217, 254, 225, 242, 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, + 248, + 234, 242, 235, 248, 236, 248, 238, 248, 243, 242, 244, 242, 245, 242, 246, + 242, + 247, 242, 249, 242, 250, 248, 251, 248, 252, 248, 253, 248, 254, 245, 0, + 1, 251, + 0, 2, 249, 0, 3, 242, 0, 4, 249, 0, 5, 242, 0, 6, 249, 0, 7, 242, 0, 21, + 248, 0, 25, 242, + 0, 27, 242, 0, 29, 242, 0, 49, 248, 0, 78, 254, 0, 79, 242, 0, 82, 254, 0, + 83, 242, 0, + 87, 248, 0, 89, 248, 0, 91, 248, 0, 109, 248, 0, 113, 248, 0, 115, 248, 0, + 117, 248, + 13, 45, 253, 47, 253, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, + 197, 250, + 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 253, 47, 253, 66, 250, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, + 6, 250, + 13, 45, 253, 47, 253, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, + 197, 250, + 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 13, 45, 253, 47, 253, 66, 250, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, + 6, 250, + 69, 45, 242, 46, 245, 47, 242, 59, 246, 60, 246, 66, 249, 80, 254, 98, + 242, 102, 242, + 106, 245, 112, 242, 118, 242, 193, 249, 194, 249, 195, 249, 196, 249, 197, + 249, + 198, 249, 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, + 242, + 226, 242, 227, 242, 228, 242, 229, 242, 230, 242, 233, 248, 234, 242, 235, + 242, + 236, 248, 237, 251, 238, 245, 239, 251, 240, 251, 243, 242, 244, 242, 245, + 242, + 246, 242, 247, 242, 249, 242, 250, 242, 251, 242, 252, 242, 253, 242, 0, + 2, 249, + 0, 3, 242, 0, 4, 249, 0, 5, 242, 0, 6, 249, 0, 7, 242, 0, 21, 248, 0, 25, + 242, 0, 27, 242, + 0, 29, 242, 0, 45, 251, 0, 49, 245, 0, 78, 254, 0, 79, 242, 0, 82, 254, 0, + 83, 242, 0, + 109, 242, 0, 113, 242, 0, 115, 242, 0, 117, 242, 2, 1, 32, 24, 238, 17, + 33, 238, 101, + 253, 115, 253, 116, 250, 117, 252, 119, 255, 0, 19, 253, 0, 87, 253, 0, + 89, 253, 0, + 91, 253, 0, 93, 250, 0, 97, 250, 0, 99, 250, 0, 101, 252, 1, 2, 25, 250, + 1, 32, 25, 238 }; -static afm_cuint16 afm_Times_Italic_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Times_Italic_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; -static afm_cunicode afm_Times_Italic_ligatures[] = { /* 3 */ - 102,105,64257 +static afm_cunicode afm_Times_Italic_ligatures[] = { /* 3 */ + 102, 105, 64257 }; @@ -2898,441 +5551,748 @@ static afm_cunicode afm_Times_Italic_ligatures[] = { /* 3 */ /* FontName: Times-Roman */ /* FullName: Times Roman */ /* FamilyName: Times */ -static afm_cuint8 afm_Times_Roman_widths[] = { /* 315 */ - 42,56,68,83,83,139,130,30,56,56,83,94,42,56,42,46,83,83,83,83,83, - 83,83,83,83,83,46,46,94,94,94,74,154,120,111,111,120,102,93,120, - 120,56,65,120,102,148,120,120,93,120,111,93,102,120,120,157,120, - 120,102,56,46,56,78,83,56,74,83,74,83,74,56,83,83,46,46,83,46,130, - 83,83,83,83,56,65,46,83,83,120,83,83,74,80,33,80,90,56,83,83,83, - 83,33,83,56,127,46,83,94,127,56,67,94,50,50,56,83,76,42,56,50,52, - 83,125,125,125,74,120,120,120,120,120,120,148,111,102,102,102,102, - 56,56,56,56,120,120,120,120,120,120,120,94,120,120,120,120,120,120, - 93,83,74,74,74,74,74,74,111,74,74,74,74,74,46,46,46,46,83,83,83, - 83,83,83,83,94,83,83,83,83,83,83,83,83,120,74,120,74,120,74,111, - 74,111,74,120,98,120,83,102,74,102,74,102,74,102,74,120,83,120,83, - 56,46,56,46,56,46,120,83,102,46,102,46,102,57,102,46,120,83,120, - 83,120,83,120,83,120,83,148,120,111,56,111,56,111,56,93,65,93,65, - 93,65,102,46,102,54,120,83,120,83,120,83,120,83,120,102,74,102,74, - 102,74,83,93,65,56,56,56,56,56,56,56,56,83,167,56,56,56,74,74,74, - 83,83,58,167,167,56,56,28,83,163,79,102,100,94,76,92,92,92,79,42, - 93,93 +static afm_cuint8 afm_Times_Roman_widths[] = { /* 315 */ + 42, 56, 68, 83, 83, 139, 130, 30, 56, 56, 83, 94, 42, 56, 42, 46, 83, 83, + 83, 83, 83, + 83, 83, 83, 83, 83, 46, 46, 94, 94, 94, 74, 154, 120, 111, 111, 120, 102, + 93, 120, + 120, 56, 65, 120, 102, 148, 120, 120, 93, 120, 111, 93, 102, 120, 120, + 157, 120, + 120, 102, 56, 46, 56, 78, 83, 56, 74, 83, 74, 83, 74, 56, 83, 83, 46, 46, + 83, 46, 130, + 83, 83, 83, 83, 56, 65, 46, 83, 83, 120, 83, 83, 74, 80, 33, 80, 90, 56, + 83, 83, 83, + 83, 33, 83, 56, 127, 46, 83, 94, 127, 56, 67, 94, 50, 50, 56, 83, 76, 42, + 56, 50, 52, + 83, 125, 125, 125, 74, 120, 120, 120, 120, 120, 120, 148, 111, 102, 102, + 102, 102, + 56, 56, 56, 56, 120, 120, 120, 120, 120, 120, 120, 94, 120, 120, 120, 120, + 120, 120, + 93, 83, 74, 74, 74, 74, 74, 74, 111, 74, 74, 74, 74, 74, 46, 46, 46, 46, + 83, 83, 83, + 83, 83, 83, 83, 94, 83, 83, 83, 83, 83, 83, 83, 83, 120, 74, 120, 74, 120, + 74, 111, + 74, 111, 74, 120, 98, 120, 83, 102, 74, 102, 74, 102, 74, 102, 74, 120, + 83, 120, 83, + 56, 46, 56, 46, 56, 46, 120, 83, 102, 46, 102, 46, 102, 57, 102, 46, 120, + 83, 120, + 83, 120, 83, 120, 83, 120, 83, 148, 120, 111, 56, 111, 56, 111, 56, 93, + 65, 93, 65, + 93, 65, 102, 46, 102, 54, 120, 83, 120, 83, 120, 83, 120, 83, 120, 102, + 74, 102, 74, + 102, 74, 83, 93, 65, 56, 56, 56, 56, 56, 56, 56, 56, 83, 167, 56, 56, 56, + 74, 74, 74, + 83, 83, 58, 167, 167, 56, 56, 28, 83, 163, 79, 102, 100, 94, 76, 92, 92, + 92, 79, 42, + 93, 93 }; -static afm_sint16 afm_Times_Roman_kerning_index[] = { /* 315 */ - 1,0,0,0,0,0,0,0,0,0,0,0,44,0,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,62,159,0,205,0,240,0,0,0,311,335,427,0,458,482,527,578,601,0, - 663,831,855,1020,0,1175,0,0,0,0,0,0,0,1323,1328,1355,0,1363,1385, - 0,0,1422,0,1425,1475,0,1478,1488,1500,0,1508,0,0,0,1523,1593,1641, - 1664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,1669,1766,1863,1960,2057,2154,0,0,0,0,0,0,0,0,0,0,0,2251, - 2275,2320,2365,2410,2455,0,2500,2545,2569,2593,2617,2641,0,0,2789, - 2794,2799,2804,2809,2814,0,2819,2827,2849,2871,2893,2915,2918,2921, - 2924,0,2927,2937,2949,2961,2973,2985,0,2997,0,0,0,0,3009,0,3014, - 3019,3116,3121,3218,3223,3320,0,3325,0,3333,3341,0,3376,0,0,3411, - 0,3433,0,3455,0,3477,0,0,0,0,0,3499,0,3502,0,0,3505,3597,3647,3678, - 3681,3712,3715,0,3727,3758,3761,3785,3795,3819,3829,3853,3863,3908, - 3920,3965,0,0,3977,4039,4054,4116,4131,4193,0,0,0,0,0,0,4208,0,4376, - 0,4544,0,4568,0,4592,0,4616,0,4640,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,4788,4816,0,4872,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0 +static afm_sint16 afm_Times_Roman_kerning_index[] = { /* 315 */ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 62, 159, 0, 205, 0, 240, 0, 0, 0, 311, 335, 427, 0, 458, 482, 527, + 578, 601, 0, + 663, 831, 855, 1020, 0, 1175, 0, 0, 0, 0, 0, 0, 0, 1323, 1328, 1355, 0, + 1363, 1385, + 0, 0, 1422, 0, 1425, 1475, 0, 1478, 1488, 1500, 0, 1508, 0, 0, 0, 1523, + 1593, 1641, + 1664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1669, 1766, 1863, 1960, 2057, 2154, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2251, + 2275, 2320, 2365, 2410, 2455, 0, 2500, 2545, 2569, 2593, 2617, 2641, 0, 0, + 2789, + 2794, 2799, 2804, 2809, 2814, 0, 2819, 2827, 2849, 2871, 2893, 2915, 2918, + 2921, + 2924, 0, 2927, 2937, 2949, 2961, 2973, 2985, 0, 2997, 0, 0, 0, 0, 3009, 0, + 3014, + 3019, 3116, 3121, 3218, 3223, 3320, 0, 3325, 0, 3333, 3341, 0, 3376, 0, 0, + 3411, + 0, 3433, 0, 3455, 0, 3477, 0, 0, 0, 0, 0, 3499, 0, 3502, 0, 0, 3505, 3597, + 3647, 3678, + 3681, 3712, 3715, 0, 3727, 3758, 3761, 3785, 3795, 3819, 3829, 3853, 3863, + 3908, + 3920, 3965, 0, 0, 3977, 4039, 4054, 4116, 4131, 4193, 0, 0, 0, 0, 0, 0, + 4208, 0, 4376, + 0, 4544, 0, 4568, 0, 4592, 0, 4616, 0, 4640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4788, 4816, 0, 4872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0 }; -static afm_cuint8 afm_Times_Roman_kerning_data[] = { /* 4896 */ - 42,19,66,248,85,254,87,249,88,252,90,242,193,248,194,248,195,248, - 196,248,197,248,198,248,222,242,0,2,248,0,4,248,0,6,248,0,100,254, - 0,102,254,0,122,242,3,1,32,25,245,1,32,29,245,3,1,32,25,245,1,32, - 29,245,41,68,250,72,250,80,248,82,248,85,238,86,248,87,234,88,242, - 90,239,119,245,120,242,122,242,200,250,211,248,212,248,213,248,214, - 248,215,248,217,248,218,248,219,248,220,248,221,248,222,239,254, - 242,0,1,242,0,8,250,0,14,250,0,32,250,0,36,250,0,78,248,0,82,248, - 0,100,238,0,102,238,0,108,248,0,112,248,0,114,248,0,116,248,0,122, - 239,1,32,25,238,20,66,251,86,255,193,251,194,251,195,251,196,251, - 197,251,198,251,218,255,219,255,220,255,221,255,0,2,251,0,4,251, - 0,6,251,0,108,255,0,112,255,0,114,255,0,116,255,16,66,250,87,250, - 88,252,90,248,193,250,194,250,195,250,196,250,197,250,198,250,222, - 248,0,2,250,0,4,250,0,6,250,0,122,248,32,45,244,47,244,66,245,98, - 254,112,254,193,245,194,245,195,245,196,245,197,245,198,245,225, - 254,226,254,227,254,228,254,229,254,230,254,243,254,244,254,245, - 254,246,254,247,254,249,254,0,2,245,0,3,254,0,4,245,0,5,254,0,6, - 245,0,7,254,0,79,254,0,83,254,11,66,247,193,247,194,247,195,247, - 196,247,197,247,198,247,0,2,247,0,4,247,0,6,247,40,80,252,102,253, - 112,251,118,254,122,253,211,252,212,252,213,252,214,252,215,252, - 217,252,233,253,234,253,235,253,236,253,243,251,244,251,245,251, - 246,251,247,251,249,251,250,254,251,254,252,254,253,254,254,253, - 0,1,253,0,21,253,0,25,253,0,27,253,0,29,253,0,78,252,0,79,251,0, - 82,252,0,83,251,0,109,254,0,113,254,0,115,254,0,117,254,13,85,242, - 87,240,88,245,90,240,122,248,222,240,254,248,0,1,248,0,100,242,0, - 102,242,0,122,240,1,32,25,242,11,66,251,193,251,194,251,195,251, - 196,251,197,251,198,251,0,2,251,0,4,251,0,6,251,20,66,251,85,250, - 87,249,88,251,89,250,90,249,193,251,194,251,195,251,196,251,197, - 251,198,251,222,249,0,2,251,0,4,251,0,6,251,0,100,250,0,102,250, - 0,122,249,23,45,238,47,238,66,242,98,254,193,242,194,242,195,242, - 196,242,197,242,198,242,225,254,226,254,227,254,228,254,229,254, - 230,254,0,2,242,0,3,254,0,4,242,0,5,254,0,6,242,0,7,254,10,86,255, - 218,255,219,255,220,255,221,255,0,108,255,0,112,255,0,114,255,0, - 116,255,27,80,250,85,247,86,250,87,244,88,248,90,246,211,250,212, - 250,213,250,214,250,215,250,217,250,218,250,219,250,220,250,221, - 250,222,246,0,78,250,0,82,250,0,100,247,0,102,247,0,108,250,0,112, - 250,0,114,250,0,116,250,0,122,246,73,45,245,46,242,47,245,59,249, - 60,248,66,241,80,254,98,244,102,245,106,251,112,244,115,251,118, - 249,120,244,122,244,193,241,194,241,195,241,196,241,197,241,198, - 241,211,254,212,254,213,254,214,254,215,254,217,254,225,250,226, - 244,227,244,228,250,229,250,230,244,233,245,234,245,235,245,236, - 252,238,251,243,244,244,244,245,244,246,244,247,244,249,244,250, - 249,251,249,252,249,253,249,254,244,0,1,244,0,2,241,0,3,250,0,4, - 241,0,5,244,0,6,241,0,7,244,0,21,252,0,25,245,0,27,245,0,29,245, - 0,49,251,0,78,254,0,79,244,0,82,254,0,83,244,0,87,251,0,89,251,0, - 91,251,0,109,249,0,113,249,0,115,249,0,117,249,11,66,250,193,250, - 194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250, - 72,45,235,46,240,47,235,59,245,60,245,66,234,72,254,80,250,98,238, - 102,238,106,247,112,235,118,244,193,234,194,234,195,234,196,234, - 197,234,198,234,211,250,212,250,213,250,214,250,215,250,217,250, - 225,245,226,238,227,245,228,245,229,245,230,238,233,245,234,238, - 235,245,236,245,237,254,238,247,239,254,240,254,243,242,244,235, - 245,235,246,242,247,242,249,235,250,244,251,244,252,244,253,244, - 0,2,234,0,3,245,0,4,234,0,5,238,0,6,234,0,7,238,0,21,245,0,25,238, - 0,27,238,0,29,245,0,32,254,0,36,254,0,45,254,0,49,247,0,78,250,0, - 79,242,0,82,250,0,83,235,0,109,244,0,113,244,0,115,244,0,117,244, - 68,45,242,46,246,47,242,59,251,60,251,66,237,80,255,98,244,102,244, - 106,250,112,244,118,249,122,245,193,237,194,237,195,237,196,237, - 197,237,198,237,211,255,212,255,213,255,214,255,215,255,217,255, - 225,244,226,244,227,244,228,244,229,244,230,244,233,250,234,244, - 235,244,236,250,238,250,243,244,244,244,245,244,246,244,247,244, - 249,244,250,249,251,249,252,249,253,249,254,245,0,1,245,0,2,237, - 0,3,244,0,4,237,0,5,244,0,6,237,0,7,244,0,21,250,0,25,244,0,27,244, - 0,29,244,0,49,250,0,78,255,0,79,244,0,82,255,0,83,244,0,109,249, - 0,113,249,0,115,249,0,117,249,65,45,235,46,238,47,235,59,242,60, - 242,66,237,80,252,98,240,102,240,106,248,112,239,118,238,193,237, - 194,237,195,237,196,237,197,237,198,237,211,252,212,252,213,252, - 214,252,215,252,217,252,225,247,226,240,227,240,228,247,229,247, - 230,240,233,247,234,240,235,240,236,247,238,248,243,245,244,239, - 245,239,246,245,247,245,249,239,250,245,251,238,252,238,253,245, - 0,2,237,0,3,247,0,4,237,0,5,240,0,6,237,0,7,240,0,21,247,0,25,240, - 0,27,240,0,29,240,0,49,248,0,78,252,0,79,245,0,82,252,0,83,239,0, - 109,245,0,113,238,0,115,238,0,117,238,3,119,254,120,254,12,47,250, - 118,254,119,254,250,254,251,254,252,254,253,254,0,109,254,0,113, - 254,0,115,254,0,117,254,4,122,254,254,254,0,1,254,10,104,254,119, - 253,120,253,121,254,122,254,254,254,0,1,254,0,33,254,0,37,254,16, - 98,255,103,253,106,254,225,255,226,255,227,255,228,255,229,255,230, - 255,238,254,0,3,255,0,5,255,0,7,255,0,51,249,1,32,25,9,2,119,253, - 22,102,255,112,255,122,254,233,255,234,255,235,255,236,255,243,255, - 244,255,245,255,246,255,247,255,249,255,254,254,0,1,254,0,21,255, - 0,25,255,0,27,255,0,29,255,0,79,255,0,83,255,2,120,255,5,119,250, - 122,254,254,254,0,1,254,6,119,254,120,253,122,255,254,255,0,1,255, - 4,122,255,254,255,0,1,255,7,45,250,46,254,47,248,104,254,0,33,254, - 0,37,254,31,45,246,47,246,98,253,102,254,112,254,225,253,226,253, - 227,253,228,253,229,253,230,253,233,254,234,254,235,254,236,254, - 243,254,244,254,245,254,246,254,247,254,249,254,0,3,253,0,5,253, - 0,7,253,0,21,254,0,25,254,0,27,254,0,29,254,0,79,254,0,83,254,22, - 45,246,47,246,98,255,112,255,225,255,226,255,227,255,228,255,229, - 255,230,255,243,255,244,255,245,255,246,255,247,255,249,255,0,3, - 255,0,5,255,0,7,255,0,79,255,0,83,255,10,102,254,233,254,234,254, - 235,254,236,254,0,21,254,0,25,254,0,27,254,0,29,254,3,45,246,47, - 246,41,68,250,72,250,80,248,82,248,85,238,86,248,87,234,88,242,90, - 239,119,245,120,242,122,242,200,250,211,248,212,248,213,248,214, - 248,215,248,217,248,218,248,219,248,220,248,221,248,222,239,254, - 242,0,1,242,0,8,250,0,14,250,0,32,250,0,36,250,0,78,248,0,82,248, - 0,100,238,0,102,238,0,108,248,0,112,248,0,114,248,0,116,248,0,122, - 239,1,32,25,238,41,68,250,72,250,80,248,82,248,85,238,86,248,87, - 234,88,242,90,239,119,245,120,242,122,242,200,250,211,248,212,248, - 213,248,214,248,215,248,217,248,218,248,219,248,220,248,221,248, - 222,239,254,242,0,1,242,0,8,250,0,14,250,0,32,250,0,36,250,0,78, - 248,0,82,248,0,100,238,0,102,238,0,108,248,0,112,248,0,114,248,0, - 116,248,0,122,239,1,32,25,238,41,68,250,72,250,80,248,82,248,85, - 238,86,248,87,234,88,242,90,239,119,245,120,242,122,242,200,250, - 211,248,212,248,213,248,214,248,215,248,217,248,218,248,219,248, - 220,248,221,248,222,239,254,242,0,1,242,0,8,250,0,14,250,0,32,250, - 0,36,250,0,78,248,0,82,248,0,100,238,0,102,238,0,108,248,0,112,248, - 0,114,248,0,116,248,0,122,239,1,32,25,238,41,68,250,72,250,80,248, - 82,248,85,238,86,248,87,234,88,242,90,239,119,245,120,242,122,242, - 200,250,211,248,212,248,213,248,214,248,215,248,217,248,218,248, - 219,248,220,248,221,248,222,239,254,242,0,1,242,0,8,250,0,14,250, - 0,32,250,0,36,250,0,78,248,0,82,248,0,100,238,0,102,238,0,108,248, - 0,112,248,0,114,248,0,116,248,0,122,239,1,32,25,238,41,68,250,72, - 250,80,248,82,248,85,238,86,248,87,234,88,242,90,239,119,245,120, - 242,122,242,200,250,211,248,212,248,213,248,214,248,215,248,217, - 248,218,248,219,248,220,248,221,248,222,239,254,242,0,1,242,0,8, - 250,0,14,250,0,32,250,0,36,250,0,78,248,0,82,248,0,100,238,0,102, - 238,0,108,248,0,112,248,0,114,248,0,116,248,0,122,239,1,32,25,238, - 41,68,250,72,250,80,248,82,248,85,238,86,248,87,234,88,242,90,239, - 119,245,120,242,122,242,200,250,211,248,212,248,213,248,214,248, - 215,248,217,248,218,248,219,248,220,248,221,248,222,239,254,242, - 0,1,242,0,8,250,0,14,250,0,32,250,0,36,250,0,78,248,0,82,248,0,100, - 238,0,102,238,0,108,248,0,112,248,0,114,248,0,116,248,0,122,239, - 1,32,25,238,11,66,251,193,251,194,251,195,251,196,251,197,251,198, - 251,0,2,251,0,4,251,0,6,251,20,66,251,85,250,87,249,88,251,89,250, - 90,249,193,251,194,251,195,251,196,251,197,251,198,251,222,249,0, - 2,251,0,4,251,0,6,251,0,100,250,0,102,250,0,122,249,20,66,251,85, - 250,87,249,88,251,89,250,90,249,193,251,194,251,195,251,196,251, - 197,251,198,251,222,249,0,2,251,0,4,251,0,6,251,0,100,250,0,102, - 250,0,122,249,20,66,251,85,250,87,249,88,251,89,250,90,249,193,251, - 194,251,195,251,196,251,197,251,198,251,222,249,0,2,251,0,4,251, - 0,6,251,0,100,250,0,102,250,0,122,249,20,66,251,85,250,87,249,88, - 251,89,250,90,249,193,251,194,251,195,251,196,251,197,251,198,251, - 222,249,0,2,251,0,4,251,0,6,251,0,100,250,0,102,250,0,122,249,20, - 66,251,85,250,87,249,88,251,89,250,90,249,193,251,194,251,195,251, - 196,251,197,251,198,251,222,249,0,2,251,0,4,251,0,6,251,0,100,250, - 0,102,250,0,122,249,20,66,251,85,250,87,249,88,251,89,250,90,249, - 193,251,194,251,195,251,196,251,197,251,198,251,222,249,0,2,251, - 0,4,251,0,6,251,0,100,250,0,102,250,0,122,249,11,66,250,193,250, - 194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250, - 11,66,250,193,250,194,250,195,250,196,250,197,250,198,250,0,2,250, - 0,4,250,0,6,250,11,66,250,193,250,194,250,195,250,196,250,197,250, - 198,250,0,2,250,0,4,250,0,6,250,11,66,250,193,250,194,250,195,250, - 196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,65,45,235,46,238, - 47,235,59,242,60,242,66,237,80,252,98,240,102,240,106,248,112,239, - 118,238,193,237,194,237,195,237,196,237,197,237,198,237,211,252, - 212,252,213,252,214,252,215,252,217,252,225,247,226,240,227,240, - 228,247,229,247,230,240,233,247,234,240,235,240,236,247,238,248, - 243,245,244,239,245,239,246,245,247,245,249,239,250,245,251,238, - 252,238,253,245,0,2,237,0,3,247,0,4,237,0,5,240,0,6,237,0,7,240, - 0,21,247,0,25,240,0,27,240,0,29,240,0,49,248,0,78,252,0,79,245,0, - 82,252,0,83,239,0,109,245,0,113,238,0,115,238,0,117,238,3,119,254, - 120,254,3,119,254,120,254,3,119,254,120,254,3,119,254,120,254,3, - 119,254,120,254,3,119,254,120,254,4,122,254,254,254,0,1,254,10,104, - 254,119,253,120,253,121,254,122,254,254,254,0,1,254,0,33,254,0,37, - 254,10,104,254,119,253,120,253,121,254,122,254,254,254,0,1,254,0, - 33,254,0,37,254,10,104,254,119,253,120,253,121,254,122,254,254,254, - 0,1,254,0,33,254,0,37,254,10,104,254,119,253,120,253,121,254,122, - 254,254,254,0,1,254,0,33,254,0,37,254,2,119,253,2,119,253,2,119, - 253,2,119,253,5,119,250,122,254,254,254,0,1,254,6,119,254,120,253, - 122,255,254,255,0,1,255,6,119,254,120,253,122,255,254,255,0,1,255, - 6,119,254,120,253,122,255,254,255,0,1,255,6,119,254,120,253,122, - 255,254,255,0,1,255,6,119,254,120,253,122,255,254,255,0,1,255,6, - 119,254,120,253,122,255,254,255,0,1,255,3,45,246,47,246,3,45,246, - 47,246,41,68,250,72,250,80,248,82,248,85,238,86,248,87,234,88,242, - 90,239,119,245,120,242,122,242,200,250,211,248,212,248,213,248,214, - 248,215,248,217,248,218,248,219,248,220,248,221,248,222,239,254, - 242,0,1,242,0,8,250,0,14,250,0,32,250,0,36,250,0,78,248,0,82,248, - 0,100,238,0,102,238,0,108,248,0,112,248,0,114,248,0,116,248,0,122, - 239,1,32,25,238,3,119,254,120,254,41,68,250,72,250,80,248,82,248, - 85,238,86,248,87,234,88,242,90,239,119,245,120,242,122,242,200,250, - 211,248,212,248,213,248,214,248,215,248,217,248,218,248,219,248, - 220,248,221,248,222,239,254,242,0,1,242,0,8,250,0,14,250,0,32,250, - 0,36,250,0,78,248,0,82,248,0,100,238,0,102,238,0,108,248,0,112,248, - 0,114,248,0,116,248,0,122,239,1,32,25,238,3,119,254,120,254,41,68, - 250,72,250,80,248,82,248,85,238,86,248,87,234,88,242,90,239,119, - 245,120,248,122,248,200,250,211,248,212,248,213,248,214,248,215, - 248,217,248,218,248,219,248,220,248,221,248,222,239,254,248,0,1, - 248,0,8,250,0,14,250,0,32,250,0,36,250,0,78,248,0,82,248,0,100,238, - 0,102,238,0,108,248,0,112,248,0,114,248,0,116,248,0,122,239,1,32, - 25,238,3,119,254,120,254,4,122,254,254,254,0,1,254,4,122,254,254, - 254,0,1,254,16,66,250,87,250,88,252,90,248,193,250,194,250,195,250, - 196,250,197,250,198,250,222,248,0,2,250,0,4,250,0,6,250,0,122,248, - 16,66,250,87,250,88,252,90,248,193,250,194,250,195,250,196,250,197, - 250,198,250,222,248,0,2,250,0,4,250,0,6,250,0,122,248,10,104,254, - 119,253,120,253,121,254,122,254,254,254,0,1,254,0,33,254,0,37,254, - 10,104,254,119,253,120,253,121,254,122,254,254,254,0,1,254,0,33, - 254,0,37,254,10,104,254,119,253,120,253,121,254,122,254,254,254, - 0,1,254,0,33,254,0,37,254,10,104,254,119,253,120,253,121,254,122, - 254,254,254,0,1,254,0,33,254,0,37,254,2,119,253,2,119,253,40,80, - 252,102,253,112,251,118,254,122,253,211,252,212,252,213,252,214, - 252,215,252,217,252,233,253,234,253,235,253,236,253,243,251,244, - 251,245,251,246,251,247,251,249,251,250,254,251,254,252,254,253, - 254,254,253,0,1,253,0,21,253,0,25,253,0,27,253,0,29,253,0,78,252, - 0,79,251,0,82,252,0,83,251,0,109,254,0,113,254,0,115,254,0,117,254, - 22,102,255,112,255,122,254,233,255,234,255,235,255,236,255,243,255, - 244,255,245,255,246,255,247,255,249,255,254,254,0,1,254,0,21,255, - 0,25,255,0,27,255,0,29,255,0,79,255,0,83,255,13,85,242,87,240,88, - 245,90,240,122,248,222,240,254,248,0,1,248,0,100,242,0,102,242,0, - 122,240,1,32,25,242,2,120,255,13,85,242,87,240,88,245,90,240,122, - 248,222,240,254,248,0,1,248,0,100,242,0,102,242,0,122,240,1,32,25, - 242,2,120,255,5,122,248,254,248,0,1,248,1,32,25,242,13,85,242,87, - 240,88,245,90,240,122,248,222,240,254,248,0,1,248,0,100,242,0,102, - 242,0,122,240,1,32,25,242,2,120,255,11,66,251,193,251,194,251,195, - 251,196,251,197,251,198,251,0,2,251,0,4,251,0,6,251,5,119,250,122, - 254,254,254,0,1,254,11,66,251,193,251,194,251,195,251,196,251,197, - 251,198,251,0,2,251,0,4,251,0,6,251,5,119,250,122,254,254,254,0, - 1,254,11,66,251,193,251,194,251,195,251,196,251,197,251,198,251, - 0,2,251,0,4,251,0,6,251,5,119,250,122,254,254,254,0,1,254,20,66, - 251,85,250,87,249,88,251,89,250,90,249,193,251,194,251,195,251,196, - 251,197,251,198,251,222,249,0,2,251,0,4,251,0,6,251,0,100,250,0, - 102,250,0,122,249,6,119,254,120,253,122,255,254,255,0,1,255,20,66, - 251,85,250,87,249,88,251,89,250,90,249,193,251,194,251,195,251,196, - 251,197,251,198,251,222,249,0,2,251,0,4,251,0,6,251,0,100,250,0, - 102,250,0,122,249,6,119,254,120,253,122,255,254,255,0,1,255,27,80, - 250,85,247,86,250,87,244,88,248,90,246,211,250,212,250,213,250,214, - 250,215,250,217,250,218,250,219,250,220,250,221,250,222,246,0,78, - 250,0,82,250,0,100,247,0,102,247,0,108,250,0,112,250,0,114,250,0, - 116,250,0,122,246,7,45,250,46,254,47,248,104,254,0,33,254,0,37,254, - 27,80,250,85,247,86,250,87,244,88,248,90,246,211,250,212,250,213, - 250,214,250,215,250,217,250,218,250,219,250,220,250,221,250,222, - 246,0,78,250,0,82,250,0,100,247,0,102,247,0,108,250,0,112,250,0, - 114,250,0,116,250,0,122,246,7,45,250,46,254,47,248,104,254,0,33, - 254,0,37,254,27,80,250,85,247,86,250,87,244,88,248,90,246,211,250, - 212,250,213,250,214,250,215,250,217,250,218,250,219,250,220,250, - 221,250,222,246,0,78,250,0,82,250,0,100,247,0,102,247,0,108,250, - 0,112,250,0,114,250,0,116,250,0,122,246,7,45,250,46,254,47,248,104, - 254,0,33,254,0,37,254,73,45,245,46,242,47,245,59,249,60,248,66,241, - 80,254,98,244,102,245,106,251,112,244,115,251,118,249,120,244,122, - 244,193,241,194,241,195,241,196,241,197,241,198,241,211,254,212, - 254,213,254,214,254,215,254,217,254,225,250,226,244,227,244,228, - 250,229,250,230,244,233,252,234,245,235,252,236,252,238,251,243, - 244,244,244,245,244,246,244,247,244,249,244,250,249,251,249,252, - 249,253,249,254,244,0,1,244,0,2,241,0,3,250,0,4,241,0,5,244,0,6, - 241,0,7,244,0,21,245,0,25,245,0,27,245,0,29,245,0,49,251,0,78,254, - 0,79,244,0,82,254,0,83,244,0,87,251,0,89,251,0,91,251,0,109,249, - 0,113,249,0,115,249,0,117,249,73,45,245,46,242,47,245,59,249,60, - 248,66,241,80,254,98,244,102,245,106,251,112,244,115,251,118,249, - 120,244,122,244,193,241,194,241,195,241,196,241,197,241,198,241, - 211,254,212,254,213,254,214,254,215,254,217,254,225,250,226,244, - 227,244,228,250,229,250,230,244,233,245,234,245,235,252,236,252, - 238,251,243,244,244,244,245,244,246,244,247,244,249,244,250,249, - 251,249,252,249,253,249,254,244,0,1,244,0,2,241,0,3,250,0,4,241, - 0,5,244,0,6,241,0,7,244,0,21,252,0,25,245,0,27,245,0,29,245,0,49, - 251,0,78,254,0,79,244,0,82,254,0,83,244,0,87,251,0,89,251,0,91,251, - 0,109,249,0,113,249,0,115,249,0,117,249,11,66,250,193,250,194,250, - 195,250,196,250,197,250,198,250,0,2,250,0,4,250,0,6,250,11,66,250, - 193,250,194,250,195,250,196,250,197,250,198,250,0,2,250,0,4,250, - 0,6,250,11,66,250,193,250,194,250,195,250,196,250,197,250,198,250, - 0,2,250,0,4,250,0,6,250,11,66,250,193,250,194,250,195,250,196,250, - 197,250,198,250,0,2,250,0,4,250,0,6,250,65,45,235,46,238,47,235, - 59,242,60,242,66,237,80,252,98,240,102,240,106,248,112,239,118,238, - 193,237,194,237,195,237,196,237,197,237,198,237,211,252,212,252, - 213,252,214,252,215,252,217,252,225,247,226,240,227,240,228,240, - 229,247,230,240,233,247,234,240,235,240,236,247,238,248,243,245, - 244,239,245,239,246,245,247,245,249,239,250,245,251,238,252,238, - 253,245,0,2,237,0,3,247,0,4,237,0,5,240,0,6,237,0,7,240,0,21,247, - 0,25,240,0,27,240,0,29,240,0,49,248,0,78,252,0,79,245,0,82,252,0, - 83,239,0,109,245,0,113,238,0,115,238,0,117,238,12,66,244,193,244, - 194,244,195,244,196,244,197,244,198,244,0,2,244,0,4,244,0,6,244, - 1,32,24,245,21,33,245,101,249,109,255,115,249,116,248,117,254,119, - 249,0,19,249,0,60,255,0,62,255,0,68,255,0,87,249,0,89,249,0,91,249, - 0,93,248,0,97,248,0,99,248,0,101,254,1,2,25,248,1,32,25,245,11,66, - 244,193,244,194,244,195,244,196,244,197,244,198,244,0,2,244,0,4, - 244,0,6,244 +static afm_cuint8 afm_Times_Roman_kerning_data[] = { /* 4896 */ + 42, 19, 66, 248, 85, 254, 87, 249, 88, 252, 90, 242, 193, 248, 194, 248, + 195, 248, + 196, 248, 197, 248, 198, 248, 222, 242, 0, 2, 248, 0, 4, 248, 0, 6, 248, + 0, 100, 254, + 0, 102, 254, 0, 122, 242, 3, 1, 32, 25, 245, 1, 32, 29, 245, 3, 1, 32, 25, + 245, 1, 32, + 29, 245, 41, 68, 250, 72, 250, 80, 248, 82, 248, 85, 238, 86, 248, 87, + 234, 88, 242, + 90, 239, 119, 245, 120, 242, 122, 242, 200, 250, 211, 248, 212, 248, 213, + 248, 214, + 248, 215, 248, 217, 248, 218, 248, 219, 248, 220, 248, 221, 248, 222, 239, + 254, + 242, 0, 1, 242, 0, 8, 250, 0, 14, 250, 0, 32, 250, 0, 36, 250, 0, 78, 248, + 0, 82, 248, + 0, 100, 238, 0, 102, 238, 0, 108, 248, 0, 112, 248, 0, 114, 248, 0, 116, + 248, 0, 122, + 239, 1, 32, 25, 238, 20, 66, 251, 86, 255, 193, 251, 194, 251, 195, 251, + 196, 251, + 197, 251, 198, 251, 218, 255, 219, 255, 220, 255, 221, 255, 0, 2, 251, 0, + 4, 251, + 0, 6, 251, 0, 108, 255, 0, 112, 255, 0, 114, 255, 0, 116, 255, 16, 66, + 250, 87, 250, + 88, 252, 90, 248, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, + 250, 222, + 248, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 248, 32, 45, 244, 47, 244, + 66, 245, 98, + 254, 112, 254, 193, 245, 194, 245, 195, 245, 196, 245, 197, 245, 198, 245, + 225, + 254, 226, 254, 227, 254, 228, 254, 229, 254, 230, 254, 243, 254, 244, 254, + 245, + 254, 246, 254, 247, 254, 249, 254, 0, 2, 245, 0, 3, 254, 0, 4, 245, 0, 5, + 254, 0, 6, + 245, 0, 7, 254, 0, 79, 254, 0, 83, 254, 11, 66, 247, 193, 247, 194, 247, + 195, 247, + 196, 247, 197, 247, 198, 247, 0, 2, 247, 0, 4, 247, 0, 6, 247, 40, 80, + 252, 102, 253, + 112, 251, 118, 254, 122, 253, 211, 252, 212, 252, 213, 252, 214, 252, 215, + 252, + 217, 252, 233, 253, 234, 253, 235, 253, 236, 253, 243, 251, 244, 251, 245, + 251, + 246, 251, 247, 251, 249, 251, 250, 254, 251, 254, 252, 254, 253, 254, 254, + 253, + 0, 1, 253, 0, 21, 253, 0, 25, 253, 0, 27, 253, 0, 29, 253, 0, 78, 252, 0, + 79, 251, 0, + 82, 252, 0, 83, 251, 0, 109, 254, 0, 113, 254, 0, 115, 254, 0, 117, 254, + 13, 85, 242, + 87, 240, 88, 245, 90, 240, 122, 248, 222, 240, 254, 248, 0, 1, 248, 0, + 100, 242, 0, + 102, 242, 0, 122, 240, 1, 32, 25, 242, 11, 66, 251, 193, 251, 194, 251, + 195, 251, + 196, 251, 197, 251, 198, 251, 0, 2, 251, 0, 4, 251, 0, 6, 251, 20, 66, + 251, 85, 250, + 87, 249, 88, 251, 89, 250, 90, 249, 193, 251, 194, 251, 195, 251, 196, + 251, 197, + 251, 198, 251, 222, 249, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, 100, 250, 0, + 102, 250, + 0, 122, 249, 23, 45, 238, 47, 238, 66, 242, 98, 254, 193, 242, 194, 242, + 195, 242, + 196, 242, 197, 242, 198, 242, 225, 254, 226, 254, 227, 254, 228, 254, 229, + 254, + 230, 254, 0, 2, 242, 0, 3, 254, 0, 4, 242, 0, 5, 254, 0, 6, 242, 0, 7, + 254, 10, 86, 255, + 218, 255, 219, 255, 220, 255, 221, 255, 0, 108, 255, 0, 112, 255, 0, 114, + 255, 0, + 116, 255, 27, 80, 250, 85, 247, 86, 250, 87, 244, 88, 248, 90, 246, 211, + 250, 212, + 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, + 221, + 250, 222, 246, 0, 78, 250, 0, 82, 250, 0, 100, 247, 0, 102, 247, 0, 108, + 250, 0, 112, + 250, 0, 114, 250, 0, 116, 250, 0, 122, 246, 73, 45, 245, 46, 242, 47, 245, + 59, 249, + 60, 248, 66, 241, 80, 254, 98, 244, 102, 245, 106, 251, 112, 244, 115, + 251, 118, + 249, 120, 244, 122, 244, 193, 241, 194, 241, 195, 241, 196, 241, 197, 241, + 198, + 241, 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, + 226, + 244, 227, 244, 228, 250, 229, 250, 230, 244, 233, 245, 234, 245, 235, 245, + 236, + 252, 238, 251, 243, 244, 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, + 250, + 249, 251, 249, 252, 249, 253, 249, 254, 244, 0, 1, 244, 0, 2, 241, 0, 3, + 250, 0, 4, + 241, 0, 5, 244, 0, 6, 241, 0, 7, 244, 0, 21, 252, 0, 25, 245, 0, 27, 245, + 0, 29, 245, + 0, 49, 251, 0, 78, 254, 0, 79, 244, 0, 82, 254, 0, 83, 244, 0, 87, 251, 0, + 89, 251, 0, + 91, 251, 0, 109, 249, 0, 113, 249, 0, 115, 249, 0, 117, 249, 11, 66, 250, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, + 6, 250, + 72, 45, 235, 46, 240, 47, 235, 59, 245, 60, 245, 66, 234, 72, 254, 80, + 250, 98, 238, + 102, 238, 106, 247, 112, 235, 118, 244, 193, 234, 194, 234, 195, 234, 196, + 234, + 197, 234, 198, 234, 211, 250, 212, 250, 213, 250, 214, 250, 215, 250, 217, + 250, + 225, 245, 226, 238, 227, 245, 228, 245, 229, 245, 230, 238, 233, 245, 234, + 238, + 235, 245, 236, 245, 237, 254, 238, 247, 239, 254, 240, 254, 243, 242, 244, + 235, + 245, 235, 246, 242, 247, 242, 249, 235, 250, 244, 251, 244, 252, 244, 253, + 244, + 0, 2, 234, 0, 3, 245, 0, 4, 234, 0, 5, 238, 0, 6, 234, 0, 7, 238, 0, 21, + 245, 0, 25, 238, + 0, 27, 238, 0, 29, 245, 0, 32, 254, 0, 36, 254, 0, 45, 254, 0, 49, 247, 0, + 78, 250, 0, + 79, 242, 0, 82, 250, 0, 83, 235, 0, 109, 244, 0, 113, 244, 0, 115, 244, 0, + 117, 244, + 68, 45, 242, 46, 246, 47, 242, 59, 251, 60, 251, 66, 237, 80, 255, 98, + 244, 102, 244, + 106, 250, 112, 244, 118, 249, 122, 245, 193, 237, 194, 237, 195, 237, 196, + 237, + 197, 237, 198, 237, 211, 255, 212, 255, 213, 255, 214, 255, 215, 255, 217, + 255, + 225, 244, 226, 244, 227, 244, 228, 244, 229, 244, 230, 244, 233, 250, 234, + 244, + 235, 244, 236, 250, 238, 250, 243, 244, 244, 244, 245, 244, 246, 244, 247, + 244, + 249, 244, 250, 249, 251, 249, 252, 249, 253, 249, 254, 245, 0, 1, 245, 0, + 2, 237, + 0, 3, 244, 0, 4, 237, 0, 5, 244, 0, 6, 237, 0, 7, 244, 0, 21, 250, 0, 25, + 244, 0, 27, 244, + 0, 29, 244, 0, 49, 250, 0, 78, 255, 0, 79, 244, 0, 82, 255, 0, 83, 244, 0, + 109, 249, + 0, 113, 249, 0, 115, 249, 0, 117, 249, 65, 45, 235, 46, 238, 47, 235, 59, + 242, 60, + 242, 66, 237, 80, 252, 98, 240, 102, 240, 106, 248, 112, 239, 118, 238, + 193, 237, + 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, 252, 212, 252, 213, + 252, + 214, 252, 215, 252, 217, 252, 225, 247, 226, 240, 227, 240, 228, 247, 229, + 247, + 230, 240, 233, 247, 234, 240, 235, 240, 236, 247, 238, 248, 243, 245, 244, + 239, + 245, 239, 246, 245, 247, 245, 249, 239, 250, 245, 251, 238, 252, 238, 253, + 245, + 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 240, 0, 6, 237, 0, 7, 240, 0, 21, + 247, 0, 25, 240, + 0, 27, 240, 0, 29, 240, 0, 49, 248, 0, 78, 252, 0, 79, 245, 0, 82, 252, 0, + 83, 239, 0, + 109, 245, 0, 113, 238, 0, 115, 238, 0, 117, 238, 3, 119, 254, 120, 254, + 12, 47, 250, + 118, 254, 119, 254, 250, 254, 251, 254, 252, 254, 253, 254, 0, 109, 254, + 0, 113, + 254, 0, 115, 254, 0, 117, 254, 4, 122, 254, 254, 254, 0, 1, 254, 10, 104, + 254, 119, + 253, 120, 253, 121, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 254, 0, 37, + 254, 16, + 98, 255, 103, 253, 106, 254, 225, 255, 226, 255, 227, 255, 228, 255, 229, + 255, 230, + 255, 238, 254, 0, 3, 255, 0, 5, 255, 0, 7, 255, 0, 51, 249, 1, 32, 25, 9, + 2, 119, 253, + 22, 102, 255, 112, 255, 122, 254, 233, 255, 234, 255, 235, 255, 236, 255, + 243, 255, + 244, 255, 245, 255, 246, 255, 247, 255, 249, 255, 254, 254, 0, 1, 254, 0, + 21, 255, + 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 255, 0, 83, 255, 2, 120, 255, + 5, 119, 250, + 122, 254, 254, 254, 0, 1, 254, 6, 119, 254, 120, 253, 122, 255, 254, 255, + 0, 1, 255, + 4, 122, 255, 254, 255, 0, 1, 255, 7, 45, 250, 46, 254, 47, 248, 104, 254, + 0, 33, 254, + 0, 37, 254, 31, 45, 246, 47, 246, 98, 253, 102, 254, 112, 254, 225, 253, + 226, 253, + 227, 253, 228, 253, 229, 253, 230, 253, 233, 254, 234, 254, 235, 254, 236, + 254, + 243, 254, 244, 254, 245, 254, 246, 254, 247, 254, 249, 254, 0, 3, 253, 0, + 5, 253, + 0, 7, 253, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 0, 79, 254, 0, + 83, 254, 22, + 45, 246, 47, 246, 98, 255, 112, 255, 225, 255, 226, 255, 227, 255, 228, + 255, 229, + 255, 230, 255, 243, 255, 244, 255, 245, 255, 246, 255, 247, 255, 249, 255, + 0, 3, + 255, 0, 5, 255, 0, 7, 255, 0, 79, 255, 0, 83, 255, 10, 102, 254, 233, 254, + 234, 254, + 235, 254, 236, 254, 0, 21, 254, 0, 25, 254, 0, 27, 254, 0, 29, 254, 3, 45, + 246, 47, + 246, 41, 68, 250, 72, 250, 80, 248, 82, 248, 85, 238, 86, 248, 87, 234, + 88, 242, 90, + 239, 119, 245, 120, 242, 122, 242, 200, 250, 211, 248, 212, 248, 213, 248, + 214, + 248, 215, 248, 217, 248, 218, 248, 219, 248, 220, 248, 221, 248, 222, 239, + 254, + 242, 0, 1, 242, 0, 8, 250, 0, 14, 250, 0, 32, 250, 0, 36, 250, 0, 78, 248, + 0, 82, 248, + 0, 100, 238, 0, 102, 238, 0, 108, 248, 0, 112, 248, 0, 114, 248, 0, 116, + 248, 0, 122, + 239, 1, 32, 25, 238, 41, 68, 250, 72, 250, 80, 248, 82, 248, 85, 238, 86, + 248, 87, + 234, 88, 242, 90, 239, 119, 245, 120, 242, 122, 242, 200, 250, 211, 248, + 212, 248, + 213, 248, 214, 248, 215, 248, 217, 248, 218, 248, 219, 248, 220, 248, 221, + 248, + 222, 239, 254, 242, 0, 1, 242, 0, 8, 250, 0, 14, 250, 0, 32, 250, 0, 36, + 250, 0, 78, + 248, 0, 82, 248, 0, 100, 238, 0, 102, 238, 0, 108, 248, 0, 112, 248, 0, + 114, 248, 0, + 116, 248, 0, 122, 239, 1, 32, 25, 238, 41, 68, 250, 72, 250, 80, 248, 82, + 248, 85, + 238, 86, 248, 87, 234, 88, 242, 90, 239, 119, 245, 120, 242, 122, 242, + 200, 250, + 211, 248, 212, 248, 213, 248, 214, 248, 215, 248, 217, 248, 218, 248, 219, + 248, + 220, 248, 221, 248, 222, 239, 254, 242, 0, 1, 242, 0, 8, 250, 0, 14, 250, + 0, 32, 250, + 0, 36, 250, 0, 78, 248, 0, 82, 248, 0, 100, 238, 0, 102, 238, 0, 108, 248, + 0, 112, 248, + 0, 114, 248, 0, 116, 248, 0, 122, 239, 1, 32, 25, 238, 41, 68, 250, 72, + 250, 80, 248, + 82, 248, 85, 238, 86, 248, 87, 234, 88, 242, 90, 239, 119, 245, 120, 242, + 122, 242, + 200, 250, 211, 248, 212, 248, 213, 248, 214, 248, 215, 248, 217, 248, 218, + 248, + 219, 248, 220, 248, 221, 248, 222, 239, 254, 242, 0, 1, 242, 0, 8, 250, 0, + 14, 250, + 0, 32, 250, 0, 36, 250, 0, 78, 248, 0, 82, 248, 0, 100, 238, 0, 102, 238, + 0, 108, 248, + 0, 112, 248, 0, 114, 248, 0, 116, 248, 0, 122, 239, 1, 32, 25, 238, 41, + 68, 250, 72, + 250, 80, 248, 82, 248, 85, 238, 86, 248, 87, 234, 88, 242, 90, 239, 119, + 245, 120, + 242, 122, 242, 200, 250, 211, 248, 212, 248, 213, 248, 214, 248, 215, 248, + 217, + 248, 218, 248, 219, 248, 220, 248, 221, 248, 222, 239, 254, 242, 0, 1, + 242, 0, 8, + 250, 0, 14, 250, 0, 32, 250, 0, 36, 250, 0, 78, 248, 0, 82, 248, 0, 100, + 238, 0, 102, + 238, 0, 108, 248, 0, 112, 248, 0, 114, 248, 0, 116, 248, 0, 122, 239, 1, + 32, 25, 238, + 41, 68, 250, 72, 250, 80, 248, 82, 248, 85, 238, 86, 248, 87, 234, 88, + 242, 90, 239, + 119, 245, 120, 242, 122, 242, 200, 250, 211, 248, 212, 248, 213, 248, 214, + 248, + 215, 248, 217, 248, 218, 248, 219, 248, 220, 248, 221, 248, 222, 239, 254, + 242, + 0, 1, 242, 0, 8, 250, 0, 14, 250, 0, 32, 250, 0, 36, 250, 0, 78, 248, 0, + 82, 248, 0, 100, + 238, 0, 102, 238, 0, 108, 248, 0, 112, 248, 0, 114, 248, 0, 116, 248, 0, + 122, 239, + 1, 32, 25, 238, 11, 66, 251, 193, 251, 194, 251, 195, 251, 196, 251, 197, + 251, 198, + 251, 0, 2, 251, 0, 4, 251, 0, 6, 251, 20, 66, 251, 85, 250, 87, 249, 88, + 251, 89, 250, + 90, 249, 193, 251, 194, 251, 195, 251, 196, 251, 197, 251, 198, 251, 222, + 249, 0, + 2, 251, 0, 4, 251, 0, 6, 251, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, + 66, 251, 85, + 250, 87, 249, 88, 251, 89, 250, 90, 249, 193, 251, 194, 251, 195, 251, + 196, 251, + 197, 251, 198, 251, 222, 249, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, 100, + 250, 0, 102, + 250, 0, 122, 249, 20, 66, 251, 85, 250, 87, 249, 88, 251, 89, 250, 90, + 249, 193, 251, + 194, 251, 195, 251, 196, 251, 197, 251, 198, 251, 222, 249, 0, 2, 251, 0, + 4, 251, + 0, 6, 251, 0, 100, 250, 0, 102, 250, 0, 122, 249, 20, 66, 251, 85, 250, + 87, 249, 88, + 251, 89, 250, 90, 249, 193, 251, 194, 251, 195, 251, 196, 251, 197, 251, + 198, 251, + 222, 249, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, 100, 250, 0, 102, 250, 0, + 122, 249, 20, + 66, 251, 85, 250, 87, 249, 88, 251, 89, 250, 90, 249, 193, 251, 194, 251, + 195, 251, + 196, 251, 197, 251, 198, 251, 222, 249, 0, 2, 251, 0, 4, 251, 0, 6, 251, + 0, 100, 250, + 0, 102, 250, 0, 122, 249, 20, 66, 251, 85, 250, 87, 249, 88, 251, 89, 250, + 90, 249, + 193, 251, 194, 251, 195, 251, 196, 251, 197, 251, 198, 251, 222, 249, 0, + 2, 251, + 0, 4, 251, 0, 6, 251, 0, 100, 250, 0, 102, 250, 0, 122, 249, 11, 66, 250, + 193, 250, + 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, + 6, 250, + 11, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, + 0, 2, 250, + 0, 4, 250, 0, 6, 250, 11, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, + 197, 250, + 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 11, 66, 250, 193, 250, 194, + 250, 195, 250, + 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 65, 45, + 235, 46, 238, + 47, 235, 59, 242, 60, 242, 66, 237, 80, 252, 98, 240, 102, 240, 106, 248, + 112, 239, + 118, 238, 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, + 252, + 212, 252, 213, 252, 214, 252, 215, 252, 217, 252, 225, 247, 226, 240, 227, + 240, + 228, 247, 229, 247, 230, 240, 233, 247, 234, 240, 235, 240, 236, 247, 238, + 248, + 243, 245, 244, 239, 245, 239, 246, 245, 247, 245, 249, 239, 250, 245, 251, + 238, + 252, 238, 253, 245, 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 240, 0, 6, 237, + 0, 7, 240, + 0, 21, 247, 0, 25, 240, 0, 27, 240, 0, 29, 240, 0, 49, 248, 0, 78, 252, 0, + 79, 245, 0, + 82, 252, 0, 83, 239, 0, 109, 245, 0, 113, 238, 0, 115, 238, 0, 117, 238, + 3, 119, 254, + 120, 254, 3, 119, 254, 120, 254, 3, 119, 254, 120, 254, 3, 119, 254, 120, + 254, 3, + 119, 254, 120, 254, 3, 119, 254, 120, 254, 4, 122, 254, 254, 254, 0, 1, + 254, 10, 104, + 254, 119, 253, 120, 253, 121, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, + 254, 0, 37, + 254, 10, 104, 254, 119, 253, 120, 253, 121, 254, 122, 254, 254, 254, 0, 1, + 254, 0, + 33, 254, 0, 37, 254, 10, 104, 254, 119, 253, 120, 253, 121, 254, 122, 254, + 254, 254, + 0, 1, 254, 0, 33, 254, 0, 37, 254, 10, 104, 254, 119, 253, 120, 253, 121, + 254, 122, + 254, 254, 254, 0, 1, 254, 0, 33, 254, 0, 37, 254, 2, 119, 253, 2, 119, + 253, 2, 119, + 253, 2, 119, 253, 5, 119, 250, 122, 254, 254, 254, 0, 1, 254, 6, 119, 254, + 120, 253, + 122, 255, 254, 255, 0, 1, 255, 6, 119, 254, 120, 253, 122, 255, 254, 255, + 0, 1, 255, + 6, 119, 254, 120, 253, 122, 255, 254, 255, 0, 1, 255, 6, 119, 254, 120, + 253, 122, + 255, 254, 255, 0, 1, 255, 6, 119, 254, 120, 253, 122, 255, 254, 255, 0, 1, + 255, 6, + 119, 254, 120, 253, 122, 255, 254, 255, 0, 1, 255, 3, 45, 246, 47, 246, 3, + 45, 246, + 47, 246, 41, 68, 250, 72, 250, 80, 248, 82, 248, 85, 238, 86, 248, 87, + 234, 88, 242, + 90, 239, 119, 245, 120, 242, 122, 242, 200, 250, 211, 248, 212, 248, 213, + 248, 214, + 248, 215, 248, 217, 248, 218, 248, 219, 248, 220, 248, 221, 248, 222, 239, + 254, + 242, 0, 1, 242, 0, 8, 250, 0, 14, 250, 0, 32, 250, 0, 36, 250, 0, 78, 248, + 0, 82, 248, + 0, 100, 238, 0, 102, 238, 0, 108, 248, 0, 112, 248, 0, 114, 248, 0, 116, + 248, 0, 122, + 239, 1, 32, 25, 238, 3, 119, 254, 120, 254, 41, 68, 250, 72, 250, 80, 248, + 82, 248, + 85, 238, 86, 248, 87, 234, 88, 242, 90, 239, 119, 245, 120, 242, 122, 242, + 200, 250, + 211, 248, 212, 248, 213, 248, 214, 248, 215, 248, 217, 248, 218, 248, 219, + 248, + 220, 248, 221, 248, 222, 239, 254, 242, 0, 1, 242, 0, 8, 250, 0, 14, 250, + 0, 32, 250, + 0, 36, 250, 0, 78, 248, 0, 82, 248, 0, 100, 238, 0, 102, 238, 0, 108, 248, + 0, 112, 248, + 0, 114, 248, 0, 116, 248, 0, 122, 239, 1, 32, 25, 238, 3, 119, 254, 120, + 254, 41, 68, + 250, 72, 250, 80, 248, 82, 248, 85, 238, 86, 248, 87, 234, 88, 242, 90, + 239, 119, + 245, 120, 248, 122, 248, 200, 250, 211, 248, 212, 248, 213, 248, 214, 248, + 215, + 248, 217, 248, 218, 248, 219, 248, 220, 248, 221, 248, 222, 239, 254, 248, + 0, 1, + 248, 0, 8, 250, 0, 14, 250, 0, 32, 250, 0, 36, 250, 0, 78, 248, 0, 82, + 248, 0, 100, 238, + 0, 102, 238, 0, 108, 248, 0, 112, 248, 0, 114, 248, 0, 116, 248, 0, 122, + 239, 1, 32, + 25, 238, 3, 119, 254, 120, 254, 4, 122, 254, 254, 254, 0, 1, 254, 4, 122, + 254, 254, + 254, 0, 1, 254, 16, 66, 250, 87, 250, 88, 252, 90, 248, 193, 250, 194, + 250, 195, 250, + 196, 250, 197, 250, 198, 250, 222, 248, 0, 2, 250, 0, 4, 250, 0, 6, 250, + 0, 122, 248, + 16, 66, 250, 87, 250, 88, 252, 90, 248, 193, 250, 194, 250, 195, 250, 196, + 250, 197, + 250, 198, 250, 222, 248, 0, 2, 250, 0, 4, 250, 0, 6, 250, 0, 122, 248, 10, + 104, 254, + 119, 253, 120, 253, 121, 254, 122, 254, 254, 254, 0, 1, 254, 0, 33, 254, + 0, 37, 254, + 10, 104, 254, 119, 253, 120, 253, 121, 254, 122, 254, 254, 254, 0, 1, 254, + 0, 33, + 254, 0, 37, 254, 10, 104, 254, 119, 253, 120, 253, 121, 254, 122, 254, + 254, 254, + 0, 1, 254, 0, 33, 254, 0, 37, 254, 10, 104, 254, 119, 253, 120, 253, 121, + 254, 122, + 254, 254, 254, 0, 1, 254, 0, 33, 254, 0, 37, 254, 2, 119, 253, 2, 119, + 253, 40, 80, + 252, 102, 253, 112, 251, 118, 254, 122, 253, 211, 252, 212, 252, 213, 252, + 214, + 252, 215, 252, 217, 252, 233, 253, 234, 253, 235, 253, 236, 253, 243, 251, + 244, + 251, 245, 251, 246, 251, 247, 251, 249, 251, 250, 254, 251, 254, 252, 254, + 253, + 254, 254, 253, 0, 1, 253, 0, 21, 253, 0, 25, 253, 0, 27, 253, 0, 29, 253, + 0, 78, 252, + 0, 79, 251, 0, 82, 252, 0, 83, 251, 0, 109, 254, 0, 113, 254, 0, 115, 254, + 0, 117, 254, + 22, 102, 255, 112, 255, 122, 254, 233, 255, 234, 255, 235, 255, 236, 255, + 243, 255, + 244, 255, 245, 255, 246, 255, 247, 255, 249, 255, 254, 254, 0, 1, 254, 0, + 21, 255, + 0, 25, 255, 0, 27, 255, 0, 29, 255, 0, 79, 255, 0, 83, 255, 13, 85, 242, + 87, 240, 88, + 245, 90, 240, 122, 248, 222, 240, 254, 248, 0, 1, 248, 0, 100, 242, 0, + 102, 242, 0, + 122, 240, 1, 32, 25, 242, 2, 120, 255, 13, 85, 242, 87, 240, 88, 245, 90, + 240, 122, + 248, 222, 240, 254, 248, 0, 1, 248, 0, 100, 242, 0, 102, 242, 0, 122, 240, + 1, 32, 25, + 242, 2, 120, 255, 5, 122, 248, 254, 248, 0, 1, 248, 1, 32, 25, 242, 13, + 85, 242, 87, + 240, 88, 245, 90, 240, 122, 248, 222, 240, 254, 248, 0, 1, 248, 0, 100, + 242, 0, 102, + 242, 0, 122, 240, 1, 32, 25, 242, 2, 120, 255, 11, 66, 251, 193, 251, 194, + 251, 195, + 251, 196, 251, 197, 251, 198, 251, 0, 2, 251, 0, 4, 251, 0, 6, 251, 5, + 119, 250, 122, + 254, 254, 254, 0, 1, 254, 11, 66, 251, 193, 251, 194, 251, 195, 251, 196, + 251, 197, + 251, 198, 251, 0, 2, 251, 0, 4, 251, 0, 6, 251, 5, 119, 250, 122, 254, + 254, 254, 0, + 1, 254, 11, 66, 251, 193, 251, 194, 251, 195, 251, 196, 251, 197, 251, + 198, 251, + 0, 2, 251, 0, 4, 251, 0, 6, 251, 5, 119, 250, 122, 254, 254, 254, 0, 1, + 254, 20, 66, + 251, 85, 250, 87, 249, 88, 251, 89, 250, 90, 249, 193, 251, 194, 251, 195, + 251, 196, + 251, 197, 251, 198, 251, 222, 249, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, + 100, 250, 0, + 102, 250, 0, 122, 249, 6, 119, 254, 120, 253, 122, 255, 254, 255, 0, 1, + 255, 20, 66, + 251, 85, 250, 87, 249, 88, 251, 89, 250, 90, 249, 193, 251, 194, 251, 195, + 251, 196, + 251, 197, 251, 198, 251, 222, 249, 0, 2, 251, 0, 4, 251, 0, 6, 251, 0, + 100, 250, 0, + 102, 250, 0, 122, 249, 6, 119, 254, 120, 253, 122, 255, 254, 255, 0, 1, + 255, 27, 80, + 250, 85, 247, 86, 250, 87, 244, 88, 248, 90, 246, 211, 250, 212, 250, 213, + 250, 214, + 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, 222, 246, + 0, 78, + 250, 0, 82, 250, 0, 100, 247, 0, 102, 247, 0, 108, 250, 0, 112, 250, 0, + 114, 250, 0, + 116, 250, 0, 122, 246, 7, 45, 250, 46, 254, 47, 248, 104, 254, 0, 33, 254, + 0, 37, 254, + 27, 80, 250, 85, 247, 86, 250, 87, 244, 88, 248, 90, 246, 211, 250, 212, + 250, 213, + 250, 214, 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, 250, 221, 250, + 222, + 246, 0, 78, 250, 0, 82, 250, 0, 100, 247, 0, 102, 247, 0, 108, 250, 0, + 112, 250, 0, + 114, 250, 0, 116, 250, 0, 122, 246, 7, 45, 250, 46, 254, 47, 248, 104, + 254, 0, 33, + 254, 0, 37, 254, 27, 80, 250, 85, 247, 86, 250, 87, 244, 88, 248, 90, 246, + 211, 250, + 212, 250, 213, 250, 214, 250, 215, 250, 217, 250, 218, 250, 219, 250, 220, + 250, + 221, 250, 222, 246, 0, 78, 250, 0, 82, 250, 0, 100, 247, 0, 102, 247, 0, + 108, 250, + 0, 112, 250, 0, 114, 250, 0, 116, 250, 0, 122, 246, 7, 45, 250, 46, 254, + 47, 248, 104, + 254, 0, 33, 254, 0, 37, 254, 73, 45, 245, 46, 242, 47, 245, 59, 249, 60, + 248, 66, 241, + 80, 254, 98, 244, 102, 245, 106, 251, 112, 244, 115, 251, 118, 249, 120, + 244, 122, + 244, 193, 241, 194, 241, 195, 241, 196, 241, 197, 241, 198, 241, 211, 254, + 212, + 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, 226, 244, 227, 244, + 228, + 250, 229, 250, 230, 244, 233, 252, 234, 245, 235, 252, 236, 252, 238, 251, + 243, + 244, 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, 249, 251, 249, + 252, + 249, 253, 249, 254, 244, 0, 1, 244, 0, 2, 241, 0, 3, 250, 0, 4, 241, 0, 5, + 244, 0, 6, + 241, 0, 7, 244, 0, 21, 245, 0, 25, 245, 0, 27, 245, 0, 29, 245, 0, 49, + 251, 0, 78, 254, + 0, 79, 244, 0, 82, 254, 0, 83, 244, 0, 87, 251, 0, 89, 251, 0, 91, 251, 0, + 109, 249, + 0, 113, 249, 0, 115, 249, 0, 117, 249, 73, 45, 245, 46, 242, 47, 245, 59, + 249, 60, + 248, 66, 241, 80, 254, 98, 244, 102, 245, 106, 251, 112, 244, 115, 251, + 118, 249, + 120, 244, 122, 244, 193, 241, 194, 241, 195, 241, 196, 241, 197, 241, 198, + 241, + 211, 254, 212, 254, 213, 254, 214, 254, 215, 254, 217, 254, 225, 250, 226, + 244, + 227, 244, 228, 250, 229, 250, 230, 244, 233, 245, 234, 245, 235, 252, 236, + 252, + 238, 251, 243, 244, 244, 244, 245, 244, 246, 244, 247, 244, 249, 244, 250, + 249, + 251, 249, 252, 249, 253, 249, 254, 244, 0, 1, 244, 0, 2, 241, 0, 3, 250, + 0, 4, 241, + 0, 5, 244, 0, 6, 241, 0, 7, 244, 0, 21, 252, 0, 25, 245, 0, 27, 245, 0, + 29, 245, 0, 49, + 251, 0, 78, 254, 0, 79, 244, 0, 82, 254, 0, 83, 244, 0, 87, 251, 0, 89, + 251, 0, 91, 251, + 0, 109, 249, 0, 113, 249, 0, 115, 249, 0, 117, 249, 11, 66, 250, 193, 250, + 194, 250, + 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, + 11, 66, 250, + 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, 198, 250, 0, 2, 250, 0, + 4, 250, + 0, 6, 250, 11, 66, 250, 193, 250, 194, 250, 195, 250, 196, 250, 197, 250, + 198, 250, + 0, 2, 250, 0, 4, 250, 0, 6, 250, 11, 66, 250, 193, 250, 194, 250, 195, + 250, 196, 250, + 197, 250, 198, 250, 0, 2, 250, 0, 4, 250, 0, 6, 250, 65, 45, 235, 46, 238, + 47, 235, + 59, 242, 60, 242, 66, 237, 80, 252, 98, 240, 102, 240, 106, 248, 112, 239, + 118, 238, + 193, 237, 194, 237, 195, 237, 196, 237, 197, 237, 198, 237, 211, 252, 212, + 252, + 213, 252, 214, 252, 215, 252, 217, 252, 225, 247, 226, 240, 227, 240, 228, + 240, + 229, 247, 230, 240, 233, 247, 234, 240, 235, 240, 236, 247, 238, 248, 243, + 245, + 244, 239, 245, 239, 246, 245, 247, 245, 249, 239, 250, 245, 251, 238, 252, + 238, + 253, 245, 0, 2, 237, 0, 3, 247, 0, 4, 237, 0, 5, 240, 0, 6, 237, 0, 7, + 240, 0, 21, 247, + 0, 25, 240, 0, 27, 240, 0, 29, 240, 0, 49, 248, 0, 78, 252, 0, 79, 245, 0, + 82, 252, 0, + 83, 239, 0, 109, 245, 0, 113, 238, 0, 115, 238, 0, 117, 238, 12, 66, 244, + 193, 244, + 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 0, 2, 244, 0, 4, 244, 0, + 6, 244, + 1, 32, 24, 245, 21, 33, 245, 101, 249, 109, 255, 115, 249, 116, 248, 117, + 254, 119, + 249, 0, 19, 249, 0, 60, 255, 0, 62, 255, 0, 68, 255, 0, 87, 249, 0, 89, + 249, 0, 91, 249, + 0, 93, 248, 0, 97, 248, 0, 99, 248, 0, 101, 254, 1, 2, 25, 248, 1, 32, 25, + 245, 11, 66, + 244, 193, 244, 194, 244, 195, 244, 196, 244, 197, 244, 198, 244, 0, 2, + 244, 0, 4, + 244, 0, 6, 244 }; -static afm_cuint16 afm_Times_Roman_highchars_index[] = { /* 220 */ - 161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177, - 178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193, - 194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209, - 210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225, - 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, - 242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257, - 258,259,260,261,262,263,268,269,270,271,272,273,274,275,278,279, - 280,281,282,283,286,287,290,291,298,299,302,303,304,305,310,311, - 313,314,315,316,317,318,321,322,323,324,325,326,327,328,332,333, - 336,337,338,339,340,341,342,343,344,345,346,347,350,351,352,353, - 354,355,356,357,362,363,366,367,368,369,370,371,376,377,378,379, - 380,381,382,402,536,537,710,711,728,729,730,731,732,733,8211,8212, - 8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250, - 8260,8364,8482,8706,8710,8721,8722,8730,8800,8804,8805,9674,63171, - 64257,64258 +static afm_cuint16 afm_Times_Roman_highchars_index[] = { /* 220 */ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, + 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, 272, 273, 274, 275, 278, + 279, + 280, 281, 282, 283, 286, 287, 290, 291, 298, 299, 302, 303, 304, 305, 310, + 311, + 313, 314, 315, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 332, + 333, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 350, 351, 352, + 353, + 354, 355, 356, 357, 362, 363, 366, 367, 368, 369, 370, 371, 376, 377, 378, + 379, + 380, 381, 382, 402, 536, 537, 710, 711, 728, 729, 730, 731, 732, 733, + 8211, 8212, + 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8249, + 8250, + 8260, 8364, 8482, 8706, 8710, 8721, 8722, 8730, 8800, 8804, 8805, 9674, + 63171, + 64257, 64258 }; static afm_cunicode afm_Times_Roman_ligatures[] = { /* 3 */ - 102,105,64257 + 102, 105, 64257 }; const afm_fontinfo afm_fontinfolist[] = { - { /* Courier.afm 761 bytes */ - "Courier", "Courier", - 629, -157, - afm_Courier_widths, - NULL, - NULL, - afm_Courier_highchars_index, 220, - afm_Courier_ligatures, 1}, - { /* Courier-Bold.afm 761 bytes */ - "Courier-Bold", "Courier Bold", - 629, -157, - afm_Courier_Bold_widths, - NULL, - NULL, - afm_Courier_Bold_highchars_index, 220, - afm_Courier_Bold_ligatures, 1}, - { /* Courier-BoldOblique.afm 761 bytes */ - "Courier-BoldOblique", "Courier Bold Oblique", - 629, -157, - afm_Courier_BoldOblique_widths, - NULL, - NULL, - afm_Courier_BoldOblique_highchars_index, 220, - afm_Courier_BoldOblique_ligatures, 1}, - { /* Courier-Oblique.afm 761 bytes */ - "Courier-Oblique", "Courier Oblique", - 629, -157, - afm_Courier_Oblique_widths, - NULL, - NULL, - afm_Courier_Oblique_highchars_index, 220, - afm_Courier_Oblique_ligatures, 1}, - { /* Helvetica.afm 7841 bytes */ - "Helvetica", "Helvetica", - 718, -207, - afm_Helvetica_widths, - afm_Helvetica_kerning_index, - afm_Helvetica_kerning_data, - afm_Helvetica_highchars_index, 220, - afm_Helvetica_ligatures, 1}, - { /* Helvetica-Bold.afm 7336 bytes */ - "Helvetica-Bold", "Helvetica Bold", - 718, -207, - afm_Helvetica_Bold_widths, - afm_Helvetica_Bold_kerning_index, - afm_Helvetica_Bold_kerning_data, - afm_Helvetica_Bold_highchars_index, 220, - afm_Helvetica_Bold_ligatures, 1}, - { /* Helvetica-BoldOblique.afm 7336 bytes */ - "Helvetica-BoldOblique", "Helvetica Bold Oblique", - 718, -207, - afm_Helvetica_BoldOblique_widths, - afm_Helvetica_BoldOblique_kerning_index, - afm_Helvetica_BoldOblique_kerning_data, - afm_Helvetica_BoldOblique_highchars_index, 220, - afm_Helvetica_BoldOblique_ligatures, 1}, - { /* Helvetica-Oblique.afm 7841 bytes */ - "Helvetica-Oblique", "Helvetica Oblique", - 718, -207, - afm_Helvetica_Oblique_widths, - afm_Helvetica_Oblique_kerning_index, - afm_Helvetica_Oblique_kerning_data, - afm_Helvetica_Oblique_highchars_index, 220, - afm_Helvetica_Oblique_ligatures, 1}, - { /* ZapfDingbats.afm 416 bytes */ - "ZapfDingbats", "ITC Zapf Dingbats", - 0, 0, - afm_ZapfDingbats_widths, - NULL, - NULL, - afm_ZapfDingbats_highchars_index, 107, - NULL, 0}, - { /* Symbol.afm 563 bytes */ - "Symbol", "Symbol", - 0, 0, - afm_Symbol_widths, - NULL, - NULL, - afm_Symbol_highchars_index, 156, - NULL, 0}, - { /* Times-Bold.afm 6761 bytes */ - "Times-Bold", "Times Bold", - 683, -217, - afm_Times_Bold_widths, - afm_Times_Bold_kerning_index, - afm_Times_Bold_kerning_data, - afm_Times_Bold_highchars_index, 220, - afm_Times_Bold_ligatures, 1}, - { /* Times-BoldItalic.afm 6270 bytes */ - "Times-BoldItalic", "Times Bold Italic", - 683, -217, - afm_Times_BoldItalic_widths, - afm_Times_BoldItalic_kerning_index, - afm_Times_BoldItalic_kerning_data, - afm_Times_BoldItalic_highchars_index, 220, - afm_Times_BoldItalic_ligatures, 1}, - { /* Times-Italic.afm 6975 bytes */ - "Times-Italic", "Times Italic", - 683, -217, - afm_Times_Italic_widths, - afm_Times_Italic_kerning_index, - afm_Times_Italic_kerning_data, - afm_Times_Italic_highchars_index, 220, - afm_Times_Italic_ligatures, 1}, - { /* Times-Roman.afm 6287 bytes */ - "Times-Roman", "Times Roman", - 683, -217, - afm_Times_Roman_widths, - afm_Times_Roman_kerning_index, - afm_Times_Roman_kerning_data, - afm_Times_Roman_highchars_index, 220, - afm_Times_Roman_ligatures, 1}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + { /* Courier.afm 761 bytes */ + "Courier", "Courier", + 629, -157, + afm_Courier_widths, + NULL, + NULL, + afm_Courier_highchars_index, 220, + afm_Courier_ligatures, 1}, + { /* Courier-Bold.afm 761 bytes */ + "Courier-Bold", "Courier Bold", + 629, -157, + afm_Courier_Bold_widths, + NULL, + NULL, + afm_Courier_Bold_highchars_index, 220, + afm_Courier_Bold_ligatures, 1}, + { /* Courier-BoldOblique.afm 761 bytes */ + "Courier-BoldOblique", "Courier Bold Oblique", + 629, -157, + afm_Courier_BoldOblique_widths, + NULL, + NULL, + afm_Courier_BoldOblique_highchars_index, 220, + afm_Courier_BoldOblique_ligatures, 1}, + { /* Courier-Oblique.afm 761 bytes */ + "Courier-Oblique", "Courier Oblique", + 629, -157, + afm_Courier_Oblique_widths, + NULL, + NULL, + afm_Courier_Oblique_highchars_index, 220, + afm_Courier_Oblique_ligatures, 1}, + { /* Helvetica.afm 7841 bytes */ + "Helvetica", "Helvetica", + 718, -207, + afm_Helvetica_widths, + afm_Helvetica_kerning_index, + afm_Helvetica_kerning_data, + afm_Helvetica_highchars_index, 220, + afm_Helvetica_ligatures, 1}, + { /* Helvetica-Bold.afm 7336 bytes */ + "Helvetica-Bold", "Helvetica Bold", + 718, -207, + afm_Helvetica_Bold_widths, + afm_Helvetica_Bold_kerning_index, + afm_Helvetica_Bold_kerning_data, + afm_Helvetica_Bold_highchars_index, 220, + afm_Helvetica_Bold_ligatures, 1}, + { /* Helvetica-BoldOblique.afm 7336 bytes */ + "Helvetica-BoldOblique", "Helvetica Bold Oblique", + 718, -207, + afm_Helvetica_BoldOblique_widths, + afm_Helvetica_BoldOblique_kerning_index, + afm_Helvetica_BoldOblique_kerning_data, + afm_Helvetica_BoldOblique_highchars_index, 220, + afm_Helvetica_BoldOblique_ligatures, 1}, + { /* Helvetica-Oblique.afm 7841 bytes */ + "Helvetica-Oblique", "Helvetica Oblique", + 718, -207, + afm_Helvetica_Oblique_widths, + afm_Helvetica_Oblique_kerning_index, + afm_Helvetica_Oblique_kerning_data, + afm_Helvetica_Oblique_highchars_index, 220, + afm_Helvetica_Oblique_ligatures, 1}, + { /* ZapfDingbats.afm 416 bytes */ + "ZapfDingbats", "ITC Zapf Dingbats", + 0, 0, + afm_ZapfDingbats_widths, + NULL, + NULL, + afm_ZapfDingbats_highchars_index, 107, + NULL, 0}, + { /* Symbol.afm 563 bytes */ + "Symbol", "Symbol", + 0, 0, + afm_Symbol_widths, + NULL, + NULL, + afm_Symbol_highchars_index, 156, + NULL, 0}, + { /* Times-Bold.afm 6761 bytes */ + "Times-Bold", "Times Bold", + 683, -217, + afm_Times_Bold_widths, + afm_Times_Bold_kerning_index, + afm_Times_Bold_kerning_data, + afm_Times_Bold_highchars_index, 220, + afm_Times_Bold_ligatures, 1}, + { /* Times-BoldItalic.afm 6270 bytes */ + "Times-BoldItalic", "Times Bold Italic", + 683, -217, + afm_Times_BoldItalic_widths, + afm_Times_BoldItalic_kerning_index, + afm_Times_BoldItalic_kerning_data, + afm_Times_BoldItalic_highchars_index, 220, + afm_Times_BoldItalic_ligatures, 1}, + { /* Times-Italic.afm 6975 bytes */ + "Times-Italic", "Times Italic", + 683, -217, + afm_Times_Italic_widths, + afm_Times_Italic_kerning_index, + afm_Times_Italic_kerning_data, + afm_Times_Italic_highchars_index, 220, + afm_Times_Italic_ligatures, 1}, + { /* Times-Roman.afm 6287 bytes */ + "Times-Roman", "Times Roman", + 683, -217, + afm_Times_Roman_widths, + afm_Times_Roman_kerning_index, + afm_Times_Roman_kerning_data, + afm_Times_Roman_highchars_index, 220, + afm_Times_Roman_ligatures, 1}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; const int afm_fontinfo_count = 14; diff --git a/src/rrd_afm_data.h b/src/rrd_afm_data.h index 84b1422..f2b9fa3 100644 --- a/src/rrd_afm_data.h +++ b/src/rrd_afm_data.h @@ -153,36 +153,36 @@ Implementation design: and 490 Kb for a set of 276 Adobe fonts. */ -typedef unsigned char afm_uint8; -typedef signed char afm_sint8; +typedef unsigned char afm_uint8; +typedef signed char afm_sint8; typedef unsigned short afm_uint16; -typedef signed short afm_sint16; +typedef signed short afm_sint16; typedef unsigned short afm_unicode; -typedef const afm_uint8 afm_cuint8; -typedef const afm_sint8 afm_csint8; -typedef const afm_uint16 afm_cuint16; -typedef const afm_sint16 afm_csint16; +typedef const afm_uint8 afm_cuint8; +typedef const afm_sint8 afm_csint8; +typedef const afm_uint16 afm_cuint16; +typedef const afm_sint16 afm_csint16; typedef const afm_unicode afm_cunicode; typedef struct afm_fontinfo { - const char *fullname; /* e.g. "Futura Bold Oblique" */ - const char *postscript_name; /* e.g. "Futura-BoldOblique" */ - afm_cuint16 ascender, descender; - afm_cuint8 *widths; - afm_csint16 *kerning_index; - afm_cuint8 *kerning_data; - afm_cuint16 *highchars_index; - afm_cuint16 highchars_count; - afm_cunicode *ligatures; - afm_cuint16 ligatures_count; -} afm_fontinfo; + const char *fullname; /* e.g. "Futura Bold Oblique" */ + const char *postscript_name; /* e.g. "Futura-BoldOblique" */ + afm_cuint16 ascender, descender; + afm_cuint8 *widths; + afm_csint16 *kerning_index; + afm_cuint8 *kerning_data; + afm_cuint16 *highchars_index; + afm_cuint16 highchars_count; + afm_cunicode *ligatures; + afm_cuint16 ligatures_count; +} afm_fontinfo; typedef struct old_afm_fontinfo { - const char *fontname, *fullname; - const unsigned short *charinfo, *intarray; - const unsigned short charinfocount; - const unsigned short fixedpitch; + const char *fontname, *fullname; + const unsigned short *charinfo, *intarray; + const unsigned short charinfocount; + const unsigned short fixedpitch; } old_afm_fontinfo; extern const afm_fontinfo afm_fontinfolist[]; diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c index 5c2aa1b..23567c5 100644 --- a/src/rrd_cgi.c +++ b/src/rrd_cgi.c @@ -12,730 +12,835 @@ #define DEBUG_VARS*/ typedef struct var_s { - char *name, *value; + char *name, *value; } s_var; typedef struct cgi_s { - s_var **vars; + s_var **vars; } s_cgi; /* in arg[0] find tags beginning with arg[1] call arg[2] on them and replace by result of arg[2] call */ -int parse(char **, long, char *, char *(*)(long , const char **)); +int parse( + char **, + long, + char *, + char * (*)(long, + const char **)); /**************************************************/ /* tag replacers ... they are called from parse */ /* through function pointers */ /**************************************************/ -/* return cgi var named arg[0] */ -char* cgiget(long , const char **); +/* return cgi var named arg[0] */ +char *cgiget( + long, + const char **); -/* return a quoted cgi var named arg[0] */ -char* cgigetq(long , const char **); +/* return a quoted cgi var named arg[0] */ +char *cgigetq( + long, + const char **); /* return a quoted and sanitized cgi variable */ -char* cgigetqp(long , const char **); +char *cgigetqp( + long, + const char **); /* call rrd_graph and insert appropriate image tag */ -char* drawgraph(long, const char **); +char *drawgraph( + long, + const char **); /* return PRINT functions from last rrd_graph call */ -char* drawprint(long, const char **); +char *drawprint( + long, + const char **); /* pretty-print the value for some.rrd via strftime() */ -char* printtimelast(long, const char **); +char *printtimelast( + long, + const char **); /* pretty-print current time */ -char* printtimenow(long, const char **); +char *printtimenow( + long, + const char **); /* set an environment variable */ -char* rrdsetenv(long, const char **); +char *rrdsetenv( + long, + const char **); /* get an environment variable */ -char* rrdgetenv(long, const char **); +char *rrdgetenv( + long, + const char **); /* include the named file at this point */ -char* includefile(long, const char **); +char *includefile( + long, + const char **); /* for how long is the output of the cgi valid ? */ -char* rrdgoodfor(long, const char **); - -/* return rrdcgi version string */ -char* rrdgetinternal(long, const char **); - -char* rrdstrip(char *buf); -char* scanargs(char *line, int *argc, char ***args); +char *rrdgoodfor( + long, + const char **); + +/* return rrdcgi version string */ +char *rrdgetinternal( + long, + const char **); + +char *rrdstrip( + char *buf); +char *scanargs( + char *line, + int *argc, + char ***args); /* format at-time specified times using strftime */ -char* printstrftime(long, const char**); +char *printstrftime( + long, + const char **); /** HTTP protocol needs special format, and GMT time **/ -char *http_time(time_t *); +char *http_time( + time_t *); /* return a pointer to newly allocated copy of this string */ -char *stralloc(const char *); +char *stralloc( + const char *); /* global variable for rrdcgi */ -s_cgi *rrdcgiArg; +s_cgi *rrdcgiArg; /* rrdcgiHeader * * Prints a valid CGI Header (Content-type...) etc. */ -void rrdcgiHeader(void); +void rrdcgiHeader( + void); /* rrdcgiDecodeString * decode html escapes */ - -char *rrdcgiDecodeString(char *text); + +char *rrdcgiDecodeString( + char *text); /* rrdcgiDebug * * Set/unsets debugging */ -void rrdcgiDebug(int level, int where); +void rrdcgiDebug( + int level, + int where); /* rrdcgiInit * * Reads in variables set via POST or stdin. */ -s_cgi *rrdcgiInit (void); +s_cgi *rrdcgiInit( + void); /* rrdcgiGetValue * * Returns the value of the specified variable or NULL if it's empty * or doesn't exist. */ -char *rrdcgiGetValue (s_cgi *parms, const char *name); +char *rrdcgiGetValue( + s_cgi * parms, + const char *name); /* rrdcgiFreeList * * Frees a list as returned by rrdcgiGetVariables() */ -void rrdcgiFreeList (char **list); +void rrdcgiFreeList( + char **list); /* rrdcgiFree * * Frees the internal data structures */ -void rrdcgiFree (s_cgi *parms); +void rrdcgiFree( + s_cgi * parms); /* rrdcgiReadVariables() * * Read from stdin if no string is provided via CGI. Variables that * doesn't have a value associated with it doesn't get stored. */ -s_var **rrdcgiReadVariables(void); +s_var **rrdcgiReadVariables( + void); -int rrdcgiDebugLevel = 0; -int rrdcgiDebugStderr = 1; -char *rrdcgiHeaderString = NULL; -char *rrdcgiType = NULL; +int rrdcgiDebugLevel = 0; +int rrdcgiDebugStderr = 1; +char *rrdcgiHeaderString = NULL; +char *rrdcgiType = NULL; /* rrd interface to the variable functions {put,get}var() */ -char* rrdgetvar(long argc, const char **args); -char* rrdsetvar(long argc, const char **args); -char* rrdsetvarconst(long argc, const char **args); +char *rrdgetvar( + long argc, + const char **args); +char *rrdsetvar( + long argc, + const char **args); +char *rrdsetvarconst( + long argc, + const char **args); /* variable store: put/get key-value pairs */ -static int initvar(); -static void donevar(); -static const char* getvar(const char* varname); -static const char* putvar(const char* name, const char* value, int is_const); +static int initvar( + ); +static void donevar( + ); +static const char *getvar( + const char *varname); +static const char *putvar( + const char *name, + const char *value, + int is_const); /* key value pair that makes up an entry in the variable store */ -typedef struct -{ - int is_const; /* const variable or not */ - const char* name; /* variable name */ - const char* value; /* variable value */ +typedef struct { + int is_const; /* const variable or not */ + const char *name; /* variable name */ + const char *value; /* variable value */ } vardata; /* the variable heap: start with a heapsize of 10 variables */ #define INIT_VARSTORE_SIZE 10 -static vardata* varheap = NULL; +static vardata *varheap = NULL; static size_t varheap_size = 0; /* allocate and initialize variable heap */ -static int -initvar() +static int initvar( + ) { - varheap = (vardata*)malloc(sizeof(vardata) * INIT_VARSTORE_SIZE); - if (varheap == NULL) { - fprintf(stderr, "ERROR: unable to initialize variable store\n"); - return -1; - } - memset(varheap, 0, sizeof(vardata) * INIT_VARSTORE_SIZE); - varheap_size = INIT_VARSTORE_SIZE; - return 0; + varheap = (vardata *) malloc(sizeof(vardata) * INIT_VARSTORE_SIZE); + if (varheap == NULL) { + fprintf(stderr, "ERROR: unable to initialize variable store\n"); + return -1; + } + memset(varheap, 0, sizeof(vardata) * INIT_VARSTORE_SIZE); + varheap_size = INIT_VARSTORE_SIZE; + return 0; } /* cleanup: free allocated memory */ -static void -donevar() +static void donevar( + ) { - int i; - if (varheap) { - for (i=0; i<(int)varheap_size; i++) { - if (varheap[i].name) { - free((char*)varheap[i].name); - } - if (varheap[i].value) { - free((char*)varheap[i].value); - } - } - free(varheap); - } + int i; + + if (varheap) { + for (i = 0; i < (int) varheap_size; i++) { + if (varheap[i].name) { + free((char *) varheap[i].name); + } + if (varheap[i].value) { + free((char *) varheap[i].value); + } + } + free(varheap); + } } /* Get a variable from the variable store. Return NULL in case the requested variable was not found. */ -static const char* -getvar(const char* name) +static const char *getvar( + const char *name) { - int i; - for (i=0; i<(int)varheap_size && varheap[i].name; i++) { - if (0 == strcmp(name, varheap[i].name)) { + int i; + + for (i = 0; i < (int) varheap_size && varheap[i].name; i++) { + if (0 == strcmp(name, varheap[i].name)) { #ifdef DEBUG_VARS - printf("\n", name, varheap[i].value); + printf("\n", name, varheap[i].value); #endif - return varheap[i].value; - } - } + return varheap[i].value; + } + } #ifdef DEBUG_VARS - printf("\n", name); + printf("\n", name); #endif - return NULL; + return NULL; } /* Put a variable into the variable store. If a variable by that name exists, it's value is overwritten with the new value unless it was marked as 'const' (initialized by RRD::SETCONSTVAR). Returns a copy the newly allocated value on success, NULL on error. */ -static const char* -putvar(const char* name, const char* value, int is_const) +static const char *putvar( + const char *name, + const char *value, + int is_const) { - int i; - for (i=0; i < (int)varheap_size && varheap[i].name; i++) { - if (0 == strcmp(name, varheap[i].name)) { - /* overwrite existing entry */ - if (varheap[i].is_const) { + int i; + + for (i = 0; i < (int) varheap_size && varheap[i].name; i++) { + if (0 == strcmp(name, varheap[i].name)) { + /* overwrite existing entry */ + if (varheap[i].is_const) { #ifdef DEBUG_VARS - printf("\n", name, value); + printf("\n", name, value); # endif - return varheap[i].value; - } + return varheap[i].value; + } #ifdef DEBUG_VARS - printf("\n", - name, value, varheap[i].value); + printf("\n", + name, value, varheap[i].value); #endif - /* make it possible to promote a variable to readonly */ - varheap[i].is_const = is_const; - free((char*)varheap[i].value); - varheap[i].value = stralloc(value); - return varheap[i].value; - } - } - - /* no existing variable found by that name, add it */ - if (i == (int)varheap_size) { - /* ran out of heap: resize heap to double size */ - size_t new_size = varheap_size * 2; - varheap = (vardata*)(realloc(varheap, sizeof(vardata) * new_size)); - if (!varheap) { - fprintf(stderr, "ERROR: Unable to realloc variable heap\n"); - return NULL; - } - /* initialize newly allocated memory */; - memset(&varheap[varheap_size], 0, sizeof(vardata) * varheap_size); - varheap_size = new_size; - } - varheap[i].is_const = is_const; - varheap[i].name = stralloc(name); - varheap[i].value = stralloc(value); + /* make it possible to promote a variable to readonly */ + varheap[i].is_const = is_const; + free((char *) varheap[i].value); + varheap[i].value = stralloc(value); + return varheap[i].value; + } + } + + /* no existing variable found by that name, add it */ + if (i == (int) varheap_size) { + /* ran out of heap: resize heap to double size */ + size_t new_size = varheap_size * 2; + + varheap = (vardata *) (realloc(varheap, sizeof(vardata) * new_size)); + if (!varheap) { + fprintf(stderr, "ERROR: Unable to realloc variable heap\n"); + return NULL; + } + /* initialize newly allocated memory */ ; + memset(&varheap[varheap_size], 0, sizeof(vardata) * varheap_size); + varheap_size = new_size; + } + varheap[i].is_const = is_const; + varheap[i].name = stralloc(name); + varheap[i].value = stralloc(value); #ifdef DEBUG_VARS - printf("\n", name, value); + printf("\n", name, value); #endif - return varheap[i].value; + return varheap[i].value; } /* expand those RRD:* directives that can be used recursivly */ -static char* -rrd_expand_vars(char* buffer) +static char *rrd_expand_vars( + char *buffer) { - int i; + int i; #ifdef DEBUG_PARSER - printf("expanding variables in '%s'\n", buffer); + printf("expanding variables in '%s'\n", buffer); #endif - for (i=0; buffer[i]; i++) { - if (buffer[i] != '<') - continue; - parse(&buffer, i, "= argc ) { - fprintf(stderr, "ERROR: expected a filename\n"); - exit(1); - } else { - length = readfile(argv[optind], &buffer, 1); - } - - if(rrd_test_error()) { - fprintf(stderr, "ERROR: %s\n",rrd_get_error()); - exit(1); - } - - /* initialize variable heap */ - initvar(); + optind = 0; + opterr = 0; /* initialize getopt */ + + /* what do we get for cmdline arguments? + for (i=0;i= argc) { + fprintf(stderr, "ERROR: expected a filename\n"); + exit(1); + } else { + length = readfile(argv[optind], &buffer, 1); + } + + if (rrd_test_error()) { + fprintf(stderr, "ERROR: %s\n", rrd_get_error()); + exit(1); + } + + /* initialize variable heap */ + initvar(); #ifdef DEBUG_PARSER - /* some fake header for testing */ - printf ("Content-Type: text/html\nContent-Length: 10000000\n\n\n"); + /* some fake header for testing */ + printf("Content-Type: text/html\nContent-Length: 10000000\n\n\n"); #endif - /* expand rrd directives in buffer recursivly */ - for (i=0; buffer[i]; i++) { - if (buffer[i] != '<') - continue; - if (!filter) { - parse(&buffer, i, " 0) { - time_t now; - now = time(NULL); - printf("Last-Modified: %s\n", http_time(&now)); - now += labs(goodfor); - printf("Expires: %s\n", http_time(&now)); - if (goodfor < 0) { - printf("Refresh: %ld\n", labs(goodfor)); - } - } - printf("\n"); - } - - /* output result */ - printf("%s", buffer); - - /* cleanup */ - calfree(); - if (buffer){ - free(buffer); - } - donevar(); - exit(0); + /* expand rrd directives in buffer recursivly */ + for (i = 0; buffer[i]; i++) { + if (buffer[i] != '<') + continue; + if (!filter) { + parse(&buffer, i, " 0) { + time_t now; + + now = time(NULL); + printf("Last-Modified: %s\n", http_time(&now)); + now += labs(goodfor); + printf("Expires: %s\n", http_time(&now)); + if (goodfor < 0) { + printf("Refresh: %ld\n", labs(goodfor)); + } + } + printf("\n"); + } + + /* output result */ + printf("%s", buffer); + + /* cleanup */ + calfree(); + if (buffer) { + free(buffer); + } + donevar(); + exit(0); } /* remove occurrences of .. this is a general measure to make paths which came in via cgi do not go UP ... */ -char* rrdsetenv(long argc, const char **args) { - if (argc >= 2) { - char *xyz = malloc((strlen(args[0]) + strlen(args[1]) + 2)); - if (xyz == NULL) { - return stralloc("[ERROR: allocating setenv buffer]"); - }; - sprintf(xyz, "%s=%s", args[0], args[1]); - if(putenv(xyz) == -1) { - free(xyz); - return stralloc("[ERROR: failed to do putenv]"); - }; - return stralloc(""); - } - return stralloc("[ERROR: setenv failed because not enough " - "arguments were defined]"); +char *rrdsetenv( + long argc, + const char **args) +{ + if (argc >= 2) { + char *xyz = malloc((strlen(args[0]) + strlen(args[1]) + 2)); + + if (xyz == NULL) { + return stralloc("[ERROR: allocating setenv buffer]"); + }; + sprintf(xyz, "%s=%s", args[0], args[1]); + if (putenv(xyz) == -1) { + free(xyz); + return stralloc("[ERROR: failed to do putenv]"); + }; + return stralloc(""); + } + return stralloc("[ERROR: setenv failed because not enough " + "arguments were defined]"); } /* rrd interface to the variable function putvar() */ -char* -rrdsetvar(long argc, const char **args) +char *rrdsetvar( + long argc, + const char **args) { - if (argc >= 2) - { - const char* result = putvar(args[0], args[1], 0 /* not const */); - if (result) { - /* setvar does not return the value set */ - return stralloc(""); - } - return stralloc("[ERROR: putvar failed]"); - } - return stralloc("[ERROR: putvar failed because not enough arguments " - "were defined]"); + if (argc >= 2) { + const char *result = putvar(args[0], args[1], 0 /* not const */ ); + + if (result) { + /* setvar does not return the value set */ + return stralloc(""); + } + return stralloc("[ERROR: putvar failed]"); + } + return stralloc("[ERROR: putvar failed because not enough arguments " + "were defined]"); } /* rrd interface to the variable function putvar() */ -char* -rrdsetvarconst(long argc, const char **args) +char *rrdsetvarconst( + long argc, + const char **args) { - if (argc >= 2) - { - const char* result = putvar(args[0], args[1], 1 /* const */); - if (result) { - /* setvar does not return the value set */ - return stralloc(""); - } - return stralloc("[ERROR: putvar failed]"); - } - return stralloc("[ERROR: putvar failed because not enough arguments " - "were defined]"); + if (argc >= 2) { + const char *result = putvar(args[0], args[1], 1 /* const */ ); + + if (result) { + /* setvar does not return the value set */ + return stralloc(""); + } + return stralloc("[ERROR: putvar failed]"); + } + return stralloc("[ERROR: putvar failed because not enough arguments " + "were defined]"); } -char* rrdgetenv(long argc, const char **args) { - char buf[128]; - const char* envvar; - if (argc != 1) { - return stralloc("[ERROR: getenv failed because it did not " - "get 1 argument only]"); - }; - envvar = getenv(args[0]); - if (envvar) { - return stralloc(envvar); - } else { - snprintf(buf, sizeof(buf), "[ERROR:_getenv_'%s'_failed", args[0]); - return stralloc(buf); - } +char *rrdgetenv( + long argc, + const char **args) +{ + char buf[128]; + const char *envvar; + + if (argc != 1) { + return stralloc("[ERROR: getenv failed because it did not " + "get 1 argument only]"); + }; + envvar = getenv(args[0]); + if (envvar) { + return stralloc(envvar); + } else { + snprintf(buf, sizeof(buf), "[ERROR:_getenv_'%s'_failed", args[0]); + return stralloc(buf); + } } -char* rrdgetvar(long argc, const char **args) { - char buf[128]; - const char* value; - if (argc != 1) { - return stralloc("[ERROR: getvar failed because it did not " - "get 1 argument only]"); - }; - value = getvar(args[0]); - if (value) { - return stralloc(value); - } else { - snprintf(buf, sizeof(buf), "[ERROR:_getvar_'%s'_failed", args[0]); - return stralloc(buf); - } +char *rrdgetvar( + long argc, + const char **args) +{ + char buf[128]; + const char *value; + + if (argc != 1) { + return stralloc("[ERROR: getvar failed because it did not " + "get 1 argument only]"); + }; + value = getvar(args[0]); + if (value) { + return stralloc(value); + } else { + snprintf(buf, sizeof(buf), "[ERROR:_getvar_'%s'_failed", args[0]); + return stralloc(buf); + } } -char* rrdgoodfor(long argc, const char **args){ - if (argc == 1) { - goodfor = atol(args[0]); - } else { - return stralloc("[ERROR: goodfor expected 1 argument]"); - } - - if (goodfor == 0){ - return stralloc("[ERROR: goodfor value must not be 0]"); - } - - return stralloc(""); +char *rrdgoodfor( + long argc, + const char **args) +{ + if (argc == 1) { + goodfor = atol(args[0]); + } else { + return stralloc("[ERROR: goodfor expected 1 argument]"); + } + + if (goodfor == 0) { + return stralloc("[ERROR: goodfor value must not be 0]"); + } + + return stralloc(""); } -char* rrdgetinternal(long argc, const char **args){ - if (argc == 1) { - if( strcasecmp( args[0], "VERSION") == 0) { - return stralloc(PACKAGE_VERSION); - } else if( strcasecmp( args[0], "COMPILETIME") == 0) { - return stralloc(__DATE__ " " __TIME__); +char *rrdgetinternal( + long argc, + const char **args) +{ + if (argc == 1) { + if (strcasecmp(args[0], "VERSION") == 0) { + return stralloc(PACKAGE_VERSION); + } else if (strcasecmp(args[0], "COMPILETIME") == 0) { + return stralloc(__DATE__ " " __TIME__); + } else { + return stralloc("[ERROR: internal unknown argument]"); + } } else { - return stralloc("[ERROR: internal unknown argument]"); + return stralloc("[ERROR: internal expected 1 argument]"); } - } else { - return stralloc("[ERROR: internal expected 1 argument]"); - } } /* Format start or end times using strftime. We always need both the * start and end times, because, either might be relative to the other. * */ #define MAX_STRFTIME_SIZE 256 -char* printstrftime(long argc, const char **args){ - struct rrd_time_value start_tv, end_tv; - char *parsetime_error = NULL; - char formatted[MAX_STRFTIME_SIZE]; - struct tm *the_tm; - time_t start_tmp, end_tmp; - - /* Make sure that we were given the right number of args */ - if( argc != 4) { - rrd_set_error( "wrong number of args %d", argc); - return stralloc(""); - } - - /* Init start and end time */ - parsetime("end-24h", &start_tv); - parsetime("now", &end_tv); - - /* Parse the start and end times we were given */ - if( (parsetime_error = parsetime( args[1], &start_tv))) { - rrd_set_error( "start time: %s", parsetime_error); - return stralloc(""); - } - if( (parsetime_error = parsetime( args[2], &end_tv))) { - rrd_set_error( "end time: %s", parsetime_error); - return stralloc(""); - } - if( proc_start_end( &start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { - return stralloc(""); - } - - /* Do we do the start or end */ - if( strcasecmp( args[0], "START") == 0) { - the_tm = localtime( &start_tmp); - } - else if( strcasecmp( args[0], "END") == 0) { - the_tm = localtime( &end_tmp); - } - else { - rrd_set_error( "start/end not found in '%s'", args[0]); - return stralloc(""); - } - - /* now format it */ - if( strftime( formatted, MAX_STRFTIME_SIZE, args[3], the_tm)) { - return( stralloc( formatted)); - } - else { - rrd_set_error( "strftime failed"); - return stralloc(""); - } +char *printstrftime( + long argc, + const char **args) +{ + struct rrd_time_value start_tv, end_tv; + char *parsetime_error = NULL; + char formatted[MAX_STRFTIME_SIZE]; + struct tm *the_tm; + time_t start_tmp, end_tmp; + + /* Make sure that we were given the right number of args */ + if (argc != 4) { + rrd_set_error("wrong number of args %d", argc); + return stralloc(""); + } + + /* Init start and end time */ + parsetime("end-24h", &start_tv); + parsetime("now", &end_tv); + + /* Parse the start and end times we were given */ + if ((parsetime_error = parsetime(args[1], &start_tv))) { + rrd_set_error("start time: %s", parsetime_error); + return stralloc(""); + } + if ((parsetime_error = parsetime(args[2], &end_tv))) { + rrd_set_error("end time: %s", parsetime_error); + return stralloc(""); + } + if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + return stralloc(""); + } + + /* Do we do the start or end */ + if (strcasecmp(args[0], "START") == 0) { + the_tm = localtime(&start_tmp); + } else if (strcasecmp(args[0], "END") == 0) { + the_tm = localtime(&end_tmp); + } else { + rrd_set_error("start/end not found in '%s'", args[0]); + return stralloc(""); + } + + /* now format it */ + if (strftime(formatted, MAX_STRFTIME_SIZE, args[3], the_tm)) { + return (stralloc(formatted)); + } else { + rrd_set_error("strftime failed"); + return stralloc(""); + } } -char* includefile(long argc, const char **args){ - char *buffer; - if (argc >= 1) { - const char* filename = args[0]; - readfile(filename, &buffer, 0); - if (rrd_test_error()) { - char *err = malloc((strlen(rrd_get_error())+DS_NAM_SIZE)); - sprintf(err, "[ERROR: %s]",rrd_get_error()); - rrd_clear_error(); - return err; - } else { - return buffer; - } - } - else - { - return stralloc("[ERROR: No Inclue file defined]"); - } +char *includefile( + long argc, + const char **args) +{ + char *buffer; + + if (argc >= 1) { + const char *filename = args[0]; + + readfile(filename, &buffer, 0); + if (rrd_test_error()) { + char *err = malloc((strlen(rrd_get_error()) + DS_NAM_SIZE)); + + sprintf(err, "[ERROR: %s]", rrd_get_error()); + rrd_clear_error(); + return err; + } else { + return buffer; + } + } else { + return stralloc("[ERROR: No Inclue file defined]"); + } } /* make a copy of buf and replace open/close brackets with '_' */ -char* rrdstrip(char *buf) { - char* p; - if (buf == NULL) { - return NULL; - } - /* make a copy of the buffer */ - buf = stralloc(buf); - if (buf == NULL) { - return NULL; - } - - p = buf; - while (*p) { - if (*p == '<' || *p == '>') { - *p = '_'; - } - p++; - } - return buf; +char *rrdstrip( + char *buf) +{ + char *p; + + if (buf == NULL) { + return NULL; + } + /* make a copy of the buffer */ + buf = stralloc(buf); + if (buf == NULL) { + return NULL; + } + + p = buf; + while (*p) { + if (*p == '<' || *p == '>') { + *p = '_'; + } + p++; + } + return buf; } -char* cgigetq(long argc, const char **args){ - if (argc>= 1){ - char *buf = rrdstrip(rrdcgiGetValue(rrdcgiArg,args[0])); - char *buf2; - char *c,*d; - int qc=0; - if (buf==NULL) return NULL; - - for(c=buf;*c != '\0';c++) - if (*c == '"') qc++; - if ((buf2 = malloc((strlen(buf) + 4 * qc + 4))) == NULL) { - perror("Malloc Buffer"); - exit(1); - }; - c=buf; - d=buf2; - *(d++) = '"'; - while(*c != '\0'){ - if (*c == '"') { - *(d++) = '"'; - *(d++) = '\''; - *(d++) = '"'; - *(d++) = '\''; - } - *(d++) = *(c++); - } - *(d++) = '"'; - *(d) = '\0'; - free(buf); - return buf2; - } +char *cgigetq( + long argc, + const char **args) +{ + if (argc >= 1) { + char *buf = rrdstrip(rrdcgiGetValue(rrdcgiArg, args[0])); + char *buf2; + char *c, *d; + int qc = 0; + + if (buf == NULL) + return NULL; + + for (c = buf; *c != '\0'; c++) + if (*c == '"') + qc++; + if ((buf2 = malloc((strlen(buf) + 4 * qc + 4))) == NULL) { + perror("Malloc Buffer"); + exit(1); + }; + c = buf; + d = buf2; + *(d++) = '"'; + while (*c != '\0') { + if (*c == '"') { + *(d++) = '"'; + *(d++) = '\''; + *(d++) = '"'; + *(d++) = '\''; + } + *(d++) = *(c++); + } + *(d++) = '"'; + *(d) = '\0'; + free(buf); + return buf2; + } - return stralloc("[ERROR: not enough argument for RRD::CV::QUOTE]"); + return stralloc("[ERROR: not enough argument for RRD::CV::QUOTE]"); } /* remove occurrences of .. this is a general measure to make paths which came in via cgi do not go UP ... */ -char* cgigetqp(long argc, const char **args){ - char* buf; - char* buf2; - char* p; - char* d; +char *cgigetqp( + long argc, + const char **args) +{ + char *buf; + char *buf2; + char *p; + char *d; - if (argc < 1) - { - return stralloc("[ERROR: not enough arguments for RRD::CV::PATH]"); - } + if (argc < 1) { + return stralloc("[ERROR: not enough arguments for RRD::CV::PATH]"); + } - buf = rrdstrip(rrdcgiGetValue(rrdcgiArg, args[0])); - if (!buf) - { - return NULL; - } + buf = rrdstrip(rrdcgiGetValue(rrdcgiArg, args[0])); + if (!buf) { + return NULL; + } - buf2 = malloc(strlen(buf)+1); - if (!buf2) - { - perror("cgigetqp(): Malloc Path Buffer"); - exit(1); + buf2 = malloc(strlen(buf) + 1); + if (!buf2) { + perror("cgigetqp(): Malloc Path Buffer"); + exit(1); }; p = buf; d = buf2; - while (*p) - { - /* prevent mallicious paths from entering the system */ - if (p[0] == '.' && p[1] == '.') - { - p += 2; - *d++ = '_'; - *d++ = '_'; - } - else - { - *d++ = *p++; - } + while (*p) { + /* prevent mallicious paths from entering the system */ + if (p[0] == '.' && p[1] == '.') { + p += 2; + *d++ = '_'; + *d++ = '_'; + } else { + *d++ = *p++; + } } *d = 0; @@ -743,101 +848,127 @@ char* cgigetqp(long argc, const char **args){ /* Make sure the path is relative, e.g. does not start with '/' */ p = buf2; - while ('/' == *p) - { - *p++ = '_'; + while ('/' == *p) { + *p++ = '_'; } return buf2; } -char* cgiget(long argc, const char **args){ - if (argc>= 1) - return rrdstrip(rrdcgiGetValue(rrdcgiArg,args[0])); - else - return stralloc("[ERROR: not enough arguments for RRD::CV]"); +char *cgiget( + long argc, + const char **args) +{ + if (argc >= 1) + return rrdstrip(rrdcgiGetValue(rrdcgiArg, args[0])); + else + return stralloc("[ERROR: not enough arguments for RRD::CV]"); } -char* drawgraph(long argc, const char **args){ - int i,xsize, ysize; - double ymin,ymax; - for(i=0;i"; - } - calfree(); - if( rrd_graph(argc+1, (char **) args-1, &calcpr, &xsize, &ysize,NULL,&ymin,&ymax) != -1 ) { - return stralloc(calcpr[0]); - } else { - if (rrd_test_error()) { - char *err = malloc((strlen(rrd_get_error())+DS_NAM_SIZE)*sizeof(char)); - sprintf(err, "[ERROR: %s]",rrd_get_error()); - rrd_clear_error(); - calfree(); - return err; - } - } - return NULL; +char *drawgraph( + long argc, + const char **args) +{ + int i, xsize, ysize; + double ymin, ymax; + + for (i = 0; i < argc; i++) + if (strcmp(args[i], "--imginfo") == 0 || strcmp(args[i], "-g") == 0) + break; + if (i == argc) { + args[argc++] = "--imginfo"; + args[argc++] = ""; + } + calfree(); + if (rrd_graph + (argc + 1, (char **) args - 1, &calcpr, &xsize, &ysize, NULL, &ymin, + &ymax) != -1) { + return stralloc(calcpr[0]); + } else { + if (rrd_test_error()) { + char *err = + malloc((strlen(rrd_get_error()) + + DS_NAM_SIZE) * sizeof(char)); + sprintf(err, "[ERROR: %s]", rrd_get_error()); + rrd_clear_error(); + calfree(); + return err; + } + } + return NULL; } -char* drawprint(long argc, const char **args){ - if (argc==1 && calcpr){ - long i=0; - while (calcpr[i] != NULL) i++; /*determine number lines in calcpr*/ - if (atol(args[0])' arives. @@ -849,164 +980,163 @@ char* printtimenow(long argc, const char **args) { * that contain RRD::x directives. These introduce a small memory leak * since we have to stralloc the arguments the way parse() works. */ -char* -scanargs(char *line, int *argument_count, char ***arguments) +char *scanargs( + char *line, + int *argument_count, + char ***arguments) { - char *getP; /* read cursor */ - char *putP; /* write cursor */ - char Quote; /* type of quote if in quoted string, 0 otherwise */ - int tagcount; /* open tag count */ - int in_arg; /* if we currently are parsing an argument or not */ - int argsz; /* argument array size */ - int curarg_contains_rrd_directives; - - /* local array of arguments while parsing */ - int argc = 0; - char** argv; + char *getP; /* read cursor */ + char *putP; /* write cursor */ + char Quote; /* type of quote if in quoted string, 0 otherwise */ + int tagcount; /* open tag count */ + int in_arg; /* if we currently are parsing an argument or not */ + int argsz; /* argument array size */ + int curarg_contains_rrd_directives; + + /* local array of arguments while parsing */ + int argc = 0; + char **argv; #ifdef DEBUG_PARSER - printf("<-- scanargs(%s) -->\n", line); + printf("<-- scanargs(%s) -->\n", line); #endif - *arguments = NULL; - *argument_count = 0; - - /* create initial argument array of char pointers */ - argsz = 32; - argv = (char **)malloc(argsz * sizeof(char *)); - if (!argv) { - return NULL; - } - - /* skip leading blanks */ - while (isspace((int)*line)) { - line++; - } - - getP = line; - putP = line; - - Quote = 0; - in_arg = 0; - tagcount = 0; - - curarg_contains_rrd_directives = 0; - - /* start parsing 'line' for arguments */ - while (*getP) - { - unsigned char c = *getP++; - - if (c == '>' && !Quote && !tagcount) { - /* this is our closing tag, quit scanning */ - break; - } - - /* remove all special chars */ - if (c < ' ') { - c = ' '; - } - - switch (c) - { - case ' ': - if (Quote || tagcount) { - /* copy quoted/tagged (=RRD expanded) string */ - *putP++ = c; - } - else if (in_arg) - { - /* end argument string */ - *putP++ = 0; - in_arg = 0; - if (curarg_contains_rrd_directives) { - argv[argc-1] = rrd_expand_vars(stralloc(argv[argc-1])); - curarg_contains_rrd_directives = 0; - } - } - break; - - case '"': /* Fall through */ - case '\'': - if (Quote != 0) { - if (Quote == c) { - Quote = 0; - } else { - /* copy quoted string */ - *putP++ = c; - } - } else { - if (!in_arg) { - /* reference start of argument string in argument array */ - argv[argc++] = putP; - in_arg=1; - } - Quote = c; - } - break; - - default: - if (!in_arg) { - /* start new argument */ - argv[argc++] = putP; - in_arg = 1; - } - if (c == '>') { - if (tagcount) { - tagcount--; - } - } - if (c == '<') { - tagcount++; - if (0 == strncmp(getP, "RRD::", strlen("RRD::"))) { - curarg_contains_rrd_directives = 1; - } - } - *putP++ = c; - break; - } - - /* check if our argument array is still large enough */ - if (argc == argsz) { - /* resize argument array */ - argsz *= 2; - argv = rrd_realloc(argv, argsz * sizeof(char *)); - if (*argv == NULL) { - return NULL; - } - } - } - - /* terminate last argument found */ - *putP = '\0'; - if (curarg_contains_rrd_directives) { - argv[argc-1] = rrd_expand_vars(stralloc(argv[argc-1])); - } + *arguments = NULL; + *argument_count = 0; + + /* create initial argument array of char pointers */ + argsz = 32; + argv = (char **) malloc(argsz * sizeof(char *)); + if (!argv) { + return NULL; + } + + /* skip leading blanks */ + while (isspace((int) *line)) { + line++; + } + + getP = line; + putP = line; + + Quote = 0; + in_arg = 0; + tagcount = 0; + + curarg_contains_rrd_directives = 0; + + /* start parsing 'line' for arguments */ + while (*getP) { + unsigned char c = *getP++; + + if (c == '>' && !Quote && !tagcount) { + /* this is our closing tag, quit scanning */ + break; + } + + /* remove all special chars */ + if (c < ' ') { + c = ' '; + } + + switch (c) { + case ' ': + if (Quote || tagcount) { + /* copy quoted/tagged (=RRD expanded) string */ + *putP++ = c; + } else if (in_arg) { + /* end argument string */ + *putP++ = 0; + in_arg = 0; + if (curarg_contains_rrd_directives) { + argv[argc - 1] = + rrd_expand_vars(stralloc(argv[argc - 1])); + curarg_contains_rrd_directives = 0; + } + } + break; + + case '"': /* Fall through */ + case '\'': + if (Quote != 0) { + if (Quote == c) { + Quote = 0; + } else { + /* copy quoted string */ + *putP++ = c; + } + } else { + if (!in_arg) { + /* reference start of argument string in argument array */ + argv[argc++] = putP; + in_arg = 1; + } + Quote = c; + } + break; + + default: + if (!in_arg) { + /* start new argument */ + argv[argc++] = putP; + in_arg = 1; + } + if (c == '>') { + if (tagcount) { + tagcount--; + } + } + if (c == '<') { + tagcount++; + if (0 == strncmp(getP, "RRD::", strlen("RRD::"))) { + curarg_contains_rrd_directives = 1; + } + } + *putP++ = c; + break; + } + + /* check if our argument array is still large enough */ + if (argc == argsz) { + /* resize argument array */ + argsz *= 2; + argv = rrd_realloc(argv, argsz * sizeof(char *)); + if (*argv == NULL) { + return NULL; + } + } + } + /* terminate last argument found */ + *putP = '\0'; + if (curarg_contains_rrd_directives) { + argv[argc - 1] = rrd_expand_vars(stralloc(argv[argc - 1])); + } #ifdef DEBUG_PARSER - if (argc > 0) { - int n; - printf("<-- arguments found [%d]\n", argc); - for (n=0; n\n"); - } else { - printf("\n"); - } + if (argc > 0) { + int n; + + printf("<-- arguments found [%d]\n", argc); + for (n = 0; n < argc; n++) { + printf("arg %02d: '%s'\n", n, argv[n]); + } + printf("-->\n"); + } else { + printf("\n"); + } #endif - /* update caller's notion of the argument array and it's size */ - *arguments = argv; - *argument_count = argc; + /* update caller's notion of the argument array and it's size */ + *arguments = argv; + *argument_count = argc; - if (Quote) { - return NULL; - } + if (Quote) { + return NULL; + } - /* Return new scanning cursor: - pointer to char after closing bracket */ - return getP; + /* Return new scanning cursor: + pointer to char after closing bracket */ + return getP; } @@ -1016,155 +1146,161 @@ scanargs(char *line, int *argument_count, char ***arguments) * The result of func is inserted at the current position * in the buffer. */ -int -parse( - char **buf, /* buffer */ - long i, /* offset in buffer */ - char *tag, /* tag to handle */ - char *(*func)(long , const char **) /* function to call for 'tag' */ - ) +int parse( + char **buf, /* buffer */ + long i, /* offset in buffer */ + char *tag, /* tag to handle */ + char * (*func) (long, + const char **) /* function to call for 'tag' */ + ) { - /* the name of the vairable ... */ - char *val; - long valln; - char **args; - char *end; - long end_offset; - int argc; - size_t taglen = strlen(tag); - - /* Current position in buffer should start with 'tag' */ - if (strncmp((*buf)+i, tag, taglen) != 0) { - return 0; - } - /* .. and match exactly (a whitespace following 'tag') */ - if (! isspace(*((*buf) + i + taglen)) ) { - return 0; - } - + /* the name of the vairable ... */ + char *val; + long valln; + char **args; + char *end; + long end_offset; + int argc; + size_t taglen = strlen(tag); + + /* Current position in buffer should start with 'tag' */ + if (strncmp((*buf) + i, tag, taglen) != 0) { + return 0; + } + /* .. and match exactly (a whitespace following 'tag') */ + if (!isspace(*((*buf) + i + taglen))) { + return 0; + } #ifdef DEBUG_PARSER - printf("parse(): handling tag '%s'\n", tag); + printf("parse(): handling tag '%s'\n", tag); #endif - /* Scan for arguments following the tag; - scanargs() puts \0 into *buf ... so after scanargs it is probably - not a good time to use strlen on buf */ - end = scanargs((*buf) + i + taglen, &argc, &args); - if (end) - { - /* got arguments, call function for 'tag' with arguments */ - val = func(argc, (const char **) args); - free(args); - } - else - { - /* unable to parse arguments, undo 0-termination by scanargs */ - for (; argc > 0; argc--) { - *((args[argc-1])-1) = ' '; - } - - /* next call, try parsing at current offset +1 */ - end = (*buf) + i + 1; - - val = stralloc("[ERROR: Parsing Problem with the following text\n" - " Check original file. This may have been altered " - "by parsing.]\n\n"); - } - - /* remember offset where we have to continue parsing */ - end_offset = end - (*buf); - - valln = 0; - if (val) { - valln = strlen(val); - } - - /* Optionally resize buffer to hold the replacement value: - Calculating the new length of the buffer is simple. add current - buffer pos (i) to length of string after replaced tag to length - of replacement string and add 1 for the final zero ... */ - if (end - (*buf) < (i + valln)) { - /* make sure we do not shrink the mallocd block */ - size_t newbufsize = i + strlen(end) + valln + 1; - *buf = rrd_realloc(*buf, newbufsize); - - if (*buf == NULL) { - perror("Realoc buf:"); - exit(1); - }; - } - - /* Update new end pointer: - make sure the 'end' pointer gets moved along with the - buf pointer when realloc moves memory ... */ - end = (*buf) + end_offset; - - /* splice the variable: - step 1. Shift pending data to make room for 'val' */ - memmove((*buf) + i + valln, end, strlen(end) + 1); - - /* step 2. Insert val */ - if (val) { - memmove((*buf)+i, val, valln); - free(val); - } - return (valln > 0 ? valln-1: valln); + /* Scan for arguments following the tag; + scanargs() puts \0 into *buf ... so after scanargs it is probably + not a good time to use strlen on buf */ + end = scanargs((*buf) + i + taglen, &argc, &args); + if (end) { + /* got arguments, call function for 'tag' with arguments */ + val = func(argc, (const char **) args); + free(args); + } else { + /* unable to parse arguments, undo 0-termination by scanargs */ + for (; argc > 0; argc--) { + *((args[argc - 1]) - 1) = ' '; + } + + /* next call, try parsing at current offset +1 */ + end = (*buf) + i + 1; + + val = stralloc("[ERROR: Parsing Problem with the following text\n" + " Check original file. This may have been altered " + "by parsing.]\n\n"); + } + + /* remember offset where we have to continue parsing */ + end_offset = end - (*buf); + + valln = 0; + if (val) { + valln = strlen(val); + } + + /* Optionally resize buffer to hold the replacement value: + Calculating the new length of the buffer is simple. add current + buffer pos (i) to length of string after replaced tag to length + of replacement string and add 1 for the final zero ... */ + if (end - (*buf) < (i + valln)) { + /* make sure we do not shrink the mallocd block */ + size_t newbufsize = i + strlen(end) + valln + 1; + + *buf = rrd_realloc(*buf, newbufsize); + + if (*buf == NULL) { + perror("Realoc buf:"); + exit(1); + }; + } + + /* Update new end pointer: + make sure the 'end' pointer gets moved along with the + buf pointer when realloc moves memory ... */ + end = (*buf) + end_offset; + + /* splice the variable: + step 1. Shift pending data to make room for 'val' */ + memmove((*buf) + i + valln, end, strlen(end) + 1); + + /* step 2. Insert val */ + if (val) { + memmove((*buf) + i, val, valln); + free(val); + } + return (valln > 0 ? valln - 1 : valln); } -char * -http_time(time_t *now) { - struct tm *tmptime; - static char buf[60]; +char *http_time( + time_t *now) +{ + struct tm *tmptime; + static char buf[60]; - tmptime=gmtime(now); - strftime(buf,sizeof(buf),"%a, %d %b %Y %H:%M:%S GMT",tmptime); - return(buf); + tmptime = gmtime(now); + strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S GMT", tmptime); + return (buf); } -void rrdcgiHeader(void) +void rrdcgiHeader( + void) { if (rrdcgiType) - printf ("Content-type: %s\n", rrdcgiType); + printf("Content-type: %s\n", rrdcgiType); else - printf ("Content-type: text/html\n"); + printf("Content-type: text/html\n"); if (rrdcgiHeaderString) - printf ("%s", rrdcgiHeaderString); - printf ("\n"); + printf("%s", rrdcgiHeaderString); + printf("\n"); } -void rrdcgiDebug(int level, int where) +void rrdcgiDebug( + int level, + int where) { if (level > 0) - rrdcgiDebugLevel = level; + rrdcgiDebugLevel = level; else - rrdcgiDebugLevel = 0; + rrdcgiDebugLevel = 0; if (where) - rrdcgiDebugStderr = 0; + rrdcgiDebugStderr = 0; else - rrdcgiDebugStderr = 1; + rrdcgiDebugStderr = 1; } -char *rrdcgiDecodeString(char *text) +char *rrdcgiDecodeString( + char *text) { - char *cp, *xp; - - for (cp=text,xp=text; *cp; cp++) { - if (*cp == '%') { - if (strchr("0123456789ABCDEFabcdef", *(cp+1)) - && strchr("0123456789ABCDEFabcdef", *(cp+2))) { - if (islower(*(cp+1))) - *(cp+1) = toupper(*(cp+1)); - if (islower(*(cp+2))) - *(cp+2) = toupper(*(cp+2)); - *(xp) = (*(cp+1) >= 'A' ? *(cp+1) - 'A' + 10 : *(cp+1) - '0' ) * 16 - + (*(cp+2) >= 'A' ? *(cp+2) - 'A' + 10 : *(cp+2) - '0'); - xp++;cp+=2; - } - } else { - *(xp++) = *cp; - } - } - memset(xp, 0, cp-xp); + char *cp, *xp; + + for (cp = text, xp = text; *cp; cp++) { + if (*cp == '%') { + if (strchr("0123456789ABCDEFabcdef", *(cp + 1)) + && strchr("0123456789ABCDEFabcdef", *(cp + 2))) { + if (islower(*(cp + 1))) + *(cp + 1) = toupper(*(cp + 1)); + if (islower(*(cp + 2))) + *(cp + 2) = toupper(*(cp + 2)); + *(xp) = + (*(cp + 1) >= + 'A' ? *(cp + 1) - 'A' + 10 : *(cp + 1) - '0') * 16 + + (*(cp + 2) >= + 'A' ? *(cp + 2) - 'A' + 10 : *(cp + 2) - '0'); + xp++; + cp += 2; + } + } else { + *(xp++) = *cp; + } + } + memset(xp, 0, cp - xp); return text; } @@ -1173,64 +1309,65 @@ char *rrdcgiDecodeString(char *text) * Read from stdin if no string is provided via CGI. Variables that * doesn't have a value associated with it doesn't get stored. */ -s_var **rrdcgiReadVariables(void) +s_var **rrdcgiReadVariables( + void) { - int length; - char *line = NULL; - int numargs; - char *cp, *ip, *esp, *sptr; - s_var **result; - int i, k, len; - char tmp[101]; + int length; + char *line = NULL; + int numargs; + char *cp, *ip, *esp, *sptr; + s_var **result; + int i, k, len; + char tmp[101]; cp = getenv("REQUEST_METHOD"); ip = getenv("CONTENT_LENGTH"); if (cp && !strcmp(cp, "POST")) { - if (ip) { - length = atoi(ip); - if ((line = (char *)malloc (length+2)) == NULL) - return NULL; - fgets(line, length+1, stdin); - } else - return NULL; + if (ip) { + length = atoi(ip); + if ((line = (char *) malloc(length + 2)) == NULL) + return NULL; + fgets(line, length + 1, stdin); + } else + return NULL; } else if (cp && !strcmp(cp, "GET")) { - esp = getenv("QUERY_STRING"); - if (esp && strlen(esp)) { - if ((line = (char *)malloc (strlen(esp)+2)) == NULL) - return NULL; - sprintf (line, "%s", esp); - } else - return NULL; + esp = getenv("QUERY_STRING"); + if (esp && strlen(esp)) { + if ((line = (char *) malloc(strlen(esp) + 2)) == NULL) + return NULL; + sprintf(line, "%s", esp); + } else + return NULL; } else { length = 0; - printf ("(offline mode: enter name=value pairs on standard input)\n"); - memset (tmp, 0, sizeof(tmp)); - while((cp = fgets (tmp, 100, stdin)) != NULL) { - if (strlen(tmp)) { - if (tmp[strlen(tmp)-1] == '\n') - tmp[strlen(tmp)-1] = '&'; - if (length) { - length += strlen(tmp); - len = (length+1) * sizeof(char); - if ((line = (char *)realloc (line, len)) == NULL) - return NULL; - strcat (line, tmp); - } else { - length = strlen(tmp); - len = (length+1) * sizeof(char); - if ((line = (char *)malloc (len)) == NULL) - return NULL; - memset (line, 0, len); - strcpy (line, tmp); - } - } - memset (tmp, 0, sizeof(tmp)); - } - if (!line) - return NULL; - if (line[strlen(line)-1] == '&') - line[strlen(line)-1] = '\0'; + printf("(offline mode: enter name=value pairs on standard input)\n"); + memset(tmp, 0, sizeof(tmp)); + while ((cp = fgets(tmp, 100, stdin)) != NULL) { + if (strlen(tmp)) { + if (tmp[strlen(tmp) - 1] == '\n') + tmp[strlen(tmp) - 1] = '&'; + if (length) { + length += strlen(tmp); + len = (length + 1) * sizeof(char); + if ((line = (char *) realloc(line, len)) == NULL) + return NULL; + strcat(line, tmp); + } else { + length = strlen(tmp); + len = (length + 1) * sizeof(char); + if ((line = (char *) malloc(len)) == NULL) + return NULL; + memset(line, 0, len); + strcpy(line, tmp); + } + } + memset(tmp, 0, sizeof(tmp)); + } + if (!line) + return NULL; + if (line[strlen(line) - 1] == '&') + line[strlen(line) - 1] = '\0'; } /* @@ -1239,89 +1376,100 @@ s_var **rrdcgiReadVariables(void) */ if (rrdcgiDebugLevel > 0) { - if (rrdcgiDebugStderr) - fprintf (stderr, "Received cgi input: %s\n", line); - else - printf ("Received cgi input
\n
\n--\n%s\n--\n
\n\n", line); + if (rrdcgiDebugStderr) + fprintf(stderr, "Received cgi input: %s\n", line); + else + printf + ("Received cgi input
\n
\n--\n%s\n--\n
\n\n", + line); } - for (cp=line; *cp; cp++) - if (*cp == '+') - *cp = ' '; + for (cp = line; *cp; cp++) + if (*cp == '+') + *cp = ' '; if (strlen(line)) { - for (numargs=1,cp=line; *cp; cp++) - if (*cp == '&') numargs++; + for (numargs = 1, cp = line; *cp; cp++) + if (*cp == '&') + numargs++; } else - numargs = 0; + numargs = 0; if (rrdcgiDebugLevel > 0) { - if (rrdcgiDebugStderr) - fprintf (stderr, "%d cgi variables found.\n", numargs); - else - printf ("%d cgi variables found.
\n", numargs); + if (rrdcgiDebugStderr) + fprintf(stderr, "%d cgi variables found.\n", numargs); + else + printf("%d cgi variables found.
\n", numargs); } - len = (numargs+1) * sizeof(s_var *); - if ((result = (s_var **)malloc (len)) == NULL) - return NULL; - memset (result, 0, len); + len = (numargs + 1) * sizeof(s_var *); + if ((result = (s_var **) malloc(len)) == NULL) + return NULL; + memset(result, 0, len); cp = line; - i=0; + i = 0; while (*cp) { - if ((ip = (char *)strchr(cp, '&')) != NULL) { - *ip = '\0'; - }else - ip = cp + strlen(cp); - - if ((esp=(char *)strchr(cp, '=')) == NULL) { - cp = ++ip; - continue; - } - - if (!strlen(esp)) { - cp = ++ip; - continue; - } - - if (iname,cp, esp-cp) || !(strlen (result[k]->name) == esp-cp)); k++); - - if (k == i) { /* No such variable yet */ - if ((result[i] = (s_var *)malloc(sizeof(s_var))) == NULL) - return NULL; - if ((result[i]->name = (char *)malloc((esp-cp+1) * sizeof(char))) == NULL) - return NULL; - memset (result[i]->name, 0, esp-cp+1); - strncpy(result[i]->name, cp, esp-cp); - cp = ++esp; - if ((result[i]->value = (char *)malloc((ip-esp+1) * sizeof(char))) == NULL) - return NULL; - memset (result[i]->value, 0, ip-esp+1); - strncpy(result[i]->value, cp, ip-esp); - result[i]->value = rrdcgiDecodeString(result[i]->value); - if (rrdcgiDebugLevel) { - if (rrdcgiDebugStderr) - fprintf (stderr, "%s: %s\n", result[i]->name, result[i]->value); - else - printf ("

Variable %s

\n
\n%s\n
\n\n", result[i]->name, result[i]->value); - } - i++; - } else { /* There is already such a name, suppose a mutiple field */ - cp = ++esp; - len = (strlen(result[k]->value)+(ip-esp)+2) * sizeof (char); - if ((sptr = (char *)malloc(len)) == NULL) - return NULL; - memset (sptr, 0, len); - sprintf (sptr, "%s\n", result[k]->value); - strncat(sptr, cp, ip-esp); - free(result[k]->value); - result[k]->value = rrdcgiDecodeString (sptr); - } - } - cp = ++ip; + if ((ip = (char *) strchr(cp, '&')) != NULL) { + *ip = '\0'; + } else + ip = cp + strlen(cp); + + if ((esp = (char *) strchr(cp, '=')) == NULL) { + cp = ++ip; + continue; + } + + if (!strlen(esp)) { + cp = ++ip; + continue; + } + + if (i < numargs) { + + /* try to find out if there's already such a variable */ + for (k = 0; k < i && (strncmp(result[k]->name, cp, esp - cp) + || !(strlen(result[k]->name) == esp - cp)); + k++); + + if (k == i) { /* No such variable yet */ + if ((result[i] = (s_var *) malloc(sizeof(s_var))) == NULL) + return NULL; + if ((result[i]->name = + (char *) malloc((esp - cp + 1) * sizeof(char))) == NULL) + return NULL; + memset(result[i]->name, 0, esp - cp + 1); + strncpy(result[i]->name, cp, esp - cp); + cp = ++esp; + if ((result[i]->value = + (char *) malloc((ip - esp + 1) * sizeof(char))) == NULL) + return NULL; + memset(result[i]->value, 0, ip - esp + 1); + strncpy(result[i]->value, cp, ip - esp); + result[i]->value = rrdcgiDecodeString(result[i]->value); + if (rrdcgiDebugLevel) { + if (rrdcgiDebugStderr) + fprintf(stderr, "%s: %s\n", result[i]->name, + result[i]->value); + else + printf("

Variable %s

\n
\n%s\n
\n\n", + result[i]->name, result[i]->value); + } + i++; + } else { /* There is already such a name, suppose a mutiple field */ + cp = ++esp; + len = + (strlen(result[k]->value) + (ip - esp) + + 2) * sizeof(char); + if ((sptr = (char *) malloc(len)) == NULL) + return NULL; + memset(sptr, 0, len); + sprintf(sptr, "%s\n", result[k]->value); + strncat(sptr, cp, ip - esp); + free(result[k]->value); + result[k]->value = rrdcgiDecodeString(sptr); + } + } + cp = ++ip; } return result; } @@ -1331,82 +1479,88 @@ s_var **rrdcgiReadVariables(void) * Read from stdin if no string is provided via CGI. Variables that * doesn't have a value associated with it doesn't get stored. */ -s_cgi *rrdcgiInit(void) +s_cgi *rrdcgiInit( + void) { - s_cgi *res; - s_var **vars; + s_cgi *res; + s_var **vars; vars = rrdcgiReadVariables(); if (!vars) - return NULL; + return NULL; - if ((res = (s_cgi *)malloc (sizeof (s_cgi))) == NULL) - return NULL; + if ((res = (s_cgi *) malloc(sizeof(s_cgi))) == NULL) + return NULL; res->vars = vars; return res; } -char *rrdcgiGetValue(s_cgi *parms, const char *name) +char *rrdcgiGetValue( + s_cgi * parms, + const char *name) { - int i; + int i; if (!parms || !parms->vars) - return NULL; - for (i=0;parms->vars[i]; i++) - if (!strcmp(name,parms->vars[i]->name)) { - if (rrdcgiDebugLevel > 0) { - if (rrdcgiDebugStderr) - fprintf (stderr, "%s found as %s\n", name, parms->vars[i]->value); - else - printf ("%s found as %s
\n", name, parms->vars[i]->value); - } - return parms->vars[i]->value; - } + return NULL; + for (i = 0; parms->vars[i]; i++) + if (!strcmp(name, parms->vars[i]->name)) { + if (rrdcgiDebugLevel > 0) { + if (rrdcgiDebugStderr) + fprintf(stderr, "%s found as %s\n", name, + parms->vars[i]->value); + else + printf("%s found as %s
\n", name, + parms->vars[i]->value); + } + return parms->vars[i]->value; + } if (rrdcgiDebugLevel) { - if (rrdcgiDebugStderr) - fprintf (stderr, "%s not found\n", name); - else - printf ("%s not found
\n", name); + if (rrdcgiDebugStderr) + fprintf(stderr, "%s not found\n", name); + else + printf("%s not found
\n", name); } return NULL; } -void rrdcgiFreeList (char **list) +void rrdcgiFreeList( + char **list) { - int i; + int i; - for (i=0; list[i] != NULL; i++) - free (list[i]); - free (list); + for (i = 0; list[i] != NULL; i++) + free(list[i]); + free(list); } -void rrdcgiFree (s_cgi *parms) +void rrdcgiFree( + s_cgi * parms) { - int i; + int i; if (!parms) - return; + return; if (parms->vars) { - for (i=0;parms->vars[i]; i++) { - if (parms->vars[i]->name) - free (parms->vars[i]->name); - if (parms->vars[i]->value) - free (parms->vars[i]->value); - free (parms->vars[i]); - } - free (parms->vars); + for (i = 0; parms->vars[i]; i++) { + if (parms->vars[i]->name) + free(parms->vars[i]->name); + if (parms->vars[i]->value) + free(parms->vars[i]->value); + free(parms->vars[i]); + } + free(parms->vars); } - free (parms); + free(parms); if (rrdcgiHeaderString) { - free (rrdcgiHeaderString); - rrdcgiHeaderString = NULL; + free(rrdcgiHeaderString); + rrdcgiHeaderString = NULL; } if (rrdcgiType) { - free (rrdcgiType); - rrdcgiType = NULL; + free(rrdcgiType); + rrdcgiType = NULL; } } - diff --git a/src/rrd_create.c b/src/rrd_create.c index e9ac860..43d608e 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -10,120 +10,132 @@ #include "rrd_is_thread_safe.h" -unsigned long FnvHash(const char *str); -int create_hw_contingent_rras(rrd_t *rrd, unsigned short period, unsigned long hashed_name); -void parseGENERIC_DS(const char *def,rrd_t *rrd, int ds_idx); +unsigned long FnvHash( + const char *str); +int create_hw_contingent_rras( + rrd_t *rrd, + unsigned short period, + unsigned long hashed_name); +void parseGENERIC_DS( + const char *def, + rrd_t *rrd, + int ds_idx); -int -rrd_create(int argc, char **argv) +int rrd_create( + int argc, + char **argv) { - time_t last_up = time(NULL)-10; - unsigned long pdp_step = 300; + time_t last_up = time(NULL) - 10; + unsigned long pdp_step = 300; struct rrd_time_value last_up_tv; - char *parsetime_error = NULL; - long long_tmp; - int rc; - optind = 0; opterr = 0; /* initialize getopt */ - - while (1){ - static struct option long_options[] = - { - {"start", required_argument, 0, 'b'}, - {"step", required_argument,0,'s'}, - {0,0,0,0} - }; - int option_index = 0; - int opt; - opt = getopt_long(argc, argv, "b:s:", - long_options, &option_index); - - if (opt == EOF) - break; - - switch(opt) { - case 'b': + char *parsetime_error = NULL; + long long_tmp; + int rc; + + optind = 0; + opterr = 0; /* initialize getopt */ + + while (1) { + static struct option long_options[] = { + {"start", required_argument, 0, 'b'}, + {"step", required_argument, 0, 's'}, + {0, 0, 0, 0} + }; + int option_index = 0; + int opt; + + opt = getopt_long(argc, argv, "b:s:", long_options, &option_index); + + if (opt == EOF) + break; + + switch (opt) { + case 'b': if ((parsetime_error = parsetime(optarg, &last_up_tv))) { - rrd_set_error("start time: %s", parsetime_error ); - return(-1); - } - if (last_up_tv.type == RELATIVE_TO_END_TIME || - last_up_tv.type == RELATIVE_TO_START_TIME) { - rrd_set_error("specifying time relative to the 'start' " + rrd_set_error("start time: %s", parsetime_error); + return (-1); + } + if (last_up_tv.type == RELATIVE_TO_END_TIME || + last_up_tv.type == RELATIVE_TO_START_TIME) { + rrd_set_error("specifying time relative to the 'start' " "or 'end' makes no sense here"); - return(-1); - } - - last_up = mktime(&last_up_tv.tm) + last_up_tv.offset; - - if (last_up < 3600*24*365*10){ - rrd_set_error("the first entry to the RRD should be after 1980"); - return(-1); - } - break; - - case 's': - long_tmp = atol(optarg); - if (long_tmp < 1){ - rrd_set_error("step size should be no less than one second"); - return(-1); - } - pdp_step = long_tmp; - break; - - case '?': + return (-1); + } + + last_up = mktime(&last_up_tv.tm) + last_up_tv.offset; + + if (last_up < 3600 * 24 * 365 * 10) { + rrd_set_error + ("the first entry to the RRD should be after 1980"); + return (-1); + } + break; + + case 's': + long_tmp = atol(optarg); + if (long_tmp < 1) { + rrd_set_error("step size should be no less than one second"); + return (-1); + } + pdp_step = long_tmp; + break; + + case '?': if (optopt != 0) rrd_set_error("unknown option '%c'", optopt); else - rrd_set_error("unknown option '%s'",argv[optind-1]); - return(-1); - } + rrd_set_error("unknown option '%s'", argv[optind - 1]); + return (-1); + } } if (optind == argc) { - rrd_set_error("what is the name of the rrd file you want to create?"); - return -1; + rrd_set_error("what is the name of the rrd file you want to create?"); + return -1; } rc = rrd_create_r(argv[optind], - pdp_step, last_up, - argc - optind - 1, (const char **)(argv + optind + 1)); - + pdp_step, last_up, + argc - optind - 1, (const char **) (argv + optind + 1)); + return rc; } /* #define DEBUG */ -int -rrd_create_r(const char *filename, - unsigned long pdp_step, time_t last_up, - int argc, const char **argv) +int rrd_create_r( + const char *filename, + unsigned long pdp_step, + time_t last_up, + int argc, + const char **argv) { - rrd_t rrd; - long i; - int offset; - char *token; - char dummychar1[2], dummychar2[2]; - unsigned short token_idx, error_flag, period=0; + rrd_t rrd; + long i; + int offset; + char *token; + char dummychar1[2], dummychar2[2]; + unsigned short token_idx, error_flag, period = 0; unsigned long hashed_name; /* init rrd clean */ rrd_init(&rrd); /* static header */ - if((rrd.stat_head = calloc(1,sizeof(stat_head_t)))==NULL){ - rrd_set_error("allocating rrd.stat_head"); - rrd_free(&rrd); - return(-1); + if ((rrd.stat_head = calloc(1, sizeof(stat_head_t))) == NULL) { + rrd_set_error("allocating rrd.stat_head"); + rrd_free(&rrd); + return (-1); } /* live header */ - if((rrd.live_head = calloc(1,sizeof(live_head_t)))==NULL){ - rrd_set_error("allocating rrd.live_head"); - rrd_free(&rrd); - return(-1); + if ((rrd.live_head = calloc(1, sizeof(live_head_t))) == NULL) { + rrd_set_error("allocating rrd.live_head"); + rrd_free(&rrd); + return (-1); } /* set some defaults */ - strcpy(rrd.stat_head->cookie,RRD_COOKIE); - strcpy(rrd.stat_head->version,RRD_VERSION); + strcpy(rrd.stat_head->cookie, RRD_COOKIE); + strcpy(rrd.stat_head->version, RRD_VERSION); rrd.stat_head->float_cookie = FLOAT_COOKIE; - rrd.stat_head->ds_cnt = 0; /* this will be adjusted later */ + rrd.stat_head->ds_cnt = 0; /* this will be adjusted later */ rrd.stat_head->rra_cnt = 0; /* ditto */ rrd.stat_head->pdp_step = pdp_step; /* 5 minute default */ @@ -132,241 +144,289 @@ rrd_create_r(const char *filename, rrd.rra_def = NULL; rrd.live_head->last_up = last_up; - - /* optind points to the first non-option command line arg, - * in this case, the file name. */ - /* Compute the FNV hash value (used by SEASONAL and DEVSEASONAL - * arrays. */ + + /* optind points to the first non-option command line arg, + * in this case, the file name. */ + /* Compute the FNV hash value (used by SEASONAL and DEVSEASONAL + * arrays. */ hashed_name = FnvHash(filename); - for(i=0;ids_cnt); - if((rrd.ds_def = rrd_realloc(rrd.ds_def, - old_size+sizeof(ds_def_t)))==NULL){ - rrd_set_error("allocating rrd.ds_def"); - rrd_free(&rrd); - return(-1); - } - memset(&rrd.ds_def[rrd.stat_head->ds_cnt], 0, sizeof(ds_def_t)); + for (i = 0; i < argc; i++) { + unsigned int ii; + + if (strncmp(argv[i], "DS:", 3) == 0) { + size_t old_size = sizeof(ds_def_t) * (rrd.stat_head->ds_cnt); + + if ((rrd.ds_def = rrd_realloc(rrd.ds_def, + old_size + sizeof(ds_def_t))) == + NULL) { + rrd_set_error("allocating rrd.ds_def"); + rrd_free(&rrd); + return (-1); + } + memset(&rrd.ds_def[rrd.stat_head->ds_cnt], 0, sizeof(ds_def_t)); /* extract the name and type */ - switch (sscanf(&argv[i][3], - DS_NAM_FMT "%1[:]" DST_FMT "%1[:]%n", - rrd.ds_def[rrd.stat_head->ds_cnt].ds_nam, - dummychar1, - rrd.ds_def[rrd.stat_head->ds_cnt].dst, - dummychar2, - &offset)) { - case 0: - case 1: rrd_set_error("Invalid DS name"); break; - case 2: - case 3: rrd_set_error("Invalid DS type"); break; - case 4: /* (%n may or may not be counted) */ - case 5: /* check for duplicate datasource names */ - for (ii=0;iids_cnt;ii++) - if(strcmp(rrd.ds_def[rrd.stat_head->ds_cnt].ds_nam, - rrd.ds_def[ii].ds_nam) == 0) - rrd_set_error("Duplicate DS name: %s", - rrd.ds_def[ii].ds_nam); - /* DS_type may be valid or not. Checked later */ - break; - default: rrd_set_error("invalid DS format"); + switch (sscanf(&argv[i][3], + DS_NAM_FMT "%1[:]" DST_FMT "%1[:]%n", + rrd.ds_def[rrd.stat_head->ds_cnt].ds_nam, + dummychar1, + rrd.ds_def[rrd.stat_head->ds_cnt].dst, + dummychar2, &offset)) { + case 0: + case 1: + rrd_set_error("Invalid DS name"); + break; + case 2: + case 3: + rrd_set_error("Invalid DS type"); + break; + case 4: /* (%n may or may not be counted) */ + case 5: /* check for duplicate datasource names */ + for (ii = 0; ii < rrd.stat_head->ds_cnt; ii++) + if (strcmp(rrd.ds_def[rrd.stat_head->ds_cnt].ds_nam, + rrd.ds_def[ii].ds_nam) == 0) + rrd_set_error("Duplicate DS name: %s", + rrd.ds_def[ii].ds_nam); + /* DS_type may be valid or not. Checked later */ + break; + default: + rrd_set_error("invalid DS format"); } - if (rrd_test_error()) { + if (rrd_test_error()) { rrd_free(&rrd); return -1; } - + /* parse the remainder of the arguments */ - switch(dst_conv(rrd.ds_def[rrd.stat_head->ds_cnt].dst)) - { + switch (dst_conv(rrd.ds_def[rrd.stat_head->ds_cnt].dst)) { case DST_COUNTER: case DST_ABSOLUTE: case DST_GAUGE: case DST_DERIVE: - parseGENERIC_DS(&argv[i][offset+3],&rrd, rrd.stat_head->ds_cnt); + parseGENERIC_DS(&argv[i][offset + 3], &rrd, + rrd.stat_head->ds_cnt); break; case DST_CDEF: - parseCDEF_DS(&argv[i][offset+3],&rrd, rrd.stat_head->ds_cnt); + parseCDEF_DS(&argv[i][offset + 3], &rrd, + rrd.stat_head->ds_cnt); break; default: rrd_set_error("invalid DS type specified"); break; } - + if (rrd_test_error()) { rrd_free(&rrd); return -1; } - rrd.stat_head -> ds_cnt++; - } else if (strncmp(argv[i],"RRA:",4)==0){ - char *argvcopy; - char *tokptr; - size_t old_size = sizeof(rra_def_t)*(rrd.stat_head->rra_cnt); - if((rrd.rra_def = rrd_realloc(rrd.rra_def, - old_size+sizeof(rra_def_t)))==NULL) - { + rrd.stat_head->ds_cnt++; + } else if (strncmp(argv[i], "RRA:", 4) == 0) { + char *argvcopy; + char *tokptr; + size_t old_size = sizeof(rra_def_t) * (rrd.stat_head->rra_cnt); + + if ((rrd.rra_def = rrd_realloc(rrd.rra_def, + old_size + sizeof(rra_def_t))) == + NULL) { rrd_set_error("allocating rrd.rra_def"); rrd_free(&rrd); - return(-1); - } - memset(&rrd.rra_def[rrd.stat_head->rra_cnt], 0, sizeof(rra_def_t)); + return (-1); + } + memset(&rrd.rra_def[rrd.stat_head->rra_cnt], 0, + sizeof(rra_def_t)); argvcopy = strdup(argv[i]); - token = strtok_r(&argvcopy[4],":", &tokptr); - token_idx = error_flag = 0; - while (token != NULL) - { - switch(token_idx) - { + token = strtok_r(&argvcopy[4], ":", &tokptr); + token_idx = error_flag = 0; + while (token != NULL) { + switch (token_idx) { case 0: - if (sscanf(token,CF_NAM_FMT, - rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam) != 1) + if (sscanf(token, CF_NAM_FMT, + rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam) != + 1) rrd_set_error("Failed to parse CF name"); - switch(cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) - { + switch (cf_conv + (rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) { case CF_HWPREDICT: /* initialize some parameters */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_alpha].u_val = 0.1; - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_beta].u_val = 1.0/288; - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = - rrd.stat_head -> rra_cnt; + rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_alpha]. + u_val = 0.1; + rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_beta]. + u_val = 1.0 / 288; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = + rrd.stat_head->rra_cnt; break; case CF_DEVSEASONAL: case CF_SEASONAL: /* initialize some parameters */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_seasonal_gamma].u_val = 0.1; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_seasonal_gamma].u_val = 0.1; /* fall through */ case CF_DEVPREDICT: - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = -1; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = -1; break; case CF_FAILURES: - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_delta_pos].u_val = 2.0; - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_delta_neg].u_val = 2.0; - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_window_len].u_cnt = 3; - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_failure_threshold].u_cnt = 2; - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = -1; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_delta_pos].u_val = 2.0; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_delta_neg].u_val = 2.0; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_window_len].u_cnt = 3; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_failure_threshold].u_cnt = 2; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = -1; break; /* invalid consolidation function */ case -1: - rrd_set_error("Unrecognized consolidation function %s", - rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam); + rrd_set_error + ("Unrecognized consolidation function %s", + rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam); default: break; } - /* default: 1 pdp per cdp */ + /* default: 1 pdp per cdp */ rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt = 1; break; case 1: - switch(cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) - { + switch (cf_conv + (rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) { case CF_HWPREDICT: case CF_DEVSEASONAL: case CF_SEASONAL: case CF_DEVPREDICT: case CF_FAILURES: - rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt = atoi(token); + rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt = + atoi(token); break; default: - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_cdp_xff_val].u_val = atof(token); - if (rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_cdp_xff_val].u_val<0.0 || - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_cdp_xff_val].u_val>=1.0) - rrd_set_error("Invalid xff: must be between 0 and 1"); + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_cdp_xff_val].u_val = atof(token); + if (rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_cdp_xff_val].u_val < 0.0 + || rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_cdp_xff_val].u_val >= 1.0) + rrd_set_error + ("Invalid xff: must be between 0 and 1"); break; } break; case 2: - switch(cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) - { + switch (cf_conv + (rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) { case CF_HWPREDICT: - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_alpha].u_val = atof(token); + rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_alpha]. + u_val = atof(token); if (atof(token) <= 0.0 || atof(token) >= 1.0) - rrd_set_error("Invalid alpha: must be between 0 and 1"); + rrd_set_error + ("Invalid alpha: must be between 0 and 1"); break; case CF_DEVSEASONAL: case CF_SEASONAL: - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_seasonal_gamma].u_val = - atof(token); + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_seasonal_gamma].u_val = atof(token); if (atof(token) <= 0.0 || atof(token) >= 1.0) - rrd_set_error("Invalid gamma: must be between 0 and 1"); - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_seasonal_smooth_idx].u_cnt - = hashed_name % rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt; + rrd_set_error + ("Invalid gamma: must be between 0 and 1"); + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_seasonal_smooth_idx].u_cnt = + hashed_name % + rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt; break; case CF_FAILURES: /* specifies the # of violations that constitutes the failure threshold */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_failure_threshold].u_cnt = - atoi(token); - if (atoi(token) < 1 || atoi(token) > MAX_FAILURES_WINDOW_LEN) - rrd_set_error("Failure threshold is out of range %d, %d",1, - MAX_FAILURES_WINDOW_LEN); + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_failure_threshold].u_cnt = atoi(token); + if (atoi(token) < 1 + || atoi(token) > MAX_FAILURES_WINDOW_LEN) + rrd_set_error + ("Failure threshold is out of range %d, %d", + 1, MAX_FAILURES_WINDOW_LEN); break; case CF_DEVPREDICT: /* specifies the index (1-based) of CF_DEVSEASONAL array * associated with this CF_DEVPREDICT array. */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = atoi(token) - 1; break; default: - rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt = atoi(token); + rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt = + atoi(token); break; } break; case 3: - switch(cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) - { + switch (cf_conv + (rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) { case CF_HWPREDICT: - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_beta].u_val = atof(token); + rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_hw_beta]. + u_val = atof(token); if (atof(token) < 0.0 || atof(token) > 1.0) - rrd_set_error("Invalid beta: must be between 0 and 1"); + rrd_set_error + ("Invalid beta: must be between 0 and 1"); break; case CF_DEVSEASONAL: case CF_SEASONAL: /* specifies the index (1-based) of CF_HWPREDICT array * associated with this CF_DEVSEASONAL or CF_SEASONAL array. * */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = atoi(token) - 1; break; case CF_FAILURES: /* specifies the window length */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_window_len].u_cnt = - atoi(token); - if (atoi(token) < 1 || atoi(token) > MAX_FAILURES_WINDOW_LEN) - rrd_set_error("Window length is out of range %d, %d",1, - MAX_FAILURES_WINDOW_LEN); + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_window_len].u_cnt = atoi(token); + if (atoi(token) < 1 + || atoi(token) > MAX_FAILURES_WINDOW_LEN) + rrd_set_error + ("Window length is out of range %d, %d", 1, + MAX_FAILURES_WINDOW_LEN); /* verify that window length exceeds the failure threshold */ - if (rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_window_len].u_cnt < - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_failure_threshold].u_cnt) - rrd_set_error("Window length is shorter than the failure threshold"); + if (rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_window_len].u_cnt < + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_failure_threshold].u_cnt) + rrd_set_error + ("Window length is shorter than the failure threshold"); break; case CF_DEVPREDICT: /* shouldn't be any more arguments */ - rrd_set_error("Unexpected extra argument for consolidation function DEVPREDICT"); + rrd_set_error + ("Unexpected extra argument for consolidation function DEVPREDICT"); break; default: - rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt = atoi(token); + rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt = + atoi(token); break; } break; case 4: - switch(cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) - { + switch (cf_conv + (rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam)) { case CF_FAILURES: /* specifies the index (1-based) of CF_DEVSEASONAL array * associated with this CF_DEVFAILURES array. */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = atoi(token) - 1; break; case CF_HWPREDICT: /* length of the associated CF_SEASONAL and CF_DEVSEASONAL arrays. */ period = atoi(token); - if (period > rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt) - rrd_set_error("Length of seasonal cycle exceeds length of HW prediction array"); + if (period > + rrd.rra_def[rrd.stat_head->rra_cnt].row_cnt) + rrd_set_error + ("Length of seasonal cycle exceeds length of HW prediction array"); break; default: /* shouldn't be any more arguments */ - rrd_set_error("Unexpected extra argument for consolidation function %s", - rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam); + rrd_set_error + ("Unexpected extra argument for consolidation function %s", + rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam); break; } break; @@ -377,98 +437,102 @@ rrd_create_r(const char *filename, * is missing, then the CF_SEASONAL, CF_DEVSEASONAL, CF_DEVPREDICT, * CF_FAILURES. * arrays are created automatically. */ - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt = - atoi(token) - 1; + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt = atoi(token) - 1; break; default: /* should never get here */ rrd_set_error("Unknown error"); break; - } /* end switch */ - if (rrd_test_error()) - { + } /* end switch */ + if (rrd_test_error()) { /* all errors are unrecoverable */ free(argvcopy); rrd_free(&rrd); return (-1); } - token = strtok_r(NULL,":", &tokptr); + token = strtok_r(NULL, ":", &tokptr); token_idx++; - } /* end while */ - free(argvcopy); + } /* end while */ + free(argvcopy); #ifdef DEBUG - fprintf(stderr,"Creating RRA CF: %s, dep idx %lu, current idx %lu\n", - rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam, - rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt, - rrd.stat_head -> rra_cnt); + fprintf(stderr, + "Creating RRA CF: %s, dep idx %lu, current idx %lu\n", + rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam, + rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt, rrd.stat_head->rra_cnt); #endif - /* should we create CF_SEASONAL, CF_DEVSEASONAL, and CF_DEVPREDICT? */ - if (cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam) == CF_HWPREDICT - && rrd.rra_def[rrd.stat_head->rra_cnt].par[RRA_dependent_rra_idx].u_cnt - == rrd.stat_head -> rra_cnt) - { + /* should we create CF_SEASONAL, CF_DEVSEASONAL, and CF_DEVPREDICT? */ + if (cf_conv(rrd.rra_def[rrd.stat_head->rra_cnt].cf_nam) == + CF_HWPREDICT + && rrd.rra_def[rrd.stat_head->rra_cnt]. + par[RRA_dependent_rra_idx].u_cnt == rrd.stat_head->rra_cnt) { #ifdef DEBUG - fprintf(stderr,"Creating HW contingent RRAs\n"); + fprintf(stderr, "Creating HW contingent RRAs\n"); #endif - if (create_hw_contingent_rras(&rrd,period,hashed_name) == -1) { + if (create_hw_contingent_rras(&rrd, period, hashed_name) == + -1) { rrd_set_error("creating contingent RRA"); rrd_free(&rrd); return -1; } - } - rrd.stat_head->rra_cnt++; - } else { - rrd_set_error("can't parse argument '%s'",argv[i]); - rrd_free(&rrd); + } + rrd.stat_head->rra_cnt++; + } else { + rrd_set_error("can't parse argument '%s'", argv[i]); + rrd_free(&rrd); return -1; - } + } } - - - if (rrd.stat_head->rra_cnt < 1){ - rrd_set_error("you must define at least one Round Robin Archive"); - rrd_free(&rrd); - return(-1); + + + if (rrd.stat_head->rra_cnt < 1) { + rrd_set_error("you must define at least one Round Robin Archive"); + rrd_free(&rrd); + return (-1); } - - if (rrd.stat_head->ds_cnt < 1){ - rrd_set_error("you must define at least one Data Source"); - rrd_free(&rrd); - return(-1); + + if (rrd.stat_head->ds_cnt < 1) { + rrd_set_error("you must define at least one Data Source"); + rrd_free(&rrd); + return (-1); } return rrd_create_fn(filename, &rrd); } -void parseGENERIC_DS(const char *def,rrd_t *rrd, int ds_idx) +void parseGENERIC_DS( + const char *def, + rrd_t *rrd, + int ds_idx) { - char minstr[DS_NAM_SIZE], maxstr[DS_NAM_SIZE]; + char minstr[DS_NAM_SIZE], maxstr[DS_NAM_SIZE]; + /* - int temp; - - temp = sscanf(def,"%lu:%18[^:]:%18[^:]", - &(rrd -> ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt), - minstr,maxstr); - */ - if (sscanf(def,"%lu:%18[^:]:%18[^:]", - &(rrd -> ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt), - minstr,maxstr) == 3) - { + int temp; + + temp = sscanf(def,"%lu:%18[^:]:%18[^:]", + &(rrd -> ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt), + minstr,maxstr); + */ + if (sscanf(def, "%lu:%18[^:]:%18[^:]", + &(rrd->ds_def[ds_idx].par[DS_mrhb_cnt].u_cnt), + minstr, maxstr) == 3) { if (minstr[0] == 'U' && minstr[1] == 0) - rrd -> ds_def[ds_idx].par[DS_min_val].u_val = DNAN; + rrd->ds_def[ds_idx].par[DS_min_val].u_val = DNAN; else - rrd -> ds_def[ds_idx].par[DS_min_val].u_val = atof(minstr); - + rrd->ds_def[ds_idx].par[DS_min_val].u_val = atof(minstr); + if (maxstr[0] == 'U' && maxstr[1] == 0) - rrd -> ds_def[ds_idx].par[DS_max_val].u_val = DNAN; + rrd->ds_def[ds_idx].par[DS_max_val].u_val = DNAN; else - rrd -> ds_def[ds_idx].par[DS_max_val].u_val = atof(maxstr); - - if (! isnan(rrd -> ds_def[ds_idx].par[DS_min_val].u_val) && - ! isnan(rrd -> ds_def[ds_idx].par[DS_max_val].u_val) && - rrd -> ds_def[ds_idx].par[DS_min_val].u_val - >= rrd -> ds_def[ds_idx].par[DS_max_val].u_val ) { + rrd->ds_def[ds_idx].par[DS_max_val].u_val = atof(maxstr); + + if (!isnan(rrd->ds_def[ds_idx].par[DS_min_val].u_val) && + !isnan(rrd->ds_def[ds_idx].par[DS_max_val].u_val) && + rrd->ds_def[ds_idx].par[DS_min_val].u_val + >= rrd->ds_def[ds_idx].par[DS_max_val].u_val) { rrd_set_error("min must be less than max in DS definition"); - return; + return; } } else { rrd_set_error("failed to parse data source %s", def); @@ -477,219 +541,215 @@ void parseGENERIC_DS(const char *def,rrd_t *rrd, int ds_idx) /* Create the CF_DEVPREDICT, CF_DEVSEASONAL, CF_SEASONAL, and CF_FAILURES RRAs * associated with a CF_HWPREDICT RRA. */ -int -create_hw_contingent_rras(rrd_t *rrd, unsigned short period, unsigned long hashed_name) +int create_hw_contingent_rras( + rrd_t *rrd, + unsigned short period, + unsigned long hashed_name) { - size_t old_size; - rra_def_t* current_rra; - + size_t old_size; + rra_def_t *current_rra; + /* save index to CF_HWPREDICT */ - unsigned long hw_index = rrd -> stat_head -> rra_cnt; + unsigned long hw_index = rrd->stat_head->rra_cnt; + /* advance the pointer */ - (rrd -> stat_head -> rra_cnt)++; + (rrd->stat_head->rra_cnt)++; /* allocate the memory for the 4 contingent RRAs */ - old_size = sizeof(rra_def_t)*(rrd -> stat_head->rra_cnt); - if ((rrd -> rra_def = rrd_realloc(rrd -> rra_def, - old_size+4*sizeof(rra_def_t)))==NULL) - { + old_size = sizeof(rra_def_t) * (rrd->stat_head->rra_cnt); + if ((rrd->rra_def = rrd_realloc(rrd->rra_def, + old_size + 4 * sizeof(rra_def_t))) == + NULL) { rrd_set_error("allocating rrd.rra_def"); - return(-1); + return (-1); } /* clear memory */ - memset(&(rrd -> rra_def[rrd -> stat_head->rra_cnt]), 0, 4*sizeof(rra_def_t)); - + memset(&(rrd->rra_def[rrd->stat_head->rra_cnt]), 0, + 4 * sizeof(rra_def_t)); + /* create the CF_SEASONAL RRA */ - current_rra = &(rrd -> rra_def[rrd -> stat_head -> rra_cnt]); - strcpy(current_rra -> cf_nam,"SEASONAL"); - current_rra -> row_cnt = period; - current_rra -> par[RRA_seasonal_smooth_idx].u_cnt = hashed_name % period; - current_rra -> pdp_cnt = 1; - current_rra -> par[RRA_seasonal_gamma].u_val = - rrd -> rra_def[hw_index].par[RRA_hw_alpha].u_val; - current_rra -> par[RRA_dependent_rra_idx].u_cnt = hw_index; - rrd -> rra_def[hw_index].par[RRA_dependent_rra_idx].u_cnt = rrd -> stat_head -> rra_cnt; - + current_rra = &(rrd->rra_def[rrd->stat_head->rra_cnt]); + strcpy(current_rra->cf_nam, "SEASONAL"); + current_rra->row_cnt = period; + current_rra->par[RRA_seasonal_smooth_idx].u_cnt = hashed_name % period; + current_rra->pdp_cnt = 1; + current_rra->par[RRA_seasonal_gamma].u_val = + rrd->rra_def[hw_index].par[RRA_hw_alpha].u_val; + current_rra->par[RRA_dependent_rra_idx].u_cnt = hw_index; + rrd->rra_def[hw_index].par[RRA_dependent_rra_idx].u_cnt = + rrd->stat_head->rra_cnt; + /* create the CF_DEVSEASONAL RRA */ - (rrd -> stat_head -> rra_cnt)++; - current_rra = &(rrd -> rra_def[rrd -> stat_head -> rra_cnt]); - strcpy(current_rra -> cf_nam,"DEVSEASONAL"); - current_rra -> row_cnt = period; - current_rra -> par[RRA_seasonal_smooth_idx].u_cnt = hashed_name % period; - current_rra -> pdp_cnt = 1; - current_rra -> par[RRA_seasonal_gamma].u_val = - rrd -> rra_def[hw_index].par[RRA_hw_alpha].u_val; - current_rra -> par[RRA_dependent_rra_idx].u_cnt = hw_index; - + (rrd->stat_head->rra_cnt)++; + current_rra = &(rrd->rra_def[rrd->stat_head->rra_cnt]); + strcpy(current_rra->cf_nam, "DEVSEASONAL"); + current_rra->row_cnt = period; + current_rra->par[RRA_seasonal_smooth_idx].u_cnt = hashed_name % period; + current_rra->pdp_cnt = 1; + current_rra->par[RRA_seasonal_gamma].u_val = + rrd->rra_def[hw_index].par[RRA_hw_alpha].u_val; + current_rra->par[RRA_dependent_rra_idx].u_cnt = hw_index; + /* create the CF_DEVPREDICT RRA */ - (rrd -> stat_head -> rra_cnt)++; - current_rra = &(rrd -> rra_def[rrd -> stat_head -> rra_cnt]); - strcpy(current_rra -> cf_nam,"DEVPREDICT"); - current_rra -> row_cnt = (rrd -> rra_def[hw_index]).row_cnt; - current_rra -> pdp_cnt = 1; - current_rra -> par[RRA_dependent_rra_idx].u_cnt - = hw_index + 2; /* DEVSEASONAL */ - + (rrd->stat_head->rra_cnt)++; + current_rra = &(rrd->rra_def[rrd->stat_head->rra_cnt]); + strcpy(current_rra->cf_nam, "DEVPREDICT"); + current_rra->row_cnt = (rrd->rra_def[hw_index]).row_cnt; + current_rra->pdp_cnt = 1; + current_rra->par[RRA_dependent_rra_idx].u_cnt = hw_index + 2; /* DEVSEASONAL */ + /* create the CF_FAILURES RRA */ - (rrd -> stat_head -> rra_cnt)++; - current_rra = &(rrd -> rra_def[rrd -> stat_head -> rra_cnt]); - strcpy(current_rra -> cf_nam,"FAILURES"); - current_rra -> row_cnt = period; - current_rra -> pdp_cnt = 1; - current_rra -> par[RRA_delta_pos].u_val = 2.0; - current_rra -> par[RRA_delta_neg].u_val = 2.0; - current_rra -> par[RRA_failure_threshold].u_cnt = 7; - current_rra -> par[RRA_window_len].u_cnt = 9; - current_rra -> par[RRA_dependent_rra_idx].u_cnt = - hw_index + 2; /* DEVSEASONAL */ + (rrd->stat_head->rra_cnt)++; + current_rra = &(rrd->rra_def[rrd->stat_head->rra_cnt]); + strcpy(current_rra->cf_nam, "FAILURES"); + current_rra->row_cnt = period; + current_rra->pdp_cnt = 1; + current_rra->par[RRA_delta_pos].u_val = 2.0; + current_rra->par[RRA_delta_neg].u_val = 2.0; + current_rra->par[RRA_failure_threshold].u_cnt = 7; + current_rra->par[RRA_window_len].u_cnt = 9; + current_rra->par[RRA_dependent_rra_idx].u_cnt = hw_index + 2; /* DEVSEASONAL */ return 0; } /* create and empty rrd file according to the specs given */ -int -rrd_create_fn(const char *file_name, rrd_t *rrd) +int rrd_create_fn( + const char *file_name, + rrd_t *rrd) { - unsigned long i,ii; - FILE *rrd_file; - rrd_value_t *unknown; - int unkn_cnt; - - long rrd_head_size; - - if ((rrd_file = fopen(file_name,"wb")) == NULL ) { - rrd_set_error("creating '%s': %s",file_name, rrd_strerror(errno)); - free(rrd->stat_head); - rrd->stat_head = NULL; - free(rrd->ds_def); - rrd->ds_def = NULL; - free(rrd->rra_def); + unsigned long i, ii; + FILE *rrd_file; + rrd_value_t *unknown; + int unkn_cnt; + + long rrd_head_size; + + if ((rrd_file = fopen(file_name, "wb")) == NULL) { + rrd_set_error("creating '%s': %s", file_name, rrd_strerror(errno)); + free(rrd->stat_head); + rrd->stat_head = NULL; + free(rrd->ds_def); + rrd->ds_def = NULL; + free(rrd->rra_def); rrd->rra_def = NULL; - return(-1); + return (-1); } - - fwrite(rrd->stat_head, - sizeof(stat_head_t), 1, rrd_file); - - fwrite(rrd->ds_def, - sizeof(ds_def_t), rrd->stat_head->ds_cnt, rrd_file); - + + fwrite(rrd->stat_head, sizeof(stat_head_t), 1, rrd_file); + + fwrite(rrd->ds_def, sizeof(ds_def_t), rrd->stat_head->ds_cnt, rrd_file); + fwrite(rrd->rra_def, - sizeof(rra_def_t), rrd->stat_head->rra_cnt, rrd_file); - - fwrite(rrd->live_head, - sizeof(live_head_t),1, rrd_file); - - if((rrd->pdp_prep = calloc(1,sizeof(pdp_prep_t))) == NULL){ - rrd_set_error("allocating pdp_prep"); - rrd_free(rrd); - fclose(rrd_file); - return(-1); + sizeof(rra_def_t), rrd->stat_head->rra_cnt, rrd_file); + + fwrite(rrd->live_head, sizeof(live_head_t), 1, rrd_file); + + if ((rrd->pdp_prep = calloc(1, sizeof(pdp_prep_t))) == NULL) { + rrd_set_error("allocating pdp_prep"); + rrd_free(rrd); + fclose(rrd_file); + return (-1); } - strcpy(rrd->pdp_prep->last_ds,"UNKN"); + strcpy(rrd->pdp_prep->last_ds, "UNKN"); rrd->pdp_prep->scratch[PDP_val].u_val = 0.0; - rrd->pdp_prep->scratch[PDP_unkn_sec_cnt].u_cnt = - rrd->live_head->last_up % rrd->stat_head->pdp_step; - - for(i=0; i < rrd->stat_head->ds_cnt; i++) - fwrite( rrd->pdp_prep,sizeof(pdp_prep_t),1,rrd_file); - - if((rrd->cdp_prep = calloc(1,sizeof(cdp_prep_t))) == NULL){ - rrd_set_error("allocating cdp_prep"); - rrd_free(rrd); - fclose(rrd_file); - return(-1); + rrd->pdp_prep->scratch[PDP_unkn_sec_cnt].u_cnt = + rrd->live_head->last_up % rrd->stat_head->pdp_step; + + for (i = 0; i < rrd->stat_head->ds_cnt; i++) + fwrite(rrd->pdp_prep, sizeof(pdp_prep_t), 1, rrd_file); + + if ((rrd->cdp_prep = calloc(1, sizeof(cdp_prep_t))) == NULL) { + rrd_set_error("allocating cdp_prep"); + rrd_free(rrd); + fclose(rrd_file); + return (-1); } - for(i=0; i < rrd->stat_head->rra_cnt; i++) { - switch (cf_conv(rrd->rra_def[i].cf_nam)) - { - case CF_HWPREDICT: - init_hwpredict_cdp(rrd->cdp_prep); - break; - case CF_SEASONAL: - case CF_DEVSEASONAL: - init_seasonal_cdp(rrd->cdp_prep); - break; - case CF_FAILURES: - /* initialize violation history to 0 */ - for (ii = 0; ii < MAX_CDP_PAR_EN; ii++) - { - /* We can zero everything out, by setting u_val to the - * NULL address. Each array entry in scratch is 8 bytes - * (a double), but u_cnt only accessed 4 bytes (long) */ - rrd->cdp_prep->scratch[ii].u_val = 0.0; - } - break; - default: - /* can not be zero because we don't know anything ... */ - rrd->cdp_prep->scratch[CDP_val].u_val = DNAN; - /* startup missing pdp count */ - rrd->cdp_prep->scratch[CDP_unkn_pdp_cnt].u_cnt = - ((rrd->live_head->last_up - - rrd->pdp_prep->scratch[PDP_unkn_sec_cnt].u_cnt) - % (rrd->stat_head->pdp_step - * rrd->rra_def[i].pdp_cnt)) / rrd->stat_head->pdp_step; - break; - } - - for(ii=0; ii < rrd->stat_head->ds_cnt; ii++) - { - fwrite( rrd->cdp_prep,sizeof(cdp_prep_t),1,rrd_file); - } + for (i = 0; i < rrd->stat_head->rra_cnt; i++) { + switch (cf_conv(rrd->rra_def[i].cf_nam)) { + case CF_HWPREDICT: + init_hwpredict_cdp(rrd->cdp_prep); + break; + case CF_SEASONAL: + case CF_DEVSEASONAL: + init_seasonal_cdp(rrd->cdp_prep); + break; + case CF_FAILURES: + /* initialize violation history to 0 */ + for (ii = 0; ii < MAX_CDP_PAR_EN; ii++) { + /* We can zero everything out, by setting u_val to the + * NULL address. Each array entry in scratch is 8 bytes + * (a double), but u_cnt only accessed 4 bytes (long) */ + rrd->cdp_prep->scratch[ii].u_val = 0.0; + } + break; + default: + /* can not be zero because we don't know anything ... */ + rrd->cdp_prep->scratch[CDP_val].u_val = DNAN; + /* startup missing pdp count */ + rrd->cdp_prep->scratch[CDP_unkn_pdp_cnt].u_cnt = + ((rrd->live_head->last_up - + rrd->pdp_prep->scratch[PDP_unkn_sec_cnt].u_cnt) + % (rrd->stat_head->pdp_step + * rrd->rra_def[i].pdp_cnt)) / rrd->stat_head->pdp_step; + break; + } + + for (ii = 0; ii < rrd->stat_head->ds_cnt; ii++) { + fwrite(rrd->cdp_prep, sizeof(cdp_prep_t), 1, rrd_file); + } } - + /* now, we must make sure that the rest of the rrd struct is properly initialized */ - - if((rrd->rra_ptr = calloc(1,sizeof(rra_ptr_t))) == NULL) { - rrd_set_error("allocating rra_ptr"); - rrd_free(rrd); - fclose(rrd_file); - return(-1); + + if ((rrd->rra_ptr = calloc(1, sizeof(rra_ptr_t))) == NULL) { + rrd_set_error("allocating rra_ptr"); + rrd_free(rrd); + fclose(rrd_file); + return (-1); } - + /* changed this initialization to be consistent with * rrd_restore. With the old value (0), the first update * would occur for cur_row = 1 because rrd_update increments * the pointer a priori. */ - for (i=0; i < rrd->stat_head->rra_cnt; i++) - { + for (i = 0; i < rrd->stat_head->rra_cnt; i++) { rrd->rra_ptr->cur_row = rrd->rra_def[i].row_cnt - 1; - fwrite( rrd->rra_ptr, sizeof(rra_ptr_t),1,rrd_file); + fwrite(rrd->rra_ptr, sizeof(rra_ptr_t), 1, rrd_file); } rrd_head_size = ftell(rrd_file); /* write the empty data area */ - if ((unknown = (rrd_value_t *)malloc(512 * sizeof(rrd_value_t))) == NULL) { - rrd_set_error("allocating unknown"); - rrd_free(rrd); - fclose(rrd_file); - return(-1); + if ((unknown = (rrd_value_t *) malloc(512 * sizeof(rrd_value_t))) == NULL) { + rrd_set_error("allocating unknown"); + rrd_free(rrd); + fclose(rrd_file); + return (-1); } for (i = 0; i < 512; ++i) - unknown[i] = DNAN; - + unknown[i] = DNAN; + unkn_cnt = 0; for (i = 0; i < rrd->stat_head->rra_cnt; i++) unkn_cnt += rrd->stat_head->ds_cnt * rrd->rra_def[i].row_cnt; - + while (unkn_cnt > 0) { - fwrite(unknown, sizeof(rrd_value_t), min(unkn_cnt, 512), rrd_file); - unkn_cnt -= 512; - } + fwrite(unknown, sizeof(rrd_value_t), min(unkn_cnt, 512), rrd_file); + unkn_cnt -= 512; + } free(unknown); - + /* lets see if we had an error */ - if(ferror(rrd_file)){ - rrd_set_error("a file error occurred while creating '%s'",file_name); - fclose(rrd_file); - rrd_free(rrd); - return(-1); + if (ferror(rrd_file)) { + rrd_set_error("a file error occurred while creating '%s'", file_name); + fclose(rrd_file); + rrd_free(rrd); + return (-1); } - #ifdef HAVE_POSIX_FADVISE /* this file is not going to be read again any time soon, so we drop everything except the header portion from @@ -701,14 +761,17 @@ rrd_create_fn(const char *file_name, rrd_t *rrd) the unknown data. */ fflush(rrd_file); fdatasync(fileno(rrd_file)); - if (0 != posix_fadvise(fileno(rrd_file), rrd_head_size, 0, POSIX_FADV_DONTNEED)) { - rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",file_name, rrd_strerror(errno)); + if (0 != + posix_fadvise(fileno(rrd_file), rrd_head_size, 0, + POSIX_FADV_DONTNEED)) { + rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s", file_name, + rrd_strerror(errno)); fclose(rrd_file); - return(-1); - } + return (-1); + } #endif - fclose(rrd_file); + fclose(rrd_file); rrd_free(rrd); return (0); } diff --git a/src/rrd_diff.c b/src/rrd_diff.c index 22cef90..5839040 100644 --- a/src/rrd_diff.c +++ b/src/rrd_diff.c @@ -37,46 +37,49 @@ #include "rrd_tool.h" -double -rrd_diff(char *a, char *b) +double rrd_diff( + char *a, + char *b) { - char res[LAST_DS_LEN+1], *a1, *b1, *r1, *fix; - int c,x,m; - char a_neg=0, b_neg=0; - double result; - - while (!(isdigit((int)*a) || *a==0)) { - if(*a=='-') - a_neg = 1; + char res[LAST_DS_LEN + 1], *a1, *b1, *r1, *fix; + int c, x, m; + char a_neg = 0, b_neg = 0; + double result; + + while (!(isdigit((int) *a) || *a == 0)) { + if (*a == '-') + a_neg = 1; a++; } - fix=a; - while (isdigit((int)*fix)) - fix++; - *fix = 0; /* maybe there is some non digit data in the string */ - while (!(isdigit((int)*b) || *b==0)) { - if(*b=='-') - b_neg = 1; + fix = a; + while (isdigit((int) *fix)) + fix++; + *fix = 0; /* maybe there is some non digit data in the string */ + while (!(isdigit((int) *b) || *b == 0)) { + if (*b == '-') + b_neg = 1; b++; } - fix=b; - while (isdigit((int)*fix)) - fix++; - *fix = 0; /* maybe there is some non digit data in the string */ - if(!isdigit((int)*a) || !isdigit((int)*b)) - return DNAN; - if(a_neg+b_neg == 1) /* can not handle numbers with different signs yet */ - return DNAN; - a1 = &a[strlen(a)-1]; - m = max(strlen(a),strlen(b)); - if (m > LAST_DS_LEN) return DNAN; /* result string too short */ + fix = b; + while (isdigit((int) *fix)) + fix++; + *fix = 0; /* maybe there is some non digit data in the string */ + if (!isdigit((int) *a) || !isdigit((int) *b)) + return DNAN; + if (a_neg + b_neg == 1) /* can not handle numbers with different signs yet */ + return DNAN; + a1 = &a[strlen(a) - 1]; + m = max(strlen(a), strlen(b)); + if (m > LAST_DS_LEN) + return DNAN; /* result string too short */ - r1 = &res[m+1]; - for (b1 = res;b1 <= r1; b1++) *b1 = ' '; - b1 = &b[strlen(b)-1]; - r1[1] = 0; /* Null terminate result */ + r1 = &res[m + 1]; + for (b1 = res; b1 <= r1; b1++) + *b1 = ' '; + b1 = &b[strlen(b) - 1]; + r1[1] = 0; /* Null terminate result */ c = 0; - for (x=0; x= a && b1 >= b) { *r1 = ((*a1 - c) - *b1) + '0'; } else if (a1 >= a) { @@ -86,33 +89,34 @@ rrd_diff(char *a, char *b) } if (*r1 < '0') { *r1 += 10; - c=1; - } else - if (*r1 > '9') { /* 0 - 10 */ - *r1 -= 10; - c=1; - } else { - c=0; + c = 1; + } else if (*r1 > '9') { /* 0 - 10 */ + *r1 -= 10; + c = 1; + } else { + c = 0; } - a1--;b1--;r1--; + a1--; + b1--; + r1--; } if (c) { - r1 = &res[m+1]; - for (x=0; isdigit((int)*r1) && x '9') { *r1 -= 10; - c=1; + c = 1; } else { - c=0; + c = 0; } } result = -atof(res); } else result = atof(res); - if(a_neg+b_neg==2) /* both are negatives, reverse sign */ + if (a_neg + b_neg == 2) /* both are negatives, reverse sign */ result = -result; - + return result; -} +} diff --git a/src/rrd_dump.c b/src/rrd_dump.c index 5d76896..d839bf6 100644 --- a/src/rrd_dump.c +++ b/src/rrd_dump.c @@ -48,318 +48,382 @@ extern char *tzname[2]; #endif -int -rrd_dump(int argc, char **argv) +int rrd_dump( + int argc, + char **argv) { - int rc; + int rc; if (argc < 2) { - rrd_set_error("Not enough arguments"); - return -1; + rrd_set_error("Not enough arguments"); + return -1; } - if (argc == 3) - { - rc = rrd_dump_r(argv[1], argv[2]); - } - else - { - rc = rrd_dump_r(argv[1], NULL); + if (argc == 3) { + rc = rrd_dump_r(argv[1], argv[2]); + } else { + rc = rrd_dump_r(argv[1], NULL); } return rc; } -int -rrd_dump_r(const char *filename, char *outname) -{ - unsigned int i,ii,ix,iii=0; - time_t now; - char somestring[255]; - rrd_value_t my_cdp; - off_t rra_base, rra_start, rra_next; - rrd_file_t *rrd_file; - FILE *out_file; - rrd_t rrd; - rrd_value_t value; - struct tm tm; +int rrd_dump_r( + const char *filename, + char *outname) +{ + unsigned int i, ii, ix, iii = 0; + time_t now; + char somestring[255]; + rrd_value_t my_cdp; + off_t rra_base, rra_start, rra_next; + rrd_file_t *rrd_file; + FILE *out_file; + rrd_t rrd; + rrd_value_t value; + struct tm tm; + rrd_file = rrd_open(filename, &rrd, RRD_READONLY); if (rrd_file == NULL) { - rrd_free(&rrd); - return(-1); + rrd_free(&rrd); + return (-1); } out_file = NULL; - if (outname) - { - if (!(out_file = fopen(outname, "w"))) - { - return (-1); - } - } - else - { - out_file = stdout; + if (outname) { + if (!(out_file = fopen(outname, "w"))) { + return (-1); + } + } else { + out_file = stdout; } - + fputs("", out_file); fputs("", out_file); - fprintf(out_file, "\t %s \n",RRD_VERSION); - fprintf(out_file, "\t %lu \n",rrd.stat_head->pdp_step); + fprintf(out_file, "\t %s \n", RRD_VERSION); + fprintf(out_file, "\t %lu \n", + rrd.stat_head->pdp_step); #if HAVE_STRFTIME localtime_r(&rrd.live_head->last_up, &tm); - strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z", - &tm); + strftime(somestring, 200, "%Y-%m-%d %H:%M:%S %Z", &tm); #else # error "Need strftime" #endif fprintf(out_file, "\t %ld \n\n", - rrd.live_head->last_up,somestring); - for(i=0;ids_cnt;i++){ - fprintf(out_file, "\t\n"); - fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].ds_nam); - fprintf(out_file, "\t\t %s \n",rrd.ds_def[i].dst); - if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) { - fprintf(out_file, "\t\t %lu \n",rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt); - if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)){ - fprintf(out_file, "\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_min_val].u_val); - } - if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)){ - fprintf(out_file, "\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t %0.10e \n",rrd.ds_def[i].par[DS_max_val].u_val); - } - } else { /* DST_CDEF */ - char *str=NULL; - rpn_compact2str((rpn_cdefds_t *) &(rrd.ds_def[i].par[DS_cdef]),rrd.ds_def,&str); - fprintf(out_file, "\t\t %s \n", str); - free(str); - } - fprintf(out_file, "\n\t\t\n"); - fprintf(out_file, "\t\t %s \n",rrd.pdp_prep[i].last_ds); - if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)){ - fprintf(out_file, "\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t %0.10e \n",rrd.pdp_prep[i].scratch[PDP_val].u_val); - } - fprintf(out_file, "\t\t %lu \n", - rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt); - - fprintf(out_file, "\t\n\n"); - } + rrd.live_head->last_up, somestring); + for (i = 0; i < rrd.stat_head->ds_cnt; i++) { + fprintf(out_file, "\t\n"); + fprintf(out_file, "\t\t %s \n", rrd.ds_def[i].ds_nam); + fprintf(out_file, "\t\t %s \n", rrd.ds_def[i].dst); + if (dst_conv(rrd.ds_def[i].dst) != DST_CDEF) { + fprintf(out_file, + "\t\t %lu \n", + rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt); + if (isnan(rrd.ds_def[i].par[DS_min_val].u_val)) { + fprintf(out_file, "\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t %0.10e \n", + rrd.ds_def[i].par[DS_min_val].u_val); + } + if (isnan(rrd.ds_def[i].par[DS_max_val].u_val)) { + fprintf(out_file, "\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t %0.10e \n", + rrd.ds_def[i].par[DS_max_val].u_val); + } + } else { /* DST_CDEF */ + char *str = NULL; + + rpn_compact2str((rpn_cdefds_t *) & (rrd.ds_def[i].par[DS_cdef]), + rrd.ds_def, &str); + fprintf(out_file, "\t\t %s \n", str); + free(str); + } + fprintf(out_file, "\n\t\t\n"); + fprintf(out_file, "\t\t %s \n", + rrd.pdp_prep[i].last_ds); + if (isnan(rrd.pdp_prep[i].scratch[PDP_val].u_val)) { + fprintf(out_file, "\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t %0.10e \n", + rrd.pdp_prep[i].scratch[PDP_val].u_val); + } + fprintf(out_file, "\t\t %lu \n", + rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt); + + fprintf(out_file, "\t\n\n"); + } fputs("", out_file); rra_base = rrd_file->header_len; rra_next = rra_base; - for(i=0;irra_cnt;i++){ - - long timer=0; - rra_start= rra_next; - rra_next += ( rrd.stat_head->ds_cnt - * rrd.rra_def[i].row_cnt - * sizeof(rrd_value_t)); - fprintf(out_file, "\t\n"); - fprintf(out_file, "\t\t %s \n",rrd.rra_def[i].cf_nam); - fprintf(out_file, "\t\t %lu \n\n", - rrd.rra_def[i].pdp_cnt, rrd.rra_def[i].pdp_cnt - *rrd.stat_head->pdp_step); - /* support for RRA parameters */ - fprintf(out_file, "\t\t\n"); - switch(cf_conv(rrd.rra_def[i].cf_nam)) { - case CF_HWPREDICT: - fprintf(out_file, "\t\t %0.10e \n", - rrd.rra_def[i].par[RRA_hw_alpha].u_val); - fprintf(out_file, "\t\t %0.10e \n", - rrd.rra_def[i].par[RRA_hw_beta].u_val); - fprintf(out_file, "\t\t %lu \n", - rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); - break; - case CF_SEASONAL: - case CF_DEVSEASONAL: - fprintf(out_file, "\t\t %0.10e \n", - rrd.rra_def[i].par[RRA_seasonal_gamma].u_val); - fprintf(out_file, "\t\t %lu \n", - rrd.rra_def[i].par[RRA_seasonal_smooth_idx].u_cnt); - fprintf(out_file, "\t\t %lu \n", - rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); - break; - case CF_FAILURES: - fprintf(out_file, "\t\t %0.10e \n", - rrd.rra_def[i].par[RRA_delta_pos].u_val); - fprintf(out_file, "\t\t %0.10e \n", - rrd.rra_def[i].par[RRA_delta_neg].u_val); - fprintf(out_file, "\t\t %lu \n", - rrd.rra_def[i].par[RRA_window_len].u_cnt); - fprintf(out_file, "\t\t %lu \n", - rrd.rra_def[i].par[RRA_failure_threshold].u_cnt); - /* fall thru */ - case CF_DEVPREDICT: - fprintf(out_file, "\t\t %lu \n", - rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); - break; - case CF_AVERAGE: - case CF_MAXIMUM: - case CF_MINIMUM: - case CF_LAST: - default: - fprintf(out_file, "\t\t %0.10e \n", rrd.rra_def[i].par[RRA_cdp_xff_val].u_val); - break; - } - fprintf(out_file, "\t\t\n"); - fprintf(out_file, "\t\t\n"); - for(ii=0;iids_cnt;ii++){ - unsigned long ivalue; - fprintf(out_file, "\t\t\t\n"); - /* support for exporting all CDP parameters */ - /* parameters common to all CFs */ - /* primary_val and secondary_val do not need to be saved between updates - * so strictly speaking they could be omitted. - * However, they can be useful for diagnostic purposes, so are included here. */ - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt - +ii].scratch[CDP_primary_val].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_secondary_val].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - switch(cf_conv(rrd.rra_def[i].cf_nam)) { - case CF_HWPREDICT: - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_hw_intercept].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_hw_last_intercept].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_hw_slope].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_hw_last_slope].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - ivalue = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_null_count].u_cnt; - fprintf(out_file, "\t\t\t %lu \n", ivalue); - ivalue = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_last_null_count].u_cnt; - fprintf(out_file, "\t\t\t %lu \n", ivalue); - break; - case CF_SEASONAL: - case CF_DEVSEASONAL: - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_hw_seasonal].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_hw_last_seasonal].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - ivalue = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_init_seasonal].u_cnt; - fprintf(out_file, "\t\t\t %lu \n", ivalue); - break; - case CF_DEVPREDICT: - break; - case CF_FAILURES: - { - unsigned short vidx; - char *violations_array = (char *) ((void*) - rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch); - fprintf(out_file, "\t\t\t "); - for (vidx = 0; vidx < rrd.rra_def[i].par[RRA_window_len].u_cnt; ++vidx) - { - fprintf(out_file, "%d",violations_array[vidx]); - } - fprintf(out_file, " \n"); - } - break; - case CF_AVERAGE: - case CF_MAXIMUM: - case CF_MINIMUM: - case CF_LAST: - default: - value = rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_val].u_val; - if (isnan(value)) { - fprintf(out_file, "\t\t\t NaN \n"); - } else { - fprintf(out_file, "\t\t\t %0.10e \n", value); - } - fprintf(out_file, "\t\t\t %lu \n", - rrd.cdp_prep[i*rrd.stat_head->ds_cnt+ii].scratch[CDP_unkn_pdp_cnt].u_cnt); - break; - } - fprintf(out_file, "\t\t\t\n"); - } - fprintf(out_file, "\t\t\n"); + for (i = 0; i < rrd.stat_head->rra_cnt; i++) { + + long timer = 0; - fprintf(out_file, "\t\t\n"); - rrd_seek(rrd_file,(rra_start - +(rrd.rra_ptr[i].cur_row+1) - * rrd.stat_head->ds_cnt - * sizeof(rrd_value_t)),SEEK_SET); - timer = - (rrd.rra_def[i].row_cnt-1); - ii=rrd.rra_ptr[i].cur_row; - for(ix=0;ix=rrd.rra_def[i].row_cnt) { - rrd_seek(rrd_file,rra_start,SEEK_SET); - ii=0; /* wrap if max row cnt is reached */ - } - now = (rrd.live_head->last_up - - rrd.live_head->last_up - % (rrd.rra_def[i].pdp_cnt*rrd.stat_head->pdp_step)) - + (timer*rrd.rra_def[i].pdp_cnt*rrd.stat_head->pdp_step); + rra_start = rra_next; + rra_next += (rrd.stat_head->ds_cnt + * rrd.rra_def[i].row_cnt * sizeof(rrd_value_t)); + fprintf(out_file, "\t\n"); + fprintf(out_file, "\t\t %s \n", rrd.rra_def[i].cf_nam); + fprintf(out_file, + "\t\t %lu \n\n", + rrd.rra_def[i].pdp_cnt, + rrd.rra_def[i].pdp_cnt * rrd.stat_head->pdp_step); + /* support for RRA parameters */ + fprintf(out_file, "\t\t\n"); + switch (cf_conv(rrd.rra_def[i].cf_nam)) { + case CF_HWPREDICT: + fprintf(out_file, "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_hw_alpha].u_val); + fprintf(out_file, "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_hw_beta].u_val); + fprintf(out_file, + "\t\t %lu \n", + rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); + break; + case CF_SEASONAL: + case CF_DEVSEASONAL: + fprintf(out_file, + "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_seasonal_gamma].u_val); + fprintf(out_file, + "\t\t %lu \n", + rrd.rra_def[i].par[RRA_seasonal_smooth_idx].u_cnt); + fprintf(out_file, + "\t\t %lu \n", + rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); + break; + case CF_FAILURES: + fprintf(out_file, "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_delta_pos].u_val); + fprintf(out_file, "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_delta_neg].u_val); + fprintf(out_file, "\t\t %lu \n", + rrd.rra_def[i].par[RRA_window_len].u_cnt); + fprintf(out_file, + "\t\t %lu \n", + rrd.rra_def[i].par[RRA_failure_threshold].u_cnt); + /* fall thru */ + case CF_DEVPREDICT: + fprintf(out_file, + "\t\t %lu \n", + rrd.rra_def[i].par[RRA_dependent_rra_idx].u_cnt); + break; + case CF_AVERAGE: + case CF_MAXIMUM: + case CF_MINIMUM: + case CF_LAST: + default: + fprintf(out_file, "\t\t %0.10e \n", + rrd.rra_def[i].par[RRA_cdp_xff_val].u_val); + break; + } + fprintf(out_file, "\t\t\n"); + fprintf(out_file, "\t\t\n"); + for (ii = 0; ii < rrd.stat_head->ds_cnt; ii++) { + unsigned long ivalue; - timer++; + fprintf(out_file, "\t\t\t\n"); + /* support for exporting all CDP parameters */ + /* parameters common to all CFs */ + /* primary_val and secondary_val do not need to be saved between updates + * so strictly speaking they could be omitted. + * However, they can be useful for diagnostic purposes, so are included here. */ + value = rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_primary_val].u_val; + if (isnan(value)) { + fprintf(out_file, + "\t\t\t NaN \n"); + } else { + fprintf(out_file, + "\t\t\t %0.10e \n", + value); + } + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_secondary_val].u_val; + if (isnan(value)) { + fprintf(out_file, + "\t\t\t NaN \n"); + } else { + fprintf(out_file, + "\t\t\t %0.10e \n", + value); + } + switch (cf_conv(rrd.rra_def[i].cf_nam)) { + case CF_HWPREDICT: + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_hw_intercept].u_val; + if (isnan(value)) { + fprintf(out_file, "\t\t\t NaN \n"); + } else { + fprintf(out_file, + "\t\t\t %0.10e \n", value); + } + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_hw_last_intercept].u_val; + if (isnan(value)) { + fprintf(out_file, + "\t\t\t NaN \n"); + } else { + fprintf(out_file, + "\t\t\t %0.10e \n", + value); + } + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_hw_slope].u_val; + if (isnan(value)) { + fprintf(out_file, "\t\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t\t %0.10e \n", + value); + } + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_hw_last_slope].u_val; + if (isnan(value)) { + fprintf(out_file, + "\t\t\t NaN \n"); + } else { + fprintf(out_file, + "\t\t\t %0.10e \n", + value); + } + ivalue = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_null_count].u_cnt; + fprintf(out_file, "\t\t\t %lu \n", + ivalue); + ivalue = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_last_null_count].u_cnt; + fprintf(out_file, + "\t\t\t %lu \n", + ivalue); + break; + case CF_SEASONAL: + case CF_DEVSEASONAL: + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_hw_seasonal].u_val; + if (isnan(value)) { + fprintf(out_file, "\t\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t\t %0.10e \n", + value); + } + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_hw_last_seasonal].u_val; + if (isnan(value)) { + fprintf(out_file, + "\t\t\t NaN \n"); + } else { + fprintf(out_file, + "\t\t\t %0.10e \n", + value); + } + ivalue = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_init_seasonal].u_cnt; + fprintf(out_file, "\t\t\t %lu \n", + ivalue); + break; + case CF_DEVPREDICT: + break; + case CF_FAILURES: + { + unsigned short vidx; + char *violations_array = (char *) ((void *) + rrd.cdp_prep[i * + rrd. + stat_head-> + ds_cnt + + ii]. + scratch); + fprintf(out_file, "\t\t\t "); + for (vidx = 0; + vidx < rrd.rra_def[i].par[RRA_window_len].u_cnt; + ++vidx) { + fprintf(out_file, "%d", violations_array[vidx]); + } + fprintf(out_file, " \n"); + } + break; + case CF_AVERAGE: + case CF_MAXIMUM: + case CF_MINIMUM: + case CF_LAST: + default: + value = + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_val].u_val; + if (isnan(value)) { + fprintf(out_file, "\t\t\t NaN \n"); + } else { + fprintf(out_file, "\t\t\t %0.10e \n", + value); + } + fprintf(out_file, + "\t\t\t %lu \n", + rrd.cdp_prep[i * rrd.stat_head->ds_cnt + + ii].scratch[CDP_unkn_pdp_cnt].u_cnt); + break; + } + fprintf(out_file, "\t\t\t\n"); + } + fprintf(out_file, "\t\t\n"); + + fprintf(out_file, "\t\t\n"); + rrd_seek(rrd_file, (rra_start + (rrd.rra_ptr[i].cur_row + 1) + * rrd.stat_head->ds_cnt + * sizeof(rrd_value_t)), SEEK_SET); + timer = -(rrd.rra_def[i].row_cnt - 1); + ii = rrd.rra_ptr[i].cur_row; + for (ix = 0; ix < rrd.rra_def[i].row_cnt; ix++) { + ii++; + if (ii >= rrd.rra_def[i].row_cnt) { + rrd_seek(rrd_file, rra_start, SEEK_SET); + ii = 0; /* wrap if max row cnt is reached */ + } + now = (rrd.live_head->last_up + - rrd.live_head->last_up + % (rrd.rra_def[i].pdp_cnt * rrd.stat_head->pdp_step)) + + (timer * rrd.rra_def[i].pdp_cnt * rrd.stat_head->pdp_step); + + timer++; #if HAVE_STRFTIME - localtime_r(&now, &tm); - strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z", &tm); + localtime_r(&now, &tm); + strftime(somestring, 200, "%Y-%m-%d %H:%M:%S %Z", &tm); #else # error "Need strftime" #endif - fprintf(out_file, "\t\t\t ",somestring,(int)now); - for(iii=0;iiids_cnt;iii++){ - rrd_read(rrd_file, &my_cdp,sizeof(rrd_value_t)*1); - if (isnan(my_cdp)){ - fprintf(out_file, " NaN "); - } else { - fprintf(out_file, " %0.10e ",my_cdp); - }; - } - fprintf(out_file, "\n"); - } - fprintf(out_file, "\t\t\n\t\n"); + fprintf(out_file, "\t\t\t ", somestring, + (int) now); + for (iii = 0; iii < rrd.stat_head->ds_cnt; iii++) { + rrd_read(rrd_file, &my_cdp, sizeof(rrd_value_t) * 1); + if (isnan(my_cdp)) { + fprintf(out_file, " NaN "); + } else { + fprintf(out_file, " %0.10e ", my_cdp); + }; + } + fprintf(out_file, "\n"); + } + fprintf(out_file, "\t\t\n\t\n"); } fprintf(out_file, "\n"); rrd_free(&rrd); close(rrd_file->fd); - if (out_file != stdout) - { - fclose(out_file); + if (out_file != stdout) { + fclose(out_file); } - return(0); + return (0); } - diff --git a/src/rrd_error.c b/src/rrd_error.c index 9f46a62..74055eb 100644 --- a/src/rrd_error.c +++ b/src/rrd_error.c @@ -37,10 +37,12 @@ #define ERRBUFLEN 256 #define CTX (rrd_get_context()) -void -rrd_set_error(char *fmt, ...) +void rrd_set_error( + char *fmt, + ...) { - va_list argp; + va_list argp; + rrd_clear_error(); va_start(argp, fmt); #ifdef HAVE_VSNPRINTF @@ -51,18 +53,21 @@ rrd_set_error(char *fmt, ...) va_end(argp); } -int -rrd_test_error(void) { +int rrd_test_error( + void) +{ return CTX->rrd_error[0] != '\0'; } -void -rrd_clear_error(void){ +void rrd_clear_error( + void) +{ CTX->rrd_error[0] = '\0'; } -char * -rrd_get_error(void){ +char *rrd_get_error( + void) +{ return CTX->rrd_error; } @@ -72,74 +77,88 @@ rrd_get_error(void){ operations on them... Then a single thread may use more than one context. Using these functions would require to change each and every function containing any of the non _r versions... */ -void -rrd_set_error_r(struct rrd_context *rrd_ctx, char *fmt, ...) +void rrd_set_error_r( + struct rrd_context *rrd_ctx, + char *fmt, + ...) { - va_list argp; + va_list argp; + rrd_clear_error_r(rrd_ctx); va_start(argp, fmt); #ifdef HAVE_VSNPRINTF - vsnprintf((char *)rrd_ctx->rrd_error, rrd_ctx->len, fmt, argp); - rrd_ctx->rrd_error[rrd_ctx->len]='\0'; + vsnprintf((char *) rrd_ctx->rrd_error, rrd_ctx->len, fmt, argp); + rrd_ctx->rrd_error[rrd_ctx->len] = '\0'; #else - vsprintf((char *)rrd_ctx->rrd_error, fmt, argp); + vsprintf((char *) rrd_ctx->rrd_error, fmt, argp); #endif va_end(argp); } -int -rrd_test_error_r(struct rrd_context *rrd_ctx) { +int rrd_test_error_r( + struct rrd_context *rrd_ctx) +{ return rrd_ctx->rrd_error[0] != '\0'; } -void -rrd_clear_error_r(struct rrd_context *rrd_ctx) { +void rrd_clear_error_r( + struct rrd_context *rrd_ctx) +{ rrd_ctx->rrd_error[0] = '\0'; } -char * -rrd_get_error_r(struct rrd_context *rrd_ctx) { - return (char *)rrd_ctx->rrd_error; +char *rrd_get_error_r( + struct rrd_context *rrd_ctx) +{ + return (char *) rrd_ctx->rrd_error; } #endif /* PS: Should we move this to some other file? It is not really error related. */ -struct rrd_context * -rrd_new_context(void) { - struct rrd_context *rrd_ctx = - (struct rrd_context *) malloc(sizeof(struct rrd_context)); +struct rrd_context *rrd_new_context( + void) +{ + struct rrd_context *rrd_ctx = + (struct rrd_context *) malloc(sizeof(struct rrd_context)); if (rrd_ctx) { - rrd_ctx->rrd_error = malloc(MAXLEN+10); - rrd_ctx->lib_errstr = malloc(ERRBUFLEN+10); - if (rrd_ctx->rrd_error && rrd_ctx->lib_errstr) { - *rrd_ctx->rrd_error = 0; - *rrd_ctx->lib_errstr = 0; - rrd_ctx->len = MAXLEN; - rrd_ctx->errlen = ERRBUFLEN; - return rrd_ctx; - } - if (rrd_ctx->rrd_error) free(rrd_ctx->rrd_error); - if (rrd_ctx->lib_errstr) free(rrd_ctx->lib_errstr); - free(rrd_ctx); + rrd_ctx->rrd_error = malloc(MAXLEN + 10); + rrd_ctx->lib_errstr = malloc(ERRBUFLEN + 10); + if (rrd_ctx->rrd_error && rrd_ctx->lib_errstr) { + *rrd_ctx->rrd_error = 0; + *rrd_ctx->lib_errstr = 0; + rrd_ctx->len = MAXLEN; + rrd_ctx->errlen = ERRBUFLEN; + return rrd_ctx; + } + if (rrd_ctx->rrd_error) + free(rrd_ctx->rrd_error); + if (rrd_ctx->lib_errstr) + free(rrd_ctx->lib_errstr); + free(rrd_ctx); } return NULL; } -void -rrd_free_context(struct rrd_context *rrd_ctx) { +void rrd_free_context( + struct rrd_context *rrd_ctx) +{ if (rrd_ctx) { - if (rrd_ctx->rrd_error) free(rrd_ctx->rrd_error); - if (rrd_ctx->lib_errstr) free(rrd_ctx->lib_errstr); - free(rrd_ctx); + if (rrd_ctx->rrd_error) + free(rrd_ctx->rrd_error); + if (rrd_ctx->lib_errstr) + free(rrd_ctx->lib_errstr); + free(rrd_ctx); } } #if 0 -void rrd_globalize_error(struct rrd_context *rrd_ctx) { +void rrd_globalize_error( + struct rrd_context *rrd_ctx) +{ if (rrd_ctx) { - rrd_set_error(rrd_ctx->rrd_error); + rrd_set_error(rrd_ctx->rrd_error); } } #endif diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index 4b0f2b5..42ddceb 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -57,269 +57,277 @@ #include "rrd_is_thread_safe.h" /*#define DEBUG*/ -int -rrd_fetch(int argc, - char **argv, - time_t *start, - time_t *end, /* which time frame do you want ? - * will be changed to represent reality */ - unsigned long *step, /* which stepsize do you want? - * will be changed to represent reality */ - unsigned long *ds_cnt, /* number of data sources in file */ - char ***ds_namv, /* names of data sources */ - rrd_value_t **data) /* two dimensional array containing the data */ -{ - - - long step_tmp =1; - time_t start_tmp=0, end_tmp=0; +int rrd_fetch( + int argc, + char **argv, + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ + unsigned long *step, /* which stepsize do you want? + * will be changed to represent reality */ + unsigned long *ds_cnt, /* number of data sources in file */ + char ***ds_namv, /* names of data sources */ + rrd_value_t ** data) +{ /* two dimensional array containing the data */ + + + long step_tmp = 1; + time_t start_tmp = 0, end_tmp = 0; const char *cf; struct rrd_time_value start_tv, end_tv; char *parsetime_error = NULL; - optind = 0; opterr = 0; /* initialize getopt */ + + optind = 0; + opterr = 0; /* initialize getopt */ /* init start and end time */ parsetime("end-24h", &start_tv); parsetime("now", &end_tv); - while (1){ - static struct option long_options[] = - { - {"resolution", required_argument, 0, 'r'}, - {"start", required_argument, 0, 's'}, - {"end", required_argument, 0, 'e'}, - {0,0,0,0} - }; - int option_index = 0; - int opt; - opt = getopt_long(argc, argv, "r:s:e:", - long_options, &option_index); - - if (opt == EOF) - break; - - switch(opt) { - case 's': + while (1) { + static struct option long_options[] = { + {"resolution", required_argument, 0, 'r'}, + {"start", required_argument, 0, 's'}, + {"end", required_argument, 0, 'e'}, + {0, 0, 0, 0} + }; + int option_index = 0; + int opt; + + opt = getopt_long(argc, argv, "r:s:e:", long_options, &option_index); + + if (opt == EOF) + break; + + switch (opt) { + case 's': if ((parsetime_error = parsetime(optarg, &start_tv))) { - rrd_set_error( "start time: %s", parsetime_error ); + rrd_set_error("start time: %s", parsetime_error); return -1; - } - break; - case 'e': + } + break; + case 'e': if ((parsetime_error = parsetime(optarg, &end_tv))) { - rrd_set_error( "end time: %s", parsetime_error ); + rrd_set_error("end time: %s", parsetime_error); return -1; - } - break; - case 'r': - step_tmp = atol(optarg); - break; - case '?': - rrd_set_error("unknown option '-%c'",optopt); - return(-1); - } + } + break; + case 'r': + step_tmp = atol(optarg); + break; + case '?': + rrd_set_error("unknown option '-%c'", optopt); + return (-1); + } + } + + + if (proc_start_end(&start_tv, &end_tv, &start_tmp, &end_tmp) == -1) { + return -1; } - - if (proc_start_end(&start_tv,&end_tv,&start_tmp,&end_tmp) == -1){ - return -1; - } - - if (start_tmp < 3600*24*365*10){ - rrd_set_error("the first entry to fetch should be after 1980"); - return(-1); + if (start_tmp < 3600 * 24 * 365 * 10) { + rrd_set_error("the first entry to fetch should be after 1980"); + return (-1); } - + if (end_tmp < start_tmp) { - rrd_set_error("start (%ld) should be less than end (%ld)", start_tmp, end_tmp); - return(-1); + rrd_set_error("start (%ld) should be less than end (%ld)", start_tmp, + end_tmp); + return (-1); } - + *start = start_tmp; *end = end_tmp; if (step_tmp < 1) { - rrd_set_error("step must be >= 1 second"); - return -1; + rrd_set_error("step must be >= 1 second"); + return -1; } *step = step_tmp; - - if (optind + 1 >= argc){ - rrd_set_error("not enough arguments"); - return -1; + + if (optind + 1 >= argc) { + rrd_set_error("not enough arguments"); + return -1; } - cf = argv[optind+1]; + cf = argv[optind + 1]; - if (rrd_fetch_r(argv[optind],cf,start,end,step,ds_cnt,ds_namv,data) == -1) - return(-1); + if (rrd_fetch_r(argv[optind], cf, start, end, step, ds_cnt, ds_namv, data) + == -1) + return (-1); return (0); } -int -rrd_fetch_r( - const char *filename, /* name of the rrd */ - const char *cf, /* which consolidation function ?*/ - time_t *start, - time_t *end, /* which time frame do you want ? - * will be changed to represent reality */ - unsigned long *step, /* which stepsize do you want? - * will be changed to represent reality */ - unsigned long *ds_cnt, /* number of data sources in file */ - char ***ds_namv, /* names of data_sources */ - rrd_value_t **data) /* two dimensional array containing the data */ -{ - enum cf_en cf_idx; - - if ((int)(cf_idx=cf_conv(cf)) == -1 ){ +int rrd_fetch_r( + const char *filename, /* name of the rrd */ + const char *cf, /* which consolidation function ? */ + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ + unsigned long *step, /* which stepsize do you want? + * will be changed to represent reality */ + unsigned long *ds_cnt, /* number of data sources in file */ + char ***ds_namv, /* names of data_sources */ + rrd_value_t ** data) +{ /* two dimensional array containing the data */ + enum cf_en cf_idx; + + if ((int) (cf_idx = cf_conv(cf)) == -1) { return -1; } - return (rrd_fetch_fn(filename,cf_idx,start,end,step,ds_cnt,ds_namv,data)); + return (rrd_fetch_fn + (filename, cf_idx, start, end, step, ds_cnt, ds_namv, data)); } -int -rrd_fetch_fn( - const char *filename, /* name of the rrd */ - enum cf_en cf_idx, /* which consolidation function ?*/ - time_t *start, - time_t *end, /* which time frame do you want ? - * will be changed to represent reality */ - unsigned long *step, /* which stepsize do you want? - * will be changed to represent reality */ - unsigned long *ds_cnt, /* number of data sources in file */ - char ***ds_namv, /* names of data_sources */ - rrd_value_t **data) /* two dimensional array containing the data */ -{ - long i,ii; - time_t cal_start,cal_end, rra_start_time,rra_end_time; - long best_full_rra=0, best_part_rra=0, chosen_rra=0, rra_pointer=0; - long best_full_step_diff=0, best_part_step_diff=0, tmp_step_diff=0, tmp_match=0, best_match=0; - long full_match, rra_base; - long start_offset, end_offset; - int first_full = 1; - int first_part = 1; +int rrd_fetch_fn( + const char *filename, /* name of the rrd */ + enum cf_en cf_idx, /* which consolidation function ? */ + time_t *start, + time_t *end, /* which time frame do you want ? + * will be changed to represent reality */ + unsigned long *step, /* which stepsize do you want? + * will be changed to represent reality */ + unsigned long *ds_cnt, /* number of data sources in file */ + char ***ds_namv, /* names of data_sources */ + rrd_value_t ** data) +{ /* two dimensional array containing the data */ + long i, ii; + time_t cal_start, cal_end, rra_start_time, rra_end_time; + long best_full_rra = 0, best_part_rra = 0, chosen_rra = + 0, rra_pointer = 0; + long best_full_step_diff = 0, best_part_step_diff = + 0, tmp_step_diff = 0, tmp_match = 0, best_match = 0; + long full_match, rra_base; + long start_offset, end_offset; + int first_full = 1; + int first_part = 1; rrd_t rrd; - rrd_file_t *rrd_file; - rrd_value_t *data_ptr; - unsigned long rows; + rrd_file_t *rrd_file; + rrd_value_t *data_ptr; + unsigned long rows; + #ifdef HAVE_POSIX_FADVISE - long rrd_head_size; + long rrd_head_size; #endif #ifdef DEBUG -fprintf(stderr,"Entered rrd_fetch_fn() searching for the best match\n"); -fprintf(stderr,"Looking for: start %10lu end %10lu step %5lu\n", - *start,*end,*step); + fprintf(stderr, "Entered rrd_fetch_fn() searching for the best match\n"); + fprintf(stderr, "Looking for: start %10lu end %10lu step %5lu\n", + *start, *end, *step); #endif - rrd_file = rrd_open(filename,&rrd, RRD_READONLY); + rrd_file = rrd_open(filename, &rrd, RRD_READONLY); if (rrd_file == NULL) - return(-1); + return (-1); #ifdef HAVE_POSIX_FADVISE rrd_head_size = rrd_file->header_len; #endif /* when was the really last update of this file ? */ - if (((*ds_namv) = (char **) malloc(rrd.stat_head->ds_cnt * sizeof(char*)))==NULL){ - rrd_set_error("malloc fetch ds_namv array"); - rrd_free(&rrd); - close(rrd_file->fd); - return(-1); + if (((*ds_namv) = + (char **) malloc(rrd.stat_head->ds_cnt * sizeof(char *))) == NULL) { + rrd_set_error("malloc fetch ds_namv array"); + rrd_free(&rrd); + close(rrd_file->fd); + return (-1); } - - for(i=0;(unsigned long)ids_cnt;i++){ - if ((((*ds_namv)[i]) = malloc(sizeof(char) * DS_NAM_SIZE))==NULL){ - rrd_set_error("malloc fetch ds_namv entry"); - rrd_free(&rrd); - free(*ds_namv); - close(rrd_file->fd); - return(-1); - } - strncpy((*ds_namv)[i],rrd.ds_def[i].ds_nam,DS_NAM_SIZE-1); - (*ds_namv)[i][DS_NAM_SIZE-1]='\0'; + + for (i = 0; (unsigned long) i < rrd.stat_head->ds_cnt; i++) { + if ((((*ds_namv)[i]) = malloc(sizeof(char) * DS_NAM_SIZE)) == NULL) { + rrd_set_error("malloc fetch ds_namv entry"); + rrd_free(&rrd); + free(*ds_namv); + close(rrd_file->fd); + return (-1); + } + strncpy((*ds_namv)[i], rrd.ds_def[i].ds_nam, DS_NAM_SIZE - 1); + (*ds_namv)[i][DS_NAM_SIZE - 1] = '\0'; } - + /* find the rra which best matches the requirements */ - for(i=0;(unsigned)irra_cnt;i++){ - if(cf_conv(rrd.rra_def[i].cf_nam) == cf_idx){ - - cal_end = (rrd.live_head->last_up - (rrd.live_head->last_up - % (rrd.rra_def[i].pdp_cnt - * rrd.stat_head->pdp_step))); - cal_start = (cal_end - - (rrd.rra_def[i].pdp_cnt - * rrd.rra_def[i].row_cnt - * rrd.stat_head->pdp_step)); - - full_match = *end -*start; + for (i = 0; (unsigned) i < rrd.stat_head->rra_cnt; i++) { + if (cf_conv(rrd.rra_def[i].cf_nam) == cf_idx) { + + cal_end = (rrd.live_head->last_up - (rrd.live_head->last_up + % (rrd.rra_def[i].pdp_cnt + * + rrd.stat_head-> + pdp_step))); + cal_start = + (cal_end - + (rrd.rra_def[i].pdp_cnt * rrd.rra_def[i].row_cnt * + rrd.stat_head->pdp_step)); + + full_match = *end - *start; #ifdef DEBUG -fprintf(stderr,"Considering: start %10lu end %10lu step %5lu ", - cal_start,cal_end, - rrd.stat_head->pdp_step * rrd.rra_def[i].pdp_cnt); + fprintf(stderr, "Considering: start %10lu end %10lu step %5lu ", + cal_start, cal_end, + rrd.stat_head->pdp_step * rrd.rra_def[i].pdp_cnt); #endif - /* we need step difference in either full or partial case */ - tmp_step_diff = labs(*step - (rrd.stat_head->pdp_step - * rrd.rra_def[i].pdp_cnt)); - /* best full match */ - if(cal_end >= *end - && cal_start <= *start){ - if (first_full || (tmp_step_diff < best_full_step_diff)){ - first_full=0; - best_full_step_diff = tmp_step_diff; - best_full_rra=i; + /* we need step difference in either full or partial case */ + tmp_step_diff = labs(*step - (rrd.stat_head->pdp_step + * rrd.rra_def[i].pdp_cnt)); + /* best full match */ + if (cal_end >= *end && cal_start <= *start) { + if (first_full || (tmp_step_diff < best_full_step_diff)) { + first_full = 0; + best_full_step_diff = tmp_step_diff; + best_full_rra = i; #ifdef DEBUG -fprintf(stderr,"best full match so far\n"); + fprintf(stderr, "best full match so far\n"); #endif - } else { + } else { #ifdef DEBUG -fprintf(stderr,"full match, not best\n"); + fprintf(stderr, "full match, not best\n"); #endif - } - - } else { - /* best partial match */ - tmp_match = full_match; - if (cal_start>*start) - tmp_match -= (cal_start-*start); - if (cal_end<*end) - tmp_match -= (*end-cal_end); - if (first_part || + } + + } else { + /* best partial match */ + tmp_match = full_match; + if (cal_start > *start) + tmp_match -= (cal_start - *start); + if (cal_end < *end) + tmp_match -= (*end - cal_end); + if (first_part || (best_match < tmp_match) || - (best_match == tmp_match && - tmp_step_diff < best_part_step_diff)){ + (best_match == tmp_match && + tmp_step_diff < best_part_step_diff)) { #ifdef DEBUG -fprintf(stderr,"best partial so far\n"); + fprintf(stderr, "best partial so far\n"); #endif - first_part=0; - best_match = tmp_match; - best_part_step_diff = tmp_step_diff; - best_part_rra =i; - } else { + first_part = 0; + best_match = tmp_match; + best_part_step_diff = tmp_step_diff; + best_part_rra = i; + } else { #ifdef DEBUG -fprintf(stderr,"partial match, not best\n"); + fprintf(stderr, "partial match, not best\n"); #endif - } - } - } + } + } + } } /* lets see how the matching went. */ - if (first_full==0) - chosen_rra = best_full_rra; - else if (first_part==0) - chosen_rra = best_part_rra; + if (first_full == 0) + chosen_rra = best_full_rra; + else if (first_part == 0) + chosen_rra = best_part_rra; else { - rrd_set_error("the RRD does not contain an RRA matching the chosen CF"); - rrd_free(&rrd); - close(rrd_file->fd); - return(-1); + rrd_set_error + ("the RRD does not contain an RRA matching the chosen CF"); + rrd_free(&rrd); + close(rrd_file->fd); + return (-1); } - + /* set the wish parameters to their real values */ *step = rrd.stat_head->pdp_step * rrd.rra_def[chosen_rra].pdp_cnt; *start -= (*start % *step); @@ -327,8 +335,9 @@ fprintf(stderr,"partial match, not best\n"); rows = (*end - *start) / *step + 1; #ifdef DEBUG - fprintf(stderr,"We found: start %10lu end %10lu step %5lu rows %lu\n", - *start,*end,*step,rows); + fprintf(stderr, + "We found: start %10lu end %10lu step %5lu rows %lu\n", + *start, *end, *step, rows); #endif /* Start and end are now multiples of the step size. The amount of @@ -337,161 +346,165 @@ fprintf(stderr,"partial match, not best\n"); ** we need exactly ((t+s)-t)/s rows. The row to collect from the ** database is the one with time stamp (t+s) which means t to t+s. */ - *ds_cnt = rrd.stat_head->ds_cnt; - if (((*data) = malloc(*ds_cnt * rows * sizeof(rrd_value_t)))==NULL){ - rrd_set_error("malloc fetch data area"); - for (i=0;(unsigned long)i<*ds_cnt;i++) - free((*ds_namv)[i]); - free(*ds_namv); - rrd_free(&rrd); - close(rrd_file->fd); - return(-1); + *ds_cnt = rrd.stat_head->ds_cnt; + if (((*data) = malloc(*ds_cnt * rows * sizeof(rrd_value_t))) == NULL) { + rrd_set_error("malloc fetch data area"); + for (i = 0; (unsigned long) i < *ds_cnt; i++) + free((*ds_namv)[i]); + free(*ds_namv); + rrd_free(&rrd); + close(rrd_file->fd); + return (-1); } - - data_ptr=(*data); - + + data_ptr = (*data); + /* find base address of rra */ rra_base = rrd_file->header_len; - for(i=0;ilast_up - - (rrd.live_head->last_up % *step)); + rra_end_time = (rrd.live_head->last_up + - (rrd.live_head->last_up % *step)); rra_start_time = (rra_end_time - - ( *step * (rrd.rra_def[chosen_rra].row_cnt-1))); + - (*step * (rrd.rra_def[chosen_rra].row_cnt - 1))); /* here's an error by one if we don't be careful */ - start_offset =(long)(*start + *step - rra_start_time) / (long)*step; - end_offset = (long)(rra_end_time - *end ) / (long)*step; + start_offset = (long) (*start + *step - rra_start_time) / (long) *step; + end_offset = (long) (rra_end_time - *end) / (long) *step; #ifdef DEBUG - fprintf(stderr,"rra_start %lu, rra_end %lu, start_off %li, end_off %li\n", - rra_start_time,rra_end_time,start_offset,end_offset); + fprintf(stderr, + "rra_start %lu, rra_end %lu, start_off %li, end_off %li\n", + rra_start_time, rra_end_time, start_offset, end_offset); #endif /* fill the gap at the start if needs be */ if (start_offset <= 0) - rra_pointer = rrd.rra_ptr[chosen_rra].cur_row+1; - else - rra_pointer = rrd.rra_ptr[chosen_rra].cur_row+1+start_offset; - - if(rrd_seek(rrd_file,(rra_base - + (rra_pointer - * *ds_cnt - * sizeof(rrd_value_t))),SEEK_SET) != 0){ - rrd_set_error("seek error in RRA"); - for (i=0;(unsigned)i<*ds_cnt;i++) - free((*ds_namv)[i]); - free(*ds_namv); - rrd_free(&rrd); - free(*data); - *data = NULL; - close(rrd_file->fd); - return(-1); + rra_pointer = rrd.rra_ptr[chosen_rra].cur_row + 1; + else + rra_pointer = rrd.rra_ptr[chosen_rra].cur_row + 1 + start_offset; + + if (rrd_seek(rrd_file, (rra_base + + (rra_pointer + * *ds_cnt + * sizeof(rrd_value_t))), SEEK_SET) != 0) { + rrd_set_error("seek error in RRA"); + for (i = 0; (unsigned) i < *ds_cnt; i++) + free((*ds_namv)[i]); + free(*ds_namv); + rrd_free(&rrd); + free(*data); + *data = NULL; + close(rrd_file->fd); + return (-1); } #ifdef DEBUG - fprintf(stderr,"First Seek: rra_base %lu rra_pointer %lu\n", - rra_base, rra_pointer); + fprintf(stderr, "First Seek: rra_base %lu rra_pointer %lu\n", + rra_base, rra_pointer); #endif /* step trough the array */ - for (i=start_offset; - i< (signed)rrd.rra_def[chosen_rra].row_cnt - end_offset; - i++){ - /* no valid data yet */ - if (i<0) { + for (i = start_offset; + i < (signed) rrd.rra_def[chosen_rra].row_cnt - end_offset; i++) { + /* no valid data yet */ + if (i < 0) { #ifdef DEBUG - fprintf(stderr,"pre fetch %li -- ",i); + fprintf(stderr, "pre fetch %li -- ", i); #endif - for(ii=0;(unsigned)ii<*ds_cnt;ii++){ - *(data_ptr++) = DNAN; + for (ii = 0; (unsigned) ii < *ds_cnt; ii++) { + *(data_ptr++) = DNAN; #ifdef DEBUG - fprintf(stderr,"%10.2f ",*(data_ptr-1)); + fprintf(stderr, "%10.2f ", *(data_ptr - 1)); #endif - } - } - /* past the valid data area */ - else if (i >= (signed)rrd.rra_def[chosen_rra].row_cnt) { + } + } + /* past the valid data area */ + else if (i >= (signed) rrd.rra_def[chosen_rra].row_cnt) { #ifdef DEBUG - fprintf(stderr,"post fetch %li -- ",i); + fprintf(stderr, "post fetch %li -- ", i); #endif - for(ii=0;(unsigned)ii<*ds_cnt;ii++){ - *(data_ptr++) = DNAN; + for (ii = 0; (unsigned) ii < *ds_cnt; ii++) { + *(data_ptr++) = DNAN; #ifdef DEBUG - fprintf(stderr,"%10.2f ",*(data_ptr-1)); + fprintf(stderr, "%10.2f ", *(data_ptr - 1)); #endif - } - } else { - /* OK we are inside the valid area but the pointer has to - * be wrapped*/ - if (rra_pointer >= (signed)rrd.rra_def[chosen_rra].row_cnt) { - rra_pointer -= rrd.rra_def[chosen_rra].row_cnt; - if(rrd_seek(rrd_file,(rra_base+rra_pointer - * *ds_cnt - * sizeof(rrd_value_t)),SEEK_SET) != 0){ - rrd_set_error("wrap seek in RRA did fail"); - for (ii=0;(unsigned)ii<*ds_cnt;ii++) - free((*ds_namv)[ii]); - free(*ds_namv); - rrd_free(&rrd); - free(*data); - *data = NULL; - close(rrd_file->fd); - return(-1); - } + } + } else { + /* OK we are inside the valid area but the pointer has to + * be wrapped*/ + if (rra_pointer >= (signed) rrd.rra_def[chosen_rra].row_cnt) { + rra_pointer -= rrd.rra_def[chosen_rra].row_cnt; + if (rrd_seek(rrd_file, (rra_base + rra_pointer + * *ds_cnt + * sizeof(rrd_value_t)), + SEEK_SET) != 0) { + rrd_set_error("wrap seek in RRA did fail"); + for (ii = 0; (unsigned) ii < *ds_cnt; ii++) + free((*ds_namv)[ii]); + free(*ds_namv); + rrd_free(&rrd); + free(*data); + *data = NULL; + close(rrd_file->fd); + return (-1); + } #ifdef DEBUG - fprintf(stderr,"wrap seek ...\n"); + fprintf(stderr, "wrap seek ...\n"); #endif - } - - if(rrd_read(rrd_file,data_ptr, - sizeof(rrd_value_t)* (*ds_cnt)) - != (ssize_t)(sizeof(rrd_value_t)*(*ds_cnt)*rrd.stat_head->ds_cnt)){ - rrd_set_error("fetching cdp from rra"); - for (ii=0;(unsigned)ii<*ds_cnt;ii++) - free((*ds_namv)[ii]); - free(*ds_namv); - rrd_free(&rrd); - free(*data); - *data = NULL; - close(rrd_file->fd); - return(-1); - } + } + + if (rrd_read(rrd_file, data_ptr, sizeof(rrd_value_t) * (*ds_cnt)) + != (ssize_t) (sizeof(rrd_value_t) * (*ds_cnt) * + rrd.stat_head->ds_cnt)) { + rrd_set_error("fetching cdp from rra"); + for (ii = 0; (unsigned) ii < *ds_cnt; ii++) + free((*ds_namv)[ii]); + free(*ds_namv); + rrd_free(&rrd); + free(*data); + *data = NULL; + close(rrd_file->fd); + return (-1); + } #ifdef HAVE_POSIX_FADVISE - /* don't pollute the buffer cache with data read from the file. We do this while reading to - keep damage minimal */ - if (0 != posix_fadvise(rrd_file->fd, rrd_head_size, 0, POSIX_FADV_DONTNEED)) { - rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",filename, rrd_strerror(errno)); - close(rrd_file->fd); - return(-1); - } + /* don't pollute the buffer cache with data read from the file. We do this while reading to + keep damage minimal */ + if (0 != + posix_fadvise(rrd_file->fd, rrd_head_size, 0, + POSIX_FADV_DONTNEED)) { + rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s", + filename, rrd_strerror(errno)); + close(rrd_file->fd); + return (-1); + } #endif #ifdef DEBUG - fprintf(stderr,"post fetch %li -- ",i); - for(ii=0;ii<*ds_cnt;ii++) - fprintf(stderr,"%10.2f ",*(data_ptr+ii)); + fprintf(stderr, "post fetch %li -- ", i); + for (ii = 0; ii < *ds_cnt; ii++) + fprintf(stderr, "%10.2f ", *(data_ptr + ii)); #endif - data_ptr += *ds_cnt; - rra_pointer ++; - } + data_ptr += *ds_cnt; + rra_pointer++; + } #ifdef DEBUG - fprintf(stderr,"\n"); -#endif - + fprintf(stderr, "\n"); +#endif + } rrd_free(&rrd); #ifdef HAVE_POSIX_FADVISE /* and just to be sure we drop everything except the header at the end */ - if (0 != posix_fadvise(rrd_file->fd, rrd_head_size, 0, POSIX_FADV_DONTNEED)) { - rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s",filename, rrd_strerror(errno)); - close(rrd_file->fd); - return(-1); - } -#endif + if (0 != + posix_fadvise(rrd_file->fd, rrd_head_size, 0, POSIX_FADV_DONTNEED)) { + rrd_set_error("setting POSIX_FADV_DONTNEED on '%s': %s", filename, + rrd_strerror(errno)); + close(rrd_file->fd); + return (-1); + } +#endif close(rrd_file->fd); - return(0); + return (0); } diff --git a/src/rrd_first.c b/src/rrd_first.c index 3782d4a..0bd3f45 100644 --- a/src/rrd_first.c +++ b/src/rrd_first.c @@ -9,91 +9,91 @@ #include "rrd_tool.h" -time_t -rrd_first(int argc, char **argv) +time_t rrd_first( + int argc, + char **argv) { - int target_rraindex=0; - char *endptr; - optind = 0; opterr = 0; /* initialize getopt */ + int target_rraindex = 0; + char *endptr; - while (1){ - static struct option long_options[] = - { + optind = 0; + opterr = 0; /* initialize getopt */ + + while (1) { + static struct option long_options[] = { {"rraindex", required_argument, 0, 129}, - {0,0,0,0} + {0, 0, 0, 0} }; - int option_index = 0; - int opt; + int option_index = 0; + int opt; + opt = getopt_long(argc, argv, "", long_options, &option_index); - if(opt == EOF) + if (opt == EOF) break; - switch(opt) { - case 129: - target_rraindex=strtol(optarg,&endptr,0); - if(target_rraindex < 0) { + switch (opt) { + case 129: + target_rraindex = strtol(optarg, &endptr, 0); + if (target_rraindex < 0) { rrd_set_error("invalid rraindex number"); - return(-1); + return (-1); } break; - default: - rrd_set_error("usage rrdtool %s [--rraindex number] file.rrd", argv[0]); - return(-1); + default: + rrd_set_error("usage rrdtool %s [--rraindex number] file.rrd", + argv[0]); + return (-1); } } - if(optind >= argc){ + if (optind >= argc) { rrd_set_error("not enough arguments"); - return -1; - } + return -1; + } - return(rrd_first_r(argv[optind], target_rraindex)); + return (rrd_first_r(argv[optind], target_rraindex)); } -time_t -rrd_first_r(const char *filename, const int rraindex) +time_t rrd_first_r( + const char *filename, + const int rraindex) { - off_t rra_start, - timer; - time_t then; - rrd_t rrd; + off_t rra_start, timer; + time_t then; + rrd_t rrd; rrd_file_t *rrd_file; - rrd_file = rrd_open(filename,&rrd, RRD_READONLY); + rrd_file = rrd_open(filename, &rrd, RRD_READONLY); if (rrd_file == NULL) { rrd_set_error("could not open RRD"); - return(-1); + return (-1); } - if((rraindex < 0) || (rraindex >= (int)rrd.stat_head->rra_cnt)) { + if ((rraindex < 0) || (rraindex >= (int) rrd.stat_head->rra_cnt)) { rrd_set_error("invalid rraindex number"); rrd_free(&rrd); close(rrd_file->fd); - return(-1); + return (-1); } rra_start = rrd_file->header_len; rrd_seek(rrd_file, - (rra_start + - (rrd.rra_ptr[rraindex].cur_row+1) * - rrd.stat_head->ds_cnt * - sizeof(rrd_value_t)), - SEEK_SET); - timer = - (rrd.rra_def[rraindex].row_cnt-1); + (rra_start + + (rrd.rra_ptr[rraindex].cur_row + 1) * + rrd.stat_head->ds_cnt * sizeof(rrd_value_t)), SEEK_SET); + timer = -(rrd.rra_def[rraindex].row_cnt - 1); if (rrd.rra_ptr[rraindex].cur_row + 1 > rrd.rra_def[rraindex].row_cnt) { - rrd_seek(rrd_file,rra_start,SEEK_SET); + rrd_seek(rrd_file, rra_start, SEEK_SET); } then = (rrd.live_head->last_up - rrd.live_head->last_up % - (rrd.rra_def[rraindex].pdp_cnt*rrd.stat_head->pdp_step)) + - (timer * - rrd.rra_def[rraindex].pdp_cnt*rrd.stat_head->pdp_step); + (rrd.rra_def[rraindex].pdp_cnt * rrd.stat_head->pdp_step)) + + (timer * rrd.rra_def[rraindex].pdp_cnt * rrd.stat_head->pdp_step); rrd_free(&rrd); close(rrd_file->fd); rrd_close(rrd_file); - return(then); + return (then); } - diff --git a/src/rrd_format.c b/src/rrd_format.c index 990f94a..6002495 100644 --- a/src/rrd_format.c +++ b/src/rrd_format.c @@ -53,42 +53,47 @@ if (strcmp(#VV, string) == 0) return VVV; /* conversion functions to allow symbolic entry of enumerations */ -enum dst_en dst_conv(char *string) +enum dst_en dst_conv( + char *string) { - converter(COUNTER,DST_COUNTER) - converter(ABSOLUTE,DST_ABSOLUTE) - converter(GAUGE,DST_GAUGE) - converter(DERIVE,DST_DERIVE) - converter(COMPUTE,DST_CDEF) - rrd_set_error("unknown data acquisition function '%s'",string); - return(-1); + converter(COUNTER, DST_COUNTER) + converter(ABSOLUTE, DST_ABSOLUTE) + converter(GAUGE, DST_GAUGE) + converter(DERIVE, DST_DERIVE) + converter(COMPUTE, DST_CDEF) + rrd_set_error("unknown data acquisition function '%s'", string); + return (-1); } -enum cf_en cf_conv(const char *string) +enum cf_en cf_conv( + const char *string) { - converter(AVERAGE,CF_AVERAGE) - converter(MIN,CF_MINIMUM) - converter(MAX,CF_MAXIMUM) - converter(LAST,CF_LAST) - converter(HWPREDICT,CF_HWPREDICT) - converter(DEVPREDICT,CF_DEVPREDICT) - converter(SEASONAL,CF_SEASONAL) - converter(DEVSEASONAL,CF_DEVSEASONAL) - converter(FAILURES,CF_FAILURES) - rrd_set_error("unknown consolidation function '%s'",string); - return(-1); + converter(AVERAGE, CF_AVERAGE) + converter(MIN, CF_MINIMUM) + converter(MAX, CF_MAXIMUM) + converter(LAST, CF_LAST) + converter(HWPREDICT, CF_HWPREDICT) + converter(DEVPREDICT, CF_DEVPREDICT) + converter(SEASONAL, CF_SEASONAL) + converter(DEVSEASONAL, CF_DEVSEASONAL) + converter(FAILURES, CF_FAILURES) + rrd_set_error("unknown consolidation function '%s'", string); + return (-1); } -#undef converter +#undef converter -long -ds_match(rrd_t *rrd,char *ds_nam){ +long ds_match( + rrd_t *rrd, + char *ds_nam) +{ unsigned long i; - for(i=0;istat_head->ds_cnt;i++) - if ((strcmp(ds_nam,rrd->ds_def[i].ds_nam))==0) - return i; - rrd_set_error("unknown data source name '%s'",ds_nam); + + for (i = 0; i < rrd->stat_head->ds_cnt; i++) + if ((strcmp(ds_nam, rrd->ds_def[i].ds_nam)) == 0) + return i; + rrd_set_error("unknown data source name '%s'", ds_nam); return -1; } diff --git a/src/rrd_format.h b/src/rrd_format.h index 6f94438..c841a6d 100644 --- a/src/rrd_format.h +++ b/src/rrd_format.h @@ -26,9 +26,9 @@ #include "rrd_nan_inf.h" -typedef union unival { - unsigned long u_cnt; - rrd_value_t u_val; +typedef union unival { + unsigned long u_cnt; + rrd_value_t u_val; } unival; @@ -101,21 +101,21 @@ typedef union unival { typedef struct stat_head_t { - /* Data Base Identification Section ***/ - char cookie[4]; /* RRD */ - char version[5]; /* version of the format */ - double float_cookie; /* is it the correct double - * representation ? */ - - /* Data Base Structure Definition *****/ - unsigned long ds_cnt; /* how many different ds provide - * input to the rrd */ - unsigned long rra_cnt; /* how many rras will be maintained - * in the rrd */ - unsigned long pdp_step; /* pdp interval in seconds */ - - unival par[10]; /* global parameters ... unused - at the moment */ + /* Data Base Identification Section ** */ + char cookie[4]; /* RRD */ + char version[5]; /* version of the format */ + double float_cookie; /* is it the correct double + * representation ? */ + + /* Data Base Structure Definition **** */ + unsigned long ds_cnt; /* how many different ds provide + * input to the rrd */ + unsigned long rra_cnt; /* how many rras will be maintained + * in the rrd */ + unsigned long pdp_step; /* pdp interval in seconds */ + + unival par[10]; /* global parameters ... unused + at the moment */ } stat_head_t; @@ -123,24 +123,26 @@ typedef struct stat_head_t { * POS 2: ds_def_t (* ds_cnt) Data Source definitions ****************************************************************************/ -enum dst_en { DST_COUNTER=0, /* data source types available */ - DST_ABSOLUTE, - DST_GAUGE, - DST_DERIVE, - DST_CDEF}; - -enum ds_param_en { DS_mrhb_cnt=0, /* minimum required heartbeat. A - * data source must provide input at - * least every ds_mrhb seconds, - * otherwise it is regarded dead and - * will be set to UNKNOWN */ - DS_min_val, /* the processed input of a ds must */ - DS_max_val, /* be between max_val and min_val - * both can be set to UNKNOWN if you - * do not care. Data outside the limits - * set to UNKNOWN */ - DS_cdef = DS_mrhb_cnt}; /* pointer to encoded rpn - * expression only applies to DST_CDEF */ +enum dst_en { DST_COUNTER = 0, /* data source types available */ + DST_ABSOLUTE, + DST_GAUGE, + DST_DERIVE, + DST_CDEF +}; + +enum ds_param_en { DS_mrhb_cnt = 0, /* minimum required heartbeat. A + * data source must provide input at + * least every ds_mrhb seconds, + * otherwise it is regarded dead and + * will be set to UNKNOWN */ + DS_min_val, /* the processed input of a ds must */ + DS_max_val, /* be between max_val and min_val + * both can be set to UNKNOWN if you + * do not care. Data outside the limits + * set to UNKNOWN */ + DS_cdef = DS_mrhb_cnt +}; /* pointer to encoded rpn + * expression only applies to DST_CDEF */ /* The magic number here is one less than DS_NAM_SIZE */ #define DS_NAM_FMT "%19[a-zA-Z0-9_-]" @@ -150,89 +152,93 @@ enum ds_param_en { DS_mrhb_cnt=0, /* minimum required heartbeat. A #define DST_SIZE 20 typedef struct ds_def_t { - char ds_nam[DS_NAM_SIZE]; /* Name of the data source (null terminated)*/ - char dst[DST_SIZE]; /* Type of data source (null terminated)*/ - unival par[10]; /* index of this array see ds_param_en */ + char ds_nam[DS_NAM_SIZE]; /* Name of the data source (null terminated) */ + char dst[DST_SIZE]; /* Type of data source (null terminated) */ + unival par[10]; /* index of this array see ds_param_en */ } ds_def_t; /**************************************************************************** * POS 3: rra_def_t ( * rra_cnt) one for each store to be maintained ****************************************************************************/ -enum cf_en { CF_AVERAGE=0, /* data consolidation functions */ - CF_MINIMUM, - CF_MAXIMUM, - CF_LAST, - CF_HWPREDICT, - /* An array of predictions using the seasonal - * Holt-Winters algorithm. Requires an RRA of type - * CF_SEASONAL for this data source. */ - CF_SEASONAL, - /* An array of seasonal effects. Requires an RRA of - * type CF_HWPREDICT for this data source. */ - CF_DEVPREDICT, - /* An array of deviation predictions based upon - * smoothed seasonal deviations. Requires an RRA of - * type CF_DEVSEASONAL for this data source. */ - CF_DEVSEASONAL, - /* An array of smoothed seasonal deviations. Requires - * an RRA of type CF_HWPREDICT for this data source. - * */ - CF_FAILURES}; - /* A binary array of failure indicators: 1 indicates - * that the number of violations in the prescribed - * window exceeded the prescribed threshold. */ +enum cf_en { CF_AVERAGE = 0, /* data consolidation functions */ + CF_MINIMUM, + CF_MAXIMUM, + CF_LAST, + CF_HWPREDICT, + /* An array of predictions using the seasonal + * Holt-Winters algorithm. Requires an RRA of type + * CF_SEASONAL for this data source. */ + CF_SEASONAL, + /* An array of seasonal effects. Requires an RRA of + * type CF_HWPREDICT for this data source. */ + CF_DEVPREDICT, + /* An array of deviation predictions based upon + * smoothed seasonal deviations. Requires an RRA of + * type CF_DEVSEASONAL for this data source. */ + CF_DEVSEASONAL, + /* An array of smoothed seasonal deviations. Requires + * an RRA of type CF_HWPREDICT for this data source. + * */ + CF_FAILURES +}; + + /* A binary array of failure indicators: 1 indicates + * that the number of violations in the prescribed + * window exceeded the prescribed threshold. */ #define MAX_RRA_PAR_EN 10 -enum rra_par_en { RRA_cdp_xff_val=0, /* what part of the consolidated - * datapoint must be known, to produce a - * valid entry in the rra */ - RRA_hw_alpha, - /* exponential smoothing parameter for the intercept in - * the Holt-Winters prediction algorithm. */ - RRA_hw_beta, - /* exponential smoothing parameter for the slope in - * the Holt-Winters prediction algorithm. */ - RRA_dependent_rra_idx, - /* For CF_HWPREDICT: index of the RRA with the seasonal - * effects of the Holt-Winters algorithm (of type - * CF_SEASONAL). - * For CF_DEVPREDICT: index of the RRA with the seasonal - * deviation predictions (of type CF_DEVSEASONAL). - * For CF_SEASONAL: index of the RRA with the Holt-Winters - * intercept and slope coefficient (of type CF_HWPREDICT). - * For CF_DEVSEASONAL: index of the RRA with the - * Holt-Winters prediction (of type CF_HWPREDICT). - * For CF_FAILURES: index of the CF_DEVSEASONAL array. - * */ - RRA_seasonal_smooth_idx, - /* For CF_SEASONAL and CF_DEVSEASONAL: - * an integer between 0 and row_count - 1 which - * is index in the seasonal cycle for applying - * the period smoother. */ - RRA_failure_threshold, - /* For CF_FAILURES, number of violations within the last - * window required to mark a failure. */ - RRA_seasonal_gamma = RRA_hw_alpha, - /* exponential smoothing parameter for seasonal effects. - * */ - RRA_delta_pos = RRA_hw_alpha, - RRA_delta_neg = RRA_hw_beta, - /* confidence bound scaling parameters for the - * the FAILURES RRA. */ - RRA_window_len = RRA_seasonal_smooth_idx}; - /* For CF_FAILURES, the length of the window for measuring - * failures. */ - +enum rra_par_en { RRA_cdp_xff_val = 0, /* what part of the consolidated + * datapoint must be known, to produce a + * valid entry in the rra */ + RRA_hw_alpha, + /* exponential smoothing parameter for the intercept in + * the Holt-Winters prediction algorithm. */ + RRA_hw_beta, + /* exponential smoothing parameter for the slope in + * the Holt-Winters prediction algorithm. */ + RRA_dependent_rra_idx, + /* For CF_HWPREDICT: index of the RRA with the seasonal + * effects of the Holt-Winters algorithm (of type + * CF_SEASONAL). + * For CF_DEVPREDICT: index of the RRA with the seasonal + * deviation predictions (of type CF_DEVSEASONAL). + * For CF_SEASONAL: index of the RRA with the Holt-Winters + * intercept and slope coefficient (of type CF_HWPREDICT). + * For CF_DEVSEASONAL: index of the RRA with the + * Holt-Winters prediction (of type CF_HWPREDICT). + * For CF_FAILURES: index of the CF_DEVSEASONAL array. + * */ + RRA_seasonal_smooth_idx, + /* For CF_SEASONAL and CF_DEVSEASONAL: + * an integer between 0 and row_count - 1 which + * is index in the seasonal cycle for applying + * the period smoother. */ + RRA_failure_threshold, + /* For CF_FAILURES, number of violations within the last + * window required to mark a failure. */ + RRA_seasonal_gamma = RRA_hw_alpha, + /* exponential smoothing parameter for seasonal effects. + * */ + RRA_delta_pos = RRA_hw_alpha, + RRA_delta_neg = RRA_hw_beta, + /* confidence bound scaling parameters for the + * the FAILURES RRA. */ + RRA_window_len = RRA_seasonal_smooth_idx +}; + + /* For CF_FAILURES, the length of the window for measuring + * failures. */ + #define CF_NAM_FMT "%19[A-Z]" #define CF_NAM_SIZE 20 typedef struct rra_def_t { - char cf_nam[CF_NAM_SIZE];/* consolidation function (null term) */ - unsigned long row_cnt; /* number of entries in the store */ - unsigned long pdp_cnt; /* how many primary data points are - * required for a consolidated data - * point?*/ - unival par[MAX_RRA_PAR_EN]; /* index see rra_param_en */ + char cf_nam[CF_NAM_SIZE]; /* consolidation function (null term) */ + unsigned long row_cnt; /* number of entries in the store */ + unsigned long pdp_cnt; /* how many primary data points are + * required for a consolidated data + * point?*/ + unival par[MAX_RRA_PAR_EN]; /* index see rra_param_en */ } rra_def_t; @@ -249,30 +255,31 @@ typedef struct rra_def_t { ****************************************************************************/ typedef struct live_head_t { - time_t last_up; /* when was rrd last updated */ - long last_up_usec; /* micro seconds part of the - update timestamp. Always >= 0 */ + time_t last_up; /* when was rrd last updated */ + long last_up_usec; /* micro seconds part of the + update timestamp. Always >= 0 */ } live_head_t; /**************************************************************************** * POS 5: pdp_prep_t (* ds_cnt) here we prepare the pdps ****************************************************************************/ -#define LAST_DS_LEN 30 /* DO NOT CHANGE THIS ... */ - -enum pdp_par_en { PDP_unkn_sec_cnt=0, /* how many seconds of the current - * pdp value is unknown data? */ - - PDP_val}; /* current value of the pdp. - this depends on dst */ - -typedef struct pdp_prep_t{ - char last_ds[LAST_DS_LEN]; /* the last reading from the data - * source. this is stored in ASCII - * to cater for very large counters - * we might encounter in connection - * with SNMP. */ - unival scratch[10]; /* contents according to pdp_par_en */ +#define LAST_DS_LEN 30 /* DO NOT CHANGE THIS ... */ + +enum pdp_par_en { PDP_unkn_sec_cnt = 0, /* how many seconds of the current + * pdp value is unknown data? */ + + PDP_val +}; /* current value of the pdp. + this depends on dst */ + +typedef struct pdp_prep_t { + char last_ds[LAST_DS_LEN]; /* the last reading from the data + * source. this is stored in ASCII + * to cater for very large counters + * we might encounter in connection + * with SNMP. */ + unival scratch[10]; /* contents according to pdp_par_en */ } pdp_prep_t; /* data is passed from pdp to cdp when seconds since epoch modulo pdp_step == 0 @@ -291,56 +298,58 @@ typedef struct pdp_prep_t{ * POS 6: cdp_prep_t (* rra_cnt * ds_cnt ) data prep area for cdp values ****************************************************************************/ #define MAX_CDP_PAR_EN 10 -#define MAX_CDP_FAILURES_IDX 8 +#define MAX_CDP_FAILURES_IDX 8 /* max CDP scratch entries avail to record violations for a FAILURES RRA */ #define MAX_FAILURES_WINDOW_LEN 28 -enum cdp_par_en { CDP_val=0, - /* the base_interval is always an - * average */ - CDP_unkn_pdp_cnt, - /* how many unknown pdp were - * integrated. This and the cdp_xff - * will decide if this is going to - * be a UNKNOWN or a valid value */ - CDP_hw_intercept, - /* Current intercept coefficient for the Holt-Winters - * prediction algorithm. */ - CDP_hw_last_intercept, - /* Last iteration intercept coefficient for the Holt-Winters - * prediction algorihtm. */ - CDP_hw_slope, - /* Current slope coefficient for the Holt-Winters - * prediction algorithm. */ - CDP_hw_last_slope, - /* Last iteration slope coeffient. */ - CDP_null_count, - /* Number of sequential Unknown (DNAN) values + 1 preceding - * the current prediction. - * */ - CDP_last_null_count, - /* Last iteration count of Unknown (DNAN) values. */ - CDP_primary_val = 8, - /* optimization for bulk updates: the value of the first CDP - * value to be written in the bulk update. */ - CDP_secondary_val = 9, - /* optimization for bulk updates: the value of subsequent - * CDP values to be written in the bulk update. */ - CDP_hw_seasonal = CDP_hw_intercept, - /* Current seasonal coefficient for the Holt-Winters - * prediction algorithm. This is stored in CDP prep to avoid - * redundant seek operations. */ - CDP_hw_last_seasonal = CDP_hw_last_intercept, - /* Last iteration seasonal coeffient. */ - CDP_seasonal_deviation = CDP_hw_intercept, - CDP_last_seasonal_deviation = CDP_hw_last_intercept, - CDP_init_seasonal = CDP_null_count}; +enum cdp_par_en { CDP_val = 0, + /* the base_interval is always an + * average */ + CDP_unkn_pdp_cnt, + /* how many unknown pdp were + * integrated. This and the cdp_xff + * will decide if this is going to + * be a UNKNOWN or a valid value */ + CDP_hw_intercept, + /* Current intercept coefficient for the Holt-Winters + * prediction algorithm. */ + CDP_hw_last_intercept, + /* Last iteration intercept coefficient for the Holt-Winters + * prediction algorihtm. */ + CDP_hw_slope, + /* Current slope coefficient for the Holt-Winters + * prediction algorithm. */ + CDP_hw_last_slope, + /* Last iteration slope coeffient. */ + CDP_null_count, + /* Number of sequential Unknown (DNAN) values + 1 preceding + * the current prediction. + * */ + CDP_last_null_count, + /* Last iteration count of Unknown (DNAN) values. */ + CDP_primary_val = 8, + /* optimization for bulk updates: the value of the first CDP + * value to be written in the bulk update. */ + CDP_secondary_val = 9, + /* optimization for bulk updates: the value of subsequent + * CDP values to be written in the bulk update. */ + CDP_hw_seasonal = CDP_hw_intercept, + /* Current seasonal coefficient for the Holt-Winters + * prediction algorithm. This is stored in CDP prep to avoid + * redundant seek operations. */ + CDP_hw_last_seasonal = CDP_hw_last_intercept, + /* Last iteration seasonal coeffient. */ + CDP_seasonal_deviation = CDP_hw_intercept, + CDP_last_seasonal_deviation = CDP_hw_last_intercept, + CDP_init_seasonal = CDP_null_count +}; + /* init_seasonal is a flag which when > 0, forces smoothing updates * to occur when rra_ptr.cur_row == 0 */ -typedef struct cdp_prep_t{ - unival scratch[MAX_CDP_PAR_EN]; - /* contents according to cdp_par_en * - * init state should be NAN */ +typedef struct cdp_prep_t { + unival scratch[MAX_CDP_PAR_EN]; + /* contents according to cdp_par_en * + * init state should be NAN */ } cdp_prep_t; @@ -349,7 +358,7 @@ typedef struct cdp_prep_t{ ****************************************************************************/ typedef struct rra_ptr_t { - unsigned long cur_row; /* current row in the rra*/ + unsigned long cur_row; /* current row in the rra */ } rra_ptr_t; @@ -359,14 +368,14 @@ typedef struct rra_ptr_t { **************************************************************************** ****************************************************************************/ typedef struct rrd_t { - stat_head_t *stat_head; /* the static header */ - ds_def_t *ds_def; /* list of data source definitions */ - rra_def_t *rra_def; /* list of round robin archive def */ - live_head_t *live_head; - pdp_prep_t *pdp_prep; /* pdp data prep area */ - cdp_prep_t *cdp_prep; /* cdp prep area */ - rra_ptr_t *rra_ptr; /* list of rra pointers */ - rrd_value_t *rrd_value; /* list of rrd values */ + stat_head_t *stat_head; /* the static header */ + ds_def_t *ds_def; /* list of data source definitions */ + rra_def_t *rra_def; /* list of round robin archive def */ + live_head_t *live_head; + pdp_prep_t *pdp_prep; /* pdp data prep area */ + cdp_prep_t *cdp_prep; /* cdp prep area */ + rra_ptr_t *rra_ptr; /* list of rra pointers */ + rrd_value_t *rrd_value; /* list of rrd values */ } rrd_t; /**************************************************************************** @@ -392,7 +401,3 @@ typedef struct rrd_t { #endif - - - - diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index b715ab0..706a67a 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -70,7 +70,7 @@ contain conflicting prototypes for getopt. */ #include #include -#endif /* GNU C library. */ +#endif /* GNU C library. */ #ifdef VMS #include @@ -118,7 +118,7 @@ Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -char *optarg = NULL; +char *optarg = NULL; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -133,13 +133,13 @@ char *optarg = NULL; how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ -int optind = 1; +int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ -int __getopt_initialized = 0; +int __getopt_initialized = 0; /* The next char to be scanned in the option-element in which the last option character we returned was found. @@ -153,13 +153,13 @@ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ -int opterr = 1; +int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ -int optopt = '?'; +int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. @@ -190,9 +190,8 @@ int optopt = '?'; of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ -static enum -{ - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +static enum { + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ @@ -212,20 +211,21 @@ static char *posixly_correct; /* Avoid depending on library functions or files whose names are inconsistent. */ -char *getenv (); +char *getenv( + ); -static char * -my_index (str, chr) - const char *str; - int chr; +static char *my_index( + str, + chr) + const char *str; + int chr; { - while (*str) - { - if (*str == chr) - return (char *) str; - str++; + while (*str) { + if (*str == chr) + return (char *) str; + str++; } - return 0; + return 0; } /* If using GCC, we can safely declare strlen this way. @@ -236,11 +236,12 @@ my_index (str, chr) #if !defined (__STDC__) || !__STDC__ /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ -extern int strlen (const char *); -#endif /* not __STDC__ */ -#endif /* __GNUC__ */ +extern int strlen( + const char *); +#endif /* not __STDC__ */ +#endif /* __GNUC__ */ -#endif /* not __GNU_LIBRARY__ */ +#endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ @@ -264,16 +265,20 @@ static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ -static void store_args (int argc, char *const *argv) __attribute__ ((unused)); -static void -store_args (int argc, char *const *argv) +static void store_args( + int argc, + char *const *argv) __attribute__ ((unused)); +static void store_args( + int argc, + char *const *argv) { - /* XXX This is no good solution. We should rather copy the args so - that we can compare them later. But we must not use malloc(3). */ - original_argc = argc; - original_argv = argv; + /* XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ + original_argc = argc; + original_argv = argv; } -text_set_element (__libc_subinit, store_args); + +text_set_element(__libc_subinit, store_args); #endif /* Exchange two adjacent subsequences of ARGV. @@ -286,124 +291,119 @@ text_set_element (__libc_subinit, store_args); the new indices of the non-options in ARGV after they are moved. */ #if defined (__STDC__) && __STDC__ -static void exchange (char **); +static void exchange( + char **); #endif -static void -exchange (argv) - char **argv; +static void exchange( + argv) + char **argv; { - int bottom = first_nonopt; - int middle = last_nonopt; - int top = optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + + while (top > middle && middle > bottom) { + if (top - middle > middle - bottom) { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } else { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } } - /* Update records for the slots the non-options now occupy. */ + /* Update records for the slots the non-options now occupy. */ - first_nonopt += (optind - last_nonopt); - last_nonopt = optind; + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined (__STDC__) && __STDC__ -static const char *_getopt_initialize (int, char *const *, const char *); +static const char *_getopt_initialize( + int, + char *const *, + const char *); #endif -static const char * -_getopt_initialize (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +static const char *_getopt_initialize( + argc, + argv, + optstring) + int argc; + char *const *argv; + const char *optstring; { - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ - first_nonopt = last_nonopt = optind = 1; + first_nonopt = last_nonopt = optind = 1; - nextchar = NULL; + nextchar = NULL; - posixly_correct = getenv ("POSIXLY_CORRECT"); + posixly_correct = getenv("POSIXLY_CORRECT"); - /* Determine how to handle the ordering of options and nonoptions. */ + /* Determine how to handle the ordering of options and nonoptions. */ - if (optstring[0] == '-') - { - ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - ordering = REQUIRE_ORDER; - ++optstring; - } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; - else - ordering = PERMUTE; + if (optstring[0] == '-') { + ordering = RETURN_IN_ORDER; + ++optstring; + } else if (optstring[0] == '+') { + ordering = REQUIRE_ORDER; + ++optstring; + } else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; #ifdef _LIBC - if (posixly_correct == NULL - && argc == original_argc && argv == original_argv) - { - /* Bash 2.0 puts a special variable in the environment for each - command it runs, specifying which ARGV elements are the results of - file name wildcard expansion and therefore should not be - considered as options. */ - char var[100]; - sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ()); - nonoption_flags = getenv (var); - if (nonoption_flags == NULL) - nonoption_flags_len = 0; - else - nonoption_flags_len = strlen (nonoption_flags); - } - else - nonoption_flags_len = 0; + if (posixly_correct == NULL + && argc == original_argc && argv == original_argv) { + /* Bash 2.0 puts a special variable in the environment for each + command it runs, specifying which ARGV elements are the results of + file name wildcard expansion and therefore should not be + considered as options. */ + char var[100]; + + sprintf(var, "_%d_GNU_nonoption_argv_flags_", getpid()); + nonoption_flags = getenv(var); + if (nonoption_flags == NULL) + nonoption_flags_len = 0; + else + nonoption_flags_len = strlen(nonoption_flags); + } else + nonoption_flags_len = 0; #endif - return optstring; + return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters @@ -462,28 +462,32 @@ _getopt_initialize (argc, argv, optstring) If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ -int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; +int _getopt_internal( + argc, + argv, + optstring, + longopts, + longind, + long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; { - optarg = NULL; + optarg = NULL; - if (!__getopt_initialized || optind == 0) - { - optstring = _getopt_initialize (argc, argv, optstring); - optind = 1; /* Don't scan ARGV[0], the program name. */ - __getopt_initialized = 1; + if (!__getopt_initialized || optind == 0) { + optstring = _getopt_initialize(argc, argv, optstring); + optind = 1; /* Don't scan ARGV[0], the program name. */ + __getopt_initialized = 1; } - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. The later information - is only used when the used in the GNU libc. */ + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ #ifdef _LIBC #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ @@ -492,511 +496,464 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif - if (nextchar == NULL || *nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ - if (last_nonopt > optind) - last_nonopt = optind; - if (first_nonopt > optind) - first_nonopt = optind; - - if (ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (last_nonopt != optind) - first_nonopt = optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (optind < argc && NONOPTION_P) - optind++; - last_nonopt = optind; - } - - /* The special ARGV-element `--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (optind != argc && !strcmp (argv[optind], "--")) - { - optind++; - - if (first_nonopt != last_nonopt && last_nonopt != optind) - exchange ((char **) argv); - else if (first_nonopt == last_nonopt) - first_nonopt = optind; - last_nonopt = argc; - - optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (first_nonopt != last_nonopt) - optind = first_nonopt; - return -1; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) - { - if (ordering == REQUIRE_ORDER) - return -1; - optarg = argv[optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - nextchar = (argv[optind] + 1 - + (longopts != NULL && argv[optind][1] == '-')); + if (nextchar == NULL || *nextchar == '\0') { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp(argv[optind], "--")) { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); } - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' || (long_only && (argv[optind][2] + || !my_index(optstring, + argv[optind] + [1]))))) { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp(p->name, nextchar, nameend - nextchar)) { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen(p->name)) { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } else if (pfound == NULL) { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } else + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) { + if (opterr) + fprintf(stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen(nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) { + option_index = indfound; + optind++; + if (*nameend) { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else { + if (opterr) { + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf(stderr, + _ + ("%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); + else + /* +option or -option */ + fprintf(stderr, + _ + ("%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); + } + nextchar += strlen(nextchar); + + optopt = pfound->val; + return '?'; + } + } else if (pfound->has_arg == 1) { + if (optind < argc) + optarg = argv[optind++]; + else { + if (opterr) + fprintf(stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen(nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen(nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index(optstring, *nextchar) == NULL) { + if (opterr) { + if (argv[optind][1] == '-') + /* --option */ + fprintf(stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); + else + /* +option or -option */ + fprintf(stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } - This distinction seems to be the most useful approach. */ + /* Look at and handle the next short option-character. */ - if (longopts != NULL - && (argv[optind][1] == '-' - || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = -1; - int option_index; - - for (nameend = nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) - { - if ((unsigned int) (nameend - nextchar) - == (unsigned int) strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else - /* Second or later nonexact match found. */ - ambig = 1; - } - - if (ambig && !exact) - { - if (opterr) - fprintf (stderr, _("%s: option `%s' is ambiguous\n"), - argv[0], argv[optind]); - nextchar += strlen (nextchar); - optind++; - optopt = 0; - return '?'; - } - - if (pfound != NULL) - { - option_index = indfound; - optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - optarg = nameend + 1; - else - { - if (opterr) { - if (argv[optind - 1][1] == '-') - /* --option */ - fprintf (stderr, - _("%s: option `--%s' doesn't allow an argument\n"), - argv[0], pfound->name); - else - /* +option or -option */ - fprintf (stderr, - _("%s: option `%c%s' doesn't allow an argument\n"), - argv[0], argv[optind - 1][0], pfound->name); - } - nextchar += strlen (nextchar); - - optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (optind < argc) - optarg = argv[optind++]; - else - { - if (opterr) - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); - nextchar += strlen (nextchar); - optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - nextchar += strlen (nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[optind][1] == '-' - || my_index (optstring, *nextchar) == NULL) - { - if (opterr) - { - if (argv[optind][1] == '-') - /* --option */ - fprintf (stderr, _("%s: unrecognized option `--%s'\n"), - argv[0], nextchar); - else - /* +option or -option */ - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), - argv[0], argv[optind][0], nextchar); - } - nextchar = (char *) ""; - optind++; - optopt = 0; - return '?'; - } + char c = *nextchar++; + char *temp = my_index(optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') { + if (opterr) { + if (posixly_correct) + /* 1003.2 specifies the format of this message. */ + fprintf(stderr, _("%s: illegal option -- %c\n"), + argv[0], c); + else + fprintf(stderr, _("%s: invalid option -- %c\n"), + argv[0], c); + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } else if (optind == argc) { + if (opterr) { + /* 1003.2 specifies the format of this message. */ + fprintf(stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; + nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp(p->name, nextchar, nameend - nextchar)) { + if ((unsigned int) (nameend - nextchar) == + strlen(p->name)) { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } else if (pfound == NULL) { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) { + if (opterr) + fprintf(stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen(nextchar); + optind++; + return '?'; + } + if (pfound != NULL) { + option_index = indfound; + if (*nameend) { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else { + if (opterr) + fprintf(stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); + + nextchar += strlen(nextchar); + return '?'; + } + } else if (pfound->has_arg == 1) { + if (optind < argc) + optarg = argv[optind++]; + else { + if (opterr) + fprintf(stderr, + _ + ("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen(nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen(nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') { + if (temp[2] == ':') { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') { + optarg = nextchar; + optind++; + } else + optarg = NULL; + nextchar = NULL; + } else { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } else if (optind == argc) { + if (opterr) { + /* 1003.2 specifies the format of this message. */ + fprintf(stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; } - - /* Look at and handle the next short option-character. */ - - { - char c = *nextchar++; - char *temp = my_index (optstring, c); - - /* Increment `optind' when we start to process its last character. */ - if (*nextchar == '\0') - ++optind; - - if (temp == NULL || c == ':') - { - if (opterr) - { - if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: illegal option -- %c\n"), - argv[0], c); - else - fprintf (stderr, _("%s: invalid option -- %c\n"), - argv[0], c); - } - optopt = c; - return '?'; - } - /* Convenience. Treat POSIX -W foo same as long option --foo */ - if (temp[0] == 'W' && temp[1] == ';') - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = 0; - int option_index; - - /* This is an option that requires an argument. */ - if (*nextchar != '\0') - { - optarg = nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - optind++; - } - else if (optind == argc) - { - if (opterr) - { - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: option requires an argument -- %c\n"), - argv[0], c); - } - optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - return c; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - - /* optarg is now the argument, see if it's in the - table of longopts. */ - - for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, nextchar, nameend - nextchar)) - { - if ((unsigned int) (nameend - nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else - /* Second or later nonexact match found. */ - ambig = 1; - } - if (ambig && !exact) - { - if (opterr) - fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), - argv[0], argv[optind]); - nextchar += strlen (nextchar); - optind++; - return '?'; - } - if (pfound != NULL) - { - option_index = indfound; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - optarg = nameend + 1; - else - { - if (opterr) - fprintf (stderr, _("\ -%s: option `-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); - - nextchar += strlen (nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (optind < argc) - optarg = argv[optind++]; - else - { - if (opterr) - fprintf (stderr, - _("%s: option `%s' requires an argument\n"), - argv[0], argv[optind - 1]); - nextchar += strlen (nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - nextchar += strlen (nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - nextchar = NULL; - return 'W'; /* Let the application handle it. */ - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*nextchar != '\0') - { - optarg = nextchar; - optind++; - } - else - optarg = NULL; - nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*nextchar != '\0') - { - optarg = nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - optind++; - } - else if (optind == argc) - { - if (opterr) - { - /* 1003.2 specifies the format of this message. */ - fprintf (stderr, - _("%s: option requires an argument -- %c\n"), - argv[0], c); - } - optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented `optind' once; - increment it again when taking next ARGV-elt as argument. */ - optarg = argv[optind++]; - nextchar = NULL; - } - } - return c; - } } -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +int getopt( + argc, + argv, + optstring) + int argc; + char *const *argv; + const char *optstring; { - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0); + return _getopt_internal(argc, argv, optstring, + (const struct option *) 0, (int *) 0, 0); } -#endif /* Not ELIDE_CODE. */ +#endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ -int -main (argc, argv) - int argc; - char **argv; +int main( + argc, + argv) + int argc; + char **argv; { - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == -1) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } + int c; + int digit_optind = 0; + + while (1) { + int this_option_optind = optind ? optind : 1; + + c = getopt(argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf("option %c\n", c); + break; + + case 'a': + printf("option a\n"); + break; + + case 'b': + printf("option b\n"); + break; + + case 'c': + printf("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf("?? getopt returned character code 0%o ??\n", c); + } } - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); + if (optind < argc) { + printf("non-option ARGV-elements: "); + while (optind < argc) + printf("%s ", argv[optind++]); + printf("\n"); } - exit (0); + exit(0); } -#endif /* TEST */ +#endif /* TEST */ diff --git a/src/rrd_getopt.h b/src/rrd_getopt.h index 7dad11b..91906ef 100644 --- a/src/rrd_getopt.h +++ b/src/rrd_getopt.h @@ -23,7 +23,7 @@ #define _GETOPT_H 1 #ifdef __cplusplus -extern "C" { +extern "C" { #endif /* For communication from `getopt' to the caller. @@ -32,7 +32,7 @@ extern "C" { Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -extern char *optarg; + extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -46,16 +46,16 @@ extern char *optarg; Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ -extern int optind; + extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ -extern int opterr; + extern int opterr; /* Set to an option character which was unrecognized. */ -extern int optopt; + extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector @@ -78,19 +78,18 @@ extern int optopt; one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ -struct option -{ + struct option { #if defined (__STDC__) && __STDC__ - const char *name; + const char *name; #else - char *name; + char *name; #endif - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; + }; /* Names for the values of the `has_arg' field of `struct option'. */ @@ -103,31 +102,48 @@ struct option /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int getopt (int argc, char *const *argv, const char *shortopts); -#else /* not __GNU_LIBRARY__ */ -extern int getopt (); -#endif /* __GNU_LIBRARY__ */ -extern int getopt_long (int argc, char *const *argv, const char *shortopts, - const struct option *longopts, int *longind); -extern int getopt_long_only (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind); + extern int getopt( + int argc, + char *const *argv, + const char *shortopts); +#else /* not __GNU_LIBRARY__ */ + extern int getopt( + ); +#endif /* __GNU_LIBRARY__ */ + extern int getopt_long( + int argc, + char *const *argv, + const char *shortopts, + const struct option *longopts, + int *longind); + extern int getopt_long_only( + int argc, + char *const *argv, + const char *shortopts, + const struct option *longopts, + int *longind); /* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int argc, char *const *argv, - const char *shortopts, - const struct option *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ -extern int getopt (); -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -#endif /* __STDC__ */ + extern int _getopt_internal( + int argc, + char *const *argv, + const char *shortopts, + const struct option *longopts, + int *longind, + int long_only); +#else /* not __STDC__ */ + extern int getopt( + ); + extern int getopt_long( + ); + extern int getopt_long_only( + ); + + extern int _getopt_internal( + ); +#endif /* __STDC__ */ #ifdef __cplusplus } #endif - -#endif /* _GETOPT_H */ +#endif /* _GETOPT_H */ diff --git a/src/rrd_getopt1.c b/src/rrd_getopt1.c index 14e1e88..6ace794 100644 --- a/src/rrd_getopt1.c +++ b/src/rrd_getopt1.c @@ -64,15 +64,19 @@ #define NULL 0 #endif -int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +int getopt_long( + argc, + argv, + options, + long_options, + opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; { - return _getopt_internal (argc, argv, options, long_options, opt_index, 0); + return _getopt_internal(argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. @@ -80,110 +84,111 @@ getopt_long (argc, argv, options, long_options, opt_index) but does match a short option, it is parsed as a short option instead. */ -int -getopt_long_only (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +int getopt_long_only( + argc, + argv, + options, + long_options, + opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; { - return _getopt_internal (argc, argv, options, long_options, opt_index, 1); + return _getopt_internal(argc, argv, options, long_options, opt_index, 1); } -#endif /* Not ELIDE_CODE. */ +#endif /* Not ELIDE_CODE. */ #ifdef TEST #include -int -main (argc, argv) - int argc; - char **argv; +int main( + argc, + argv) + int argc; + char **argv; { - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static struct option long_options[] = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value `%s'\n", optarg); - break; - - case 'd': - printf ("option d with value `%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } + int c; + int digit_optind = 0; + + while (1) { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long(argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 0: + printf("option %s", long_options[option_index].name); + if (optarg) + printf(" with arg %s", optarg); + printf("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf("option %c\n", c); + break; + + case 'a': + printf("option a\n"); + break; + + case 'b': + printf("option b\n"); + break; + + case 'c': + printf("option c with value `%s'\n", optarg); + break; + + case 'd': + printf("option d with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf("?? getopt returned character code 0%o ??\n", c); + } } - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); + if (optind < argc) { + printf("non-option ARGV-elements: "); + while (optind < argc) + printf("%s ", argv[optind++]); + printf("\n"); } - exit (0); + exit(0); } -#endif /* TEST */ +#endif /* TEST */ diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index 2cdf20c..872c02c 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -9,13 +9,13 @@ /* stupid MSVC doesnt support variadic macros = no debug for now! */ #ifdef _MSC_VER # define RRDPRINTF() -#else +#else # ifdef DEBUG # define RRDPRINTF(...) fprintf(stderr, __VA_ARGS__); # else # define RRDPRINTF(...) -# endif /* DEBUG */ -#endif /* _MSC_VER */ +# endif /* DEBUG */ +#endif /* _MSC_VER */ #include "rrd_tool.h" #include #include @@ -34,64 +34,79 @@ typedef struct gfx_char_s *gfx_char; struct gfx_char_s { - FT_UInt index; /* glyph index */ - FT_Vector pos; /* location from baseline in 26.6 */ - FT_Glyph image; /* glyph bitmap */ + FT_UInt index; /* glyph index */ + FT_Vector pos; /* location from baseline in 26.6 */ + FT_Glyph image; /* glyph bitmap */ }; typedef struct gfx_string_s *gfx_string; struct gfx_string_s { - unsigned int width; - unsigned int height; - int count; /* number of characters */ - gfx_char glyphs; - size_t num_glyphs; - FT_BBox bbox; - FT_Matrix transform; + unsigned int width; + unsigned int height; + int count; /* number of characters */ + gfx_char glyphs; + size_t num_glyphs; + FT_BBox bbox; + FT_Matrix transform; }; /* compute string bbox */ -static void compute_string_bbox(gfx_string string); +static void compute_string_bbox( + gfx_string string); /* create a freetype glyph string */ -gfx_string gfx_string_create ( gfx_canvas_t *canvas, FT_Face face, - const char *text, int rotation, double tabwidth, double size); +gfx_string gfx_string_create( + gfx_canvas_t * canvas, + FT_Face face, + const char *text, + int rotation, + double tabwidth, + double size); /* create a freetype glyph string */ -static void gfx_string_destroy ( gfx_string string ); +static void gfx_string_destroy( + gfx_string string); static -gfx_node_t *gfx_new_node( gfx_canvas_t *canvas,enum gfx_en type){ - gfx_node_t *node = art_new(gfx_node_t,1); - if (node == NULL) return NULL; - node->type = type; - node->color = 0x0; /* color of element 0xRRGGBBAA alpha 0xff is solid*/ - node->size =0.0; /* font size, line width */ - node->path = NULL; /* path */ - node->points = 0; - node->points_max =0; - node->closed_path = 0; - node->filename = NULL; /* font or image filename */ - node->text = NULL; - node->x = 0.0; - node->y = 0.0; /* position */ - node->angle = 0; - node->halign = GFX_H_NULL; /* text alignement */ - node->valign = GFX_V_NULL; /* text alignement */ - node->tabwidth = 0.0; - node->next = NULL; - if (canvas->lastnode != NULL){ - canvas->lastnode->next = node; - } - if (canvas->firstnode == NULL){ - canvas->firstnode = node; - } - canvas->lastnode = node; - return node; -} - -gfx_canvas_t *gfx_new_canvas (void) { - gfx_canvas_t *canvas = art_new(gfx_canvas_t,1); +gfx_node_t *gfx_new_node( + gfx_canvas_t * canvas, + enum gfx_en type) +{ + gfx_node_t *node = art_new(gfx_node_t, 1); + + if (node == NULL) + return NULL; + node->type = type; + node->color = 0x0; /* color of element 0xRRGGBBAA alpha 0xff is solid */ + node->size = 0.0; /* font size, line width */ + node->path = NULL; /* path */ + node->points = 0; + node->points_max = 0; + node->closed_path = 0; + node->filename = NULL; /* font or image filename */ + node->text = NULL; + node->x = 0.0; + node->y = 0.0; /* position */ + node->angle = 0; + node->halign = GFX_H_NULL; /* text alignement */ + node->valign = GFX_V_NULL; /* text alignement */ + node->tabwidth = 0.0; + node->next = NULL; + if (canvas->lastnode != NULL) { + canvas->lastnode->next = node; + } + if (canvas->firstnode == NULL) { + canvas->firstnode = node; + } + canvas->lastnode = node; + return node; +} + +gfx_canvas_t *gfx_new_canvas( + void) +{ + gfx_canvas_t *canvas = art_new(gfx_canvas_t, 1); + canvas->firstnode = NULL; canvas->lastnode = NULL; canvas->imgformat = IF_PNG; /* we default to PNG output */ @@ -103,581 +118,697 @@ gfx_canvas_t *gfx_new_canvas (void) { } /* create a new line */ -gfx_node_t *gfx_new_line(gfx_canvas_t *canvas, - double X0, double Y0, - double X1, double Y1, - double width, gfx_color_t color){ - return gfx_new_dashed_line(canvas, X0, Y0, X1, Y1, width, color, 0, 0); -} - -gfx_node_t *gfx_new_dashed_line(gfx_canvas_t *canvas, - double X0, double Y0, - double X1, double Y1, - double width, gfx_color_t color, - double dash_on, double dash_off){ - - gfx_node_t *node; - ArtVpath *vec; - node = gfx_new_node(canvas,GFX_LINE); - if (node == NULL) return NULL; - vec = art_new(ArtVpath, 3); - if (vec == NULL) return NULL; - vec[0].code = ART_MOVETO_OPEN; vec[0].x=X0+LINEOFFSET; vec[0].y=Y0+LINEOFFSET; - vec[1].code = ART_LINETO; vec[1].x=X1+LINEOFFSET; vec[1].y=Y1+LINEOFFSET; - vec[2].code = ART_END; vec[2].x=0;vec[2].y=0; - - node->points = 3; - node->points_max = 3; - node->color = color; - node->size = width; - node->dash_on = dash_on; - node->dash_off = dash_off; - node->path = vec; - return node; +gfx_node_t *gfx_new_line( + gfx_canvas_t * canvas, + double X0, + double Y0, + double X1, + double Y1, + double width, + gfx_color_t color) +{ + return gfx_new_dashed_line(canvas, X0, Y0, X1, Y1, width, color, 0, 0); +} + +gfx_node_t *gfx_new_dashed_line( + gfx_canvas_t * canvas, + double X0, + double Y0, + double X1, + double Y1, + double width, + gfx_color_t color, + double dash_on, + double dash_off) +{ + + gfx_node_t *node; + ArtVpath *vec; + + node = gfx_new_node(canvas, GFX_LINE); + if (node == NULL) + return NULL; + vec = art_new(ArtVpath, 3); + if (vec == NULL) + return NULL; + vec[0].code = ART_MOVETO_OPEN; + vec[0].x = X0 + LINEOFFSET; + vec[0].y = Y0 + LINEOFFSET; + vec[1].code = ART_LINETO; + vec[1].x = X1 + LINEOFFSET; + vec[1].y = Y1 + LINEOFFSET; + vec[2].code = ART_END; + vec[2].x = 0; + vec[2].y = 0; + + node->points = 3; + node->points_max = 3; + node->color = color; + node->size = width; + node->dash_on = dash_on; + node->dash_off = dash_off; + node->path = vec; + return node; } /* create a new area */ -gfx_node_t *gfx_new_area (gfx_canvas_t *canvas, - double X0, double Y0, - double X1, double Y1, - double X2, double Y2, - gfx_color_t color) { - - gfx_node_t *node; - ArtVpath *vec; - node = gfx_new_node(canvas,GFX_AREA); - if (node == NULL) return NULL; - vec = art_new(ArtVpath, 5); - if (vec == NULL) return NULL; - vec[0].code = ART_MOVETO; vec[0].x=X0; vec[0].y=Y0; - vec[1].code = ART_LINETO; vec[1].x=X1; vec[1].y=Y1; - vec[2].code = ART_LINETO; vec[2].x=X2; vec[2].y=Y2; - vec[3].code = ART_LINETO; vec[3].x=X0; vec[3].y=Y0; - vec[4].code = ART_END; vec[4].x=0; vec[4].y=0; - - node->points = 5; - node->points_max = 5; - node->color = color; - node->path = vec; - - return node; +gfx_node_t *gfx_new_area( + gfx_canvas_t * canvas, + double X0, + double Y0, + double X1, + double Y1, + double X2, + double Y2, + gfx_color_t color) +{ + + gfx_node_t *node; + ArtVpath *vec; + + node = gfx_new_node(canvas, GFX_AREA); + if (node == NULL) + return NULL; + vec = art_new(ArtVpath, 5); + if (vec == NULL) + return NULL; + vec[0].code = ART_MOVETO; + vec[0].x = X0; + vec[0].y = Y0; + vec[1].code = ART_LINETO; + vec[1].x = X1; + vec[1].y = Y1; + vec[2].code = ART_LINETO; + vec[2].x = X2; + vec[2].y = Y2; + vec[3].code = ART_LINETO; + vec[3].x = X0; + vec[3].y = Y0; + vec[4].code = ART_END; + vec[4].x = 0; + vec[4].y = 0; + + node->points = 5; + node->points_max = 5; + node->color = color; + node->path = vec; + + return node; } /* add a point to a line or to an area */ -int gfx_add_point (gfx_node_t *node, - double x, double y){ - if (node == NULL) return 1; - if (node->type == GFX_AREA) { - double X0 = node->path[0].x; - double Y0 = node->path[0].y; - node->points -= 2; - art_vpath_add_point (&(node->path), - &(node->points), - &(node->points_max), - ART_LINETO, - x,y); - art_vpath_add_point (&(node->path), - &(node->points), - &(node->points_max), - ART_LINETO, - X0,Y0); - art_vpath_add_point (&(node->path), - &(node->points), - &(node->points_max), - ART_END, - 0,0); - } else if (node->type == GFX_LINE) { - node->points -= 1; - art_vpath_add_point (&(node->path), - &(node->points), - &(node->points_max), - ART_LINETO, - x+LINEOFFSET,y+LINEOFFSET); - art_vpath_add_point (&(node->path), - &(node->points), - &(node->points_max), - ART_END, - 0,0); - - } else { - /* can only add point to areas and lines */ - return 1; - } - return 0; +int gfx_add_point( + gfx_node_t * node, + double x, + double y) +{ + if (node == NULL) + return 1; + if (node->type == GFX_AREA) { + double X0 = node->path[0].x; + double Y0 = node->path[0].y; + + node->points -= 2; + art_vpath_add_point(&(node->path), + &(node->points), + &(node->points_max), ART_LINETO, x, y); + art_vpath_add_point(&(node->path), + &(node->points), + &(node->points_max), ART_LINETO, X0, Y0); + art_vpath_add_point(&(node->path), + &(node->points), + &(node->points_max), ART_END, 0, 0); + } else if (node->type == GFX_LINE) { + node->points -= 1; + art_vpath_add_point(&(node->path), + &(node->points), + &(node->points_max), + ART_LINETO, x + LINEOFFSET, y + LINEOFFSET); + art_vpath_add_point(&(node->path), + &(node->points), + &(node->points_max), ART_END, 0, 0); + + } else { + /* can only add point to areas and lines */ + return 1; + } + return 0; } -void gfx_close_path (gfx_node_t *node) { +void gfx_close_path( + gfx_node_t * node) +{ node->closed_path = 1; if (node->path[0].code == ART_MOVETO_OPEN) - node->path[0].code = ART_MOVETO; + node->path[0].code = ART_MOVETO; } /* create a text node */ -gfx_node_t *gfx_new_text (gfx_canvas_t *canvas, - double x, double y, gfx_color_t color, - char* font, double size, - double tabwidth, double angle, - enum gfx_h_align_en h_align, - enum gfx_v_align_en v_align, - char* text){ - gfx_node_t *node = gfx_new_node(canvas,GFX_TEXT); - - node->text = strdup(text); - node->size = size; - node->filename = strdup(font); - node->x = x; - node->y = y; - node->angle = angle; - node->color = color; - node->tabwidth = tabwidth; - node->halign = h_align; - node->valign = v_align; +gfx_node_t *gfx_new_text( + gfx_canvas_t * canvas, + double x, + double y, + gfx_color_t color, + char *font, + double size, + double tabwidth, + double angle, + enum gfx_h_align_en h_align, + enum gfx_v_align_en v_align, + char *text) +{ + gfx_node_t *node = gfx_new_node(canvas, GFX_TEXT); + + node->text = strdup(text); + node->size = size; + node->filename = strdup(font); + node->x = x; + node->y = y; + node->angle = angle; + node->color = color; + node->tabwidth = tabwidth; + node->halign = h_align; + node->valign = v_align; #if 0 - /* debugging: show text anchor - green is along x-axis, red is downward y-axis */ - if (1) { - double a = 2 * M_PI * -node->angle / 360.0; - double cos_a = cos(a); - double sin_a = sin(a); - double len = 3; - gfx_new_line(canvas, - x, y, - x + len * cos_a, y - len * sin_a, - 0.2, 0x00FF0000); - gfx_new_line(canvas, - x, y, - x + len * sin_a, y + len * cos_a, - 0.2, 0xFF000000); - } + /* debugging: show text anchor + green is along x-axis, red is downward y-axis */ + if (1) { + double a = 2 * M_PI * -node->angle / 360.0; + double cos_a = cos(a); + double sin_a = sin(a); + double len = 3; + + gfx_new_line(canvas, + x, y, x + len * cos_a, y - len * sin_a, 0.2, 0x00FF0000); + gfx_new_line(canvas, + x, y, x + len * sin_a, y + len * cos_a, 0.2, 0xFF000000); + } #endif - return node; -} - -int gfx_render(gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fp){ - switch (canvas->imgformat) { - case IF_PNG: - return gfx_render_png (canvas, width, height, background, fp); - case IF_SVG: - return gfx_render_svg (canvas, width, height, background, fp); - case IF_EPS: - return gfx_render_eps (canvas, width, height, background, fp); - case IF_PDF: - return gfx_render_pdf (canvas, width, height, background, fp); - default: - return -1; - } -} - -static void gfx_string_destroy ( gfx_string string ) { - unsigned int n; - if (string->glyphs) { - for (n=0; nnum_glyphs; ++n) - FT_Done_Glyph (string->glyphs[n].image); - free (string->glyphs); - } - free (string); -} - - -double gfx_get_text_width ( gfx_canvas_t *canvas, - double start, char* font, double size, - double tabwidth, char* text, int rotation){ - switch (canvas->imgformat) { - case IF_PNG: - return gfx_get_text_width_libart (canvas, start, font, size, tabwidth, text, rotation); - case IF_SVG: /* fall through */ - case IF_EPS: - case IF_PDF: - return afm_get_text_width(start, font, size, tabwidth, text); - default: - return size * strlen(text); - } -} - -double gfx_get_text_width_libart ( - gfx_canvas_t *canvas, double UNUSED(start), char* font, double size, - double tabwidth, char* text, int rotation ){ - - int error; - double text_width=0; - FT_Face face; - FT_Library library=NULL; - gfx_string string; - - FT_Init_FreeType( &library ); - error = FT_New_Face( library, font, 0, &face ); - if ( error ) { - FT_Done_FreeType(library); - return -1; - } - error = FT_Set_Char_Size(face, size*64,size*64, 100,100); - if ( error ) { + return node; +} + +int gfx_render( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fp) +{ + switch (canvas->imgformat) { + case IF_PNG: + return gfx_render_png(canvas, width, height, background, fp); + case IF_SVG: + return gfx_render_svg(canvas, width, height, background, fp); + case IF_EPS: + return gfx_render_eps(canvas, width, height, background, fp); + case IF_PDF: + return gfx_render_pdf(canvas, width, height, background, fp); + default: + return -1; + } +} + +static void gfx_string_destroy( + gfx_string string) +{ + unsigned int n; + + if (string->glyphs) { + for (n = 0; n < string->num_glyphs; ++n) + FT_Done_Glyph(string->glyphs[n].image); + free(string->glyphs); + } + free(string); +} + + +double gfx_get_text_width( + gfx_canvas_t * canvas, + double start, + char *font, + double size, + double tabwidth, + char *text, + int rotation) +{ + switch (canvas->imgformat) { + case IF_PNG: + return gfx_get_text_width_libart(canvas, start, font, size, tabwidth, + text, rotation); + case IF_SVG: /* fall through */ + case IF_EPS: + case IF_PDF: + return afm_get_text_width(start, font, size, tabwidth, text); + default: + return size * strlen(text); + } +} + +double gfx_get_text_width_libart( + gfx_canvas_t * canvas, + double UNUSED(start), + char *font, + double size, + double tabwidth, + char *text, + int rotation) +{ + + int error; + double text_width = 0; + FT_Face face; + FT_Library library = NULL; + gfx_string string; + + FT_Init_FreeType(&library); + error = FT_New_Face(library, font, 0, &face); + if (error) { + FT_Done_FreeType(library); + return -1; + } + error = FT_Set_Char_Size(face, size * 64, size * 64, 100, 100); + if (error) { + FT_Done_FreeType(library); + return -1; + } + string = gfx_string_create(canvas, face, text, rotation, tabwidth, size); + text_width = string->width; + gfx_string_destroy(string); FT_Done_FreeType(library); - return -1; - } - string = gfx_string_create( canvas, face, text, rotation, tabwidth, size ); - text_width = string->width; - gfx_string_destroy(string); - FT_Done_FreeType(library); - return text_width/64; + return text_width / 64; } -static void gfx_libart_close_path(gfx_node_t *node, ArtVpath **vec) +static void gfx_libart_close_path( + gfx_node_t * node, + ArtVpath ** vec) { /* libart must have end==start for closed paths, even if using ART_MOVETO and not ART_MOVETO_OPEN so add extra point which is the same as the starting point */ - int points_max = node->points; /* scaled array has exact size */ - int points = node->points - 1; - art_vpath_add_point (vec, &points, &points_max, ART_LINETO, - (**vec).x, (**vec).y); - art_vpath_add_point (vec, &points, &points_max, ART_END, 0, 0); + int points_max = node->points; /* scaled array has exact size */ + int points = node->points - 1; + + art_vpath_add_point(vec, &points, &points_max, ART_LINETO, + (**vec).x, (**vec).y); + art_vpath_add_point(vec, &points, &points_max, ART_END, 0, 0); } /* find bbox of a string */ -static void compute_string_bbox(gfx_string string) { +static void compute_string_bbox( + gfx_string string) +{ unsigned int n; - FT_BBox bbox; + FT_BBox bbox; bbox.xMin = bbox.yMin = 32000; bbox.xMax = bbox.yMax = -32000; - for ( n = 0; n < string->num_glyphs; n++ ) { - FT_BBox glyph_bbox; - FT_Glyph_Get_CBox( string->glyphs[n].image, ft_glyph_bbox_gridfit, - &glyph_bbox ); - if (glyph_bbox.xMin < bbox.xMin) { - bbox.xMin = glyph_bbox.xMin; - } - if (glyph_bbox.yMin < bbox.yMin) { - bbox.yMin = glyph_bbox.yMin; - } - if (glyph_bbox.xMax > bbox.xMax) { - bbox.xMax = glyph_bbox.xMax; - } - if (glyph_bbox.yMax > bbox.yMax) { - bbox.yMax = glyph_bbox.yMax; - } - } - if ( bbox.xMin > bbox.xMax ) { - bbox.xMin = 0; - bbox.yMin = 0; - bbox.xMax = 0; - bbox.yMax = 0; + for (n = 0; n < string->num_glyphs; n++) { + FT_BBox glyph_bbox; + + FT_Glyph_Get_CBox(string->glyphs[n].image, ft_glyph_bbox_gridfit, + &glyph_bbox); + if (glyph_bbox.xMin < bbox.xMin) { + bbox.xMin = glyph_bbox.xMin; + } + if (glyph_bbox.yMin < bbox.yMin) { + bbox.yMin = glyph_bbox.yMin; + } + if (glyph_bbox.xMax > bbox.xMax) { + bbox.xMax = glyph_bbox.xMax; + } + if (glyph_bbox.yMax > bbox.yMax) { + bbox.yMax = glyph_bbox.yMax; + } + } + if (bbox.xMin > bbox.xMax) { + bbox.xMin = 0; + bbox.yMin = 0; + bbox.xMax = 0; + bbox.yMax = 0; } string->bbox.xMin = bbox.xMin; string->bbox.xMax = bbox.xMax; string->bbox.yMin = bbox.yMin; string->bbox.yMax = bbox.yMax; -} +} /* create a free type glyph string */ -gfx_string gfx_string_create(gfx_canvas_t *canvas, FT_Face face,const char *text, - int rotation, double tabwidth, double size ) +gfx_string gfx_string_create( + gfx_canvas_t * canvas, + FT_Face face, + const char *text, + int rotation, + double tabwidth, + double size) { - FT_GlyphSlot slot = face->glyph; /* a small shortcut */ - FT_Bool use_kerning; - FT_UInt previous; - FT_Vector ft_pen; + FT_GlyphSlot slot = face->glyph; /* a small shortcut */ + FT_Bool use_kerning; + FT_UInt previous; + FT_Vector ft_pen; - gfx_string string = (gfx_string) malloc (sizeof(struct gfx_string_s)); + gfx_string string = (gfx_string) malloc(sizeof(struct gfx_string_s)); - gfx_char glyph; /* current glyph in table */ - int n; - int error; - int gottab = 0; + gfx_char glyph; /* current glyph in table */ + int n; + int error; + int gottab = 0; #ifdef HAVE_MBSTOWCS - wchar_t *cstr; - size_t clen = strlen(text)+1; - cstr = malloc(sizeof(wchar_t) * clen); /* yes we are allocating probably too much here, I know */ - string->count=mbstowcs(cstr,text,clen); - if ( string->count == -1){ - /* conversion did not work, so lets fall back to just use what we got */ - string->count=clen-1; - for(n=0;text[n] != '\0';n++){ - cstr[n]=(unsigned char)text[n]; + wchar_t *cstr; + size_t clen = strlen(text) + 1; + + cstr = malloc(sizeof(wchar_t) * clen); /* yes we are allocating probably too much here, I know */ + string->count = mbstowcs(cstr, text, clen); + if (string->count == -1) { + /* conversion did not work, so lets fall back to just use what we got */ + string->count = clen - 1; + for (n = 0; text[n] != '\0'; n++) { + cstr[n] = (unsigned char) text[n]; } - } + } #else - char *cstr = strdup(text); - string->count = strlen (text); + char *cstr = strdup(text); + + string->count = strlen(text); #endif - ft_pen.x = 0; /* start at (0,0) !! */ - ft_pen.y = 0; - - - string->width = 0; - string->height = 0; - string->glyphs = (gfx_char) calloc (string->count,sizeof(struct gfx_char_s)); - string->num_glyphs = 0; - string->transform.xx = (FT_Fixed)( cos(M_PI*(rotation)/180.0)*0x10000); - string->transform.xy = (FT_Fixed)(-sin(M_PI*(rotation)/180.0)*0x10000); - string->transform.yx = (FT_Fixed)( sin(M_PI*(rotation)/180.0)*0x10000); - string->transform.yy = (FT_Fixed)( cos(M_PI*(rotation)/180.0)*0x10000); - - use_kerning = FT_HAS_KERNING(face); - previous = 0; - glyph = string->glyphs; - for (n=0; ncount;glyph++,n++) { - FT_Vector vec; - /* handle the tabs ... - have a witespace glyph inserted, but set its width such that the distance - of the new right edge is x times tabwidth from 0,0 where x is an integer. */ - unsigned int letter = cstr[n]; - letter = afm_fix_osx_charset(letter); /* unsafe macro */ - - gottab = 0; - if (letter == '\\' && n+1 < string->count && cstr[n+1] == 't'){ + ft_pen.x = 0; /* start at (0,0) !! */ + ft_pen.y = 0; + + + string->width = 0; + string->height = 0; + string->glyphs = + (gfx_char) calloc(string->count, sizeof(struct gfx_char_s)); + string->num_glyphs = 0; + string->transform.xx = + (FT_Fixed) (cos(M_PI * (rotation) / 180.0) * 0x10000); + string->transform.xy = + (FT_Fixed) (-sin(M_PI * (rotation) / 180.0) * 0x10000); + string->transform.yx = + (FT_Fixed) (sin(M_PI * (rotation) / 180.0) * 0x10000); + string->transform.yy = + (FT_Fixed) (cos(M_PI * (rotation) / 180.0) * 0x10000); + + use_kerning = FT_HAS_KERNING(face); + previous = 0; + glyph = string->glyphs; + for (n = 0; n < string->count; glyph++, n++) { + FT_Vector vec; + + /* handle the tabs ... + have a witespace glyph inserted, but set its width such that the distance + of the new right edge is x times tabwidth from 0,0 where x is an integer. */ + unsigned int letter = cstr[n]; + + letter = afm_fix_osx_charset(letter); /* unsafe macro */ + + gottab = 0; + if (letter == '\\' && n + 1 < string->count && cstr[n + 1] == 't') { /* we have a tab here so skip the backslash and set t to ' ' so that we get a white space */ gottab = 1; n++; - letter = ' '; - } - if (letter == '\t'){ - letter = ' '; - gottab = 1 ; - } - /* initialize each struct gfx_char_s */ - glyph->index = 0; - glyph->pos.x = 0; - glyph->pos.y = 0; - glyph->image = NULL; - glyph->index = FT_Get_Char_Index( face, letter ); - - /* compute glyph origin */ - if ( use_kerning && previous && glyph->index ) { - FT_Vector kerning; - FT_Get_Kerning (face, previous, glyph->index, - ft_kerning_default, &kerning); - ft_pen.x += kerning.x; - ft_pen.y += kerning.y; - } - - /* load the glyph image (in its native format) */ - /* for now, we take a monochrome glyph bitmap */ - error = FT_Load_Glyph (face, glyph->index, size > canvas->font_aa_threshold ? - canvas->aa_type == AA_NORMAL ? FT_LOAD_TARGET_NORMAL : - canvas->aa_type == AA_LIGHT ? FT_LOAD_TARGET_LIGHT : - FT_LOAD_TARGET_MONO : FT_LOAD_TARGET_MONO); - if (error) { - RRDPRINTF("couldn't load glyph: %c\n", letter) - continue; - } - error = FT_Get_Glyph (slot, &glyph->image); - if (error) { - RRDPRINTF("couldn't get glyph %c from slot %d\n", letter, (int)slot) - continue; - } - /* if we are in tabbing mode, we replace the tab with a space and shift the position - of the space so that its left edge is where the tab was supposed to land us */ - if (gottab){ - /* we are in gridfitting mode so the calculations happen in 1/64 pixles */ - ft_pen.x = tabwidth*64.0 * (float)(1 + (long)(ft_pen.x / (tabwidth * 64.0))) - slot->advance.x; - } - /* store current pen position */ - glyph->pos.x = ft_pen.x; - glyph->pos.y = ft_pen.y; + letter = ' '; + } + if (letter == '\t') { + letter = ' '; + gottab = 1; + } + /* initialize each struct gfx_char_s */ + glyph->index = 0; + glyph->pos.x = 0; + glyph->pos.y = 0; + glyph->image = NULL; + glyph->index = FT_Get_Char_Index(face, letter); + + /* compute glyph origin */ + if (use_kerning && previous && glyph->index) { + FT_Vector kerning; + + FT_Get_Kerning(face, previous, glyph->index, + ft_kerning_default, &kerning); + ft_pen.x += kerning.x; + ft_pen.y += kerning.y; + } + /* load the glyph image (in its native format) */ + /* for now, we take a monochrome glyph bitmap */ + error = + FT_Load_Glyph(face, glyph->index, + size > + canvas->font_aa_threshold ? canvas->aa_type == + AA_NORMAL ? FT_LOAD_TARGET_NORMAL : canvas-> + aa_type == + AA_LIGHT ? FT_LOAD_TARGET_LIGHT : + FT_LOAD_TARGET_MONO : FT_LOAD_TARGET_MONO); + if (error) { + RRDPRINTF("couldn't load glyph: %c\n", letter) + continue; + } + error = FT_Get_Glyph(slot, &glyph->image); + if (error) { + RRDPRINTF("couldn't get glyph %c from slot %d\n", letter, + (int) slot) + continue; + } + /* if we are in tabbing mode, we replace the tab with a space and shift the position + of the space so that its left edge is where the tab was supposed to land us */ + if (gottab) { + /* we are in gridfitting mode so the calculations happen in 1/64 pixles */ + ft_pen.x = + tabwidth * 64.0 * (float) (1 + + (long) (ft_pen.x / + (tabwidth * 64.0))) - + slot->advance.x; + } + /* store current pen position */ + glyph->pos.x = ft_pen.x; + glyph->pos.y = ft_pen.y; - ft_pen.x += slot->advance.x; - ft_pen.y += slot->advance.y; - /* rotate glyph */ - vec = glyph->pos; - FT_Vector_Transform (&vec, &string->transform); - error = FT_Glyph_Transform (glyph->image, &string->transform, &vec); - if (error) { - RRDPRINTF("couldn't transform glyph id %d\n", letter) - continue; - } + ft_pen.x += slot->advance.x; + ft_pen.y += slot->advance.y; - /* convert to a bitmap - destroy native image */ - error = FT_Glyph_To_Bitmap (&glyph->image, size > canvas->font_aa_threshold ? - canvas->aa_type == AA_NORMAL ? FT_RENDER_MODE_NORMAL : - canvas->aa_type == AA_LIGHT ? FT_RENDER_MODE_LIGHT : - FT_RENDER_MODE_MONO : FT_RENDER_MODE_MONO, 0, 1); - if (error) { - RRDPRINTF("couldn't convert glyph id %d to bitmap\n", letter) - continue; - } + /* rotate glyph */ + vec = glyph->pos; + FT_Vector_Transform(&vec, &string->transform); + error = FT_Glyph_Transform(glyph->image, &string->transform, &vec); + if (error) { + RRDPRINTF("couldn't transform glyph id %d\n", letter) + continue; + } + + /* convert to a bitmap - destroy native image */ + error = + FT_Glyph_To_Bitmap(&glyph->image, + size > + canvas->font_aa_threshold ? canvas->aa_type == + AA_NORMAL ? FT_RENDER_MODE_NORMAL : canvas-> + aa_type == + AA_LIGHT ? FT_RENDER_MODE_LIGHT : + FT_RENDER_MODE_MONO : FT_RENDER_MODE_MONO, 0, + 1); + if (error) { + RRDPRINTF("couldn't convert glyph id %d to bitmap\n", letter) + continue; + } - /* increment number of glyphs */ - previous = glyph->index; - string->num_glyphs++; - } - free(cstr); + /* increment number of glyphs */ + previous = glyph->index; + string->num_glyphs++; + } + free(cstr); /* printf ("number of glyphs = %d\n", string->num_glyphs);*/ - compute_string_bbox( string ); - /* the last character was a tab */ - /* if (gottab) { */ - string->width = ft_pen.x; - /* } else { - string->width = string->bbox.xMax - string->bbox.xMin; - } */ - string->height = string->bbox.yMax - string->bbox.yMin; - return string; + compute_string_bbox(string); + /* the last character was a tab */ + /* if (gottab) { */ + string->width = ft_pen.x; + /* } else { + string->width = string->bbox.xMax - string->bbox.xMin; + } */ + string->height = string->bbox.yMax - string->bbox.yMin; + return string; } -static int gfx_save_png (art_u8 *buffer, FILE *fp, - long width, long height, long bytes_per_pixel); +static int gfx_save_png( + art_u8 * buffer, + FILE * fp, + long width, + long height, + long bytes_per_pixel); + /* render grafics into png image */ -int gfx_render_png (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fp){ - - - FT_Library library; - gfx_node_t *node = canvas->firstnode; +int gfx_render_png( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fp) +{ + + + FT_Library library; + gfx_node_t *node = canvas->firstnode; + /* - art_u8 red = background >> 24, green = (background >> 16) & 0xff; - art_u8 blue = (background >> 8) & 0xff, alpha = ( background & 0xff ); - */ + art_u8 red = background >> 24, green = (background >> 16) & 0xff; + art_u8 blue = (background >> 8) & 0xff, alpha = ( background & 0xff ); + */ unsigned long pys_width = width * canvas->zoom; unsigned long pys_height = height * canvas->zoom; const int bytes_per_pixel = 4; - unsigned long rowstride = pys_width*bytes_per_pixel; /* bytes per pixel */ - + unsigned long rowstride = pys_width * bytes_per_pixel; /* bytes per pixel */ + /* fill that buffer with out background color */ - gfx_color_t *buffp = art_new (gfx_color_t, pys_width*pys_height); - art_u8 *buffer = (art_u8 *)buffp; + gfx_color_t *buffp = art_new(gfx_color_t, pys_width * pys_height); + art_u8 *buffer = (art_u8 *) buffp; unsigned long i; - for (i=0;itype) { case GFX_LINE: - case GFX_AREA: { + case GFX_AREA:{ ArtVpath *vec; - double dst[6]; - ArtSVP *svp; - art_affine_scale(dst,canvas->zoom,canvas->zoom); - vec = art_vpath_affine_transform(node->path,dst); - if (node->closed_path) - gfx_libart_close_path(node, &vec); - /* gfx_round_scaled_coordinates(vec); */ + double dst[6]; + ArtSVP *svp; + + art_affine_scale(dst, canvas->zoom, canvas->zoom); + vec = art_vpath_affine_transform(node->path, dst); + if (node->closed_path) + gfx_libart_close_path(node, &vec); + /* gfx_round_scaled_coordinates(vec); */ /* pvec = art_vpath_perturb(vec); - art_free(vec); */ - if(node->type == GFX_LINE){ - svp = art_svp_vpath_stroke ( vec, ART_PATH_STROKE_JOIN_ROUND, - ART_PATH_STROKE_CAP_ROUND, - node->size*canvas->zoom,4,0.25); + art_free(vec); */ + if (node->type == GFX_LINE) { + svp = art_svp_vpath_stroke(vec, ART_PATH_STROKE_JOIN_ROUND, + ART_PATH_STROKE_CAP_ROUND, + node->size * canvas->zoom, 4, + 0.25); } else { - svp = art_svp_from_vpath ( vec ); - /* this takes time and is unnecessary since we make - sure elsewhere that the areas are going clock-whise */ - /* svpt = art_svp_uncross( svp ); - art_svp_free(svp); - svp = art_svp_rewind_uncrossed(svpt,ART_WIND_RULE_NONZERO); - art_svp_free(svpt); + svp = art_svp_from_vpath(vec); + /* this takes time and is unnecessary since we make + sure elsewhere that the areas are going clock-whise */ + /* svpt = art_svp_uncross( svp ); + art_svp_free(svp); + svp = art_svp_rewind_uncrossed(svpt,ART_WIND_RULE_NONZERO); + art_svp_free(svpt); */ } art_free(vec); - /* this is from gnome since libart does not have this yet */ - gnome_print_art_rgba_svp_alpha (svp ,0,0, pys_width, pys_height, - node->color, buffer, rowstride, NULL); + /* this is from gnome since libart does not have this yet */ + gnome_print_art_rgba_svp_alpha(svp, 0, 0, pys_width, pys_height, + node->color, buffer, rowstride, + NULL); art_svp_free(svp); break; } - case GFX_TEXT: { - unsigned int n; - int error; - art_u8 fcolor[4],falpha; - FT_Face face; - gfx_char glyph; - gfx_string string; - FT_Vector vec; /* 26.6 */ - - float pen_x = 0.0 , pen_y = 0.0; + case GFX_TEXT:{ + unsigned int n; + int error; + art_u8 fcolor[4], falpha; + FT_Face face; + gfx_char glyph; + gfx_string string; + FT_Vector vec; /* 26.6 */ + + float pen_x = 0.0, pen_y = 0.0; + /* double x,y; */ - long ix,iy; - + long ix, iy; + fcolor[0] = node->color >> 24; fcolor[1] = (node->color >> 16) & 0xff; fcolor[2] = (node->color >> 8) & 0xff; falpha = node->color & 0xff; - error = FT_New_Face( library, - (char *)node->filename, - 0, - &face ); - if ( error ) { - rrd_set_error("failed to load %s",node->filename); - - break; - } - error = FT_Set_Char_Size(face, /* handle to face object */ - (long)(node->size*64), - (long)(node->size*64), - (long)(100*canvas->zoom), - (long)(100*canvas->zoom)); - if ( error ) { + error = FT_New_Face(library, (char *) node->filename, 0, &face); + if (error) { + rrd_set_error("failed to load %s", node->filename); + + break; + } + error = FT_Set_Char_Size(face, /* handle to face object */ + (long) (node->size * 64), + (long) (node->size * 64), + (long) (100 * canvas->zoom), + (long) (100 * canvas->zoom)); + if (error) { FT_Done_Face(face); break; } pen_x = node->x * canvas->zoom; pen_y = node->y * canvas->zoom; - string = gfx_string_create (canvas, face, node->text, node->angle, node->tabwidth, node->size); + string = + gfx_string_create(canvas, face, node->text, node->angle, + node->tabwidth, node->size); FT_Done_Face(face); - switch(node->halign){ - case GFX_H_RIGHT: vec.x = -string->bbox.xMax; - break; - case GFX_H_CENTER: vec.x = abs(string->bbox.xMax) >= abs(string->bbox.xMin) ? - -string->bbox.xMax/2:-string->bbox.xMin/2; - break; - case GFX_H_LEFT: vec.x = -string->bbox.xMin; - break; - case GFX_H_NULL: vec.x = 0; - break; + switch (node->halign) { + case GFX_H_RIGHT: + vec.x = -string->bbox.xMax; + break; + case GFX_H_CENTER: + vec.x = abs(string->bbox.xMax) >= abs(string->bbox.xMin) ? + -string->bbox.xMax / 2 : -string->bbox.xMin / 2; + break; + case GFX_H_LEFT: + vec.x = -string->bbox.xMin; + break; + case GFX_H_NULL: + vec.x = 0; + break; } - switch(node->valign){ - case GFX_V_TOP: vec.y = string->bbox.yMax; - break; - case GFX_V_CENTER: vec.y = abs(string->bbox.yMax) >= abs(string->bbox.yMin) ? - string->bbox.yMax/2:string->bbox.yMin/2; - break; - case GFX_V_BOTTOM: vec.y = 0; - break; - case GFX_V_NULL: vec.y = 0; - break; + switch (node->valign) { + case GFX_V_TOP: + vec.y = string->bbox.yMax; + break; + case GFX_V_CENTER: + vec.y = abs(string->bbox.yMax) >= abs(string->bbox.yMin) ? + string->bbox.yMax / 2 : string->bbox.yMin / 2; + break; + case GFX_V_BOTTOM: + vec.y = 0; + break; + case GFX_V_NULL: + vec.y = 0; + break; } - pen_x += vec.x/64; - pen_y += vec.y/64; + pen_x += vec.x / 64; + pen_y += vec.y / 64; glyph = string->glyphs; - for(n=0; nnum_glyphs; n++, glyph++) { - int gr; - FT_Glyph image; - FT_BitmapGlyph bit; - /* long buf_x,comp_n; */ - /* make copy to transform */ - if (! glyph->image) { - RRDPRINTF("no image\n") - continue; + for (n = 0; n < string->num_glyphs; n++, glyph++) { + int gr; + FT_Glyph image; + FT_BitmapGlyph bit; + + /* long buf_x,comp_n; */ + /* make copy to transform */ + if (!glyph->image) { + RRDPRINTF("no image\n") + continue; } - error = FT_Glyph_Copy (glyph->image, &image); + error = FT_Glyph_Copy(glyph->image, &image); if (error) { - RRDPRINTF("couldn't copy image\n") - continue; + RRDPRINTF("couldn't copy image\n") + continue; } /* transform it */ vec = glyph->pos; - FT_Vector_Transform (&vec, &string->transform); + FT_Vector_Transform(&vec, &string->transform); bit = (FT_BitmapGlyph) image; - gr = bit->bitmap.num_grays -1; + gr = bit->bitmap.num_grays - 1; /* buf_x = (pen_x + 0.5) + (double)bit->left; comp_n = buf_x + bit->bitmap.width > pys_width ? pys_width - buf_x : bit->bitmap.width; @@ -694,46 +825,68 @@ int gfx_render_png (gfx_canvas_t *canvas, } art_free(letter); */ - switch ( bit->bitmap.pixel_mode ) { - case FT_PIXEL_MODE_GRAY: - for (iy=0; iy < bit->bitmap.rows; iy++){ - long buf_y = iy+(pen_y+0.5)-bit->top; - if (buf_y < 0 || buf_y >= (long)pys_height) continue; - buf_y *= rowstride; - for (ix=0;ix < bit->bitmap.width;ix++){ - long buf_x = ix + (pen_x + 0.5) + (double)bit->left ; - art_u8 font_alpha; - - if (buf_x < 0 || buf_x >= (long)pys_width) continue; - buf_x *= bytes_per_pixel ; - font_alpha = *(bit->bitmap.buffer + iy * bit->bitmap.pitch + ix); - if (font_alpha > 0){ - fcolor[3] = (art_u8)((double)font_alpha / gr * falpha); - art_rgba_rgba_composite(buffer + buf_y + buf_x ,fcolor,1); - } + switch (bit->bitmap.pixel_mode) { + case FT_PIXEL_MODE_GRAY: + for (iy = 0; iy < bit->bitmap.rows; iy++) { + long buf_y = iy + (pen_y + 0.5) - bit->top; + + if (buf_y < 0 || buf_y >= (long) pys_height) + continue; + buf_y *= rowstride; + for (ix = 0; ix < bit->bitmap.width; ix++) { + long buf_x = + ix + (pen_x + 0.5) + (double) bit->left; + art_u8 font_alpha; + + if (buf_x < 0 || buf_x >= (long) pys_width) + continue; + buf_x *= bytes_per_pixel; + font_alpha = + *(bit->bitmap.buffer + + iy * bit->bitmap.pitch + ix); + if (font_alpha > 0) { + fcolor[3] = + (art_u8) ((double) font_alpha / gr * + falpha); + art_rgba_rgba_composite(buffer + buf_y + + buf_x, fcolor, 1); } } - break; - - case FT_PIXEL_MODE_MONO: - for (iy=0; iy < bit->bitmap.rows; iy++){ - long buf_y = iy+(pen_y+0.5)-bit->top; - if (buf_y < 0 || buf_y >= (long)pys_height) continue; - buf_y *= rowstride; - for (ix=0;ix < bit->bitmap.width;ix++){ - long buf_x = ix + (pen_x + 0.5) + (double)bit->left ; - - if (buf_x < 0 || buf_x >= (long)pys_width) continue; - buf_x *= bytes_per_pixel ; - if ( (fcolor[3] = falpha * ((*(bit->bitmap.buffer + iy * bit->bitmap.pitch + ix/8) >> (7 - (ix % 8))) & 1)) > 0 ) - art_rgba_rgba_composite(buffer + buf_y + buf_x ,fcolor,1); - } + } + break; + + case FT_PIXEL_MODE_MONO: + for (iy = 0; iy < bit->bitmap.rows; iy++) { + long buf_y = iy + (pen_y + 0.5) - bit->top; + + if (buf_y < 0 || buf_y >= (long) pys_height) + continue; + buf_y *= rowstride; + for (ix = 0; ix < bit->bitmap.width; ix++) { + long buf_x = + ix + (pen_x + 0.5) + (double) bit->left; + + if (buf_x < 0 || buf_x >= (long) pys_width) + continue; + buf_x *= bytes_per_pixel; + if ((fcolor[3] = + falpha * + ((* + (bit->bitmap.buffer + + iy * bit->bitmap.pitch + ix / 8) >> (7 - + (ix % + 8))) + & 1)) > 0) + art_rgba_rgba_composite(buffer + buf_y + + buf_x, fcolor, 1); } - break; + } + break; - default: - rrd_set_error("unknown freetype pixel mode: %d", bit->bitmap.pixel_mode); - break; + default: + rrd_set_error("unknown freetype pixel mode: %d", + bit->bitmap.pixel_mode); + break; } /* @@ -757,237 +910,273 @@ int gfx_render_png (gfx_canvas_t *canvas, } } */ - FT_Done_Glyph (image); + FT_Done_Glyph(image); } gfx_string_destroy(string); } } node = node->next; - } - gfx_save_png(buffer,fp , pys_width,pys_height,bytes_per_pixel); + } + gfx_save_png(buffer, fp, pys_width, pys_height, bytes_per_pixel); art_free(buffer); - FT_Done_FreeType( library ); - return 0; + FT_Done_FreeType(library); + return 0; } /* free memory used by nodes this will also remove memory required for associated paths and svcs ... but not for text strings */ -int -gfx_destroy (gfx_canvas_t *canvas){ - gfx_node_t *next,*node = canvas->firstnode; - while(node){ - next = node->next; - art_free(node->path); - free(node->text); - free(node->filename); - art_free(node); - node = next; - } - art_free(canvas); - return 0; -} - -static int gfx_save_png (art_u8 *buffer, FILE *fp, long width, long height, long bytes_per_pixel){ - png_structp png_ptr = NULL; - png_infop info_ptr = NULL; - int i; - png_bytep *row_pointers; - int rowstride = width * bytes_per_pixel; - png_text text[2]; - - if (fp == NULL) - return (1); - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,NULL,NULL,NULL); - if (png_ptr == NULL) - { - return (1); - } - row_pointers = (png_bytepp)png_malloc(png_ptr, - height*sizeof(png_bytep)); - - info_ptr = png_create_info_struct(png_ptr); - - if (info_ptr == NULL) - { - png_free(png_ptr,row_pointers); - png_destroy_write_struct(&png_ptr, (png_infopp)NULL); - return (1); - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - /* If we get here, we had a problem writing the file */ - png_destroy_write_struct(&png_ptr, &info_ptr); - return (1); - } - - png_init_io(png_ptr, fp); - png_set_IHDR (png_ptr, info_ptr,width, height, - 8, PNG_COLOR_TYPE_RGB_ALPHA, - PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_DEFAULT, - PNG_FILTER_TYPE_DEFAULT); - - text[0].key = "Software"; - text[0].text = "RRDtool, Tobias Oetiker , http://tobi.oetiker.ch"; - text[0].compression = PNG_TEXT_COMPRESSION_NONE; - png_set_text (png_ptr, info_ptr, text, 1); - - /* lets make this fast while ending up with some increass in image size */ - png_set_filter(png_ptr,0,PNG_FILTER_NONE); - /* png_set_filter(png_ptr,0,PNG_FILTER_SUB); */ - png_set_compression_level(png_ptr,1); - /* png_set_compression_strategy(png_ptr,Z_HUFFMAN_ONLY); */ - /* - png_set_filter(png_ptr,PNG_FILTER_TYPE_BASE,PNG_FILTER_SUB); - png_set_compression_strategy(png_ptr,Z_HUFFMAN_ONLY); - png_set_compression_level(png_ptr,Z_BEST_SPEED); */ - - /* Write header data */ - png_write_info (png_ptr, info_ptr); - for (i = 0; i < height; i++) - row_pointers[i] = (png_bytep) (buffer + i*rowstride); - - png_write_image(png_ptr, row_pointers); - png_write_end(png_ptr, info_ptr); - png_free(png_ptr,row_pointers); - png_destroy_write_struct(&png_ptr, &info_ptr); - return 1; -} - - +int gfx_destroy( + gfx_canvas_t * canvas) +{ + gfx_node_t *next, *node = canvas->firstnode; + + while (node) { + next = node->next; + art_free(node->path); + free(node->text); + free(node->filename); + art_free(node); + node = next; + } + art_free(canvas); + return 0; +} + +static int gfx_save_png( + art_u8 * buffer, + FILE * fp, + long width, + long height, + long bytes_per_pixel) +{ + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; + int i; + png_bytep *row_pointers; + int rowstride = width * bytes_per_pixel; + png_text text[2]; + + if (fp == NULL) + return (1); + + png_ptr = + png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (png_ptr == NULL) { + return (1); + } + row_pointers = (png_bytepp) png_malloc(png_ptr, + height * sizeof(png_bytep)); + + info_ptr = png_create_info_struct(png_ptr); + + if (info_ptr == NULL) { + png_free(png_ptr, row_pointers); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return (1); + } + + if (setjmp(png_jmpbuf(png_ptr))) { + /* If we get here, we had a problem writing the file */ + png_destroy_write_struct(&png_ptr, &info_ptr); + return (1); + } + + png_init_io(png_ptr, fp); + png_set_IHDR(png_ptr, info_ptr, width, height, + 8, PNG_COLOR_TYPE_RGB_ALPHA, + PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + + text[0].key = "Software"; + text[0].text = + "RRDtool, Tobias Oetiker , http://tobi.oetiker.ch"; + text[0].compression = PNG_TEXT_COMPRESSION_NONE; + png_set_text(png_ptr, info_ptr, text, 1); + + /* lets make this fast while ending up with some increass in image size */ + png_set_filter(png_ptr, 0, PNG_FILTER_NONE); + /* png_set_filter(png_ptr,0,PNG_FILTER_SUB); */ + png_set_compression_level(png_ptr, 1); + /* png_set_compression_strategy(png_ptr,Z_HUFFMAN_ONLY); */ + /* + png_set_filter(png_ptr,PNG_FILTER_TYPE_BASE,PNG_FILTER_SUB); + png_set_compression_strategy(png_ptr,Z_HUFFMAN_ONLY); + png_set_compression_level(png_ptr,Z_BEST_SPEED); */ + + /* Write header data */ + png_write_info(png_ptr, info_ptr); + for (i = 0; i < height; i++) + row_pointers[i] = (png_bytep) (buffer + i * rowstride); + + png_write_image(png_ptr, row_pointers); + png_write_end(png_ptr, info_ptr); + png_free(png_ptr, row_pointers); + png_destroy_write_struct(&png_ptr, &info_ptr); + return 1; +} + + /* ----- COMMON ROUTINES for pdf, svg and eps */ #define min3(a, b, c) (a < b ? (a < c ? a : c) : (b < c ? b : c)) #define max3(a, b, c) (a > b ? (a > c ? a : c) : (b > c ? b : c)) #define PDF_CALC_DEBUG 0 -typedef struct pdf_point -{ - double x, y; +typedef struct pdf_point { + double x, y; } pdf_point; -typedef struct -{ - double ascender, descender, baselineY; - pdf_point sizep, minp, maxp; - double x, y, tdx, tdy; - double r, cos_r, sin_r; - double ma, mb, mc, md, mx, my; /* pdf coord matrix */ - double tmx, tmy; /* last 2 coords of text coord matrix */ +typedef struct { + double ascender, descender, baselineY; + pdf_point sizep, minp, maxp; + double x, y, tdx, tdy; + double r, cos_r, sin_r; + double ma, mb, mc, md, mx, my; /* pdf coord matrix */ + double tmx, tmy; /* last 2 coords of text coord matrix */ #if PDF_CALC_DEBUG - int debug; + int debug; #endif } pdf_coords; #if PDF_CALC_DEBUG -static void pdf_dump_calc(gfx_node_t *node, pdf_coords *g) -{ - fprintf(stderr, "PDF CALC =============================\n"); - fprintf(stderr, " '%s' at %f pt\n", node->text, node->size); - fprintf(stderr, " align h = %s, v = %s, sizep = %f, %f\n", - (node->halign == GFX_H_RIGHT ? "r" : - (node->halign == GFX_H_CENTER ? "c" : - (node->halign == GFX_H_LEFT ? "l" : "N"))), - (node->valign == GFX_V_TOP ? "t" : - (node->valign == GFX_V_CENTER ? "c" : - (node->valign == GFX_V_BOTTOM ? "b" : "N"))), - g->sizep.x, g->sizep.y); - fprintf(stderr, " r = %f = %f, cos = %f, sin = %f\n", - g->r, node->angle, g->cos_r, g->sin_r); - fprintf(stderr, " ascender = %f, descender = %f, baselineY = %f\n", - g->ascender, g->descender, g->baselineY); - fprintf(stderr, " sizep: %f, %f\n", g->sizep.x, g->sizep.y); - fprintf(stderr, " minp: %f, %f maxp = %f, %f\n", - g->minp.x, g->minp.y, g->maxp.x, g->maxp.y); - fprintf(stderr, " x = %f, y = %f\n", g->x, g->y); - fprintf(stderr, " tdx = %f, tdy = %f\n", g->tdx, g->tdy); - fprintf(stderr, " GM = %f, %f, %f, %f, %f, %f\n", - g->ma, g->mb, g->mc, g->md, g->mx, g->my); - fprintf(stderr, " TM = %f, %f, %f, %f, %f, %f\n", - g->ma, g->mb, g->mc, g->md, g->tmx, g->tmy); +static void pdf_dump_calc( + gfx_node_t * node, + pdf_coords * g) +{ + fprintf(stderr, "PDF CALC =============================\n"); + fprintf(stderr, " '%s' at %f pt\n", node->text, node->size); + fprintf(stderr, " align h = %s, v = %s, sizep = %f, %f\n", + (node->halign == GFX_H_RIGHT ? "r" : + (node->halign == GFX_H_CENTER ? "c" : + (node->halign == GFX_H_LEFT ? "l" : "N"))), + (node->valign == GFX_V_TOP ? "t" : + (node->valign == GFX_V_CENTER ? "c" : + (node->valign == GFX_V_BOTTOM ? "b" : "N"))), + g->sizep.x, g->sizep.y); + fprintf(stderr, " r = %f = %f, cos = %f, sin = %f\n", + g->r, node->angle, g->cos_r, g->sin_r); + fprintf(stderr, " ascender = %f, descender = %f, baselineY = %f\n", + g->ascender, g->descender, g->baselineY); + fprintf(stderr, " sizep: %f, %f\n", g->sizep.x, g->sizep.y); + fprintf(stderr, " minp: %f, %f maxp = %f, %f\n", + g->minp.x, g->minp.y, g->maxp.x, g->maxp.y); + fprintf(stderr, " x = %f, y = %f\n", g->x, g->y); + fprintf(stderr, " tdx = %f, tdy = %f\n", g->tdx, g->tdy); + fprintf(stderr, " GM = %f, %f, %f, %f, %f, %f\n", + g->ma, g->mb, g->mc, g->md, g->mx, g->my); + fprintf(stderr, " TM = %f, %f, %f, %f, %f, %f\n", + g->ma, g->mb, g->mc, g->md, g->tmx, g->tmy); } #endif - + #if PDF_CALC_DEBUG #define PDF_DD(x) if (g->debug) x; #else #define PDF_DD(x) #endif -static void pdf_rotate(pdf_coords *g, pdf_point *p) +static void pdf_rotate( + pdf_coords * g, + pdf_point * p) { - double x2 = g->cos_r * p->x - g->sin_r * p->y; - double y2 = g->sin_r * p->x + g->cos_r * p->y; - PDF_DD( fprintf(stderr, " rotate(%f, %f) -> %f, %f\n", p->x, p->y, x2, y2)) - p->x = x2; - p->y = y2; + double x2 = g->cos_r * p->x - g->sin_r * p->y; + double y2 = g->sin_r * p->x + g->cos_r * p->y; + + PDF_DD(fprintf + (stderr, " rotate(%f, %f) -> %f, %f\n", p->x, p->y, x2, y2)) + p->x = x2; + p->y = y2; } -static void pdf_calc(int page_height, gfx_node_t *node, pdf_coords *g) +static void pdf_calc( + int page_height, + gfx_node_t * node, + pdf_coords * g) { - pdf_point a, b, c; + pdf_point a, b, c; + #if PDF_CALC_DEBUG - /* g->debug = !!strstr(node->text, "RevProxy-1") || !!strstr(node->text, "08:00"); */ - g->debug = !!strstr(node->text, "sekunder") || !!strstr(node->text, "Web"); + /* g->debug = !!strstr(node->text, "RevProxy-1") || !!strstr(node->text, "08:00"); */ + g->debug = !!strstr(node->text, "sekunder") + || !!strstr(node->text, "Web"); #endif - g->x = node->x; - g->y = page_height - node->y; - if (node->angle) { - g->r = 2 * M_PI * node->angle / 360.0; - g->cos_r = cos(g->r); - g->sin_r = sin(g->r); - } else { - g->r = 0; - g->cos_r = 1; - g->sin_r = 0; - } - g->ascender = afm_get_ascender(node->filename, node->size); - g->descender = afm_get_descender(node->filename, node->size); - g->sizep.x = afm_get_text_width(0, node->filename, node->size, node->tabwidth, node->text); - /* seems like libart ignores the descender when doing vertial-align = bottom, - so we do that too, to get labels v-aligning properly */ - g->sizep.y = -g->ascender; /* + afm_get_descender(font->ps_font, node->size); */ - g->baselineY = -g->ascender - g->sizep.y / 2; - a.x = g->sizep.x; a.y = g->sizep.y; - b.x = g->sizep.x; b.y = 0; - c.x = 0; c.y = g->sizep.y; - if (node->angle) { - pdf_rotate(g, &a); - pdf_rotate(g, &b); - pdf_rotate(g, &c); - } - g->minp.x = min3(a.x, b.x, c.x); - g->minp.y = min3(a.y, b.y, c.y); - g->maxp.x = max3(a.x, b.x, c.x); - g->maxp.y = max3(a.y, b.y, c.y); - /* The alignment parameters in node->valign and node->halign - specifies the alignment in the non-rotated coordinate system - (very unlike pdf/postscript), which complicates matters. - */ - switch (node->halign) { - case GFX_H_RIGHT: g->tdx = -g->maxp.x; break; - case GFX_H_CENTER: g->tdx = -(g->maxp.x + g->minp.x) / 2; break; - case GFX_H_LEFT: g->tdx = -g->minp.x; break; - case GFX_H_NULL: g->tdx = 0; break; - } - switch(node->valign){ - case GFX_V_TOP: g->tdy = -g->maxp.y; break; - case GFX_V_CENTER: g->tdy = -(g->maxp.y + g->minp.y) / 2; break; - case GFX_V_BOTTOM: g->tdy = -g->minp.y; break; - case GFX_V_NULL: g->tdy = 0; break; - } - g->ma = g->cos_r; - g->mb = g->sin_r; - g->mc = -g->sin_r; - g->md = g->cos_r; - g->mx = g->x + g->tdx; - g->my = g->y + g->tdy; - g->tmx = g->mx - g->ascender * g->mc; - g->tmy = g->my - g->ascender * g->md; - PDF_DD(pdf_dump_calc(node, g)) + g->x = node->x; + g->y = page_height - node->y; + if (node->angle) { + g->r = 2 * M_PI * node->angle / 360.0; + g->cos_r = cos(g->r); + g->sin_r = sin(g->r); + } else { + g->r = 0; + g->cos_r = 1; + g->sin_r = 0; + } + g->ascender = afm_get_ascender(node->filename, node->size); + g->descender = afm_get_descender(node->filename, node->size); + g->sizep.x = + afm_get_text_width(0, node->filename, node->size, node->tabwidth, + node->text); + /* seems like libart ignores the descender when doing vertial-align = bottom, + so we do that too, to get labels v-aligning properly */ + g->sizep.y = -g->ascender; /* + afm_get_descender(font->ps_font, node->size); */ + g->baselineY = -g->ascender - g->sizep.y / 2; + a.x = g->sizep.x; + a.y = g->sizep.y; + b.x = g->sizep.x; + b.y = 0; + c.x = 0; + c.y = g->sizep.y; + if (node->angle) { + pdf_rotate(g, &a); + pdf_rotate(g, &b); + pdf_rotate(g, &c); + } + g->minp.x = min3(a.x, b.x, c.x); + g->minp.y = min3(a.y, b.y, c.y); + g->maxp.x = max3(a.x, b.x, c.x); + g->maxp.y = max3(a.y, b.y, c.y); + /* The alignment parameters in node->valign and node->halign + specifies the alignment in the non-rotated coordinate system + (very unlike pdf/postscript), which complicates matters. + */ + switch (node->halign) { + case GFX_H_RIGHT: + g->tdx = -g->maxp.x; + break; + case GFX_H_CENTER: + g->tdx = -(g->maxp.x + g->minp.x) / 2; + break; + case GFX_H_LEFT: + g->tdx = -g->minp.x; + break; + case GFX_H_NULL: + g->tdx = 0; + break; + } + switch (node->valign) { + case GFX_V_TOP: + g->tdy = -g->maxp.y; + break; + case GFX_V_CENTER: + g->tdy = -(g->maxp.y + g->minp.y) / 2; + break; + case GFX_V_BOTTOM: + g->tdy = -g->minp.y; + break; + case GFX_V_NULL: + g->tdy = 0; + break; + } + g->ma = g->cos_r; + g->mb = g->sin_r; + g->mc = -g->sin_r; + g->md = g->cos_r; + g->mx = g->x + g->tdx; + g->my = g->y + g->tdy; + g->tmx = g->mx - g->ascender * g->mc; + g->tmy = g->my - g->ascender * g->md; + PDF_DD(pdf_dump_calc(node, g)) } /* ------- SVG ------- @@ -997,500 +1186,578 @@ static void pdf_calc(int page_height, gfx_node_t *node, pdf_coords *g) static int svg_indent = 0; static int svg_single_line = 0; static const char *svg_default_font = "-dummy-"; -typedef struct svg_dash -{ - int dash_enable; - double dash_adjust, dash_len, dash_offset; - double adjusted_on, adjusted_off; +typedef struct svg_dash { + int dash_enable; + double dash_adjust, dash_len, dash_offset; + double adjusted_on, adjusted_off; } svg_dash; -static void svg_print_indent(FILE *fp) +static void svg_print_indent( + FILE * fp) { - int i; - for (i = svg_indent - svg_single_line; i > 0; i--) { - putc(' ', fp); - putc(' ', fp); - } + int i; + + for (i = svg_indent - svg_single_line; i > 0; i--) { + putc(' ', fp); + putc(' ', fp); + } } - -static void svg_start_tag(FILE *fp, const char *name) + +static void svg_start_tag( + FILE * fp, + const char *name) { - svg_print_indent(fp); - putc('<', fp); - fputs(name, fp); - svg_indent++; + svg_print_indent(fp); + putc('<', fp); + fputs(name, fp); + svg_indent++; } - -static void svg_close_tag_single_line(FILE *fp) + +static void svg_close_tag_single_line( + FILE * fp) { - svg_single_line++; - putc('>', fp); + svg_single_line++; + putc('>', fp); } - -static void svg_close_tag(FILE *fp) + +static void svg_close_tag( + FILE * fp) { - putc('>', fp); - if (!svg_single_line) - putc('\n', fp); + putc('>', fp); + if (!svg_single_line) + putc('\n', fp); } - -static void svg_end_tag(FILE *fp, const char *name) + +static void svg_end_tag( + FILE * fp, + const char *name) { - /* name is NULL if closing empty-node tag */ - svg_indent--; - if (svg_single_line) - svg_single_line--; - else if (name) - svg_print_indent(fp); - if (name != NULL) { - fputs("': fputs(">", fp); break; - case '"': fputs(""", fp); break; - default: - if (ch == 32) { + return; + case '&': + fputs("&", fp); + break; + case '<': + fputs("<", fp); + break; + case '>': + fputs(">", fp); + break; + case '"': + fputs(""", fp); + break; + default: + if (ch == 32) { #ifdef HAVE_MBSTOWCS - if (p <= cstr + 1 || !*p || *p == 32) - fputs(" ", fp); /* non-breaking space in unicode */ - else + if (p <= cstr + 1 || !*p || *p == 32) + fputs(" ", fp); /* non-breaking space in unicode */ + else #endif - fputc(32, fp); - } else if (ch < 32 || ch >= 127) - fprintf(fp, "&#%d;", (int)ch); - else - putc((char)ch, fp); - } - } -} - -static void svg_format_number(char *buf, int bufsize, double d) -{ - /* omit decimals if integer to reduce filesize */ - char *p; - snprintf(buf, bufsize, "%.2f", d); - p = buf; /* doesn't trust snprintf return value */ - while (*p) - p++; - while (--p > buf) { - char ch = *p; - if (ch == '0') { - *p = '\0'; /* zap trailing zeros */ - continue; - } - if (ch == '.') - *p = '\0'; /* zap trailing dot */ - break; - } -} - -static void svg_write_number(FILE *fp, double d) -{ - char buf[60]; - svg_format_number(buf, sizeof(buf), d); - fputs(buf, fp); -} - -static int svg_color_is_black(int c) -{ - /* gfx_color_t is RRGGBBAA */ - return c == 0x000000FF; -} - -static void svg_write_color(FILE *fp, gfx_color_t c, const char *attr) -{ - /* gfx_color_t is RRGGBBAA, svg can use #RRGGBB and #RGB like html */ - gfx_color_t rrggbb = (int)((c >> 8) & 0xFFFFFF); - gfx_color_t opacity = c & 0xFF; - fprintf(fp, " %s=\"", attr); - if ((rrggbb & 0x0F0F0F) == ((rrggbb >> 4) & 0x0F0F0F)) { - /* css2 short form, #rgb is #rrggbb, not #r0g0b0 */ - fprintf(fp, "#%03lX", - ( ((rrggbb >> 8) & 0xF00) - | ((rrggbb >> 4) & 0x0F0) - | ( rrggbb & 0x00F))); - } else { - fprintf(fp, "#%06lX", rrggbb); - } - fputs("\"", fp); - if (opacity != 0xFF) { - fprintf(fp, " opacity=\""); - svg_write_number(fp, opacity / 255.0); + fputc(32, fp); + } else if (ch < 32 || ch >= 127) + fprintf(fp, "&#%d;", (int) ch); + else + putc((char) ch, fp); + } + } +} + +static void svg_format_number( + char *buf, + int bufsize, + double d) +{ + /* omit decimals if integer to reduce filesize */ + char *p; + + snprintf(buf, bufsize, "%.2f", d); + p = buf; /* doesn't trust snprintf return value */ + while (*p) + p++; + while (--p > buf) { + char ch = *p; + + if (ch == '0') { + *p = '\0'; /* zap trailing zeros */ + continue; + } + if (ch == '.') + *p = '\0'; /* zap trailing dot */ + break; + } +} + +static void svg_write_number( + FILE * fp, + double d) +{ + char buf[60]; + + svg_format_number(buf, sizeof(buf), d); + fputs(buf, fp); +} + +static int svg_color_is_black( + int c) +{ + /* gfx_color_t is RRGGBBAA */ + return c == 0x000000FF; +} + +static void svg_write_color( + FILE * fp, + gfx_color_t c, + const char *attr) +{ + /* gfx_color_t is RRGGBBAA, svg can use #RRGGBB and #RGB like html */ + gfx_color_t rrggbb = (int) ((c >> 8) & 0xFFFFFF); + gfx_color_t opacity = c & 0xFF; + + fprintf(fp, " %s=\"", attr); + if ((rrggbb & 0x0F0F0F) == ((rrggbb >> 4) & 0x0F0F0F)) { + /* css2 short form, #rgb is #rrggbb, not #r0g0b0 */ + fprintf(fp, "#%03lX", (((rrggbb >> 8) & 0xF00) + | ((rrggbb >> 4) & 0x0F0) + | (rrggbb & 0x00F))); + } else { + fprintf(fp, "#%06lX", rrggbb); + } fputs("\"", fp); - } -} - -static void svg_get_dash(gfx_node_t *node, svg_dash *d) -{ - double offset; - int mult; - if (node->dash_on <= 0 || node->dash_off <= 0) { - d->dash_enable = 0; - return; - } - d->dash_enable = 1; - d->dash_len = node->dash_on + node->dash_off; - /* dash on/off adjustment due to round caps */ - d->dash_adjust = 0.8 * node->size; - d->adjusted_on = node->dash_on - d->dash_adjust; - if (d->adjusted_on < 0.01) - d->adjusted_on = 0.01; - d->adjusted_off = d->dash_len - d->adjusted_on; - /* dash offset calc */ - if (node->path[0].x == node->path[1].x) /* only good for horz/vert lines */ - offset = node->path[0].y; - else - offset = node->path[0].x; - mult = (int)fabs(offset / d->dash_len); - d->dash_offset = offset - mult * d->dash_len; - if (node->path[0].x < node->path[1].x || node->path[0].y < node->path[1].y) - d->dash_offset = d->dash_len - d->dash_offset; -} - -static int svg_dash_equal(svg_dash *a, svg_dash *b) -{ - if (a->dash_enable != b->dash_enable) - return 0; - if (a->adjusted_on != b->adjusted_on) - return 0; - if (a->adjusted_off != b->adjusted_off) + if (opacity != 0xFF) { + fprintf(fp, " opacity=\""); + svg_write_number(fp, opacity / 255.0); + fputs("\"", fp); + } +} + +static void svg_get_dash( + gfx_node_t * node, + svg_dash * d) +{ + double offset; + int mult; + + if (node->dash_on <= 0 || node->dash_off <= 0) { + d->dash_enable = 0; + return; + } + d->dash_enable = 1; + d->dash_len = node->dash_on + node->dash_off; + /* dash on/off adjustment due to round caps */ + d->dash_adjust = 0.8 * node->size; + d->adjusted_on = node->dash_on - d->dash_adjust; + if (d->adjusted_on < 0.01) + d->adjusted_on = 0.01; + d->adjusted_off = d->dash_len - d->adjusted_on; + /* dash offset calc */ + if (node->path[0].x == node->path[1].x) /* only good for horz/vert lines */ + offset = node->path[0].y; + else + offset = node->path[0].x; + mult = (int) fabs(offset / d->dash_len); + d->dash_offset = offset - mult * d->dash_len; + if (node->path[0].x < node->path[1].x + || node->path[0].y < node->path[1].y) + d->dash_offset = d->dash_len - d->dash_offset; +} + +static int svg_dash_equal( + svg_dash * a, + svg_dash * b) +{ + if (a->dash_enable != b->dash_enable) + return 0; + if (a->adjusted_on != b->adjusted_on) + return 0; + if (a->adjusted_off != b->adjusted_off) + return 0; + /* rest of properties will be the same when on+off are */ + return 1; +} + +static void svg_common_path_attributes( + FILE * fp, + gfx_node_t * node) +{ + svg_dash dash_info; + + svg_get_dash(node, &dash_info); + fputs(" stroke-width=\"", fp); + svg_write_number(fp, node->size); + fputs("\"", fp); + svg_write_color(fp, node->color, "stroke"); + fputs(" fill=\"none\"", fp); + if (dash_info.dash_enable) { + if (dash_info.dash_offset != 0) { + fputs(" stroke-dashoffset=\"", fp); + svg_write_number(fp, dash_info.dash_offset); + fputs("\"", fp); + } + fputs(" stroke-dasharray=\"", fp); + svg_write_number(fp, dash_info.adjusted_on); + fputs(",", fp); + svg_write_number(fp, dash_info.adjusted_off); + fputs("\"", fp); + } +} + +static int svg_is_int_step( + double a, + double b) +{ + double diff = fabs(a - b); + + return floor(diff) == diff; +} + +static int svg_path_straight_segment( + FILE * fp, + double lastA, + double currentA, + double currentB, + gfx_node_t * node, + int segment_idx, + int isx, + char absChar, + char relChar) +{ + if (!svg_is_int_step(lastA, currentA)) { + putc(absChar, fp); + svg_write_number(fp, currentA); + return 0; + } + if (segment_idx < node->points - 1) { + ArtVpath *vec = node->path + segment_idx + 1; + + if (vec->code == ART_LINETO) { + double nextA = (isx ? vec->x : vec->y) - LINEOFFSET; + double nextB = (isx ? vec->y : vec->x) - LINEOFFSET; + + if (nextB == currentB + && ((currentA >= lastA) == (nextA >= currentA)) + && svg_is_int_step(currentA, nextA)) { + return 1; /* skip to next as it is a straight line */ + } + } + } + putc(relChar, fp); + svg_write_number(fp, currentA - lastA); return 0; - /* rest of properties will be the same when on+off are */ - return 1; -} - -static void svg_common_path_attributes(FILE *fp, gfx_node_t *node) -{ - svg_dash dash_info; - svg_get_dash(node, &dash_info); - fputs(" stroke-width=\"", fp); - svg_write_number(fp, node->size); - fputs("\"", fp); - svg_write_color(fp, node->color, "stroke"); - fputs(" fill=\"none\"", fp); - if (dash_info.dash_enable) { - if (dash_info.dash_offset != 0) { - fputs(" stroke-dashoffset=\"", fp); - svg_write_number(fp, dash_info.dash_offset); - fputs("\"", fp); - } - fputs(" stroke-dasharray=\"", fp); - svg_write_number(fp, dash_info.adjusted_on); - fputs(",", fp); - svg_write_number(fp, dash_info.adjusted_off); +} + +static void svg_path( + FILE * fp, + gfx_node_t * node, + int multi) +{ + int i; + double lastX = 0, lastY = 0; + + /* for straight lines tags take less space than + tags because of the efficient packing + in the 'd' attribute */ + svg_start_tag(fp, "path"); + if (!multi) + svg_common_path_attributes(fp, node); + fputs(" d=\"", fp); + /* specification of the 'd' attribute: */ + /* http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation */ + for (i = 0; i < node->points; i++) { + ArtVpath *vec = node->path + i; + double x = vec->x - LINEOFFSET; + double y = vec->y - LINEOFFSET; + + switch (vec->code) { + case ART_MOVETO_OPEN: /* fall-through */ + case ART_MOVETO: + putc('M', fp); + svg_write_number(fp, x); + putc(',', fp); + svg_write_number(fp, y); + break; + case ART_LINETO: + /* try optimize filesize by using minimal lineto commands */ + /* without introducing rounding errors. */ + if (x == lastX) { + if (svg_path_straight_segment + (fp, lastY, y, x, node, i, 0, 'V', 'v')) + continue; + } else if (y == lastY) { + if (svg_path_straight_segment + (fp, lastX, x, y, node, i, 1, 'H', 'h')) + continue; + } else { + putc('L', fp); + svg_write_number(fp, x); + putc(',', fp); + svg_write_number(fp, y); + } + break; + case ART_CURVETO: + break; /* unsupported */ + case ART_END: + break; /* nop */ + } + lastX = x; + lastY = y; + } + if (node->closed_path) + fputs(" Z", fp); fputs("\"", fp); - } -} - -static int svg_is_int_step(double a, double b) -{ - double diff = fabs(a - b); - return floor(diff) == diff; -} - -static int svg_path_straight_segment(FILE *fp, - double lastA, double currentA, double currentB, - gfx_node_t *node, - int segment_idx, int isx, char absChar, char relChar) -{ - if (!svg_is_int_step(lastA, currentA)) { - putc(absChar, fp); - svg_write_number(fp, currentA); - return 0; - } - if (segment_idx < node->points - 1) { - ArtVpath *vec = node->path + segment_idx + 1; - if (vec->code == ART_LINETO) { - double nextA = (isx ? vec->x : vec->y) - LINEOFFSET; - double nextB = (isx ? vec->y : vec->x) - LINEOFFSET; - if (nextB == currentB - && ((currentA >= lastA) == (nextA >= currentA)) - && svg_is_int_step(currentA, nextA)) { - return 1; /* skip to next as it is a straight line */ - } - } - } - putc(relChar, fp); - svg_write_number(fp, currentA - lastA); - return 0; -} - -static void svg_path(FILE *fp, gfx_node_t *node, int multi) -{ - int i; - double lastX = 0, lastY = 0; - /* for straight lines tags take less space than - tags because of the efficient packing - in the 'd' attribute */ - svg_start_tag(fp, "path"); - if (!multi) + svg_close_tag_empty_node(fp); +} + +static void svg_multi_path( + FILE * fp, + gfx_node_t ** nodeR) +{ + /* optimize for multiple paths with the same color, penwidth, etc. */ + int num = 1; + gfx_node_t *node = *nodeR; + gfx_node_t *next = node->next; + + while (next) { + if (next->type != node->type + || next->size != node->size + || next->color != node->color + || next->dash_on != node->dash_on + || next->dash_off != node->dash_off) + break; + next = next->next; + num++; + } + if (num == 1) { + svg_path(fp, node, 0); + return; + } + svg_start_tag(fp, "g"); svg_common_path_attributes(fp, node); - fputs(" d=\"", fp); - /* specification of the 'd' attribute: */ - /* http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation */ - for (i = 0; i < node->points; i++) { - ArtVpath *vec = node->path + i; - double x = vec->x - LINEOFFSET; - double y = vec->y - LINEOFFSET; - switch (vec->code) { - case ART_MOVETO_OPEN: /* fall-through */ - case ART_MOVETO: - putc('M', fp); - svg_write_number(fp, x); - putc(',', fp); - svg_write_number(fp, y); - break; - case ART_LINETO: - /* try optimize filesize by using minimal lineto commands */ - /* without introducing rounding errors. */ - if (x == lastX) { - if (svg_path_straight_segment(fp, lastY, y, x, node, i, 0, 'V', 'v')) - continue; - } else if (y == lastY) { - if (svg_path_straight_segment(fp, lastX, x, y, node, i, 1, 'H', 'h')) - continue; - } else { - putc('L', fp); - svg_write_number(fp, x); - putc(',', fp); - svg_write_number(fp, y); - } - break; - case ART_CURVETO: break; /* unsupported */ - case ART_END: break; /* nop */ - } - lastX = x; - lastY = y; - } - if (node->closed_path) - fputs(" Z", fp); - fputs("\"", fp); - svg_close_tag_empty_node(fp); -} - -static void svg_multi_path(FILE *fp, gfx_node_t **nodeR) -{ - /* optimize for multiple paths with the same color, penwidth, etc. */ - int num = 1; - gfx_node_t *node = *nodeR; - gfx_node_t *next = node->next; - while (next) { - if (next->type != node->type - || next->size != node->size - || next->color != node->color - || next->dash_on != node->dash_on - || next->dash_off != node->dash_off) - break; - next = next->next; - num++; - } - if (num == 1) { - svg_path(fp, node, 0); - return; - } - svg_start_tag(fp, "g"); - svg_common_path_attributes(fp, node); - svg_close_tag(fp); - while (num && node) { - svg_path(fp, node, 1); - if (!--num) - break; - node = node->next; - *nodeR = node; - } - svg_end_tag(fp, "g"); -} - -static void svg_area(FILE *fp, gfx_node_t *node) -{ - int i; - double startX = 0, startY = 0; - svg_start_tag(fp, "polygon"); - fputs(" ", fp); - svg_write_color(fp, node->color, "fill"); - fputs(" points=\"", fp); - for (i = 0; i < node->points; i++) { - ArtVpath *vec = node->path + i; - double x = vec->x - LINEOFFSET; - double y = vec->y - LINEOFFSET; - switch (vec->code) { - case ART_MOVETO_OPEN: /* fall-through */ - case ART_MOVETO: - svg_write_number(fp, x); - putc(',', fp); - svg_write_number(fp, y); - startX = x; - startY = y; - break; - case ART_LINETO: - if (i == node->points - 2 - && node->path[i + 1].code == ART_END - && fabs(x - startX) < 0.001 && fabs(y - startY) < 0.001) { - break; /* poly area always closed, no need for last point */ - } - putc(' ', fp); - svg_write_number(fp, x); - putc(',', fp); - svg_write_number(fp, y); - break; - case ART_CURVETO: break; /* unsupported */ - case ART_END: break; /* nop */ - } - } - fputs("\"", fp); - svg_close_tag_empty_node(fp); -} - -static void svg_text(FILE *fp, gfx_node_t *node) -{ - pdf_coords g; - const char *fontname; - /* as svg has 0,0 in top-left corner (like most screens) instead of - bottom-left corner like pdf and eps, we have to fake the coords - using offset and inverse sin(r) value */ - int page_height = 1000; - pdf_calc(page_height, node, &g); - if (node->angle != 0) { - svg_start_tag(fp, "g"); - /* can't use svg_write_number as 2 decimals is far from enough to avoid - skewed text */ - fprintf(fp, " transform=\"matrix(%f,%f,%f,%f,%f,%f)\"", - g.ma, -g.mb, -g.mc, g.md, g.tmx, page_height - g.tmy); - svg_close_tag(fp); - } - svg_start_tag(fp, "text"); - if (!node->angle) { - fputs(" x=\"", fp); - svg_write_number(fp, g.tmx); - fputs("\" y=\"", fp); - svg_write_number(fp, page_height - g.tmy); - fputs("\"", fp); - } - fontname = afm_get_font_name(node->filename); - if (strcmp(fontname, svg_default_font)) - fprintf(fp, " font-family=\"%s\"", fontname); - fputs(" font-size=\"", fp); - svg_write_number(fp, node->size); - fputs("\"", fp); - if (!svg_color_is_black(node->color)) + svg_close_tag(fp); + while (num && node) { + svg_path(fp, node, 1); + if (!--num) + break; + node = node->next; + *nodeR = node; + } + svg_end_tag(fp, "g"); +} + +static void svg_area( + FILE * fp, + gfx_node_t * node) +{ + int i; + double startX = 0, startY = 0; + + svg_start_tag(fp, "polygon"); + fputs(" ", fp); svg_write_color(fp, node->color, "fill"); - svg_close_tag_single_line(fp); - /* support for node->tabwidth missing */ - svg_write_text(fp, node->text); - svg_end_tag(fp, "text"); - if (node->angle != 0) - svg_end_tag(fp, "g"); -} - -int gfx_render_svg (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fp){ - gfx_node_t *node = canvas->firstnode; - /* Find the first font used, and assume it is the mostly used - one. It reduces the number of font-familty attributes. */ - while (node) { - if (node->type == GFX_TEXT && node->filename) { - svg_default_font = afm_get_font_name(node->filename); - break; - } - node = node->next; - } - fputs( -"\n" -"\n" -"\n", fp); - svg_start_tag(fp, "svg"); - fputs(" width=\"", fp); - svg_write_number(fp, width * canvas->zoom); - fputs("\" height=\"", fp); - svg_write_number(fp, height * canvas->zoom); - fputs("\" x=\"0\" y=\"0\" viewBox=\"", fp); - svg_write_number(fp, -LINEOFFSET); - fputs(" ", fp); - svg_write_number(fp, -LINEOFFSET); - fputs(" ", fp); - svg_write_number(fp, width - LINEOFFSET); - fputs(" ", fp); - svg_write_number(fp, height - LINEOFFSET); - fputs("\" preserveAspectRatio=\"xMidYMid\"", fp); - fprintf(fp, " font-family=\"%s\"", svg_default_font); /* default font */ - fputs(" stroke-linecap=\"round\" stroke-linejoin=\"round\"", fp); - fputs(" xmlns=\"http://www.w3.org/2000/svg\"", fp); - fputs(" xmlns:xlink=\"http://www.w3.org/1999/xlink\"", fp); - svg_close_tag(fp); - svg_start_tag(fp, "rect"); - fprintf(fp, " x=\"0\" y=\"0\" width=\"%d\" height=\"%d\"", width, height); - svg_write_color(fp, background, "fill"); - svg_close_tag_empty_node(fp); - node = canvas->firstnode; - while (node) { - switch (node->type) { - case GFX_LINE: - svg_multi_path(fp, &node); - break; - case GFX_AREA: - svg_area(fp, node); - break; - case GFX_TEXT: - svg_text(fp, node); - } - node = node->next; - } - svg_end_tag(fp, "svg"); - return 0; + fputs(" points=\"", fp); + for (i = 0; i < node->points; i++) { + ArtVpath *vec = node->path + i; + double x = vec->x - LINEOFFSET; + double y = vec->y - LINEOFFSET; + + switch (vec->code) { + case ART_MOVETO_OPEN: /* fall-through */ + case ART_MOVETO: + svg_write_number(fp, x); + putc(',', fp); + svg_write_number(fp, y); + startX = x; + startY = y; + break; + case ART_LINETO: + if (i == node->points - 2 + && node->path[i + 1].code == ART_END + && fabs(x - startX) < 0.001 && fabs(y - startY) < 0.001) { + break; /* poly area always closed, no need for last point */ + } + putc(' ', fp); + svg_write_number(fp, x); + putc(',', fp); + svg_write_number(fp, y); + break; + case ART_CURVETO: + break; /* unsupported */ + case ART_END: + break; /* nop */ + } + } + fputs("\"", fp); + svg_close_tag_empty_node(fp); +} + +static void svg_text( + FILE * fp, + gfx_node_t * node) +{ + pdf_coords g; + const char *fontname; + + /* as svg has 0,0 in top-left corner (like most screens) instead of + bottom-left corner like pdf and eps, we have to fake the coords + using offset and inverse sin(r) value */ + int page_height = 1000; + + pdf_calc(page_height, node, &g); + if (node->angle != 0) { + svg_start_tag(fp, "g"); + /* can't use svg_write_number as 2 decimals is far from enough to avoid + skewed text */ + fprintf(fp, " transform=\"matrix(%f,%f,%f,%f,%f,%f)\"", + g.ma, -g.mb, -g.mc, g.md, g.tmx, page_height - g.tmy); + svg_close_tag(fp); + } + svg_start_tag(fp, "text"); + if (!node->angle) { + fputs(" x=\"", fp); + svg_write_number(fp, g.tmx); + fputs("\" y=\"", fp); + svg_write_number(fp, page_height - g.tmy); + fputs("\"", fp); + } + fontname = afm_get_font_name(node->filename); + if (strcmp(fontname, svg_default_font)) + fprintf(fp, " font-family=\"%s\"", fontname); + fputs(" font-size=\"", fp); + svg_write_number(fp, node->size); + fputs("\"", fp); + if (!svg_color_is_black(node->color)) + svg_write_color(fp, node->color, "fill"); + svg_close_tag_single_line(fp); + /* support for node->tabwidth missing */ + svg_write_text(fp, node->text); + svg_end_tag(fp, "text"); + if (node->angle != 0) + svg_end_tag(fp, "g"); +} + +int gfx_render_svg( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fp) +{ + gfx_node_t *node = canvas->firstnode; + + /* Find the first font used, and assume it is the mostly used + one. It reduces the number of font-familty attributes. */ + while (node) { + if (node->type == GFX_TEXT && node->filename) { + svg_default_font = afm_get_font_name(node->filename); + break; + } + node = node->next; + } + fputs("\n" + "\n" + "\n", + fp); + svg_start_tag(fp, "svg"); + fputs(" width=\"", fp); + svg_write_number(fp, width * canvas->zoom); + fputs("\" height=\"", fp); + svg_write_number(fp, height * canvas->zoom); + fputs("\" x=\"0\" y=\"0\" viewBox=\"", fp); + svg_write_number(fp, -LINEOFFSET); + fputs(" ", fp); + svg_write_number(fp, -LINEOFFSET); + fputs(" ", fp); + svg_write_number(fp, width - LINEOFFSET); + fputs(" ", fp); + svg_write_number(fp, height - LINEOFFSET); + fputs("\" preserveAspectRatio=\"xMidYMid\"", fp); + fprintf(fp, " font-family=\"%s\"", svg_default_font); /* default font */ + fputs(" stroke-linecap=\"round\" stroke-linejoin=\"round\"", fp); + fputs(" xmlns=\"http://www.w3.org/2000/svg\"", fp); + fputs(" xmlns:xlink=\"http://www.w3.org/1999/xlink\"", fp); + svg_close_tag(fp); + svg_start_tag(fp, "rect"); + fprintf(fp, " x=\"0\" y=\"0\" width=\"%d\" height=\"%d\"", width, height); + svg_write_color(fp, background, "fill"); + svg_close_tag_empty_node(fp); + node = canvas->firstnode; + while (node) { + switch (node->type) { + case GFX_LINE: + svg_multi_path(fp, &node); + break; + case GFX_AREA: + svg_area(fp, node); + break; + case GFX_TEXT: + svg_text(fp, node); + } + node = node->next; + } + svg_end_tag(fp, "svg"); + return 0; } /* ------- EPS ------- @@ -1498,388 +1765,413 @@ int gfx_render_svg (gfx_canvas_t *canvas, http://partners.adobe.com/asn/developer/technotes/postscript.html */ -typedef struct eps_font -{ - const char *ps_font; - int id; - struct eps_font *next; +typedef struct eps_font { + const char *ps_font; + int id; + struct eps_font *next; } eps_font; -typedef struct eps_state -{ - FILE *fp; - gfx_canvas_t *canvas; - art_u32 page_width, page_height; - eps_font *font_list; +typedef struct eps_state { + FILE *fp; + gfx_canvas_t *canvas; + art_u32 page_width, page_height; + eps_font *font_list; /*--*/ - gfx_color_t color; - const char *font; - double font_size; - double line_width; - int linecap, linejoin; - int has_dash; + gfx_color_t color; + const char *font; + double font_size; + double line_width; + int linecap, linejoin; + int has_dash; } eps_state; -static void eps_set_color(eps_state *state, gfx_color_t color) +static void eps_set_color( + eps_state * state, + gfx_color_t color) { #if USE_EPS_FAKE_ALPHA - double a1, a2; + double a1, a2; #endif - /* gfx_color_t is RRGGBBAA */ - if (state->color == color) - return; + /* gfx_color_t is RRGGBBAA */ + if (state->color == color) + return; #if USE_EPS_FAKE_ALPHA - a1 = (color & 255) / 255.0; - a2 = 255 * (1 - a1); + a1 = (color & 255) / 255.0; + a2 = 255 * (1 - a1); #define eps_color_calc(x) (int)( ((x) & 255) * a1 + a2) #else #define eps_color_calc(x) (int)( (x) & 255) #endif - /* gfx_color_t is RRGGBBAA */ - if (state->color == color) - return; - fprintf(state->fp, "%d %d %d Rgb\n", - eps_color_calc(color >> 24), - eps_color_calc(color >> 16), - eps_color_calc(color >> 8)); - state->color = color; -} - -static int eps_add_font(eps_state *state, gfx_node_t *node) -{ - /* The fonts list could be postponed to the end using - (atend), but let's be nice and have them in the header. */ - const char *ps_font = afm_get_font_postscript_name(node->filename); - eps_font *ef; - for (ef = state->font_list; ef; ef = ef->next) { - if (!strcmp(ps_font, ef->ps_font)) - return 0; - } - ef = malloc(sizeof(eps_font)); - if (ef == NULL) { - rrd_set_error("malloc for eps_font"); - return -1; - } - ef->next = state->font_list; - ef->ps_font = ps_font; - state->font_list = ef; - return 0; -} - -static void eps_list_fonts(eps_state *state, const char *dscName) -{ - eps_font *ef; - int lineLen = strlen(dscName); - if (!state->font_list) - return; - fputs(dscName, state->fp); - for (ef = state->font_list; ef; ef = ef->next) { - int nameLen = strlen(ef->ps_font); - if (lineLen + nameLen > 100 && lineLen) { - fputs("\n", state->fp); - fputs("%%- \n", state->fp); - lineLen = 5; - } else { - fputs(" ", state->fp); - lineLen++; - } - fputs(ef->ps_font, state->fp); - lineLen += nameLen; - } - fputs("\n", state->fp); -} - -static void eps_define_fonts(eps_state *state) -{ - eps_font *ef; - if (!state->font_list) - return; - for (ef = state->font_list; ef; ef = ef->next) { - /* PostScript¨ LANGUAGE REFERENCE third edition - page 349 */ - fprintf(state->fp, - "%%\n" - "/%s findfont dup length dict begin\n" - "{ 1 index /FID ne {def} {pop pop} ifelse } forall\n" - "/Encoding ISOLatin1Encoding def\n" - "currentdict end\n" - "/%s-ISOLatin1 exch definefont pop\n" - "/SetFont-%s { /%s-ISOLatin1 findfont exch scalefont setfont } bd\n", - ef->ps_font, ef->ps_font, ef->ps_font, ef->ps_font); - } -} - -static int eps_prologue(eps_state *state) -{ - gfx_node_t *node; - fputs( - "%!PS-Adobe-3.0 EPSF-3.0\n" - "%%Creator: RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch\n" - /* can't like weird chars here */ - "%%Title: (RRDtool output)\n" - "%%DocumentData: Clean7Bit\n" - "", state->fp); - fprintf(state->fp, "%%%%BoundingBox: 0 0 %d %d\n", - state->page_width, state->page_height); - for (node = state->canvas->firstnode; node; node = node->next) { - if (node->type == GFX_TEXT && eps_add_font(state, node) == -1) - return -1; - } - eps_list_fonts(state, "%%DocumentFonts:"); - eps_list_fonts(state, "%%DocumentNeededFonts:"); - fputs( - "%%EndComments\n" - "%%BeginProlog\n" - "%%EndProlog\n" /* must have, or BoundingBox is ignored */ - "/bd { bind def } bind def\n" - "", state->fp); - fprintf(state->fp, "/X { %.2f add } bd\n", LINEOFFSET); - fputs( - "/X2 {X exch X exch} bd\n" - "/M {X2 moveto} bd\n" - "/L {X2 lineto} bd\n" - "/m {moveto} bd\n" - "/l {lineto} bd\n" - "/S {stroke} bd\n" - "/CP {closepath} bd\n" - "/WS {setlinewidth stroke} bd\n" - "/F {fill} bd\n" - "/T1 {gsave} bd\n" - "/T2 {concat 0 0 moveto show grestore} bd\n" - "/T {moveto show} bd\n" - "/Rgb { 255.0 div 3 1 roll\n" - " 255.0 div 3 1 roll \n" - " 255.0 div 3 1 roll setrgbcolor } bd\n" - "", state->fp); - eps_define_fonts(state); - return 0; -} - -static void eps_clear_dash(eps_state *state) -{ - if (!state->has_dash) - return; - state->has_dash = 0; - fputs("[1 0] 0 setdash\n", state->fp); -} - -static void eps_write_linearea(eps_state *state, gfx_node_t *node) -{ - int i; - FILE *fp = state->fp; - int useOffset = 0; - int clearDashIfAny = 1; - eps_set_color(state, node->color); - if (node->type == GFX_LINE) { - svg_dash dash_info; - if (state->linecap != 1) { - fputs("1 setlinecap\n", fp); - state->linecap = 1; - } - if (state->linejoin != 1) { - fputs("1 setlinejoin\n", fp); - state->linejoin = 1; + /* gfx_color_t is RRGGBBAA */ + if (state->color == color) + return; + fprintf(state->fp, "%d %d %d Rgb\n", + eps_color_calc(color >> 24), + eps_color_calc(color >> 16), eps_color_calc(color >> 8)); + state->color = color; +} + +static int eps_add_font( + eps_state * state, + gfx_node_t * node) +{ + /* The fonts list could be postponed to the end using + (atend), but let's be nice and have them in the header. */ + const char *ps_font = afm_get_font_postscript_name(node->filename); + eps_font *ef; + + for (ef = state->font_list; ef; ef = ef->next) { + if (!strcmp(ps_font, ef->ps_font)) + return 0; } - svg_get_dash(node, &dash_info); - if (dash_info.dash_enable) { - clearDashIfAny = 0; - state->has_dash = 1; - fputs("[", fp); - svg_write_number(fp, dash_info.adjusted_on); - fputs(" ", fp); - svg_write_number(fp, dash_info.adjusted_off); - fputs("] ", fp); - svg_write_number(fp, dash_info.dash_offset); - fputs(" setdash\n", fp); - } - } - if (clearDashIfAny) - eps_clear_dash(state); - for (i = 0; i < node->points; i++) { - ArtVpath *vec = node->path + i; - double x = vec->x; - double y = state->page_height - vec->y; - if (vec->code == ART_MOVETO_OPEN || vec->code == ART_MOVETO) - useOffset = (fabs(x - floor(x) - 0.5) < 0.01 && fabs(y - floor(y) - 0.5) < 0.01); - if (useOffset) { - x -= LINEOFFSET; - y -= LINEOFFSET; - } - switch (vec->code) { - case ART_MOVETO_OPEN: /* fall-through */ - case ART_MOVETO: - svg_write_number(fp, x); - fputc(' ', fp); - svg_write_number(fp, y); - fputc(' ', fp); - fputs(useOffset ? "M\n" : "m\n", fp); - break; - case ART_LINETO: - svg_write_number(fp, x); - fputc(' ', fp); - svg_write_number(fp, y); - fputc(' ', fp); - fputs(useOffset ? "L\n" : "l\n", fp); - break; - case ART_CURVETO: break; /* unsupported */ - case ART_END: break; /* nop */ - } - } - if (node->type == GFX_LINE) { - if (node->closed_path) - fputs("CP ", fp); - if (node->size != state->line_width) { - state->line_width = node->size; - svg_write_number(fp, state->line_width); - fputs(" WS\n", fp); + ef = malloc(sizeof(eps_font)); + if (ef == NULL) { + rrd_set_error("malloc for eps_font"); + return -1; + } + ef->next = state->font_list; + ef->ps_font = ps_font; + state->font_list = ef; + return 0; +} + +static void eps_list_fonts( + eps_state * state, + const char *dscName) +{ + eps_font *ef; + int lineLen = strlen(dscName); + + if (!state->font_list) + return; + fputs(dscName, state->fp); + for (ef = state->font_list; ef; ef = ef->next) { + int nameLen = strlen(ef->ps_font); + + if (lineLen + nameLen > 100 && lineLen) { + fputs("\n", state->fp); + fputs("%%- \n", state->fp); + lineLen = 5; + } else { + fputs(" ", state->fp); + lineLen++; + } + fputs(ef->ps_font, state->fp); + lineLen += nameLen; + } + fputs("\n", state->fp); +} + +static void eps_define_fonts( + eps_state * state) +{ + eps_font *ef; + + if (!state->font_list) + return; + for (ef = state->font_list; ef; ef = ef->next) { + /* PostScript¨ LANGUAGE REFERENCE third edition + page 349 */ + fprintf(state->fp, + "%%\n" + "/%s findfont dup length dict begin\n" + "{ 1 index /FID ne {def} {pop pop} ifelse } forall\n" + "/Encoding ISOLatin1Encoding def\n" + "currentdict end\n" + "/%s-ISOLatin1 exch definefont pop\n" + "/SetFont-%s { /%s-ISOLatin1 findfont exch scalefont setfont } bd\n", + ef->ps_font, ef->ps_font, ef->ps_font, ef->ps_font); + } +} + +static int eps_prologue( + eps_state * state) +{ + gfx_node_t *node; + + fputs("%!PS-Adobe-3.0 EPSF-3.0\n" + "%%Creator: RRDtool " PACKAGE_VERSION + " Tobias Oetiker, http://tobi.oetiker.ch\n" + /* can't like weird chars here */ + "%%Title: (RRDtool output)\n" + "%%DocumentData: Clean7Bit\n" "", state->fp); + fprintf(state->fp, "%%%%BoundingBox: 0 0 %d %d\n", + state->page_width, state->page_height); + for (node = state->canvas->firstnode; node; node = node->next) { + if (node->type == GFX_TEXT && eps_add_font(state, node) == -1) + return -1; + } + eps_list_fonts(state, "%%DocumentFonts:"); + eps_list_fonts(state, "%%DocumentNeededFonts:"); + fputs("%%EndComments\n" "%%BeginProlog\n" "%%EndProlog\n" /* must have, or BoundingBox is ignored */ + "/bd { bind def } bind def\n" "", state->fp); + fprintf(state->fp, "/X { %.2f add } bd\n", LINEOFFSET); + fputs("/X2 {X exch X exch} bd\n" + "/M {X2 moveto} bd\n" + "/L {X2 lineto} bd\n" + "/m {moveto} bd\n" + "/l {lineto} bd\n" + "/S {stroke} bd\n" + "/CP {closepath} bd\n" + "/WS {setlinewidth stroke} bd\n" + "/F {fill} bd\n" + "/T1 {gsave} bd\n" + "/T2 {concat 0 0 moveto show grestore} bd\n" + "/T {moveto show} bd\n" + "/Rgb { 255.0 div 3 1 roll\n" + " 255.0 div 3 1 roll \n" + " 255.0 div 3 1 roll setrgbcolor } bd\n" "", state->fp); + eps_define_fonts(state); + return 0; +} + +static void eps_clear_dash( + eps_state * state) +{ + if (!state->has_dash) + return; + state->has_dash = 0; + fputs("[1 0] 0 setdash\n", state->fp); +} + +static void eps_write_linearea( + eps_state * state, + gfx_node_t * node) +{ + int i; + FILE *fp = state->fp; + int useOffset = 0; + int clearDashIfAny = 1; + + eps_set_color(state, node->color); + if (node->type == GFX_LINE) { + svg_dash dash_info; + + if (state->linecap != 1) { + fputs("1 setlinecap\n", fp); + state->linecap = 1; + } + if (state->linejoin != 1) { + fputs("1 setlinejoin\n", fp); + state->linejoin = 1; + } + svg_get_dash(node, &dash_info); + if (dash_info.dash_enable) { + clearDashIfAny = 0; + state->has_dash = 1; + fputs("[", fp); + svg_write_number(fp, dash_info.adjusted_on); + fputs(" ", fp); + svg_write_number(fp, dash_info.adjusted_off); + fputs("] ", fp); + svg_write_number(fp, dash_info.dash_offset); + fputs(" setdash\n", fp); + } + } + if (clearDashIfAny) + eps_clear_dash(state); + for (i = 0; i < node->points; i++) { + ArtVpath *vec = node->path + i; + double x = vec->x; + double y = state->page_height - vec->y; + + if (vec->code == ART_MOVETO_OPEN || vec->code == ART_MOVETO) + useOffset = (fabs(x - floor(x) - 0.5) < 0.01 + && fabs(y - floor(y) - 0.5) < 0.01); + if (useOffset) { + x -= LINEOFFSET; + y -= LINEOFFSET; + } + switch (vec->code) { + case ART_MOVETO_OPEN: /* fall-through */ + case ART_MOVETO: + svg_write_number(fp, x); + fputc(' ', fp); + svg_write_number(fp, y); + fputc(' ', fp); + fputs(useOffset ? "M\n" : "m\n", fp); + break; + case ART_LINETO: + svg_write_number(fp, x); + fputc(' ', fp); + svg_write_number(fp, y); + fputc(' ', fp); + fputs(useOffset ? "L\n" : "l\n", fp); + break; + case ART_CURVETO: + break; /* unsupported */ + case ART_END: + break; /* nop */ + } + } + if (node->type == GFX_LINE) { + if (node->closed_path) + fputs("CP ", fp); + if (node->size != state->line_width) { + state->line_width = node->size; + svg_write_number(fp, state->line_width); + fputs(" WS\n", fp); + } else { + fputs("S\n", fp); + } } else { - fputs("S\n", fp); + fputs("F\n", fp); } - } else { - fputs("F\n", fp); - } } -static void eps_write_text(eps_state *state, gfx_node_t *node) +static void eps_write_text( + eps_state * state, + gfx_node_t * node) { - FILE *fp = state->fp; - const char *ps_font = afm_get_font_postscript_name(node->filename); - int lineLen = 0; - pdf_coords g; + FILE *fp = state->fp; + const char *ps_font = afm_get_font_postscript_name(node->filename); + int lineLen = 0; + pdf_coords g; + #ifdef HAVE_MBSTOWCS - size_t clen; - wchar_t *p, *cstr, ch; - int text_count; + size_t clen; + wchar_t *p, *cstr, ch; + int text_count; + if (!node->text) - return; + return; clen = strlen(node->text) + 1; cstr = malloc(sizeof(wchar_t) * clen); text_count = mbstowcs(cstr, node->text, clen); if (text_count == -1) - text_count = mbstowcs(cstr, "Enc-Err", 6); + text_count = mbstowcs(cstr, "Enc-Err", 6); p = cstr; #else const unsigned char *p = node->text; unsigned char ch; + if (!p) - return; + return; #endif - pdf_calc(state->page_height, node, &g); - eps_set_color(state, node->color); - if (strcmp(ps_font, state->font) || node->size != state->font_size) { - state->font = ps_font; - state->font_size = node->size; - svg_write_number(fp, state->font_size); - fprintf(fp, " SetFont-%s\n", state->font); - } - if (node->angle) - fputs("T1 ", fp); - fputs("(", fp); - lineLen = 20; - while (1) { - ch = *p; - if (!ch) - break; - ch = afm_fix_osx_charset(ch); /* unsafe macro */ - if (++lineLen > 70) { - fputs("\\\n", fp); /* backslash and \n */ - lineLen = 0; - } - switch (ch) { - case '%': - case '(': - case ')': - case '\\': - fputc('\\', fp); - fputc(ch, fp); - break; - case '\n': - fputs("\\n", fp); - break; - case '\r': - fputs("\\r", fp); - break; - case '\t': - fputs("\\t", fp); - break; - default: - if (ch > 255) { - fputc('?', fp); - } else if (ch >= 126 || ch < 32) { - fprintf(fp, "\\%03o", (unsigned int)ch); - lineLen += 3; - } else { - fputc(ch, fp); + pdf_calc(state->page_height, node, &g); + eps_set_color(state, node->color); + if (strcmp(ps_font, state->font) || node->size != state->font_size) { + state->font = ps_font; + state->font_size = node->size; + svg_write_number(fp, state->font_size); + fprintf(fp, " SetFont-%s\n", state->font); + } + if (node->angle) + fputs("T1 ", fp); + fputs("(", fp); + lineLen = 20; + while (1) { + ch = *p; + if (!ch) + break; + ch = afm_fix_osx_charset(ch); /* unsafe macro */ + if (++lineLen > 70) { + fputs("\\\n", fp); /* backslash and \n */ + lineLen = 0; + } + switch (ch) { + case '%': + case '(': + case ')': + case '\\': + fputc('\\', fp); + fputc(ch, fp); + break; + case '\n': + fputs("\\n", fp); + break; + case '\r': + fputs("\\r", fp); + break; + case '\t': + fputs("\\t", fp); + break; + default: + if (ch > 255) { + fputc('?', fp); + } else if (ch >= 126 || ch < 32) { + fprintf(fp, "\\%03o", (unsigned int) ch); + lineLen += 3; + } else { + fputc(ch, fp); + } } - } - p++; - } + p++; + } #ifdef HAVE_MBSTOWCS - free(cstr); + free(cstr); #endif - if (node->angle) { - /* can't use svg_write_number as 2 decimals is far from enough to avoid - skewed text */ - fprintf(fp, ") [%f %f %f %f %f %f] T2\n", - g.ma, g.mb, g.mc, g.md, g.tmx, g.tmy); - } else { - fputs(") ", fp); - svg_write_number(fp, g.tmx); - fputs(" ", fp); - svg_write_number(fp, g.tmy); - fputs(" T\n", fp); - } -} - -static int eps_write_content(eps_state *state) -{ - gfx_node_t *node; - fputs("%\n", state->fp); - for (node = state->canvas->firstnode; node; node = node->next) { - switch (node->type) { - case GFX_LINE: - case GFX_AREA: - eps_write_linearea(state, node); - break; - case GFX_TEXT: - eps_write_text(state, node); - break; - } - } - return 0; -} - -int gfx_render_eps (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fp){ - struct eps_state state; - state.fp = fp; - state.canvas = canvas; - state.page_width = width; - state.page_height = height; - state.font = "no-default-font"; - state.font_size = -1; - state.color = 0; /* black */ - state.font_list = NULL; - state.linecap = -1; - state.linejoin = -1; - state.has_dash = 0; - state.line_width = 1; - if (eps_prologue(&state) == -1) - return -1; - eps_set_color(&state, background); - fprintf(fp, "0 0 M 0 %d L %d %d L %d 0 L fill\n", - height, width, height, width); - if (eps_write_content(&state) == -1) + if (node->angle) { + /* can't use svg_write_number as 2 decimals is far from enough to avoid + skewed text */ + fprintf(fp, ") [%f %f %f %f %f %f] T2\n", + g.ma, g.mb, g.mc, g.md, g.tmx, g.tmy); + } else { + fputs(") ", fp); + svg_write_number(fp, g.tmx); + fputs(" ", fp); + svg_write_number(fp, g.tmy); + fputs(" T\n", fp); + } +} + +static int eps_write_content( + eps_state * state) +{ + gfx_node_t *node; + + fputs("%\n", state->fp); + for (node = state->canvas->firstnode; node; node = node->next) { + switch (node->type) { + case GFX_LINE: + case GFX_AREA: + eps_write_linearea(state, node); + break; + case GFX_TEXT: + eps_write_text(state, node); + break; + } + } + return 0; +} + +int gfx_render_eps( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fp) +{ + struct eps_state state; + + state.fp = fp; + state.canvas = canvas; + state.page_width = width; + state.page_height = height; + state.font = "no-default-font"; + state.font_size = -1; + state.color = 0; /* black */ + state.font_list = NULL; + state.linecap = -1; + state.linejoin = -1; + state.has_dash = 0; + state.line_width = 1; + if (eps_prologue(&state) == -1) + return -1; + eps_set_color(&state, background); + fprintf(fp, "0 0 M 0 %d L %d %d L %d 0 L fill\n", + height, width, height, width); + if (eps_write_content(&state) == -1) + return 0; + fputs("showpage\n", fp); + fputs("%%EOF\n", fp); + while (state.font_list) { + eps_font *next = state.font_list->next; + + free(state.font_list); + state.font_list = next; + } return 0; - fputs("showpage\n", fp); - fputs("%%EOF\n", fp); - while (state.font_list) { - eps_font *next = state.font_list->next; - free(state.font_list); - state.font_list = next; - } - return 0; } /* ------- PDF ------- @@ -1887,198 +2179,226 @@ int gfx_render_eps (gfx_canvas_t *canvas, http://partners.adobe.com/public/developer/pdf/index_reference.html */ -typedef struct pdf_buffer -{ - int id, is_obj, is_dict, is_stream, pdf_file_pos; - char *data; - int alloc_size, current_size; - struct pdf_buffer *previous_buffer, *next_buffer; - struct pdf_state *state; +typedef struct pdf_buffer { + int id, is_obj, is_dict, is_stream, pdf_file_pos; + char *data; + int alloc_size, current_size; + struct pdf_buffer *previous_buffer, *next_buffer; + struct pdf_state *state; } pdf_buffer; -typedef struct pdf_font -{ - const char *ps_font; - pdf_buffer obj; - struct pdf_font *next; +typedef struct pdf_font { + const char *ps_font; + pdf_buffer obj; + struct pdf_font *next; } pdf_font; -typedef struct pdf_state -{ - FILE *fp; - gfx_canvas_t *canvas; - art_u32 page_width, page_height; - pdf_font *font_list; - pdf_buffer *first_buffer, *last_buffer; - int pdf_file_pos; - int has_failed; +typedef struct pdf_state { + FILE *fp; + gfx_canvas_t *canvas; + art_u32 page_width, page_height; + pdf_font *font_list; + pdf_buffer *first_buffer, *last_buffer; + int pdf_file_pos; + int has_failed; /*--*/ - gfx_color_t stroke_color, fill_color; - int font_id; - double font_size; - double line_width; - svg_dash dash; - int linecap, linejoin; - int last_obj_id; + gfx_color_t stroke_color, fill_color; + int font_id; + double font_size; + double line_width; + svg_dash dash; + int linecap, linejoin; + int last_obj_id; /*--*/ - pdf_buffer pdf_header; - pdf_buffer info_obj, catalog_obj, pages_obj, page1_obj; - pdf_buffer fontsdict_obj; - pdf_buffer graph_stream; + pdf_buffer pdf_header; + pdf_buffer info_obj, catalog_obj, pages_obj, page1_obj; + pdf_buffer fontsdict_obj; + pdf_buffer graph_stream; } pdf_state; -static void pdf_init_buffer(pdf_state *state, pdf_buffer *buf) -{ - int initial_size = 32; - buf->state = state; - buf->id = -42; - buf->alloc_size = 0; - buf->current_size = 0; - buf->data = (char*)malloc(initial_size); - buf->is_obj = 0; - buf->previous_buffer = NULL; - buf->next_buffer = NULL; - if (buf->data == NULL) { - rrd_set_error("malloc for pdf_buffer data"); - state->has_failed = 1; - return; - } - buf->alloc_size = initial_size; - if (state->last_buffer) - state->last_buffer->next_buffer = buf; - if (state->first_buffer == NULL) - state->first_buffer = buf; - buf->previous_buffer = state->last_buffer; - state->last_buffer = buf; -} - -static void pdf_put(pdf_buffer *buf, const char *text, int len) -{ - if (len <= 0) - return; - if (buf->alloc_size < buf->current_size + len) { - int new_size = buf->alloc_size; - char *new_buf; - while (new_size < buf->current_size + len) - new_size *= 4; - new_buf = (char*)malloc(new_size); - if (new_buf == NULL) { - rrd_set_error("re-malloc for pdf_buffer data"); - buf->state->has_failed = 1; - return; - } - memcpy(new_buf, buf->data, buf->current_size); - free(buf->data); - buf->data = new_buf; - buf->alloc_size = new_size; - } - memcpy(buf->data + buf->current_size, text, len); - buf->current_size += len; -} - -static void pdf_put_char(pdf_buffer *buf, char c) +static void pdf_init_buffer( + pdf_state * state, + pdf_buffer * buf) +{ + int initial_size = 32; + + buf->state = state; + buf->id = -42; + buf->alloc_size = 0; + buf->current_size = 0; + buf->data = (char *) malloc(initial_size); + buf->is_obj = 0; + buf->previous_buffer = NULL; + buf->next_buffer = NULL; + if (buf->data == NULL) { + rrd_set_error("malloc for pdf_buffer data"); + state->has_failed = 1; + return; + } + buf->alloc_size = initial_size; + if (state->last_buffer) + state->last_buffer->next_buffer = buf; + if (state->first_buffer == NULL) + state->first_buffer = buf; + buf->previous_buffer = state->last_buffer; + state->last_buffer = buf; +} + +static void pdf_put( + pdf_buffer * buf, + const char *text, + int len) +{ + if (len <= 0) + return; + if (buf->alloc_size < buf->current_size + len) { + int new_size = buf->alloc_size; + char *new_buf; + + while (new_size < buf->current_size + len) + new_size *= 4; + new_buf = (char *) malloc(new_size); + if (new_buf == NULL) { + rrd_set_error("re-malloc for pdf_buffer data"); + buf->state->has_failed = 1; + return; + } + memcpy(new_buf, buf->data, buf->current_size); + free(buf->data); + buf->data = new_buf; + buf->alloc_size = new_size; + } + memcpy(buf->data + buf->current_size, text, len); + buf->current_size += len; +} + +static void pdf_put_char( + pdf_buffer * buf, + char c) { if (buf->alloc_size >= buf->current_size + 1) { - buf->data[buf->current_size++] = c; + buf->data[buf->current_size++] = c; } else { - char tmp[1]; - tmp[0] = (char)c; - pdf_put(buf, tmp, 1); + char tmp[1]; + + tmp[0] = (char) c; + pdf_put(buf, tmp, 1); } } -static void pdf_puts(pdf_buffer *buf, const char *text) +static void pdf_puts( + pdf_buffer * buf, + const char *text) { - pdf_put(buf, text, strlen(text)); + pdf_put(buf, text, strlen(text)); } -static void pdf_indent(pdf_buffer *buf) +static void pdf_indent( + pdf_buffer * buf) { - pdf_puts(buf, "\t"); + pdf_puts(buf, "\t"); } -static void pdf_putsi(pdf_buffer *buf, const char *text) +static void pdf_putsi( + pdf_buffer * buf, + const char *text) { - pdf_indent(buf); - pdf_puts(buf, text); + pdf_indent(buf); + pdf_puts(buf, text); } -static void pdf_putint(pdf_buffer *buf, int i) +static void pdf_putint( + pdf_buffer * buf, + int i) { - char tmp[20]; - sprintf(tmp, "%d", i); - pdf_puts(buf, tmp); + char tmp[20]; + + sprintf(tmp, "%d", i); + pdf_puts(buf, tmp); } -static void pdf_putnumber(pdf_buffer *buf, double d) +static void pdf_putnumber( + pdf_buffer * buf, + double d) { - char tmp[50]; - svg_format_number(tmp, sizeof(tmp), d); - pdf_puts(buf, tmp); + char tmp[50]; + + svg_format_number(tmp, sizeof(tmp), d); + pdf_puts(buf, tmp); } -static void pdf_put_string_contents_wide(pdf_buffer *buf, const afm_char *text) +static void pdf_put_string_contents_wide( + pdf_buffer * buf, + const afm_char * text) { const afm_char *p = text; + while (1) { - afm_char ch = *p; - ch = afm_fix_osx_charset(ch); /* unsafe macro */ - switch (ch) { - case 0: - return; - case '(': - pdf_puts(buf, "\\("); - break; - case ')': - pdf_puts(buf, "\\)"); - break; - case '\\': - pdf_puts(buf, "\\\\"); - break; - case '\n': - pdf_puts(buf, "\\n"); - break; - case '\r': - pdf_puts(buf, "\\r"); - break; - case '\t': - pdf_puts(buf, "\\t"); - break; - default: - if (ch > 255) { - pdf_put_char(buf, '?'); - } else if (ch > 125 || ch < 32) { - pdf_put_char(buf, ch); - } else { - char tmp[10]; - snprintf(tmp, sizeof(tmp), "\\%03o", (int)ch); - pdf_puts(buf, tmp); - } - } - p++; - } -} - -static void pdf_put_string_contents(pdf_buffer *buf, const char *text) + afm_char ch = *p; + + ch = afm_fix_osx_charset(ch); /* unsafe macro */ + switch (ch) { + case 0: + return; + case '(': + pdf_puts(buf, "\\("); + break; + case ')': + pdf_puts(buf, "\\)"); + break; + case '\\': + pdf_puts(buf, "\\\\"); + break; + case '\n': + pdf_puts(buf, "\\n"); + break; + case '\r': + pdf_puts(buf, "\\r"); + break; + case '\t': + pdf_puts(buf, "\\t"); + break; + default: + if (ch > 255) { + pdf_put_char(buf, '?'); + } else if (ch > 125 || ch < 32) { + pdf_put_char(buf, ch); + } else { + char tmp[10]; + + snprintf(tmp, sizeof(tmp), "\\%03o", (int) ch); + pdf_puts(buf, tmp); + } + } + p++; + } +} + +static void pdf_put_string_contents( + pdf_buffer * buf, + const char *text) { #ifdef HAVE_MBSTOWCS - size_t clen = strlen(text) + 1; - wchar_t *cstr = malloc(sizeof(wchar_t) * clen); - int text_count = mbstowcs(cstr, text, clen); + size_t clen = strlen(text) + 1; + wchar_t *cstr = malloc(sizeof(wchar_t) * clen); + int text_count = mbstowcs(cstr, text, clen); + if (text_count == -1) - text_count = mbstowcs(cstr, "Enc-Err", 6); + text_count = mbstowcs(cstr, "Enc-Err", 6); pdf_put_string_contents_wide(buf, cstr); #if 0 if (*text == 'W') { - fprintf(stderr, "Decoding utf8 for '%s'\n", text); - wchar_t *p = cstr; - char *pp = text; - fprintf(stderr, "sz wc = %d\n", sizeof(wchar_t)); - while (*p) { - fprintf(stderr, " %d = %c versus %d = %c\n", *p, (char)*p, 255 & (int)*pp, *pp); - p++; - pp++; - } + fprintf(stderr, "Decoding utf8 for '%s'\n", text); + wchar_t *p = cstr; + char *pp = text; + + fprintf(stderr, "sz wc = %d\n", sizeof(wchar_t)); + while (*p) { + fprintf(stderr, " %d = %c versus %d = %c\n", *p, (char) *p, + 255 & (int) *pp, *pp); + p++; + pp++; + } } #endif free(cstr); @@ -2087,434 +2407,487 @@ static void pdf_put_string_contents(pdf_buffer *buf, const char *text) #endif } -static void pdf_init_object(pdf_state *state, pdf_buffer *buf) +static void pdf_init_object( + pdf_state * state, + pdf_buffer * buf) { - pdf_init_buffer(state, buf); - buf->id = ++state->last_obj_id; - buf->is_obj = 1; - buf->is_stream = 0; + pdf_init_buffer(state, buf); + buf->id = ++state->last_obj_id; + buf->is_obj = 1; + buf->is_stream = 0; } -static void pdf_init_dict(pdf_state *state, pdf_buffer *buf) +static void pdf_init_dict( + pdf_state * state, + pdf_buffer * buf) { - pdf_init_object(state, buf); - buf->is_dict = 1; + pdf_init_object(state, buf); + buf->is_dict = 1; } -static void pdf_set_color(pdf_buffer *buf, gfx_color_t color, - gfx_color_t *current_color, const char *op) +static void pdf_set_color( + pdf_buffer * buf, + gfx_color_t color, + gfx_color_t * current_color, + const char *op) { #if USE_PDF_FAKE_ALPHA - double a1, a2; + double a1, a2; #endif - /* gfx_color_t is RRGGBBAA */ - if (*current_color == color) - return; + /* gfx_color_t is RRGGBBAA */ + if (*current_color == color) + return; #if USE_PDF_FAKE_ALPHA - a1 = (color & 255) / 255.0; - a2 = 1 - a1; + a1 = (color & 255) / 255.0; + a2 = 1 - a1; #define pdf_color_calc(x) ( ((x) & 255) / 255.0 * a1 + a2) #else #define pdf_color_calc(x) ( ((x) & 255) / 255.0) #endif - pdf_putnumber(buf, pdf_color_calc(color >> 24)); - pdf_puts(buf, " "); - pdf_putnumber(buf, pdf_color_calc(color >> 16)); - pdf_puts(buf, " "); - pdf_putnumber(buf, pdf_color_calc(color >> 8)); - pdf_puts(buf, " "); - pdf_puts(buf, op); - pdf_puts(buf, "\n"); - *current_color = color; + pdf_putnumber(buf, pdf_color_calc(color >> 24)); + pdf_puts(buf, " "); + pdf_putnumber(buf, pdf_color_calc(color >> 16)); + pdf_puts(buf, " "); + pdf_putnumber(buf, pdf_color_calc(color >> 8)); + pdf_puts(buf, " "); + pdf_puts(buf, op); + pdf_puts(buf, "\n"); + *current_color = color; } -static void pdf_set_stroke_color(pdf_buffer *buf, gfx_color_t color) +static void pdf_set_stroke_color( + pdf_buffer * buf, + gfx_color_t color) { pdf_set_color(buf, color, &buf->state->stroke_color, "RG"); } -static void pdf_set_fill_color(pdf_buffer *buf, gfx_color_t color) +static void pdf_set_fill_color( + pdf_buffer * buf, + gfx_color_t color) { pdf_set_color(buf, color, &buf->state->fill_color, "rg"); } -static pdf_font *pdf_find_font(pdf_state *state, gfx_node_t *node) -{ - const char *ps_font = afm_get_font_postscript_name(node->filename); - pdf_font *ef; - for (ef = state->font_list; ef; ef = ef->next) { - if (!strcmp(ps_font, ef->ps_font)) - return ef; - } - return NULL; -} - -static void pdf_add_font(pdf_state *state, gfx_node_t *node) -{ - pdf_font *ef = pdf_find_font(state, node); - if (ef) - return; - ef = malloc(sizeof(pdf_font)); - if (ef == NULL) { - rrd_set_error("malloc for pdf_font"); - state->has_failed = 1; - return; - } - pdf_init_dict(state, &ef->obj); - ef->next = state->font_list; - ef->ps_font = afm_get_font_postscript_name(node->filename); - state->font_list = ef; - /* fonts dict */ - pdf_putsi(&state->fontsdict_obj, "/F"); - pdf_putint(&state->fontsdict_obj, ef->obj.id); - pdf_puts(&state->fontsdict_obj, " "); - pdf_putint(&state->fontsdict_obj, ef->obj.id); - pdf_puts(&state->fontsdict_obj, " 0 R\n"); - /* fonts def */ - pdf_putsi(&ef->obj, "/Type /Font\n"); - pdf_putsi(&ef->obj, "/Subtype /Type1\n"); - pdf_putsi(&ef->obj, "/Name /F"); - pdf_putint(&ef->obj, ef->obj.id); - pdf_puts(&ef->obj, "\n"); - pdf_putsi(&ef->obj, "/BaseFont /"); - pdf_puts(&ef->obj, ef->ps_font); - pdf_puts(&ef->obj, "\n"); - pdf_putsi(&ef->obj, "/Encoding /WinAnsiEncoding\n"); - /* 'Cp1252' (this is latin 1 extended with 27 characters; - the encoding is also known as 'winansi') - http://www.lowagie.com/iText/tutorial/ch09.html */ -} - -static void pdf_create_fonts(pdf_state *state) -{ - gfx_node_t *node; - for (node = state->canvas->firstnode; node; node = node->next) { - if (node->type == GFX_TEXT) - pdf_add_font(state, node); - } -} - -static void pdf_write_linearea(pdf_state *state, gfx_node_t *node) -{ - int i; - pdf_buffer *s = &state->graph_stream; - if (node->type == GFX_LINE) { - svg_dash dash_info; - svg_get_dash(node, &dash_info); - if (!svg_dash_equal(&dash_info, &state->dash)) { - state->dash = dash_info; - if (dash_info.dash_enable) { - pdf_puts(s, "["); - pdf_putnumber(s, dash_info.adjusted_on); - pdf_puts(s, " "); - pdf_putnumber(s, dash_info.adjusted_off); - pdf_puts(s, "] "); - pdf_putnumber(s, dash_info.dash_offset); - pdf_puts(s, " d\n"); - } else { - pdf_puts(s, "[] 0 d\n"); - } - } - pdf_set_stroke_color(s, node->color); - if (state->linecap != 1) { - pdf_puts(s, "1 j\n"); - state->linecap = 1; - } - if (state->linejoin != 1) { - pdf_puts(s, "1 J\n"); - state->linejoin = 1; - } - if (node->size != state->line_width) { - state->line_width = node->size; - pdf_putnumber(s, state->line_width); - pdf_puts(s, " w\n"); - } - } else { - pdf_set_fill_color(s, node->color); - } - for (i = 0; i < node->points; i++) { - ArtVpath *vec = node->path + i; - double x = vec->x; - double y = state->page_height - vec->y; - if (node->type == GFX_AREA) { - x += LINEOFFSET; /* adjust for libart handling of areas */ - y -= LINEOFFSET; - } - switch (vec->code) { - case ART_MOVETO_OPEN: /* fall-through */ - case ART_MOVETO: - pdf_putnumber(s, x); - pdf_puts(s, " "); - pdf_putnumber(s, y); - pdf_puts(s, " m\n"); - break; - case ART_LINETO: - pdf_putnumber(s, x); - pdf_puts(s, " "); - pdf_putnumber(s, y); - pdf_puts(s, " l\n"); - break; - case ART_CURVETO: break; /* unsupported */ - case ART_END: break; /* nop */ - } - } - if (node->type == GFX_LINE) { - pdf_puts(s, node->closed_path ? "s\n" : "S\n"); - } else { - pdf_puts(s, "f\n"); - } -} - - -static void pdf_write_matrix(pdf_state *state, gfx_node_t *node, pdf_coords *g, int useTM) -{ - char tmp[150]; - pdf_buffer *s = &state->graph_stream; - if (node->angle == 0) { - pdf_puts(s, "1 0 0 1 "); - pdf_putnumber(s, useTM ? g->tmx : g->mx); - pdf_puts(s, " "); - pdf_putnumber(s, useTM ? g->tmy : g->my); - } else { - /* can't use svg_write_number as 2 decimals is far from enough to avoid - skewed text */ - sprintf(tmp, "%f %f %f %f %f %f", - g->ma, g->mb, g->mc, g->md, - useTM ? g->tmx : g->mx, - useTM ? g->tmy : g->my); - pdf_puts(s, tmp); - } -} - -static void pdf_write_text(pdf_state *state, gfx_node_t *node, - int last_was_text, int next_is_text) -{ - pdf_coords g; - pdf_buffer *s = &state->graph_stream; - pdf_font *font = pdf_find_font(state, node); - if (font == NULL) { - rrd_set_error("font disappeared"); - state->has_failed = 1; - return; - } - pdf_calc(state->page_height, node, &g); +static pdf_font *pdf_find_font( + pdf_state * state, + gfx_node_t * node) +{ + const char *ps_font = afm_get_font_postscript_name(node->filename); + pdf_font *ef; + + for (ef = state->font_list; ef; ef = ef->next) { + if (!strcmp(ps_font, ef->ps_font)) + return ef; + } + return NULL; +} + +static void pdf_add_font( + pdf_state * state, + gfx_node_t * node) +{ + pdf_font *ef = pdf_find_font(state, node); + + if (ef) + return; + ef = malloc(sizeof(pdf_font)); + if (ef == NULL) { + rrd_set_error("malloc for pdf_font"); + state->has_failed = 1; + return; + } + pdf_init_dict(state, &ef->obj); + ef->next = state->font_list; + ef->ps_font = afm_get_font_postscript_name(node->filename); + state->font_list = ef; + /* fonts dict */ + pdf_putsi(&state->fontsdict_obj, "/F"); + pdf_putint(&state->fontsdict_obj, ef->obj.id); + pdf_puts(&state->fontsdict_obj, " "); + pdf_putint(&state->fontsdict_obj, ef->obj.id); + pdf_puts(&state->fontsdict_obj, " 0 R\n"); + /* fonts def */ + pdf_putsi(&ef->obj, "/Type /Font\n"); + pdf_putsi(&ef->obj, "/Subtype /Type1\n"); + pdf_putsi(&ef->obj, "/Name /F"); + pdf_putint(&ef->obj, ef->obj.id); + pdf_puts(&ef->obj, "\n"); + pdf_putsi(&ef->obj, "/BaseFont /"); + pdf_puts(&ef->obj, ef->ps_font); + pdf_puts(&ef->obj, "\n"); + pdf_putsi(&ef->obj, "/Encoding /WinAnsiEncoding\n"); + /* 'Cp1252' (this is latin 1 extended with 27 characters; + the encoding is also known as 'winansi') + http://www.lowagie.com/iText/tutorial/ch09.html */ +} + +static void pdf_create_fonts( + pdf_state * state) +{ + gfx_node_t *node; + + for (node = state->canvas->firstnode; node; node = node->next) { + if (node->type == GFX_TEXT) + pdf_add_font(state, node); + } +} + +static void pdf_write_linearea( + pdf_state * state, + gfx_node_t * node) +{ + int i; + pdf_buffer *s = &state->graph_stream; + + if (node->type == GFX_LINE) { + svg_dash dash_info; + + svg_get_dash(node, &dash_info); + if (!svg_dash_equal(&dash_info, &state->dash)) { + state->dash = dash_info; + if (dash_info.dash_enable) { + pdf_puts(s, "["); + pdf_putnumber(s, dash_info.adjusted_on); + pdf_puts(s, " "); + pdf_putnumber(s, dash_info.adjusted_off); + pdf_puts(s, "] "); + pdf_putnumber(s, dash_info.dash_offset); + pdf_puts(s, " d\n"); + } else { + pdf_puts(s, "[] 0 d\n"); + } + } + pdf_set_stroke_color(s, node->color); + if (state->linecap != 1) { + pdf_puts(s, "1 j\n"); + state->linecap = 1; + } + if (state->linejoin != 1) { + pdf_puts(s, "1 J\n"); + state->linejoin = 1; + } + if (node->size != state->line_width) { + state->line_width = node->size; + pdf_putnumber(s, state->line_width); + pdf_puts(s, " w\n"); + } + } else { + pdf_set_fill_color(s, node->color); + } + for (i = 0; i < node->points; i++) { + ArtVpath *vec = node->path + i; + double x = vec->x; + double y = state->page_height - vec->y; + + if (node->type == GFX_AREA) { + x += LINEOFFSET; /* adjust for libart handling of areas */ + y -= LINEOFFSET; + } + switch (vec->code) { + case ART_MOVETO_OPEN: /* fall-through */ + case ART_MOVETO: + pdf_putnumber(s, x); + pdf_puts(s, " "); + pdf_putnumber(s, y); + pdf_puts(s, " m\n"); + break; + case ART_LINETO: + pdf_putnumber(s, x); + pdf_puts(s, " "); + pdf_putnumber(s, y); + pdf_puts(s, " l\n"); + break; + case ART_CURVETO: + break; /* unsupported */ + case ART_END: + break; /* nop */ + } + } + if (node->type == GFX_LINE) { + pdf_puts(s, node->closed_path ? "s\n" : "S\n"); + } else { + pdf_puts(s, "f\n"); + } +} + + +static void pdf_write_matrix( + pdf_state * state, + gfx_node_t * node, + pdf_coords * g, + int useTM) +{ + char tmp[150]; + pdf_buffer *s = &state->graph_stream; + + if (node->angle == 0) { + pdf_puts(s, "1 0 0 1 "); + pdf_putnumber(s, useTM ? g->tmx : g->mx); + pdf_puts(s, " "); + pdf_putnumber(s, useTM ? g->tmy : g->my); + } else { + /* can't use svg_write_number as 2 decimals is far from enough to avoid + skewed text */ + sprintf(tmp, "%f %f %f %f %f %f", + g->ma, g->mb, g->mc, g->md, + useTM ? g->tmx : g->mx, useTM ? g->tmy : g->my); + pdf_puts(s, tmp); + } +} + +static void pdf_write_text( + pdf_state * state, + gfx_node_t * node, + int last_was_text, + int next_is_text) +{ + pdf_coords g; + pdf_buffer *s = &state->graph_stream; + pdf_font *font = pdf_find_font(state, node); + + if (font == NULL) { + rrd_set_error("font disappeared"); + state->has_failed = 1; + return; + } + pdf_calc(state->page_height, node, &g); #if PDF_CALC_DEBUG - pdf_puts(s, "q % debug green box\n"); - pdf_write_matrix(state, node, &g, 0); - pdf_puts(s, " cm\n"); - pdf_set_fill_color(s, 0x90FF9000); - pdf_puts(s, "0 0.4 0 rg\n"); - pdf_puts(s, "0 0 "); - pdf_putnumber(s, g.sizep.x); - pdf_puts(s, " "); - pdf_putnumber(s, g.sizep.y); - pdf_puts(s, " re\n"); - pdf_puts(s, "f\n"); - pdf_puts(s, "Q\n"); -#endif - pdf_set_fill_color(s, node->color); - if (PDF_CALC_DEBUG || !last_was_text) - pdf_puts(s, "BT\n"); - if (state->font_id != font->obj.id || node->size != state->font_size) { - state->font_id = font->obj.id; - state->font_size = node->size; - pdf_puts(s, "/F"); - pdf_putint(s, font->obj.id); + pdf_puts(s, "q % debug green box\n"); + pdf_write_matrix(state, node, &g, 0); + pdf_puts(s, " cm\n"); + pdf_set_fill_color(s, 0x90FF9000); + pdf_puts(s, "0 0.4 0 rg\n"); + pdf_puts(s, "0 0 "); + pdf_putnumber(s, g.sizep.x); pdf_puts(s, " "); - pdf_putnumber(s, node->size); - pdf_puts(s, " Tf\n"); - } - pdf_write_matrix(state, node, &g, 1); - pdf_puts(s, " Tm\n"); - pdf_puts(s, "("); - pdf_put_string_contents(s, node->text); - pdf_puts(s, ") Tj\n"); - if (PDF_CALC_DEBUG || !next_is_text) - pdf_puts(s, "ET\n"); -} - -static void pdf_write_content(pdf_state *state) -{ - gfx_node_t *node; - int last_was_text = 0, next_is_text; - for (node = state->canvas->firstnode; node; node = node->next) { - switch (node->type) { - case GFX_LINE: - case GFX_AREA: - pdf_write_linearea(state, node); - break; - case GFX_TEXT: - next_is_text = node->next && node->next->type == GFX_TEXT; - pdf_write_text(state, node, last_was_text, next_is_text); - break; - } - last_was_text = node->type == GFX_TEXT; - } -} - -static void pdf_init_document(pdf_state *state) -{ - pdf_init_buffer(state, &state->pdf_header); - pdf_init_dict(state, &state->catalog_obj); - pdf_init_dict(state, &state->info_obj); - pdf_init_dict(state, &state->pages_obj); - pdf_init_dict(state, &state->page1_obj); - pdf_init_dict(state, &state->fontsdict_obj); - pdf_create_fonts(state); - if (state->has_failed) - return; - /* make stream last object in file */ - pdf_init_object(state, &state->graph_stream); - state->graph_stream.is_stream = 1; -} - -static void pdf_setup_document(pdf_state *state) -{ - const char *creator = "RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch"; - /* all objects created by now, so init code can reference them */ - /* HEADER */ - pdf_puts(&state->pdf_header, "%PDF-1.3\n"); - /* following 8 bit comment is recommended by Adobe for - indicating binary file to file transfer applications */ - pdf_puts(&state->pdf_header, "%\xE2\xE3\xCF\xD3\n"); - /* INFO */ - pdf_putsi(&state->info_obj, "/Creator ("); - pdf_put_string_contents(&state->info_obj, creator); - pdf_puts(&state->info_obj, ")\n"); - /* CATALOG */ - pdf_putsi(&state->catalog_obj, "/Type /Catalog\n"); - pdf_putsi(&state->catalog_obj, "/Pages "); - pdf_putint(&state->catalog_obj, state->pages_obj.id); - pdf_puts(&state->catalog_obj, " 0 R\n"); - /* PAGES */ - pdf_putsi(&state->pages_obj, "/Type /Pages\n"); - pdf_putsi(&state->pages_obj, "/Kids ["); - pdf_putint(&state->pages_obj, state->page1_obj.id); - pdf_puts(&state->pages_obj, " 0 R]\n"); - pdf_putsi(&state->pages_obj, "/Count 1\n"); - /* PAGE 1 */ - pdf_putsi(&state->page1_obj, "/Type /Page\n"); - pdf_putsi(&state->page1_obj, "/Parent "); - pdf_putint(&state->page1_obj, state->pages_obj.id); - pdf_puts(&state->page1_obj, " 0 R\n"); - pdf_putsi(&state->page1_obj, "/MediaBox [0 0 "); - pdf_putint(&state->page1_obj, state->page_width); - pdf_puts(&state->page1_obj, " "); - pdf_putint(&state->page1_obj, state->page_height); - pdf_puts(&state->page1_obj, "]\n"); - pdf_putsi(&state->page1_obj, "/Contents "); - pdf_putint(&state->page1_obj, state->graph_stream.id); - pdf_puts(&state->page1_obj, " 0 R\n"); - pdf_putsi(&state->page1_obj, "/Resources << /Font "); - pdf_putint(&state->page1_obj, state->fontsdict_obj.id); - pdf_puts(&state->page1_obj, " 0 R >>\n"); -} - -static void pdf_write_string_to_file(pdf_state *state, const char *text) + pdf_putnumber(s, g.sizep.y); + pdf_puts(s, " re\n"); + pdf_puts(s, "f\n"); + pdf_puts(s, "Q\n"); +#endif + pdf_set_fill_color(s, node->color); + if (PDF_CALC_DEBUG || !last_was_text) + pdf_puts(s, "BT\n"); + if (state->font_id != font->obj.id || node->size != state->font_size) { + state->font_id = font->obj.id; + state->font_size = node->size; + pdf_puts(s, "/F"); + pdf_putint(s, font->obj.id); + pdf_puts(s, " "); + pdf_putnumber(s, node->size); + pdf_puts(s, " Tf\n"); + } + pdf_write_matrix(state, node, &g, 1); + pdf_puts(s, " Tm\n"); + pdf_puts(s, "("); + pdf_put_string_contents(s, node->text); + pdf_puts(s, ") Tj\n"); + if (PDF_CALC_DEBUG || !next_is_text) + pdf_puts(s, "ET\n"); +} + +static void pdf_write_content( + pdf_state * state) +{ + gfx_node_t *node; + int last_was_text = 0, next_is_text; + + for (node = state->canvas->firstnode; node; node = node->next) { + switch (node->type) { + case GFX_LINE: + case GFX_AREA: + pdf_write_linearea(state, node); + break; + case GFX_TEXT: + next_is_text = node->next && node->next->type == GFX_TEXT; + pdf_write_text(state, node, last_was_text, next_is_text); + break; + } + last_was_text = node->type == GFX_TEXT; + } +} + +static void pdf_init_document( + pdf_state * state) +{ + pdf_init_buffer(state, &state->pdf_header); + pdf_init_dict(state, &state->catalog_obj); + pdf_init_dict(state, &state->info_obj); + pdf_init_dict(state, &state->pages_obj); + pdf_init_dict(state, &state->page1_obj); + pdf_init_dict(state, &state->fontsdict_obj); + pdf_create_fonts(state); + if (state->has_failed) + return; + /* make stream last object in file */ + pdf_init_object(state, &state->graph_stream); + state->graph_stream.is_stream = 1; +} + +static void pdf_setup_document( + pdf_state * state) +{ + const char *creator = + "RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch"; + /* all objects created by now, so init code can reference them */ + /* HEADER */ + pdf_puts(&state->pdf_header, "%PDF-1.3\n"); + /* following 8 bit comment is recommended by Adobe for + indicating binary file to file transfer applications */ + pdf_puts(&state->pdf_header, "%\xE2\xE3\xCF\xD3\n"); + /* INFO */ + pdf_putsi(&state->info_obj, "/Creator ("); + pdf_put_string_contents(&state->info_obj, creator); + pdf_puts(&state->info_obj, ")\n"); + /* CATALOG */ + pdf_putsi(&state->catalog_obj, "/Type /Catalog\n"); + pdf_putsi(&state->catalog_obj, "/Pages "); + pdf_putint(&state->catalog_obj, state->pages_obj.id); + pdf_puts(&state->catalog_obj, " 0 R\n"); + /* PAGES */ + pdf_putsi(&state->pages_obj, "/Type /Pages\n"); + pdf_putsi(&state->pages_obj, "/Kids ["); + pdf_putint(&state->pages_obj, state->page1_obj.id); + pdf_puts(&state->pages_obj, " 0 R]\n"); + pdf_putsi(&state->pages_obj, "/Count 1\n"); + /* PAGE 1 */ + pdf_putsi(&state->page1_obj, "/Type /Page\n"); + pdf_putsi(&state->page1_obj, "/Parent "); + pdf_putint(&state->page1_obj, state->pages_obj.id); + pdf_puts(&state->page1_obj, " 0 R\n"); + pdf_putsi(&state->page1_obj, "/MediaBox [0 0 "); + pdf_putint(&state->page1_obj, state->page_width); + pdf_puts(&state->page1_obj, " "); + pdf_putint(&state->page1_obj, state->page_height); + pdf_puts(&state->page1_obj, "]\n"); + pdf_putsi(&state->page1_obj, "/Contents "); + pdf_putint(&state->page1_obj, state->graph_stream.id); + pdf_puts(&state->page1_obj, " 0 R\n"); + pdf_putsi(&state->page1_obj, "/Resources << /Font "); + pdf_putint(&state->page1_obj, state->fontsdict_obj.id); + pdf_puts(&state->page1_obj, " 0 R >>\n"); +} + +static void pdf_write_string_to_file( + pdf_state * state, + const char *text) { fputs(text, state->fp); state->pdf_file_pos += strlen(text); } -static void pdf_write_buf_to_file(pdf_state *state, pdf_buffer *buf) -{ - char tmp[40]; - buf->pdf_file_pos = state->pdf_file_pos; - if (buf->is_obj) { - snprintf(tmp, sizeof(tmp), "%d 0 obj\n", buf->id); - pdf_write_string_to_file(state, tmp); - } - if (buf->is_dict) - pdf_write_string_to_file(state, "<<\n"); - if (buf->is_stream) { - snprintf(tmp, sizeof(tmp), "<< /Length %d >>\n", buf->current_size); - pdf_write_string_to_file(state, tmp); - pdf_write_string_to_file(state, "stream\n"); - } - fwrite(buf->data, 1, buf->current_size, state->fp); - state->pdf_file_pos += buf->current_size; - if (buf->is_stream) - pdf_write_string_to_file(state, "endstream\n"); - if (buf->is_dict) - pdf_write_string_to_file(state, ">>\n"); - if (buf->is_obj) - pdf_write_string_to_file(state, "endobj\n"); -} - -static void pdf_write_to_file(pdf_state *state) -{ - pdf_buffer *buf = state->first_buffer; - int xref_pos; - state->pdf_file_pos = 0; - pdf_write_buf_to_file(state, &state->pdf_header); - while (buf) { - if (buf->is_obj) - pdf_write_buf_to_file(state, buf); - buf = buf->next_buffer; - } - xref_pos = state->pdf_file_pos; - fprintf(state->fp, "xref\n"); - fprintf(state->fp, "%d %d\n", 0, state->last_obj_id + 1); - /* TOC lines must be exactly 20 bytes including \n */ - fprintf(state->fp, "%010d %05d f\x20\n", 0, 65535); - for (buf = state->first_buffer; buf; buf = buf->next_buffer) { +static void pdf_write_buf_to_file( + pdf_state * state, + pdf_buffer * buf) +{ + char tmp[40]; + + buf->pdf_file_pos = state->pdf_file_pos; + if (buf->is_obj) { + snprintf(tmp, sizeof(tmp), "%d 0 obj\n", buf->id); + pdf_write_string_to_file(state, tmp); + } + if (buf->is_dict) + pdf_write_string_to_file(state, "<<\n"); + if (buf->is_stream) { + snprintf(tmp, sizeof(tmp), "<< /Length %d >>\n", buf->current_size); + pdf_write_string_to_file(state, tmp); + pdf_write_string_to_file(state, "stream\n"); + } + fwrite(buf->data, 1, buf->current_size, state->fp); + state->pdf_file_pos += buf->current_size; + if (buf->is_stream) + pdf_write_string_to_file(state, "endstream\n"); + if (buf->is_dict) + pdf_write_string_to_file(state, ">>\n"); if (buf->is_obj) - fprintf(state->fp, "%010d %05d n\x20\n", buf->pdf_file_pos, 0); - } - fprintf(state->fp, "trailer\n"); - fprintf(state->fp, "<<\n"); - fprintf(state->fp, "\t/Size %d\n", state->last_obj_id + 1); - fprintf(state->fp, "\t/Root %d 0 R\n", state->catalog_obj.id); - fprintf(state->fp, "\t/Info %d 0 R\n", state->info_obj.id); - fprintf(state->fp, ">>\n"); - fprintf(state->fp, "startxref\n"); - fprintf(state->fp, "%d\n", xref_pos); - fputs("%%EOF\n", state->fp); -} - -static void pdf_free_resources(pdf_state *state) -{ - pdf_buffer *buf = state->first_buffer; - while (buf) { - free(buf->data); - buf->data = NULL; - buf->alloc_size = buf->current_size = 0; - buf = buf->next_buffer; - } - while (state->font_list) { - pdf_font *next = state->font_list->next; - free(state->font_list); - state->font_list = next; - } -} - -int gfx_render_pdf (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t UNUSED(background), FILE *fp){ - struct pdf_state state; - memset(&state, 0, sizeof(pdf_state)); - state.fp = fp; - state.canvas = canvas; - state.page_width = width; - state.page_height = height; - state.font_id = -1; - state.font_size = -1; - state.font_list = NULL; - state.linecap = -1; - state.linejoin = -1; - pdf_init_document(&state); - /* - pdf_set_color(&state, background); - fprintf(fp, "0 0 M 0 %d L %d %d L %d 0 L fill\n", - height, width, height, width); - */ - if (!state.has_failed) - pdf_write_content(&state); - if (!state.has_failed) - pdf_setup_document(&state); - if (!state.has_failed) - pdf_write_to_file(&state); - pdf_free_resources(&state); - return state.has_failed ? -1 : 0; + pdf_write_string_to_file(state, "endobj\n"); } +static void pdf_write_to_file( + pdf_state * state) +{ + pdf_buffer *buf = state->first_buffer; + int xref_pos; + + state->pdf_file_pos = 0; + pdf_write_buf_to_file(state, &state->pdf_header); + while (buf) { + if (buf->is_obj) + pdf_write_buf_to_file(state, buf); + buf = buf->next_buffer; + } + xref_pos = state->pdf_file_pos; + fprintf(state->fp, "xref\n"); + fprintf(state->fp, "%d %d\n", 0, state->last_obj_id + 1); + /* TOC lines must be exactly 20 bytes including \n */ + fprintf(state->fp, "%010d %05d f\x20\n", 0, 65535); + for (buf = state->first_buffer; buf; buf = buf->next_buffer) { + if (buf->is_obj) + fprintf(state->fp, "%010d %05d n\x20\n", buf->pdf_file_pos, 0); + } + fprintf(state->fp, "trailer\n"); + fprintf(state->fp, "<<\n"); + fprintf(state->fp, "\t/Size %d\n", state->last_obj_id + 1); + fprintf(state->fp, "\t/Root %d 0 R\n", state->catalog_obj.id); + fprintf(state->fp, "\t/Info %d 0 R\n", state->info_obj.id); + fprintf(state->fp, ">>\n"); + fprintf(state->fp, "startxref\n"); + fprintf(state->fp, "%d\n", xref_pos); + fputs("%%EOF\n", state->fp); +} + +static void pdf_free_resources( + pdf_state * state) +{ + pdf_buffer *buf = state->first_buffer; + + while (buf) { + free(buf->data); + buf->data = NULL; + buf->alloc_size = buf->current_size = 0; + buf = buf->next_buffer; + } + while (state->font_list) { + pdf_font *next = state->font_list->next; + + free(state->font_list); + state->font_list = next; + } +} + +int gfx_render_pdf( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t UNUSED(background), + FILE * fp) +{ + struct pdf_state state; + + memset(&state, 0, sizeof(pdf_state)); + state.fp = fp; + state.canvas = canvas; + state.page_width = width; + state.page_height = height; + state.font_id = -1; + state.font_size = -1; + state.font_list = NULL; + state.linecap = -1; + state.linejoin = -1; + pdf_init_document(&state); + /* + pdf_set_color(&state, background); + fprintf(fp, "0 0 M 0 %d L %d %d L %d 0 L fill\n", + height, width, height, width); + */ + if (!state.has_failed) + pdf_write_content(&state); + if (!state.has_failed) + pdf_setup_document(&state); + if (!state.has_failed) + pdf_write_to_file(&state); + pdf_free_resources(&state); + return state.has_failed ? -1 : 0; +} diff --git a/src/rrd_gfx.h b/src/rrd_gfx.h index 40b0ee0..dcfe48f 100644 --- a/src/rrd_gfx.h +++ b/src/rrd_gfx.h @@ -19,117 +19,165 @@ #undef y1 -enum gfx_if_en {IF_PNG=0,IF_SVG,IF_EPS,IF_PDF}; -enum gfx_en { GFX_LINE=0,GFX_AREA,GFX_TEXT }; -enum gfx_h_align_en { GFX_H_NULL=0, GFX_H_LEFT, GFX_H_RIGHT, GFX_H_CENTER }; -enum gfx_v_align_en { GFX_V_NULL=0, GFX_V_TOP, GFX_V_BOTTOM, GFX_V_CENTER }; -enum gfx_aa_type_en {AA_NORMAL=0,AA_LIGHT,AA_NONE}; +enum gfx_if_en { IF_PNG = 0, IF_SVG, IF_EPS, IF_PDF }; +enum gfx_en { GFX_LINE = 0, GFX_AREA, GFX_TEXT }; +enum gfx_h_align_en { GFX_H_NULL = 0, GFX_H_LEFT, GFX_H_RIGHT, GFX_H_CENTER }; +enum gfx_v_align_en { GFX_V_NULL = 0, GFX_V_TOP, GFX_V_BOTTOM, GFX_V_CENTER }; +enum gfx_aa_type_en { AA_NORMAL = 0, AA_LIGHT, AA_NONE }; typedef unsigned long gfx_color_t; -typedef struct gfx_node_t { - enum gfx_en type; /* type of graph element */ - gfx_color_t color; /* color of element 0xRRGGBBAA alpha 0xff is solid*/ - double size; /* font size, line width */ - double dash_on, dash_off; /* dash line fragments lengths */ - int closed_path; - int points; - int points_max; - char *filename; /* font or image filename */ - char *text; - ArtVpath *path; /* path */ - double x,y; /* position */ - double angle; /* text angle */ - enum gfx_h_align_en halign; /* text alignement */ - enum gfx_v_align_en valign; /* text alignement */ - double tabwidth; - struct gfx_node_t *next; +typedef struct gfx_node_t { + enum gfx_en type; /* type of graph element */ + gfx_color_t color; /* color of element 0xRRGGBBAA alpha 0xff is solid */ + double size; /* font size, line width */ + double dash_on, dash_off; /* dash line fragments lengths */ + int closed_path; + int points; + int points_max; + char *filename; /* font or image filename */ + char *text; + ArtVpath *path; /* path */ + double x, y; /* position */ + double angle; /* text angle */ + enum gfx_h_align_en halign; /* text alignement */ + enum gfx_v_align_en valign; /* text alignement */ + double tabwidth; + struct gfx_node_t *next; } gfx_node_t; -typedef struct gfx_canvas_t -{ +typedef struct gfx_canvas_t { struct gfx_node_t *firstnode; struct gfx_node_t *lastnode; - enum gfx_if_en imgformat; /* image format */ - int interlaced; /* will the graph be interlaced? */ - double zoom; /* zoom for graph */ - double font_aa_threshold; /* no anti-aliasing for sizes <= */ - enum gfx_aa_type_en aa_type; /* anti-aliasing type (normal/light/none) */ + enum gfx_if_en imgformat; /* image format */ + int interlaced; /* will the graph be interlaced? */ + double zoom; /* zoom for graph */ + double font_aa_threshold; /* no anti-aliasing for sizes <= */ + enum gfx_aa_type_en aa_type; /* anti-aliasing type (normal/light/none) */ } gfx_canvas_t; -gfx_canvas_t *gfx_new_canvas (void); +gfx_canvas_t *gfx_new_canvas( + void); /* create a new line */ -gfx_node_t *gfx_new_line (gfx_canvas_t *canvas, - double X0, double Y0, - double X1, double Y1, - double width, gfx_color_t color); - -gfx_node_t *gfx_new_dashed_line (gfx_canvas_t *canvas, - double X0, double Y0, - double X1, double Y1, - double width, gfx_color_t color, - double dash_on, double dash_off); +gfx_node_t *gfx_new_line( + gfx_canvas_t * canvas, + double X0, + double Y0, + double X1, + double Y1, + double width, + gfx_color_t color); + +gfx_node_t *gfx_new_dashed_line( + gfx_canvas_t * canvas, + double X0, + double Y0, + double X1, + double Y1, + double width, + gfx_color_t color, + double dash_on, + double dash_off); /* create a new area */ -gfx_node_t *gfx_new_area (gfx_canvas_t *canvas, - double X0, double Y0, - double X1, double Y1, - double X2, double Y2, - gfx_color_t color); +gfx_node_t *gfx_new_area( + gfx_canvas_t * canvas, + double X0, + double Y0, + double X1, + double Y1, + double X2, + double Y2, + gfx_color_t color); /* add a point to a line or to an area */ -int gfx_add_point (gfx_node_t *node, double x, double y); +int gfx_add_point( + gfx_node_t * node, + double x, + double y); /* close current path so it ends at the same point as it started */ -void gfx_close_path (gfx_node_t *node); +void gfx_close_path( + gfx_node_t * node); /* create a text node */ -gfx_node_t *gfx_new_text (gfx_canvas_t *canvas, - double x, double y, gfx_color_t color, - char* font, double size, - double tabwidth, double angle, - enum gfx_h_align_en h_align, - enum gfx_v_align_en v_align, - char* text); +gfx_node_t *gfx_new_text( + gfx_canvas_t * canvas, + double x, + double y, + gfx_color_t color, + char *font, + double size, + double tabwidth, + double angle, + enum gfx_h_align_en h_align, + enum gfx_v_align_en v_align, + char *text); /* measure width of a text string */ -double gfx_get_text_width ( gfx_canvas_t *canvas, - double start, char* font, double size, - double tabwidth, char* text, int rotation); +double gfx_get_text_width( + gfx_canvas_t * canvas, + double start, + char *font, + double size, + double tabwidth, + char *text, + int rotation); /* save image to file */ -int gfx_render (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fo); +int gfx_render( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fo); /* free memory used by nodes this will also remove memory required for node chain and associated material */ -int gfx_destroy (gfx_canvas_t *canvas); +int gfx_destroy( + gfx_canvas_t * canvas); /* PNG support*/ -int gfx_render_png (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fo); -double gfx_get_text_width_libart ( gfx_canvas_t *canvas, double start, - char* font, double size, double tabwidth, - char* text, int rotation ); +int gfx_render_png( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fo); +double gfx_get_text_width_libart( + gfx_canvas_t * canvas, + double start, + char *font, + double size, + double tabwidth, + char *text, + int rotation); /* SVG support */ -int gfx_render_svg (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fo); +int gfx_render_svg( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fo); /* EPS support */ -int gfx_render_eps (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fo); +int gfx_render_eps( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fo); /* PDF support */ -int gfx_render_pdf (gfx_canvas_t *canvas, - art_u32 width, art_u32 height, - gfx_color_t background, FILE *fo); +int gfx_render_pdf( + gfx_canvas_t * canvas, + art_u32 width, + art_u32 height, + gfx_color_t background, + FILE * fo); #endif diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 22439b5..5154210 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -36,68 +36,121 @@ #define RRD_DEFAULT_FONT "DejaVuSansMono-Roman.ttf" #endif -text_prop_t text_prop[] = { - { 8.0, RRD_DEFAULT_FONT }, /* default */ - { 9.0, RRD_DEFAULT_FONT }, /* title */ - { 7.0, RRD_DEFAULT_FONT }, /* axis */ - { 8.0, RRD_DEFAULT_FONT }, /* unit */ - { 8.0, RRD_DEFAULT_FONT } /* legend */ +text_prop_t text_prop[] = { + {8.0, RRD_DEFAULT_FONT} + , /* default */ + {9.0, RRD_DEFAULT_FONT} + , /* title */ + {7.0, RRD_DEFAULT_FONT} + , /* axis */ + {8.0, RRD_DEFAULT_FONT} + , /* unit */ + {8.0, RRD_DEFAULT_FONT} /* legend */ }; -xlab_t xlab[] = { - {0, 0, TMT_SECOND,30, TMT_MINUTE,5, TMT_MINUTE,5, 0,"%H:%M"}, - {2, 0, TMT_MINUTE,1, TMT_MINUTE,5, TMT_MINUTE,5, 0,"%H:%M"}, - {5, 0, TMT_MINUTE,2, TMT_MINUTE,10, TMT_MINUTE,10, 0,"%H:%M"}, - {10, 0, TMT_MINUTE,5, TMT_MINUTE,20, TMT_MINUTE,20, 0,"%H:%M"}, - {30, 0, TMT_MINUTE,10, TMT_HOUR,1, TMT_HOUR,1, 0,"%H:%M"}, - {60, 0, TMT_MINUTE,30, TMT_HOUR,2, TMT_HOUR,2, 0,"%H:%M"}, - {60, 24*3600, TMT_MINUTE,30, TMT_HOUR,2, TMT_HOUR,4, 0,"%a %H:%M"}, - {180, 0, TMT_HOUR,1, TMT_HOUR,6, TMT_HOUR,6, 0,"%H:%M"}, - {180, 24*3600, TMT_HOUR,1, TMT_HOUR,6, TMT_HOUR,12, 0,"%a %H:%M"}, - /*{300, 0, TMT_HOUR,3, TMT_HOUR,12, TMT_HOUR,12, 12*3600,"%a %p"}, this looks silly*/ - {600, 0, TMT_HOUR,6, TMT_DAY,1, TMT_DAY,1, 24*3600,"%a"}, - {1200, 0, TMT_HOUR,6, TMT_DAY,1, TMT_DAY,1, 24*3600,"%d"}, - {1800, 0, TMT_HOUR,12, TMT_DAY,1, TMT_DAY,2, 24*3600,"%a %d"}, - {2400, 0, TMT_HOUR,12, TMT_DAY,1, TMT_DAY,2, 24*3600,"%a"}, - {3600, 0, TMT_DAY,1, TMT_WEEK,1, TMT_WEEK,1, 7*24*3600,"Week %V"}, - {3*3600, 0, TMT_WEEK,1, TMT_MONTH,1, TMT_WEEK,2, 7*24*3600,"Week %V"}, - {6*3600, 0, TMT_MONTH,1, TMT_MONTH,1, TMT_MONTH,1, 30*24*3600,"%b"}, - {48*3600, 0, TMT_MONTH,1, TMT_MONTH,3, TMT_MONTH,3, 30*24*3600,"%b"}, - {315360, 0, TMT_MONTH,3, TMT_YEAR,1, TMT_YEAR,1, 365*24*3600,"%Y"}, - {10*24*3600, 0, TMT_YEAR,1, TMT_YEAR,1, TMT_YEAR,1, 365*24*3600,"%y"}, - {-1,0,TMT_MONTH,0,TMT_MONTH,0,TMT_MONTH,0,0,""} +xlab_t xlab[] = { + {0, 0, TMT_SECOND, 30, TMT_MINUTE, 5, TMT_MINUTE, 5, 0, "%H:%M"} + , + {2, 0, TMT_MINUTE, 1, TMT_MINUTE, 5, TMT_MINUTE, 5, 0, "%H:%M"} + , + {5, 0, TMT_MINUTE, 2, TMT_MINUTE, 10, TMT_MINUTE, 10, 0, "%H:%M"} + , + {10, 0, TMT_MINUTE, 5, TMT_MINUTE, 20, TMT_MINUTE, 20, 0, "%H:%M"} + , + {30, 0, TMT_MINUTE, 10, TMT_HOUR, 1, TMT_HOUR, 1, 0, "%H:%M"} + , + {60, 0, TMT_MINUTE, 30, TMT_HOUR, 2, TMT_HOUR, 2, 0, "%H:%M"} + , + {60, 24 * 3600, TMT_MINUTE, 30, TMT_HOUR, 2, TMT_HOUR, 4, 0, "%a %H:%M"} + , + {180, 0, TMT_HOUR, 1, TMT_HOUR, 6, TMT_HOUR, 6, 0, "%H:%M"} + , + {180, 24 * 3600, TMT_HOUR, 1, TMT_HOUR, 6, TMT_HOUR, 12, 0, "%a %H:%M"} + , + /*{300, 0, TMT_HOUR,3, TMT_HOUR,12, TMT_HOUR,12, 12*3600,"%a %p"}, this looks silly */ + {600, 0, TMT_HOUR, 6, TMT_DAY, 1, TMT_DAY, 1, 24 * 3600, "%a"} + , + {1200, 0, TMT_HOUR, 6, TMT_DAY, 1, TMT_DAY, 1, 24 * 3600, "%d"} + , + {1800, 0, TMT_HOUR, 12, TMT_DAY, 1, TMT_DAY, 2, 24 * 3600, "%a %d"} + , + {2400, 0, TMT_HOUR, 12, TMT_DAY, 1, TMT_DAY, 2, 24 * 3600, "%a"} + , + {3600, 0, TMT_DAY, 1, TMT_WEEK, 1, TMT_WEEK, 1, 7 * 24 * 3600, "Week %V"} + , + {3 * 3600, 0, TMT_WEEK, 1, TMT_MONTH, 1, TMT_WEEK, 2, 7 * 24 * 3600, + "Week %V"} + , + {6 * 3600, 0, TMT_MONTH, 1, TMT_MONTH, 1, TMT_MONTH, 1, 30 * 24 * 3600, + "%b"} + , + {48 * 3600, 0, TMT_MONTH, 1, TMT_MONTH, 3, TMT_MONTH, 3, 30 * 24 * 3600, + "%b"} + , + {315360, 0, TMT_MONTH, 3, TMT_YEAR, 1, TMT_YEAR, 1, 365 * 24 * 3600, "%Y"} + , + {10 * 24 * 3600, 0, TMT_YEAR, 1, TMT_YEAR, 1, TMT_YEAR, 1, + 365 * 24 * 3600, "%y"} + , + {-1, 0, TMT_MONTH, 0, TMT_MONTH, 0, TMT_MONTH, 0, 0, ""} }; /* sensible y label intervals ...*/ -ylab_t ylab[]= { - {0.1, {1,2, 5,10}}, - {0.2, {1,5,10,20}}, - {0.5, {1,2, 4,10}}, - {1.0, {1,2, 5,10}}, - {2.0, {1,5,10,20}}, - {5.0, {1,2, 4,10}}, - {10.0, {1,2, 5,10}}, - {20.0, {1,5,10,20}}, - {50.0, {1,2, 4,10}}, - {100.0, {1,2, 5,10}}, - {200.0, {1,5,10,20}}, - {500.0, {1,2, 4,10}}, - {0.0, {0,0,0,0}}}; +ylab_t ylab[] = { + {0.1, {1, 2, 5, 10} + } + , + {0.2, {1, 5, 10, 20} + } + , + {0.5, {1, 2, 4, 10} + } + , + {1.0, {1, 2, 5, 10} + } + , + {2.0, {1, 5, 10, 20} + } + , + {5.0, {1, 2, 4, 10} + } + , + {10.0, {1, 2, 5, 10} + } + , + {20.0, {1, 5, 10, 20} + } + , + {50.0, {1, 2, 4, 10} + } + , + {100.0, {1, 2, 5, 10} + } + , + {200.0, {1, 5, 10, 20} + } + , + {500.0, {1, 2, 4, 10} + } + , + {0.0, {0, 0, 0, 0} + } +}; gfx_color_t graph_col[] = /* default colors */ -{ 0xFFFFFFFF, /* canvas */ - 0xF0F0F0FF, /* background */ - 0xD0D0D0FF, /* shade A */ - 0xA0A0A0FF, /* shade B */ - 0x90909080, /* grid */ - 0xE0505080, /* major grid */ - 0x000000FF, /* font */ - 0x802020FF, /* arrow */ - 0x202020FF, /* axis */ - 0x000000FF /* frame */ -}; +{ 0xFFFFFFFF, /* canvas */ + 0xF0F0F0FF, /* background */ + 0xD0D0D0FF, /* shade A */ + 0xA0A0A0FF, /* shade B */ + 0x90909080, /* grid */ + 0xE0505080, /* major grid */ + 0x000000FF, /* font */ + 0x802020FF, /* arrow */ + 0x202020FF, /* axis */ + 0x000000FF /* frame */ +}; /* #define DEBUG */ @@ -110,47 +163,53 @@ gfx_color_t graph_col[] = /* default colors */ /* initialize with xtr(im,0); */ -int -xtr(image_desc_t *im,time_t mytime){ +int xtr( + image_desc_t * im, + time_t mytime) +{ static double pixie; - if (mytime==0){ - pixie = (double) im->xsize / (double)(im->end - im->start); + + if (mytime == 0) { + pixie = (double) im->xsize / (double) (im->end - im->start); return im->xorigin; } - return (int)((double)im->xorigin - + pixie * ( mytime - im->start ) ); + return (int) ((double) im->xorigin + pixie * (mytime - im->start)); } /* translate data values into y coordinates */ -double -ytr(image_desc_t *im, double value){ +double ytr( + image_desc_t * im, + double value) +{ static double pixie; - double yval; - if (isnan(value)){ - if(!im->logarithmic) - pixie = (double) im->ysize / (im->maxval - im->minval); - else - pixie = (double) im->ysize / (log10(im->maxval) - log10(im->minval)); - yval = im->yorigin; - } else if(!im->logarithmic) { - yval = im->yorigin - pixie * (value - im->minval); - } else { - if (value < im->minval) { + double yval; + + if (isnan(value)) { + if (!im->logarithmic) + pixie = (double) im->ysize / (im->maxval - im->minval); + else + pixie = + (double) im->ysize / (log10(im->maxval) - log10(im->minval)); yval = im->yorigin; - } else { - yval = im->yorigin - pixie * (log10(value) - log10(im->minval)); - } + } else if (!im->logarithmic) { + yval = im->yorigin - pixie * (value - im->minval); + } else { + if (value < im->minval) { + yval = im->yorigin; + } else { + yval = im->yorigin - pixie * (log10(value) - log10(im->minval)); + } } /* make sure we don't return anything too unreasonable. GD lib can get terribly slow when drawing lines outside its scope. This is especially problematic in connection with the rigid option */ - if (! im->rigid) { - /* keep yval as-is */ + if (!im->rigid) { + /* keep yval as-is */ } else if (yval > im->yorigin) { - yval = im->yorigin +0.00001; - } else if (yval < im->yorigin - im->ysize){ - yval = im->yorigin - im->ysize - 0.00001; - } + yval = im->yorigin + 0.00001; + } else if (yval < im->yorigin - im->ysize) { + yval = im->yorigin - im->ysize - 0.00001; + } return yval; } @@ -162,98 +221,109 @@ ytr(image_desc_t *im, double value){ #define conv_if(VV,VVV) \ if (strcmp(#VV, string) == 0) return VVV ; -enum gf_en gf_conv(char *string){ - - conv_if(PRINT,GF_PRINT) - conv_if(GPRINT,GF_GPRINT) - conv_if(COMMENT,GF_COMMENT) - conv_if(HRULE,GF_HRULE) - conv_if(VRULE,GF_VRULE) - conv_if(LINE,GF_LINE) - conv_if(AREA,GF_AREA) - conv_if(STACK,GF_STACK) - conv_if(TICK,GF_TICK) - conv_if(DEF,GF_DEF) - conv_if(CDEF,GF_CDEF) - conv_if(VDEF,GF_VDEF) +enum gf_en gf_conv( + char *string) +{ + + conv_if(PRINT, GF_PRINT) + conv_if(GPRINT, GF_GPRINT) + conv_if(COMMENT, GF_COMMENT) + conv_if(HRULE, GF_HRULE) + conv_if(VRULE, GF_VRULE) + conv_if(LINE, GF_LINE) + conv_if(AREA, GF_AREA) + conv_if(STACK, GF_STACK) + conv_if(TICK, GF_TICK) + conv_if(DEF, GF_DEF) + conv_if(CDEF, GF_CDEF) + conv_if(VDEF, GF_VDEF) #ifdef WITH_PIECHART - conv_if(PART,GF_PART) + conv_if(PART, GF_PART) #endif - conv_if(XPORT,GF_XPORT) - conv_if(SHIFT,GF_SHIFT) - - return (-1); + conv_if(XPORT, GF_XPORT) + conv_if(SHIFT, GF_SHIFT) + + return (-1); } -enum gfx_if_en if_conv(char *string){ - - conv_if(PNG,IF_PNG) - conv_if(SVG,IF_SVG) - conv_if(EPS,IF_EPS) - conv_if(PDF,IF_PDF) +enum gfx_if_en if_conv( + char *string) +{ + + conv_if(PNG, IF_PNG) + conv_if(SVG, IF_SVG) + conv_if(EPS, IF_EPS) + conv_if(PDF, IF_PDF) - return (-1); + return (-1); } -enum tmt_en tmt_conv(char *string){ +enum tmt_en tmt_conv( + char *string) +{ - conv_if(SECOND,TMT_SECOND) - conv_if(MINUTE,TMT_MINUTE) - conv_if(HOUR,TMT_HOUR) - conv_if(DAY,TMT_DAY) - conv_if(WEEK,TMT_WEEK) - conv_if(MONTH,TMT_MONTH) - conv_if(YEAR,TMT_YEAR) - return (-1); + conv_if(SECOND, TMT_SECOND) + conv_if(MINUTE, TMT_MINUTE) + conv_if(HOUR, TMT_HOUR) + conv_if(DAY, TMT_DAY) + conv_if(WEEK, TMT_WEEK) + conv_if(MONTH, TMT_MONTH) + conv_if(YEAR, TMT_YEAR) + return (-1); } -enum grc_en grc_conv(char *string){ +enum grc_en grc_conv( + char *string) +{ - conv_if(BACK,GRC_BACK) - conv_if(CANVAS,GRC_CANVAS) - conv_if(SHADEA,GRC_SHADEA) - conv_if(SHADEB,GRC_SHADEB) - conv_if(GRID,GRC_GRID) - conv_if(MGRID,GRC_MGRID) - conv_if(FONT,GRC_FONT) - conv_if(ARROW,GRC_ARROW) - conv_if(AXIS,GRC_AXIS) - conv_if(FRAME,GRC_FRAME) + conv_if(BACK, GRC_BACK) + conv_if(CANVAS, GRC_CANVAS) + conv_if(SHADEA, GRC_SHADEA) + conv_if(SHADEB, GRC_SHADEB) + conv_if(GRID, GRC_GRID) + conv_if(MGRID, GRC_MGRID) + conv_if(FONT, GRC_FONT) + conv_if(ARROW, GRC_ARROW) + conv_if(AXIS, GRC_AXIS) + conv_if(FRAME, GRC_FRAME) - return -1; + return -1; } -enum text_prop_en text_prop_conv(char *string){ - - conv_if(DEFAULT,TEXT_PROP_DEFAULT) - conv_if(TITLE,TEXT_PROP_TITLE) - conv_if(AXIS,TEXT_PROP_AXIS) - conv_if(UNIT,TEXT_PROP_UNIT) - conv_if(LEGEND,TEXT_PROP_LEGEND) - return -1; +enum text_prop_en text_prop_conv( + char *string) +{ + + conv_if(DEFAULT, TEXT_PROP_DEFAULT) + conv_if(TITLE, TEXT_PROP_TITLE) + conv_if(AXIS, TEXT_PROP_AXIS) + conv_if(UNIT, TEXT_PROP_UNIT) + conv_if(LEGEND, TEXT_PROP_LEGEND) + return -1; } #undef conv_if -int -im_free(image_desc_t *im) +int im_free( + image_desc_t * im) { - unsigned long i,ii; - - if (im == NULL) return 0; - for(i=0;i<(unsigned)im->gdes_c;i++){ - if (im->gdes[i].data_first){ - /* careful here, because a single pointer can occur several times */ - free (im->gdes[i].data); - if (im->gdes[i].ds_namv){ - for (ii=0;iigdes[i].ds_cnt;ii++) - free(im->gdes[i].ds_namv[ii]); - free(im->gdes[i].ds_namv); - } - } - free (im->gdes[i].p_data); - free (im->gdes[i].rpnp); + unsigned long i, ii; + + if (im == NULL) + return 0; + for (i = 0; i < (unsigned) im->gdes_c; i++) { + if (im->gdes[i].data_first) { + /* careful here, because a single pointer can occur several times */ + free(im->gdes[i].data); + if (im->gdes[i].ds_namv) { + for (ii = 0; ii < im->gdes[i].ds_cnt; ii++) + free(im->gdes[i].ds_namv[ii]); + free(im->gdes[i].ds_namv); + } + } + free(im->gdes[i].p_data); + free(im->gdes[i].rpnp); } free(im->gdes); gfx_destroy(im->canvas); @@ -261,76 +331,75 @@ im_free(image_desc_t *im) } /* find SI magnitude symbol for the given number*/ -void -auto_scale( - image_desc_t *im, /* image description */ - double *value, - char **symb_ptr, - double *magfact - ) +void auto_scale( + image_desc_t * im, /* image description */ + double *value, + char **symb_ptr, + double *magfact) { - - char *symbol[] = {"a", /* 10e-18 Atto */ - "f", /* 10e-15 Femto */ - "p", /* 10e-12 Pico */ - "n", /* 10e-9 Nano */ - "u", /* 10e-6 Micro */ - "m", /* 10e-3 Milli */ - " ", /* Base */ - "k", /* 10e3 Kilo */ - "M", /* 10e6 Mega */ - "G", /* 10e9 Giga */ - "T", /* 10e12 Tera */ - "P", /* 10e15 Peta */ - "E"};/* 10e18 Exa */ - - int symbcenter = 6; - int sindex; - - if (*value == 0.0 || isnan(*value) ) { + + char *symbol[] = { "a", /* 10e-18 Atto */ + "f", /* 10e-15 Femto */ + "p", /* 10e-12 Pico */ + "n", /* 10e-9 Nano */ + "u", /* 10e-6 Micro */ + "m", /* 10e-3 Milli */ + " ", /* Base */ + "k", /* 10e3 Kilo */ + "M", /* 10e6 Mega */ + "G", /* 10e9 Giga */ + "T", /* 10e12 Tera */ + "P", /* 10e15 Peta */ + "E" + }; /* 10e18 Exa */ + + int symbcenter = 6; + int sindex; + + if (*value == 0.0 || isnan(*value)) { sindex = 0; *magfact = 1.0; } else { - sindex = floor(log(fabs(*value))/log((double)im->base)); - *magfact = pow((double)im->base, (double)sindex); + sindex = floor(log(fabs(*value)) / log((double) im->base)); + *magfact = pow((double) im->base, (double) sindex); (*value) /= (*magfact); } - if ( sindex <= symbcenter && sindex >= -symbcenter) { - (*symb_ptr) = symbol[sindex+symbcenter]; - } - else { + if (sindex <= symbcenter && sindex >= -symbcenter) { + (*symb_ptr) = symbol[sindex + symbcenter]; + } else { (*symb_ptr) = "?"; } } static char si_symbol[] = { - 'a', /* 10e-18 Atto */ - 'f', /* 10e-15 Femto */ - 'p', /* 10e-12 Pico */ - 'n', /* 10e-9 Nano */ - 'u', /* 10e-6 Micro */ - 'm', /* 10e-3 Milli */ - ' ', /* Base */ - 'k', /* 10e3 Kilo */ - 'M', /* 10e6 Mega */ - 'G', /* 10e9 Giga */ - 'T', /* 10e12 Tera */ - 'P', /* 10e15 Peta */ - 'E', /* 10e18 Exa */ + 'a', /* 10e-18 Atto */ + 'f', /* 10e-15 Femto */ + 'p', /* 10e-12 Pico */ + 'n', /* 10e-9 Nano */ + 'u', /* 10e-6 Micro */ + 'm', /* 10e-3 Milli */ + ' ', /* Base */ + 'k', /* 10e3 Kilo */ + 'M', /* 10e6 Mega */ + 'G', /* 10e9 Giga */ + 'T', /* 10e12 Tera */ + 'P', /* 10e15 Peta */ + 'E', /* 10e18 Exa */ }; static const int si_symbcenter = 6; /* find SI magnitude symbol for the numbers on the y-axis*/ -void -si_unit( - image_desc_t *im /* image description */ -) +void si_unit( + image_desc_t * im /* image description */ + ) { - double digits,viewdigits=0; - - digits = floor( log( max( fabs(im->minval),fabs(im->maxval)))/log((double)im->base)); + double digits, viewdigits = 0; + + digits = + floor(log(max(fabs(im->minval), fabs(im->maxval))) / + log((double) im->base)); if (im->unitsexponent != 9999) { /* unitsexponent = 9, 6, 3, 0, -3, -6, -9, etc */ @@ -339,349 +408,362 @@ si_unit( viewdigits = digits; } - im->magfact = pow((double)im->base , digits); - + im->magfact = pow((double) im->base, digits); + #ifdef DEBUG - printf("digits %6.3f im->magfact %6.3f\n",digits,im->magfact); + printf("digits %6.3f im->magfact %6.3f\n", digits, im->magfact); #endif - im->viewfactor = im->magfact / pow((double)im->base , viewdigits); + im->viewfactor = im->magfact / pow((double) im->base, viewdigits); - if ( ((viewdigits+si_symbcenter) < sizeof(si_symbol)) && - ((viewdigits+si_symbcenter) >= 0) ) - im->symbol = si_symbol[(int)viewdigits+si_symbcenter]; + if (((viewdigits + si_symbcenter) < sizeof(si_symbol)) && + ((viewdigits + si_symbcenter) >= 0)) + im->symbol = si_symbol[(int) viewdigits + si_symbcenter]; else im->symbol = '?'; - } +} /* move min and max values around to become sensible */ -void -expand_range(image_desc_t *im) +void expand_range( + image_desc_t * im) { - double sensiblevalues[] ={1000.0,900.0,800.0,750.0,700.0, - 600.0,500.0,400.0,300.0,250.0, - 200.0,125.0,100.0,90.0,80.0, - 75.0,70.0,60.0,50.0,40.0,30.0, - 25.0,20.0,10.0,9.0,8.0, - 7.0,6.0,5.0,4.0,3.5,3.0, - 2.5,2.0,1.8,1.5,1.2,1.0, - 0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0.0,-1}; - - double scaled_min,scaled_max; - double adj; - int i; - - - + double sensiblevalues[] = { 1000.0, 900.0, 800.0, 750.0, 700.0, + 600.0, 500.0, 400.0, 300.0, 250.0, + 200.0, 125.0, 100.0, 90.0, 80.0, + 75.0, 70.0, 60.0, 50.0, 40.0, 30.0, + 25.0, 20.0, 10.0, 9.0, 8.0, + 7.0, 6.0, 5.0, 4.0, 3.5, 3.0, + 2.5, 2.0, 1.8, 1.5, 1.2, 1.0, + 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.0, -1 + }; + + double scaled_min, scaled_max; + double adj; + int i; + + + #ifdef DEBUG printf("Min: %6.2f Max: %6.2f MagFactor: %6.2f\n", - im->minval,im->maxval,im->magfact); + im->minval, im->maxval, im->magfact); #endif - if (isnan(im->ygridstep)){ - if(im->extra_flags & ALTAUTOSCALE) { + if (isnan(im->ygridstep)) { + if (im->extra_flags & ALTAUTOSCALE) { /* measure the amplitude of the function. Make sure that graph boundaries are slightly higher then max/min vals so we can see amplitude on the graph */ - double delt, fact; - - delt = im->maxval - im->minval; - adj = delt * 0.1; - fact = 2.0 * pow(10.0, - floor(log10(max(fabs(im->minval), fabs(im->maxval))/im->magfact)) - 2); - if (delt < fact) { + double delt, fact; + + delt = im->maxval - im->minval; + adj = delt * 0.1; + fact = 2.0 * pow(10.0, + floor(log10 + (max(fabs(im->minval), fabs(im->maxval)) / + im->magfact)) - 2); + if (delt < fact) { adj = (fact - delt) * 0.55; #ifdef DEBUG - printf("Min: %6.2f Max: %6.2f delt: %6.2f fact: %6.2f adj: %6.2f\n", im->minval, im->maxval, delt, fact, adj); + printf + ("Min: %6.2f Max: %6.2f delt: %6.2f fact: %6.2f adj: %6.2f\n", + im->minval, im->maxval, delt, fact, adj); #endif - } - im->minval -= adj; - im->maxval += adj; - } - else if(im->extra_flags & ALTAUTOSCALE_MIN) { - /* measure the amplitude of the function. Make sure that - graph boundaries are slightly lower than min vals - so we can see amplitude on the graph */ - adj = (im->maxval - im->minval) * 0.1; - im->minval -= adj; - } - else if(im->extra_flags & ALTAUTOSCALE_MAX) { + } + im->minval -= adj; + im->maxval += adj; + } else if (im->extra_flags & ALTAUTOSCALE_MIN) { + /* measure the amplitude of the function. Make sure that + graph boundaries are slightly lower than min vals + so we can see amplitude on the graph */ + adj = (im->maxval - im->minval) * 0.1; + im->minval -= adj; + } else if (im->extra_flags & ALTAUTOSCALE_MAX) { /* measure the amplitude of the function. Make sure that graph boundaries are slightly higher than max vals so we can see amplitude on the graph */ - adj = (im->maxval - im->minval) * 0.1; - im->maxval += adj; - } - else { + adj = (im->maxval - im->minval) * 0.1; + im->maxval += adj; + } else { scaled_min = im->minval / im->magfact; scaled_max = im->maxval / im->magfact; - - for (i=1; sensiblevalues[i] > 0; i++){ - if (sensiblevalues[i-1]>=scaled_min && - sensiblevalues[i]<=scaled_min) - im->minval = sensiblevalues[i]*(im->magfact); - - if (-sensiblevalues[i-1]<=scaled_min && - -sensiblevalues[i]>=scaled_min) - im->minval = -sensiblevalues[i-1]*(im->magfact); - - if (sensiblevalues[i-1] >= scaled_max && + + for (i = 1; sensiblevalues[i] > 0; i++) { + if (sensiblevalues[i - 1] >= scaled_min && + sensiblevalues[i] <= scaled_min) + im->minval = sensiblevalues[i] * (im->magfact); + + if (-sensiblevalues[i - 1] <= scaled_min && + -sensiblevalues[i] >= scaled_min) + im->minval = -sensiblevalues[i - 1] * (im->magfact); + + if (sensiblevalues[i - 1] >= scaled_max && sensiblevalues[i] <= scaled_max) - im->maxval = sensiblevalues[i-1]*(im->magfact); - - if (-sensiblevalues[i-1]<=scaled_max && - -sensiblevalues[i] >=scaled_max) - im->maxval = -sensiblevalues[i]*(im->magfact); + im->maxval = sensiblevalues[i - 1] * (im->magfact); + + if (-sensiblevalues[i - 1] <= scaled_max && + -sensiblevalues[i] >= scaled_max) + im->maxval = -sensiblevalues[i] * (im->magfact); } } } else { /* adjust min and max to the grid definition if there is one */ - im->minval = (double)im->ylabfact * im->ygridstep * - floor(im->minval / ((double)im->ylabfact * im->ygridstep)); - im->maxval = (double)im->ylabfact * im->ygridstep * - ceil(im->maxval /( (double)im->ylabfact * im->ygridstep)); + im->minval = (double) im->ylabfact * im->ygridstep * + floor(im->minval / ((double) im->ylabfact * im->ygridstep)); + im->maxval = (double) im->ylabfact * im->ygridstep * + ceil(im->maxval / ((double) im->ylabfact * im->ygridstep)); } - + #ifdef DEBUG - fprintf(stderr,"SCALED Min: %6.2f Max: %6.2f Factor: %6.2f\n", - im->minval,im->maxval,im->magfact); + fprintf(stderr, "SCALED Min: %6.2f Max: %6.2f Factor: %6.2f\n", + im->minval, im->maxval, im->magfact); #endif } -void -apply_gridfit(image_desc_t *im) +void apply_gridfit( + image_desc_t * im) { - if (isnan(im->minval) || isnan(im->maxval)) - return; - ytr(im,DNAN); - if (im->logarithmic) { - double ya, yb, ypix, ypixfrac; - double log10_range = log10(im->maxval) - log10(im->minval); - ya = pow((double)10, floor(log10(im->minval))); - while (ya < im->minval) - ya *= 10; - if (ya > im->maxval) - return; /* don't have y=10^x gridline */ - yb = ya * 10; - if (yb <= im->maxval) { - /* we have at least 2 y=10^x gridlines. - Make sure distance between them in pixels - are an integer by expanding im->maxval */ - double y_pixel_delta = ytr(im, ya) - ytr(im, yb); - double factor = y_pixel_delta / floor(y_pixel_delta); - double new_log10_range = factor * log10_range; - double new_ymax_log10 = log10(im->minval) + new_log10_range; - im->maxval = pow(10, new_ymax_log10); - ytr(im,DNAN); /* reset precalc */ - log10_range = log10(im->maxval) - log10(im->minval); - } - /* make sure first y=10^x gridline is located on - integer pixel position by moving scale slightly - downwards (sub-pixel movement) */ - ypix = ytr(im, ya) + im->ysize; /* add im->ysize so it always is positive */ - ypixfrac = ypix - floor(ypix); - if (ypixfrac > 0 && ypixfrac < 1) { - double yfrac = ypixfrac / im->ysize; - im->minval = pow(10, log10(im->minval) - yfrac * log10_range); - im->maxval = pow(10, log10(im->maxval) - yfrac * log10_range); - ytr(im,DNAN); /* reset precalc */ - } - } else { - /* Make sure we have an integer pixel distance between - each minor gridline */ - double ypos1 = ytr(im, im->minval); - double ypos2 = ytr(im, im->minval + im->ygrid_scale.gridstep); - double y_pixel_delta = ypos1 - ypos2; - double factor = y_pixel_delta / floor(y_pixel_delta); - double new_range = factor * (im->maxval - im->minval); - double gridstep = im->ygrid_scale.gridstep; - double minor_y, minor_y_px, minor_y_px_frac; - if (im->maxval > 0.0) - im->maxval = im->minval + new_range; - else - im->minval = im->maxval - new_range; - ytr(im,DNAN); /* reset precalc */ - /* make sure first minor gridline is on integer pixel y coord */ - minor_y = gridstep * floor(im->minval / gridstep); - while (minor_y < im->minval) - minor_y += gridstep; - minor_y_px = ytr(im, minor_y) + im->ysize; /* ensure > 0 by adding ysize */ - minor_y_px_frac = minor_y_px - floor(minor_y_px); - if (minor_y_px_frac > 0 && minor_y_px_frac < 1) { - double yfrac = minor_y_px_frac / im->ysize; - double range = im->maxval - im->minval; - im->minval = im->minval - yfrac * range; - im->maxval = im->maxval - yfrac * range; - ytr(im,DNAN); /* reset precalc */ - } - calc_horizontal_grid(im); /* recalc with changed im->maxval */ - } + if (isnan(im->minval) || isnan(im->maxval)) + return; + ytr(im, DNAN); + if (im->logarithmic) { + double ya, yb, ypix, ypixfrac; + double log10_range = log10(im->maxval) - log10(im->minval); + + ya = pow((double) 10, floor(log10(im->minval))); + while (ya < im->minval) + ya *= 10; + if (ya > im->maxval) + return; /* don't have y=10^x gridline */ + yb = ya * 10; + if (yb <= im->maxval) { + /* we have at least 2 y=10^x gridlines. + Make sure distance between them in pixels + are an integer by expanding im->maxval */ + double y_pixel_delta = ytr(im, ya) - ytr(im, yb); + double factor = y_pixel_delta / floor(y_pixel_delta); + double new_log10_range = factor * log10_range; + double new_ymax_log10 = log10(im->minval) + new_log10_range; + + im->maxval = pow(10, new_ymax_log10); + ytr(im, DNAN); /* reset precalc */ + log10_range = log10(im->maxval) - log10(im->minval); + } + /* make sure first y=10^x gridline is located on + integer pixel position by moving scale slightly + downwards (sub-pixel movement) */ + ypix = ytr(im, ya) + im->ysize; /* add im->ysize so it always is positive */ + ypixfrac = ypix - floor(ypix); + if (ypixfrac > 0 && ypixfrac < 1) { + double yfrac = ypixfrac / im->ysize; + + im->minval = pow(10, log10(im->minval) - yfrac * log10_range); + im->maxval = pow(10, log10(im->maxval) - yfrac * log10_range); + ytr(im, DNAN); /* reset precalc */ + } + } else { + /* Make sure we have an integer pixel distance between + each minor gridline */ + double ypos1 = ytr(im, im->minval); + double ypos2 = ytr(im, im->minval + im->ygrid_scale.gridstep); + double y_pixel_delta = ypos1 - ypos2; + double factor = y_pixel_delta / floor(y_pixel_delta); + double new_range = factor * (im->maxval - im->minval); + double gridstep = im->ygrid_scale.gridstep; + double minor_y, minor_y_px, minor_y_px_frac; + + if (im->maxval > 0.0) + im->maxval = im->minval + new_range; + else + im->minval = im->maxval - new_range; + ytr(im, DNAN); /* reset precalc */ + /* make sure first minor gridline is on integer pixel y coord */ + minor_y = gridstep * floor(im->minval / gridstep); + while (minor_y < im->minval) + minor_y += gridstep; + minor_y_px = ytr(im, minor_y) + im->ysize; /* ensure > 0 by adding ysize */ + minor_y_px_frac = minor_y_px - floor(minor_y_px); + if (minor_y_px_frac > 0 && minor_y_px_frac < 1) { + double yfrac = minor_y_px_frac / im->ysize; + double range = im->maxval - im->minval; + + im->minval = im->minval - yfrac * range; + im->maxval = im->maxval - yfrac * range; + ytr(im, DNAN); /* reset precalc */ + } + calc_horizontal_grid(im); /* recalc with changed im->maxval */ + } } /* reduce data reimplementation by Alex */ -void -reduce_data( - enum cf_en cf, /* which consolidation function ?*/ - unsigned long cur_step, /* step the data currently is in */ - time_t *start, /* start, end and step as requested ... */ - time_t *end, /* ... by the application will be ... */ - unsigned long *step, /* ... adjusted to represent reality */ - unsigned long *ds_cnt, /* number of data sources in file */ - rrd_value_t **data) /* two dimensional array containing the data */ -{ - int i,reduce_factor = ceil((double)(*step) / (double)cur_step); - unsigned long col,dst_row,row_cnt,start_offset,end_offset,skiprows=0; - rrd_value_t *srcptr,*dstptr; - - (*step) = cur_step*reduce_factor; /* set new step size for reduced data */ +void reduce_data( + enum cf_en cf, /* which consolidation function ? */ + unsigned long cur_step, /* step the data currently is in */ + time_t *start, /* start, end and step as requested ... */ + time_t *end, /* ... by the application will be ... */ + unsigned long *step, /* ... adjusted to represent reality */ + unsigned long *ds_cnt, /* number of data sources in file */ + rrd_value_t ** data) +{ /* two dimensional array containing the data */ + int i, reduce_factor = ceil((double) (*step) / (double) cur_step); + unsigned long col, dst_row, row_cnt, start_offset, end_offset, skiprows = + 0; + rrd_value_t *srcptr, *dstptr; + + (*step) = cur_step * reduce_factor; /* set new step size for reduced data */ dstptr = *data; srcptr = *data; - row_cnt = ((*end)-(*start))/cur_step; + row_cnt = ((*end) - (*start)) / cur_step; #ifdef DEBUG #define DEBUG_REDUCE #endif #ifdef DEBUG_REDUCE -printf("Reducing %lu rows with factor %i time %lu to %lu, step %lu\n", - row_cnt,reduce_factor,*start,*end,cur_step); -for (col=0;col=reduce_factor;dst_row++) { - for (col=0;col<(*ds_cnt);col++) { - rrd_value_t newval=DNAN; - unsigned long validval=0; + for (dst_row = 0; (long int) row_cnt >= reduce_factor; dst_row++) { + for (col = 0; col < (*ds_cnt); col++) { + rrd_value_t newval = DNAN; + unsigned long validval = 0; - for (i=0;igdes_c;i++){ + for (i = 0; i < (int) im->gdes_c; i++) { /* only GF_DEF elements fetch data */ - if (im->gdes[i].gf != GF_DEF) + if (im->gdes[i].gf != GF_DEF) continue; - skip=0; - /* do we have it already ?*/ - for (ii=0;iigdes[ii].gf != GF_DEF) + skip = 0; + /* do we have it already ? */ + for (ii = 0; ii < i; ii++) { + if (im->gdes[ii].gf != GF_DEF) continue; if ((strcmp(im->gdes[i].rrd, im->gdes[ii].rrd) == 0) - && (im->gdes[i].cf == im->gdes[ii].cf) - && (im->gdes[i].cf_reduce == im->gdes[ii].cf_reduce) - && (im->gdes[i].start_orig == im->gdes[ii].start_orig) - && (im->gdes[i].end_orig == im->gdes[ii].end_orig) - && (im->gdes[i].step_orig == im->gdes[ii].step_orig)) { + && (im->gdes[i].cf == im->gdes[ii].cf) + && (im->gdes[i].cf_reduce == im->gdes[ii].cf_reduce) + && (im->gdes[i].start_orig == im->gdes[ii].start_orig) + && (im->gdes[i].end_orig == im->gdes[ii].end_orig) + && (im->gdes[i].step_orig == im->gdes[ii].step_orig)) { /* OK, the data is already there. - ** Just copy the header portion - */ + ** Just copy the header portion + */ im->gdes[i].start = im->gdes[ii].start; im->gdes[i].end = im->gdes[ii].end; im->gdes[i].step = im->gdes[ii].step; im->gdes[i].ds_cnt = im->gdes[ii].ds_cnt; - im->gdes[i].ds_namv = im->gdes[ii].ds_namv; + im->gdes[i].ds_namv = im->gdes[ii].ds_namv; im->gdes[i].data = im->gdes[ii].data; im->gdes[i].data_first = 0; - skip=1; + skip = 1; } - if (skip) + if (skip) break; } - if (! skip) { - unsigned long ft_step = im->gdes[i].step ; /* ft_step will record what we got from fetch */ - - if((rrd_fetch_fn(im->gdes[i].rrd, - im->gdes[i].cf, - &im->gdes[i].start, - &im->gdes[i].end, - &ft_step, - &im->gdes[i].ds_cnt, - &im->gdes[i].ds_namv, - &im->gdes[i].data)) == -1){ + if (!skip) { + unsigned long ft_step = im->gdes[i].step; /* ft_step will record what we got from fetch */ + + if ((rrd_fetch_fn(im->gdes[i].rrd, + im->gdes[i].cf, + &im->gdes[i].start, + &im->gdes[i].end, + &ft_step, + &im->gdes[i].ds_cnt, + &im->gdes[i].ds_namv, + &im->gdes[i].data)) == -1) { return -1; } - im->gdes[i].data_first = 1; - + im->gdes[i].data_first = 1; + if (ft_step < im->gdes[i].step) { reduce_data(im->gdes[i].cf_reduce, ft_step, &im->gdes[i].start, &im->gdes[i].end, &im->gdes[i].step, - &im->gdes[i].ds_cnt, - &im->gdes[i].data); + &im->gdes[i].ds_cnt, &im->gdes[i].data); } else { im->gdes[i].step = ft_step; } } - + /* lets see if the required data source is really there */ - for(ii=0;ii<(int)im->gdes[i].ds_cnt;ii++){ - if(strcmp(im->gdes[i].ds_namv[ii],im->gdes[i].ds_nam) == 0){ - im->gdes[i].ds=ii; } + for (ii = 0; ii < (int) im->gdes[i].ds_cnt; ii++) { + if (strcmp(im->gdes[i].ds_namv[ii], im->gdes[i].ds_nam) == 0) { + im->gdes[i].ds = ii; + } } - if (im->gdes[i].ds== -1){ + if (im->gdes[i].ds == -1) { rrd_set_error("No DS called '%s' in '%s'", - im->gdes[i].ds_nam,im->gdes[i].rrd); - return -1; + im->gdes[i].ds_nam, im->gdes[i].rrd); + return -1; } - + } return 0; } @@ -776,320 +858,339 @@ data_fetch(image_desc_t *im ) * CDEF stuff *************************************************************/ -long -find_var_wrapper(void *arg1, char *key) +long find_var_wrapper( + void *arg1, + char *key) { - return find_var((image_desc_t *) arg1, key); + return find_var((image_desc_t *) arg1, key); } /* find gdes containing var*/ -long -find_var(image_desc_t *im, char *key){ - long ii; - for(ii=0;iigdes_c-1;ii++){ - if((im->gdes[ii].gf == GF_DEF - || im->gdes[ii].gf == GF_VDEF - || im->gdes[ii].gf == GF_CDEF) - && (strcmp(im->gdes[ii].vname,key) == 0)){ - return ii; - } - } +long find_var( + image_desc_t * im, + char *key) +{ + long ii; + + for (ii = 0; ii < im->gdes_c - 1; ii++) { + if ((im->gdes[ii].gf == GF_DEF + || im->gdes[ii].gf == GF_VDEF || im->gdes[ii].gf == GF_CDEF) + && (strcmp(im->gdes[ii].vname, key) == 0)) { + return ii; + } + } return -1; } /* find the largest common denominator for all the numbers in the 0 terminated num array */ -long -lcd(long *num){ - long rest; - int i; - for (i=0;num[i+1]!=0;i++){ - do { - rest=num[i] % num[i+1]; - num[i]=num[i+1]; num[i+1]=rest; - } while (rest!=0); - num[i+1] = num[i]; +long lcd( + long *num) +{ + long rest; + int i; + + for (i = 0; num[i + 1] != 0; i++) { + do { + rest = num[i] % num[i + 1]; + num[i] = num[i + 1]; + num[i + 1] = rest; + } while (rest != 0); + num[i + 1] = num[i]; } /* return i==0?num[i]:num[i-1]; */ - return num[i]; + return num[i]; } /* run the rpn calculator on all the VDEF and CDEF arguments */ -int -data_calc( image_desc_t *im){ +int data_calc( + image_desc_t * im) +{ int gdi; int dataidx; - long *steparray, rpi; + long *steparray, rpi; int stepcnt; time_t now; rpnstack_t rpnstack; rpnstack_init(&rpnstack); - for (gdi=0;gdigdes_c;gdi++){ + for (gdi = 0; gdi < im->gdes_c; gdi++) { /* Look for GF_VDEF and GF_CDEF in the same loop, * so CDEFs can use VDEFs and vice versa */ switch (im->gdes[gdi].gf) { - case GF_XPORT: - break; - case GF_SHIFT: { - graph_desc_t *vdp = &im->gdes[im->gdes[gdi].vidx]; - - /* remove current shift */ - vdp->start -= vdp->shift; - vdp->end -= vdp->shift; - - /* vdef */ - if (im->gdes[gdi].shidx >= 0) - vdp->shift = im->gdes[im->gdes[gdi].shidx].vf.val; - /* constant */ - else - vdp->shift = im->gdes[gdi].shval; + case GF_XPORT: + break; + case GF_SHIFT:{ + graph_desc_t *vdp = &im->gdes[im->gdes[gdi].vidx]; - /* normalize shift to multiple of consolidated step */ - vdp->shift = (vdp->shift / (long)vdp->step) * (long)vdp->step; + /* remove current shift */ + vdp->start -= vdp->shift; + vdp->end -= vdp->shift; - /* apply shift */ - vdp->start += vdp->shift; - vdp->end += vdp->shift; - break; + /* vdef */ + if (im->gdes[gdi].shidx >= 0) + vdp->shift = im->gdes[im->gdes[gdi].shidx].vf.val; + /* constant */ + else + vdp->shift = im->gdes[gdi].shval; + + /* normalize shift to multiple of consolidated step */ + vdp->shift = (vdp->shift / (long) vdp->step) * (long) vdp->step; + + /* apply shift */ + vdp->start += vdp->shift; + vdp->end += vdp->shift; + break; + } + case GF_VDEF: + /* A VDEF has no DS. This also signals other parts + * of rrdtool that this is a VDEF value, not a CDEF. + */ + im->gdes[gdi].ds_cnt = 0; + if (vdef_calc(im, gdi)) { + rrd_set_error("Error processing VDEF '%s'", + im->gdes[gdi].vname); + rpnstack_free(&rpnstack); + return -1; } - case GF_VDEF: - /* A VDEF has no DS. This also signals other parts - * of rrdtool that this is a VDEF value, not a CDEF. - */ - im->gdes[gdi].ds_cnt = 0; - if (vdef_calc(im,gdi)) { - rrd_set_error("Error processing VDEF '%s'" - ,im->gdes[gdi].vname - ); - rpnstack_free(&rpnstack); - return -1; - } - break; - case GF_CDEF: - im->gdes[gdi].ds_cnt = 1; - im->gdes[gdi].ds = 0; - im->gdes[gdi].data_first = 1; - im->gdes[gdi].start = 0; - im->gdes[gdi].end = 0; - steparray=NULL; - stepcnt = 0; - dataidx=-1; - - /* Find the variables in the expression. - * - VDEF variables are substituted by their values - * and the opcode is changed into OP_NUMBER. - * - CDEF variables are analized for their step size, - * the lowest common denominator of all the step - * sizes of the data sources involved is calculated - * and the resulting number is the step size for the - * resulting data source. - */ - for(rpi=0;im->gdes[gdi].rpnp[rpi].op != OP_END;rpi++){ - if(im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE || - im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER){ - long ptr = im->gdes[gdi].rpnp[rpi].ptr; - if (im->gdes[ptr].ds_cnt == 0) { /* this is a VDEF data source */ + break; + case GF_CDEF: + im->gdes[gdi].ds_cnt = 1; + im->gdes[gdi].ds = 0; + im->gdes[gdi].data_first = 1; + im->gdes[gdi].start = 0; + im->gdes[gdi].end = 0; + steparray = NULL; + stepcnt = 0; + dataidx = -1; + + /* Find the variables in the expression. + * - VDEF variables are substituted by their values + * and the opcode is changed into OP_NUMBER. + * - CDEF variables are analized for their step size, + * the lowest common denominator of all the step + * sizes of the data sources involved is calculated + * and the resulting number is the step size for the + * resulting data source. + */ + for (rpi = 0; im->gdes[gdi].rpnp[rpi].op != OP_END; rpi++) { + if (im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE || + im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER) { + long ptr = im->gdes[gdi].rpnp[rpi].ptr; + + if (im->gdes[ptr].ds_cnt == 0) { /* this is a VDEF data source */ #if 0 - printf("DEBUG: inside CDEF '%s' processing VDEF '%s'\n", - im->gdes[gdi].vname, - im->gdes[ptr].vname); - printf("DEBUG: value from vdef is %f\n",im->gdes[ptr].vf.val); + printf + ("DEBUG: inside CDEF '%s' processing VDEF '%s'\n", + im->gdes[gdi].vname, im->gdes[ptr].vname); + printf("DEBUG: value from vdef is %f\n", + im->gdes[ptr].vf.val); #endif - im->gdes[gdi].rpnp[rpi].val = im->gdes[ptr].vf.val; - im->gdes[gdi].rpnp[rpi].op = OP_NUMBER; - } else { /* normal variables and PREF(variables) */ - - /* add one entry to the array that keeps track of the step sizes of the - * data sources going into the CDEF. */ - if ((steparray = - rrd_realloc(steparray, - (++stepcnt+1)*sizeof(*steparray)))==NULL){ - rrd_set_error("realloc steparray"); - rpnstack_free(&rpnstack); - return -1; - }; + im->gdes[gdi].rpnp[rpi].val = im->gdes[ptr].vf.val; + im->gdes[gdi].rpnp[rpi].op = OP_NUMBER; + } else { /* normal variables and PREF(variables) */ + + /* add one entry to the array that keeps track of the step sizes of the + * data sources going into the CDEF. */ + if ((steparray = + rrd_realloc(steparray, + (++stepcnt + + 1) * sizeof(*steparray))) == NULL) { + rrd_set_error("realloc steparray"); + rpnstack_free(&rpnstack); + return -1; + }; + + steparray[stepcnt - 1] = im->gdes[ptr].step; + + /* adjust start and end of cdef (gdi) so + * that it runs from the latest start point + * to the earliest endpoint of any of the + * rras involved (ptr) + */ - steparray[stepcnt-1] = im->gdes[ptr].step; - - /* adjust start and end of cdef (gdi) so - * that it runs from the latest start point - * to the earliest endpoint of any of the - * rras involved (ptr) - */ - - if(im->gdes[gdi].start < im->gdes[ptr].start) - im->gdes[gdi].start = im->gdes[ptr].start; - - if(im->gdes[gdi].end == 0 || - im->gdes[gdi].end > im->gdes[ptr].end) - im->gdes[gdi].end = im->gdes[ptr].end; - - /* store pointer to the first element of - * the rra providing data for variable, - * further save step size and data source - * count of this rra - */ - im->gdes[gdi].rpnp[rpi].data = im->gdes[ptr].data + im->gdes[ptr].ds; - im->gdes[gdi].rpnp[rpi].step = im->gdes[ptr].step; - im->gdes[gdi].rpnp[rpi].ds_cnt = im->gdes[ptr].ds_cnt; - - /* backoff the *.data ptr; this is done so - * rpncalc() function doesn't have to treat - * the first case differently - */ - } /* if ds_cnt != 0 */ - } /* if OP_VARIABLE */ - } /* loop through all rpi */ - - /* move the data pointers to the correct period */ - for(rpi=0;im->gdes[gdi].rpnp[rpi].op != OP_END;rpi++){ - if(im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE || - im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER){ - long ptr = im->gdes[gdi].rpnp[rpi].ptr; - long diff = im->gdes[gdi].start - im->gdes[ptr].start; - - if(diff > 0) - im->gdes[gdi].rpnp[rpi].data += (diff / im->gdes[ptr].step) * im->gdes[ptr].ds_cnt; - } - } + if (im->gdes[gdi].start < im->gdes[ptr].start) + im->gdes[gdi].start = im->gdes[ptr].start; - if(steparray == NULL){ - rrd_set_error("rpn expressions without DEF" - " or CDEF variables are not supported"); - rpnstack_free(&rpnstack); - return -1; + if (im->gdes[gdi].end == 0 || + im->gdes[gdi].end > im->gdes[ptr].end) + im->gdes[gdi].end = im->gdes[ptr].end; + + /* store pointer to the first element of + * the rra providing data for variable, + * further save step size and data source + * count of this rra + */ + im->gdes[gdi].rpnp[rpi].data = + im->gdes[ptr].data + im->gdes[ptr].ds; + im->gdes[gdi].rpnp[rpi].step = im->gdes[ptr].step; + im->gdes[gdi].rpnp[rpi].ds_cnt = im->gdes[ptr].ds_cnt; + + /* backoff the *.data ptr; this is done so + * rpncalc() function doesn't have to treat + * the first case differently + */ + } /* if ds_cnt != 0 */ + } /* if OP_VARIABLE */ + } /* loop through all rpi */ + + /* move the data pointers to the correct period */ + for (rpi = 0; im->gdes[gdi].rpnp[rpi].op != OP_END; rpi++) { + if (im->gdes[gdi].rpnp[rpi].op == OP_VARIABLE || + im->gdes[gdi].rpnp[rpi].op == OP_PREV_OTHER) { + long ptr = im->gdes[gdi].rpnp[rpi].ptr; + long diff = + im->gdes[gdi].start - im->gdes[ptr].start; + + if (diff > 0) + im->gdes[gdi].rpnp[rpi].data += + (diff / im->gdes[ptr].step) * + im->gdes[ptr].ds_cnt; } - steparray[stepcnt]=0; - /* Now find the resulting step. All steps in all - * used RRAs have to be visited + } + + if (steparray == NULL) { + rrd_set_error("rpn expressions without DEF" + " or CDEF variables are not supported"); + rpnstack_free(&rpnstack); + return -1; + } + steparray[stepcnt] = 0; + /* Now find the resulting step. All steps in all + * used RRAs have to be visited + */ + im->gdes[gdi].step = lcd(steparray); + free(steparray); + if ((im->gdes[gdi].data = malloc(((im->gdes[gdi].end - + im->gdes[gdi].start) + / im->gdes[gdi].step) + * sizeof(double))) == NULL) { + rrd_set_error("malloc im->gdes[gdi].data"); + rpnstack_free(&rpnstack); + return -1; + } + + /* Step through the new cdef results array and + * calculate the values + */ + for (now = im->gdes[gdi].start + im->gdes[gdi].step; + now <= im->gdes[gdi].end; now += im->gdes[gdi].step) { + rpnp_t *rpnp = im->gdes[gdi].rpnp; + + /* 3rd arg of rpn_calc is for OP_VARIABLE lookups; + * in this case we are advancing by timesteps; + * we use the fact that time_t is a synonym for long */ - im->gdes[gdi].step = lcd(steparray); - free(steparray); - if((im->gdes[gdi].data = malloc(( - (im->gdes[gdi].end-im->gdes[gdi].start) - / im->gdes[gdi].step) - * sizeof(double)))==NULL){ - rrd_set_error("malloc im->gdes[gdi].data"); + if (rpn_calc(rpnp, &rpnstack, (long) now, + im->gdes[gdi].data, ++dataidx) == -1) { + /* rpn_calc sets the error string */ rpnstack_free(&rpnstack); return -1; } - - /* Step through the new cdef results array and - * calculate the values - */ - for (now = im->gdes[gdi].start + im->gdes[gdi].step; - now<=im->gdes[gdi].end; - now += im->gdes[gdi].step) - { - rpnp_t *rpnp = im -> gdes[gdi].rpnp; - - /* 3rd arg of rpn_calc is for OP_VARIABLE lookups; - * in this case we are advancing by timesteps; - * we use the fact that time_t is a synonym for long - */ - if (rpn_calc(rpnp,&rpnstack,(long) now, - im->gdes[gdi].data,++dataidx) == -1) { - /* rpn_calc sets the error string */ - rpnstack_free(&rpnstack); - return -1; - } - } /* enumerate over time steps within a CDEF */ - break; - default: - continue; + } /* enumerate over time steps within a CDEF */ + break; + default: + continue; } - } /* enumerate over CDEFs */ + } /* enumerate over CDEFs */ rpnstack_free(&rpnstack); return 0; } /* massage data so, that we get one value for each x coordinate in the graph */ -int -data_proc( image_desc_t *im ){ - long i,ii; - double pixstep = (double)(im->end-im->start) - /(double)im->xsize; /* how much time - passes in one pixel */ - double paintval; - double minval=DNAN,maxval=DNAN; - - unsigned long gr_time; +int data_proc( + image_desc_t * im) +{ + long i, ii; + double pixstep = (double) (im->end - im->start) + / (double) im->xsize; /* how much time + passes in one pixel */ + double paintval; + double minval = DNAN, maxval = DNAN; + + unsigned long gr_time; /* memory for the processed data */ - for(i=0;igdes_c;i++) { - if((im->gdes[i].gf==GF_LINE) || - (im->gdes[i].gf==GF_AREA) || - (im->gdes[i].gf==GF_TICK)) { - if((im->gdes[i].p_data = malloc((im->xsize +1) - * sizeof(rrd_value_t)))==NULL){ + for (i = 0; i < im->gdes_c; i++) { + if ((im->gdes[i].gf == GF_LINE) || + (im->gdes[i].gf == GF_AREA) || (im->gdes[i].gf == GF_TICK)) { + if ((im->gdes[i].p_data = malloc((im->xsize + 1) + * sizeof(rrd_value_t))) == NULL) { rrd_set_error("malloc data_proc"); return -1; } } } - for (i=0;ixsize;i++) { /* for each pixel */ - long vidx; - gr_time = im->start+pixstep*i; /* time of the current step */ - paintval=0.0; - - for (ii=0;iigdes_c;ii++) { - double value; + for (i = 0; i < im->xsize; i++) { /* for each pixel */ + long vidx; + + gr_time = im->start + pixstep * i; /* time of the current step */ + paintval = 0.0; + + for (ii = 0; ii < im->gdes_c; ii++) { + double value; + switch (im->gdes[ii].gf) { - case GF_LINE: - case GF_AREA: - case GF_TICK: - if (!im->gdes[ii].stack) - paintval = 0.0; - value = im->gdes[ii].yrule; - if (isnan(value) || (im->gdes[ii].gf == GF_TICK)) { - /* The time of the data doesn't necessarily match - ** the time of the graph. Beware. - */ - vidx = im->gdes[ii].vidx; - if (im->gdes[vidx].gf == GF_VDEF) { - value = im->gdes[vidx].vf.val; - } else if (((long int)gr_time >= (long int)im->gdes[vidx].start) && - ((long int)gr_time <= (long int)im->gdes[vidx].end) ) { - value = im->gdes[vidx].data[ - (unsigned long) floor( - (double)(gr_time - im->gdes[vidx].start) - / im->gdes[vidx].step) - * im->gdes[vidx].ds_cnt - + im->gdes[vidx].ds - ]; - } else { - value = DNAN; - } - }; - - if (! isnan(value)) { - paintval += value; - im->gdes[ii].p_data[i] = paintval; - /* GF_TICK: the data values are not - ** relevant for min and max - */ - if (finite(paintval) && im->gdes[ii].gf != GF_TICK ) { - if ((isnan(minval) || paintval < minval ) && - ! (im->logarithmic && paintval <= 0.0)) - minval = paintval; - if (isnan(maxval) || paintval > maxval) - maxval = paintval; - } + case GF_LINE: + case GF_AREA: + case GF_TICK: + if (!im->gdes[ii].stack) + paintval = 0.0; + value = im->gdes[ii].yrule; + if (isnan(value) || (im->gdes[ii].gf == GF_TICK)) { + /* The time of the data doesn't necessarily match + ** the time of the graph. Beware. + */ + vidx = im->gdes[ii].vidx; + if (im->gdes[vidx].gf == GF_VDEF) { + value = im->gdes[vidx].vf.val; + } else + if (((long int) gr_time >= + (long int) im->gdes[vidx].start) + && ((long int) gr_time <= + (long int) im->gdes[vidx].end)) { + value = im->gdes[vidx].data[(unsigned long) + floor((double) + (gr_time - + im->gdes[vidx]. + start) + / + im->gdes[vidx].step) + * im->gdes[vidx].ds_cnt + + im->gdes[vidx].ds]; } else { - im->gdes[ii].p_data[i] = DNAN; + value = DNAN; } - break; - case GF_STACK: - rrd_set_error("STACK should already be turned into LINE or AREA here"); - return -1; - break; - default: - break; + }; + + if (!isnan(value)) { + paintval += value; + im->gdes[ii].p_data[i] = paintval; + /* GF_TICK: the data values are not + ** relevant for min and max + */ + if (finite(paintval) && im->gdes[ii].gf != GF_TICK) { + if ((isnan(minval) || paintval < minval) && + !(im->logarithmic && paintval <= 0.0)) + minval = paintval; + if (isnan(maxval) || paintval > maxval) + maxval = paintval; + } + } else { + im->gdes[ii].p_data[i] = DNAN; + } + break; + case GF_STACK: + rrd_set_error + ("STACK should already be turned into LINE or AREA here"); + return -1; + break; + default: + break; } } } @@ -1099,17 +1200,20 @@ data_proc( image_desc_t *im ){ lets set these to dummy values then ... */ if (im->logarithmic) { - if (isnan(minval)) minval = 0.2; - if (isnan(maxval)) maxval = 5.1; - } - else { - if (isnan(minval)) minval = 0.0; - if (isnan(maxval)) maxval = 1.0; + if (isnan(minval)) + minval = 0.2; + if (isnan(maxval)) + maxval = 5.1; + } else { + if (isnan(minval)) + minval = 0.0; + if (isnan(maxval)) + maxval = 1.0; } - + /* adjust min and max values */ - if (isnan(im->minval) - /* don't adjust low-end with log scale */ /* why not? */ + if (isnan(im->minval) + /* don't adjust low-end with log scale *//* why not? */ || ((!im->rigid) && im->minval > minval) ) { if (im->logarithmic) @@ -1117,7 +1221,7 @@ data_proc( image_desc_t *im ){ else im->minval = minval; } - if (isnan(im->maxval) + if (isnan(im->maxval) || (!im->rigid && im->maxval < maxval) ) { if (im->logarithmic) @@ -1127,13 +1231,13 @@ data_proc( image_desc_t *im ){ } /* make sure min is smaller than max */ if (im->minval > im->maxval) { - im->minval = 0.99 * im->maxval; + im->minval = 0.99 * im->maxval; } - + /* make sure min and max are not equal */ if (im->minval == im->maxval) { - im->maxval *= 1.01; - if (! im->logarithmic) { + im->maxval *= 1.01; + if (!im->logarithmic) { im->minval *= 0.99; } /* make sure min and max are not both zero */ @@ -1148,118 +1252,135 @@ data_proc( image_desc_t *im ){ /* identify the point where the first gridline, label ... gets placed */ -time_t -find_first_time( - time_t start, /* what is the initial time */ - enum tmt_en baseint, /* what is the basic interval */ - long basestep /* how many if these do we jump a time */ +time_t find_first_time( + time_t start, /* what is the initial time */ + enum tmt_en baseint, /* what is the basic interval */ + long basestep /* how many if these do we jump a time */ ) { struct tm tm; + localtime_r(&start, &tm); - switch(baseint){ + switch (baseint) { case TMT_SECOND: - tm.tm_sec -= tm.tm_sec % basestep; break; - case TMT_MINUTE: - tm.tm_sec=0; - tm.tm_min -= tm.tm_min % basestep; + tm.tm_sec -= tm.tm_sec % basestep; + break; + case TMT_MINUTE: + tm.tm_sec = 0; + tm.tm_min -= tm.tm_min % basestep; break; case TMT_HOUR: - tm.tm_sec=0; + tm.tm_sec = 0; tm.tm_min = 0; - tm.tm_hour -= tm.tm_hour % basestep; break; + tm.tm_hour -= tm.tm_hour % basestep; + break; case TMT_DAY: /* we do NOT look at the basestep for this ... */ - tm.tm_sec=0; + tm.tm_sec = 0; tm.tm_min = 0; - tm.tm_hour = 0; break; + tm.tm_hour = 0; + break; case TMT_WEEK: /* we do NOT look at the basestep for this ... */ - tm.tm_sec=0; + tm.tm_sec = 0; tm.tm_min = 0; tm.tm_hour = 0; - tm.tm_mday -= tm.tm_wday -1; /* -1 because we want the monday */ - if (tm.tm_wday==0) tm.tm_mday -= 7; /* we want the *previous* monday */ + tm.tm_mday -= tm.tm_wday - 1; /* -1 because we want the monday */ + if (tm.tm_wday == 0) + tm.tm_mday -= 7; /* we want the *previous* monday */ break; case TMT_MONTH: - tm.tm_sec=0; + tm.tm_sec = 0; tm.tm_min = 0; tm.tm_hour = 0; tm.tm_mday = 1; - tm.tm_mon -= tm.tm_mon % basestep; break; + tm.tm_mon -= tm.tm_mon % basestep; + break; case TMT_YEAR: - tm.tm_sec=0; + tm.tm_sec = 0; tm.tm_min = 0; tm.tm_hour = 0; tm.tm_mday = 1; tm.tm_mon = 0; - tm.tm_year -= (tm.tm_year+1900) % basestep; - + tm.tm_year -= (tm.tm_year + 1900) % basestep; + } return mktime(&tm); } + /* identify the point where the next gridline, label ... gets placed */ -time_t -find_next_time( - time_t current, /* what is the initial time */ - enum tmt_en baseint, /* what is the basic interval */ - long basestep /* how many if these do we jump a time */ +time_t find_next_time( + time_t current, /* what is the initial time */ + enum tmt_en baseint, /* what is the basic interval */ + long basestep /* how many if these do we jump a time */ ) { struct tm tm; - time_t madetime; + time_t madetime; + localtime_r(¤t, &tm); do { - switch(baseint){ + switch (baseint) { case TMT_SECOND: - tm.tm_sec += basestep; break; - case TMT_MINUTE: - tm.tm_min += basestep; break; + tm.tm_sec += basestep; + break; + case TMT_MINUTE: + tm.tm_min += basestep; + break; case TMT_HOUR: - tm.tm_hour += basestep; break; + tm.tm_hour += basestep; + break; case TMT_DAY: - tm.tm_mday += basestep; break; + tm.tm_mday += basestep; + break; case TMT_WEEK: - tm.tm_mday += 7*basestep; break; + tm.tm_mday += 7 * basestep; + break; case TMT_MONTH: - tm.tm_mon += basestep; break; + tm.tm_mon += basestep; + break; case TMT_YEAR: - tm.tm_year += basestep; + tm.tm_year += basestep; } madetime = mktime(&tm); - } while (madetime == -1); /* this is necessary to skip impssible times - like the daylight saving time skips */ + } while (madetime == -1); /* this is necessary to skip impssible times + like the daylight saving time skips */ return madetime; - + } /* calculate values required for PRINT and GPRINT functions */ -int -print_calc(image_desc_t *im, char ***prdata) +int print_calc( + image_desc_t * im, + char ***prdata) { - long i,ii,validsteps; - double printval; + long i, ii, validsteps; + double printval; struct tm tmvdef; - int graphelement = 0; - long vidx; - int max_ii; - double magfact = -1; - char *si_symb = ""; - char *percent_s; - int prlines = 1; + int graphelement = 0; + long vidx; + int max_ii; + double magfact = -1; + char *si_symb = ""; + char *percent_s; + int prlines = 1; + /* wow initializing tmvdef is quite a task :-) */ - time_t now = time(NULL); - localtime_r(&now,&tmvdef); - if (im->imginfo) prlines++; - for(i=0;igdes_c;i++){ - vidx = im->gdes[i].vidx; - switch(im->gdes[i].gf){ + time_t now = time(NULL); + + localtime_r(&now, &tmvdef); + if (im->imginfo) + prlines++; + for (i = 0; i < im->gdes_c; i++) { + vidx = im->gdes[i].vidx; + switch (im->gdes[i].gf) { case GF_PRINT: prlines++; - if(((*prdata) = rrd_realloc((*prdata),prlines*sizeof(char *)))==NULL){ + if (((*prdata) = + rrd_realloc((*prdata), prlines * sizeof(char *))) == NULL) { rrd_set_error("realloc prdata"); return 0; } @@ -1268,107 +1389,112 @@ print_calc(image_desc_t *im, char ***prdata) * There's no need to do any calculations on them as these * calculations were already made. */ - if (im->gdes[vidx].gf==GF_VDEF) { /* simply use vals */ + if (im->gdes[vidx].gf == GF_VDEF) { /* simply use vals */ printval = im->gdes[vidx].vf.val; - localtime_r(&im->gdes[vidx].vf.when,&tmvdef); - } else { /* need to calculate max,min,avg etcetera */ - max_ii =((im->gdes[vidx].end - - im->gdes[vidx].start) - / im->gdes[vidx].step - * im->gdes[vidx].ds_cnt); + localtime_r(&im->gdes[vidx].vf.when, &tmvdef); + } else { /* need to calculate max,min,avg etcetera */ + max_ii = ((im->gdes[vidx].end - im->gdes[vidx].start) + / im->gdes[vidx].step * im->gdes[vidx].ds_cnt); printval = DNAN; validsteps = 0; - for( ii=im->gdes[vidx].ds; - ii < max_ii; - ii+=im->gdes[vidx].ds_cnt){ - if (! finite(im->gdes[vidx].data[ii])) + for (ii = im->gdes[vidx].ds; + ii < max_ii; ii += im->gdes[vidx].ds_cnt) { + if (!finite(im->gdes[vidx].data[ii])) continue; - if (isnan(printval)){ + if (isnan(printval)) { printval = im->gdes[vidx].data[ii]; validsteps++; continue; } - switch (im->gdes[i].cf){ - case CF_HWPREDICT: - case CF_DEVPREDICT: - case CF_DEVSEASONAL: - case CF_SEASONAL: - case CF_AVERAGE: - validsteps++; - printval += im->gdes[vidx].data[ii]; - break; - case CF_MINIMUM: - printval = min( printval, im->gdes[vidx].data[ii]); - break; - case CF_FAILURES: - case CF_MAXIMUM: - printval = max( printval, im->gdes[vidx].data[ii]); - break; - case CF_LAST: - printval = im->gdes[vidx].data[ii]; + switch (im->gdes[i].cf) { + case CF_HWPREDICT: + case CF_DEVPREDICT: + case CF_DEVSEASONAL: + case CF_SEASONAL: + case CF_AVERAGE: + validsteps++; + printval += im->gdes[vidx].data[ii]; + break; + case CF_MINIMUM: + printval = min(printval, im->gdes[vidx].data[ii]); + break; + case CF_FAILURES: + case CF_MAXIMUM: + printval = max(printval, im->gdes[vidx].data[ii]); + break; + case CF_LAST: + printval = im->gdes[vidx].data[ii]; } } - if (im->gdes[i].cf==CF_AVERAGE || im->gdes[i].cf > CF_LAST) { + if (im->gdes[i].cf == CF_AVERAGE || im->gdes[i].cf > CF_LAST) { if (validsteps > 1) { printval = (printval / validsteps); } } - } /* prepare printval */ + } /* prepare printval */ - if ((percent_s = strstr(im->gdes[i].format,"%S")) != NULL) { + if ((percent_s = strstr(im->gdes[i].format, "%S")) != NULL) { /* Magfact is set to -1 upon entry to print_calc. If it * is still less than 0, then we need to run auto_scale. * Otherwise, put the value into the correct units. If * the value is 0, then do not set the symbol or magnification * so next the calculation will be performed again. */ if (magfact < 0.0) { - auto_scale(im,&printval,&si_symb,&magfact); + auto_scale(im, &printval, &si_symb, &magfact); if (printval == 0.0) magfact = -1.0; } else { printval /= magfact; } *(++percent_s) = 's'; - } else if (strstr(im->gdes[i].format,"%s") != NULL) { - auto_scale(im,&printval,&si_symb,&magfact); + } else if (strstr(im->gdes[i].format, "%s") != NULL) { + auto_scale(im, &printval, &si_symb, &magfact); } - if (im->gdes[i].gf == GF_PRINT){ - (*prdata)[prlines-2] = malloc((FMT_LEG_LEN+2)*sizeof(char)); - (*prdata)[prlines-1] = NULL; - if (im->gdes[i].strftm){ - strftime((*prdata)[prlines-2],FMT_LEG_LEN,im->gdes[i].format,&tmvdef); + if (im->gdes[i].gf == GF_PRINT) { + (*prdata)[prlines - 2] = + malloc((FMT_LEG_LEN + 2) * sizeof(char)); + (*prdata)[prlines - 1] = NULL; + if (im->gdes[i].strftm) { + strftime((*prdata)[prlines - 2], FMT_LEG_LEN, + im->gdes[i].format, &tmvdef); } else { - if (bad_format(im->gdes[i].format)) { - rrd_set_error("bad format for PRINT in '%s'", im->gdes[i].format); + if (bad_format(im->gdes[i].format)) { + rrd_set_error("bad format for PRINT in '%s'", + im->gdes[i].format); return -1; - } - + } #ifdef HAVE_SNPRINTF - snprintf((*prdata)[prlines-2],FMT_LEG_LEN,im->gdes[i].format,printval,si_symb); + snprintf((*prdata)[prlines - 2], FMT_LEG_LEN, + im->gdes[i].format, printval, si_symb); #else - sprintf((*prdata)[prlines-2],im->gdes[i].format,printval,si_symb); + sprintf((*prdata)[prlines - 2], im->gdes[i].format, + printval, si_symb); #endif - } - } else { + } + } else { /* GF_GPRINT */ - if (im->gdes[i].strftm){ - strftime(im->gdes[i].legend,FMT_LEG_LEN,im->gdes[i].format,&tmvdef); + if (im->gdes[i].strftm) { + strftime(im->gdes[i].legend, FMT_LEG_LEN, + im->gdes[i].format, &tmvdef); } else { if (bad_format(im->gdes[i].format)) { - rrd_set_error("bad format for GPRINT in '%s'", im->gdes[i].format); + rrd_set_error("bad format for GPRINT in '%s'", + im->gdes[i].format); return -1; - } + } #ifdef HAVE_SNPRINTF - snprintf(im->gdes[i].legend,FMT_LEG_LEN-2,im->gdes[i].format,printval,si_symb); + snprintf(im->gdes[i].legend, FMT_LEG_LEN - 2, + im->gdes[i].format, printval, si_symb); #else - sprintf(im->gdes[i].legend,im->gdes[i].format,printval,si_symb); + sprintf(im->gdes[i].legend, im->gdes[i].format, printval, + si_symb); #endif } - graphelement = 1; - } + graphelement = 1; + } break; case GF_LINE: case GF_AREA: @@ -1376,21 +1502,21 @@ print_calc(image_desc_t *im, char ***prdata) graphelement = 1; break; case GF_HRULE: - if(isnan(im->gdes[i].yrule)) { /* we must set this here or the legend printer can not decide to print the legend */ - im->gdes[i].yrule=im->gdes[vidx].vf.val; + if (isnan(im->gdes[i].yrule)) { /* we must set this here or the legend printer can not decide to print the legend */ + im->gdes[i].yrule = im->gdes[vidx].vf.val; }; graphelement = 1; break; case GF_VRULE: - if(im->gdes[i].xrule == 0) { /* again ... the legend printer needs it*/ - im->gdes[i].xrule = im->gdes[vidx].vf.when; + if (im->gdes[i].xrule == 0) { /* again ... the legend printer needs it */ + im->gdes[i].xrule = im->gdes[vidx].vf.when; }; graphelement = 1; break; case GF_COMMENT: case GF_DEF: - case GF_CDEF: - case GF_VDEF: + case GF_CDEF: + case GF_VDEF: #ifdef WITH_PIECHART case GF_PART: #endif @@ -1398,7 +1524,8 @@ print_calc(image_desc_t *im, char ***prdata) case GF_XPORT: break; case GF_STACK: - rrd_set_error("STACK should already be turned into LINE or AREA here"); + rrd_set_error + ("STACK should already be turned into LINE or AREA here"); return -1; break; } @@ -1408,245 +1535,265 @@ print_calc(image_desc_t *im, char ***prdata) /* place legends with color spots */ -int -leg_place(image_desc_t *im) +int leg_place( + image_desc_t * im) { /* graph labels */ - int interleg = im->text_prop[TEXT_PROP_LEGEND].size*2.0; - int border = im->text_prop[TEXT_PROP_LEGEND].size*2.0; - int fill=0, fill_last; - int leg_c = 0; - int leg_x = border, leg_y = im->yimg; - int leg_y_prev = im->yimg; - int leg_cc; - int glue = 0; - int i,ii, mark = 0; - char prt_fctn; /*special printfunctions */ - int *legspace; - - if( !(im->extra_flags & NOLEGEND) & !(im->extra_flags & ONLY_GRAPH) ) { - if ((legspace = malloc(im->gdes_c*sizeof(int)))==NULL){ - rrd_set_error("malloc for legspace"); - return -1; - } - - for(i=0;igdes_c;i++){ - fill_last = fill; - - /* hid legends for rules which are not displayed */ - - if(!(im->extra_flags & FORCE_RULES_LEGEND)) { + int interleg = im->text_prop[TEXT_PROP_LEGEND].size * 2.0; + int border = im->text_prop[TEXT_PROP_LEGEND].size * 2.0; + int fill = 0, fill_last; + int leg_c = 0; + int leg_x = border, leg_y = im->yimg; + int leg_y_prev = im->yimg; + int leg_cc; + int glue = 0; + int i, ii, mark = 0; + char prt_fctn; /*special printfunctions */ + int *legspace; + + if (!(im->extra_flags & NOLEGEND) & !(im->extra_flags & ONLY_GRAPH)) { + if ((legspace = malloc(im->gdes_c * sizeof(int))) == NULL) { + rrd_set_error("malloc for legspace"); + return -1; + } + + for (i = 0; i < im->gdes_c; i++) { + fill_last = fill; + + /* hid legends for rules which are not displayed */ + + if (!(im->extra_flags & FORCE_RULES_LEGEND)) { if (im->gdes[i].gf == GF_HRULE && - (im->gdes[i].yrule < im->minval || im->gdes[i].yrule > im->maxval)) + (im->gdes[i].yrule < im->minval + || im->gdes[i].yrule > im->maxval)) im->gdes[i].legend[0] = '\0'; if (im->gdes[i].gf == GF_VRULE && - (im->gdes[i].xrule < im->start || im->gdes[i].xrule > im->end)) + (im->gdes[i].xrule < im->start + || im->gdes[i].xrule > im->end)) im->gdes[i].legend[0] = '\0'; - } + } - leg_cc = strlen(im->gdes[i].legend); - - /* is there a controle code ant the end of the legend string ? */ - /* and it is not a tab \\t */ - if (leg_cc >= 2 && im->gdes[i].legend[leg_cc-2] == '\\' && im->gdes[i].legend[leg_cc-1] != 't') { - prt_fctn = im->gdes[i].legend[leg_cc-1]; - leg_cc -= 2; - im->gdes[i].legend[leg_cc] = '\0'; - } else { - prt_fctn = '\0'; - } - /* only valid control codes */ - if (prt_fctn != 'l' && - prt_fctn != 'n' && /* a synonym for l */ - prt_fctn != 'r' && - prt_fctn != 'j' && - prt_fctn != 'c' && - prt_fctn != 's' && - prt_fctn != 't' && - prt_fctn != '\0' && - prt_fctn != 'g' ) { - free(legspace); - rrd_set_error("Unknown control code at the end of '%s\\%c'",im->gdes[i].legend,prt_fctn); - return -1; + leg_cc = strlen(im->gdes[i].legend); - } + /* is there a controle code ant the end of the legend string ? */ + /* and it is not a tab \\t */ + if (leg_cc >= 2 && im->gdes[i].legend[leg_cc - 2] == '\\' + && im->gdes[i].legend[leg_cc - 1] != 't') { + prt_fctn = im->gdes[i].legend[leg_cc - 1]; + leg_cc -= 2; + im->gdes[i].legend[leg_cc] = '\0'; + } else { + prt_fctn = '\0'; + } + /* only valid control codes */ + if (prt_fctn != 'l' && prt_fctn != 'n' && /* a synonym for l */ + prt_fctn != 'r' && + prt_fctn != 'j' && + prt_fctn != 'c' && + prt_fctn != 's' && + prt_fctn != 't' && prt_fctn != '\0' && prt_fctn != 'g') { + free(legspace); + rrd_set_error("Unknown control code at the end of '%s\\%c'", + im->gdes[i].legend, prt_fctn); + return -1; - /* remove exess space */ - if ( prt_fctn == 'n' ){ - prt_fctn='l'; - } + } - while (prt_fctn=='g' && - leg_cc > 0 && - im->gdes[i].legend[leg_cc-1]==' '){ - leg_cc--; - im->gdes[i].legend[leg_cc]='\0'; - } - if (leg_cc != 0 ){ - legspace[i]=(prt_fctn=='g' ? 0 : interleg); - - if (fill > 0){ - /* no interleg space if string ends in \g */ - fill += legspace[i]; + /* remove exess space */ + if (prt_fctn == 'n') { + prt_fctn = 'l'; } - fill += gfx_get_text_width(im->canvas, fill+border, - im->text_prop[TEXT_PROP_LEGEND].font, - im->text_prop[TEXT_PROP_LEGEND].size, - im->tabwidth, - im->gdes[i].legend, 0); - leg_c++; - } else { - legspace[i]=0; - } - /* who said there was a special tag ... ?*/ - if (prt_fctn=='g') { - prt_fctn = '\0'; - } - if (prt_fctn == '\0') { - if (i == im->gdes_c -1 ) prt_fctn ='l'; - - /* is it time to place the legends ? */ - if (fill > im->ximg - 2*border){ - if (leg_c > 1) { - /* go back one */ - i--; - fill = fill_last; - leg_c--; - prt_fctn = 'j'; - } else { - prt_fctn = 'l'; + + while (prt_fctn == 'g' && + leg_cc > 0 && im->gdes[i].legend[leg_cc - 1] == ' ') { + leg_cc--; + im->gdes[i].legend[leg_cc] = '\0'; + } + if (leg_cc != 0) { + legspace[i] = (prt_fctn == 'g' ? 0 : interleg); + + if (fill > 0) { + /* no interleg space if string ends in \g */ + fill += legspace[i]; } - + fill += gfx_get_text_width(im->canvas, fill + border, + im->text_prop[TEXT_PROP_LEGEND]. + font, + im->text_prop[TEXT_PROP_LEGEND]. + size, im->tabwidth, + im->gdes[i].legend, 0); + leg_c++; + } else { + legspace[i] = 0; } - } + /* who said there was a special tag ... ? */ + if (prt_fctn == 'g') { + prt_fctn = '\0'; + } + if (prt_fctn == '\0') { + if (i == im->gdes_c - 1) + prt_fctn = 'l'; + /* is it time to place the legends ? */ + if (fill > im->ximg - 2 * border) { + if (leg_c > 1) { + /* go back one */ + i--; + fill = fill_last; + leg_c--; + prt_fctn = 'j'; + } else { + prt_fctn = 'l'; + } - if (prt_fctn != '\0'){ - leg_x = border; - if (leg_c >= 2 && prt_fctn == 'j') { - glue = (im->ximg - fill - 2* border) / (leg_c-1); - } else { - glue = 0; + } } - if (prt_fctn =='c') leg_x = (im->ximg - fill) / 2.0; - if (prt_fctn =='r') leg_x = im->ximg - fill - border; - - for(ii=mark;ii<=i;ii++){ - if(im->gdes[ii].legend[0]=='\0') - continue; /* skip empty legends */ - im->gdes[ii].leg_x = leg_x; - im->gdes[ii].leg_y = leg_y; - leg_x += - gfx_get_text_width(im->canvas, leg_x, - im->text_prop[TEXT_PROP_LEGEND].font, - im->text_prop[TEXT_PROP_LEGEND].size, - im->tabwidth, - im->gdes[ii].legend, 0) - + legspace[ii] - + glue; - } - leg_y_prev = leg_y; - /* only add y space if there was text on the line */ - if (leg_x > border || prt_fctn == 's') - leg_y += im->text_prop[TEXT_PROP_LEGEND].size*1.8; - if (prt_fctn == 's') - leg_y -= im->text_prop[TEXT_PROP_LEGEND].size; - fill = 0; - leg_c = 0; - mark = ii; - } - } - im->yimg = leg_y_prev; - /* if we did place some legends we have to add vertical space */ - if (leg_y != im->yimg){ - im->yimg += im->text_prop[TEXT_PROP_LEGEND].size*1.8; - } - free(legspace); - } - return 0; -} -/* create a grid on the graph. it determines what to do - from the values of xsize, start and end */ -/* the xaxis labels are determined from the number of seconds per pixel + if (prt_fctn != '\0') { + leg_x = border; + if (leg_c >= 2 && prt_fctn == 'j') { + glue = (im->ximg - fill - 2 * border) / (leg_c - 1); + } else { + glue = 0; + } + if (prt_fctn == 'c') + leg_x = (im->ximg - fill) / 2.0; + if (prt_fctn == 'r') + leg_x = im->ximg - fill - border; + + for (ii = mark; ii <= i; ii++) { + if (im->gdes[ii].legend[0] == '\0') + continue; /* skip empty legends */ + im->gdes[ii].leg_x = leg_x; + im->gdes[ii].leg_y = leg_y; + leg_x += + gfx_get_text_width(im->canvas, leg_x, + im->text_prop[TEXT_PROP_LEGEND]. + font, + im->text_prop[TEXT_PROP_LEGEND]. + size, im->tabwidth, + im->gdes[ii].legend, 0) + + legspace[ii] + + glue; + } + leg_y_prev = leg_y; + /* only add y space if there was text on the line */ + if (leg_x > border || prt_fctn == 's') + leg_y += im->text_prop[TEXT_PROP_LEGEND].size * 1.8; + if (prt_fctn == 's') + leg_y -= im->text_prop[TEXT_PROP_LEGEND].size; + fill = 0; + leg_c = 0; + mark = ii; + } + } + im->yimg = leg_y_prev; + /* if we did place some legends we have to add vertical space */ + if (leg_y != im->yimg) { + im->yimg += im->text_prop[TEXT_PROP_LEGEND].size * 1.8; + } + free(legspace); + } + return 0; +} + +/* create a grid on the graph. it determines what to do + from the values of xsize, start and end */ + +/* the xaxis labels are determined from the number of seconds per pixel in the requested graph */ -int -calc_horizontal_grid(image_desc_t *im) +int calc_horizontal_grid( + image_desc_t * im) { - double range; - double scaledrange; - int pixel,i; - int gridind=0; - int decimals, fractionals; - - im->ygrid_scale.labfact=2; - range = im->maxval - im->minval; + double range; + double scaledrange; + int pixel, i; + int gridind = 0; + int decimals, fractionals; + + im->ygrid_scale.labfact = 2; + range = im->maxval - im->minval; scaledrange = range / im->magfact; - /* does the scale of this graph make it impossible to put lines - on it? If so, give up. */ - if (isnan(scaledrange)) { - return 0; - } + /* does the scale of this graph make it impossible to put lines + on it? If so, give up. */ + if (isnan(scaledrange)) { + return 0; + } /* find grid spaceing */ - pixel=1; - if(isnan(im->ygridstep)){ - if(im->extra_flags & ALTYGRID) { + pixel = 1; + if (isnan(im->ygridstep)) { + if (im->extra_flags & ALTYGRID) { /* find the value with max number of digits. Get number of digits */ - decimals = ceil(log10(max(fabs(im->maxval), fabs(im->minval))*im->viewfactor/im->magfact)); - if(decimals <= 0) /* everything is small. make place for zero */ + decimals = + ceil(log10 + (max(fabs(im->maxval), fabs(im->minval)) * + im->viewfactor / im->magfact)); + if (decimals <= 0) /* everything is small. make place for zero */ decimals = 1; - - im->ygrid_scale.gridstep = pow((double)10, floor(log10(range*im->viewfactor/im->magfact)))/im->viewfactor*im->magfact; - - if(im->ygrid_scale.gridstep == 0) /* range is one -> 0.1 is reasonable scale */ + + im->ygrid_scale.gridstep = + pow((double) 10, + floor(log10(range * im->viewfactor / im->magfact))) / + im->viewfactor * im->magfact; + + if (im->ygrid_scale.gridstep == 0) /* range is one -> 0.1 is reasonable scale */ im->ygrid_scale.gridstep = 0.1; /* should have at least 5 lines but no more then 15 */ - if(range/im->ygrid_scale.gridstep < 5) + if (range / im->ygrid_scale.gridstep < 5) im->ygrid_scale.gridstep /= 10; - if(range/im->ygrid_scale.gridstep > 15) + if (range / im->ygrid_scale.gridstep > 15) im->ygrid_scale.gridstep *= 10; - if(range/im->ygrid_scale.gridstep > 5) { + if (range / im->ygrid_scale.gridstep > 5) { im->ygrid_scale.labfact = 1; - if(range/im->ygrid_scale.gridstep > 8) + if (range / im->ygrid_scale.gridstep > 8) im->ygrid_scale.labfact = 2; - } - else { + } else { im->ygrid_scale.gridstep /= 5; im->ygrid_scale.labfact = 5; } - fractionals = floor(log10(im->ygrid_scale.gridstep*(double)im->ygrid_scale.labfact*im->viewfactor/im->magfact)); - if(fractionals < 0) { /* small amplitude. */ - int len = decimals - fractionals + 1; - if (im->unitslength < len+2) im->unitslength = len+2; - sprintf(im->ygrid_scale.labfmt, "%%%d.%df%s", len, -fractionals,(im->symbol != ' ' ? " %c" : "")); + fractionals = + floor(log10 + (im->ygrid_scale.gridstep * + (double) im->ygrid_scale.labfact * im->viewfactor / + im->magfact)); + if (fractionals < 0) { /* small amplitude. */ + int len = decimals - fractionals + 1; + + if (im->unitslength < len + 2) + im->unitslength = len + 2; + sprintf(im->ygrid_scale.labfmt, "%%%d.%df%s", len, + -fractionals, (im->symbol != ' ' ? " %c" : "")); } else { - int len = decimals + 1; - if (im->unitslength < len+2) im->unitslength = len+2; - sprintf(im->ygrid_scale.labfmt, "%%%d.0f%s", len, ( im->symbol != ' ' ? " %c" : "" )); + int len = decimals + 1; + + if (im->unitslength < len + 2) + im->unitslength = len + 2; + sprintf(im->ygrid_scale.labfmt, "%%%d.0f%s", len, + (im->symbol != ' ' ? " %c" : "")); } - } - else { - for(i=0;ylab[i].grid > 0;i++){ + } else { + for (i = 0; ylab[i].grid > 0; i++) { pixel = im->ysize / (scaledrange / ylab[i].grid); - gridind = i; + gridind = i; if (pixel > 7) break; } - - for(i=0; i<4;i++) { - if (pixel * ylab[gridind].lfac[i] >= 2.5 * im->text_prop[TEXT_PROP_AXIS].size) { - im->ygrid_scale.labfact = ylab[gridind].lfac[i]; - break; - } - } - + + for (i = 0; i < 4; i++) { + if (pixel * ylab[gridind].lfac[i] >= + 2.5 * im->text_prop[TEXT_PROP_AXIS].size) { + im->ygrid_scale.labfact = ylab[gridind].lfac[i]; + break; + } + } + im->ygrid_scale.gridstep = ylab[gridind].grid * im->magfact; } } else { @@ -1656,88 +1803,107 @@ calc_horizontal_grid(image_desc_t *im) return 1; } -int draw_horizontal_grid(image_desc_t *im) +int draw_horizontal_grid( + image_desc_t * im) { - int i; - double scaledstep; - char graph_label[100]; - int nlabels=0; - double X0=im->xorigin; - double X1=im->xorigin+im->xsize; - - int sgrid = (int)( im->minval / im->ygrid_scale.gridstep - 1); - int egrid = (int)( im->maxval / im->ygrid_scale.gridstep + 1); - double MaxY; - scaledstep = im->ygrid_scale.gridstep/(double)im->magfact*(double)im->viewfactor; - MaxY = scaledstep*(double)egrid; - for (i = sgrid; i <= egrid; i++){ - double Y0=ytr(im,im->ygrid_scale.gridstep*i); - double YN=ytr(im,im->ygrid_scale.gridstep*(i+1)); - if ( floor(Y0+0.5) >= im->yorigin-im->ysize - && floor(Y0+0.5) <= im->yorigin){ + int i; + double scaledstep; + char graph_label[100]; + int nlabels = 0; + double X0 = im->xorigin; + double X1 = im->xorigin + im->xsize; + + int sgrid = (int) (im->minval / im->ygrid_scale.gridstep - 1); + int egrid = (int) (im->maxval / im->ygrid_scale.gridstep + 1); + double MaxY; + + scaledstep = + im->ygrid_scale.gridstep / (double) im->magfact * + (double) im->viewfactor; + MaxY = scaledstep * (double) egrid; + for (i = sgrid; i <= egrid; i++) { + double Y0 = ytr(im, im->ygrid_scale.gridstep * i); + double YN = ytr(im, im->ygrid_scale.gridstep * (i + 1)); + + if (floor(Y0 + 0.5) >= im->yorigin - im->ysize + && floor(Y0 + 0.5) <= im->yorigin) { /* Make sure at least 2 grid labels are shown, even if it doesn't agree with the chosen settings. Add a label if required by settings, or if there is only one label so far and the next grid line is out of bounds. */ - if(i % im->ygrid_scale.labfact == 0 || ( nlabels==1 && (YN < im->yorigin-im->ysize || YN > im->yorigin) )){ + if (i % im->ygrid_scale.labfact == 0 + || (nlabels == 1 + && (YN < im->yorigin - im->ysize || YN > im->yorigin))) { if (im->symbol == ' ') { - if(im->extra_flags & ALTYGRID) { - sprintf(graph_label,im->ygrid_scale.labfmt,scaledstep*(double)i); + if (im->extra_flags & ALTYGRID) { + sprintf(graph_label, im->ygrid_scale.labfmt, + scaledstep * (double) i); } else { - if(MaxY < 10) { - sprintf(graph_label,"%4.1f",scaledstep*(double)i); - } else { - sprintf(graph_label,"%4.0f",scaledstep*(double)i); + if (MaxY < 10) { + sprintf(graph_label, "%4.1f", + scaledstep * (double) i); + } else { + sprintf(graph_label, "%4.0f", + scaledstep * (double) i); } } - }else { - char sisym = ( i == 0 ? ' ' : im->symbol); - if(im->extra_flags & ALTYGRID) { - sprintf(graph_label,im->ygrid_scale.labfmt,scaledstep*(double)i,sisym); + } else { + char sisym = (i == 0 ? ' ' : im->symbol); + + if (im->extra_flags & ALTYGRID) { + sprintf(graph_label, im->ygrid_scale.labfmt, + scaledstep * (double) i, sisym); } else { - if(MaxY < 10){ - sprintf(graph_label,"%4.1f %c",scaledstep*(double)i, sisym); + if (MaxY < 10) { + sprintf(graph_label, "%4.1f %c", + scaledstep * (double) i, sisym); } else { - sprintf(graph_label,"%4.0f %c",scaledstep*(double)i, sisym); + sprintf(graph_label, "%4.0f %c", + scaledstep * (double) i, sisym); } } } nlabels++; - gfx_new_text ( im->canvas, - X0-im->text_prop[TEXT_PROP_AXIS].size, Y0, - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_AXIS].font, - im->text_prop[TEXT_PROP_AXIS].size, - im->tabwidth, 0.0, GFX_H_RIGHT, GFX_V_CENTER, - graph_label ); - gfx_new_dashed_line ( im->canvas, - X0-2,Y0, - X1+2,Y0, - MGRIDWIDTH, im->graph_col[GRC_MGRID], - im->grid_dash_on, im->grid_dash_off); - - } else if (!(im->extra_flags & NOMINOR)) { - gfx_new_dashed_line ( im->canvas, - X0-1,Y0, - X1+1,Y0, - GRIDWIDTH, im->graph_col[GRC_GRID], - im->grid_dash_on, im->grid_dash_off); - - } - } - } + gfx_new_text(im->canvas, + X0 - im->text_prop[TEXT_PROP_AXIS].size, Y0, + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_AXIS].font, + im->text_prop[TEXT_PROP_AXIS].size, + im->tabwidth, 0.0, GFX_H_RIGHT, GFX_V_CENTER, + graph_label); + gfx_new_dashed_line(im->canvas, + X0 - 2, Y0, + X1 + 2, Y0, + MGRIDWIDTH, im->graph_col[GRC_MGRID], + im->grid_dash_on, im->grid_dash_off); + + } else if (!(im->extra_flags & NOMINOR)) { + gfx_new_dashed_line(im->canvas, + X0 - 1, Y0, + X1 + 1, Y0, + GRIDWIDTH, im->graph_col[GRC_GRID], + im->grid_dash_on, im->grid_dash_off); + + } + } + } return 1; } /* this is frexp for base 10 */ -double frexp10(double, double *); -double frexp10(double x, double *e) { - double mnt; - int iexp; +double frexp10( + double, + double *); +double frexp10( + double x, + double *e) +{ + double mnt; + int iexp; iexp = floor(log(fabs(x)) / log(10)); mnt = x / pow(10.0, iexp); - if(mnt >= 10.0) { + if (mnt >= 10.0) { iexp++; mnt = x / pow(10.0, iexp); } @@ -1745,12 +1911,16 @@ double frexp10(double x, double *e) { return mnt; } -static int AlmostEqual2sComplement (float A, float B, int maxUlps) +static int AlmostEqual2sComplement( + float A, + float B, + int maxUlps) { - int aInt = *(int*)&A; - int bInt = *(int*)&B; - int intDiff; + int aInt = *(int *) &A; + int bInt = *(int *) &B; + int intDiff; + /* Make sure maxUlps is non-negative and small enough that the default NAN won't compare as equal to anything. */ @@ -1775,210 +1945,227 @@ static int AlmostEqual2sComplement (float A, float B, int maxUlps) } /* logaritmic horizontal grid */ -int -horizontal_log_grid(image_desc_t *im) +int horizontal_log_grid( + image_desc_t * im) { - double yloglab[][10] = { + double yloglab[][10] = { {1.0, 10., 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {1.0, 5.0, 10., 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, {1.0, 2.0, 5.0, 7.0, 10., 0.0, 0.0, 0.0, 0.0, 0.0}, {1.0, 2.0, 4.0, 6.0, 8.0, 10., 0.0, 0.0, 0.0, 0.0}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.}, - {0,0,0,0,0, 0,0,0,0,0} /* last line */ }; - - int i, j, val_exp, min_exp; - double nex; /* number of decades in data */ - double logscale; /* scale in logarithmic space */ - int exfrac = 1; /* decade spacing */ - int mid = -1; /* row in yloglab for major grid */ - double mspac; /* smallest major grid spacing (pixels) */ - int flab; /* first value in yloglab to use */ - double value, tmp, pre_value; - double X0,X1,Y0; - char graph_label[100]; + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} /* last line */ + }; + + int i, j, val_exp, min_exp; + double nex; /* number of decades in data */ + double logscale; /* scale in logarithmic space */ + int exfrac = 1; /* decade spacing */ + int mid = -1; /* row in yloglab for major grid */ + double mspac; /* smallest major grid spacing (pixels) */ + int flab; /* first value in yloglab to use */ + double value, tmp, pre_value; + double X0, X1, Y0; + char graph_label[100]; nex = log10(im->maxval / im->minval); logscale = im->ysize / nex; /* major spacing for data with high dynamic range */ - while(logscale * exfrac < 3 * im->text_prop[TEXT_PROP_LEGEND].size) { - if(exfrac == 1) exfrac = 3; - else exfrac += 3; + while (logscale * exfrac < 3 * im->text_prop[TEXT_PROP_LEGEND].size) { + if (exfrac == 1) + exfrac = 3; + else + exfrac += 3; } /* major spacing for less dynamic data */ do { /* search best row in yloglab */ mid++; - for(i = 0; yloglab[mid][i + 1] < 10.0; i++); + for (i = 0; yloglab[mid][i + 1] < 10.0; i++); mspac = logscale * log10(10.0 / yloglab[mid][i]); - } while(mspac > 2 * im->text_prop[TEXT_PROP_LEGEND].size && yloglab[mid][0] > 0); - if(mid) mid--; + } while (mspac > 2 * im->text_prop[TEXT_PROP_LEGEND].size + && yloglab[mid][0] > 0); + if (mid) + mid--; /* find first value in yloglab */ - for(flab = 0; yloglab[mid][flab] < 10 && frexp10(im->minval, &tmp) > yloglab[mid][flab] ; flab++); - if(yloglab[mid][flab] == 10.0) { + for (flab = 0; + yloglab[mid][flab] < 10 + && frexp10(im->minval, &tmp) > yloglab[mid][flab]; flab++); + if (yloglab[mid][flab] == 10.0) { tmp += 1.0; flab = 0; } val_exp = tmp; - if(val_exp % exfrac) val_exp += abs(-val_exp % exfrac); + if (val_exp % exfrac) + val_exp += abs(-val_exp % exfrac); - X0=im->xorigin; - X1=im->xorigin+im->xsize; + X0 = im->xorigin; + X1 = im->xorigin + im->xsize; /* draw grid */ pre_value = DNAN; - while(1) { + while (1) { value = yloglab[mid][flab] * pow(10.0, val_exp); - if ( AlmostEqual2sComplement(value,pre_value,4) ) break; /* it seems we are not converging */ + if (AlmostEqual2sComplement(value, pre_value, 4)) + break; /* it seems we are not converging */ pre_value = value; Y0 = ytr(im, value); - if(floor(Y0+0.5) <= im->yorigin - im->ysize) break; + if (floor(Y0 + 0.5) <= im->yorigin - im->ysize) + break; /* major grid line */ - gfx_new_dashed_line ( im->canvas, - X0-2,Y0, - X1+2,Y0, - MGRIDWIDTH, im->graph_col[GRC_MGRID], - im->grid_dash_on, im->grid_dash_off); + gfx_new_dashed_line(im->canvas, + X0 - 2, Y0, + X1 + 2, Y0, + MGRIDWIDTH, im->graph_col[GRC_MGRID], + im->grid_dash_on, im->grid_dash_off); /* label */ if (im->extra_flags & FORCE_UNITS_SI) { - int scale; - double pvalue; - char symbol; + int scale; + double pvalue; + char symbol; scale = floor(val_exp / 3.0); - if( value >= 1.0 ) pvalue = pow(10.0, val_exp % 3); - else pvalue = pow(10.0, ((val_exp + 1) % 3) + 2); + if (value >= 1.0) + pvalue = pow(10.0, val_exp % 3); + else + pvalue = pow(10.0, ((val_exp + 1) % 3) + 2); pvalue *= yloglab[mid][flab]; - if ( ((scale+si_symbcenter) < (int)sizeof(si_symbol)) && - ((scale+si_symbcenter) >= 0) ) - symbol = si_symbol[scale+si_symbcenter]; + if (((scale + si_symbcenter) < (int) sizeof(si_symbol)) && + ((scale + si_symbcenter) >= 0)) + symbol = si_symbol[scale + si_symbcenter]; else symbol = '?'; - sprintf(graph_label,"%3.0f %c", pvalue, symbol); + sprintf(graph_label, "%3.0f %c", pvalue, symbol); } else - sprintf(graph_label,"%3.0e", value); - gfx_new_text ( im->canvas, - X0-im->text_prop[TEXT_PROP_AXIS].size, Y0, - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_AXIS].font, - im->text_prop[TEXT_PROP_AXIS].size, - im->tabwidth,0.0, GFX_H_RIGHT, GFX_V_CENTER, - graph_label ); + sprintf(graph_label, "%3.0e", value); + gfx_new_text(im->canvas, + X0 - im->text_prop[TEXT_PROP_AXIS].size, Y0, + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_AXIS].font, + im->text_prop[TEXT_PROP_AXIS].size, + im->tabwidth, 0.0, GFX_H_RIGHT, GFX_V_CENTER, + graph_label); /* minor grid */ - if(mid < 4 && exfrac == 1) { + if (mid < 4 && exfrac == 1) { /* find first and last minor line behind current major line * i is the first line and j tha last */ - if(flab == 0) { + if (flab == 0) { min_exp = val_exp - 1; - for(i = 1; yloglab[mid][i] < 10.0; i++); + for (i = 1; yloglab[mid][i] < 10.0; i++); i = yloglab[mid][i - 1] + 1; j = 10; - } - else { + } else { min_exp = val_exp; i = yloglab[mid][flab - 1] + 1; j = yloglab[mid][flab]; } /* draw minor lines below current major line */ - for(; i < j; i++) { + for (; i < j; i++) { value = i * pow(10.0, min_exp); - if(value < im->minval) continue; + if (value < im->minval) + continue; Y0 = ytr(im, value); - if(floor(Y0+0.5) <= im->yorigin - im->ysize) break; + if (floor(Y0 + 0.5) <= im->yorigin - im->ysize) + break; /* draw lines */ - gfx_new_dashed_line ( im->canvas, - X0-1,Y0, - X1+1,Y0, - GRIDWIDTH, im->graph_col[GRC_GRID], - im->grid_dash_on, im->grid_dash_off); + gfx_new_dashed_line(im->canvas, + X0 - 1, Y0, + X1 + 1, Y0, + GRIDWIDTH, im->graph_col[GRC_GRID], + im->grid_dash_on, im->grid_dash_off); } - } - else if(exfrac > 1) { - for(i = val_exp - exfrac / 3 * 2; i < val_exp; i += exfrac / 3) { + } else if (exfrac > 1) { + for (i = val_exp - exfrac / 3 * 2; i < val_exp; i += exfrac / 3) { value = pow(10.0, i); - if(value < im->minval) continue; + if (value < im->minval) + continue; Y0 = ytr(im, value); - if(floor(Y0+0.5) <= im->yorigin - im->ysize) break; + if (floor(Y0 + 0.5) <= im->yorigin - im->ysize) + break; /* draw lines */ - gfx_new_dashed_line ( im->canvas, - X0-1,Y0, - X1+1,Y0, - GRIDWIDTH, im->graph_col[GRC_GRID], - im->grid_dash_on, im->grid_dash_off); + gfx_new_dashed_line(im->canvas, + X0 - 1, Y0, + X1 + 1, Y0, + GRIDWIDTH, im->graph_col[GRC_GRID], + im->grid_dash_on, im->grid_dash_off); } } /* next decade */ - if(yloglab[mid][++flab] == 10.0) { + if (yloglab[mid][++flab] == 10.0) { flab = 0; val_exp += exfrac; } } /* draw minor lines after highest major line */ - if(mid < 4 && exfrac == 1) { + if (mid < 4 && exfrac == 1) { /* find first and last minor line below current major line * i is the first line and j tha last */ - if(flab == 0) { + if (flab == 0) { min_exp = val_exp - 1; - for(i = 1; yloglab[mid][i] < 10.0; i++); + for (i = 1; yloglab[mid][i] < 10.0; i++); i = yloglab[mid][i - 1] + 1; j = 10; - } - else { + } else { min_exp = val_exp; i = yloglab[mid][flab - 1] + 1; j = yloglab[mid][flab]; } /* draw minor lines below current major line */ - for(; i < j; i++) { + for (; i < j; i++) { value = i * pow(10.0, min_exp); - if(value < im->minval) continue; + if (value < im->minval) + continue; Y0 = ytr(im, value); - if(floor(Y0+0.5) <= im->yorigin - im->ysize) break; + if (floor(Y0 + 0.5) <= im->yorigin - im->ysize) + break; /* draw lines */ - gfx_new_dashed_line ( im->canvas, - X0-1,Y0, - X1+1,Y0, - GRIDWIDTH, im->graph_col[GRC_GRID], - im->grid_dash_on, im->grid_dash_off); + gfx_new_dashed_line(im->canvas, + X0 - 1, Y0, + X1 + 1, Y0, + GRIDWIDTH, im->graph_col[GRC_GRID], + im->grid_dash_on, im->grid_dash_off); } } /* fancy minor gridlines */ - else if(exfrac > 1) { - for(i = val_exp - exfrac / 3 * 2; i < val_exp; i += exfrac / 3) { + else if (exfrac > 1) { + for (i = val_exp - exfrac / 3 * 2; i < val_exp; i += exfrac / 3) { value = pow(10.0, i); - if(value < im->minval) continue; + if (value < im->minval) + continue; Y0 = ytr(im, value); - if(floor(Y0+0.5) <= im->yorigin - im->ysize) break; + if (floor(Y0 + 0.5) <= im->yorigin - im->ysize) + break; /* draw lines */ - gfx_new_dashed_line ( im->canvas, - X0-1,Y0, - X1+1,Y0, - GRIDWIDTH, im->graph_col[GRC_GRID], - im->grid_dash_on, im->grid_dash_off); + gfx_new_dashed_line(im->canvas, + X0 - 1, Y0, + X1 + 1, Y0, + GRIDWIDTH, im->graph_col[GRC_GRID], + im->grid_dash_on, im->grid_dash_off); } } @@ -1986,28 +2173,31 @@ horizontal_log_grid(image_desc_t *im) } -void -vertical_grid( - image_desc_t *im ) -{ - int xlab_sel; /* which sort of label and grid ? */ - time_t ti, tilab, timajor; - long factor; - char graph_label[100]; - double X0,Y0,Y1; /* points for filled graph and more*/ +void vertical_grid( + image_desc_t * im) +{ + int xlab_sel; /* which sort of label and grid ? */ + time_t ti, tilab, timajor; + long factor; + char graph_label[100]; + double X0, Y0, Y1; /* points for filled graph and more */ struct tm tm; /* the type of time grid is determined by finding the number of seconds per pixel in the graph */ - - - if(im->xlab_user.minsec == -1){ - factor=(im->end - im->start)/im->xsize; - xlab_sel=0; - while ( xlab[xlab_sel+1].minsec != -1 - && xlab[xlab_sel+1].minsec <= factor) { xlab_sel++; } /* pick the last one */ - while ( xlab[xlab_sel-1].minsec == xlab[xlab_sel].minsec - && xlab[xlab_sel].length > (im->end - im->start)) { xlab_sel--; } /* go back to the smallest size */ + + + if (im->xlab_user.minsec == -1) { + factor = (im->end - im->start) / im->xsize; + xlab_sel = 0; + while (xlab[xlab_sel + 1].minsec != -1 + && xlab[xlab_sel + 1].minsec <= factor) { + xlab_sel++; + } /* pick the last one */ + while (xlab[xlab_sel - 1].minsec == xlab[xlab_sel].minsec + && xlab[xlab_sel].length > (im->end - im->start)) { + xlab_sel--; + } /* go back to the smallest size */ im->xlab_user.gridtm = xlab[xlab_sel].gridtm; im->xlab_user.gridst = xlab[xlab_sel].gridst; im->xlab_user.mgridtm = xlab[xlab_sel].mgridtm; @@ -2017,260 +2207,248 @@ vertical_grid( im->xlab_user.precis = xlab[xlab_sel].precis; im->xlab_user.stst = xlab[xlab_sel].stst; } - + /* y coords are the same for every line ... */ Y0 = im->yorigin; - Y1 = im->yorigin-im->ysize; - + Y1 = im->yorigin - im->ysize; + /* paint the minor grid */ - if (!(im->extra_flags & NOMINOR)) - { - for(ti = find_first_time(im->start, - im->xlab_user.gridtm, - im->xlab_user.gridst), - timajor = find_first_time(im->start, - im->xlab_user.mgridtm, - im->xlab_user.mgridst); - ti < im->end; - ti = find_next_time(ti,im->xlab_user.gridtm,im->xlab_user.gridst) - ){ + if (!(im->extra_flags & NOMINOR)) { + for (ti = find_first_time(im->start, + im->xlab_user.gridtm, + im->xlab_user.gridst), + timajor = find_first_time(im->start, + im->xlab_user.mgridtm, + im->xlab_user.mgridst); + ti < im->end; + ti = + find_next_time(ti, im->xlab_user.gridtm, im->xlab_user.gridst) + ) { /* are we inside the graph ? */ - if (ti < im->start || ti > im->end) continue; + if (ti < im->start || ti > im->end) + continue; while (timajor < ti) { timajor = find_next_time(timajor, - im->xlab_user.mgridtm, im->xlab_user.mgridst); + im->xlab_user.mgridtm, + im->xlab_user.mgridst); } - if (ti == timajor) continue; /* skip as falls on major grid line */ - X0 = xtr(im,ti); - gfx_new_dashed_line(im->canvas,X0,Y0+1, X0,Y1-1,GRIDWIDTH, - im->graph_col[GRC_GRID], - im->grid_dash_on, im->grid_dash_off); - + if (ti == timajor) + continue; /* skip as falls on major grid line */ + X0 = xtr(im, ti); + gfx_new_dashed_line(im->canvas, X0, Y0 + 1, X0, Y1 - 1, GRIDWIDTH, + im->graph_col[GRC_GRID], + im->grid_dash_on, im->grid_dash_off); + } } /* paint the major grid */ - for(ti = find_first_time(im->start, - im->xlab_user.mgridtm, - im->xlab_user.mgridst); - ti < im->end; - ti = find_next_time(ti,im->xlab_user.mgridtm,im->xlab_user.mgridst) - ){ + for (ti = find_first_time(im->start, + im->xlab_user.mgridtm, + im->xlab_user.mgridst); + ti < im->end; + ti = find_next_time(ti, im->xlab_user.mgridtm, im->xlab_user.mgridst) + ) { /* are we inside the graph ? */ - if (ti < im->start || ti > im->end) continue; - X0 = xtr(im,ti); - gfx_new_dashed_line(im->canvas,X0,Y0+3, X0,Y1-2,MGRIDWIDTH, - im->graph_col[GRC_MGRID], - im->grid_dash_on, im->grid_dash_off); - + if (ti < im->start || ti > im->end) + continue; + X0 = xtr(im, ti); + gfx_new_dashed_line(im->canvas, X0, Y0 + 3, X0, Y1 - 2, MGRIDWIDTH, + im->graph_col[GRC_MGRID], + im->grid_dash_on, im->grid_dash_off); + } /* paint the labels below the graph */ - for(ti = find_first_time(im->start - im->xlab_user.precis/2, - im->xlab_user.labtm, - im->xlab_user.labst); - ti <= im->end - im->xlab_user.precis/2; - ti = find_next_time(ti,im->xlab_user.labtm,im->xlab_user.labst) - ){ - tilab= ti + im->xlab_user.precis/2; /* correct time for the label */ + for (ti = find_first_time(im->start - im->xlab_user.precis / 2, + im->xlab_user.labtm, + im->xlab_user.labst); + ti <= im->end - im->xlab_user.precis / 2; + ti = find_next_time(ti, im->xlab_user.labtm, im->xlab_user.labst) + ) { + tilab = ti + im->xlab_user.precis / 2; /* correct time for the label */ /* are we inside the graph ? */ - if (tilab < im->start || tilab > im->end) continue; + if (tilab < im->start || tilab > im->end) + continue; #if HAVE_STRFTIME localtime_r(&tilab, &tm); - strftime(graph_label,99,im->xlab_user.stst, &tm); + strftime(graph_label, 99, im->xlab_user.stst, &tm); #else # error "your libc has no strftime I guess we'll abort the exercise here." #endif - gfx_new_text ( im->canvas, - xtr(im,tilab), Y0+im->text_prop[TEXT_PROP_AXIS].size*1.4+5, - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_AXIS].font, - im->text_prop[TEXT_PROP_AXIS].size, - im->tabwidth, 0.0, GFX_H_CENTER, GFX_V_BOTTOM, - graph_label ); - + gfx_new_text(im->canvas, + xtr(im, tilab), + Y0 + im->text_prop[TEXT_PROP_AXIS].size * 1.4 + 5, + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_AXIS].font, + im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth, 0.0, + GFX_H_CENTER, GFX_V_BOTTOM, graph_label); + } } -void -axis_paint( - image_desc_t *im - ) -{ +void axis_paint( + image_desc_t * im) +{ /* draw x and y axis */ /* gfx_new_line ( im->canvas, im->xorigin+im->xsize,im->yorigin, - im->xorigin+im->xsize,im->yorigin-im->ysize, - GRIDWIDTH, im->graph_col[GRC_AXIS]); - + im->xorigin+im->xsize,im->yorigin-im->ysize, + GRIDWIDTH, im->graph_col[GRC_AXIS]); + gfx_new_line ( im->canvas, im->xorigin,im->yorigin-im->ysize, - im->xorigin+im->xsize,im->yorigin-im->ysize, - GRIDWIDTH, im->graph_col[GRC_AXIS]); */ - - gfx_new_line ( im->canvas, im->xorigin-4,im->yorigin, - im->xorigin+im->xsize+4,im->yorigin, - MGRIDWIDTH, im->graph_col[GRC_AXIS]); - - gfx_new_line ( im->canvas, im->xorigin,im->yorigin+4, - im->xorigin,im->yorigin-im->ysize-4, - MGRIDWIDTH, im->graph_col[GRC_AXIS]); - - + im->xorigin+im->xsize,im->yorigin-im->ysize, + GRIDWIDTH, im->graph_col[GRC_AXIS]); */ + + gfx_new_line(im->canvas, im->xorigin - 4, im->yorigin, + im->xorigin + im->xsize + 4, im->yorigin, + MGRIDWIDTH, im->graph_col[GRC_AXIS]); + + gfx_new_line(im->canvas, im->xorigin, im->yorigin + 4, + im->xorigin, im->yorigin - im->ysize - 4, + MGRIDWIDTH, im->graph_col[GRC_AXIS]); + + /* arrow for X and Y axis direction */ - gfx_new_area ( im->canvas, - im->xorigin+im->xsize+2, im->yorigin-2, - im->xorigin+im->xsize+2, im->yorigin+3, - im->xorigin+im->xsize+7, im->yorigin+0.5, /* LINEOFFSET */ - im->graph_col[GRC_ARROW]); - - gfx_new_area ( im->canvas, - im->xorigin-2, im->yorigin-im->ysize-2, - im->xorigin+3, im->yorigin-im->ysize-2, - im->xorigin+0.5, im->yorigin-im->ysize-7, /* LINEOFFSET */ - im->graph_col[GRC_ARROW]); + gfx_new_area(im->canvas, im->xorigin + im->xsize + 2, im->yorigin - 2, im->xorigin + im->xsize + 2, im->yorigin + 3, im->xorigin + im->xsize + 7, im->yorigin + 0.5, /* LINEOFFSET */ + im->graph_col[GRC_ARROW]); + + gfx_new_area(im->canvas, im->xorigin - 2, im->yorigin - im->ysize - 2, im->xorigin + 3, im->yorigin - im->ysize - 2, im->xorigin + 0.5, im->yorigin - im->ysize - 7, /* LINEOFFSET */ + im->graph_col[GRC_ARROW]); } -void -grid_paint(image_desc_t *im) -{ - long i; - int res=0; - double X0,Y0; /* points for filled graph and more*/ +void grid_paint( + image_desc_t * im) +{ + long i; + int res = 0; + double X0, Y0; /* points for filled graph and more */ gfx_node_t *node; /* draw 3d border */ - node = gfx_new_area (im->canvas, 0,im->yimg, - 2,im->yimg-2, - 2,2,im->graph_col[GRC_SHADEA]); - gfx_add_point( node , im->ximg - 2, 2 ); - gfx_add_point( node , im->ximg, 0 ); - gfx_add_point( node , 0,0 ); + node = gfx_new_area(im->canvas, 0, im->yimg, + 2, im->yimg - 2, 2, 2, im->graph_col[GRC_SHADEA]); + gfx_add_point(node, im->ximg - 2, 2); + gfx_add_point(node, im->ximg, 0); + gfx_add_point(node, 0, 0); /* gfx_add_point( node , 0,im->yimg ); */ - - node = gfx_new_area (im->canvas, 2,im->yimg-2, - im->ximg-2,im->yimg-2, - im->ximg - 2, 2, - im->graph_col[GRC_SHADEB]); - gfx_add_point( node , im->ximg,0); - gfx_add_point( node , im->ximg,im->yimg); - gfx_add_point( node , 0,im->yimg); + + node = gfx_new_area(im->canvas, 2, im->yimg - 2, + im->ximg - 2, im->yimg - 2, + im->ximg - 2, 2, im->graph_col[GRC_SHADEB]); + gfx_add_point(node, im->ximg, 0); + gfx_add_point(node, im->ximg, im->yimg); + gfx_add_point(node, 0, im->yimg); /* gfx_add_point( node , 0,im->yimg ); */ - - - if (im->draw_x_grid == 1 ) - vertical_grid(im); - - if (im->draw_y_grid == 1){ - if(im->logarithmic){ - res = horizontal_log_grid(im); + + + if (im->draw_x_grid == 1) + vertical_grid(im); + + if (im->draw_y_grid == 1) { + if (im->logarithmic) { + res = horizontal_log_grid(im); } else { - res = draw_horizontal_grid(im); + res = draw_horizontal_grid(im); } - + /* dont draw horizontal grid if there is no min and max val */ - if (! res ) { - char *nodata = "No Data found"; - gfx_new_text(im->canvas,im->ximg/2, (2*im->yorigin-im->ysize) / 2, - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_AXIS].font, - im->text_prop[TEXT_PROP_AXIS].size, - im->tabwidth, 0.0, GFX_H_CENTER, GFX_V_CENTER, - nodata ); + if (!res) { + char *nodata = "No Data found"; + + gfx_new_text(im->canvas, im->ximg / 2, + (2 * im->yorigin - im->ysize) / 2, + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_AXIS].font, + im->text_prop[TEXT_PROP_AXIS].size, im->tabwidth, + 0.0, GFX_H_CENTER, GFX_V_CENTER, nodata); } } /* yaxis unit description */ - gfx_new_text( im->canvas, - 10, (im->yorigin - im->ysize/2), - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_UNIT].font, - im->text_prop[TEXT_PROP_UNIT].size, im->tabwidth, - RRDGRAPH_YLEGEND_ANGLE, - GFX_H_LEFT, GFX_V_CENTER, - im->ylegend); + gfx_new_text(im->canvas, + 10, (im->yorigin - im->ysize / 2), + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_UNIT].font, + im->text_prop[TEXT_PROP_UNIT].size, im->tabwidth, + RRDGRAPH_YLEGEND_ANGLE, + GFX_H_LEFT, GFX_V_CENTER, im->ylegend); /* graph title */ - gfx_new_text( im->canvas, - im->ximg/2, im->text_prop[TEXT_PROP_TITLE].size*1.3+4, - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_TITLE].font, - im->text_prop[TEXT_PROP_TITLE].size, im->tabwidth, 0.0, - GFX_H_CENTER, GFX_V_CENTER, - im->title); + gfx_new_text(im->canvas, + im->ximg / 2, im->text_prop[TEXT_PROP_TITLE].size * 1.3 + 4, + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_TITLE].font, + im->text_prop[TEXT_PROP_TITLE].size, im->tabwidth, 0.0, + GFX_H_CENTER, GFX_V_CENTER, im->title); /* rrdtool 'logo' */ - gfx_new_text( im->canvas, - im->ximg-7, 7, - ( im->graph_col[GRC_FONT] & 0xffffff00 ) | 0x00000044, - im->text_prop[TEXT_PROP_AXIS].font, - 5.5, im->tabwidth, 270, - GFX_H_RIGHT, GFX_V_TOP, - "RRDTOOL / TOBI OETIKER"); + gfx_new_text(im->canvas, + im->ximg - 7, 7, + (im->graph_col[GRC_FONT] & 0xffffff00) | 0x00000044, + im->text_prop[TEXT_PROP_AXIS].font, + 5.5, im->tabwidth, 270, + GFX_H_RIGHT, GFX_V_TOP, "RRDTOOL / TOBI OETIKER"); /* graph watermark */ - if(im->watermark[0] != '\0') { - gfx_new_text( im->canvas, - im->ximg/2, im->yimg-6, - ( im->graph_col[GRC_FONT] & 0xffffff00 ) | 0x00000044, - im->text_prop[TEXT_PROP_AXIS].font, - 5.5, im->tabwidth, 0, - GFX_H_CENTER, GFX_V_BOTTOM, - im->watermark); - } - + if (im->watermark[0] != '\0') { + gfx_new_text(im->canvas, + im->ximg / 2, im->yimg - 6, + (im->graph_col[GRC_FONT] & 0xffffff00) | 0x00000044, + im->text_prop[TEXT_PROP_AXIS].font, + 5.5, im->tabwidth, 0, + GFX_H_CENTER, GFX_V_BOTTOM, im->watermark); + } + /* graph labels */ - if( !(im->extra_flags & NOLEGEND) & !(im->extra_flags & ONLY_GRAPH) ) { - for(i=0;igdes_c;i++){ - if(im->gdes[i].legend[0] =='\0') - continue; - - /* im->gdes[i].leg_y is the bottom of the legend */ - X0 = im->gdes[i].leg_x; - Y0 = im->gdes[i].leg_y; - gfx_new_text ( im->canvas, X0, Y0, - im->graph_col[GRC_FONT], - im->text_prop[TEXT_PROP_LEGEND].font, - im->text_prop[TEXT_PROP_LEGEND].size, - im->tabwidth,0.0, GFX_H_LEFT, GFX_V_BOTTOM, - im->gdes[i].legend ); - /* The legend for GRAPH items starts with "M " to have - enough space for the box */ - if ( im->gdes[i].gf != GF_PRINT && - im->gdes[i].gf != GF_GPRINT && - im->gdes[i].gf != GF_COMMENT) { - int boxH, boxV; - - boxH = gfx_get_text_width(im->canvas, 0, - im->text_prop[TEXT_PROP_LEGEND].font, - im->text_prop[TEXT_PROP_LEGEND].size, - im->tabwidth,"o", 0) * 1.2; - boxV = boxH*1.1; - - /* make sure transparent colors show up the same way as in the graph */ - node = gfx_new_area(im->canvas, - X0,Y0-boxV, - X0,Y0, - X0+boxH,Y0, - im->graph_col[GRC_BACK]); - gfx_add_point ( node, X0+boxH, Y0-boxV ); + if (!(im->extra_flags & NOLEGEND) & !(im->extra_flags & ONLY_GRAPH)) { + for (i = 0; i < im->gdes_c; i++) { + if (im->gdes[i].legend[0] == '\0') + continue; - node = gfx_new_area(im->canvas, - X0,Y0-boxV, - X0,Y0, - X0+boxH,Y0, - im->gdes[i].col); - gfx_add_point ( node, X0+boxH, Y0-boxV ); - node = gfx_new_line(im->canvas, - X0,Y0-boxV, - X0,Y0, - 1.0,im->graph_col[GRC_FRAME]); - gfx_add_point(node,X0+boxH,Y0); - gfx_add_point(node,X0+boxH,Y0-boxV); - gfx_close_path(node); - } + /* im->gdes[i].leg_y is the bottom of the legend */ + X0 = im->gdes[i].leg_x; + Y0 = im->gdes[i].leg_y; + gfx_new_text(im->canvas, X0, Y0, + im->graph_col[GRC_FONT], + im->text_prop[TEXT_PROP_LEGEND].font, + im->text_prop[TEXT_PROP_LEGEND].size, + im->tabwidth, 0.0, GFX_H_LEFT, GFX_V_BOTTOM, + im->gdes[i].legend); + /* The legend for GRAPH items starts with "M " to have + enough space for the box */ + if (im->gdes[i].gf != GF_PRINT && + im->gdes[i].gf != GF_GPRINT && im->gdes[i].gf != GF_COMMENT) { + int boxH, boxV; + + boxH = gfx_get_text_width(im->canvas, 0, + im->text_prop[TEXT_PROP_LEGEND]. + font, + im->text_prop[TEXT_PROP_LEGEND]. + size, im->tabwidth, "o", 0) * 1.2; + boxV = boxH * 1.1; + + /* make sure transparent colors show up the same way as in the graph */ + node = gfx_new_area(im->canvas, + X0, Y0 - boxV, + X0, Y0, + X0 + boxH, Y0, im->graph_col[GRC_BACK]); + gfx_add_point(node, X0 + boxH, Y0 - boxV); + + node = gfx_new_area(im->canvas, + X0, Y0 - boxV, + X0, Y0, X0 + boxH, Y0, im->gdes[i].col); + gfx_add_point(node, X0 + boxH, Y0 - boxV); + node = gfx_new_line(im->canvas, + X0, Y0 - boxV, + X0, Y0, 1.0, im->graph_col[GRC_FRAME]); + gfx_add_point(node, X0 + boxH, Y0); + gfx_add_point(node, X0 + boxH, Y0 - boxV); + gfx_close_path(node); } + } } } @@ -2279,175 +2457,175 @@ grid_paint(image_desc_t *im) * lazy check make sure we rely need to create this graph *****************************************************/ -int lazy_check(image_desc_t *im){ - FILE *fd = NULL; - int size = 1; - struct stat imgstat; - - if (im->lazy == 0) return 0; /* no lazy option */ - if (stat(im->graphfile,&imgstat) != 0) - return 0; /* can't stat */ +int lazy_check( + image_desc_t * im) +{ + FILE *fd = NULL; + int size = 1; + struct stat imgstat; + + if (im->lazy == 0) + return 0; /* no lazy option */ + if (stat(im->graphfile, &imgstat) != 0) + return 0; /* can't stat */ /* one pixel in the existing graph is more then what we would change here ... */ - if (time(NULL) - imgstat.st_mtime > - (im->end - im->start) / im->xsize) - return 0; - if ((fd = fopen(im->graphfile,"rb")) == NULL) - return 0; /* the file does not exist */ + if (time(NULL) - imgstat.st_mtime > (im->end - im->start) / im->xsize) + return 0; + if ((fd = fopen(im->graphfile, "rb")) == NULL) + return 0; /* the file does not exist */ switch (im->canvas->imgformat) { case IF_PNG: - size = PngSize(fd,&(im->ximg),&(im->yimg)); - break; + size = PngSize(fd, &(im->ximg), &(im->yimg)); + break; default: - size = 1; + size = 1; } fclose(fd); return size; } #ifdef WITH_PIECHART -void -pie_part(image_desc_t *im, gfx_color_t color, - double PieCenterX, double PieCenterY, double Radius, - double startangle, double endangle) +void pie_part( + image_desc_t * im, + gfx_color_t color, + double PieCenterX, + double PieCenterY, + double Radius, + double startangle, + double endangle) { gfx_node_t *node; - double angle; - double step=M_PI/50; /* Number of iterations for the circle; - ** 10 is definitely too low, more than - ** 50 seems to be overkill - */ + double angle; + double step = M_PI / 50; /* Number of iterations for the circle; + ** 10 is definitely too low, more than + ** 50 seems to be overkill + */ /* Strange but true: we have to work clockwise or else - ** anti aliasing nor transparency don't work. - ** - ** This test is here to make sure we do it right, also - ** this makes the for...next loop more easy to implement. - ** The return will occur if the user enters a negative number - ** (which shouldn't be done according to the specs) or if the - ** programmers do something wrong (which, as we all know, never - ** happens anyway :) - */ - if (endangle