#define __WORDBLOX_H
#define _XOPEN_SOURCE
#include <unistd.h>
+#include <stdbool.h>
+#include <string.h>
+#include <ctype.h>
#include <gd.h>
#include <gdfontmb.h>
#include <gdfontg.h>
gzFile outdestfile = gzopen (file, "wb");
if (outdestfile == NULL)
{
- fprintf (stderr, ERROR_WRITING_FILE);
+ fprintf (stderr, "%s\n", ERROR_WRITING_FILE);
fclose (outfile);
exit (1);
}
int res = gzwrite (outdestfile, buf, strlen (buf) );
if (res == 0)
{
- fprintf (stderr, "%s %s", ERROR_WRITING_FILE, COMPRESSED);
+ fprintf (stderr, "%s %s\n", ERROR_WRITING_FILE, COMPRESSED);
fclose (outfile);
exit (1);
}
gzFile insourcefile = gzopen (file, "rb");
if (insourcefile == NULL)
{
- fprintf (stderr, "%s %s", ERROR_READING_FILE, COMPRESSED);
+ fprintf (stderr, "%s %s\n", ERROR_READING_FILE, COMPRESSED);
exit (1);
}
/* Open a temporary file to uncompress the contents */
FILE *infile = tmpfile ();
if (infile == NULL)
{
- fprintf (stderr, ERROR_READING_FILE);
+ fprintf (stderr, "%s\n", ERROR_READING_FILE);
exit (1);
}
/* Put the uncompressed content to the temp file */
int res = fwrite (buf, sizeof(char), strlen (buf), infile);
if (res == 0)
{
- fprintf (stderr, ERROR_READING_FILE);
+ fprintf (stderr, "%s\n", ERROR_READING_FILE);
fclose (infile);
gzclose (insourcefile);
exit (1);