Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
miscutil.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19//
20// Filename: miscutil.h
21// Project: wwutil
22// Author: Tom Spencer-Smith
23// Date: June 1998
24// Description:
25//
26//-----------------------------------------------------------------------------
27#if defined(_MSV_VER)
28#pragma once
29#endif
30
31#ifndef MISCUTIL_H
32#define MISCUTIL_H
33
34#ifndef ALWAYS_H
35 #include "always.h"
36#endif
37
38#include "bittype.h"
39#include "wwstring.h"
40
41const float MISCUTIL_EPSILON = 0.0001f;
42
44{
45 public:
46 static LPCSTR Get_Text_Time(void);
47 static void Seconds_To_Hms(float seconds, int & h, int & m, int & s);
48 static bool Is_String_Same(LPCSTR str1, LPCSTR str2);
49 static bool Is_String_Different(LPCSTR str1, LPCSTR str2);
50 static void Get_File_Id_String(LPCSTR filename, StringClass & str);
51 static bool File_Exists(LPCSTR filename);
52 static bool File_Is_Read_Only(LPCSTR filename);
53 static bool Is_Alphabetic(char c);
54 static bool Is_Numeric(char c);
55 static bool Is_Alphanumeric(char c);
56 static bool Is_Whitespace(char c);
57 static void Trim_Trailing_Whitespace(char * text);
58 static void Remove_File(LPCSTR filename);
59
60 private:
61};
62
63
64#endif // MISCUTIL_H
65
66
67
68
69
70 //static int Get_Exe_Key(void);
const char * LPCSTR
Definition bittype.h:62
static bool Is_Numeric(char c)
Definition miscutil.cpp:133
static LPCSTR Get_Text_Time(void)
Definition miscutil.cpp:42
static bool File_Is_Read_Only(LPCSTR filename)
Definition miscutil.cpp:118
static bool Is_Whitespace(char c)
Definition miscutil.cpp:145
static void Get_File_Id_String(LPCSTR filename, StringClass &str)
Definition miscutil.cpp:162
static bool File_Exists(LPCSTR filename)
Definition miscutil.cpp:93
static void Seconds_To_Hms(float seconds, int &h, int &m, int &s)
Definition miscutil.cpp:57
static void Trim_Trailing_Whitespace(char *text)
Definition miscutil.cpp:151
static bool Is_String_Different(LPCSTR str1, LPCSTR str2)
Definition miscutil.cpp:84
static bool Is_Alphanumeric(char c)
Definition miscutil.cpp:139
static bool Is_String_Same(LPCSTR str1, LPCSTR str2)
Definition miscutil.cpp:75
static void Remove_File(LPCSTR filename)
Definition miscutil.cpp:219
static bool Is_Alphabetic(char c)
Definition miscutil.cpp:127
const float MISCUTIL_EPSILON
Definition miscutil.h:41