/[qemacs]/qemacs/html2png.c
ViewVC logotype

Diff of /qemacs/html2png.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by bellard, Sat May 29 10:18:33 2004 UTC revision 1.2 by chqrlie, Wed May 11 15:12:14 2005 UTC
# Line 169  int ppm_save(QEditScreen *s, const char Line 169  int ppm_save(QEditScreen *s, const char
169      h = s->height;      h = s->height;
170    
171      fprintf(f, "P6\n%d %d\n%d\n", w, h, 255);      fprintf(f, "P6\n%d %d\n%d\n", w, h, 255);
172      for(y=0;y<h;y++) {      for (y = 0; y < h; y++) {
173          for(x=0;x<w;x++) {          for (x = 0; x < w; x++) {
174              v = data[x];              v = data[x];
175              r = (v >> 16) & 0xff;              r = (v >> 16) & 0xff;
176              g = (v >> 8) & 0xff;              g = (v >> 8) & 0xff;
# Line 243  int png_save(QEditScreen *s, const char Line 243  int png_save(QEditScreen *s, const char
243    
244      row_pointers[0] = row;      row_pointers[0] = row;
245    
246      for(y=0;y<h;y++) {      for (y = 0; y < h; y++) {
247          row_ptr = row;          row_ptr = row;
248          for(x=0;x<w;x++) {          for (x = 0; x < w; x++) {
249              v = data[x];              v = data[x];
250              r = (v >> 16) & 0xff;              r = (v >> 16) & 0xff;
251              g = (v >> 8) & 0xff;              g = (v >> 8) & 0xff;
# Line 332  int draw_html(QEditScreen *scr, Line 332  int draw_html(QEditScreen *scr,
332    
333      xml = xml_begin(s->style_sheet, flags, html_test_abort, NULL, filename, charset);      xml = xml_begin(s->style_sheet, flags, html_test_abort, NULL, filename, charset);
334            
335      for(;;) {      for (;;) {
336          len = css_read(f, buf, IO_BUF_SIZE);          len = css_read(f, buf, IO_BUF_SIZE);
337          if (len <= 0)          if (len <= 0)
338              break;              break;
# Line 415  int main(int argc, char **argv) Line 415  int main(int argc, char **argv)
415      charset = &charset_8859_1;      charset = &charset_8859_1;
416      strict_xml = 0;      strict_xml = 0;
417            
418      for(;;) {      for (;;) {
419          c = getopt(argc, argv, "h?w:o:f:x");          c = getopt(argc, argv, "h?w:o:f:x");
420          if (c == -1)          if (c == -1)
421              break;              break;
422          switch(c) {          switch (c) {
423          case 'h':          case 'h':
424          case '?':          case '?':
425              help();              help();
# Line 436  int main(int argc, char **argv) Line 436  int main(int argc, char **argv)
436                  QECharset *p;                  QECharset *p;
437                  fprintf(stderr, "Unknown charset '%s'\n", optarg);                  fprintf(stderr, "Unknown charset '%s'\n", optarg);
438                  fprintf(stderr, "Supported charsets are:");                  fprintf(stderr, "Supported charsets are:");
439                  for(p = first_charset; p != NULL; p = p->next)                  for (p = first_charset; p != NULL; p = p->next)
440                      fprintf(stderr, " %s", p->name);                      fprintf(stderr, " %s", p->name);
441                  fprintf(stderr, "\n");                  fprintf(stderr, "\n");
442                  exit(1);                  exit(1);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26