Commit Graph

20 Commits

Author SHA1 Message Date
Garux e6ce77d031 use capital letter in strClear, strEmpty, strIstr to lessen names collision probability 2020-01-28 21:05:41 +03:00
Garux 25d94dbd2f add and use path_set_extension()
fix -bsp crash with .bsp sent as map path
	* fix: qer_editorimage, q3map_lightImage etc work with file names, containing period
(i.e. 'file.name.ext' names; don't StripExtension() twice in ImageLoad() for that)
2020-01-27 01:22:10 +03:00
Garux 80e95ac165 refactor paths related codes 2020-01-26 19:01:57 +03:00
Garux ba26c2d02b add common functions:
strempty
	strclear
	path_is_absolute
	path_get_filename_start
	path_get_filename_base_end
	path_get_extension
simplify functions:
	DefaultExtension
	StripFilename
	StripExtension
	ExtractFilePath
	ExtractFileBase
	ExtractFileExtension
2020-01-23 21:55:43 +03:00
Garux 99bae99b36 add safe_calloc(), safe_calloc_info() functions, use them (optimization, code shortening) 2020-01-12 18:55:03 +03:00
Garux d320ac3a4b optimize copystring(), use it 2020-01-10 20:43:15 +03:00
Garux 5d46d88d2d refactor autopk3.c
generalize Q_stricmp, Q_strncasecmp defines instead of local implementations
replace Q_strncpyz, Q_strcat, Q_strncat with strlcpy, strlcat versions: strcpyQ, strcatQ, strncatQ
fix ExtractFilePath, ExtractFileBase, ExtractFileExtension edge case (empty path string)
ExtractFileBase() : mimic StripExtension() logic
BeginMapShaderFile() : use 	ExtractFileBase(), 	ExtractFilePath()
2019-12-27 06:01:28 +03:00
Garux 8373782b75 generalize FixDOSName function and its use 2019-12-20 20:10:49 +03:00
Garux e3fd576624 Q3map2:
code fixes

Radiant:

binds...
	* m1x2 on clipper point = do clip
menus...
	* misc->colors->opengl font selector
misc...
	* calculate farplane from g_MaxWorldCoord, g_MinWorldCoord (was const 32768)
	* 1.0f nearplane
	* numerous code fixes
2017-08-02 09:25:58 +03:00
Rudolf Polzer 7fc621fc78 Merge remote-tracking branch 'ttimo/master'
Conflicts:
	config.py
	libs/missing.h
	plugins/model/cpicosurface.cpp
	plugins/vfspk3/unzip.cpp
	radiant/main.cpp
	radiant/mainframe.cpp
	radiant/mainframe.h
	radiant/missing.cpp
	radiant/pluginmanager.cpp
	radiant/preferences.cpp
	radiant/preferences.h
	tools/quake3/common/cmdlib.c
	tools/quake3/common/unzip.c
	tools/quake3/q3map2/image.c
2012-05-07 12:32:31 +02:00
Timothee 'TTimo' Besset c40e0b3e57 unused 2012-04-15 11:24:38 -05:00
Rudolf Polzer b7e36c120e Merge remote-tracking branch 'github/master'
Conflicts:
	.gitignore
	config.py
	libs/synapse/synapse.cpp
	plugins/imagehl/lbmlib.cpp
	plugins/surface_heretic2/surfacedialog.cpp
	plugins/surface_ufoai/surfacedialog.cpp
	radiant/brushscript.cpp
	radiant/main.cpp
	radiant/preferences.cpp
	tools/quake3/common/cmdlib.c
	tools/quake3/common/cmdlib.h
	tools/quake3/q3map2/path_init.c
	windows_compile_guide/index.html
2012-03-27 12:11:37 +02:00
Rudolf Polzer e4287c28bb my own uncrustify run 2012-03-27 12:03:21 +02:00
Ben Noordhuis f961a547ff q3map2: bump MAX_OS_PATH to 4096
Fixes a "buffer overflow detected" abort when compiled with _FORTIFY_SOURCE=1.

The realpath(3) function in glibc checks if the destination buffer is large
enough to hold up to PATH_MAX characters and aborts if that is not the case.
PATH_MAX doesn't have to be defined so assume that it's equal to 4096.

We should really be using pathconf(_PC_PATH_MAX) instead of a hard-coded value
but that means we can no longer use static buffers to hold paths.
2012-03-18 02:17:09 +01:00
Timothee TTimo Besset 830125fad0 uncrustify! now the code is only ugly on the *inside* 2012-03-17 15:01:54 -05:00
rpolzer 5ec3a47e10 q3map2 is now waring free 2010-10-05 10:57:07 +02:00
rpolzer d870b21a3a fix buffer overrun on current gcc; there may be more of these
git-svn-id: svn://svn.icculus.org/netradiant/trunk@125 61c419a2-8eb2-4b30-bcec-8cead039b335
2008-11-07 15:47:15 +00:00
rpolzer 107765f0e4 initial
git-svn-id: svn://svn.icculus.org/netradiant/trunk@1 61c419a2-8eb2-4b30-bcec-8cead039b335
2008-09-13 18:28:57 +00:00
TTimo 9998050654 set eol-style
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@183 8a3a26a2-13c4-0310-b231-cf6edde360e5
2007-11-04 03:34:51 +00:00
TTimo 8037810110 transfer from internal tree r5311 branches/1.4-gpl
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@177 8a3a26a2-13c4-0310-b231-cf6edde360e5
2007-09-12 18:54:28 +00:00