Code:
// returns non-zero on success, zero on failure.
fixed create_empty_file(STRING* fname)
{
   if (fname == NULL)
      return 0;

   fixed handle = file_open_write(fname);

   if (handle)
      file_close(handle);

   return handle;
}



Always learn from history, to be sure you make the same mistakes again...