mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: minor refactoring, mark some more functions as returns_nonnull
This commit is contained in:
@@ -13,10 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "crclib.h"
|
||||
#include "crtlib.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "crclib.h"
|
||||
#include "crtlib.h"
|
||||
|
||||
#define NUM_BYTES 256
|
||||
|
||||
|
||||
@@ -64,6 +64,6 @@ static inline void MD5Init( MD5Context_t *ctx )
|
||||
void MD5Update( MD5Context_t *ctx, const byte *buf, uint len );
|
||||
void MD5Final( byte digest[16], MD5Context_t *ctx );
|
||||
uint COM_HashKey( const char *string, uint hashSize );
|
||||
char *MD5_Print( byte hash[16] );
|
||||
char *MD5_Print( byte hash[16] ) RETURNS_NONNULL;
|
||||
|
||||
#endif // CRCLIB_H
|
||||
|
||||
@@ -288,7 +288,7 @@ void Q_memor( byte *XASH_RESTRICT dst, const byte *XASH_RESTRICT src, size_t len
|
||||
dst[i] |= src[i];
|
||||
}
|
||||
|
||||
const char* Q_timestamp( int format )
|
||||
const char *Q_timestamp( int format )
|
||||
{
|
||||
static string timestamp;
|
||||
time_t crt_time;
|
||||
|
||||
@@ -111,13 +111,13 @@ int Q_snprintf( char *buffer, size_t buffersize, const char *format, ... ) FORMA
|
||||
#define Q_strpbrk strpbrk
|
||||
void COM_StripColors( const char *in, char *out );
|
||||
#define Q_memprint( val ) Q_pretifymem( val, 2 )
|
||||
char *Q_pretifymem( float value, int digitsafterdecimal );
|
||||
char *Q_pretifymem( float value, int digitsafterdecimal ) RETURNS_NONNULL;
|
||||
void COM_FileBase( const char *in, char *out, size_t size );
|
||||
const char *COM_FileExtension( const char *in ) RETURNS_NONNULL;
|
||||
void COM_DefaultExtension( char *path, const char *extension, size_t size );
|
||||
void COM_ReplaceExtension( char *path, const char *extension, size_t size );
|
||||
void COM_ExtractFilePath( const char *path, char *dest );
|
||||
const char *COM_FileWithoutPath( const char *in );
|
||||
const char *COM_FileWithoutPath( const char *in ) RETURNS_NONNULL;
|
||||
void COM_StripExtension( char *path );
|
||||
void COM_RemoveLineFeed( char *str, size_t bufsize );
|
||||
void COM_PathSlashFix( char *path );
|
||||
|
||||
@@ -202,7 +202,7 @@ size_t Q_UTF16ToUTF8( char *dst, size_t dstsize, const uint16_t *src, size_t src
|
||||
return dsti;
|
||||
}
|
||||
|
||||
static uint16_t table_cp1251[64] = {
|
||||
static const uint16_t table_cp1251[64] = {
|
||||
0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,
|
||||
0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
|
||||
Reference in New Issue
Block a user