{\rtf1\ansi\ansicpg1252\deff0\deflang1031\deflangfe1031{\fonttbl{\f0\fmodern\fprq1\fcharset0 Courier;}} {\colortbl ;\red0\green0\blue255;\red0\green0\blue0;\red136\green0\blue0;\red128\green128\blue128;\red160\green0\blue160;} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\nowidctlpar\cf1\lang1033\f0\fs20 Bitte nur mit wordpad\par \par \par #include\cf2 "config.h"\par \par \cf1 #include\cf2 \par \cf1 #include\cf2 \par \cf1 #include\cf2 \par \par \pard\nowidctlpar\tx2694\cf1 #include\cf2 \par \pard\nowidctlpar\par \cf1 #include\cf2 \par \cf1 #include\cf2 \par \par \cf1 #include\cf2 "ppmtool.h" // hahah \'c4\'f6\'fc?\par \cf1 #include\cf2 "gimpressionist.h"\par \par \cf1 #include\cf2 "libgimp/stdplugins-intl.h"\par \par \cf1 int\par \cf3 readline\cf2 (\cf1 FILE\cf2 *\cf4 f\cf2 , \cf1 char\cf2 *\cf4 buffer\cf2 , \cf1 int\cf2 \cf4 len\cf2 )\par \{\par \cf1 do\par \cf2 \{\par \cf1 if\cf2 (!\cf3 fgets\cf2 (\cf4 buffer\cf2 , \cf4 len\cf2 , \cf4 f\cf2 ))\par \cf1 return\cf2 -1;\par \}\par \cf1 while\cf2 (\cf4 buffer\cf2 [0] == '#');\par \par \cf3 g_strchomp\cf2 (\cf4 buffer\cf2 );\par \cf1 return\cf2 0;\par \}\par \par \par \cf1 void\par \cf3 ppm_kill\cf2 (\cf4 ppm_t\cf2 *\cf4 p\cf2 )\par \lang1040\{\par \cf3 g_free\cf2 (\cf4 p\cf2 ->\cf4 col\cf2 );\par \cf4 p\cf2 ->\cf4 col\cf2 = \cf5 NULL\cf2 ;\par \cf4\lang1033 p\cf2 ->\cf4 height\cf2 = \cf4 p\cf2 ->\cf3 width\cf2 = 0;\par \}\par \par \cf1 void\cf2 \cf3 ppm_new\cf2 (\cf4 ppm_t\cf2 *\cf4 p\cf2 , \cf1 int\cf2 \cf4 xs\cf2 , \cf1 int\cf2 \cf4 ys\cf2 )\par \{\par \cf1 if\cf2 (\cf4 xs\cf2 < 1)\par \cf4 xs\cf2 = 1;\par \cf1 if\cf2 (\cf4 ys\cf2 < 1)\par \cf4 ys\cf2 = 1;\par \par \cf4 p\cf2 ->\cf3 width\cf2 = \cf4 xs\cf2 ;\par \cf4 p\cf2 ->\cf4 height\cf2 = \cf4 ys\cf2 ;\par \cf4 p\cf2 ->\cf4 col\cf2 = \cf3 g_malloc\cf2 (\cf4 xs\cf2 * 3 * \cf4 ys\cf2 );\par \cf1 for\cf2 (\cf4 x\cf2 = 0; \cf4 x\cf2 < \cf4 xs\cf2 * 3 * \cf4 ys\cf2 ; \cf4 x\cf2 += 3)\par \lang1040\{\par \cf4 p\cf2 ->\cf4 col\cf2 [\cf4 x\cf2 +0] = \cf4 bgcol\cf2 [0];\par \cf4 p\cf2 ->\cf4 col\cf2 [\cf4 x\cf2 +1] = \cf4 bgcol\cf2 [1];\par \cf4 p\cf2 ->\cf4 col\cf2 [\cf4 x\cf2 +2] = \cf4 bgcol\cf2 [2];\par \}\par \}\par \par }