Bitte nur mit wordpad

#include "config.h"

#include <string.h>
#include <stdlib.h>
#include <errno.h>

#include <glib/gstdio.h>

#include <libgimp/gimp.h>
#include <libgimpmath/gimpmath.h>

#include "ppmtool.h"   // hahah Äöü?
#include "gimpressionist.h"

#include "libgimp/stdplugins-intl.h"

int
readline (FILE *f, char *buffer, int len)
{
  do
  {
    if (!fgets (buffer, len, f))
      return -1;
  }
  while (buffer[0] == '#');

  g_strchomp (buffer);
  return 0;
}

void
ppm_kill (ppm_t *p)
{
  g_free (p->col);
  p->col = NULL;
  p->height = p->width = 0;
}

void ppm_new (ppm_t *p, int xs, int ys)
{
  if (xs < 1)
    xs = 1;
  if (ys < 1)
    ys = 1;

  p->width = xs;
  p->height = ys;
  p->col = g_malloc (xs * 3 * ys);
  for (x = 0; x < xs * 3 * ys; x += 3)
    {
      p->col[x+0] = bgcol[0];
      p->col[x+1] = bgcol[1];
      p->col[x+2] = bgcol[2];
    }
}