components/prboom/m_misc.c
/*
 * M_WriteFile
 *
 * killough 9/98: rewritten to use stdio and to flash disk icon
 */
M_WriteFile
killough 9/98: rewritten to use stdio and to flash disk icon
M_WriteFile killough 9 / 98 : rewritten to use stdio and to flash disk icon
boolean M_WriteFile(char const *name, void *source, int length)
{
  FILE *fp;
  return 0;
  errno = 0;
  if (!(fp = fopen(name, "wb")))       
    return 0;                          
  I_BeginRead();                       
  length = fwrite(source, 1, length, fp) == (size_t)length;   
  fclose(fp);
  I_EndRead();                         
  if (!length)                         
    remove(name);
  return length;
}
boolean M_WriteFile ( char const * name , void * source , int length ) { FILE * fp ; return 0 ; errno = 0 ; if ( ! ( fp = fopen ( name , " " ) ) ) return 0 ; I_BeginRead ( ) ; length = fwrite ( source , 1 , length , fp ) == ( size_t ) length ; fclose ( fp ) ; I_EndRead ( ) ; if ( ! length ) remove ( name ) ; return length ; }
M_WriteFile
 killough 9/98: rewritten to use stdio and to flash disk icon
M_WriteFile killough 9 / 98 : rewritten to use stdio and to flash disk icon
// Try opening file // Could not open file for writing // Disk icon on // Write data // Disk icon off // Remove partially written file