Skip to content
Snippets Groups Projects
Select Git revision
  • toast_fixes
  • master default protected
  • lua-inputs
  • next
  • luajit
  • next-lc-uint16
  • luacolors
  • spawn_z_refactor
  • opengl-is-a-bad-renderer
  • boost-tickrate
  • buildbot
  • travis-deployer
  • public-musicplus-libopenmpt
  • public_flatsprite
  • fof-lightlist-fixes
  • prescott-march
  • makefile-tinkering
  • timedemo-revise
  • cutscene-cleanup
  • vanilla-hotplug-stableid
  • vanilla-hotplug
  • SRB2_release_2.2.0
  • SRB2_release_2.1.25
  • SRB2_release_2.1.24
  • SRB2_release_2.1.23
  • SRB2_release_2.1.22
  • SRB2_release_2.1.21
  • SRB2_release_2.1.20
  • SRB2_release_2.1.19
  • SRB2_release_2.1.18
  • td-release-v1.0.0
  • SRB2_release_2.1.17
  • SRB2_release_2.1.16a
  • SRB2_release_2.1.16
  • SRB2_release_2.1.15
  • SRB2_release_2.1.14
  • SRB2_release_2.1.12
  • SRB2_release_2.1.11
  • SRB2_release_2.1.10
  • SRB2_release_2.1.9
  • SRB2_release_2.1.8
41 results

Doxyfile

Blame
  • Forked from STJr / SRB2
    Source project has a limited visibility.
    filesrch.c 27.01 KiB
    /// \file
    /// \brief Support to find files
    ///
    ///
    ///	 filesearch:
    ///
    ///	 ATTENTION : make sure there is enouth space in filename to put a full path (255 or 512)
    ///	 if needmd5check == 0 there is no md5 check
    ///	 if completepath then filename will be change with the full path and name
    ///	 maxsearchdepth == 0 only search given directory, no subdirs
    ///	 return FS_NOTFOUND
    ///	        FS_MD5SUMBAD;
    ///	        FS_FOUND
    
    #include <stdio.h>
    #include <errno.h>
    #ifdef __GNUC__
    #include <dirent.h>
    #endif
    #ifdef _WIN32
    //#define WIN32_LEAN_AND_MEAN
    #define RPC_NO_WINDOWS_H
    #include <windows.h>
    #endif
    #include <sys/stat.h>
    #include <string.h>
    
    #include "filesrch.h"
    #include "d_netfil.h"
    #include "m_misc.h"
    #include "z_zone.h"
    #include "m_menu.h" // Addons_option_Onchange
    #include "w_wad.h"
    
    #if defined (_WIN32) && defined (_MSC_VER)
    
    #include <io.h>
    #include <tchar.h>
    
    #define SUFFIX	"*"
    #define	SLASH	"\\"
    #define	S_ISREG(m)	(((m) & S_IFMT) == S_IFREG)
    #define	S_ISDIR(m)	(((m) & S_IFMT) == S_IFDIR)
    
    #ifndef INVALID_FILE_ATTRIBUTES
    #define INVALID_FILE_ATTRIBUTES	((DWORD)-1)
    #endif
    
    struct dirent
    {
    	long		d_ino;		/* Always zero. */
    	unsigned short	d_reclen;	/* Always zero. */
    	unsigned short	d_namlen;	/* Length of name in d_name. */
    	char		d_name[FILENAME_MAX]; /* File name. */
    };
    
    /*
     * This is an internal data structure. Good programmers will not use it
     * except as an argument to one of the functions below.
     * dd_stat field is now int (was short in older versions).
     */
    typedef struct
    {
    	/* disk transfer area for this dir */
    	struct _finddata_t	dd_dta;
    
    	/* dirent struct to return from dir (NOTE: this makes this thread
    	 * safe as long as only one thread uses a particular DIR struct at
    	 * a time) */
    	struct dirent		dd_dir;