示例#1
0
void bmeps_end_image(FILE *out)
{
  if(out) {
    if(state > 1) {
      oe_byte_flush(&bmepsoe);
      state = 0;
    }
    if(bmeps_pslevel > 1) {
      if(bmeps_enc_a85) {
	  fprintf(out, "%s\n", "~>");
      } else {
	  fprintf(out, "%s\n", ">");
      }
    }
    fprintf(out, "grestore\n");
    if(bmeps_pslevel > 1) {
      fprintf(out, "currentdict /inputf undef\n");
      fprintf(out, "currentdict /pstr undef\n");
    }
    if(bmeps_dic && (bmeps_pslevel > 1)) {
      fprintf(out, "end\n");
    }
    if(bmeps_vmr && (bmeps_pslevel > 1)) {
      fprintf(out, "1 vmreclaim\n");
    }
    if(bmeps_shp) {
      fprintf(out, "showpage\n");
    }
  }
}
示例#2
0
void bmeps_end_image(FILE *out)
{
  if(out) {
    if(state > 1) {
      oe_byte_flush(&bmepsoe);
      state = 0;
    }
    if(bmeps_pslevel > 1) {
      if(bmeps_enc_a85) {
          fprintf(out, "%s\n", "~>");
      } else {
          fprintf(out, "%s\n", ">");
      }
    }
    fprintf(out, "grestore\n");
    fprintf(out, "showpage\n");
  }
}
示例#3
0
int main(int argc, char *argv[])
{
  Output_Encoder o;
  int methods; int number;
  int rlbuffer[129];
  char buffer[512];

  methods = 0;
  if(argc > 1) {
    char *ptr;
    ptr = argv[1];
    while(*ptr) {
      switch(*ptr) {
        case 'a' : {
          methods |= OE_ASC85;
        } break;
        case 'r' : {
          methods |= OE_RL;
        } break;
      }
      ptr++;
    }
  }
  oe_init(&o, stdout, methods, 9, rlbuffer);
  methods = 1;
  while(methods) {
    number = read(0, buffer, sizeof(buffer));
    if(number > 0) {
      char c, *ptr;
      int  i;
      ptr = buffer;
      for(i = 0; i < number; i++) {
        c = *ptr;
        oe_byte_add(&o, c);
        ptr++;
      }
    } else { methods = 0; }
  }
  oe_byte_flush(&o);
  return 0;
}
示例#4
0
static void
flushBmepsOutput(struct bmepsoe * const bmepsoeP) {
    oe_byte_flush(bmepsoeP->oeP);
}