Compare commits

...
1740 Commits
Author SHA1 Message Date
Alug a8df763823 fix bad copy paste 2025-09-26 17:20:41 +02:00
Alug 58af8f84b9 squash cherry all changes to here 2025-09-22 22:50:55 +02:00
Alug b0395ad539 Revert "get rid of the automatic "downsample" detection stufff"
This reverts commit b712cba62d.
2025-09-22 22:48:55 +02:00
Alug b712cba62d get rid of the automatic "downsample" detection stufff
massive declutter
2025-09-21 14:56:44 +02:00
Alug 16c0b48f4a add backwards compat support for ogl 2.1 fbo extensions
this should allow older gpus to use the feature aswell, not super clean but seems to work
TODO: refactor this whole crap, switch to seperate read and draw to use blitting and make this multisampling compatible so we can get rid of the messy "downsample" code and have this active by default
2025-09-21 05:12:47 +02:00
Alug fcadd03607 add back toggle for mouse cursor visability behaviour 2025-09-20 18:51:55 +02:00
Alug e1ad48ec16 always interpolate weather when using interpolation
same here, a fix, not a feature
2025-09-20 18:08:12 +02:00
Alug fbb77e8428 always account for mobjscale in precip
this is a fix not some feature honestly
2025-09-20 18:08:09 +02:00
Alug 72c05fae77 add gba RR check for software cyan cut 2025-09-20 17:57:47 +02:00
Alug 8867dc959e dedupe and cleanup nights hoops spawn
most of the actual spawn is split into P_SpawnNiGHTSHoop, which takes arguments to determine if to spawn just a hoop or its collision detectors
(if you wonder why this takes a mobj pointer to pointer is due to collision detector need the former hoops last mobj to link into)
- also actually fixes midgame join crash (hoop hnext was directly nulled instead of using p_settarget)
- added some extra safety checks
- reduced the amounts of r_pointinsubsector calls for things that used to go through this function
2025-09-20 16:36:19 +02:00
Alug e9fc57b97d move saltyhop stuff into seperate struct
no functional change, just as little cleaner lookin
+ reduce size by using stdbools boolean
2025-09-20 16:34:35 +02:00
Alug 7c490de93e delet metal sonic replay code
massively cluttered the demo code
hope this aint used for some super obscure thing
guess we´ll see
2025-09-20 16:34:17 +02:00
Alug 3c85295622 fix most implicit float > double conversions 2025-09-19 13:48:51 +02:00
Alug bdeb7e5e9d fix potential leak in protocol registering 2025-09-19 13:48:47 +02:00
Alug 2e766a7e16 fix potential NULL deref of string in lua chatprint lib functions 2025-09-19 13:48:44 +02:00
Alug 9bab3d5795 fix some potential leaks in M_DrawSplitText 2025-09-19 13:48:40 +02:00
Alug 1015800483 delet some double defined things 2025-09-19 13:48:38 +02:00
indev c4149e26e8 Oops there's 1 more 2025-09-19 02:10:44 +03:00
indev 602e4df5b9 Fix smol oversight :3 2025-09-19 02:06:05 +03:00
Alug 9be5780597 rename "ffloor" global to "visffloor"
prevent name conflicts with a bunch of local variables named "ffloor"
2025-09-18 21:08:41 +02:00
Alug 363f4c56f4 dedupe map replacement checks
the actual checks are in P_CheckMapReplacements
2025-09-18 18:20:26 +02:00
Alug 9ca21f1fb4 simplify startup map checks a little 2025-09-18 16:41:07 +02:00
Alug 826183ce2a skip checking for replaced maps on start if no extra wads are loaded
~~technically this also should be done for autoload~~
2025-09-18 16:41:03 +02:00
Alug ec41a7152c remove erronous errors
W_InitFileError from within W_InitMultipleFiles will handle this
2025-09-18 16:41:01 +02:00
Alug 4e394951bc allow freecam to work with first person 2025-09-18 12:16:27 +02:00
Alug 837f74f28a simplify startedInFreePlay check 2025-09-18 10:51:33 +02:00
Alug fb02389922 use P_SetupCamera for P_MoveCameraToSpawn
also modify P_SetupCamera to always just move the camera to the playerstarts
2025-09-18 10:51:33 +02:00
Alug f12f5b8bd1 delet P_Initsecnode
empty function now
2025-09-18 10:51:33 +02:00
Alug 20a3f4b6f3 only check cyan floor hack on flats that contain cyan
there was the remap loop that would already check this for us, so we can save a few calls to W_CheckNameForNum and memcmp
2025-09-18 10:51:33 +02:00
Alug f1ca991041 make static, cleanup and delet dead code hw_cache 2025-09-18 10:51:33 +02:00
Alug 83df870bb5 change version string 2025-09-17 23:44:02 +02:00
Alug 8e56998c9a Merge pull request #200 from Indev450/Saturn-Testing
merge testing into next branch
2025-09-17 22:42:47 +01:00
Alug 43e5f694bc Merge pull request #181 from chromaticpipe/dynamicdelay
GIF dynamic delay
2025-09-17 22:42:20 +01:00
Alug 9197a50c5b Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-17 23:41:41 +02:00
Alug 40fb4da2e8 Merge pull request #198 from Indev450/servericonpack
port Map icon packet from srb2classic
2025-09-17 22:40:57 +01:00
Alug f458fdbebe Merge pull request #195 from Indev450/texhash
Do not reload every texture when adding a wad
2025-09-17 22:40:53 +01:00
Alug 069f8bc009 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-17 23:37:42 +02:00
Alug a9f579d949 move replay replayhut list free and reset into M_ResetDemoList
use it to free demolists from within levelload when you switched maps out of a replay
2025-09-17 23:32:34 +02:00
Alug 7b0b2d8cd7 Merge pull request #197 from Indev450/fastfilesearch
Speedup Filesearch
2025-09-17 20:08:25 +01:00
James R 4dce42e458 R_GenerateBlendTables: allocate copy of palette for use in thread
The palette can be freed while this thread is still
running, which means the thread would end up reading from
freed memory.
2025-09-17 21:06:21 +02:00
James R f819471c06 Send R_GenerateBlendTables number crunch to parallel thread 2025-09-17 21:06:18 +02:00
Alug 45393cbb78 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-17 21:06:13 +02:00
indev bf6727b43a Simplify G_ D/S cpyTiccmd, since n is always a multiple of sizeof(ticcmd_t) 2025-09-17 21:38:55 +03:00
Alug 87134a42b4 fix signal handler stuff for worker threads
g_in_exiting_signal_handler needs to be set BEFORE it actually exits lol
2025-09-17 20:35:32 +02:00
Alug d27a849d79 decouple precipmobj_t from mobj_t
vissprite_t now keeps pointer to precipmobj directly instead of just a simple boolean check
this has multiple benefits
the mobj_t struct now can be reorderer and modified as pleased without having to worry about precipmobj struct layouts since all precipmobj -> mobj casts are eliminated
this allows to remove a massive amount of fields from precipmobj struct which never were used massively reducing the footprint of a precipmobj thing
kinda wish there was a neat way to template function headers to take different types for the same arguments in C to reduce code duplication, but this glady is atleast a rather small case
2025-09-17 17:42:16 +02:00
Alug 2aaa52c639 remove precip blendmode visability check
this WILL never trigger since we neither can access precipmobjs nor do their translucency values ever change
so save us a little bit of work
2025-09-17 17:41:31 +02:00
Alug 5348739a2c fix precip translucency in software renderer
precipmobjs always spawned with AST_COPY blendmode which failed the check, but they are supposed to be translucent when rain
restore the correct behaviour
2025-09-17 04:25:08 +02:00
Alug b21396bd34 ensure deterministic order for P_Random stuff passed as arguments
the evaluation order of arguments passed to functions is undefined in C/C++, so its up to the compiler in which order to evaluate these
P_Random functions modify the randomseed each time theyre called, which can lead to different outcomes (thus desynchs) on different platforms, compilers, compiler versions etc.
so match up with the most common which is last to first (seemingly the order gcc on nix and windows handle it)
2025-09-17 03:28:02 +02:00
Alug 19c97d3137 explicitly cast those 2025-09-17 02:48:44 +02:00
James R 421dca5615 Inflate only size out bytes
Saves time uncompressing an entire lump when only part of
it is needed.
2025-09-17 02:48:41 +02:00
Alug d5b64a4df3 move G_CopyTiccmd & G_MoveTiccmd back to g_game
accidentally misplaced those during g_demo split
2025-09-17 01:31:18 +02:00
Alug 098d1afb50 add P_FreeLevelState + extra stuff for D_ClearState
this just takes out the cleanup code from P_SetupLevel so it can be called from within D_ClearState and all the mapdata will be freed when going back to the main menu
Not super crazy and really necessary in kart, but why not tbh
this is mostly based on what RR does
2025-09-17 01:31:15 +02:00
Alug 9d122aa686 change type and name of var here 2025-09-16 14:47:32 +02:00
Gustaf Alhäll e465e83cb3 Remove maxsend limits 2025-09-16 14:47:29 +02:00
Alug 619a8e2f42 cleanup some unused stuff 2025-09-16 14:47:26 +02:00
Alug b3c0c6f2b4 preconvert our polyvertex coords to fixed point
yes this is unironically faster, by atleast 5-10fps in the wandering falls test case
2025-09-16 02:45:46 +02:00
Alug f0a1cd01c3 remove floatlenght from seg_t
this will get converted to fixedpoint anyways and is only used in ONE place to determine texture x offsets in gl
yes this does get readjusted in adjustsegs if our glsegs differ, but this should be so marginal so save us the work at mapload
i dare anyone to even see a difference if any
2025-09-16 02:45:41 +02:00
Alug 144740a270 declare pv1 and pv2 properly as polyvertex_t
this most likely was done due to issues with header includes
this saves an crapton of pointless casts and type conversions
2025-09-16 02:44:46 +02:00
Alug 0b478b7a91 get rid of "spawn_" sector_t fields
we now make copies of lines, sectors and vertices on mapload that have the spawn state, so those fields are redundant now
also fix copy paste that made ceiling flat angle check if its differs from the floor flat angle on netsave
saves a whopping 32bytes per sector_t entry!
2025-09-15 21:07:45 +02:00
Alug d23451b6e7 revert demo ghosttic hitlist resynch double free hack
now that we dont reload the map anymore during gamestate reload
2025-09-15 17:27:10 +02:00
Alug 20897deeee Merge branch 'servericonpack' into Saturn-Testing 2025-09-15 17:27:06 +02:00
Alug 677e381a2c dont send server icon if current map is supposed to be hidden
in line with kart not sending maptitle to ms in the same case
2025-09-15 16:16:43 +02:00
Alug 4b06a3eabf Merge branch 'fastfilesearch' into Saturn-Testing 2025-09-15 15:08:40 +02:00
Alug 36c1369041 fix filesearch oopsie
lulul
2025-09-15 15:08:22 +02:00
Alug d4b179d59e fix functionnames in polyobject interp warnings for netunarchival 2025-09-15 14:50:52 +02:00
Alug 81fbd75646 add sector checks to netsave plane interpolators
seems like this may be null in a few cases
2025-09-15 14:50:49 +02:00
Alug c7e37eac05 remove inline from SaveFireflickerThinker
doubt theres a single map in kart that uses those and even if it wont be so much that it needs to be inlined
2025-09-15 14:39:57 +02:00
Alug dd6403691f fix dedi build compile 2025-09-15 14:35:53 +02:00
Gustaf Alhäll e42b179fad Rearrange mobj_t fields to reduce holes 2025-09-15 14:07:31 +02:00
Gustaf Alhäll ebb0ebcab0 Reduce size of memblock_t structure 2025-09-15 14:07:28 +02:00
Gustaf Alhäll 347a5ed40a Do not store all states for recursion inside P_SetMobjState 2025-09-15 14:07:25 +02:00
Gustaf Alhäll dee91ed1ef Kill RESETDATA 2025-09-15 14:07:21 +02:00
Alug a80f702bb8 Merge branch 'Saturn-Next' into Saturn-Testing 2025-09-15 14:07:15 +02:00
Gustaf Alhäll 7d91d06ce0 Fix crash on OS X on resolutions that are not multiples of 32 2025-09-15 13:14:28 +02:00
Alug ab1f04ac31 handle native keyboard in a better way
not particulary great, but i dont feel like working this out much atm
2025-09-14 23:32:25 +02:00
Alug 0696ac7340 we dont support gamecube wii or playstation lel 2025-09-14 23:20:46 +02:00
Alug 137a917f58 delet mousegrabok 2025-09-14 23:20:43 +02:00
Alug 00cfdfef27 add P_GetLocalPlayerNumForNum and P_IsLocalPlayerNum and cleanup a bunch of splitscreen checks
- P_GetLocalPlayerNumForNum returns the playernumber for a given index
- P_IsLocalPlayerNum returns if a playernum is local to the maschine
- replaced most if else chains from checking splitscreen things with loops using P_GetLocalPlayerNumForNum and P_GetLocalPlayerForNum
2025-09-14 21:30:56 +02:00
Alug c1d5d153aa Merge branch 'fastfilesearch' into Saturn-Testing 2025-09-14 20:48:33 +02:00
Alug 1fb3b2110c bit of cleanup w_wad 2025-09-14 20:48:24 +02:00
Alug ef9472097d clean up faster filesearch
-use parts of RR´s implementation to get rid of the windows specific code and generally simplify this
- also use SRB2´s  symlink detection as its simpler and saves one lstat call per searched file
2025-09-14 20:47:57 +02:00
Alug ed75d89baf bit of random cleanup + cache strlen in some places 2025-09-14 18:23:24 +02:00
Alug fed4c934ad Merge branch 'Saturn-Next' into Saturn-Testing 2025-09-14 18:20:23 +02:00
Alug 63ea13ab3c Merge pull request #196 from Indev450/updatemd5
Update md5 lib
2025-09-13 13:57:05 +01:00
Alug 2c802799e8 Merge pull request #194 from Indev450/winzlib-ng
Replace zlib with zlib-ng on Windows
2025-09-13 13:56:57 +01:00
Alug fe30cbb4aa big cleanup levelloading code
- made levelfadecol a local variable
- renamed all the "Raw" functions
- moved axis mapthing spawn into the mapthing spawn function
- moved mapthing load to mapdata load, saves opening the THING virtual lump twice
- split out linedef init out of the loop it now gets done within linedef load code saving the hassle of iterating through all the lines twice
- removed a bunch of dead code and useless variables
- moved virtual resource free to after the mapdata has been loaded completely
- sidedef loop now increments pointer instead of reassinging it each iteration
- lastloadedmaplumpnum now gets checked for LUMPERROR instead of INT16_MAX since W_CheckNumForName returns LUMPERROR if lump was not found
2025-09-13 14:36:57 +02:00
Alug ca1d3e337a reset our gamepad colour in some cases
to account for mappalettes properly
2025-09-12 22:30:47 +02:00
indev 28f1ee6335 Attempt to fix some lua userdata being corrupted when allocated via PoolAllocator 2025-09-12 23:18:39 +03:00
Alug 91f377b382 remove remaining field initalizing thats being taken care of by calloc 2025-09-12 21:19:53 +02:00
Alug 6d6fa156f3 skip manually initializing some fields P_SetupLines
redundant due to earlier calloc
2025-09-12 18:29:07 +02:00
Alug 5383fee6af speedup P_LoadRawSectors a bit
the sector array already will be calloc´d, so we dont need to set all of this to 0
also use a premade initalizer for some things
2025-09-12 18:24:21 +02:00
Alug a2c7b68a60 cache player pointer for P_LevelInitStuff 2025-09-12 18:09:47 +02:00
Alug 7be0b38f47 fix taglist stuff on gamestate resend
got kinda lost here lulul
fixed diamond square elevator
2025-09-12 18:06:26 +02:00
Alug 4e05679b10 cache our player and sector pointers for net un/archiving 2025-09-12 17:19:36 +02:00
Alug 36d3c76a52 actually use our spawnside pointer 2025-09-12 17:08:28 +02:00
Alug eee263c2c2 skip checking for "srb2.wad" and "patch.dta"
during server addon checking
both have never existed in kart and are from super old srb2 versions
so save us some string comparisons
2025-09-12 16:25:37 +02:00
Alug c1cdb83e8d use hash to determine if polygon state has changed
we do not use it in the polygon comparitors as it apparently may lay them out in a really unperformant way
2025-09-12 16:25:34 +02:00
Alug 451ab81f0b combine this block 2025-09-12 16:22:06 +02:00
Alug d803c1b9cd smol change i forgor for testing branch 2025-09-12 16:00:56 +02:00
Alug 72b26c19ce Reload from spawnsectors/spawnlines/spawnsides (adjusted for kart)
from https://gitlab.com/kart-krew-dev/ring-racers/-/commit/4f77c9f228274afb9f0b5bf9b30e0eb22f9b385f
2025-09-12 16:00:12 +02:00
Alug f35d827bd4 copy initial map state on mapload for Netarchiving + cleanup
like this we dont have to reopen the mapdata 3 times each time we prepare a netsave
also allows us to directly compare sector and line properties
this should save a bit of time when someone joins or resynchs with gamestate system
this is based on some UDMF work from srb2
2025-09-12 16:00:08 +02:00
Sally Coolatta 358eeaa981 Don't reload level on gamestate resend
The level will only reload during a gamestate reload if the map is horribly mismatched somehow. Minor differences in level state are already handled by other parts of the reload, so doing this on *every* reload wastes lots of time.
2025-09-12 16:00:05 +02:00
Eidolon 55e88cf740 Put seclist nodes in LevelPool memory
Replaces the old freelist solution with the LevelPool, which
dramatically reduces the number of allocations needed for mobj and
precip sector assignment. In measurement, this cuts down the time taken
for spawning precipitation by 50%.
2025-09-12 16:00:02 +02:00
Eidolon be4125e4ca Add level pool allocator and use it for mobj, precip, thinkers
This should substantially reduce the number of malloc/free calls made to
create and destroy mobjs, especially during level load and net
save/load.

memory_resource standard header is not available on the OSX deployment
target we are using, so I had to write my own fixed size pool allocator.
2025-09-12 15:59:59 +02:00
Eidolon 920b00348e Make the mouse cursor sane 2025-09-12 15:59:56 +02:00
Alug 80aeae1692 implement "startup" stuff for W_InitFileError
so it can I_Error if a wad file fails to load on startup
2025-09-12 15:59:52 +02:00
toaster 0e52845f50 W_VerifyNMUSlumps: Rewind back to beginning of file handle for WAD 2025-09-12 15:59:47 +02:00
toaster ca5dd9e78f W_VerifyNMUSlumps: Clean up
- Bake W_VerifyFile in, since it was a stub never called anywhere else
- Make it operate off file handles, since the following locations quickly filesearch'd more than once in quick succession.
    - W_InitFile
    - Command_Addfile
- Remove spurious call from W_InitMultipleFiles for `-file` startup param
2025-09-12 15:59:44 +02:00
toaster 956fc099ad findfile aggressive optimisation: If srb2home and srb2path are the current working directory, don't search in them
srb2path will report "." while this optimisation is in play, but this can be disabled if necessary by modifying the small #if (1) in IdentifyVersion
2025-09-12 15:59:41 +02:00
Sally Coolatta 1da376e777 Create doomednum lookup for loading mobjthinkers
Cuts off 10% of the time it takes to load mobj thinkers.
2025-09-12 15:59:37 +02:00
Alug b0b4259af6 fix "missing initializer for member" warning 2025-09-12 15:59:34 +02:00
Alug 26343b4449 remove duped functions in r_fps
those didnt do anything different tbh
2025-09-12 15:59:31 +02:00
Alug a46926f5cc Set SDL_HINT_APP_NAME SDL hint 2025-09-12 15:59:28 +02:00
Eidolon 49518059d1 Use std::vector for r_fps storage
This isn't an optimization for the mobj pointer list, but it is an
optimization for level interpolators, which previously made N
allocations for N non-mobj thinkers. Now those allocations are amortized
according to std::vector's storage.

This could still be further cleaned up to be more C++-ey.
2025-09-12 15:59:24 +02:00
Alug e6ce425bbd ceepeepeefy r_fps 2025-09-12 15:59:21 +02:00
Alug 19b9ec0521 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-10 13:23:22 +01:00
Alug c98861be6e fix tracker module playback going nuts when changing audio buffer size
forgor CV_CALL :chaosleep:
2025-09-10 13:08:26 +02:00
Alug 29db810c54 delet remaining "highcolor" stuff 2025-09-09 18:17:04 +02:00
indev 14bf24ed27 Revert stopping music in D_StartTitle and G_EndGame 2025-09-09 18:08:58 +03:00
Alug ff5bb34204 parentheses hell 2025-09-08 19:33:55 +02:00
Alug 77a00b08a5 optimize gl vhseffect slightly
we dont need to remake our screen texture 3 times
also avoid combining float with interger maths esp in the loop
2025-09-08 19:29:01 +02:00
Alug 27caf1bc70 Merge branch 'servericonpack' into Saturn-Testing 2025-09-08 18:09:09 +02:00
Gustaf Alhäll 01b24e5417 Fix use-after-free when listing servers 2025-09-08 18:08:45 +02:00
Gustaf Alhäll 7a320c9c54 Refactor aatree_t to accept strings 2025-09-05 20:05:10 +02:00
Alug 3a65b687a8 some more micro optimizations p_mobj
dont revaluate P_GetSlopeZAt multiple times due to min/max
save a few abs calls by putting em in constants
remove pointless fixedmuls
2025-09-05 20:05:05 +02:00
Alug 0919ad015c Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-05 20:05:01 +02:00
indev 437f900c25 Clear dangling pointers in VoteScreen struct after mapload 2025-09-05 18:21:01 +03:00
indev cd7ce5698c Update vote background if hud.setVoteBackground was called on vote screen 2025-09-05 17:34:30 +03:00
indev 86eda4f358 Revert "wonky: cache and reuse our testpoint subsector for sloped mobj z checks"
This reverts commit 6f93299aaf.
2025-09-03 18:51:35 +03:00
indev d791d2ce55 Revert "make sure subsec gets initalised to smth"
This reverts commit 32d8120516.
2025-09-03 18:51:32 +03:00
Alug 1883a4884a (hopefully) fix replayhut calling waitingplayers drawer
due to server list setting netgame to true and never resetting it
also cleanup some mess here
lets hope this doesent break anything
2025-09-03 14:10:26 +02:00
Alug 403c34fe5c Merge branch 'servericonpack' into Saturn-Testing 2025-09-03 12:34:06 +02:00
Alug f86a99cd1b Merge branch 'Saturn-Next' into servericonpack 2025-09-03 12:33:56 +02:00
Alug 85cac497ea fixup building map title string for serverinfo
fixes numerous issues, like zonetitle not appearing on bots and serverinfo screen
and generally making this more sane by appending stuff if needed
also fixes "Zone" not displaying in serverinfo screen
2025-09-03 12:33:49 +02:00
Alug 92d6c2b7b0 make patch/pixel conversion account for padding data/no data
just set everything to transparent pixel 247 (0xf7)
so we neither write nor read garbage data and just can cut it out as transparent during pixel to patch conversion
2025-09-03 12:32:32 +02:00
Alug 46be62b256 Merge branch 'servericonpack' into Saturn-Testing 2025-09-02 23:04:03 +02:00
Alug f67f8e7dbf cache patch width
just to avoid some cache misses in a somewhat tight lööp
2025-09-02 22:20:37 +02:00
Alug 191fd4b68a Merge branch 'servericonpack' into Saturn-Testing 2025-09-02 22:03:59 +02:00
Alug c504c0f8f0 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-09-02 22:03:55 +02:00
indev 6adf39b460 Don't check for opengl in NOHW/DEDICATED builds 2025-09-02 23:01:07 +03:00
Alug e160427108 add smol comment 2025-09-02 21:38:10 +02:00
Alug 275d28c9c6 implement map icon request counter/limit
tries 5 times then gives up
this is just since vanilla clients do not send anything back to us so this would endlessly retry which is pointless
can be adjusted if needed
2025-09-02 21:27:32 +02:00
Alug 2a848e32e4 port map icon packet for serverinfo screen
based on https://codeberg.org/srb2classic/srb2classic/pulls/134

with adjustments
many thanks for the help @indev450 ! <3
2025-09-02 21:27:28 +02:00
Alug 039daa0145 inline P_PointOn stuff + fix declarations 2025-09-02 14:56:41 +02:00
Alug a425935bc4 Merge branch 'Saturn-Next' into Saturn-Testing 2025-09-02 14:56:36 +02:00
indev 6af09bd215 Add offset for small nametags in opengl without shearing enabled 2025-09-01 19:56:42 +03:00
Gustaf Alhäll 015d9208e3 Refactor software blitting logic 2025-09-01 18:24:53 +02:00
Alug f247796ffc small cleanup PT_ServerTics 2025-09-01 11:03:31 +02:00
Alug 29c72be994 Revert "Always accept tics received from the server"
This reverts commit 29006e9926.

Causes random desynchs
2025-09-01 10:58:28 +02:00
Alug 8d70016edc use a macro for mobjtimefrac
just looks a little tidier
2025-08-31 13:36:08 +02:00
Alug 6919b9fd91 skip distance checks if we dont use interpolation
will also indirectly skip calling R_GetTimeFrac
2025-08-31 13:36:05 +02:00
Alug c5d58f5de2 this went missing during merge 2025-08-31 13:36:02 +02:00
GenericHeroGuy 4855d29d31 Fix interpolation going missing for freecam 2025-08-31 13:35:57 +02:00
GenericHeroGuy 2d22c2b265 Rework rendertimefrac and gate it behind a function
Fixes intermission background shifting when toggling fullscreen (yup)
and fixes audio caption text losing interp when paused
2025-08-31 13:35:54 +02:00
Alug acf121cac6 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-31 13:35:51 +02:00
Alug 94d01d1ee9 check clientcfg packet length to skip potential garbage data
dont think this ever broke, but better safe than sorry
2025-08-30 14:43:04 +02:00
Alug e3c9ae6de5 replace strlcat and strlcpy with OpenBSD versions in "string.h"
those started throwing warnings on Windows, so just use the BSD ones, since those also match with what we got on nix
2025-08-28 15:51:57 +01:00
Alug dff8f549da precalculate linedef angles
so we dont have to recalc it runtime
the map is static and linedefs shouldnt be able to be moved so this should be fine
2025-08-28 16:25:59 +02:00
Alug b93a5c5305 replace those with P_GetLocalPlayerForNum 2025-08-28 16:25:35 +02:00
Alug 0c75d8aca3 P_CheckCameraPosition can be static 2025-08-28 16:25:18 +02:00
Alug 71c28ad00b Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-28 16:25:14 +02:00
indev 7e5acd72c1 Make replay search textbox fit on all resolutions 2025-08-28 15:37:03 +03:00
Gustaf Alhäll 29006e9926 Always accept tics received from the server 2025-08-28 10:10:29 +02:00
indev 10d4365376 Pass rgba or fadergba pointer into P_LoadSideColormapGL directly 2025-08-27 23:17:18 +03:00
Alug 611edea6e0 make paletterender lightlevel shifting less ambigous
that macro was from the older approach, but is uneeded now
this better shows whats going on here
2025-08-27 10:11:30 +02:00
Alug fcbf45521a smol optimizations by avoiding multiple reevaluations
due to clamping macros, those may get reevaluated multiple times
nothing crazy
2025-08-27 10:07:34 +02:00
Alug 32d8120516 make sure subsec gets initalised to smth 2025-08-27 09:01:35 +02:00
Alug fdba6a253a dont recheck paletterendering state multiple times during opengl lighting calc 2025-08-26 19:33:31 +02:00
indev 18bdbfdb07 Revert using quick dist functions in lua hud, since some lua scripts need it to be precise (lua driftgauge for example) 2025-08-26 20:17:40 +03:00
Alug 6f93299aaf wonky: cache and reuse our testpoint subsector for sloped mobj z checks
its suprisingly common for the test coords to not change between calling those functions, so we can potentially save us alot of R_PointInSubsector calls
Need to check for branch prediction slowdowns, but from some quick timedemoing, this speeds up things a bunch
2025-08-26 18:05:33 +02:00
Alug c47814c29a dont revaluate HighestOnLine twice for slope mobj z checks 2025-08-26 17:49:40 +02:00
Alug 0dd49869f5 Merge branch 'fastfilesearch' into Saturn-Testing 2025-08-26 12:05:23 +02:00
Alug 74c9c09fcd remove skipexclude variable
with the folderchange check this becomes erronous
2025-08-26 12:04:14 +02:00
Alug 6f891dd235 use GetFileAttributes for pathisdirectory on Windows
should slightly speedup gamestartup with autoloaded files
2025-08-26 10:39:02 +02:00
Alug 6e123b0732 fix filesearch portability 2025-08-26 10:38:58 +02:00
Alug 2c51c9f5f8 use GetFileAttributes for pathisdirectory on Windows
should slightly speedup gamestartup with autoloaded files
2025-08-26 08:36:00 +01:00
Alug 8a781b4fa2 fix filesearch portability 2025-08-26 08:34:57 +01:00
Alug e3a79ab099 fix windows compile 2025-08-26 08:24:51 +01:00
Alug 05364cc4dc fix "invert encore special"
R_NoEncore always checked for the wrong special "240"
we keep that behavior for compat, incase someone else figured it and used that
2025-08-26 09:44:00 +02:00
Alug 3c5d997eff simplyfied P_PointOn checks from prboom
should be functionally identical
2025-08-26 09:43:11 +02:00
Alug 696a9ea464 smol cleanup r_data 2025-08-26 09:43:05 +02:00
Alug c2d97397e8 test: use faster distance and sight functions for hud hooks 2025-08-26 09:42:58 +02:00
Alug 4f534c5ce3 remove d_main include from filesrch 2025-08-25 16:12:57 +02:00
Alug 15288ced57 this ceepeepee 2025-08-25 16:10:49 +02:00
Alug 30eca524d9 remove d_main include from filesrch 2025-08-25 16:10:46 +02:00
Alug 168a2c9684 just drop the connection instead of I_error if connection gets lost
partial port from srb2classic
2025-08-25 15:40:50 +02:00
Alug 0e05dca3d5 try to fix nodes being occupied if connection didnt recieve any acks
partial port from srb2classic
2025-08-25 15:40:50 +02:00
Alug 717f5e3c13 Merge branch 'fastfilesearch' into Saturn-Testing 2025-08-25 13:10:03 +02:00
Alug 2cad7f7210 dont recheck if we should skip the folder if folder did not change
saves a whole lotta string comparisons and speeds this up even further
2025-08-25 12:56:09 +02:00
Alug 34783cfe94 dont evaluate strtol multiple times 2025-08-25 03:39:37 +02:00
Alug 12149a4773 target x86-64-v2 instead of nocona for 64bit windows
slightly newer target, should still be compatible enough with anything from 2009 and onwards
may help with compiler optimizations
needs some testing
32bit builds remain unchanged as they are intended purely for compatibility
2025-08-24 23:02:13 +02:00
Alug 7d81990699 always set this to 0
dont need to check this beforehand
2025-08-24 23:02:09 +02:00
Alug 531de8bd1e make lua string to number conversion consistent between platforms
effectively clamps it to 32bit range
maybe fixes some issues between windows and other builds
2025-08-24 23:02:06 +02:00
Alug 232e6a4b5b use hash checks for W_CheckNumForName 2025-08-24 23:02:03 +02:00
Alug 65d3684d0b Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-24 23:01:53 +02:00
Alug 6017543666 dont try to make glpatch from nothing 2025-08-24 23:01:48 +02:00
Alug 7c7f924ef1 actually dont add any level interpolators on render_none 2025-08-21 18:33:11 +02:00
Alug ba40d45321 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-21 18:33:08 +02:00
indev 3af0009453 Fix off-by-one in M_FindFirstMap 2025-08-20 16:18:33 +03:00
Alug 7ac01390d0 dont add mobj and level interpolators on render_none
i dont think we need to interpolate anything on dedicated
this should improve performance a bit on maps with many mobjs/moving level stuff
2025-08-19 11:49:59 +02:00
Alug 6dee986a28 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-19 11:49:56 +02:00
Alug 145eecf8a4 move sprite reset stuff into R_ResetMobjInterpolationState
this also gets called at the start of the tic
and sets a bunch of rendering crap eitherways
so we can save another thinker loop and a bunch of checks with this
bit of perf gain, 3-4fps on that awful hadal trench timedemo
2025-08-19 11:49:29 +02:00
Alug 080719c251 move all of this stuff into the switch above it lel 2025-08-18 17:56:38 +02:00
Alug d58719d09b cleanup and splitup P_LoadSideColormaps 2025-08-18 17:56:35 +02:00
Alug 05d1eab441 remove bottommap,midmap and topmap stuff
was non functional anyways so get rid of it
2025-08-18 17:56:31 +02:00
Alug caffda3221 dont need to do this without viewmorph stuff 2025-08-18 17:56:08 +02:00
Alug 650a50278a move camera slidemove stuff behind ifndef NOCLIPCAM
dont think this is needed at all with camera noclip
2025-08-18 17:56:05 +02:00
Alug 1ef0909204 dont need to completely clamp those
we already check for the top coords right before
2025-08-18 17:55:55 +02:00
Alug 42878841e6 Fix FOF intersections in multitagging for the renderer.
backport from srb2
2025-08-18 17:55:52 +02:00
Monster Iestyn 34e4cf123d Fix FOF slopes briefly glitching on level load in software mode, by ensuring the FOFs' target sectors have hasslope set on creation 2025-08-18 17:55:48 +02:00
Alug 7ffb3ebdfe Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-18 17:55:45 +02:00
Alug 684a43a95c fix software extra 3d floors
lmao was a copy paste oopsie from ages ago
shoutout to phoenix´s new map making me find this
2025-08-18 16:49:36 +02:00
Alug 4fcb41f659 mark stuff for blitting loop as const and with register
gives another 5-7fps or so for me
2025-08-17 18:19:20 +02:00
Alug 2d1c876e0d Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-16 22:21:13 +02:00
Alug 8d1ef1721f port srb2classic´s sdl blitting stuff for software
all credits to hanicef
mostly from https://codeberg.org/srb2classic/srb2classic/commit/a1fa0b89dbf75ef8be17c9ca5c728cc9c1848582
and
https://codeberg.org/srb2classic/srb2classic/commit/a1cf54e66ad1cb66af99056bc940fc68dce24224

boosts my fps around 20-25 fps
2025-08-16 22:20:58 +02:00
Alug 02ffceb300 fix rotating polyobject interpolation 2025-08-16 22:20:55 +02:00
Alug 44fe156751 update comment for lightcontrast 2025-08-16 22:20:52 +02:00
Alug aca48d69cd style fixes 2025-08-16 22:20:48 +02:00
Alug 294ce055cd mark this with restrict 2025-08-16 22:20:33 +02:00
Alug 4117eb5b40 fix Paranoia compile 2025-08-16 22:20:30 +02:00
Alug a9068ee162 mark this with "noreturn"
clang kept yelling for some reason
2025-08-16 22:20:27 +02:00
indev 9549a204a5 Add tooltip for centered chat text 2025-08-15 22:57:09 +03:00
indev c276736002 Add option to center text in chat (chatcentertext) 2025-08-15 21:51:58 +03:00
Hanicef cfd960124e Do not access memory on misaligned addresses 2025-08-15 10:11:07 +02:00
Alug 77cd898bd2 TEST: compile with fwrapv
fixes clang desynchs with prng
maybe other stuff/platforms aswell
2025-08-15 10:02:59 +02:00
Alug e7c40dd914 fix -Wunused-value warnings
we dont do anything with this, so just skip both
2025-08-15 10:02:56 +02:00
Alug bcb1a1d5eb port RR´s c++ compatible byteptr macros
means we can also get rid of the mumble hack
2025-08-15 10:02:52 +02:00
Alug bf53db8d68 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-15 10:02:48 +02:00
Alug b5dfe74cfe add USECLANG compile flag to force building with clang 2025-08-15 08:01:58 +02:00
Alug 6c891f1146 supress align and unkown pragma warnings in clang 2025-08-15 08:01:56 +02:00
Alug 7d06f59da5 append those to LDFLAGS instead of libs
so they may be passed to other things
2025-08-15 08:01:47 +02:00
Alug 9dee0f0ea8 fix restrict being in wrong place in declaration R_DrawColumnPixel 2025-08-15 08:01:37 +02:00
Alug 9338b5b10f dont need to realloc this
didnt see when i added realloc everywhere this doesent need to keep old data
2025-08-14 16:19:17 +02:00
Gustaf Alhäll b7ecffedcd Fix pixel shift caused by negative pixel positioning in software 2025-08-13 22:44:25 +02:00
Alug 71ab8c0b7d workaround for lua menu conrols for spectators
TODO: refactor all of this into one cmdbuilder and get rid of the codedupe in p_user for cameracmd
2025-08-13 22:40:50 +02:00
Alug 8901c62201 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-13 22:40:46 +02:00
Alug 7deeb4486f port RR camera slope pitch stuff + make it toggable
"cam_pitch" this makes the camera pitch on upwards and downwards slopes a bit
2025-08-13 18:01:00 +02:00
Alug a559e36306 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-12 20:29:18 +02:00
Alug 602bd1a010 fix directional light stuff 2025-08-12 20:29:13 +02:00
Alug f57b8092fc dont need to reinit those gl vars 2025-08-12 20:29:10 +02:00
Alug 5777c638f1 hack for vanilla gba rr cyan floor in gl 2025-08-12 20:28:54 +02:00
Alug 60307da80e move dedi idle stuff into function + port smol cleanup from srb2 2025-08-12 20:28:51 +02:00
Gustaf Alhäll d6e97c328a Simplify NetXCmd client distribution 2025-08-12 20:28:48 +02:00
Alug e4f35e827d free minimap patch on mapload 2025-08-11 13:48:02 +02:00
Alug e7cab1a376 check if minimaphead exists
hopefully fixes a random crash there
2025-08-11 13:47:59 +02:00
Alug 6eb1114d17 reduce scope of some more netstuff 2025-08-11 13:47:54 +02:00
Alug e6a0b4f58b fix oopsie copy paste 2025-08-10 18:34:43 +02:00
Alug c8d9ff6575 use GetFileAttributes also for preparefilemenu
untested as of now
2025-08-10 18:34:40 +02:00
Alug 0d9d176415 use GetFileAttributes instead of stat for filesearch on windows
this is slightly faster and the recommended way of doing this
apparently stat on windows has to emulate some POSIX stuff for that which may slow it down
2025-08-10 18:34:35 +02:00
Alug e1413764f6 speedup addon search
by adding a blacklist of folders
logs, luafiles, replay etc shouldnt ever contain addons so those can be skipped entirely
this massively speeds up searching for addons on windows
also will make findfile try to search in the designated addon folders first so it doesent look in the home or kart folders before it
this is probably not the best way to do things
but idk what im even doing, im not a coder just some chao who likes to sleep all day
2025-08-10 18:34:11 +02:00
Alug ca04e084a2 link stdc++. pthread and gcclib statically on windows
fixes the game throwing super cryptic errors when you dont have the right dlls
2025-08-09 23:32:03 +01:00
Alug 56d03042ec link stdc++. pthread and gcclib statically on windows
fixes the game throwing super cryptic errors when you dont have the right dlls
2025-08-09 23:31:55 +01:00
Alug 0c8df833e9 test: use SDL_GetDesktopDisplayMode instead of SDL_GetCurrentDisplayMode
this seems to fix some smol freezes for some
need to test this a bit
2025-08-09 22:32:24 +01:00
Alug f275eb5f9a test: disable sdl textinput when not using native keyboard layout
this may fix issues on newer sdl2/-compat versions with dead keys on non us layouts
2025-08-09 22:32:20 +01:00
Alug 88081068e9 fix oopsie copy paste 2025-08-09 22:32:13 +01:00
Alug 9893584b4f use GetFileAttributes also for preparefilemenu
untested as of now
2025-08-09 22:28:45 +01:00
Alug 0b4fad3cca use GetFileAttributes instead of stat for filesearch on windows
this is slightly faster and the recommended way of doing this
apparently stat on windows has to emulate some POSIX stuff for that which may slow it down
2025-08-09 21:26:15 +02:00
Alug bbb4749815 speedup addon search
by adding a blacklist of folders
logs, luafiles, replay etc shouldnt ever contain addons so those can be skipped entirely
this massively speeds up searching for addons on windows
also will make findfile try to search in the designated addon folders first so it doesent look in the home or kart folders before it
this is probably not the best way to do things
but idk what im even doing, im not a coder just some chao who likes to sleep all day
2025-08-09 17:21:21 +02:00
Alug 4fc780298f remove I_BaseTiccmd
just complicates things, can just memset our ticcmnds instead
psure this was used ages ago for smth but its not needed here at all
2025-08-09 17:21:18 +02:00
Alug f24f3b5b23 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-09 17:21:15 +02:00
Alug ff6279a406 add P_GetLocalPlayerForNum
just to get rid of ternaries lel
2025-08-09 17:21:08 +02:00
Alug c36f64e97b use memcmp for legacy sky check
just gotta know if first three letters match it
2025-08-09 17:21:05 +02:00
Alug 2c4bee6e6a Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-09 00:50:50 +01:00
Alug 7b776f01bd change flow of K_drawKartStats a bit
nothing notable, just the non splitscreen path will return early now
2025-08-08 22:43:43 +02:00
Alug 43b7492300 disable pointless "Couldn't read mobj_t" warnings in replays
mobjs just cannot be unarchived in replays ever
so this will always spam those for something that WILL never work in kart
maybe if i decide to fix this for 32p or smth those become useful again
2025-08-08 22:29:29 +02:00
indev 1fe79fe236 Add -strict, -strict-soc and -strict-lua cli params
Both trigger I_Error if a warning occurs during addon load in a SOC or lua
script
2025-08-08 18:59:07 +03:00
Alug 222b63d2c3 move the windoze thing to windoze makefile 2025-08-08 17:53:25 +02:00
indev a7c41b458a Use NOLIBGME instead of NOGME 2025-08-08 18:33:24 +03:00
indev 3901c7c7da Revert "Fix makefiles checking for NOLIBGME instead of NOGME"
This reverts commit 932a08b2da.
2025-08-08 18:31:45 +03:00
indev 932a08b2da Fix makefiles checking for NOLIBGME instead of NOGME 2025-08-08 18:29:05 +03:00
indev 4c97a4f9e0 Fix potential buffer overflow in DEH_LoadDehackedFile 2025-08-08 17:53:46 +03:00
indev a1d16b4613 Update dedicated/i_sound.c I_StartSound and I_UpdateSoundParams 2025-08-08 17:43:40 +03:00
Alug 16e1e00c67 "reenable" midi support
well it was never really disabled, but like this we can atleast change its volume lel
menu entry is still disabled, i dont think theres a single map with midi music, so this would just clutter the menu
2025-08-08 00:55:06 +02:00
Alug b76fc9699a fixup midi menu stuff
i love M_DrawSkyRoom
2025-08-08 00:55:03 +02:00
indev cb3638e3ab Add SetupVote hook 2025-08-07 23:48:11 +03:00
Alug e85d91e682 save a few checks for st debug drawer
if we dont use it
2025-08-07 22:27:28 +02:00
Alug 2653b59af4 dont double free our vote patches
those may point to the same thing so uhhhh
PU_PATCH_LOWPRIORITY will ensure the memory will be freed on mapload
2025-08-07 22:26:27 +02:00
Alug caff071a1b fix spacing in Z_CheckHeap errors 2025-08-07 22:10:03 +02:00
JugadorXEI 86ccf40884 Fix displayplayers.iterate hang when multiple viewports view the same player 2025-08-07 20:51:31 +02:00
Alug 85dba64b84 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-07 20:51:28 +02:00
Alug 40165fd6db make leveltitlecard be affected by colour hud 2025-08-07 19:42:39 +02:00
Alug c701e1fe7e make inputdisplay colour match the rest of colourhud better 2025-08-07 19:38:03 +02:00
Alug 525e19566e smol refactor hwr precache
not faster or anything
real time consuming thing is he actual calls to getetxture and getflat
2025-08-07 19:38:00 +02:00
Alug 27e734bde0 make music toggle/volume handling less of a mess
based on work in srb2 from sphere
this gets rid of all the duplicated midi stuff
since we dont really have a whole midi soundtrack like srb2, S_GetMusicLumpNum will always prefer non midi music
2025-08-06 19:49:35 +02:00
Alug fa10eb5801 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-08-06 18:09:24 +01:00
Alug 2e44a50f7f Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-06 00:13:39 +02:00
Alug bd53786887 fix LoadElevatorThinker interp oopsie 2025-08-06 00:12:34 +02:00
Alug ad1b1eabe4 fix levelstuff not being interpolated on netgame join or resynch
i love polyobjects
2025-08-06 00:10:47 +02:00
Alug 2de9a2be68 fix a desynch due to wrong assumption 2025-08-05 18:33:02 +02:00
Alug e120907e0f make driftgauge stuff a bit more readable 2025-08-03 20:12:13 +02:00
Alug b0c217201e move flat cyan check into a function
and also limit it to software renderer only
we dont need this anywhere else, so can save a bit of work
2025-08-03 15:59:57 +02:00
Alug dac7026739 use R_GetFlat here
does the exact same thing
2025-08-03 15:59:23 +02:00
Alug 91a4646f19 dont PU_CACHE our planeflats 2025-08-03 15:51:52 +02:00
Alug 8963e17b83 check if __THROW is defined
Windows does not have it at all, so we gotta check this otherwise compile may fail
2025-08-03 14:40:09 +01:00
Alug 8ba52e2530 check if __THROW is defined
Windows does not have it at all, so we gotta check this otherwise compile may fail
2025-08-03 14:40:01 +01:00
Alug bf2184582a delet those 2025-08-03 16:30:56 +02:00
Alug 501a770fee Merge branch 'optional-freeslot-test' into Saturn-Testing 2025-08-03 16:30:25 +02:00
Alug 327f7085f6 idk whats up here with the win libs 2025-08-03 16:30:17 +02:00
Alug 8aef549cfc restore optional freeslot stuff 2025-08-03 16:24:35 +02:00
Alug 8dd268b83e fix conflicts 2025-08-03 16:23:00 +02:00
Alug 5fddc3156b Merge branch 'Saturn-Next' into optional-freeslot-test 2025-08-03 16:22:30 +02:00
Alug d6976ca64f inline most of lua lib stuff
a bit faster
2025-08-03 16:15:15 +02:00
Alug 809219d5e8 Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-03 16:08:20 +02:00
Alug 278dd12ced Merge branch 'Saturn-Next' into Saturn-Testing 2025-08-03 15:51:58 +02:00
Alug f3cfa969c9 TEST:raise size of sectors considered too smol for precip
theres been a bunch of very smoll sectors that still get precip spawned (see howling bogs, outside of the actual map)
this i just an abitrary value, so gotta see how thi s goes
2025-08-03 15:39:01 +02:00
Alug 7b64b22012 some tiny optimizations 2025-08-03 15:38:58 +02:00
Alug 267ccae3a9 Add driftpulse controller rumble
inspired by radioracers, this does a "weak" rumble pulse the moment the sparks pulse (this is slightly after reaching the new driftlevel)
may want a toggle for this
2025-08-03 15:38:55 +02:00
Alug 5f77dbb946 cleanup the wadpath mess 2025-08-03 15:38:51 +02:00
Alug 1a46d7d16c HACK reset demo.inreplayhut on levelload when not in replay playback
this is really hacky, but M_QuitReplayHut will be skipped if we change maps, connect to a server or basically anything in that manner from within a replay that we started from the replayhut
which can lead to crashes or the replayhut to become nonfunctional
note, like this demolist is not freed, but that shouldnt matter much since it will be freed anyways the moment you open the replayhut again
2025-08-03 15:27:55 +02:00
Alug c8a2278cb7 Testing again 2025-08-03 15:25:13 +02:00
Alug 75b269d4bb Merge branch 'updatemd5' into Saturn-Testing 2025-08-03 15:24:39 +02:00
Alug 35e499027d Merge branch 'texhash' into Saturn-Testing 2025-08-03 15:24:34 +02:00
Alug 356b2f279c Merge remote-tracking branch 'origin/winzlib-ng' into Saturn-Testing 2025-08-03 15:24:30 +02:00
Alug eba5965220 move rainbow color calc into K_Rainbowcolor 2025-08-03 14:42:49 +02:00
Alug feda0bae80 update md5 lib
no real changes, mostly just cleanup and some memory alignment fixes
2025-08-03 00:38:52 +02:00
Alug 44ecb677ad fix merge conflicts texturehashing 2025-08-03 00:37:28 +02:00
Alug 3e99f4d142 Do not reload every texture when adding a wad (squashed)
port of https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725#c829d21709a4f5cd81d140271e883bc40dd00b1b
2025-08-03 00:35:46 +02:00
Alug 2891983cde replace zlib with zlib-ng on windows 2025-08-03 00:32:40 +02:00
Alug 612f910b9c Merge remote-tracking branch 'origin/Saturn-Next' into winzlib-ng 2025-08-03 00:29:50 +02:00
Alug a9d0e2154b clamp software lightlevels before shifting it
was a little oopsie porting this over
,after shifting we only get 32 lightlevels
decided to clamp this in range aswell, just incase
2025-08-02 19:13:23 +02:00
Alug 16a0953d1d fix the "is valid for C/ObjC but not for C++" warnings
fixes https://github.com/Indev450/SRB2Kart-Saturn/issues/192
2025-08-02 01:54:57 +02:00
Alug 737ae08355 dont need to reinit those ever 2025-08-02 01:01:06 +02:00
Alug 6d83a7e187 remove usefulness and volume from sfxinfo_struct struct
those are unused anyways, hope this doesent break shit lol
2025-08-02 01:00:58 +02:00
Alug 56df9b6af3 who tf needs 999999999 sound channels
:chaobaba:
even 255 are kinda overkill lol
2025-08-02 01:00:51 +02:00
Alug 7f2435d821 add an Accessibility options menu
still a work in progress, feel free to suggest more things to add!
2025-08-01 22:26:00 +02:00
Alug b180f29fd9 readd secbright to menu
into advanced video options menu
2025-08-01 21:27:38 +02:00
Alug 32c85f96a4 remove secbright from menu
need to slot it somewhere else but little too lazy atm
2025-08-01 21:27:35 +02:00
chromaticpipe ec83c60320 Configurable sector brightness in software 2025-08-01 21:27:32 +02:00
chromaticpipe fb4a912dba Clamp the lightlevel at the start of HWR_Lighting()
Allows secbright to work without shaders
2025-08-01 21:27:29 +02:00
James R 123b2aa60b lua_hooklib.c: refactor HUD hook call 2025-08-01 21:04:30 +02:00
Logan Aerl Arias bd82a8db29 Update lauxlib.h
lauxlib.h: mark luaL_error as a REPORT function
2025-08-01 21:04:27 +02:00
Alug 6f71fc17c2 mark this as unlikely
those will never run ever after displaying once
2025-08-01 21:04:24 +02:00
Alug d8c3e9f41c fix windows being unable to link with LTO and openmpt
idk why this works but it does, mirrors how it was before the new makefiles
2025-08-01 17:55:02 +01:00
Alug e10345b4de pass "-g" again for lto and asan on windows
for some weird reason it will omit all debug symbols otherwise, which we need for crashlogs and stuff
2025-08-01 17:31:12 +01:00
Alug 2ab66b113c we dont need cv_samplerate with sdl mixer 2025-08-01 04:51:00 +02:00
Alug f64263cf6f remove some unused stuff s_sound 2025-08-01 04:50:57 +02:00
Alug 55c72f32da rename buffersize to audiobuffersize
buffersize was not a good name lel
2025-08-01 04:50:54 +02:00
Alug 53bc12baad init "lenght" in S_AddSoundFx
seems like this never init this lel
2025-08-01 03:58:41 +02:00
Alug b391e763bc fix gme 2025-08-01 03:56:47 +02:00
Alug 2bae0bdb0f indent deez 2025-07-31 23:34:29 +02:00
Alug d42df54901 fix borderless sometimes not toggling on windows
idk why windoze is like this, but gotta call this after SDL_SetWindowFullscreen here
2025-07-31 23:34:28 +02:00
Alug e6256d448f TEST: banish LUA_Step
checking stuff there never seemed to be any garbage left here
so we can just skip this
2025-07-31 21:23:33 +02:00
Alug ad1a980eb1 memset listener outside the loop S_StartSoundAtVolume
same effect, but we dont need to call it multiple times and can be sure this is never unitialized
2025-07-31 19:55:29 +02:00
Alug 1b50858fa6 add a configurable same sound limit
inspired by dsda-doom
in alot of cases the game may play a crapton of the same sound at once, becoming unbearably loud
2025-07-31 19:42:56 +02:00
Alug 3276bbb7b6 restore mumble postional sounds for displayplayers
we essentially always passed 0 before lol
2025-07-31 19:42:53 +02:00
Alug dc00fa3429 fix passing garbage to mumble outside of levels
this just deadass passed the unitialized listener array into mumble
2025-07-31 19:42:37 +02:00
indev dc9276b73c Make 'visit mb.srb2.org/addons' text fit on default resolution ('& make' bit refers more to wiki than mb anyway) 2025-07-31 13:33:48 +03:00
Alug 271d70d6f3 inline HWR_GetTexturePalette
makes ui draw slightly faster from quick test
should be in hw_glob, but cant include hw_main there Zzz...
2025-07-30 15:29:56 +02:00
Alug e52a6c430b smol changes k_hud
nothing crazy mostly just smol reordering
2025-07-30 14:55:44 +02:00
Alug d77d25acf8 use hypotf for P_SegLengthFloat
well its hypot but for floats lel
2025-07-29 19:21:34 +02:00
Alug 9898809f0a remove erronous HWR_FreeExtraSubsectors call
this will be called from within HWR_CreatePlanePolygons anyways
2025-07-29 18:48:02 +02:00
Alug 48768aa13c fix the rare infinite loop hang in ogl (sunset hill map)
use new doom-legacies PointInSeg and add a selfref check to CutOutSubsecPoly
(somewhat related, but it appears this whole file is able to mess with the actual sector planes outside of rendering, this is not really good since it may actually lead to some super hard to debug desynchs)
2025-07-29 18:40:40 +02:00
Alug b1c01a763f cleanup hw_bsp a little
mostly just get rid of debug bloat that isnt even used
adding some branching hints for the I_errors (never seen any one of them happen tbh lel)
and remove some redundant checks
2025-07-29 18:40:02 +02:00
Alug d9bcd6007c move horizonline check to hw_bsp
to where maps also get checked for portals
should speed up levelload slightly
2025-07-29 15:37:14 +02:00
Alug d1b478b3b1 oop 2025-07-29 02:36:45 +02:00
Alug 14b421f533 camera noclip sec special is effectively unused in kart
its not even in the kart zb config
so mark it with unlikely
2025-07-29 02:35:58 +02:00
Alug 7310a8e4df add slope check here
not necessary but may skip more uneeded checks and stuff
2025-07-29 01:23:01 +02:00
Alug c1c3a7dc78 remove unecessary casts for colormap 2025-07-29 00:48:26 +02:00
chromaticpipe ff10b77414 Fix OpenGL flash palettes ignoring saturation 2025-07-29 00:31:10 +02:00
chromaticpipe 4667c332b4 Fix brightness issues with blend textures in Pallette Rendering 2025-07-29 00:31:07 +02:00
Alug 4a9f6b6a22 we dont need to clamp sprite lightlevels everywhere in ogl
theyre an int32 due to the directional light system stuff and get clamped in HWR_Lighting as a result
2025-07-29 00:31:04 +02:00
indev f1d78243d0 Move setting c++ standard bit below 2025-07-27 19:45:10 +03:00
Alug 6e41c8a2a0 readd std=c++17 to cxxflags 2025-07-27 18:42:16 +02:00
Alug 9c5955feb0 Store last ticcmd in a buffer rather than in netcmd
port of https://codeberg.org/srb2classic/srb2classic/commit/fe663f799e733e9a59a95dfd561e506571838554

testing this, since the faketic calc seems a bit "off" to me
2025-07-27 18:29:55 +02:00
Alug 0764b180f7 fixup! next branch
- remove a bunch of clutter
- Fix AATtree stuff by properly balancing it
- replace getcolumn calc with modulo calc
- use strlcpy for some things
- cache wadfile start and endfolders
2025-07-27 18:28:19 +02:00
Alug b883e4e4fe Merge branch 'Saturn-Testing' into Saturn-Next 2025-07-27 18:21:07 +02:00
Alug f78688b684 Merge pull request #189 from Indev450/mmenucleanup
Cleanup m_menu a bit
2025-07-27 17:18:07 +01:00
Alug 097cd5e2ca Merge remote-tracking branch 'origin/Saturn-Next' into mmenucleanup 2025-07-27 18:17:49 +02:00
Alug cd4836ae99 Merge pull request #187 from Indev450/emotes
Add emotes support
2025-07-27 17:16:23 +01:00
Alug f0acf179c2 Merge pull request #185 from Indev450/fixupnet
Cleanup netcode a bit
2025-07-27 17:16:16 +01:00
Alug 836ad12c40 Merge pull request #180 from Indev450/fixgnu23
Make codebase C23 compliant
2025-07-27 17:16:02 +01:00
Alug a147fa3100 Merge pull request #179 from Indev450/unnestmothink
Unnest mobj thinker stuff + cleanup p_mobj
2025-07-27 17:15:55 +01:00
Alug 4f0cf44e78 Merge branch 'unnestmothink' into fixgnu23 2025-07-27 18:15:31 +02:00
Alug 2417647110 Merge branch 'Saturn-Next' into fixgnu23 2025-07-27 18:15:04 +02:00
Alug 982cd7bde2 add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-27 18:14:27 +02:00
Alug d6bd289fcf Merge branch 'Saturn-Next' into unnestmothink 2025-07-27 18:14:17 +02:00
Alug a68a05a838 fix conflict 2025-07-27 15:18:46 +02:00
Alug 95504547df add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-27 15:17:51 +02:00
Alug ceb2a70664 reduce netbuffer scope even further 2025-07-27 15:17:17 +02:00
Alug 8593a1975c Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-27 15:17:09 +02:00
Alug ba44e61733 Merge branch 'Saturn' into Saturn-Next 2025-07-27 15:09:58 +02:00
chromaticpipe 845652cbfe Make it a part of fullscreen cvar 2025-07-27 15:02:24 +02:00
chromaticpipe ceafa06efc Borderless window toggle 2025-07-27 15:01:47 +02:00
Alug e6f487474b register chasecam with the other cam vars
why dupe a loop
2025-07-27 14:53:31 +02:00
Alug d8461bb44f dont apply player camfade when exiting or in freecam mode
also renames it and moves the check outside
2025-07-27 14:53:07 +02:00
Alug e25d366728 add toggable player close to camera fade
similar to some other kartracers
only takes other players into account
2025-07-27 14:51:10 +02:00
Alug 2abf0b98ac dont do this in dedi
dont need to, its pointless and prob causes more issues than anything
2025-07-27 14:32:38 +02:00
Alug 0f087d13bb dont do this in dedi
dont need to, its pointless and prob causes more issues than anything
2025-07-27 14:18:41 +02:00
indev 2e914c61d1 Init displayplayers to {0} 2025-07-27 14:33:01 +03:00
indev 3f599d5a28 Fix smol typo :3 2025-07-27 14:03:35 +03:00
indev 6ef1f73d4d Init displayplayers to {0} 2025-07-27 13:54:27 +03:00
Alug 38b84baf9d Merge pull request #193 from chromaticpipe/borderlesswindowtoggle
Borderless window toggle
2025-07-26 21:42:50 +01:00
chromaticpipe fae50c0e19 Make it a part of fullscreen cvar 2025-07-26 15:18:03 -05:00
Alug 50f7e2084c seenames stuff is always unlikely 2025-07-26 21:29:25 +02:00
Alug 67cc5402cf move assignments after early returns ST_drawLevelTitle 2025-07-26 21:29:21 +02:00
Alug 2259d4f309 get rid of code dupe for fpscapping stuff 2025-07-26 21:29:16 +02:00
Alug f8d903e7d2 simplify this 2025-07-26 21:29:13 +02:00
Alug 805cde8ae8 D_CleanFile can be static 2025-07-26 21:29:09 +02:00
Alug b23906e327 update link in addon menu to "mb.srb2.org/addons"
:chonkbuncle:
2025-07-26 21:29:04 +02:00
Gustaf Alhäll 2052afdb66 Fix custom addon directory being ignored when downloading addons 2025-07-26 21:29:01 +02:00
chromaticpipe d9c7a40d4a Borderless window toggle 2025-07-26 11:58:55 -05:00
Alug 48d9b2bc98 reduce netbuffer scope even further 2025-07-26 16:19:13 +02:00
Alug 939bf588b3 Merge branch 'Saturn-Next' into fixupnet 2025-07-26 16:19:09 +02:00
Alug cb2e017bcf seenames stuff is always unlikely 2025-07-26 16:18:59 +02:00
Alug d91fbf5d36 move assignments after early returns ST_drawLevelTitle 2025-07-26 16:18:56 +02:00
Alug 9859e43be7 get rid of some redundancy R_Frame stuff
R_SetupCommonFrame already checks the actual sector for us, so we dont need to do this before
2025-07-26 16:18:52 +02:00
Alug 306fec6f9e get rid of code dupe for fpscapping stuff 2025-07-26 16:18:25 +02:00
Alug 3e8b3e868b simplify this 2025-07-26 16:18:22 +02:00
Alug 9261d9c5b2 D_CleanFile can be static 2025-07-26 16:18:20 +02:00
Alug f97941f86e update link in addon menu to "mb.srb2.org/addons"
:chonkbuncle:
2025-07-24 23:47:41 +02:00
Gustaf Alhäll a4810bd6c8 Fix custom addon directory being ignored when downloading addons 2025-07-24 23:45:55 +02:00
Alug 93cbba218a add mobj islocal field
so we can skip the pushable trigger stuff for local mobjs for synch reasons
very sketchy
2025-07-24 22:33:53 +02:00
Alug e749346f0c fix console taking minutes to open during frameskipping
prob not the best way to handle this, but its the simplest
the console should always be openable without issues unless during wipes, since in some cases you end up having to kill the game to do anything
2025-07-24 20:47:31 +02:00
Alug a658883664 fix console taking minutes to open during frameskipping
prob not the best way to handle this, but its the simplest
the console should always be openable without issues unless during wipes, since in some cases you end up having to kill the game to do anything
2025-07-24 20:47:21 +02:00
indev d94c10014f Move server search below refresh option 2025-07-24 21:20:19 +03:00
Alug 45629386bb update credits
this is super full and we need to think about something better for this X)
2025-07-24 19:03:06 +02:00
Alug ffec9d64d5 delet windoze users (winuser.h)
apparently this makes cross compile commit sudoku, need to test this on actual windoze and see if this breaks anything since idk how this file even works
thx nep for the tip!
2025-07-24 15:22:44 +01:00
Alug 3e9f17af86 raise version number to 8.3
so i dont forger before release lul
2025-07-24 17:18:57 +02:00
Alug 03ff2fc007 enable ZDEBUG by default
this is just quite useful honestly
2025-07-24 17:03:23 +02:00
Alug 4492c00840 move prints to ZDEBUG2
as it seems to be for this purpose
2025-07-24 17:03:18 +02:00
Alug e15319ac9b move this stuff behind ZDEBUG 2025-07-24 17:03:10 +02:00
Alug fa012aefe1 let Z_CheckHeap print file and line of where it occured
like its supposed to lel
2025-07-24 17:03:06 +02:00
Alug e681d2d24d remove itemamount check here
replicate vanilla
even if this becomes negative
this does not seem to crash, so id rather do whatever vanilla does
2025-07-24 16:41:28 +02:00
Alug 76e54762d8 add toggle for quake screenshake effects
TODO: make an accessability option menu for certain effects
2025-07-24 16:39:06 +02:00
GenericHeroGuy 3b7d517be2 bruh
Let's try that again, this time putting the camera in a local...
2025-07-24 16:38:55 +02:00
Alug f4da64e3fa remove prob pointless check
viewplayer will be the currently viewed displayplayer lel
2025-07-24 16:38:44 +02:00
GenericHeroGuy 384acf8e31 Fix fake floors in Donut Plains disappearing when chasecam is off
Also remove the useless R_PointInSubsector calls
2025-07-24 16:37:18 +02:00
indev a423451383 SF_HIRES is already handled via spritexscale and spriteyscale 2025-07-24 16:37:08 +02:00
indev 66cfceedaf If gamestate resend took too long, abort resynching 2025-07-24 16:36:26 +02:00
Alug fe9107fa9d fix the fov adjust check
lmao oops
2025-07-24 16:33:29 +02:00
chromaticpipe e4f2db54e7 Fix level interpolators jittering during objectplac 2025-07-24 16:33:01 +02:00
chromaticpipe 2f5fe01ae0 Truncate trailing zeroes in float CVars 2025-07-24 16:32:04 +02:00
chromaticpipe 1bb7bd0abc Fix help command for CV_FLOAT CVars 2025-07-24 16:31:57 +02:00
indev a84ec88bc3 dedi's do run got_mapcmd :p 2025-07-24 16:29:09 +02:00
Alug 4a2e78081a shut up curl im already long 2025-07-24 16:27:56 +02:00
Alug d09d2cb445 use memcmp during startup map check
prob not faster just looks a bit better tbh
2025-07-24 16:27:30 +02:00
Alug 1faa585e83 fix memoryleak in pk3 verify functions 2025-07-24 16:27:16 +02:00
Alug 7479c82691 some crap from ceepeepeecheck 2025-07-24 16:27:04 +02:00
Alug cfab2236da fix awayview join crash
player->awayviewmobj may not exist yet in some cases
2025-07-24 16:26:48 +02:00
Alug d2ee344b22 Fix underflow in consistancy checking code
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/9f5686ef48956cd64ef92f737e59cbbaa27d8cf9
2025-07-24 16:25:57 +02:00
Alug b22737223e didnt mean to change this lel 2025-07-24 16:25:06 +02:00
Alug 578158c060 move HWR_GetTexturePalette calls
to after early returns/where they are used
2025-07-24 16:24:48 +02:00
Alug 8eda0f78f7 call HWR_LoadMapTextures in paletterender toggle callback
from srb2 pr
2025-07-24 16:24:45 +02:00
Alug 2c2c82dc1a add mo checks to automap stuff 2025-07-24 16:24:22 +02:00
Alug d8c9522ec9 add a bunch of checks for if G_BuildMapTitle returns NULL 2025-07-24 16:24:14 +02:00
Alug 492aef2165 no need for an else here 2025-07-24 16:23:50 +02:00
Alug fc0409e967 readd cubeapply check here 2025-07-24 16:23:32 +02:00
Alug 8a89b57e48 this memset is incorrect and does nothing 2025-07-24 16:22:45 +02:00
Alug 0f6b9ba181 remove this
prob wrong assumption, our netcode sucks massive ass
2025-07-24 16:22:23 +02:00
Alug 8f1b4004c9 fix compiler warning bout playeringame 2025-07-24 16:21:45 +02:00
Alug bee5250940 readd flexible array for softwarepatch columnofs
how did this ever work lel
2025-07-24 16:20:48 +02:00
Alug c61a2e6ba2 fix https://github.com/Indev450/SRB2Kart-Saturn/issues/191
was an oversight when i cleaned up the gamepad stuff a bit
2025-07-24 16:16:04 +02:00
Alug d293bb9672 fix https://github.com/Indev450/SRB2Kart-Saturn/issues/190
doing it like this, so potentially wonky socked maps dont show up if its disabled
2025-07-24 16:15:57 +02:00
Alug 9fb3f4c9a3 fix https://github.com/Indev450/SRB2Kart-Saturn/issues/191
was an oversight when i cleaned up the gamepad stuff a bit
2025-07-24 15:38:05 +02:00
Alug 9a60441e54 few more things for hw renderer
just moving aaround some things and declaring more stuff as const
2025-07-23 17:07:38 +02:00
Alug a61b028e97 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-22 17:35:21 +02:00
Alug 29cf728fac enable ZDEBUG by default
this is just quite useful honestly
2025-07-22 17:33:23 +02:00
Alug 3c78c5c57d ok git very cool 2025-07-22 17:33:11 +02:00
Alug 7f3f332821 Remove aligned allocation functions 2025-07-22 17:33:07 +02:00
Alug 38576082fb move prints to ZDEBUG2
as it seems to be for this purpose
2025-07-22 17:31:44 +02:00
Alug 4a4b5661f2 move this stuff behind ZDEBUG 2025-07-22 17:31:22 +02:00
Alug 1e879dc432 let Z_CheckHeap print file and line of where it occured
like its supposed to lel
2025-07-22 14:18:00 +02:00
Alug e29bdd09c5 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-21 19:45:01 +02:00
Alug f3c8ff19b9 remove redundant R_SetColumnFunc call
this would only be needed if we had brightmap support, but like this it just sets the column function to what it already is
2025-07-21 19:11:01 +02:00
Alug fdd19632bf Use R_RenderSegLoop if the back sector has any 3D floor planes
fixes issues in northern district zone
2025-07-21 19:10:58 +02:00
Alug 74b082760d abuse c++ templates for Hwr_AddSprites
test this, but we can avoid a bunch of branching and functions calls like this when drawdist is inifite
2025-07-21 11:56:00 +02:00
Alug 4460fa608b merge fix 2025-07-21 11:55:39 +02:00
Alug 949192c570 branch hints for nights and 2d stuff
gotta keep em for compat reasons Zzz..
2025-07-21 11:49:49 +02:00
Alug 4fa0ca2304 move a bunch of stuff after early returns
+ add some branching instrincts to stuff

maybe saves a bit of time if we dont need the thing
2025-07-21 11:49:44 +02:00
Alug d9d2f043fa use branch instrincts for P_MobjThinker
based on observations from kart stuff
2025-07-21 11:49:00 +02:00
Alug 1ea51f29c5 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-21 11:48:35 +02:00
Alug b0653416f6 Merge branch 'Saturn-Next' into fixupnet 2025-07-20 17:03:30 +02:00
Alug efc4a513ce Merge branch 'Saturn-Next' into fixgnu23 2025-07-20 17:02:31 +02:00
Alug b13793b2a4 Merge branch 'Saturn-Next' into unnestmothink 2025-07-20 17:00:53 +02:00
Alug e102d218ff add toggle for quake screenshake effects
TODO: make an accessability option menu for certain effects
2025-07-19 22:54:37 +02:00
Alug 20cdec33fb fix https://github.com/Indev450/SRB2Kart-Saturn/issues/190
doing it like this, so potentially wonky socked maps dont show up if its disabled
2025-07-19 22:42:37 +02:00
indev 12d4a6d291 Also add scoll into level select for displaying map source filename 2025-07-18 23:19:19 +03:00
Alug d2b1ff595d remove itemamount check here
replicate vanilla
even if this becomes negative
this does not seem to crash, so id rather do whatever vanilla does
2025-07-18 17:57:45 +02:00
indev 03d79fba16 Add filename scrolling for addons menu 2025-07-18 14:48:45 +03:00
indev 989c29f7a0 Move scrollMusicName into m_misc as M_ScrollString 2025-07-18 14:21:05 +03:00
Alug 8a79c0a4e0 simplify free block in P_RemoveMobj
should be functionally the same
2025-07-18 11:01:58 +02:00
Alug 307c333c50 use branch instrincts for P_MobjThinker
based on observations from kart stuff
2025-07-18 11:01:28 +02:00
Alug 3ce8b9f09c oop move this back
this is some global, dont wanna mess things up
2025-07-18 10:57:15 +02:00
Alug 4dbe637510 remove pointless var P_TryCameraMove 2025-07-17 00:28:22 +02:00
Alug c0e97e7f43 store sector directly P_CheckPosition
hopefully this makes pointer access faster here
2025-07-17 00:28:19 +02:00
Alug 37fc64e97d optimization K_KartUpdatePosition
this checked the distance to every single waypoint on the map always and unconditionally, but we dont need the distance unconditionally so only check if we need to
+5fps in techbatics hadal classic timedemo
2025-07-17 00:06:59 +02:00
Alug ca93f08230 use branch instricts for blua
mostly just for error handling
similar to upstream lua and bluajit
hope this speeds this up a little
2025-07-16 23:01:16 +02:00
Alug 3581ce811c cache those things 2025-07-16 23:01:12 +02:00
Alug b4570cbdaa Merge branch 'mmenucleanup' into Saturn-Testing 2025-07-16 20:42:45 +02:00
Alug f2dc344bf8 copy paste oopsie 2025-07-15 19:55:13 +02:00
Alug c0654448f0 oop this was unsigned 2025-07-15 19:18:52 +02:00
Alug 2bf3912633 unmangle localskin menu mess a bit 2025-07-15 19:17:06 +02:00
Alug 4d71fb8409 few more things i missed 2025-07-15 18:59:28 +02:00
Alug 8543a099f4 split m_menu definitions to m_menudefs
idk if this is a good idea lel
2025-07-15 18:59:25 +02:00
Alug 9c6ec02b18 do some cleanup m_menu
gets rid of a bunch of duplicated splitscreen shit
unused srb2 stuff
commented out stuff aswell
we dont need any of this
this is def still far from tidy and itll never be like this
2025-07-15 18:59:22 +02:00
Alug bb9118ee32 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-15 18:57:23 +02:00
Alug 0411c40fae discord rpc my butt 2025-07-15 17:04:32 +02:00
Alug 68cb96ab97 💀 fix menu screentex toggle lel
thx neppy!
2025-07-15 15:30:34 +02:00
Alug 0159b8d0a3 use the tooltips array in the menu_t struct for tooltips
so this was always there lel
gets rid of massively duplicated tooltip calls and is generally cleaner
2025-07-15 15:03:00 +02:00
Alug aea3b49a51 💀 fix menu screentex toggle lel
thx neppy!
2025-07-15 14:00:57 +02:00
GenericHeroGuy 1a6f775cc3 bruh
Let's try that again, this time putting the camera in a local...
2025-07-15 14:00:53 +02:00
Alug ddd192fad0 declare all the kart "time" stuff as const
as far as i can see those never get overwritten and cant be overwritten
2025-07-15 14:00:49 +02:00
Alug 2e4fb32dac dont apply player camfade when exiting or in freecam mode
also renames it and moves the check outside
2025-07-15 14:00:46 +02:00
Alug 7d6e210625 use c++ template for HWR_DrawSprites
works just as well without code dupe
2025-07-13 23:11:52 +02:00
Alug 3ca42ce42f register chasecam with the other cam vars
why dupe a loop
2025-07-13 21:52:26 +02:00
Alug e4e40cf049 remove prob pointless check
viewplayer will be the currently viewed displayplayer lel
2025-07-13 21:52:23 +02:00
Alug d4f912e3b0 add toggable player close to camera fade
similar to some other kartracers
only takes other players into account
2025-07-13 21:52:20 +02:00
Alug eec4443c95 smol stuff i missed i_video 2025-07-13 16:31:59 +02:00
Alug b938c75892 clean up i_video.c a little
what a mess
this is still far from tidy
2025-07-13 16:17:32 +02:00
Alug 455cb9ca24 delet windoze users
apparently this makes cross compile commit sudoku, need to test this on actual windoze and see if this breaks anything since idk how this file even works
thx nep for the tip!
2025-07-12 14:56:34 +02:00
Alug 24e7f5f864 readd R_PointInSubsectorFast
use it for camera, viewpoint, some precip and sound stuff and (visual) banana slope calc
after profiling it a bit, this may be 2-4x faster in a bunch cases
2025-07-12 13:39:57 +02:00
Alug 298fa36c5d uninline R_IsPointInSubsector
this gets used like once or twice, we dont need that inlined
2025-07-12 13:35:12 +02:00
indev d31e9c5b55 Strip colors from server name when searching through server list 2025-07-11 23:15:19 +03:00
Alug 30f53f398f move CopyCaretColors to m_misc 2025-07-11 21:56:10 +02:00
indev eee217deec Add server search 2025-07-11 22:43:36 +03:00
Alug 1847aac223 fix windoze for the 50 trillionth time
when do we finally remove windows support?
those two things do absolutely fucking nothing but shit dies without em for whatever reason
2025-07-08 17:06:06 +01:00
Alug 487ef6f1b9 fix windoze for the 50 trillionth time
when do we finally remove windows support?
those two things do absolutely fucking nothing but shit dies without em for whatever reason
2025-07-08 17:05:44 +01:00
Alug 14be968089 fix for non pow2 width textures in software from doom-legacy 2025-07-08 16:52:56 +01:00
Alug 9f678263d0 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-07-08 16:52:32 +01:00
Alug a554b886c6 fix peeindex overflow
lelelele thx indev <3
2025-07-08 14:23:34 +02:00
Alug f2d68b075c texturewidthmask can be static 2025-07-08 13:48:18 +02:00
Alug dc24de3501 fix color translated spans lmao
oopsie
well atleast we got some extra safety with the spandata source lel
2025-07-08 13:48:14 +02:00
Alug d2c73f072e reuse "i" 2025-07-08 12:02:10 +02:00
GenericHeroGuy 96bc7f7aa6 Fix fake floors in Donut Plains disappearing when chasecam is off
Also remove the useless R_PointInSubsector calls
2025-07-08 12:01:49 +02:00
Alug bd48b24000 some micro optimize 2025-07-08 12:01:46 +02:00
indev a26867bbdb Add separate option to toggle parallel rendering in R_DrawMaskedList 2025-07-08 00:36:25 +03:00
indev 8d570b7ba3 Revert "Disable multithreading in R_DrawMaskedList"
This reverts commit 5a44afcd9f.
2025-07-08 00:10:08 +03:00
Alug 96f5a8adb3 fix for non pow2 width textures in software from doom-legacy 2025-07-07 21:47:48 +02:00
indev 3b34f0a972 Sort replays in replay hut 2025-07-06 15:48:18 +03:00
Alug fe5a0b7c64 GL_ 2025-07-05 15:51:30 +02:00
BlueStaggo 2aa5324225 Manual mipmapping + Texture padding 2025-07-05 15:51:27 +02:00
Alug 22f50402fe remove this 2025-07-05 15:51:15 +02:00
Gustaf Alhäll 4e2f1bcf2b Fix invalid formats being passed to interal texture formats
The effects that this had on the engine is unknown, but the reference
pages makes in very clear that the old behavior is wrong.
2025-07-05 15:50:48 +02:00
indev ca34b0c8d6 Add /mute chat command 2025-07-05 00:27:17 +03:00
indev 0df5ef996c (kinda) unify LookupPlayer and nametonum, rename first into D_LookupPlayer 2025-07-04 23:15:31 +03:00
Alug 4c0ea2695e remove smoothpos cvar and add it as setting for "postitionanimation" cvar 2025-07-04 12:32:49 +02:00
Alug 48556ca428 oop lmao 2025-07-04 12:23:34 +02:00
Alug cb0667921e oop lmao 2025-07-04 12:07:56 +02:00
Alug 52ab27a825 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-04 11:23:26 +02:00
NepDisk 5db50bbaff Port HEPII(I) position number scaling 2025-07-04 11:19:48 +02:00
Alug 416da7cdc8 use memset for S_ClearQueue
just simpler
2025-07-04 11:19:45 +02:00
Alug f47057e800 update credits
this is super full and we need to think about something better for this X)
2025-07-03 10:17:12 +02:00
Alug 090559a766 move this out of maptitle condition
it does not rely on it and may even fail
idk why i threw it in there
2025-07-03 00:34:19 +02:00
Alug 1a6a3de443 double fpscounter samples
slightly more readable
2025-07-03 00:32:15 +02:00
Alug 0293fbfe99 why are you still here wtf 2025-07-01 21:51:28 +02:00
Alug ecfb52eabe delet GETTEXT and translation stuff 2025-07-01 21:50:56 +02:00
Alug 999e1a525e use quickcamdist for render distance culling stuff
we do not need this to be accurate at all in these cases, so this is probably faster than doing le fixedhypot
2025-07-01 21:24:58 +02:00
Alug ef530c2f7d tiny optimizations hw_main again 2025-07-01 21:15:17 +02:00
indev 3e5d1a436c Add option for smallminimapplayers to only downscale non-displayplayers icons 2025-07-01 22:07:12 +03:00
Alug 38b89093fa Merge remote-tracking branch 'origin/emotes' into Saturn-Testing 2025-07-01 19:22:07 +02:00
Alug 224ce007e1 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-01 19:21:58 +02:00
Alug 962eb531ff clamp the sprite lightlevel stuff + ensure proper type cast
this is a mess
lets hope this doesent change how the game looks lel
2025-07-01 19:12:54 +02:00
Alug 07e1ca40a4 oop dont need those 2025-07-01 19:12:32 +02:00
Alug 0241d7fe00 Merge branch 'Saturn-Next' into Saturn-Testing 2025-07-01 15:27:39 +02:00
Alug 02ce2ff5ec Merge remote-tracking branch 'origin/emotes' into Saturn-Testing 2025-07-01 10:31:58 +02:00
Alug 667a8bb166 "restrict" macro for c++
since it does not have it, use __restrict instead
2025-06-30 12:18:32 +02:00
Alug 76a18d001f friendship with constexpr started 2025-06-30 12:11:45 +02:00
Alug 45b9aeb85a slightly cleanup addline stuff
no clue why i just didnt do this before lel
2025-06-30 08:17:41 +02:00
Alug d580306b8a fix hw_main compiler warning 2025-06-30 08:17:38 +02:00
Alug 3748896ebc thanks michaelsoft very cool 2025-06-29 10:20:33 +01:00
Alug 79988dea3d this makes no sense lol 2025-06-29 10:13:00 +01:00
Alug 4409a5848f Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-29 12:08:06 +02:00
Alug 07c13636fc ceepeepeefy hw_main, abuse templates for portal stuff
no idea if this is faster at all lmao
2025-06-29 11:49:36 +02:00
Alug 51cc706b1e Merge remote-tracking branch 'origin/emotes' into Saturn-Testing 2025-06-29 11:48:33 +02:00
Alug 54bd31c80a Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-29 11:48:18 +02:00
Alug 61534d7356 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-29 11:48:12 +02:00
Alug cccfaaabfd proper init enterprecise 2025-06-19 17:48:12 +02:00
Alug eadbe9c2e5 delet this 2025-06-19 17:47:57 +02:00
Alug 9bbabcee06 delet this 2025-06-19 17:47:42 +02:00
Alug 7ca6fa6772 turn translation colormaps stuff into an enum 2025-06-19 17:44:04 +02:00
Alug 6317e9c510 cleanup colormap translation stuff
needs testing
2025-06-19 17:43:56 +02:00
Alug 0a80985771 check if player is local here 2025-06-19 17:41:49 +02:00
Alug 548d52cc60 simplify R_SetupAimingFrame 2025-06-19 17:41:42 +02:00
Alug 11c6c69a00 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-19 17:41:33 +02:00
Alug 08025d2da3 ok git very cool 2025-06-19 17:41:12 +02:00
Gustaf Alhäll 4169e7bd71 Remove aligned allocation functions 2025-06-19 17:41:09 +02:00
Gustaf Alhäll bfb7a6b08d Fix potential NULL deference if memory runs out during cURL request 2025-06-19 17:41:06 +02:00
Alug 58abb0d4c3 Merge remote-tracking branch 'origin/softwarecrap' into Saturn-Testing 2025-06-19 17:40:42 +02:00
Alug 9658279cb1 Merge branch 'fixupnet' into Saturn-Testing 2025-06-19 17:40:34 +02:00
Alug 83bb908ff0 Merge remote-tracking branch 'origin/Saturn-Next' into unnestmothink 2025-06-19 15:56:32 +02:00
Alug 515c18c855 Merge remote-tracking branch 'origin/Saturn-Next' into fixgnu23 2025-06-19 15:55:58 +02:00
Alug d1a6394e52 Merge remote-tracking branch 'origin/Saturn-Next' into fixupnet 2025-06-19 15:55:22 +02:00
Alug 6f4e387061 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-12 21:47:29 +02:00
Alug 33ef566fd2 Merge remote-tracking branch 'origin/Saturn-Next' into Saturn-Testing 2025-06-12 21:47:26 +02:00
Alug eeecd954e2 Merge branch 'softwarecrap' into Saturn-Testing 2025-06-12 17:19:38 +02:00
Alug ccb804a4ed Merge branch 'fixupnet' into Saturn-Testing 2025-06-12 17:18:09 +02:00
Alug a21029ee9e Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-12 17:17:54 +02:00
Alug ccc90842a7 move CopyCaretColors to m_misc 2025-06-12 17:10:08 +02:00
Alug dc069d7bb5 unnest HandlePacketFromPlayer
+ some cleanup
2025-06-12 00:53:47 +02:00
Alug f4a827dfc2 fix conflicts 2025-06-12 00:02:55 +02:00
Alug 4f3232b6cc Merge branch 'Saturn-Next' into fixupnet 2025-06-12 00:02:05 +02:00
Alug 7393eb728c Merge branch 'Saturn-Next' into Saturn-Testing 2025-06-07 11:56:17 +02:00
Alug 1e715f8cd7 Merge branch 'newmakefiles' into Saturn-Testing 2025-06-07 11:56:13 +02:00
chromaticpipe d6b838f7cb GIF Dynamic Delay 2025-06-02 15:57:43 -05:00
Alug 7aadc77a69 Merge remote-tracking branch 'origin/luamusicdef' into Saturn-Testing 2025-05-31 19:39:39 +02:00
Alug 27e1406e6d Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-31 17:44:33 +02:00
Alug 796204d376 use memcmp during startup map check
prob not faster just looks a bit better tbh
2025-05-31 17:20:46 +02:00
Alug acabd1a03e Merge branch 'votebgstuff' into Saturn-Testing 2025-05-31 17:13:58 +02:00
Alug c08aae2622 Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-31 17:13:00 +02:00
Alug 3eba512ad4 Merge branch 'newmakefiles' into Saturn-Testing 2025-05-29 19:35:34 +02:00
Alug c99115d552 thanks windoze very cool part 2 2025-05-29 17:27:38 +01:00
Alug bf6c682cc1 thanks windoze very cool 2025-05-29 17:16:51 +01:00
Alug dc2f0b5707 Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-29 18:23:08 +02:00
Alug 58de672915 add comment 2025-05-29 15:31:32 +02:00
Alug 9488d98cfd Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-29 12:43:04 +01:00
Alug 906b8165d3 dont use stdbool´s bool type
this badly breaks everything
apparently the code assumes boolean to be an interger type or some shit
2025-05-29 12:41:56 +01:00
Alug 16b5037486 dont use stdbool´s bool type
this badly breaks everything
apparently the code assumes boolean to be an interger type or some shit
2025-05-29 12:41:45 +01:00
Alug 74c8325987 Merge branch 'updatewinlibs' into Saturn-Testing 2025-05-28 22:16:37 +02:00
Alug e30efbfe6c Revert "update lzf to 1.6"
This reverts commit 9899747a7f.
2025-05-28 22:16:30 +02:00
Alug 5d4bb0f5ce Merge branch 'Saturn-Next' into Saturn-Testing 2025-05-28 22:14:17 +02:00
Alug e63777c7d6 remove this
prob wrong assumption, our netcode sucks massive ass
2025-05-28 21:42:29 +02:00
Alug a34ca05bff this is testing lel 2025-05-28 20:45:26 +02:00
Alug bcec8b98f7 make the game c23 compatible properly
+ some cleanup and removal of some redundant checks
2025-05-28 18:25:07 +02:00
Alug af9ffc1f6f forgor the hw state lel 2025-05-28 16:37:37 +01:00
Alug 18816453f4 add wireframe mode for ogl 2025-05-28 18:31:21 +02:00
Alug 1eb8a75058 fix compiler warning bout playeringame 2025-05-28 18:30:26 +02:00
Alug 5abf42fe75 remove crappy memcpy redifine from md5 2025-05-28 18:29:18 +02:00
Alug 1306a233b8 Further improve sleep accuracy on UNIX systems
but not for dedis
https://git.srb2.org/STJr/SRB2/-/merge_requests/2583
2025-05-28 18:28:22 +02:00
Alug 46f8c6b7a5 remove forcing c17 from makefile 2025-05-28 18:26:47 +02:00
Alug face5cf447 Merge branch 'fixgnu23' into Saturn-Testing 2025-05-28 18:26:24 +02:00
Alug 603267b753 fix W_CheckNumForFolderStartPK3 2025-05-28 17:47:29 +02:00
Gustaf Alhäll 7cf3113d67 Fix long names using the wrong hash field 2025-05-28 17:47:25 +02:00
Alug 397fa962b1 Optimize lump searching
https://git.srb2.org/Hanicef/SRB2Classic/-/commit/dc608f084c76cf72de9fc3f3f347752f04acae42
2025-05-28 17:47:22 +02:00
Alug d2637ab71f Merge branch 'newmakefiles' into Saturn-Testing 2025-05-28 17:47:01 +02:00
Alug a6e020adeb Merge branch 'texloadstuff' into Saturn-Testing 2025-05-28 17:46:43 +02:00
Alug d50dcac0c0 Merge branch 'unnestmothink' into Saturn-Testing 2025-05-28 17:46:40 +02:00
Alug dd6bc23a8e Merge branch 'updatewinlibs' into Saturn-Testing 2025-05-28 17:46:35 +02:00
Alug 71575f5cf8 Revert "update sdl_mixer to 2.8.1"
This reverts commit b8ae656968.
2025-05-26 22:11:03 +01:00
Alug 3685502edf Revert "delet tic resending stuff"
This reverts commit 17bc8a4a36.
2025-05-26 18:10:03 +02:00
Alug 9899747a7f update lzf to 1.6 2025-05-26 18:02:21 +02:00
Alug d2a415380d oop we still need libgme.dll 2025-05-26 15:15:46 +01:00
Alug dd7ffd7dfe delet GETTEXT and translation stuff 2025-05-26 14:48:31 +01:00
Alug 770f9af5e1 cleanup some stuff 2025-05-26 14:31:53 +01:00
Alug c2ab5be8b8 Merge remote-tracking branch 'origin/winzlib-ng' into updatewinlibs 2025-05-26 13:21:03 +01:00
Alug b8ae656968 update sdl_mixer to 2.8.1
we can also get rid of a bunch of dlls now
2025-05-26 13:12:43 +01:00
Alug 553b61e1f5 update SDL2 to 2.32.6
also removes a bunch of files we dont need
2025-05-26 12:51:45 +01:00
Alug f87bcef079 try fixing some crash with bogus netxcmds 2025-05-23 16:55:47 +02:00
Alug c3458afe2b unglobalise holepunchpacket aswell 2025-05-23 16:53:42 +02:00
Alug 17bc8a4a36 delet tic resending stuff 2025-05-23 16:51:26 +02:00
Alug b04f017ab6 change ticqueue system to be more like srb 2.2
mostly just renaming lel
2025-05-23 16:51:10 +02:00
Alug 083ddb6396 Refactor netbuffer out of global namespace
https://git.do.srb2.org/Hanicef/SRB2Classic/-/commit/079fd2cef97a9cf22fb5d2b66a9b500914efbc72

+ move some things into functions
2025-05-23 16:48:34 +02:00
Alug c3129742c3 simplify cmpack 2025-05-23 16:44:52 +02:00
Alug 877bd640f3 fix destinationnode check in Processackpak 2025-05-23 16:43:52 +02:00
Alug 3233df9c6c do not resolve ipv4 in curl when using ipv6 2025-05-23 16:43:24 +02:00
Alug 9ad5f5189c split portnum retrieval into own function 2025-05-23 16:43:02 +02:00
Alug c7718dea79 fixup! i_tcp
technically make ipv6 work,, but its disabled by default
2025-05-23 16:40:38 +02:00
Alug fa3dcdb24f massive cleanup p_mobj 2025-05-23 16:31:17 +02:00
Alug 311258dda0 more unnesting for mobj think stuff 2025-05-23 16:24:50 +02:00
Alug a0f8816de7 readd itembox fuse think that was lost somehow lmao 2025-05-23 16:22:03 +02:00
Alug c546b6225c move this since it does check for fuse 2025-05-23 16:21:48 +02:00
Alug f6c6621af8 unnest and cleanup P_MobjThinker
everything was moved into seperate functions lel
2025-05-23 16:21:27 +02:00
Alug 5a0fb59b26 Do not reload every texture when adding a wad (squashed)
port of https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725#c829d21709a4f5cd81d140271e883bc40dd00b1b
2025-05-23 16:16:10 +02:00
Alug 07c52e6af5 static link this to get rid of stinky extra dll
thx indev <3
2025-03-20 14:45:35 +01:00
Alug 405c566038 import zlib-ng in compat mode 2025-03-20 14:31:02 +01:00
Alug 78780799ea delet zlib from windoze 2025-03-20 14:15:38 +01:00
Alug 82b9457aa7 Merge branch 'Saturn-Testing' into winzlib-ng 2025-03-20 13:37:06 +01:00
Alug 4e6abb39dd Merge remote-tracking branch 'origin/rankingsrefactor' into winzlib-ng 2025-03-20 13:34:51 +01:00
indev 14400097dd Only do lookup for mobjtype and states for drift stars and water trails at map load 2024-07-29 01:04:46 +03:00
indev c44c0e10c1 Lets not compile lua code multiple time each frame x) 2024-07-27 03:28:13 +03:00
indev bbf49db184 Oops 2024-07-25 21:24:29 +03:00
indev 15787a97bb Make water trail not use hardcode freeslots too 2024-07-25 21:17:48 +03:00
indev b76ce23ed2 Make drift stars not use hardcode freeslots 2024-07-25 19:02:39 +03:00
Alug d6c5066bfd let autoload run later to mitigate server join issues
itll now run at a similar place to postautoload
this may hopefully prevent some issuess with freeslotting lua
however sadly this makes menu replacements not work at startup anymore
2024-07-25 16:42:33 +02:00
Alug 60783d7109 fix fail condition 2024-07-23 22:02:54 +02:00
Alug db525f15da make backup of kartconfig before writing to it 2024-07-23 21:48:38 +02:00
Alug f33daf6bee toggle palrendering and fbo off if screen textures are disabled 2024-07-23 20:31:34 +02:00
Alug d13928b394 add cam check here 2024-07-23 20:06:01 +02:00
Alug 5613a0d173 reset tilt when respawning 2024-07-23 20:02:20 +02:00
Alug aa38586f82 simplify this 2024-07-23 19:01:44 +02:00
Alug d2b1ceb641 forgor this 2024-07-23 18:56:51 +02:00
Alug 9dd7e9a25f fix up bird screen tilting
removes old lerp variables that did nothing
properly interpolated viewroll
made it proper adjust to mobjscale
doesent roll view when spectating
general cleanup
2024-07-23 18:54:27 +02:00
Alug 1648273ddd allowjoin now sets saturnjoin to its value use CV_StealthSet to prevent
its only for scripts pretty much so no need to toggle it seperately
2024-07-23 17:45:00 +02:00
Alug 3f90e4f12a add "allowsaturnjoin" cvar to let toggle allowjoin for saturn clients seperately 2024-07-23 17:07:59 +02:00
Alug 2b9d565f0c e 2024-07-23 00:59:15 +02:00
Alug 70af63cc94 add to menu 2024-07-23 00:55:48 +02:00
Alug 64b92881f9 changuer how this works
counter decrements - 1 double the cooldown time
2024-07-22 23:36:13 +02:00
Alug be5ea069ad add gamestateresendattempts
so you can specify how often the game tries to resend gamestate to player in given time
so they dont get stuck in a synch loop
this is gamestateresendattempts value in the time of resynchcooldown *2
2024-07-22 23:09:04 +02:00
Alug 71e9357114 add check here too 2024-07-22 22:20:42 +02:00
Alug e28f86ac32 add "gamestatecooldown" cvar
to be able to change the cooldown between gamestate resends
2024-07-22 22:20:38 +02:00
Alug f97fe4bd65 Test: Restore save_p after P_LoadLevel
P_LoadLevel calls some functions that save gamedata and
unset save_p.

this is kinda hacky but i perhaps will port the redone save buffer sometime
2024-07-22 19:51:56 +02:00
Alug 3d0ac03f06 optimize MT_TUBEWAYPOINT
Store waypoints at map load instead of iterating through the thinker list to find them

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/938
2024-07-22 19:51:44 +02:00
Alug 094132b7d3 Make polyobjects agree with sector lighting/colormap like a FOF. 2024-07-22 19:03:14 +02:00
Alug 51b9c9ae5a prevent potential level load crash 2024-07-22 18:13:06 +02:00
Alug d31941ef13 don't check flippedness in HWR_RotateSpritePolyToAim if the mobj is actually a precipmobj! 2024-07-22 18:08:26 +02:00
Alug 48db826142 2 2024-07-22 12:58:28 +02:00
Alug 32b62d19ff add missing copyright stuff to k_director 2024-07-22 12:57:29 +02:00
Alug e4f2961129 lagless cam test 2024-07-21 23:28:29 +02:00
Alug eba09dfad2 Revert "Free mipmaps before freeing tags"
This reverts commit 2437c5a19a.
2024-07-21 23:25:32 +02:00
Alug d9b72fcae6 whitespace hell 2024-07-21 22:51:36 +02:00
Alug 6f17e7f735 revert this
doesent do anything but complicate stuff lol
2024-07-21 22:46:01 +02:00
Alug 047b82acc0 remove hw_light 2024-07-21 22:38:51 +02:00
Alug 5347039d75 cleanup hw_main 2024-07-21 22:23:21 +02:00
Alug edc8095577 cleanup r_things a little 2024-07-21 22:21:01 +02:00
Alug 06f69723c2 fix this oops 2024-07-21 20:22:10 +02:00
Alug 8218fd4f57 stop yelling clang 2024-07-21 20:07:39 +02:00
Alug 6ee22edac5 smol cleanup
also check for splitscreen and if not dont run a for loop lul
2024-07-21 20:07:23 +02:00
Alug 37215ef1f4 clean director up a little
toggling director now resets cooldown so it switches players immediately
also consolidated condition to be active
and ensure DirectorFollowAttack doesent always run when it doesent need to be
2024-07-21 19:35:17 +02:00
Alug a2eb2222b9 more reference fixes 2024-07-21 17:38:06 +02:00
Alug d63b4d9463 Revert "attempt at mitigating palette bug in ogl"
This reverts commit 3bd85c20bc.
2024-07-21 16:21:56 +02:00
Alug 3bd85c20bc attempt at mitigating palette bug in ogl 2024-07-21 16:10:23 +02:00
indev f70063c7d8 Add director hud indicator 2024-07-21 17:03:27 +03:00
Alug a2f7dd7408 fix cmake 2024-07-21 15:45:53 +02:00
indev 147014d43a Add bind for director toggle 2024-07-21 16:11:33 +03:00
Alug 9460d1e9a1 oops 2024-07-21 15:11:28 +02:00
Alug b3a9a6b59a add stuff for directordebugger i forgor 2024-07-21 15:11:01 +02:00
Alug 69f7d669c8 only update director if consoleplayers specs or in demo playback
dont need to update this ever if we dont even use it lol
2024-07-21 14:42:48 +02:00
Alug 74a68b1462 fix crash if everyone spectates 2024-07-21 14:42:17 +02:00
Alug 006ea90493 port director from RR 2024-07-21 14:20:54 +02:00
Alug aede063266 Merge remote-tracking branch 'origin/absolutehell' into lugstuff 2024-07-20 19:47:37 +02:00
Alug 5aaeff4c5d improve virtual resource management 2024-07-19 22:44:12 +02:00
Alug 5f80d6c18d fix hoop midjoin crash in the dumbest way possible
cant figure out why it crashes so thisll do lol
2024-07-19 22:42:50 +02:00
Alug 7c59c9e6ec fix ScreenCoords on 2 plyr splitscreen and shearing
+ remove non 16:10 hack since that issue was fixed elsewhere
2024-07-19 19:25:05 +02:00
Alug aae83b3235 disable hudoffsets in splitscreen 2024-07-19 18:52:53 +02:00
indev 520165128a Add option to play power items sfx for growmusic and supermusic 2024-07-19 18:17:23 +02:00
Alug 556ced63cf whoopss remove test stuff 2024-07-19 14:39:23 +02:00
Alug 063bf830ff make a packet to tell if a joined client is on saturn
initial stuff
works and seems to be vanilla compatible
needs its own function and other things to be useful
2024-07-19 14:38:38 +02:00
Alug 7fd3bd412c reenable gme music position setting 2024-07-19 12:13:20 +02:00
Alug 47b9508af2 lul 2024-07-19 01:22:36 +02:00
Alug 417c44aad0 lül 2024-07-19 01:20:18 +02:00
Alug 1fefa0a99a remove spriteclipshader crap 2024-07-18 15:23:27 +02:00
Alug 06db4d2b62 add audio buffer size into sound menu 2024-07-18 14:43:05 +02:00
Alug bf7fc12a8d revert this in teleport 2024-07-17 22:19:03 +02:00
Alug 395daf57fa Revert "clean up mapload code a little more"
This reverts commit 79a5d174a5.
2024-07-17 12:26:38 +02:00
indev 97219b7a84 Attempt to fix possible use-after-free for awayviewmobj 2024-07-17 11:56:22 +02:00
Alug 0d5d677eff Skip over empty entries when populating vres, saving memory 2024-07-17 11:56:19 +02:00
Alug 3bd6c99a3b vres_GetMap: Count resources in folders up until next 0-length lump
justs in case the order of stuff may be weird
fixes keepmapmusic crash on some maps
2024-07-17 11:56:17 +02:00
Alug 1d2d8d58db clean up mapload code a little more 2024-07-17 11:56:14 +02:00
indev 9909b002fe Fix linedef 415 executing random text if script lump doesn't have null terminator 2024-07-16 15:46:37 +02:00
Alug ccda1ef104 did not mean to add this lol 2024-07-16 10:43:47 +02:00
Alug 52a882bda2 remove this check 2024-07-15 21:58:07 +02:00
Alug 177c60e857 fix more warnings 2024-07-15 21:43:48 +02:00
Alug 0566b96738 fix some warnings in clang 2024-07-15 21:43:46 +02:00
Alug f72c179f56 fix A_ action protottypes 2024-07-15 21:43:44 +02:00
Alug 0da963c794 Revert "fix some clang warnings"
This reverts commit fea89de037.
2024-07-15 21:43:40 +02:00
Alug 7d885f7100 dont access delayremoved thinkers
uhhh
2024-07-15 14:34:33 +02:00
Alug c1c2f794e3 more mobj reference fixes + cleanup 2024-07-15 13:58:08 +02:00
Alug 8bb1c7a032 Revert "run this in actual fullscreen"
This reverts commit 4a2d6b2241.
2024-07-14 18:03:21 +02:00
Alug 804123afc1 ndef 2024-07-14 17:32:33 +02:00
Alug 8e4f278ce4 this does nothing lol 2024-07-14 17:15:31 +02:00
Alug 3193241b11 shut up 32bit gcc 2024-07-14 16:59:54 +02:00
indev edb44fa6a2 Refactor music name scrolling in music test 2024-07-14 16:59:46 +02:00
Alug 66e9ac3657 Free mipmaps before freeing tags
ŝhould hopefully fix some random Z_free crashes
2024-07-14 16:44:09 +02:00
Alug 87e0796bf4 inline M_Memcpy 2024-07-13 15:55:30 +02:00
Alug 6bc6db3665 also use IFCHANGED macro for levelinterpolators
just looks a bit neater
2024-07-13 15:12:43 +02:00
Alug 2a4aa51373 Revert "smol optimization to HWR_Addline"
This reverts commit e6359663b1.
2024-07-13 14:55:28 +02:00
Alug e15b052570 Revert "shut up gcc"
This reverts commit 17a5c6ed06.
2024-07-13 14:55:26 +02:00
Alug 629e249a12 Revert "dont do this with portals"
This reverts commit f949fa54af.
2024-07-13 14:55:21 +02:00
Alug 86a260bb89 fix NOHW compile 2024-07-13 14:54:55 +02:00
Alug 6ab2de2787 shut up windoze 2024-07-11 10:36:27 +02:00
Alug 8effdc1615 Clean up graphic menus
- Renamed Experimental Options to Advanced Options
- Fixed the tooltips not displaying
- Made it look good again
2024-07-10 19:26:40 +02:00
Alug 561fc2d01a only interpolate pitch and roll when using 3d models
sprites dont need this for now
2024-07-10 18:43:20 +02:00
Alug 3fd9cf573b dont think precip mobj angle ever changes 2024-07-10 18:42:42 +02:00
Alug d7c0bed4eb remove those 2 from experimental video menu
no reason to ever toggle them off
2024-07-10 18:35:04 +02:00
Alug afd1f595e1 remove cv_grfofcut
same story
2024-07-10 18:34:45 +02:00
Alug f47a43df2f remove cv_slopepegfix
same as the other ones
2024-07-10 18:34:13 +02:00
Alug 4385327101 remove cv_fofzfightfix
more bloat
2024-07-10 18:33:25 +02:00
Alug 4e73c05ef9 remove R_Pointtoangle toggle
its bloat, the difference is negigble at best
2024-07-10 18:32:57 +02:00
Alug c01ef035a5 remove cv_mobjssector
idk why it even checks for pointinsubsector
2024-07-10 18:31:46 +02:00
Alug b59c080943 fix IFCHANGED macro 2024-07-10 18:31:39 +02:00
Alug 814c65b290 dont do this with portals 2024-07-10 09:21:58 +02:00
Alug 9f1c1c3f18 dont need to check this in precip 2024-07-10 08:49:19 +02:00
Alug e0df7dfba5 shut up gcc 2024-07-10 07:12:58 +02:00
Alug 220db7212f inline some crap 2024-07-10 07:11:38 +02:00
Alug d59f45a26a smol optimization to HWR_Addline 2024-07-10 06:55:47 +02:00
Alug f88d92ecee change when dynamic slopes run depending on if you joined midgame 2024-07-10 06:21:48 +02:00
Alug c28188b6d8 smol cleanup 2024-07-10 05:50:01 +02:00
Alug 80419748db forgor this 2024-07-10 05:45:06 +02:00
Alug 874e6cd5af fix conflict 2024-07-10 05:26:27 +02:00
Alug cd500fc344 clean up P_SetupLevel a little more 2024-07-10 05:25:31 +02:00
Alug ae7afc5749 Map data lump interface
cleans up code alot and stuff

https://git.do.srb2.org/STJr/SRB2/-/merge_requests/535
2024-07-10 05:25:22 +02:00
indev b0fa94c781 Call ServerJoin hook when consoleplayer becomes available, since it is needed for configs (which what this hook is created for) 2024-07-10 05:23:53 +02:00
indev 9bf717fae9 Add info about ServerJoin into LUASTUFF.md (so i don't forget to do it later) 2024-07-10 05:23:47 +02:00
indev 859c1020e6 Add ServerJoin lua hook, which gets called when client joins a server (listen server hosts joining their server also count) 2024-07-10 05:23:22 +02:00
Alug 9108d64820 mitigate dynamic slope desynchs
Perform dynamic slope thinking before other thinkers.
2024-07-10 05:22:38 +02:00
Alug e9d3c1a421 Fix mobj reference management of player->mo
https://git.do.srb2.org/KartKrew/RingRacers/-/commit/d0719ef5ba86a1da32fed171d74eb76c7254f4f6
2024-07-10 05:21:45 +02:00
Alug f36e069f40 unhack this again 2024-07-09 09:06:11 +02:00
Alug 1f5c7b1d12 more changes to dither
use interger for distance scales
start z factor earlier
rename halfResolution to endResolution
2024-07-09 08:39:38 +02:00
Alug 94ecb9e634 ass 2024-07-08 20:49:05 +02:00
Alug b9db67bc08 more tweaks 2024-07-08 20:42:38 +02:00
Alug c152799295 oops that actually didnt fade out at all lol 2024-07-08 20:42:35 +02:00
Alug f91165857d scale and fade out dither pattern
makes the image a bit cleaner and easier to look at in palrender
2024-07-08 20:42:29 +02:00
Alug 29b93f02f1 crap 2024-07-08 20:42:02 +02:00
Alug f9a6452528 simplify this a little 2024-07-08 20:41:27 +02:00
Alug e7e51957e9 oops this should be min 2024-07-08 20:41:17 +02:00
Alug f8903e7ce7 clean up some net stuff 2024-07-08 20:41:10 +02:00
Alug d3548a4dfb Always use system-specific path seperator
https://git.srb2.org/KartKrew/RingRacers/-/commit/0f16c61d04f42b463db5c8987571fc986ae6ce9f
2024-07-08 20:40:51 +02:00
Alug eca72c6dc6 dont think kart even supports trivial maps
so no need to constantly check for this
2024-07-08 20:40:43 +02:00
NepDisk 6e378f4de6 Leave me alonmg kate 2024-07-03 13:04:45 +02:00
Alug 94ac52d792 Clamp lindex during vissprite light calculation
Mitigates against negative or very large xscale values causing lindex
to evaluate < 0, preventing a potential colormap indexing-related crash.
2024-07-03 13:04:11 +02:00
NepDisk 1f276a7eb6 Fix automap multiplayer crash
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2488
2024-07-03 13:03:12 +02:00
Alug a28a590078 prevent potential crash when trying to kill bananachain 2024-07-03 13:02:53 +02:00
Alug 91d052d25e shut up gcc 2024-07-03 13:02:32 +02:00
Alug 2f6ded132d Zzz... 2024-07-03 13:02:29 +02:00
Alug 51cdc1ce90 forgor 2024-07-03 13:02:26 +02:00
Alug 494fe0b1e7 revert software screen shit 2024-07-03 13:02:20 +02:00
Alug eac5310f5e some crap from asan 2024-07-03 13:02:16 +02:00
Alug 7f4a2f9943 fix some clang warnings 2024-07-03 13:02:11 +02:00
Alug 28a31301d4 forgor this crap 2024-07-03 13:01:49 +02:00
Alug 1c5e575718 remove all the ogl fix toggless 2024-07-03 13:01:44 +02:00
Alug 4a2d6b2241 run this in actual fullscreen
somehow makes xwayland happy
2024-07-03 13:01:11 +02:00
Alug 001baec444 scale dithering a little diff for a little smoother "fade" in pal render 2024-07-03 13:01:06 +02:00
Alug 1b35d4f03b stuff 2024-07-03 13:00:57 +02:00
Alug 75fc8cb766 change dither matrix to 4x4
a little grittier also smol cleanup
2024-07-03 13:00:43 +02:00
indev 28bef8c54f Use a fake 2d array in dither shader so it compiles with older glsl versions (1.20 at least) 2024-07-03 13:00:36 +02:00
indev 787973a3d5 If shader compilation failed, print info log 2024-07-03 13:00:31 +02:00
Alug f0e3ca7c1f add gr_lightdithering to shader
mhhm dithering
2024-07-03 13:00:26 +02:00
Alug 1b837a81ef improve teleport interpolation stuff 2024-07-03 13:00:07 +02:00
Alug b74dd85ef2 small optimization to batching 2024-07-03 13:00:01 +02:00
Alug fc9cc62b12 remove this crap
this doesent work on nix anyways
2024-07-03 12:59:54 +02:00
Alug e665edb652 no need for this 2024-07-03 12:59:30 +02:00
Alug e81cde8753 smoller opitmizations 2024-07-03 12:58:40 +02:00
Alug 4e995436c5 optimize ogl polyobjs slightly 2024-07-03 12:58:13 +02:00
Alug c57154a8e5 prevent crash in hw bsp 2024-07-03 12:58:07 +02:00
Alug 31fbba057a remove this again 2024-07-03 12:57:44 +02:00
Alug 46fa6e7ba4 change the shader z shit again 2024-07-03 12:57:17 +02:00
NepDisk bbb0379813 Allow Users to Connect to Servers While In-Game
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2401/
2024-07-03 12:57:09 +02:00
NepDisk 156b63440e Linux customshader compilation fix
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2418/
2024-07-03 12:56:41 +02:00
Alug 20e062b031 move HWR_LoadLevel to hw_main 2024-07-03 12:56:22 +02:00
Alug c98ebc9f35 Try fix glib preallocating too much space for sound freeslots
idk why git keeps removing credits
but thx indev <3
2024-07-03 12:55:57 +02:00
Alug c6001c7bf6 this should be called on mapload 2024-07-03 12:55:42 +02:00
Alug 2d0945264f oops 2 2024-06-20 21:16:47 +02:00
Alug 3d0981cf7b oops 2024-06-20 21:13:50 +02:00
Alug cce581fa51 these appear to be unused so comment them out
dont need 6 arrays being allocated with MAXSKINS for nothing lul
2024-06-20 16:22:13 +02:00
Alug 2446b804c7 forgor this 2024-06-20 03:00:48 +02:00
Alug 20cdb1c5ec limit localskins to 32
hope this doesent just die lol
2024-06-20 02:42:49 +02:00
Alug 212b184320 Do not access memory on misaligned addresses
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2438
2024-06-17 17:11:20 +02:00
Alug 37e98f342c Revert "fix some interpolation issues"
This reverts commit ccb1aecd01d376b0c0d73bbe4c898e89e35e25d0.
2024-06-17 12:51:42 +02:00
Alug 578f5b85dd Revert "more interp fixes"
This reverts commit 3a1a58bcfc.
2024-06-17 12:51:29 +02:00
Alug 99b1e3f969 Revert "attempt at speeding up sdl_render stuff"
This reverts commit f91d3ccf24.
2024-06-17 12:51:20 +02:00
Alug 8c9ef0e8f3 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-06-16 22:41:45 +02:00
Alug f91d3ccf24 attempt at speeding up sdl_render stuff 2024-06-16 22:41:32 +02:00
Alug 691063983e Revert "Test: kill unused skin sounds freeslotting"
This reverts commit b9b97d0a56.
2024-06-16 21:05:40 +02:00
Alug b912047f68 35/2 != 17 = 17.5 ? 2024-06-16 16:17:24 +02:00
Alug f2ddbf1e68 a 2024-06-15 21:16:25 +02:00
Alug 5cd36e55ab Maybe hopefully fix ogl masterserver crash thing
port from durr
2024-06-14 04:01:30 +02:00
Alug 1cb590ebb8 this does not exist 2024-06-14 03:00:40 +02:00
Alug 280e937844 add missing HAVE_THREADS 2024-06-13 14:47:20 +02:00
Alug 5afb55547d opengles 2 seems to be fastest for me lul 2024-06-12 22:31:47 +02:00
Alug e3c91629db use sdl ogl render instead of software for software mode on nix
oops
2024-06-12 22:31:29 +02:00
Alug 1b0496b1e7 fix some clang warnings 2024-06-12 21:56:27 +02:00
Alug b7369b40cb fix oopsie on titled software wöter 2024-06-12 21:49:20 +02:00
Alug 6567313de6 add back le returns 2024-06-12 20:51:34 +02:00
Alug 5ecf3cc36c lower min audio buffersize to 256 2024-06-12 12:59:23 +02:00
Alug 71e3d89181 move that again 2024-06-11 19:47:51 +02:00
Alug a284ece8e4 e 2024-06-11 12:59:00 +02:00
Alug e73e75e740 dumbass hack 2024-06-11 12:58:25 +02:00
Alug 9bfd61fabc shut up compiler 2024-06-11 12:58:17 +02:00
Alug a2aeaa51e8 change this to int64 cause it fixes the intermission thing on high res
idk why that fixes it tbh but it does
2024-06-11 10:02:23 +02:00
Alug b558c3db98 more interp fixes 2024-06-11 01:35:22 +02:00
Alug 0f70bcbf28 basic frame skipping system 2024-06-11 01:16:35 +02:00
Alug f7c4600007 remove windows timing crap again
it actually made stuff a little wonky so revert that
2024-06-11 01:15:32 +02:00
Alug 8910f073e5 fix encore flipcam with ogl shearing 2024-06-09 22:02:46 +02:00
Alug ea18be1866 more lööp stuff 2024-06-09 18:49:41 +02:00
Alug 0bd687eb15 reset those here ig 2024-06-09 18:49:33 +02:00
Alug 25b74bf3dd e 2024-06-09 18:14:22 +02:00
Alug e4f9ca3f3c add mobj check here 2024-06-09 18:13:17 +02:00
Alug 38a3f403bd add check earlier in p_killmobj 2024-06-09 18:03:58 +02:00
Alug 51dd2030a0 maybe fix the sock_send crash on windoze
often happens with unstable net
2024-06-08 19:24:16 +02:00
Alug 7e31067e6a fix redifinition warning 2024-06-06 18:57:04 +02:00
Alug 9bf06ff30b disable upx on nix by default 2024-06-06 18:53:40 +02:00
Alug 85aa726bb7 fix masterserver ifdef 2024-06-06 18:47:06 +02:00
Alug 3a67ff3afa fix HAVE_CURL 2024-06-06 18:42:32 +02:00
Alug 0a022a4348 Revert "instant update after screen mode change"
This reverts commit 02bd819f7e.
2024-06-05 14:42:30 +02:00
Alug ad24beea5b more minor loop stuff 2024-06-05 14:42:23 +02:00
Alug 9026ae7a16 minor sprite opitmizations 2024-06-05 02:27:18 +02:00
Alug 2fee9b861f high dpi test 2024-06-05 01:40:57 +02:00
Alug b7e2bcf02e lol 2024-06-05 01:40:39 +02:00
Alug d548848b18 Reapply "use shader to prevent sprite floor clipping"
This reverts commit 5ec1ca46e5.
2024-06-05 01:28:09 +02:00
Alug 4c628ea74f Revert "zzz..."
This reverts commit e19db23bb5.
2024-06-05 01:28:06 +02:00
Alug d3ef97f637 test remove all the networking crap from rendering code 2024-06-04 17:11:30 +02:00
Alug 02bd819f7e instant update after screen mode change 2024-06-04 17:11:12 +02:00
Alug ea3b4ddeb0 smol optimization to skin loading 2024-06-04 17:10:24 +02:00
Alug ab3ea7475f think this should be casted to angle_t 2024-06-04 17:08:09 +02:00
Alug b9b97d0a56 Test: kill unused skin sounds freeslotting 2024-06-03 18:47:59 +02:00
Alug e19db23bb5 zzz... 2024-06-03 17:15:16 +02:00
Alug 5ec1ca46e5 Revert "use shader to prevent sprite floor clipping"
This reverts commit ee2ec01eb9.
2024-06-03 17:11:58 +02:00
Alug c2c918fdda Revert "fix le dispoffset"
This reverts commit f977af6a80.
2024-06-03 17:11:55 +02:00
Alug 4627989401 Make sfxinfo_t and state_t use field tables too 2024-06-03 17:02:27 +02:00
indev 9552e09471 Lua_optoption shouldn't change stack state at the end of call now 2024-06-03 17:02:14 +02:00
indev c8fb25066b Fix compilation for some gcc versions 2024-06-03 17:02:10 +02:00
Alug b1cb6d42f4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-06-03 17:01:22 +02:00
Alug caf7e4a1cf stuffs 2024-06-01 17:03:27 +02:00
Alug 6a5c0223c4 forgor to remove that 2024-06-01 16:31:49 +02:00
Alug 9ff2d66079 fix papersprites in software (hopefully)
lul
2024-06-01 16:29:20 +02:00
Alug 2db2b9309d flexible array stuff for columnofs
hopefully this fixes some crashes or smth
2024-05-31 23:04:26 +02:00
Alug 7a38c15d59 cleanup some super old stuff that did nothing
lul
2024-05-31 22:43:49 +02:00
Alug cb7375f873 theres no value 3 oops
i shouldnt do stuff after waking up at 4 in the morning lol
2024-05-30 19:59:01 +02:00
Alug 41e52f9e88 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-05-30 19:10:03 +02:00
Alug ce7e30a752 smth smth encore magic numbers idk 2024-05-28 22:38:20 +02:00
Alug 3214811fcb casting stuff 2024-05-28 22:22:58 +02:00
Alug edda2a5399 that should be there lul 2024-05-28 22:22:48 +02:00
Alug 926bc8e72c split sprite draw loops
so crap doesent constantly check for papersprites on all sprites
2024-05-28 20:55:03 +02:00
Alug eadffb6be3 make r_fps if else hell a bit more bearable to look at
lol lmao
2024-05-28 20:28:27 +02:00
Alug cf04e8c23c scale precip size with mobjscale 2024-05-28 20:07:12 +02:00
Alug ec5840f840 scale sprite draw distance with mapobjscale 2024-05-28 20:02:54 +02:00
Alug 7dc4a7177d shut up gcc 2024-05-28 01:07:13 +02:00
Alug 3d91de8178 when not using screentextures draw kart bg on intermission screen 2024-05-28 00:52:40 +02:00
Alug 6ea1abfedc draw a black screen instead of "nothing" during wipes on disabled screentextures
should resolve the intense flashing that can occur
2024-05-28 00:52:09 +02:00
Alug 5251482dd7 Optimize field lookups in Lua metatables
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2024#cd5b5ee262bf5129c4d400ad60d006e1fa917c1f
2024-05-27 18:14:59 +02:00
Alug dd73787c8b Revert "optimize precip thinker"
This reverts commit bc382366a1.
2024-05-25 19:54:20 +02:00
Alug 340450a67e Revert "lol"
This reverts commit 0d40989f4c.
2024-05-25 19:54:13 +02:00
Alug 0d40989f4c lol 2024-05-25 19:00:07 +02:00
Alug c640096d9c Merge remote-tracking branch 'ghghghghghg/lua-hudinterpolate-redux' into lugstuff 2024-05-25 17:23:49 +02:00
indev 76081869e3 Store hooks in a table with integer keys instead of registry with string keys 2024-05-25 15:45:20 +02:00
Alug 9156c1b850 use ternary 2024-05-25 15:44:33 +02:00
Alug d78718d8f4 make only player dust be sparkle otherwise normal driftdust 2024-05-25 15:40:22 +02:00
Alug eef1e986a6 add proper check to sparkle lol 2024-05-25 15:28:41 +02:00
Alug 8fa99c34be Revert "ok kill this again ig"
This reverts commit 98c27fe8ef.
2024-05-25 15:07:07 +02:00
Alug a35fbdd1b5 move some cvars to be registerrerd latur in ogl 2024-05-25 14:50:24 +02:00
Alug 0efef78684 Turn of FBO downsampling when you turn off screen textures
fbo downsampling needs those and if theyre disabled youre essentially seeing nothing at all lol
2024-05-25 14:43:52 +02:00
Alug 62ce17cb4c super smol optimization to R_DrawRepeatMaskedColumn
only maths once not twice lul
2024-05-25 14:37:30 +02:00
Alug 6112be232a revert solidcol stuffs i did ages ago apparently lol 2024-05-25 12:57:41 +02:00
Alug c1a9c58eb5 Cull BSP behind a raised floor or lowered ceiling that covers the entire screen
https://git.do.srb2.org/KartKrew/RingRacers/-/commit/7b8a564f69688515319ccd425f2b88ffe8b7b120
2024-05-25 02:02:06 +02:00
Alug 0393588fe8 Only call the Lua API for overridden actions 2024-05-25 01:35:44 +02:00
Alug b7ff0325ea optimize sight checks 2024-05-25 00:08:14 +02:00
Alug c4d39eae25 declare outside of lööp also add const in r_ 2024-05-25 00:01:58 +02:00
Alug 0e88981425 Cache water trail mobjs from qtpie dev
cant really cherry pick so uuuh
2024-05-23 22:23:39 +02:00
Alug ed7fcae33b Merge remote-tracking branch 'ghghghghghg/lua-hudinterpolate-redux' into lugstuff 2024-05-23 20:29:22 +02:00
Alug 8b967fb3b7 change wöter visual thing 2024-05-23 20:16:37 +02:00
Alug 4d68a5dc2b change names to be less basic 2024-05-23 19:25:04 +02:00
Alug ecd6ef40ef allow gamepad dpad to hold scroll shit in menu aaa
absolute arsepain cant wait to see this breaking kek
2024-05-23 19:11:11 +02:00
Alug 0c9dc33ff0 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-05-21 21:15:21 +02:00
Alug 98c27fe8ef ok kill this again ig 2024-05-20 22:46:29 +02:00
Alug 3d490f52b2 a 2024-05-20 22:18:17 +02:00
Alug c78c17d953 funny driftsparkle 2024-05-20 22:18:15 +02:00
Alug ee5d667a24 changes to woter thing 2024-05-20 19:23:46 +02:00
Alug b9653b4ff8 unhack the animated votescreen a little
also make it pause when the game is paused like it was intended originally
2024-05-20 17:18:06 +02:00
Alug 78bcfa8cfa conflict moment 2024-05-20 13:40:47 +02:00
Alug 1f1130efda Merge remote-tracking branch 'origin/Saturn' into lugstuff 2024-05-20 13:39:00 +02:00
Alug 3d7b05d633 forgor this crap 2024-05-15 16:54:41 +02:00
Alug 343bbd8a1a support gcc14 ig 2024-05-13 20:48:32 +02:00
Alug f702df48f5 kept forger to declare this 2024-05-13 20:48:21 +02:00
Alug bc382366a1 optimize precip thinker 2024-05-06 01:18:57 +02:00
Alug c158144b7b Revert "refactor weather stuff"
This reverts commit dc95b2e8d7.
2024-05-06 00:33:38 +02:00
Alug d4337fbc56 Revert "optimize-precip-thinker"
This reverts commit e822d8e7d1.
2024-05-06 00:33:36 +02:00
Alug e822d8e7d1 optimize-precip-thinker 2024-05-06 00:32:57 +02:00
Alug dc95b2e8d7 refactor weather stuff
not netsafe
2024-05-06 00:05:16 +02:00
Alug d226ad38ff Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-05-05 22:02:07 +02:00
Alug 2a160c5247 goddamn synched sound effect aaa 2024-05-05 13:00:14 +02:00
Alug 641a9dc4e2 Revert "follower crap cause i want smol spb"
This reverts commit 1b963c9439.
2024-05-04 01:58:58 +01:00
Alug 7e71af8d25 durr water stuff uhhhhhhh
hope this wont break lmao
2024-04-29 10:12:33 +02:00
Alug 8e33d2e1b2 simplify SOFTLIGHT alot
also should make sure it gets applied everywhere lul
2024-04-29 09:12:44 +02:00
Alug 61118b348c Merge remote-tracking branch 'ghg/lua-hudinterpolate-redux' into lugstuff 2024-04-25 18:41:10 +02:00
Alug 84faff82a2 fix rare precip crash 2024-04-25 17:08:02 +02:00
Alug d6cf7cc06f funny wöter from durr 2024-04-25 16:12:53 +02:00
Alug 0688b94729 update libbacktrace windows lib 2024-04-24 21:26:50 +02:00
Alug 695f53194d inline those 2024-04-24 10:59:09 +02:00
Alug 1b963c9439 follower crap cause i want smol spb
will softcode crap sometime idk
2024-04-23 12:47:18 +02:00
Alug b50d6dd389 Merge remote-tracking branch 'origin/it-cv-bigfloat' into lugstuff 2024-04-22 05:26:51 +02:00
Alug 2afad9490e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-22 05:26:36 +02:00
Alug 812a275add fix some visual issues with fofs 2024-04-22 05:24:49 +02:00
Alug 90ccf7699b a 2024-04-20 22:52:22 +02:00
Alug 31ed12d88a some stuff from ceepeepeecheck 2024-04-20 22:36:23 +02:00
Alug 5a4e44d064 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-20 12:34:03 +02:00
Alug 515c67fa3a disable palette rendering if screentextures aint enabled 2024-04-19 06:21:58 +02:00
Alug 81d60165a3 z 2024-04-19 05:08:47 +02:00
Alug cc0fac3546 more things
-Fix a division by zero in BCZ2 Metal Sonic's routine
-Fix a bug where adding the same mod multiple times counted towards the mod limit
and other thigns
2024-04-19 04:49:12 +02:00
Alug d71ad13fcf some smol fixes 2024-04-19 04:22:29 +02:00
Alug 0d13811305 Make FixedRem less laggy by just using the modulo operator. 2024-04-19 03:52:21 +02:00
Alug b69cc4e34a Revert "port thinkerlists + cache and reuse mobjs for the 420th time"
This reverts commit bd8a392882.
2024-04-19 03:38:59 +02:00
Alug caf8f383ad Revert "change a few things"
This reverts commit c5c61f7692.
2024-04-19 03:38:55 +02:00
Alug 7db160a8e2 Revert "i dont understand this crap so ill revert it"
This reverts commit 7e895f82b2.
2024-04-19 03:38:52 +02:00
Alug 202a3d1fb1 Revert "some cleanup"
This reverts commit 332135fc6f.
2024-04-19 03:38:49 +02:00
Alug 332135fc6f some cleanup 2024-04-18 23:10:35 +02:00
Alug 7e895f82b2 i dont understand this crap so ill revert it 2024-04-18 14:14:51 +02:00
Alug c5c61f7692 change a few things 2024-04-18 13:40:27 +02:00
Alug bd8a392882 port thinkerlists + cache and reuse mobjs for the 420th time
i am in pain
2024-04-18 12:07:57 +02:00
Alug 36183e6dc8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-17 05:34:51 +02:00
Alug 5ae4af54da smth smth paranthesis 2024-04-12 21:55:45 +02:00
Alug 620bdd1419 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-04-12 20:41:16 +02:00
Alug c18eacbb81 fix software crash
Zzz...
2024-04-12 20:41:10 +02:00
Alug bb8acc5f51 fkldjnasofjosdfoisfj 2024-04-11 19:48:42 +02:00
Alug d41f4810d7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-11 18:39:58 +02:00
indev 387c4edb3b Fix potential negative array index in V_ThinStringWidth 2024-04-11 18:00:01 +02:00
Alug c3fd7c1a7a grrrr 2024-04-10 18:21:11 +02:00
Alug 94f1ec18de Revert "fix ifdefs"
This reverts commit 5e8e2f4b3a.
2024-04-10 18:19:24 +02:00
Alug e00f8f6cee Revert "Zzz..."
This reverts commit 79b0a9c833.
2024-04-10 18:19:21 +02:00
Alug 79b0a9c833 Zzz... 2024-04-10 18:15:42 +02:00
Alug 5e8e2f4b3a fix ifdefs 2024-04-10 17:59:41 +02:00
Alug f0158dd915 move this to first init too 2024-04-10 17:58:06 +02:00
Alug 10cf251b46 that wasnt the onchange im sleepy 2024-04-10 17:40:35 +02:00
Alug 72231e5658 forgor to remove those Zzz... 2024-04-10 17:32:06 +02:00
Alug c510ff3b1c should throw that into onchange oops 2024-04-10 17:29:08 +02:00
Alug 936e138fee throw stuff into own function, also check on game start 2024-04-10 17:24:03 +02:00
Alug 8325696b55 put those in 1st init 2024-04-10 07:05:38 +02:00
Alug d63f517ae5 simplify this crap 2024-04-10 07:02:03 +02:00
Alug e74df8db90 raise max fpscap 2024-04-10 06:47:45 +02:00
Alug 1a0bf67452 Merge remote-tracking branch 'origin/fborender' into lugstuff 2024-04-09 17:38:44 +02:00
Alug f0df9b399b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-05 17:40:19 +02:00
Alug f9345308ff Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-05 01:45:11 +02:00
Alug 6ed7c75448 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-04 03:57:32 +02:00
Alug cb71167fb7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 16:40:37 +02:00
Alug d4292987cc Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 16:14:35 +02:00
Alug 5da24a18dc Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 15:54:06 +02:00
Alug 1cf7b3e697 tf 2024-04-02 03:51:36 +02:00
Alug 3f3672497b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-02 03:49:01 +02:00
Alug 7714304c7a Merge remote-tracking branch 'origin/Saturn' into lugstuff 2024-04-01 19:15:13 +02:00
Alug ff640639b2 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-04-01 03:52:55 +02:00
Alug 0965603c8f Merge remote-tracking branch 'origin/interpjitter' into lugstuff 2024-04-01 03:52:52 +02:00
Alug b8412cec96 Fix minor off-by-one error in faketic calculation 2024-03-31 23:22:26 +02:00
Alug 86b7e192b2 fix this for splitscreen and move to own function 2024-03-30 03:34:38 +01:00
Alug 32b9e6094b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-28 15:07:00 +01:00
Alug 3ff7f3158b why tf is that here 2024-03-28 14:58:44 +01:00
Alug bd83ba8ca9 when the GLENCORE 2024-03-28 13:21:58 +01:00
Alug 785881c90e fixeur compile for qt 2024-03-28 12:23:07 +01:00
Alug 567ccf8a59 use this instead 2024-03-28 08:13:16 +01:00
Alug 11423a6d78 fix highresscale issue on startup in the worst way ever cause CV_NOINIT doesent work for whatever reason 2024-03-28 00:15:44 +01:00
Alug ab6b716e78 Read only header bytes when creating textures list 2024-03-27 21:31:45 +01:00
Alug 7b1be2e34f Ehh this thing is enough tbh 2024-03-27 20:32:14 +01:00
Alug 19d0d247b4 right v6 lul 2024-03-27 18:26:20 +01:00
Alug 1074a9e1d2 Prevent dropped ticcmds due to interp timing jutter
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2046
2024-03-27 18:17:27 +01:00
Alug 0648f384bb kill some stuff that did nothing 2024-03-27 18:13:39 +01:00
Alug 58d72204cc offline play menu pauses game so gib cool vhs effect 2024-03-27 15:51:47 +01:00
Alug 067b4c260f handle async vsync fail better
a
2024-03-27 14:44:02 +01:00
Alug 9e7e4d5fe7 testing smth
yes -1 is valid for this sometimes
2024-03-27 12:11:45 +01:00
Alug 7d9609be76 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-27 04:35:47 +01:00
Alug 7e510f8bc5 Merge remote-tracking branch 'origin/texload' into lugstuff 2024-03-26 20:42:39 +01:00
Alug a16e009370 make custom buttons bindable to joyaxis
triggers and such
2024-03-25 21:13:47 +01:00
Alug a021c497b6 forgor to remove this 2024-03-25 17:22:21 +01:00
Alug e77159cb58 remove this too 2024-03-24 20:18:31 +01:00
Alug 36ac353f1f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 20:16:27 +01:00
Alug 58122bf023 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 18:30:21 +01:00
Alug c5da23bb02 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 16:56:14 +01:00
indev fd45391616 Fix drift sound keep playing when player go off ground 2024-03-24 15:12:02 +01:00
Alug 11dd80e4e7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-24 15:11:53 +01:00
Alug 298f8ef842 Fix crash when passing a long string to v.drawString
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2403
2024-03-24 15:10:14 +01:00
Alug 4c45b9fb85 dfsafsdf 2024-03-23 19:13:14 +01:00
Alug 599cea3238 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-23 19:08:59 +01:00
Alug 0c5685e9eb dont need this anymore now 2024-03-23 18:07:58 +01:00
Alug 760b82fd63 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-23 18:07:08 +01:00
Alug 340034adf7 this can be just M_PI 2024-03-21 12:52:40 +01:00
Alug d978bfd0db Revert "Add common I_GetSysName function"
This reverts commit f3eedc03e6.
2024-03-21 12:40:44 +01:00
Alug de9f9722ac reapply hacky scaling thing 2024-03-21 12:38:50 +01:00
Alug 4dd9dc03fe ok git 2024-03-21 12:37:58 +01:00
Alug 47fc4aa39a Merge remote-tracking branch 'ghg/hud-uncap' into lugstuff 2024-03-21 12:36:29 +01:00
Alug 84ad608d70 Revert "software sdl windows scaling quality setting"
This reverts commit 7ee6de6b6a.
2024-03-21 12:35:00 +01:00
Alug d4dd0c9992 conflict fix 2024-03-21 12:33:43 +01:00
Alug ac93d027af Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-03-21 12:31:01 +01:00
Alug 190a95584c SFC32 for M_random funcs
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1780
2024-03-19 11:15:23 +01:00
Alug 9ad368e420 e 2024-03-17 23:32:09 +01:00
Alug a524215479 add the note so i dont forger if i wanna update this again 2024-03-17 22:43:05 +01:00
Alug 6104c36455 properly link libopenmpt
one dll instead of 4
2024-03-17 22:37:18 +01:00
Alug a04287c9f6 cute icon 2024-03-17 19:29:40 +01:00
indev 99876e3f73 Fix 'cast to non-matching type' warning 2024-03-17 14:57:02 +01:00
indev f16f498f27 Add include guard for qs22j.h 2024-03-17 14:56:37 +01:00
indev 4f9b5923bd Add snap to top flag for pause gfx 2024-03-15 12:54:06 +01:00
Alug 84476cd51f this didnt work 2024-03-15 11:32:33 +01:00
Alug bf9a6bde82 test this 2024-03-15 11:32:24 +01:00
Alug a6f8f57725 testing smth 2024-03-14 07:44:07 +01:00
Alug 02f4c334f0 mhhm ternaries 2024-03-13 22:06:45 +01:00
Alug 9884b294c6 i want to see more precip thx 2024-03-13 21:55:23 +01:00
Alug 49f22b5790 revert some stuff that broke some stuff 2024-03-13 19:25:14 +01:00
Alug 841270e824 fix ogl precip interpolation 2024-03-13 17:56:08 +01:00
Alug 630ce57303 this looks better lul 2024-03-13 13:18:30 +01:00
Alug 94aed4d1d1 clean up 2024-03-13 10:16:07 +01:00
Alug cdc0ec96a9 forgor menu stuff 2024-03-13 10:07:51 +01:00
Alug 751188bcd8 remove xs_CRoundToInt
while ye, less exact stuff doesent matter too much in the context of doom, it matters more in kart, due to polygon rendering and seg processing being extremely heavy and also generally more complex maps
2024-03-13 10:06:56 +01:00
Alug c0c44d46bc Ensure opaque midtextures always use PF_Masked 2024-03-13 08:48:04 +01:00
Alug 19d8749abf Revert "inline some things"
This reverts commit 0b47c310eccf55871a5bd466f44afa3215cc1322.
2024-03-13 08:35:47 +01:00
Alug c6f9fb2ac2 Revert "optimize "p_pointon" functions"
This reverts commit b9b963f999b902ab7f0f6fae4ec61264e713e15e.
2024-03-13 08:35:44 +01:00
Alug b1cfdfbc14 Revert "optimize fixedhypot"
This reverts commit ae68bd577558f45b81741396a899b7c311f753fc.
2024-03-13 08:35:41 +01:00
Alug 360df11aa6 Revert "LUT for bmapwidth imul instructions."
This reverts commit e45a7f911f0d156b7cc38675bec1a14a2080c367.
2024-03-13 08:35:30 +01:00
Alug d88cc3251f Revert "fix some oopsies"
This reverts commit 578770818ed96e366bbe9ed5ede720de07c0000a.
2024-03-13 08:35:27 +01:00
Alug cd7079da92 Revert "Zzz...."
This reverts commit e05197af882049e555c4116d1e6b4fd5ec4e879d.
2024-03-13 08:35:24 +01:00
Alug 77a0e8213b Revert "Zzz... 2"
This reverts commit bdd32702f9dc3ccbefb6444f1b76329b8ddbc9d7.
2024-03-13 08:35:20 +01:00
Alug 5efa778509 Revert "adjust the pointon funcs again"
This reverts commit b5861b2beeb04b6de1fcbd2088069374658f31ee.
2024-03-13 08:35:12 +01:00
Alug 02e6463fae Revert "P_PointOnDivlineSide stuff"
This reverts commit 1fa738d46448bd716547aa1812e38ec0de2221d1.
2024-03-13 08:35:09 +01:00
Alug b411787fe7 Revert "forgor"
This reverts commit 28950e6a15a3350da9a7441d81e3e043985a6c8d.
2024-03-13 08:34:59 +01:00
Alug 8fd91194a7 hm 2024-03-13 07:36:52 +01:00
Alug 4f85e1d603 revert that part 2024-03-13 07:34:12 +01:00
Alug fae0aeb442 Revert "Revert "forgor""
This reverts commit a1afcbc855.
2024-03-13 07:31:56 +01:00
Alug ec77824a96 Revert "Revert "dont inline those""
This reverts commit ae829375a0.
2024-03-13 07:31:53 +01:00
Alug 4127936eef optimize HWR_AddLine and HWR_ProcessSeg 2024-03-13 07:28:16 +01:00
Alug ae829375a0 Revert "dont inline those"
This reverts commit 2e34de8a125644dd7a0689af28b2076cf4c92e21.
2024-03-13 06:51:26 +01:00
Alug a1afcbc855 Revert "forgor"
This reverts commit e1e3aa899d.
2024-03-13 06:51:21 +01:00
Alug e1e3aa899d forgor 2024-03-13 06:07:59 +01:00
Alug 2644a3bf6e dont inline those 2024-03-13 06:03:19 +01:00
Alug 6b4e81e1ec P_PointOnDivlineSide stuff 2024-03-13 06:00:37 +01:00
Alug c705a0f35a adjust the pointon funcs again 2024-03-13 04:51:48 +01:00
indev b1b3102b31 If game crashes in level, add it to crash report 2024-03-12 18:51:00 +01:00
Alug 2d823d34f9 Fix buffer overrun in I_ClipboardPaste
https://git.do.srb2.org/STJr/SRB2/-/commit/9772bbeda172bc60482f137fc465e12070c76f22
2024-03-12 18:50:55 +01:00
Alug 1bb9fb2c67 cant override crap, thx msys 2024-03-12 18:27:55 +01:00
Alug b90e3ce9da i will add those in compiler flag instead 2024-03-12 18:19:12 +01:00
Alug e04a074a79 Revert "condensetics"
This reverts commit 87001f7e78.
2024-03-12 16:30:00 +01:00
Alug f98c3311af Zzz... 2 2024-03-12 16:21:42 +01:00
Alug 1a8c44af27 Zzz.... 2024-03-12 16:20:32 +01:00
Alug a57089c1a9 fix some oopsies 2024-03-12 16:16:40 +01:00
Alug 87001f7e78 condensetics 2024-03-12 16:06:12 +01:00
Alug 1fbb05c938 LUT for bmapwidth imul instructions. 2024-03-12 15:28:12 +01:00
Alug 3eef9d3b62 inline blockthing iterator aswell 2024-03-12 14:27:15 +01:00
Alug af2adf0134 remove some suff 2024-03-12 14:02:46 +01:00
Alug bbdfee8d33 optimize fixedhypot 2024-03-12 12:58:17 +01:00
Alug 2c4da83502 optimize "p_pointon" functions 2024-03-12 10:47:27 +01:00
Alug 75f2868971 inline some things 2024-03-12 02:13:35 +01:00
Alug 87d9ecc3c8 midi music bros 2024-03-11 23:52:26 +01:00
indev b637943bd9 Add snap to bottom flags for race countdown and level title too 2024-03-11 22:30:45 +01:00
Alug 0514475155 uuuuh 2024-03-11 22:30:37 +01:00
Alug 8cfb39e035 sort grid when opening skin menu instead of everytime a skin is added 2024-03-11 21:01:43 +01:00
Alug a9a7cb7be0 i 2024-03-11 12:58:22 +01:00
Alug f8649a24aa those can all be static 2024-03-11 11:54:32 +01:00
Alug ee5a860e07 more opitmizations stuff 2024-03-11 11:47:05 +01:00
Alug e6f03c1136 can do that directly 2024-03-11 11:22:08 +01:00
Alug 780162f516 optimize hwr_renderbpsnode
actually just make it behave like the software version lol
2024-03-11 11:00:14 +01:00
Alug a6d32d834b make 64 default again 2024-03-11 04:27:52 +01:00
Alug cef3c7f032 remove pseudoangle as its slower 2024-03-11 04:25:41 +01:00
Alug 07f8a532f9 attempt at unfucking renderview 2024-03-11 03:40:13 +01:00
Alug 352adf526a give this a better name lol 2024-03-11 02:22:40 +01:00
Alug df48f9caf9 actually move stuff back to hw_clip lmao 2024-03-11 02:15:34 +01:00
Alug f611053d4f replace server list sorting with qs22j 2024-03-10 20:28:27 +01:00
indev 39011cd93b Snap viewpoint text to bottom 2024-03-10 19:54:20 +01:00
Alug 562cb8cebd clean up stuff a little 2024-03-10 18:50:38 +01:00
Alug 89ae721421 i am in pain 2024-03-10 17:59:24 +01:00
Alug f65f4b32e2 Revert "remove pseudoangle"
This reverts commit c5d6ac63c5.
2024-03-10 15:19:36 +01:00
Alug 303fca6bcc smol adjustment 2024-03-10 04:39:55 +01:00
Alug 4aba159ee8 clean up this mess 2024-03-10 04:25:59 +01:00
Alug 5838e60bf6 fix overflow stuffs 2024-03-10 03:43:21 +01:00
Alug 527e436d57 Revert "stuffs"
This reverts commit 60ede73ff8.
2024-03-09 14:06:18 +01:00
Alug 60ede73ff8 stuffs 2024-03-09 13:43:06 +01:00
Alug 298d5e95fc unfuck thinker crap 2024-03-09 13:34:34 +01:00
Alug e9a68f0b7d forgor 2024-03-09 12:02:20 +01:00
Alug d613cf4d4c sUgGeSt PaReNtHeSeS ArOuNd '&&' 2024-03-09 12:01:18 +01:00
Alug 3487fae95d simplify this crap 2024-03-09 10:51:32 +01:00
Alug 9ee47a071b oops 2024-03-09 10:22:20 +01:00
Alug 3579fc3dea remove this 2024-03-09 10:11:06 +01:00
Alug 921bff19f1 add toggle for old fps counter behaviour
idk people hate the new one so brap
2024-03-09 07:58:14 +01:00
Alug d07420eaeb fix compile for everyone but me lmao 2024-03-09 07:40:38 +01:00
Alug 8028db77d8 implicit declaration of deez nuts 2024-03-09 07:12:56 +01:00
Alug e49a059783 fix dumbass compiler warnings + reformat it a bit 2024-03-09 07:12:18 +01:00
Alug 482b6e6844 use it for other stuff 2024-03-09 07:02:16 +01:00
Alug aa70635919 dont think this should write to relplays 2024-03-09 02:00:40 +01:00
Alug c331b0fa89 e 2024-03-09 01:59:27 +01:00
Alug fe55744de2 a 2024-03-09 00:57:40 +01:00
Alug 15e9d85a14 Revert "Revert "avx destruction idk""
This reverts commit f547020fc5.
2024-03-09 00:54:33 +01:00
Alug 51043b61a1 Revert "cache and reuse mobjs again"
This reverts commit 04455c9625.
2024-03-08 23:43:52 +01:00
Alug 6620d5fb26 faster qsort for rendering 2024-03-08 15:03:58 +01:00
Alug f547020fc5 Revert "avx destruction idk"
This reverts commit 4fdb2174f0.
2024-03-08 11:14:42 +01:00
Alug 89ea473c3b fix shit on party cruiser
well fixing the cullplane broke party cruiser, so im just gonna give it the same parameters as the software version i guess idk
2024-03-08 01:19:25 +01:00
Alug b60d9d0be7 readd this cause i dumb 2024-03-08 01:19:15 +01:00
Alug 4fdb2174f0 avx destruction idk 2024-03-08 00:15:43 +01:00
Alug 06a48584d6 expose this cause i want to use it in local scripts 2024-03-08 00:09:08 +01:00
Alug e9f9c1009d more mobj stuffs 2024-03-07 00:35:26 +01:00
Alug b66ceda525 Revert "attempt at exclusive fullscreen mode"
This reverts commit 19f1d8b847.
2024-03-06 09:27:09 +01:00
Alug 7c9c28f026 Revert "use desktop resolution for stuff"
This reverts commit a54384a579.
2024-03-06 09:27:06 +01:00
Alug 72f0552ef1 Revert "reset windowsize on normal fullscreen mode"
This reverts commit 85c7216eaa.
2024-03-06 09:26:59 +01:00
Alug 877a1f15a9 Revert "multidisplay stuff + only activate framebuffer for downsampling"
This reverts commit 5f58e7b343.
2024-03-06 09:26:46 +01:00
Alug efa2a68805 Revert "Zzz... moment"
This reverts commit 8cec2dab82.
2024-03-06 09:26:43 +01:00
Alug 023209bb76 Revert "only do things here when theres more than one display"
This reverts commit 9eb68bf052.
2024-03-06 09:26:38 +01:00
Alug da5dcde6ee Revert "wait uhhhh"
This reverts commit 875adb17b1.
2024-03-06 09:26:33 +01:00
Alug e92c5e1bf9 Revert "ugh this still takes the wrong display blergh"
This reverts commit 298b4d23e8.
2024-03-06 09:26:30 +01:00
Alug 2b7c4ae76c Revert "ill just uhhhhh use main display stuff for now idk"
This reverts commit a2d0ea9d11.
2024-03-06 09:26:24 +01:00
Alug ea26db2cbd Revert "change things a bit"
This reverts commit 9c42b77879.
2024-03-06 09:26:21 +01:00
Alug b9e3747f99 Revert "forgor"
This reverts commit 4d608b7f37.
2024-03-06 09:26:19 +01:00
Alug 4d608b7f37 forgor 2024-03-06 09:20:21 +01:00
Alug 9c42b77879 change things a bit 2024-03-06 09:19:17 +01:00
Alug a2d0ea9d11 ill just uhhhhh use main display stuff for now idk 2024-03-06 08:07:40 +01:00
Alug 298b4d23e8 ugh this still takes the wrong display blergh 2024-03-06 07:59:31 +01:00
Alug 875adb17b1 wait uhhhh 2024-03-06 07:42:46 +01:00
Alug 9eb68bf052 only do things here when theres more than one display 2024-03-06 07:39:36 +01:00
Alug 8cec2dab82 Zzz... moment 2024-03-06 07:36:28 +01:00
Alug 5f58e7b343 multidisplay stuff + only activate framebuffer for downsampling
idk i hope this shit works lmao
also moved some things in OglSdlSurface so it doesent intialize certain things everytime we change framebuffer shit
2024-03-06 07:26:53 +01:00
Alug 28bb88e9b4 Dynamically allocate space for a state's action field
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1478
2024-03-06 04:39:29 +01:00
Alug 04455c9625 cache and reuse mobjs again
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2200
2024-03-06 04:14:21 +01:00
Alug 9853150e57 Merge remote-tracking branch 'origin/maybemobjcrashfixes' into lugstuff 2024-03-06 00:26:24 +01:00
Alug 85c7216eaa reset windowsize on normal fullscreen mode 2024-03-05 02:15:06 +01:00
Alug a54384a579 use desktop resolution for stuff 2024-03-05 02:02:02 +01:00
Alug 19f1d8b847 attempt at exclusive fullscreen mode 2024-03-05 01:44:10 +01:00
indev 8270b64624 Make custom cvar menu bit wider 2024-03-04 23:52:45 +01:00
indev 81e3810c32 Don't add string cvars (a bit hacky solution) 2024-03-04 21:08:05 +01:00
Alug c266151071 change some numbers uuuuuh 2024-03-04 20:17:18 +01:00
Alug 27d55260e8 remove minmax sliders 2024-03-04 19:45:49 +01:00
Alug 233583657e oops 2024-03-04 19:04:51 +01:00
Alug 7bb1eed249 dont do stuff for anything thats not in normal us ascii or smth 2024-03-04 18:34:09 +01:00
Alug aa85fc3787 dont use it for control setup 2024-03-04 18:13:18 +01:00
Alug c9a88617b1 only use this for text inputs not gameplay 2024-03-04 17:46:45 +01:00
Alug 2f899fdfcc make it even simpler 2024-03-04 05:24:41 +01:00
Alug cdd2b6560e i will just use my compilers memcpy thx 2024-03-04 05:19:54 +01:00
Alug 60f29edbca turn it off completely when your gpu cant use it 2024-03-04 02:51:12 +01:00
Alug 60cffe1ed1 unhack framebuffer functions a little 2024-03-04 02:47:42 +01:00
Alug e77e7d1643 o 2024-03-04 01:13:23 +01:00
Alug 5dc22f502e dont need this 2024-03-04 00:45:14 +01:00
Alug 7a309c1175 when the ;; 2024-03-04 00:13:21 +01:00
Alug 9ce5baad9e fix ogl freelook breaking with shearing enabled
also removed uneeded stuff
2024-03-03 08:40:24 +01:00
Alug a4aa9a76f2 should only do that when rendering stuff 2024-03-03 07:57:46 +01:00
Alug befa25de5c add missing interpolators in mapload 2024-03-03 07:50:02 +01:00
Alug 83175d5c09 bruh
im going insane
2024-03-03 06:45:37 +01:00
Alug d8df8e8778 Revert "Revert "we have functions for that dont check for slopes everywhere""
This reverts commit 09957d0279.
2024-03-03 05:51:35 +01:00
Alug 09957d0279 Revert "we have functions for that dont check for slopes everywhere"
This reverts commit 46da9bf98b.
2024-03-03 05:34:01 +01:00
Alug 9e44985f56 Do not reload every texture when adding a wad
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1725?commit_id=37add34b9c729b21e624e22d64159073c9258e25
2024-03-03 05:18:37 +01:00
Alug b657a84699 Split R_LoadTextures 2024-03-03 04:53:15 +01:00
Alug 5ec7835556 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-03-03 04:34:59 +01:00
Alug 03a864156d fix conflict 2024-03-03 04:34:53 +01:00
Alug c823bf3320 Revert "multithread exec command and some filesearch/add stuff"
This reverts commit 0d7025f714cbef34ca6e92e683561df411fa149a.
2024-03-03 04:32:13 +01:00
Alug 4f4d2f1f4c clean up r_segs 2024-03-03 03:13:46 +01:00
Alug 1bb389052d fix this 2024-03-02 23:36:48 +01:00
Alug 31fdc5bbc1 dont need to check if we dont use it 2024-03-02 22:56:26 +01:00
Alug db3833430d we have functions for that dont check for slopes everywhere
the functions already do it for us anyways
2024-03-02 22:33:34 +01:00
Alug 6d2212d259 move sprite mobj checks first 2024-03-02 21:56:39 +01:00
Alug 912c0e7fc4 check for those i guess 2024-03-02 18:36:34 +01:00
Alug 43d232819a forgor screenspace clipping 2024-03-02 18:25:13 +01:00
Alug 302eaf60b5 GetScreenCoord lua parity 2024-03-02 17:36:59 +01:00
Alug 84535faa90 remove more unused stuff 2024-03-02 15:57:25 +01:00
Alug 8c55d3c705 bruh 2024-03-02 13:23:50 +01:00
Alug ec11b9268f did not mean to commit this lul 2024-03-02 03:33:26 +01:00
Alug a45af4a80c i 2024-03-02 03:18:27 +01:00
Alug df627b6830 a 2024-03-02 03:11:06 +01:00
Alug dfbeaf30ad m 2024-03-02 03:10:47 +01:00
Alug a03f74b125 add this 2024-03-02 03:05:36 +01:00
Alug 1a01f1299c fix compiler complains
those were for coronas code which we dont even have
2024-03-02 02:43:53 +01:00
Alug 91f0cdbaca unhack palrendering screentex stuff 2024-03-02 02:15:28 +01:00
Alug e50bd4125d e 2024-03-02 02:07:54 +01:00
Alug ded2c8a7c8 a 2024-03-02 02:03:22 +01:00
Alug 88ce9fc0a6 more stuffs 2024-03-02 02:02:03 +01:00
Alug 3c713248b3 more shader stuff 2024-03-02 01:53:11 +01:00
Alug 75f3edcd92 shader stuffs 2024-03-02 01:50:35 +01:00
Alug 081a7779a6 make netvars red 2024-03-02 01:32:12 +01:00
Alug 6e995207a6 smh 2024-03-02 01:15:03 +01:00
Alug 3492b77aa0 we dont have IT_CV_FLOATSLIDER so dont even need to check for float 2024-03-02 01:14:36 +01:00
Alug e864901035 Options Menu for custom console variables
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2380#9cc73f4b99ff925448389969b0ade6ba3947fc31
2024-03-02 01:09:10 +01:00
Alug 7ee6de6b6a software sdl windows scaling quality setting 2024-03-01 23:12:23 +01:00
Alug 553b8ccf6b Revert "i am in pain"
This reverts commit e0e75eac33.
2024-03-01 15:26:57 +01:00
Alug bceef0b861 Fix nametag offsets with reverse gravity and flipcam 2024-03-01 15:24:04 +01:00
Alug 53cce6c6bb this does not exist 2024-03-01 02:31:55 +01:00
Alug b95047d09f fix vertical flip driftgauge
and make non flipcam behave like the sg lua version
2024-03-01 01:53:17 +01:00
Alug c6cb4375f5 fix shearing offset with flipcam in K_GetScreenCoords 2024-03-01 01:03:03 +01:00
Alug a07e2b8eda only check for stplayer flipcam
until i figure out a better way to check all of this crap
2024-02-29 23:08:24 +01:00
Alug 98e7002167 z 2024-02-29 16:22:07 +01:00
Alug 3428dde3c6 test 2024-02-29 05:37:21 +01:00
Alug 13d48f982b just make it like this 2024-02-29 00:27:37 +01:00
Alug b2e4dc27e4 give me a little more info on vanilla scoreboard but a bit ugly lul 2024-02-29 00:22:50 +01:00
Alug deddeab049 stimky ugly 2024-02-28 22:31:06 +01:00
Alug c3a6410822 Revert "dont need SEENAMES"
This reverts commit 01172bca77.
2024-02-28 22:06:02 +01:00
Alug c5915091aa kill have_blua 2024-02-28 21:53:59 +01:00
Alug 4401f0659e kill delfile 2024-02-28 18:58:04 +01:00
Alug a0c72d32e8 kill weighted recycling 2024-02-28 18:38:54 +01:00
Alug 1493045ec4 this doesent even exist anymore lmao 2024-02-28 18:33:12 +01:00
Alug 210efb2be7 kill eslope_typeshim 2024-02-28 18:26:54 +01:00
Alug a02fc1de63 kill GL_SHADERS 2024-02-28 18:19:11 +01:00
Alug 7755bfc861 Zzz... 2024-02-28 18:05:24 +01:00
Alug 01172bca77 dont need SEENAMES
esp when we get nametags its obsolete
2024-02-28 17:58:06 +01:00
Alug 143cbc8587 kill polyobjects ifdef 2024-02-28 17:55:47 +01:00
Alug b65f655a8a update libcurl to 7.69.0 2024-02-28 15:23:54 +01:00
Alug ed04c86369 u 2024-02-28 04:53:42 +01:00
Alug c0eaa17eb3 e 2024-02-28 04:51:13 +01:00
Alug 6383a55038 kill hw_trick 2024-02-28 04:47:55 +01:00
Alug 574df60d58 kill eslope 2024-02-28 04:40:03 +01:00
Alug 61ee575cd3 forgor this 2024-02-28 04:11:39 +01:00
Alug bdd963081e OpenGL: Fix linedef type 10 not culling FOFs 2024-02-28 03:50:43 +01:00
Alug 6b908d7a14 missed those 2024-02-27 22:16:52 +01:00
Alug 7d0d70c094 oopsie 2024-02-27 22:11:32 +01:00
Alug e75c5a9248 delete half of srb2 2024-02-27 21:49:31 +01:00
Alug b8ed5f4f1a dont need this anymore 2024-02-27 21:36:57 +01:00
GenericHeroGuy 660d7060e4 Don't return aggregates 2024-02-27 20:24:46 +01:00
Alug 79c5f57714 Merge remote-tracking branch 'origin/joinrefusemessage' into lugstuff 2024-02-27 20:03:47 +01:00
Alug 606d8fbe55 optimize gif palette creation 2024-02-27 20:01:56 +01:00
Alug edfa116a40 a 2024-02-27 18:38:28 +01:00
Alug 55ca0c712f add dynamic gif delay
fixes issues with low framerates, uncapped and stutters
2024-02-27 17:41:40 +01:00
Alug 16bef488ee no idea how that ever got there 2024-02-27 15:52:50 +01:00
Alug 82d784d9f8 Toggle for R_Pointtoangle Ex or 64
Ex may perform better on 32bit clients and some cpus so lets just make it toggable
2024-02-27 15:52:34 +01:00
indev 103fb2dfc1 Don't return NULL when creating MT_NULL mobj, since it is needed in some parts of game 2024-02-27 13:29:20 +01:00
Alug bba3e1810b add this 2024-02-27 05:14:05 +01:00
Alug af5333f63e fix P_PlayerInPain 2024-02-27 05:07:44 +01:00
Alug ea77a5fb53 Fix con_hudlines being off by one, Fix con_hudtime overflow 2024-02-27 05:07:11 +01:00
Alug a4aef0894b fix compile for qt 2024-02-26 23:48:47 +01:00
Alug bab7972518 Put HTTP downloading on a background thread
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2322
2024-02-26 23:37:54 +01:00
Alug 88853a7aee make the menus a little prettier 2024-02-26 22:01:11 +01:00
Alug d3339df853 toggle for showing nametags during spectating 2024-02-26 22:00:53 +01:00
Alug 385614b448 add toggle for showing nametags after you finished a race
off by default to match sg nametags
2024-02-26 21:19:59 +01:00
Alug c47ba80f5d death 2024-02-26 20:58:58 +01:00
Alug 6de0700f49 use V_LocalTransFlag for driftgauge 2024-02-26 20:58:50 +01:00
Alug d9fe52b1a1 use V_LocalTransFlag for nametags 2024-02-26 20:58:39 +01:00
Alug ccfc476ec0 replace SCR_FPSflags with V_LocalTransFlag
so we can actually display hud transparency stuff before the hud appears, since that doesent work with V_HUDTRANS
2024-02-26 20:58:18 +01:00
Alug f518b3c48b e 2024-02-26 20:04:12 +01:00
Alug 81d52db722 Revert "connect loadingscreen should clear menus"
This reverts commit 6b41cf676c.
2024-02-25 23:42:30 +01:00
Alug df9973da99 fix tagsdisplayed counter 2024-02-25 21:32:25 +01:00
Alug ca4c779c66 dont quit addon downloading with the mousewheel lmao 2024-02-25 19:47:52 +01:00
Alug 7897352175 connect loadingscreen should clear menus 2024-02-25 19:42:21 +01:00
Alug e0e75eac33 i am in pain 2024-02-25 19:06:32 +01:00
Alug 31d83dd26e disable driftgauge by default 2024-02-25 18:35:00 +01:00
Alug 698a0b811f disable nametag by default 2024-02-25 18:34:46 +01:00
Alug f69609b403 Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-02-25 18:21:12 +01:00
Alug 56259e3476 lua hud disable option for driftgauge 2024-02-25 18:21:03 +01:00
Alug f3dfa53f31 lua hud disable option for nametags 2024-02-25 18:21:03 +01:00
Alug e10d60c08e hud disable option for driftgauge 2024-02-25 18:20:32 +01:00
Alug ad4037351f hud disable option for nametags 2024-02-25 18:20:19 +01:00
NepDisk f9e1da8c9f Add coloring to large numbers 2024-02-25 17:34:12 +01:00
NepDisk 2f05137af7 Fix fillbar 2024-02-25 17:34:08 +01:00
Alug c305e31c2e fix first person splitscreen driftgauge stuff a 2024-02-25 12:21:57 +01:00
Alug a55fabe4f9 k... 2024-02-25 12:12:18 +01:00
Alug c58848b298 add splitscreen to screencoords and fix splitscreen for driftgauge 2024-02-25 12:10:23 +01:00
Alug ede644d3c4 use SleepEX on windows and set the min sleep duration to 16ms 2024-02-25 04:08:25 +01:00
Alug 4ff98e62a9 actually disable it for splitscreen for now
its botched and needs fixing
2024-02-24 20:32:15 +01:00
Alug e87fd2fff6 dont draw driftgauge when not using chasecam 2024-02-24 20:14:52 +01:00
indev 33e8b10579 Don't need for long there, fixed_t is big enough 2024-02-24 20:05:12 +01:00
Alug d11780f62d add -1 check for driftgauge too 2024-02-24 20:05:07 +01:00
Alug 7706aa0bf0 fix conflict 2024-02-24 16:56:28 +01:00
Alug cf96e10552 Revert "Refactor Batching code"
This reverts commit 8d737c96c9.
2024-02-24 16:49:04 +01:00
Alug 1d01e1e6cd Revert "Optimize polygon sorting on batch renderer"
This reverts commit 1687fb9120.
2024-02-24 16:48:14 +01:00
Alug a5c4759662 disable driftgauge in record attack
it actually gives you an advantage over using other clients
record attack should be fair and even
2024-02-24 15:58:47 +01:00
Alug e7ff1d693b fix K_GetScreenCoords y clipping 2024-02-24 15:38:32 +01:00
Alug 9b4354a057 rename all of those to not conflict with mods 2024-02-24 14:46:13 +01:00
Alug 51a46ba92c this aswell 2024-02-23 01:35:49 +01:00
Alug 31c4e0d59f forgor those aswell 2024-02-23 01:27:52 +01:00
Alug 6b246548c3 raise compile time significantly 2024-02-22 23:58:28 +01:00
Alug 57dda3843a use the current not old state
also add dont interp precip angle if it doesent change
2024-02-22 23:45:56 +01:00
Alug b04ac14751 remove redundant check 2024-02-22 23:45:53 +01:00
Alug 5ad8497db2 those too 2024-02-22 22:53:10 +01:00
Alug 672f07a5ee forgor those 2024-02-22 22:46:58 +01:00
Alug aceffafc4e fix ternary hell for palette rendering lightlevels 2024-02-22 21:42:28 +01:00
Alug 891b3183ed dont interpolate unchanging things + remove unused dynslope interp code 2024-02-22 19:55:45 +01:00
Alug 26dd066280 fix conflicts 2024-02-22 01:43:54 +01:00
Alug 157ebdb5fe Merge remote-tracking branch 'ghg/lua-hudstuff' into lugstuff 2024-02-22 01:39:34 +01:00
Alug 1a18839f82 remove R_PointToAngleEx
R_PointToAngle64 does its job better anyways
2024-02-20 21:10:04 +01:00
Alug e7f8e7628f I HATE MENUS I HATE MENUS 2024-02-20 18:42:37 +01:00
Alug 07190571a1 lol 2024-02-20 18:40:01 +01:00
Alug f04d922fca fix warning 2024-02-20 18:17:25 +01:00
Alug 7fa382d4e9 rename driftgauge cvar and fix nametag rendering bug 2024-02-20 18:12:17 +01:00
Alug 97766710c0 e 2024-02-20 17:37:29 +01:00
Alug 994ee060a7 a 2024-02-20 17:36:05 +01:00
NepDisk 589c27fdcf Driftgauge flipcam 2024-02-20 17:35:01 +01:00
NepDisk 37a018fda4 Give these tooltips 2024-02-20 17:34:58 +01:00
NepDisk f49381d1c5 Forgot this lol 2024-02-20 17:34:54 +01:00
Alug 573095bbad Driftgauge 2024-02-20 17:34:49 +01:00
Alug 0fdcc8e288 some fixes 2024-02-20 17:33:24 +01:00
Alug 03d7e26c3d oop 2024-02-20 13:18:23 +01:00
Alug 3a5cd835ad Fix tint equation shader 2024-02-20 13:17:46 +01:00
Alug 47a8f081e9 set currenttex to null if it gets an invalid texture id 2024-02-20 13:17:35 +01:00
Alug ad8d691c11 kill this 2024-02-20 13:16:50 +01:00
NepDisk 8186696e62 Nametag sightofline fix 2024-02-19 20:35:38 +01:00
Alug 183ec22923 Revert "Revert "Linked list for textures""
This reverts commit fe0dabb177.
2024-02-19 20:26:59 +01:00
Alug 5376995350 add max cap to nametagmaxplayers 2024-02-19 19:02:54 +01:00
Alug acb6e30fad dont apply this for players 2024-02-19 18:20:11 +01:00
Alug fe0dabb177 Revert "Linked list for textures"
This reverts commit 7eec58a834.
2024-02-19 12:15:12 +01:00
NepDisk 194ae46ce8 Remove unused functions that were originally added for nametags 2024-02-19 11:14:49 +01:00
NepDisk 2e9f1bfe90 Fix nametag weight offset for small and minimal 2024-02-19 11:14:46 +01:00
Alug a82adc4948 Fix nametag limit 2024-02-19 11:14:41 +01:00
Alug 6440c70a38 Zzz... 2024-02-19 01:57:42 +01:00
Alug 748eb07c9a forgor 2024-02-19 01:57:04 +01:00
Alug 5be2f591d2 ok so this needs to be done for the scaling stuff cool 2024-02-19 01:49:20 +01:00
Alug f2e4950e89 die 2024-02-19 01:26:01 +01:00
Alug 7444c5b826 remove hpmod stuffs since its not netsafe 2024-02-19 01:02:39 +01:00
Alug 5f6cca68cc Nametags Rewrites 2
contains netunsafe stuff but easy to remove
2024-02-19 00:44:07 +01:00
Alug 3d33e5351b bruh 2024-02-19 00:13:42 +01:00
Alug c6e245450d those are not server commands
idk why i threw them there in the first place but those are not needed at all (or even usefull for that matter) for dedicated servers
also moves some stuff to its group
2024-02-19 00:12:11 +01:00
Alug 36854a16b7 Revert "Clean up cvar stuff a little"
This reverts commit 6fe87ab05a.
2024-02-19 00:04:25 +01:00
Alug b4ee8229ee Revert "more stuff"
This reverts commit 150c695979.
2024-02-19 00:03:27 +01:00
Alug cf0a3841e8 Revert "those need to be here for some reason"
This reverts commit 2efaebcf89.
2024-02-19 00:03:16 +01:00
Alug 3ebd2257f8 ok i dont want to the new gamma system
it looks off honestly
2024-02-18 23:47:42 +01:00
Alug 844d1967cc i wanna try the new gamma stuff 2024-02-18 22:29:24 +01:00
Alug dac37f8938 revert those 2024-02-18 22:29:12 +01:00
Alug dd74bc7c2b fuckit make the scale even smoler 2024-02-18 22:29:05 +01:00
Alug 7eec58a834 Linked list for textures 2024-02-18 22:28:52 +01:00
Alug da81998c71 fix up colour cube/saturation/gamma
cleans up things, and fixes it not being applied to 3D models and colourmapped sectors when not in palette rendering mode
also adds a new way of handling gamma which can be used if wanted
2024-02-18 20:43:40 +01:00
Alug d1552e7b71 clean up patch drawers a little
esp for software
2024-02-18 19:45:17 +01:00
Alug c64e10083b Optimize R_StoreWallRange
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2336?commit_id=a04bef7d39f71cfda1fe85b2ca3a820f95612b06
2024-02-17 22:52:12 +01:00
Alug 43e2be58da Revert "add an error message here"
This reverts commit 44b8a8a0d8.
2024-02-17 17:31:14 +01:00
Alug 63b60d2546 those too 2024-02-17 16:11:32 +01:00
Alug 91ddc709eb forgor 2024-02-17 16:09:39 +01:00
Alug 1bcb67ffb9 remove bloat from windows libs + move dlls into dlls folder
+ remove msvc project files since they dont work anyways
2024-02-17 15:59:16 +01:00
Alug 976177c244 Revert "Revert "fix the dumbass compiler warning""
This reverts commit 69d47a5e53.
2024-02-17 11:13:07 +01:00
Alug a37c81a142 Revert "Revert "fix some issues with framebuffer""
This reverts commit 6457847633.
2024-02-17 11:13:04 +01:00
Alug 58de3a35a0 Revert "Revert "Implement framebuffer and renderbuffer objects""
This reverts commit b0f5f4338f.
2024-02-17 11:13:00 +01:00
Alug 44b8a8a0d8 add an error message here
dunno if we can prevent it from crashing, but atleast its a little more informative
2024-02-17 10:42:16 +01:00
Alug b0f5f4338f Revert "Implement framebuffer and renderbuffer objects"
This reverts commit d6d70e1525.
2024-02-17 09:57:38 +01:00
Alug 6457847633 Revert "fix some issues with framebuffer"
This reverts commit fcc810f703.
2024-02-17 09:57:25 +01:00
Alug 69d47a5e53 Revert "fix the dumbass compiler warning"
This reverts commit d0b7f6203c.
2024-02-17 09:57:12 +01:00
NepDisk 02177a7794 Nametags Rewrites 2024-02-17 09:11:27 +01:00
Alug 65c15126f1 larger console buffer for high res 2024-02-17 09:10:24 +01:00
Alug 76c78b8e63 remove all this crap 2024-02-16 15:30:18 +01:00
Alug f63342ff0f lol 2024-02-16 13:35:30 +01:00
Alug e3410cf34c move this 2024-02-16 13:35:25 +01:00
Alug 7a129047e7 i will play this in 8k yes 2024-02-16 09:36:51 +01:00
Alug 343716b7da make this save 2024-02-15 20:22:05 +01:00
Alug 1687fb9120 Optimize polygon sorting on batch renderer 2024-02-14 21:39:31 +01:00
Alug 3e89057c23 Fix dangling pointer in mapthing after removing mobj 2024-02-14 21:39:20 +01:00
Alug 774587efa6 fix inline warnings 2024-02-14 19:43:44 +01:00
Alug 2dc8bf321e do this again 2024-02-14 19:27:25 +01:00
Alug 992813d770 Revert "remove mobj realscales"
This reverts commit 9f45dabd9c.
2024-02-14 19:27:21 +01:00
Alug 46882dee93 Revert "move this, remove interp things, and add some comments"
This reverts commit 47c90f63a8.
2024-02-14 19:27:18 +01:00
Alug 8bbb7b540f Revert "forgor"
This reverts commit e4ec7484aa.
2024-02-14 19:27:14 +01:00
Alug f5f1ab036d Fix segfault when removing mobjs while iterating thinglist 2024-02-14 15:31:06 +01:00
Alug f15d556c05 fix segfaults when damaging mobj with no painstate and when removing source from ShouldDamage 2024-02-14 15:27:15 +01:00
Alug 570a664db8 Use po2 patches to fix mipmaps 2024-02-14 12:50:40 +01:00
Alug 52f69324d9 better savegame errors 2024-02-14 12:19:38 +01:00
Alug ea6016b1ba forgor 2024-02-14 12:00:25 +01:00
Alug 30fcffd63c move this, remove interp things, and add some comments 2024-02-14 11:44:14 +01:00
Alug 50446bbde4 remove mobj realscales
idk those just seem absolutely useless its literally just an alias for mobj scale
2024-02-14 11:42:51 +01:00
Alug b307033aab a? 2024-02-14 05:58:04 +01:00
Alug 3e5985833c Snap to software lightlevel values when using Paletter renderer
bye bye smooth fades, here i come 32 light levels
2024-02-13 16:35:10 +01:00
Alug 8421f02aab e 2024-02-13 12:44:34 +01:00
Alug b6daafec17 Realloc software lookups for current screen res instead of MAXVID define
so the thing just allocs what it needs, so it can perform as good as it can on any resolution
2024-02-13 12:44:05 +01:00
Alug fc058b669e better comment 2024-02-13 11:16:00 +01:00
Alug 99214b98b9 set this to 1440p
also made a new define for use in the png limits so that can stay at 4k. but having both maxvids allocate things for 4k is not a good thing for software renderer, not that anyone would ever want to run it at 4k anyways
2024-02-13 11:15:14 +01:00
Alug ab35a44ed9 more revert 2024-02-13 10:57:36 +01:00
Alug 125b82a5bb forgor 2024-02-13 10:53:38 +01:00
Alug f294ea157f more things 2024-02-13 10:50:11 +01:00
Alug 486ae052ef this stuff too 2024-02-13 10:42:03 +01:00
Alug 53b5442dad bruh 2024-02-13 10:40:42 +01:00
Alug 507c5f75bd revert a few things 2024-02-13 10:39:27 +01:00
Alug 0fb72c579e forgor 2024-02-13 06:16:38 +01:00
Alug c5d6ac63c5 remove pseudoangle 2024-02-13 06:12:32 +01:00
Alug a934c76263 revert this 2024-02-12 14:38:47 +01:00
Alug 0098c3bbc0 update SDL2 to v2.30.0 2024-02-12 14:29:49 +01:00
Alug f3eedc03e6 Add common I_GetSysName function
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2308
2024-02-12 14:23:09 +01:00
Alug 17c71a2528 Change from double to INT64 2024-02-12 14:19:25 +01:00
Alug d2ecbd7c6e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-02-12 14:14:49 +01:00
Alug 2ce7dc0c37 update zlib to v1.3.1
update zlib to v1.3.1
2024-02-11 16:43:19 +01:00
Alug b648424c18 add stuff to menu 2024-02-11 15:21:20 +01:00
Alug 301754c857 forgor 2024-02-11 15:10:16 +01:00
Alug c9a3c4c9b8 only interpolate those if we use the stuff that uses them 2024-02-11 15:05:58 +01:00
Alug ce0c8b363a only interpolate pitch, roll, slopepitch and sloperoll when using sprite rotation 2024-02-11 14:51:44 +01:00
Alug 9d6c38004c toggable mobj subsector interpolation
honestly couldnt spot any difference at all
but R_PointinSubsector is quite expensive so making a toggle seems cool
2024-02-11 14:51:14 +01:00
Alug 19a58cc8c6 mobj interp optimization 2024-02-11 14:19:08 +01:00
Alug d855c39da2 a 2024-02-11 13:45:48 +01:00
Alug 03f4bfecc1 Dont need this
I_GetPrecise Precision already gets the high res windows time anyways
2024-02-11 13:42:12 +01:00
Alug c8d9e4c7b3 add thiis 2024-02-11 09:22:59 +01:00
Alug cb2b8f2e7c add it here too 2024-02-11 06:38:45 +01:00
Alug 0272dd4c24 oops 2024-02-11 06:29:28 +01:00
Alug 3b327937c2 use Windows High Precision Timer on Windows builds
lul may help with frametime and other stuff
2024-02-11 06:16:45 +01:00
Alug f8f2f17184 Merge remote-tracking branch 'origin/cvarcleanup' into lugstuff 2024-02-09 15:18:17 +01:00
Alug 2efaebcf89 those need to be here for some reason
game complains
2024-02-09 15:12:41 +01:00
Alug 150c695979 more stuff 2024-02-09 15:05:23 +01:00
Alug 6fe87ab05a Clean up cvar stuff a little 2024-02-09 14:42:55 +01:00
Alug f6613a5555 proper check for colourized speedometer patches 2024-02-09 12:35:48 +01:00
Alug 947d5c2739 add achiiro speedometer stuffs 2024-02-09 12:07:34 +01:00
Alug 1544706ff4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-02-09 10:20:21 +01:00
Alug e121d1a8a1 proper POST request to curl 2024-02-09 10:19:35 +01:00
Alug badbdbf03f Clipping and portal stuff
idk this actually does not break ante station for some reason
2024-02-09 10:19:18 +01:00
Alug 3b5495b53a brap 2024-02-07 11:52:04 +01:00
Alug 545027ae64 use this stuff 2024-02-07 11:40:05 +01:00
Alug 91896433f8 fix menu updating + add default to switch 2024-02-07 11:01:53 +01:00
Alug a60074fc8a fix menu stuff 2024-02-07 10:49:04 +01:00
Alug eb82aa14bb option for small nametags 2024-02-07 10:35:16 +01:00
Alug cb4b640730 why add the same thing twice? 2024-02-07 09:42:16 +01:00
Alug 266d9a3c71 also turn this off 2024-02-07 09:37:01 +01:00
Alug 7a5a704a15 forgor to comment this out 2024-02-07 09:36:37 +01:00
Alug 29ed8de935 Nametags from Chaoskart
https://gitlab.com/Fafabis/kart-chaotic/-/commit/8b4a12e144fbff587ee70c30e7f461900d839650#025e5c90ea9aeb6187b4fe002e0fbb277ef4b33d_7024_7035
2024-02-07 09:35:14 +01:00
Alug 3418cab5de switchable native keyboard input
taken from chaoskart this is completely non invasive
2024-02-07 09:20:36 +01:00
Alug e2ce015d49 fix for opengl sprite shadow colour 2024-02-07 09:15:17 +01:00
indev 0d0ab3f414 If have libbacktrace, write crash reports from I_Error 2024-02-04 19:08:33 +01:00
Alug 22b5bcc7e1 split cache functions
seems to fix a few stutters
2024-02-04 09:21:45 +01:00
indev 34d5d73d7e Fix battle playing wrong ending music sometimes 2024-02-04 08:31:10 +01:00
Alug 7ae4441731 Add cvar gr_maxinterpdist, which allows to control max distance on which mobjs will be interpolated 2024-02-04 08:26:54 +01:00
Alug d0b7f6203c fix the dumbass compiler warning 2024-02-04 07:56:55 +01:00
Alug 3757f3ae57 smol cleanup 2024-02-04 07:46:25 +01:00
Alug 8f9366da5a Zzz... 2024-02-04 07:12:26 +01:00
Alug b8e55f87a9 little portal cleanup 2024-02-04 06:48:58 +01:00
Alug b469f70e02 experimental fast sprite sorting 2024-02-04 06:28:07 +01:00
Alug 6df69b24db Revert "DSDADoom shenanigans"
This reverts commit c7931ca69c.
2024-02-02 16:49:08 +01:00
Alug 0133a5eb23 Revert "do this"
This reverts commit 7f93bc305d.
2024-02-02 16:48:26 +01:00
Alug 86712c2c48 fix compiler warning 2024-02-02 02:59:08 +01:00
Alug 5195caa3c6 Remove Build2DMipmaps and GLU library stuff
gluBuild2DMipmaps is just broken anyways
and it was the only thing used from the GLU library aswell so can remove things in favor of better solutions
having a pc with opengl 1.4 should be a given by now
2024-02-01 22:26:06 +01:00
Alug 684ad38d4b add an I_Error for when opengl is started on unsupported hardware or driver 2024-02-01 19:57:23 +01:00
Alug c6d292a3d7 e 2024-02-01 04:47:55 +01:00
Alug 246414a735 move that where it belongs 2024-02-01 04:42:28 +01:00
Alug 429bcffaf8 dont need to extra check for this actually 2024-02-01 03:48:17 +01:00
Alug d92e7b138c fix sprite roll angles in software for sprites with one rotation frame
ofc only when the rotation stuff is set to rotate everything not just the player
also changes that the shadows only rotate on that setting unless someone wants it and wants really dumb checks for it
2024-02-01 03:46:15 +01:00
Alug cd51ad2a25 remove non working fisheye lens code
remnants of birdhouse, this was never finished nor does it work
2024-02-01 03:26:33 +01:00
Alug 8732825404 fix software shadow rotation in the worst way possible kek 2024-02-01 03:25:58 +01:00
Alug fc37cdcc95 use it for camang 2024-02-01 02:39:27 +01:00
Alug 2435ec9515 Revert "batch this stuff too for portals"
This reverts commit 2df4738af2.
2024-02-01 02:11:21 +01:00
Alug 623fab8ea8 Revert "clean this up a little"
This reverts commit 99c9d921e3ab3ee3fde3dcf141e20323e064902a.
2024-02-01 02:03:23 +01:00
Alug e063345c4b Revert "oops"
This reverts commit 59b6987bf2e9f00bfdf50b268f0ec61e735dfe0e.
2024-02-01 02:03:10 +01:00
Alug 27533a1dcd Revert "replace check"
This reverts commit 36eaaee202c4d1f7e86dd2b24dcfe5573ac2f280.
2024-02-01 02:03:00 +01:00
Alug d232e0e2c6 oops 2024-02-01 01:55:04 +01:00
Alug 0475489e24 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-31 16:58:09 +01:00
Alug 34b35db27f Interpolate polyobjects properly for the software renderer
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2284/
2024-01-31 03:28:00 +01:00
Alug b47bc12e48 change x scale a little 2024-01-30 21:43:44 +01:00
Alug 4d102dcf68 similar scale to old speedo 2024-01-29 23:08:19 +01:00
Alug a8c9663200 ok i can just do it like this lol
now its good finally
2024-01-29 22:23:04 +01:00
Alug 57660cc5af fix 1 pixel gap
i hate maths
2024-01-29 22:13:54 +01:00
Alug c459e918af prep some speedometer stuff 2024-01-29 22:01:16 +01:00
Alug 962abba1b2 Buffer API is OpenGL 1.5, so can be used in STATIC_OPENGL
https://git.do.srb2.org/STJr/SRB2/-/commit/623629b04ab72071e6ea4f0c4a3245e6cde72e2c
2024-01-29 18:19:01 +01:00
Alug 5297d18f92 ugh whyyyy 2024-01-29 18:08:18 +01:00
Alug 7853e48a6f update libopenmpt libs 2024-01-29 18:07:35 +01:00
Alug 303d87f69d update libgme 2024-01-29 15:59:48 +01:00
Alug 9dcdc9500d Revert "bruh wtf"
This reverts commit 493091cd66.
2024-01-29 14:43:12 +01:00
Alug 7723bafff6 replace check 2024-01-29 04:38:26 +01:00
Alug d74a89c6c1 oops 2024-01-29 04:11:21 +01:00
Alug cce443be0b clean this up a little 2024-01-29 04:08:14 +01:00
Alug 81fa3d27bf uuuuuuuhhh 2024-01-29 03:56:43 +01:00
Alug 493091cd66 bruh wtf 2024-01-28 22:07:49 +01:00
Alug c75f5ee961 use this for portal clipping too 2024-01-28 19:33:45 +01:00
Alug 083e0ca2e0 dont need this anymore 2024-01-28 19:19:16 +01:00
Alug 79bd89016c dont need it as an extra file 2024-01-28 19:16:04 +01:00
Alug eca7e38763 Zzz... 2024-01-28 19:15:14 +01:00
Alug b5cbfb970f forgor 2024-01-28 18:58:52 +01:00
Alug 74e1cafd9d this too 2024-01-28 18:57:19 +01:00
Alug ee7381b67d revert this 2024-01-28 18:56:10 +01:00
Alug 7f93bc305d do this 2024-01-26 02:44:37 +01:00
Alug c7931ca69c DSDADoom shenanigans
R_PointToPseudoAngle seems rather promising
2024-01-26 02:28:07 +01:00
Alug 90f06a3289 a little better solution still bad lmao 2024-01-26 00:04:42 +01:00
Alug 0e344a7e02 screw it ill just do this 2024-01-25 23:40:37 +01:00
Alug 3f91a4e908 i want a small hud 2024-01-25 23:04:21 +01:00
Alug fb443c58ab add "Reset All" button to hud offset menu 2024-01-25 23:02:01 +01:00
Alug b233514b58 more offset 2024-01-25 16:48:16 +01:00
Alug 11615171d1 Revert "Optimize polygon sorting on batch renderer"
This reverts commit ad86e7f34a.
2024-01-25 14:57:49 +01:00
Alug 2df4738af2 batch this stuff too for portals 2024-01-25 04:06:54 +01:00
Alug 9e62f5bd52 make the ripple thing toggable for now 2024-01-25 03:46:26 +01:00
Alug 80349ae8ee a 2024-01-25 03:24:32 +01:00
Alug 06d51f2648 only apply fog if it is water only
ugh
2024-01-25 02:59:30 +01:00
Alug fcc810f703 fix some issues with framebuffer 2024-01-25 00:35:31 +01:00
Alug d6d70e1525 Implement framebuffer and renderbuffer objects
wew https://git.do.srb2.org/Lactozilla/SRB2/-/commit/211c3720de8dda8e2a896b6887eb4bbbd991ebbf
2024-01-24 22:35:30 +01:00
Alug e5f79e061c rotating shadows
uuuuhhh
2024-01-24 18:13:50 +01:00
Alug ad3c0a1ffd attempt at fixing some issues
it fixed some things but broke the underwater ripple if the water is on a fof
2024-01-24 17:09:15 +01:00
Alug 2ef935198a more pronounced ripple
eeeh kinda close ig
2024-01-24 03:41:02 +01:00
Alug dc3b9c648a make this a little neater 2024-01-24 03:09:09 +01:00
Alug 2d610d40b6 add better check for colormap stuff
so it only gets applied where it should (i hope)
works on tiled byway tho
2024-01-24 03:00:31 +01:00
Alug d2c686f48b attempt at making ogl water ripple better
well all it does is ripple the floor below the water fof lmao no idea how i would implement this for the walls too
2024-01-24 02:43:27 +01:00
Alug 5cafec3262 uuuh oops dont do it for non transparent fofs 2024-01-24 00:26:36 +01:00
Alug 580c42d167 more offset ugh 2024-01-23 21:33:15 +01:00
Alug dcfec35e57 remove this since its not needed anymore 2024-01-23 21:24:18 +01:00
Alug 701bac6e11 alr add more offset
kinda dumb way but itll do for now until i figure out smth better
2024-01-23 21:21:03 +01:00
Alug 0c46d593d8 attempt at making colormapped translucent fofs more accurate 2024-01-23 18:55:19 +01:00
Alug b867de0667 Zzz... 2024-01-23 15:50:51 +01:00
Alug e207b75c7a Revert "add pMasterPalette"
This reverts commit dfb05b9d39.
2024-01-23 15:49:00 +01:00
Alug fc3df5bfe4 Revert "attempt at unmangling lighttables and colormaps"
This reverts commit 19702daecd.
2024-01-23 06:41:25 +01:00
Alug dfb05b9d39 add pMasterPalette 2024-01-23 05:33:04 +01:00
Alug 19702daecd attempt at unmangling lighttables and colormaps
ugh i hope this doesent break
2024-01-22 23:28:34 +01:00
Alug dde4b4df3b merge conflict moment 2024-01-22 21:32:38 +01:00
Alug c070930a8c Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-22 21:31:04 +01:00
Alug d36b5f7c59 add hw_shaders to cmakelist 2024-01-22 18:41:00 +01:00
Alug 0e517907ce change this 2024-01-22 18:32:13 +01:00
Alug 739e9716ab add toggle for custom shaders
it seems better like this, atleast thats how hannu set it up
2024-01-22 18:25:51 +01:00
Alug 0e5972d895 shaderstate should be set here 2024-01-22 18:15:53 +01:00
Alug 71975658ca split hw_shader files 2024-01-22 18:14:14 +01:00
Alug 6572e29a64 OpenGL shader code rearrangement and shader pre-preprocessor
https://git.do.srb2.org/STJr/SRB2/-/commit/de37df1be04e9d1dfb11083a9585eb6ac1761633?merge_request_iid=1516
wew
2024-01-22 16:57:47 +01:00
indev 41b21c2a0c Fix sound, music, and midi music toggles 2024-01-22 13:48:13 +01:00
Alug 2b19d2e6de Revert "revert this"
This reverts commit 5bce9d5abf.
2024-01-22 13:48:10 +01:00
Alug f99aa3459c e 2024-01-22 13:48:00 +01:00
Alug 5bce9d5abf revert this
this caused sound and music to alyways toggle themselves on after a restart + other issues
2024-01-22 02:55:40 +01:00
Alug abe102649e forgor 2024-01-22 02:52:33 +01:00
Alug 424fcdc63a change some memfree names 2024-01-22 02:46:59 +01:00
Alug a3fd451c74 3D model texture Z_tag 2024-01-22 02:43:55 +01:00
Alug 731fd113d2 more cleanup 2024-01-22 02:34:07 +01:00
Alug c9ca1bda5c Texture buffer for non RGBA to RGBA conversion 2024-01-22 02:09:55 +01:00
Alug 58ea822050 Remove 3Dfx and glide things
gr_rounddown toggle did nothing instead the game always resized textures, now it wont, seems like this makes stutters on mapload less
2024-01-22 01:03:48 +01:00
Alug 671484d6f9 fix merge conflict 2024-01-21 16:41:38 +01:00
Alug e6e74194bc Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-21 16:40:12 +01:00
Alug 04432c8368 simplify this uuh 2024-01-21 15:43:46 +01:00
Alug 6782876c0c i hate this so i just make it a boolean
confused the heck outta me so just do it like this lmao
2024-01-21 15:31:07 +01:00
Alug 4b09e92d7c grr 2024-01-20 17:24:11 +01:00
Alug 3266f64fb9 oops 2024-01-20 17:03:05 +01:00
Alug 2a9886e698 cleanup s_sound a little + fix onchanges 2024-01-20 17:01:48 +01:00
Alug 1319e3a811 make NO_MIDI=0 compile 2024-01-20 16:52:46 +01:00
Alug 6cbb40f874 make some things static + remove cdmusic leftovers 2024-01-20 15:43:42 +01:00
Alug 07fd6a3ad4 make sound precaching useful at all
so it also precaches addon sounds and all
thx indev for help <3
2024-01-20 15:39:25 +01:00
Alug 8891869013 fix issues with sound precaching
adds a check if sounds have been previously loaded already

also makes it useful at all by not freeing soundsfx data on each mapload when its enabled

also adds an onchange so toggling it either caches all sounds again or frees them
2024-01-20 13:58:11 +01:00
Alug 04fc735e12 Merge remote-tracking branch 'origin/morenewpalshader' into lugstuff 2024-01-19 19:37:07 +01:00
Alug 7b9860f1be Merge remote-tracking branch 'origin/morenewpalshader' into lugstuff 2024-01-19 19:25:24 +01:00
Alug 38f26a2bd8 simplify setpalette 2024-01-19 18:07:32 +01:00
Alug a9750f8cff Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-19 12:29:20 +01:00
Alug ad86e7f34a Optimize polygon sorting on batch renderer
again
2024-01-19 02:14:20 +01:00
Alug 496435ef3b dont check for precip in sprite sorting + smol cleanup 2024-01-19 02:14:04 +01:00
Alug 5275b31e7e smol stuffs 2024-01-19 00:39:07 +01:00
Alug e341991703 Add toggle for horizonlines 2024-01-18 20:53:59 +01:00
Alug fb65496507 use fudges from newer paletter shader 2024-01-18 16:49:10 +01:00
Alug abe52ba440 make thundershield follow player offset
this allows the to stay on the player when saltyhopping etc.
2024-01-18 15:21:20 +01:00
Alug ee5d097201 Prevent FOF alpha from wrapping around in OpenGL 2024-01-18 15:07:29 +01:00
Alug 0ea182d04f change this 2024-01-18 14:12:27 +01:00
Alug 8d737c96c9 Refactor Batching code
from Hannu Hanhi
https://git.do.srb2.org/STJr/SRB2/-/commit/707687beea50a2bfcc14638e923ac516195351b1?merge_request_iid=1774
2024-01-17 18:30:53 +01:00
Alug 5c93b90c2e Merge remote-tracking branch 'origin/batching-stuff' into lugstuff 2024-01-17 18:16:06 +01:00
Alug 41bee850da Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-17 14:59:21 +01:00
Alug 416c2a9e9d Merge remote-tracking branch 'origin/planestuff2' into lugstuff 2024-01-17 12:42:59 +01:00
Alug 8fa9fccc79 Revert "use malloc here"
This reverts commit 75d1076bbe.
2024-01-17 12:42:56 +01:00
Alug c5a4071a06 Revert "Move water ripple spanfunc out of r_plane + tilted water support"
This reverts commit 139d937c86.
2024-01-17 12:42:48 +01:00
Alug 930e48ad39 Revert "Plane optimization and cleanup"
This reverts commit db61bfb568.
2024-01-17 12:42:39 +01:00
Alug 868678f321 Revert "Revert "Revert "Fix vibing slope planes"""
This reverts commit 8530b6512c.
2024-01-17 12:42:34 +01:00
Alug 8530b6512c Revert "Revert "Fix vibing slope planes""
This reverts commit 2a5f487e5f.
2024-01-17 12:32:50 +01:00
Alug 2a5f487e5f Revert "Fix vibing slope planes"
This reverts commit 82562bc20d.
2024-01-17 12:31:28 +01:00
Alug 141f6c51dc Revert "optimize plane stuff even more"
This reverts commit 120def9676.
2024-01-17 12:31:24 +01:00
Alug 1fc9492b30 Revert "Use floating point trig in R_SetSlopePlane"
This reverts commit 3555783284.
2024-01-17 12:31:13 +01:00
Alug 65782d3d75 Revert "more changes"
This reverts commit cb6d657c03.
2024-01-17 12:31:08 +01:00
Alug b5cb6dfb9d Revert "forgoer"
This reverts commit f476befc4b.
2024-01-17 12:31:03 +01:00
Alug 6667e4b8bc Revert "forgor R_GetSlopeZAt"
This reverts commit 4a94939d4f.
2024-01-17 12:30:58 +01:00
Alug 5e2492a930 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-17 12:19:30 +01:00
Alug 4f07372e0f (hopefully) fix overflow in R_DrawRepeatMaskedColumn
well this fixes the game hanging in software renderer on Marsh´s Marble Zone
2024-01-17 12:11:32 +01:00
Alug 80a1a97083 Revert "Revert "Revert "Localskins on replays"""
This reverts commit 12059955e5.
2024-01-16 16:44:41 +01:00
Alug 204476c55d Revert "Hopefully fix the localskin replay issues 🙏"
This reverts commit 8fab258778.
2024-01-16 16:44:38 +01:00
hayaunderscore 8fab258778 Hopefully fix the localskin replay issues 🙏 2024-01-16 16:35:39 +01:00
Alug 12059955e5 Revert "Revert "Localskins on replays""
This reverts commit d3e5dfc346.
2024-01-16 16:35:33 +01:00
Alug 3ca1f957ba fix ogl shearing with flipcam 2024-01-16 16:22:30 +01:00
Alug b11362aec1 remove the extra screentex and apply palshader directly to finaltex
theres basically barely any difference, even in the fades theres very little, and it just cost so freaking much performance

however, ill keep the revamped screentex setup as this it allows us to keep the better fadescreen background for menus
2024-01-15 20:12:35 +01:00
Alug 75630df10e readd oldpal
for performance reasons its better
2024-01-15 19:36:37 +01:00
Alug 4d93abb7ac do this a little better 2024-01-15 17:44:07 +01:00
Alug 731943f980 ensure consistent shader state 2024-01-15 16:50:20 +01:00
Alug 265dc1f296 Light table support for HWR_FadeScreenMenuBack 2024-01-15 16:29:01 +01:00
Alug c449ffcc98 remove gr_oldpal for now 2024-01-15 16:23:19 +01:00
Alug 34500d32d0 paletterenderer screentex stuff again
this didnt really work like it shouldve
so ill keep it here for now
2024-01-15 16:17:17 +01:00
Alug d3e5dfc346 Revert "Localskins on replays"
This reverts commit e1f821e121.
2024-01-15 15:51:28 +01:00
Alug 8ed11107eb remove Shader_Load as Shader_SetUniforms literally did the same thing 2024-01-15 15:10:02 +01:00
Alug 2f51108783 fix lighttable batching for new batching and palshader code 2024-01-15 15:09:36 +01:00
Alug 2667a66419 Merge remote-tracking branch 'origin/batching-stuff' into lugstuff 2024-01-15 14:27:10 +01:00
Alug 0fd073f2f0 Merge remote-tracking branch 'origin/batching-stuff' into lugstuff 2024-01-15 14:18:10 +01:00
Alug 840cf4e00a Revert "Revert "Optimize HWR_RenderBatches polygon sorting""
This reverts commit a36e633555.
2024-01-15 14:15:26 +01:00
Alug d5d99f94b7 cap flashpals again
well it often resulted in flashpals that just made stuff so badly visable lmao
2024-01-15 11:38:09 +01:00
Alug dea19e4416 forgor R_GetSlopeZAt 2024-01-15 11:20:54 +01:00
Alug f7612d7398 forgoer 2024-01-15 11:17:19 +01:00
Alug e39182607e more changes 2024-01-15 11:16:16 +01:00
Alug 79f1febbce Use floating point trig in R_SetSlopePlane 2024-01-15 11:10:12 +01:00
Alug 120def9676 optimize plane stuff even more 2024-01-15 11:09:07 +01:00
Alug 82562bc20d Fix vibing slope planes 2024-01-15 10:44:43 +01:00
Alug 1c51361120 Plane optimization and cleanup
sned help

https://git.do.srb2.org/STJr/SRB2/-/commit/c07c80fd9e626f15b4d84d1766f8963e089d295a
2024-01-15 10:40:51 +01:00
Alug c07e79deb7 Move water ripple spanfunc out of r_plane + tilted water support
idk man
2024-01-15 10:18:13 +01:00
Alug 81cb1111b4 use malloc here 2024-01-15 09:36:35 +01:00
Alug 369307181e this can be static 2024-01-15 08:35:45 +01:00
Alug 7881e04e6b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-15 08:26:13 +01:00
Alug 66a72eb1be Copy Interpolation to Shields and Overlays, Splitscreen Overlays
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1992
2024-01-15 08:25:54 +01:00
Alug ad77f11859 Optimize polygon sorting on batch renderer
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2253

again lul
2024-01-15 00:31:29 +01:00
Alug 96d177876f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 23:50:14 +01:00
Alug dc7392f86b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 22:57:24 +01:00
Alug 6f6252b6f8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 22:50:11 +01:00
Alug 20b32df2c6 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 22:13:42 +01:00
Alug d413d02bf7 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-14 21:38:49 +01:00
Alug 426c0366cc Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-13 16:12:04 +01:00
Alug d3d3655580 Merge remote-tracking branch 'origin/crash-log-mention' into lugstuff 2024-01-13 12:05:55 +01:00
Alug d4a011ee6d Merge remote-tracking branch 'origin/addfilelocal-load-animdefs' into lugstuff 2024-01-12 13:37:17 +01:00
Alug b08118734e Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-12 13:37:14 +01:00
indev 41ee6de784 Make non-important files still load textures and animdefs 2024-01-12 15:35:24 +03:00
hayaunderscore 139d2e6be8 Localskins on replays 2024-01-12 12:26:21 +01:00
Alug a866461b0a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-11 18:46:14 +01:00
Alug 6f61331d46 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 18:46:12 +01:00
Alug 7731ca9fb2 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 09:53:47 +01:00
Alug 3de0c4f5d8 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 01:10:04 +01:00
Alug 2e602f8861 Revert "Revert "just show text instead of miscoloured boxes""
This reverts commit 7072a50060.
2024-01-11 00:50:36 +01:00
Alug 1a7d92a082 Revert "Revert "fix some things""
This reverts commit a65e586de5.
2024-01-11 00:50:26 +01:00
Alug 5aa2a0c821 Revert "Revert "Merge remote-tracking branch 'origin/gammastuff' into lugstuff""
This reverts commit a9d7ca3332.
2024-01-11 00:50:17 +01:00
Alug 4f2328b8dc Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-11 00:47:24 +01:00
Alug e929e524a3 Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-10 14:18:45 +01:00
Alug e6b9f18d3d Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-10 14:14:53 +01:00
Alug 7f197ef84e Merge remote-tracking branch 'origin/newpalshader' into lugstuff 2024-01-10 13:52:26 +01:00
Alug a9d7ca3332 Revert "Merge remote-tracking branch 'origin/gammastuff' into lugstuff"
This reverts commit 9aca8438a2, reversing
changes made to c2d37dfb61.
2024-01-10 13:51:51 +01:00
Alug a65e586de5 Revert "fix some things"
This reverts commit 69ffee271d.
2024-01-10 13:51:46 +01:00
Alug 7072a50060 Revert "just show text instead of miscoloured boxes"
This reverts commit fc1a367c2e.
2024-01-10 13:51:43 +01:00
Alug fc1a367c2e just show text instead of miscoloured boxes 2024-01-09 14:27:05 +01:00
Alug 3b376d85d4 fix some things 2024-01-09 14:19:36 +01:00
Alug 9aca8438a2 Merge remote-tracking branch 'origin/gammastuff' into lugstuff 2024-01-09 14:09:56 +01:00
Alug c2d37dfb61 use og values for pal 2024-01-09 13:38:24 +01:00
Alug 3c3bd0f0ea stuff 2024-01-09 13:25:59 +01:00
Alug 958db336b7 change this 2024-01-09 13:23:54 +01:00
Alug 342d570b3b Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-08 09:07:24 +01:00
Alug 67457c25df Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-08 08:54:08 +01:00
Alug a98d46f8a8 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-08 08:51:05 +01:00
Alug b2fca84b15 Zzz... 2024-01-07 08:25:49 +01:00
Alug 2e31169738 use fudge defines + remove wall and floor shader
both are now consilidated ( i have no idea how to spell that) into doom_colormap shader
2024-01-06 08:11:57 +01:00
Alug 4cda2c8093 use srb2´s sky shader
also its finally a defined shader now + move default fragment shader to the top
2024-01-06 08:07:11 +01:00
Alug 73b4e8a988 change this 2024-01-06 04:57:18 +01:00
Alug 82dbfb4379 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-06 01:15:05 +01:00
Alug 0e2ff2390a Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-05 21:56:11 +01:00
Alug 220d5db739 optimize camera mobj z stuff lol
idk wanna see if this does anything
2024-01-05 06:40:16 +01:00
Alug 212d475f50 fix menu fade screen background using wrong things in palshader 2024-01-05 01:23:05 +01:00
Alug b7fbd0433f little changes to palshader
use gl_texture 2 in postprocess like srb2s palshader does it
also disable depthtest for screentextures in palshader mode
2024-01-05 00:53:19 +01:00
Alug d28dd96aa0 revert this 2024-01-05 00:22:13 +01:00
Alug 0e46f91c51 change order of those 2024-01-05 00:21:51 +01:00
Alug d6dabacb05 wöter... 2024-01-04 23:31:55 +01:00
Alug 4363473955 hehe funky colours 2024-01-04 23:11:46 +01:00
Alug 7e5fd4e290 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 20:02:35 +01:00
Alug c30a0cd4f1 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 20:00:34 +01:00
Alug 98d56a38f5 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 19:45:14 +01:00
Alug f26e95e7c9 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-03 18:24:19 +01:00
Alug f39e1a9b70 wöter 2 2024-01-03 02:24:15 +01:00
Alug 1d5b531ba3 Revert "uuuh refactor batching a little + port Optimize polygon sorting"
This reverts commit d757e82e3f.
2024-01-02 22:21:25 +01:00
Alug a90bd08405 Revert " Avoid batching skybox and horizon lines"
This reverts commit b5fbaaa2b9ae91877c7c6ad3602956d677fa6e0c.
2024-01-02 22:21:21 +01:00
Alug 1cbb726cab Merge branch 'lugstuff' of https://github.com/Indev450/SRB2Kart-Saturn into lugstuff 2024-01-02 22:13:17 +01:00
Alug ce61d00dcf fix inline warnings 2024-01-02 22:13:13 +01:00
indev 2d92b798c6 Fix warnings related to boolean glib getters/setters 2024-01-03 00:10:28 +03:00
Alug cc62164a7c Revert "Revert "Merge remote-tracking branch 'origin/Saturn-Next-EnumLib' into lugstuff""
This reverts commit 142540e263.
2024-01-02 21:08:03 +01:00
Alug af510bce93 inline deez nuts 2024-01-02 21:07:02 +01:00
Alug 4ba60bedcd AAAAAaaa 2024-01-02 20:36:32 +01:00
Alug 583bf26129 wöter 2024-01-02 20:36:14 +01:00
Alug d8c3623141 Avoid batching skybox and horizon lines 2024-01-02 20:35:26 +01:00
Alug 2cd0875da6 lol 2024-01-02 06:19:31 +01:00
Alug 73d0848f7e (hopefully) fix horizonlines 2024-01-02 03:49:32 +01:00
Alug d757e82e3f uuuh refactor batching a little + port Optimize polygon sorting
uhhh https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2253
2024-01-02 01:02:42 +01:00
Alug 007238e7dd Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-02 00:09:27 +01:00
Alug 944e019020 let indev compile this branch uwu 2024-01-01 21:28:03 +01:00
Alug 634f8897b4 Revert "uuuh refactor batching a little + port Optimize polygon sorting"
This reverts commit 7651d31c50.
2024-01-01 21:19:14 +01:00
Alug 7651d31c50 uuuh refactor batching a little + port Optimize polygon sorting
uhhh https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2253
2024-01-01 20:44:19 +01:00
Alug 1702873ab1 Revert "attempt at making water shader ripple more accurate to software"
This reverts commit 8ab37040db.
2024-01-01 18:55:41 +01:00
Alug 44e7d5249c dont pack my memories 2024-01-01 18:30:06 +01:00
Alug 8ab37040db attempt at making water shader ripple more accurate to software 2024-01-01 18:29:04 +01:00
Alug ac203b0ccb Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2024-01-01 17:08:31 +01:00
Alug 557546c9c3 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2024-01-01 17:08:18 +01:00
Alug 52a94dbe78 try and make p-speedometer a little less painful to look at 2023-12-31 03:39:24 +01:00
Alug f4ffc19981 lil k_kart cleanup
uh
2023-12-31 03:12:35 +01:00
Alug ac3c117b03 uh 2023-12-31 00:12:11 +01:00
Alug 1ac008ab02 Merge remote-tracking branch 'origin/compilation-warnings-fix' into lugstuff 2023-12-31 00:07:39 +01:00
Alug 58ac86e3bf noone cares about c90 mixed declarations lmao 2023-12-30 21:51:23 +01:00
Alug 1daf06858b Revert "(maybe?) fix net issues on server join"
This reverts commit af40bdb11b.
2023-12-30 21:41:33 +01:00
Alug a4e8ce7f01 Fix most of compilation warnings 2023-12-30 15:55:07 +01:00
Alug ed6e16cdce uuh 2023-12-30 01:20:09 +01:00
Alug 57bb92a36c this didnt work out lmao 2023-12-30 00:55:24 +01:00
Alug 142540e263 Revert "Merge remote-tracking branch 'origin/Saturn-Next-EnumLib' into lugstuff"
This reverts commit 5dab606980, reversing
changes made to 661dfde6af.
2023-12-29 23:24:08 +01:00
Alug 5a17430747 Revert "Merge remote-tracking branch 'origin/moreopengl' into lugstuff"
This reverts commit a6015e4647, reversing
changes made to fcbe95447a.
2023-12-29 22:49:51 +01:00
Alug 23c84a9e96 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-29 22:49:27 +01:00
Alug 6bb9dcc216 revert that part it stuttered race conditions or somethjing lmao 2023-12-29 15:36:12 +01:00
Alug 1901e4dbdc fuckit idk lmoa 2023-12-29 14:23:29 +01:00
Alug 1657f769da Revert "dont need that"
This reverts commit f274ed3fd8.
2023-12-29 13:11:43 +01:00
Alug c82eb489fe give me all that shit yes 2023-12-29 01:47:27 +01:00
Alug 9f05befd70 i have no idea what im doing lmao 2023-12-29 01:36:33 +01:00
Alug f274ed3fd8 dont need that 2023-12-29 01:35:50 +01:00
Alug f6e027abcb Merge remote-tracking branch 'origin/gl-noencore-effect-fix' into lugstuff 2023-12-27 15:30:13 +01:00
Alug a92114a854 Merge remote-tracking branch 'origin/gl-noencore-effect-fix' into lugstuff 2023-12-27 15:04:36 +01:00
Alug ffb84705d3 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-27 14:40:50 +01:00
Alug 2f8366b6f9 -flto breaks crashlogs it seems lol 2023-12-24 20:28:57 +01:00
Alug a6f062c126 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-24 19:41:15 +01:00
Alug 41c24f3bc9 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-24 19:13:15 +01:00
Alug af40bdb11b (maybe?) fix net issues on server join
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2238?commit_id=d79d22de63c5b84e3e0f4d737af81f74321dd80d

needs alot of testing
2023-12-24 00:15:47 +01:00
Alug 00a69e6aed Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-23 17:24:07 +01:00
Alug 04b2d784ce Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-22 20:28:28 +01:00
Alug a5de51b039 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-21 13:54:33 +01:00
Alug 4a80e9f20f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 23:06:24 +01:00
Alug 8676769a8f Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 17:53:09 +01:00
Alug 2f8c7a81ca Revert "Merge remote-tracking branch 'origin/thinkercache' into lugstuff"
This reverts commit 760fe392a8, reversing
changes made to 5dab606980.
2023-12-20 08:35:16 +01:00
Alug ac11af6048 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 06:09:25 +01:00
Alug 7c558802a4 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-20 05:16:05 +01:00
Alug 5a516aa1ad dont need that 2023-12-19 21:52:21 +01:00
Alug 4d1b6ed974 Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff 2023-12-19 20:20:57 +01:00
Alug e8e6bb0499 Revert "test stuff"
This reverts commit 085efaa605.
2023-12-19 19:41:55 +01:00
Alug 58f94666d1 timeout sticker uses wrong patch 2023-12-19 18:58:10 +01:00
Alug 085efaa605 test stuff
very crude, console scream at me if those are botched
most likely not the issue but whatever
2023-12-19 18:57:47 +01:00
Alug 6028e392f0 dont prep shaders if theyre uneeded 2023-12-19 17:34:15 +01:00
Alug fa67dd74a0 huehue 2023-12-19 16:28:51 +01:00
Alug cb734b50c3 bru 2023-12-19 16:24:33 +01:00
Alug 087e58b88b bugger off discord rpc 2023-12-19 16:21:35 +01:00
Alug 78b9d67aaa im not on pentium 4 2023-12-19 16:17:15 +01:00
Alug a6015e4647 Merge remote-tracking branch 'origin/moreopengl' into lugstuff 2023-12-19 16:14:18 +01:00
Alug fcbe95447a Merge remote-tracking branch 'origin/multithreadshit' into lugstuff 2023-12-19 16:13:44 +01:00
Alug 760fe392a8 Merge remote-tracking branch 'origin/thinkercache' into lugstuff 2023-12-19 16:11:54 +01:00
Alug 5dab606980 Merge remote-tracking branch 'origin/Saturn-Next-EnumLib' into lugstuff 2023-12-19 16:11:36 +01:00
indev c265575dfd Fix config 2023-11-16 22:14:18 +03:00
alufolie91 4a1f526ac6 multithread exec command and some filesearch/add stuff
hey it actually improves some things alot
esp the loading addons stage when joining a server
2023-11-16 19:14:48 +01:00
Alug 497b633661 Revert "why did i remove this back then??"
This reverts commit 91ed5c4871.
2023-11-15 09:59:24 +01:00
alufolie91 c7f54a98e0 Merge remote-tracking branch 'origin/Saturn-Next' into moreopengl 2023-11-14 21:16:47 +01:00
alufolie91 7da8c20409 remove that stuff 2023-11-14 21:16:04 +01:00
Alug 116328c7bf attempt at linked list for textures
also changes to caching handling a bit
seems to have helped with stuck colors a bit
2023-11-08 02:50:17 +01:00
Alug bd68fef4a2 Zzzzz... 2023-11-08 00:38:48 +01:00
alufolie91 7759d56ad3 Fix uninitialized reads in PreparePolygon
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/1392
2023-11-08 00:17:42 +01:00
Alug 9c7020a369 GRRRRRR not GLLLLLLLL 2023-11-07 18:23:31 +01:00
alufolie91 f8c1903316 change how mipmap caching works
also a bit of texture conversion
idk
2023-11-07 18:19:40 +01:00
alufolie91 652423ad14 Cache and reuse removed mobjs when spawning mobjs
from https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2200
2023-11-06 12:27:23 +01:00
357 changed files with 50532 additions and 51700 deletions

No files matched your search

+1
View File
@@ -4,6 +4,7 @@
*.plg
*.suo
*.vcproj.*.*.user
*.kate-swp
Win32_LIB_ASM_Debug
Win32_LIB_ASM_Release
*.bsc
+12
View File
@@ -192,6 +192,18 @@ from `0` to `#musicdefs-1`, or string indices (which is equal to calling `S_Find
Hook is called whenever `S_ShowMusicCredit` (either from game or mod) is called. Takes musicdef as only argument, returning true
will overwrite vanilla behavior (not show music credit), can be used to implement custom music credit pop-ups.
## addHook("SetupVote", function(result, gt, secondgt, prevmap))
Hook is called whenever server sets up options for vote screen. `result` is table where lua can store options to,
(for example, `result[1] = 1` will force green hills as first option), gt is current gametype, secondgt is
alternative gametype picked for 3rd entry (for example, gt can be `GT_RACE`, and secondgt can be `GT_MATCH`)
prevmap is the previous map that was played (small note - in game code, it is offset by -1, but for lua its offset back,
so if previous gamemap was 1, prevmap would also be 1. Which means you can safely do mapheaderinfo[prevmap] to get info on previous map)
Limitations: currently, game can only change gametype for 3rd option in map (meaning for example, if current gametype is race, and you
put battle map in first option, when it gets picked that map will be still run in race gametype). That means, game will only handle maps with
different gametype if it is put in 3rd vote option.
# Other changes
## P_PlayRinglossSound(source, damager)
+18
View File
@@ -30,6 +30,24 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
0-Clause BSD License
applies to:
- qs22k
Copyright (c) 2022, Raymond Gardner
--------------------------------------------------------------------------------
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
curl License
applies to:
-717
View File
@@ -1,717 +0,0 @@
#! /bin/sh
#
# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This file is meant for authors, maintainers, co-maintainers or installers
# of packages which are internationalized with the help of GNU gettext. For
# further information how to use it consult the GNU gettext manual.
progname=$0
package=gettext-tools
version=0.18.1
# Set variables
# - gettext_dir directory where the sources are stored.
prefix="/usr/local/i686-w64-mingw32/stow/gettext-0.18.1.1"
datarootdir="${prefix}/share"
gettext_dir="${datarootdir}/gettext"
# func_tmpdir
# creates a temporary directory.
# Sets variable
# - tmp pathname of freshly created temporary directory
func_tmpdir ()
{
# Use the environment variable TMPDIR, falling back to /tmp. This allows
# users to specify a different temporary directory, for example, if their
# /tmp is filled up or too small.
: ${TMPDIR=/tmp}
{
# Use the mktemp program if available. If not available, hide the error
# message.
tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
# Use a simple mkdir command. It is guaranteed to fail if the directory
# already exists. $RANDOM is bash specific and expands to empty in shells
# other than bash, ksh and zsh. Its use does not increase security;
# rather, it minimizes the probability of failure in a very cluttered /tmp
# directory.
tmp=$TMPDIR/gt$$-$RANDOM
(umask 077 && mkdir "$tmp")
} ||
{
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
{ (exit 1); exit 1; }
}
}
# Support for relocatability.
func_find_curr_installdir ()
{
# Determine curr_installdir, even taking into account symlinks.
curr_executable="$0"
case "$curr_executable" in
*/* | *\\*) ;;
*) # Need to look in the PATH.
if test "${PATH_SEPARATOR+set}" != set; then
func_tmpdir
{ echo "#! /bin/sh"; echo "exit 0"; } > "$tmp"/conf.sh
chmod +x "$tmp"/conf.sh
if (PATH="/nonexistent;$tmp"; conf.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -rf "$tmp"
fi
save_IFS="$IFS"; IFS="$PATH_SEPARATOR"
for dir in $PATH; do
IFS="$save_IFS"
test -z "$dir" && dir=.
for exec_ext in ''; do
if test -f "$dir/$curr_executable$exec_ext"; then
curr_executable="$dir/$curr_executable$exec_ext"
break 2
fi
done
done
IFS="$save_IFS"
;;
esac
# Make absolute.
case "$curr_executable" in
/* | ?:/* | ?:\\*) ;;
*) curr_executable=`pwd`/"$curr_executable" ;;
esac
# Resolve symlinks.
sed_dirname='s,/[^/]*$,,'
sed_linkdest='s,^.* -> \(.*\),\1,p'
while : ; do
lsline=`LC_ALL=C ls -l "$curr_executable"`
case "$lsline" in
*" -> "*)
linkdest=`echo "$lsline" | sed -n -e "$sed_linkdest"`
case "$linkdest" in
/* | ?:/* | ?:\\*) curr_executable="$linkdest" ;;
*) curr_executable=`echo "$curr_executable" | sed -e "$sed_dirname"`/"$linkdest" ;;
esac ;;
*) break ;;
esac
done
curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'`
# Canonicalize.
curr_installdir=`cd "$curr_installdir" && pwd`
}
func_find_prefixes ()
{
# Compute the original/current installation prefixes by stripping the
# trailing directories off the original/current installation directories.
orig_installprefix="$orig_installdir"
curr_installprefix="$curr_installdir"
while true; do
orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
if test -z "$orig_last" || test -z "$curr_last"; then
break
fi
if test "$orig_last" != "$curr_last"; then
break
fi
orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'`
curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'`
done
}
if test "no" = yes; then
exec_prefix="${prefix}"
bindir="${exec_prefix}/bin"
orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables
func_find_curr_installdir # determine curr_installdir
func_find_prefixes
# Relocate the directory variables that we use.
gettext_dir=`echo "$gettext_dir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'`
fi
# func_usage
# outputs to stdout the --help usage message.
func_usage ()
{
echo "\
Usage: autopoint [OPTION]...
Copies standard gettext infrastructure files into a source package.
Options:
--help print this help and exit
--version print version information and exit
-f, --force force overwriting of files that already exist
-n, --dry-run print modifications but don't perform them"
# echo "\
# -V version copy the infrastructure of the specified gettext version
# (dangerous)"
echo "
Report bugs to <bug-gnu-gettext@gnu.org>."
}
# func_version
# outputs to stdout the --version message.
func_version ()
{
echo "$progname (GNU $package) $version"
echo "Uses a versions archive in git format."
echo "Copyright (C) 2002-2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
echo "Written by" "Bruno Haible"
}
# func_fatal_error message
# outputs to stderr a fatal error message, and terminates the program.
func_fatal_error ()
{
echo "autopoint: *** $1" 1>&2
echo "autopoint: *** Stop." 1>&2
exit 1
}
# Command-line option processing.
# Removes the OPTIONS from the arguments. Sets the variables:
# - force yes if --force was given, empty otherwise
# - ver gettext version if -V was given, empty otherwise
# - doit false if --dry-run was given, : otherwise
{
force=
ver=
doit=:
while test $# -gt 0; do
case "$1" in
-n | --dry-run | --dry-ru | --dry-r | --dry- | --dry | --dr | --d )
shift
doit=false ;;
-f | --force | --forc | --for | --fo | --f )
shift
force=yes ;;
--help | --hel | --he | --h )
func_usage; exit 0 ;;
# -V ) # Some people put a space between -V and the version number.
# shift
# if test $# = 0; then
# func_usage 1>&2
# exit 1
# fi
# ver=$1;
# shift ;;
# -V*) # Some people omit the space between -V and the version number.
# ver=`echo "X$1" | sed -e 's/^X-V//'`
# shift ;;
--version | --versio | --versi | --vers | --ver | --ve | --v )
func_version
exit 0 ;;
-- ) # Stop option prcessing
shift; break ;;
-* )
echo "autopoint: unknown option $1" 1>&2
echo "Try 'autopoint --help' for more information." 1>&2
exit 1 ;;
* )
break ;;
esac
done
}
# Command-line argument processing.
# Analyzes the remaining arguments.
{
if test $# -gt 0; then
func_usage 1>&2
exit 1
fi
}
srcdir=`pwd`
# The current directory is now $srcdir.
# Check integrity of package: A configure.in/ac must be present. Sets variable
# - configure_in name of configure.in/ac file.
if test -f configure.in; then
configure_in=configure.in
else
if test -f configure.ac; then
configure_in=configure.ac
else
# KDE specific convention: configure.in.in
if test -f configure.in.in; then
configure_in=configure.in.in
else
func_fatal_error "Missing configure.in or configure.ac, please cd to your package first."
fi
fi
fi
# Check whether the -V option and the version number in configure.in match.
# At least one of the two must be given. If both are given, they must agree.
sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/'
sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/'
xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n -e "$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e "$sed_remove_outer_brackets" | sed -e 1q`
if test -z "$xver" && test -f intl/VERSION; then
xver=`cat intl/VERSION | LC_ALL=C sed -n -e 's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'`
fi
if test -n "$xver"; then
if test -n "$ver"; then
if test "X$ver" != "X$xver"; then
func_fatal_error "Version mismatch: specified -V $ver but the package uses gettext version $xver"
fi
else
ver="$xver"
fi
else
if test -z "$ver"; then
func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using"
fi
fi
# Check whether the version number is supported.
case "$ver" in
0.10.35 | 0.10.36 | 0.10.37 | 0.10.38 | 0.10.39 | 0.10.40 | \
0.11 | 0.11.1 | 0.11.2 | 0.11.3 | 0.11.4 | 0.11.5 | \
0.12 | 0.12.1 | \
0.13 | 0.13.1 | \
0.14 | 0.14.1 | 0.14.2 | 0.14.3 | 0.14.4 | 0.14.5 | 0.14.6 | \
0.15 | \
0.16 | 0.16.1 | \
0.17 | \
0.18 | 0.18.1 )
;;
*)
func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your $configure_in
file requires the infrastructure from gettext-$ver but this version
is older. Please upgrade to gettext-$ver or newer."
;;
esac
# Check in which directory config.rpath, mkinstalldirs etc. belong.
auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
if test -n "$auxdir"; then
auxdir="$auxdir/"
fi
# Check in which directory the *.m4 macros belong.
m4dir=m4
if test -f Makefile.am; then
# A package using automake.
# Extract the macro directory name from Makefile.am.
aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
m4dir_is_next=
for arg in $aclocal_amflags; do
if test -n "$m4dir_is_next"; then
m4dir="$arg"
break
else
if test "X$arg" = "X-I"; then
m4dir_is_next=yes
else
m4dir_is_next=
fi
fi
done
fi
# Check whether to omit the intl/ directory.
omitintl=`cat "$configure_in" | grep '^AM_GNU_GETTEXT' | sed -n -e 's/^AM_GNU_GETTEXT(\([^(),]*\).*$/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
omitintl=`if test 'external' = "$omitintl"; then echo yes; fi`
# Check in which directory or directories the po/* infrastructure belongs.
sed_extract_config_files='s,#.*$,,
s,^dnl .*$,,
s, dnl .*$,,
/AC_CONFIG_FILES(/ {
ta
:a
s/)/)/
tb
s/\\$//
N
ba
:b
s,^.*AC_CONFIG_FILES([[ ]*\([^]"$`\\)]*\).*$,\1,p
}'
configfiles=`cat "$configure_in" | sed -n -e "$sed_extract_config_files"`
# PO directories have a Makefile.in generated from Makefile.in.in.
# Treat a directory as a PO directory if and only if it has a
# POTFILES.in file. This allows packages to have multiple PO
# directories under different names or in different locations.
sed_remove_Makefile_in='s,/Makefile\.in$,,'
podirs=`for f in $configfiles; do case "$f" in */Makefile.in) echo $f;; esac; done | sed -e "$sed_remove_Makefile_in"`
if test -z "$podirs"; then
# If we cannot get the list of PO directories from configure.ac, assume the
# common default.
podirs="po"
fi
# Set up a temporary checkout directory.
# Set variables
# - work_dir directory containing the temporary checkout
work_dir=tmpwrk$$
mkdir "$work_dir" || {
if test -d "$work_dir"; then
func_fatal_error "directory $work_dir already exists"
else
func_fatal_error "cannot create directory $work_dir"
fi
}
# We support three archive formats.
#
# Format | Size (KiB) for gettext-0.17 | Extra tools needed |
# -------+-----------------------------+--------------------+
# dir | 3000 | -- |
# cvs | 356 | cvs |
# git | 484 | git |
# -------+-----------------------------+--------------------+
case "git" in
dir)
# The archive of different versions is very large, but using it does not
# require special tools.
gzip -d -c < "$gettext_dir/archive.dir.tar.gz" | (cd "$work_dir" && tar xf - "gettext-$ver")
if test `find "$work_dir" -type f -print | wc -l` = 0; then
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
fi
mv "$work_dir/gettext-$ver" "$work_dir/archive"
;;
cvs)
# We distributed the many different versions of the files in a CVS
# repository. This guaranteed a good compression rate:
#
# Including version size in KB of
# "du autopoint-files/archive"
# 0.10.35 240
# 0.10.36 428
# 0.10.37 436
# 0.10.38 488
# 0.10.39 500
# 0.10.40 528
# 0.11 720
# 0.11.1 740
# 0.11.2 748
# 0.11.3 804
# 0.11.4 864
# 0.11.5 880
# 0.12 1032
# 0.12.1 1032
# 0.13 1220
# 0.13.1 1236
# 0.14 1296
# 0.14.1 1300
# 0.14.2 1420
# 0.14.3 1428
# 0.14.4 1464
# 0.14.5 1508
# 0.14.6 1580
# 0.15 1760
# 0.16 1808
# 0.16.1 1812
# 0.17 2128
# 0.18 2656
#
# The requirement that the user must have the CVS program available is not
# a severe restrictions, because most of the people who use autopoint are
# users of CVS.
#
# But the CVS format is now deprecated, because "cvs init" does not work in
# all circumstances
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
# and we are not allowed to distribute the cvs infrastructure files
# ourselves
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
#
# Check availability of the CVS program.
(cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found"
# Set up a temporary CVS repository.
# We need the temporary CVS repository because any checkout needs write
# access to the CVSROOT/history file, so it cannot be under $gettext_dir.
# We need the temporary checkout directory because when --force was not
# given, we need to compare the existing files with the checked out ones.
# Set variables
# - cvs_dir directory containing the temporary repository
cvs_dir=tmpcvs$$
# Use an umask of 077, to avoid attacks that work by overwriting files in
# the "$CVSROOT"/CVSROOT directory.
(umask 077 && mkdir "$cvs_dir") || {
if test -d "$cvs_dir"; then
func_fatal_error "directory $cvs_dir already exists"
else
func_fatal_error "cannot create directory $cvs_dir"
fi
}
CVSROOT="$srcdir/$cvs_dir"
unset CVS_CLIENT_LOG
unset CVS_CLIENT_PORT
unset CVS_IGNORE_REMOTE_ROOT
unset CVS_LOCAL_BRANCH_NUM
unset CVS_NOBASES
unset CVS_PASSFILE
unset CVS_PASSWORD
unset CVS_PROXY_PORT
unset CVS_RCMD_PORT
unset CVS_RSH
unset CVS_SERVER
unset CVS_SERVER_SLEEP
CVS_SIGN_COMMITS=
export CVS_SIGN_COMMITS
unset CVS_SSH
unset CVS_VERIFY_CHECKOUTS
unset CVS_VERIFY_TEMPLATE
unset CVSIGNORE
unset CVSREAD
unset CVSREADONLYFS
unset CVSUMASK
unset CVSWRAPPERS
# Need to pass -d "$CVSROOT", because there may be a CVS directory in the
# current directory.
cvs -d "$CVSROOT" init
gzip -d -c < "$gettext_dir/archive.cvs.tar.gz" | (cd "$cvs_dir" && tar xf -)
cd "$work_dir"
cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'`
(cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating'
find archive -name CVS -type d -print | xargs rm -rf
cd ..
rm -rf "$cvs_dir"
# Check that really all CVS directories are gone, otherwise we would overwrite
# the contents of the user's CVS directories.
if test `find $work_dir/archive -name CVS -type d -print | wc -l` != 0; then
rm -rf "$work_dir"
func_fatal_error "failed to remove all CVS subdirectories"
fi
if test `find $work_dir/archive -type f -print | wc -l` = 0; then
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
fi
;;
git)
# Check availability of the git program.
(git --version) >/dev/null 2>/dev/null || func_fatal_error "git program not found"
mkdir "$work_dir/archive"
gzip -d -c < "$gettext_dir/archive.git.tar.gz" | (cd "$work_dir/archive" && tar xf -)
(cd "$work_dir/archive" && git checkout -q "gettext-$ver") || {
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
}
(cd "$work_dir/archive" && rm -rf .git .gitignore)
;;
esac
# func_destfile file
# determines the destination file, relative to the package's top level
# directory, for a given file name, relative to archive.
# Sets variables
# - destfile relative destination file name, or
# empty if the file shall be omitted
# - sharedowner yes if the file is not only owned by GNU gettext but may
# be installed by automake or other tools, otherwise empty
# - allpodirs yes if the file is to be installed in every dir in $podirs
func_destfile ()
{
# There are five categories of files:
# ABOUT_NLS -> top level directory
# config.rpath mkinstalldirs -> $auxdir
# m4/* -> $m4dir/
# intl/* -> intl/
# po/* ->
sharedowner=
allpodirs=
case `echo "$1" | sed -e 's,[^/]*$,,'` in
"" )
case "$1" in
config.rpath ) destfile="$auxdir$1" ;;
mkinstalldirs ) destfile="$auxdir$1" sharedowner=yes ;;
* ) destfile="$1" ;;
esac
;;
m4/ ) destfile=`echo "$1" | sed -e "s,^m4/,$m4dir/,"` ;;
intl/ ) if test -n "$omitintl"; then destfile=""; else destfile="$1"; fi ;;
po/ ) destfile=`echo "$1" | sed -e "s,^po/,,"` allpodirs=yes ;;
* ) destfile="$1" ;;
esac
}
# func_compare existingfile gettextfile
# compares the existing file and the file from gettext, and decides whether the
# existing file should be overwritten with the file from gettext. Returns 0 if
# it should be overwritten, or 1 if it should be skipped.
sed_extract_serial='s/^#.* serial \([^ ]*\).*/\1/p
1q'
func_compare ()
{
if cmp -s "$1" "$2"; then
false
else
case "$2" in
*.m4)
# For interoperability with gnulib. gnulib often has newer versions of
# the *.m4 files than the latest gettext release. Don't overwrite a
# newer version from gnulib with an older version from the gettext
# release. The version can be retrieved from the first line, which
# looks like this: # file.m4 serial NN ...
existing_serial=`sed -n -e "$sed_extract_serial" < "$1"`
gettext_serial=`sed -n -e "$sed_extract_serial" < "$2"`
if test -n "$existing_serial" && test -n "$gettext_serial" \
&& test "$existing_serial" -ge "$gettext_serial" 2> /dev/null; then
false
else
true
fi
;;
*)
true
;;
esac
fi
}
# If some files have been locally modified and we have not been requested
# to overwrite them, then bail out. This is better than leaving a source
# package around where half of the files are locally modified and half are
# original - too great risk of version mismatch.
if test -z "$force"; then
mismatch=
func_tmpdir
mismatchfile="$tmp"/autopoint.diff
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
func_destfile "$file"
if test -n "$destfile"; then
func_compare_to_destfile ()
{
finaldestfile="$1"
if test -f "$finaldestfile"; then
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
if test -n "$sharedowner"; then
echo "autopoint: warning: File $finaldestfile has been locally modified." 1>&2
else
echo "autopoint: File $finaldestfile has been locally modified." 1>&2
mismatch=yes
diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
fi
fi
fi
}
if test -n "$allpodirs"; then
for dir in $podirs; do
func_compare_to_destfile "$dir/$destfile"
done
else
func_compare_to_destfile "$destfile"
fi
fi
done
if test -n "$mismatch"; then
rm -rf "$work_dir"
func_fatal_error "Some files have been locally modified. Not overwriting them because --force has not been specified. For your convenience, you find the local modifications in the file '$mismatchfile'."
fi
rm -rf "$tmp"
fi
# func_mkdir_for to
# ensures the directory that would the given file exists.
# 'to' is a relative pathname, relative to the current directory.
func_mkdir_for ()
{
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
if test "X$base" != "X$1" && test -n "$base"; then
func_mkdir_for "$base"
# Recompute base. It was clobbered by the recursive call.
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
test -d "$base" || { echo "Creating directory $base"; mkdir "$base"; }
fi
}
# func_copy from to
# copies a file.
# 'from' is a relative pathname, relative to the current directory.
# 'to' is a relative pathname, relative to the current directory.
func_copy ()
{
if $doit; then
func_mkdir_for "$2"
rm -f "$2"
echo "Copying file $2"
cp "$1" "$2"
else
echo "Copy file $2"
fi
}
# func_backup to
# makes a backup of a file that is about to be overwritten or replaced.
# 'to' is a relative pathname, relative to the current directory.
func_backup ()
{
if $doit; then
if test -f "$1"; then
rm -f "$1~"
cp -p "$1" "$1~"
fi
fi
}
# Now copy the files.
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
func_destfile "$file"
if test -n "$destfile"; then
func_copy_to_destfile ()
{
finaldestfile="$1"
mustcopy=
if test -f "$finaldestfile"; then
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
if test -n "$force"; then
# Overwrite locally modified file.
mustcopy=yes
fi
# If --force is not specified, don't overwrite locally modified files
# for which GNU gettext is a shared owner.
fi
else
mustcopy=yes
fi
if test -n "$mustcopy"; then
func_backup "$finaldestfile"
func_copy "$work_dir/archive/$file" "$finaldestfile"
fi
}
if test -n "$allpodirs"; then
for dir in $podirs; do
func_copy_to_destfile "$dir/$destfile"
done
else
func_copy_to_destfile "$destfile"
fi
fi
done
# That's it.
rm -rf "$work_dir"
exit 0
Binary file not shown.
Binary file not shown.
-123
View File
@@ -1,123 +0,0 @@
#! /bin/sh
#
# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
# Find a way to echo strings without interpreting backslash.
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
echo='echo'
else
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
echo='printf %s\n'
else
echo_func () {
cat <<EOT
$*
EOT
}
echo='echo_func'
fi
fi
# This script is primarily a shell function library. In order for
# ". gettext.sh" to find it, we install it in $PREFIX/bin (that is usually
# contained in $PATH), rather than in some other location such as
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
# the Filesystem Hierarchy Standard when doing so, this script is executable.
# Therefore it needs to support the standard --help and --version.
if test -z "$ZSH_VERSION"; then
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
# fortunately we know that when running under zsh, this script is always
# being sourced, not executed, because hardly anyone is crazy enough to
# install zsh as /bin/sh.
case "$0" in
gettext.sh | */gettext.sh | *\\gettext.sh)
progname=$0
package=gettext-runtime
version=0.18.1
# func_usage
# outputs to stdout the --help usage message.
func_usage ()
{
echo "GNU gettext shell script function library version $version"
echo "Usage: . gettext.sh"
}
# func_version
# outputs to stdout the --version message.
func_version ()
{
echo "$progname (GNU $package) $version"
echo "Copyright (C) 2003-2007 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
echo "Written by" "Bruno Haible"
}
if test $# = 1; then
case "$1" in
--help | --hel | --he | --h )
func_usage; exit 0 ;;
--version | --versio | --versi | --vers | --ver | --ve | --v )
func_version; exit 0 ;;
esac
fi
func_usage 1>&2
exit 1
;;
esac
fi
# eval_gettext MSGID
# looks up the translation of MSGID and substitutes shell variables in the
# result.
eval_gettext () {
gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
}
# eval_ngettext MSGID MSGID-PLURAL COUNT
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
# shell variables in the result.
eval_ngettext () {
ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
}
# Note: This use of envsubst is much safer than using the shell built-in 'eval'
# would be.
# 1) The security problem with Chinese translations that happen to use a
# character such as \xe0\x60 is avoided.
# 2) The security problem with malevolent translators who put in command lists
# like "$(...)" or "`...`" is avoided.
# 3) The translations can only refer to shell variables that are already
# mentioned in MSGID or MSGID-PLURAL.
#
# Note: "export PATH" above is a dummy; this is for the case when
# `envsubst --variables ...` returns nothing.
#
# Note: In eval_ngettext above, "$1 $2" means a string whose variables set is
# the union of the variables set of "$1" and "$2".
#
# Note: The minimal use of backquote above ensures that trailing newlines are
# not dropped, not from the gettext invocation and not from the value of any
# shell variable.
#
# Note: Field splitting on the `envsubst --variables ...` result is desired,
# since envsubst outputs the variables, separated by newlines. Pathname
# wildcard expansion or tilde expansion has no effect here, since the words
# output by "envsubst --variables ..." consist solely of alphanumeric
# characters and underscore.
File diff suppressed because it is too large. Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-717
View File
@@ -1,717 +0,0 @@
#! /bin/sh
#
# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This file is meant for authors, maintainers, co-maintainers or installers
# of packages which are internationalized with the help of GNU gettext. For
# further information how to use it consult the GNU gettext manual.
progname=$0
package=gettext-tools
version=0.18.1
# Set variables
# - gettext_dir directory where the sources are stored.
prefix="/usr/local/x86_64-w64-mingw32/stow/gettext-0.18.1.1"
datarootdir="${prefix}/share"
gettext_dir="${datarootdir}/gettext"
# func_tmpdir
# creates a temporary directory.
# Sets variable
# - tmp pathname of freshly created temporary directory
func_tmpdir ()
{
# Use the environment variable TMPDIR, falling back to /tmp. This allows
# users to specify a different temporary directory, for example, if their
# /tmp is filled up or too small.
: ${TMPDIR=/tmp}
{
# Use the mktemp program if available. If not available, hide the error
# message.
tmp=`(umask 077 && mktemp -d "$TMPDIR/gtXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
# Use a simple mkdir command. It is guaranteed to fail if the directory
# already exists. $RANDOM is bash specific and expands to empty in shells
# other than bash, ksh and zsh. Its use does not increase security;
# rather, it minimizes the probability of failure in a very cluttered /tmp
# directory.
tmp=$TMPDIR/gt$$-$RANDOM
(umask 077 && mkdir "$tmp")
} ||
{
echo "$0: cannot create a temporary directory in $TMPDIR" >&2
{ (exit 1); exit 1; }
}
}
# Support for relocatability.
func_find_curr_installdir ()
{
# Determine curr_installdir, even taking into account symlinks.
curr_executable="$0"
case "$curr_executable" in
*/* | *\\*) ;;
*) # Need to look in the PATH.
if test "${PATH_SEPARATOR+set}" != set; then
func_tmpdir
{ echo "#! /bin/sh"; echo "exit 0"; } > "$tmp"/conf.sh
chmod +x "$tmp"/conf.sh
if (PATH="/nonexistent;$tmp"; conf.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -rf "$tmp"
fi
save_IFS="$IFS"; IFS="$PATH_SEPARATOR"
for dir in $PATH; do
IFS="$save_IFS"
test -z "$dir" && dir=.
for exec_ext in ''; do
if test -f "$dir/$curr_executable$exec_ext"; then
curr_executable="$dir/$curr_executable$exec_ext"
break 2
fi
done
done
IFS="$save_IFS"
;;
esac
# Make absolute.
case "$curr_executable" in
/* | ?:/* | ?:\\*) ;;
*) curr_executable=`pwd`/"$curr_executable" ;;
esac
# Resolve symlinks.
sed_dirname='s,/[^/]*$,,'
sed_linkdest='s,^.* -> \(.*\),\1,p'
while : ; do
lsline=`LC_ALL=C ls -l "$curr_executable"`
case "$lsline" in
*" -> "*)
linkdest=`echo "$lsline" | sed -n -e "$sed_linkdest"`
case "$linkdest" in
/* | ?:/* | ?:\\*) curr_executable="$linkdest" ;;
*) curr_executable=`echo "$curr_executable" | sed -e "$sed_dirname"`/"$linkdest" ;;
esac ;;
*) break ;;
esac
done
curr_installdir=`echo "$curr_executable" | sed -e 's,/[^/]*$,,'`
# Canonicalize.
curr_installdir=`cd "$curr_installdir" && pwd`
}
func_find_prefixes ()
{
# Compute the original/current installation prefixes by stripping the
# trailing directories off the original/current installation directories.
orig_installprefix="$orig_installdir"
curr_installprefix="$curr_installdir"
while true; do
orig_last=`echo "$orig_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
curr_last=`echo "$curr_installprefix" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
if test -z "$orig_last" || test -z "$curr_last"; then
break
fi
if test "$orig_last" != "$curr_last"; then
break
fi
orig_installprefix=`echo "$orig_installprefix" | sed -e 's,/[^/]*$,,'`
curr_installprefix=`echo "$curr_installprefix" | sed -e 's,/[^/]*$,,'`
done
}
if test "no" = yes; then
exec_prefix="${prefix}"
bindir="${exec_prefix}/bin"
orig_installdir="$bindir" # see Makefile.am's *_SCRIPTS variables
func_find_curr_installdir # determine curr_installdir
func_find_prefixes
# Relocate the directory variables that we use.
gettext_dir=`echo "$gettext_dir/" | sed -e "s%^${orig_installprefix}/%${curr_installprefix}/%" | sed -e 's,/$,,'`
fi
# func_usage
# outputs to stdout the --help usage message.
func_usage ()
{
echo "\
Usage: autopoint [OPTION]...
Copies standard gettext infrastructure files into a source package.
Options:
--help print this help and exit
--version print version information and exit
-f, --force force overwriting of files that already exist
-n, --dry-run print modifications but don't perform them"
# echo "\
# -V version copy the infrastructure of the specified gettext version
# (dangerous)"
echo "
Report bugs to <bug-gnu-gettext@gnu.org>."
}
# func_version
# outputs to stdout the --version message.
func_version ()
{
echo "$progname (GNU $package) $version"
echo "Uses a versions archive in git format."
echo "Copyright (C) 2002-2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
echo "Written by" "Bruno Haible"
}
# func_fatal_error message
# outputs to stderr a fatal error message, and terminates the program.
func_fatal_error ()
{
echo "autopoint: *** $1" 1>&2
echo "autopoint: *** Stop." 1>&2
exit 1
}
# Command-line option processing.
# Removes the OPTIONS from the arguments. Sets the variables:
# - force yes if --force was given, empty otherwise
# - ver gettext version if -V was given, empty otherwise
# - doit false if --dry-run was given, : otherwise
{
force=
ver=
doit=:
while test $# -gt 0; do
case "$1" in
-n | --dry-run | --dry-ru | --dry-r | --dry- | --dry | --dr | --d )
shift
doit=false ;;
-f | --force | --forc | --for | --fo | --f )
shift
force=yes ;;
--help | --hel | --he | --h )
func_usage; exit 0 ;;
# -V ) # Some people put a space between -V and the version number.
# shift
# if test $# = 0; then
# func_usage 1>&2
# exit 1
# fi
# ver=$1;
# shift ;;
# -V*) # Some people omit the space between -V and the version number.
# ver=`echo "X$1" | sed -e 's/^X-V//'`
# shift ;;
--version | --versio | --versi | --vers | --ver | --ve | --v )
func_version
exit 0 ;;
-- ) # Stop option prcessing
shift; break ;;
-* )
echo "autopoint: unknown option $1" 1>&2
echo "Try 'autopoint --help' for more information." 1>&2
exit 1 ;;
* )
break ;;
esac
done
}
# Command-line argument processing.
# Analyzes the remaining arguments.
{
if test $# -gt 0; then
func_usage 1>&2
exit 1
fi
}
srcdir=`pwd`
# The current directory is now $srcdir.
# Check integrity of package: A configure.in/ac must be present. Sets variable
# - configure_in name of configure.in/ac file.
if test -f configure.in; then
configure_in=configure.in
else
if test -f configure.ac; then
configure_in=configure.ac
else
# KDE specific convention: configure.in.in
if test -f configure.in.in; then
configure_in=configure.in.in
else
func_fatal_error "Missing configure.in or configure.ac, please cd to your package first."
fi
fi
fi
# Check whether the -V option and the version number in configure.in match.
# At least one of the two must be given. If both are given, they must agree.
sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/'
sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/'
xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n -e "$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e "$sed_remove_outer_brackets" | sed -e 1q`
if test -z "$xver" && test -f intl/VERSION; then
xver=`cat intl/VERSION | LC_ALL=C sed -n -e 's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'`
fi
if test -n "$xver"; then
if test -n "$ver"; then
if test "X$ver" != "X$xver"; then
func_fatal_error "Version mismatch: specified -V $ver but the package uses gettext version $xver"
fi
else
ver="$xver"
fi
else
if test -z "$ver"; then
func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using"
fi
fi
# Check whether the version number is supported.
case "$ver" in
0.10.35 | 0.10.36 | 0.10.37 | 0.10.38 | 0.10.39 | 0.10.40 | \
0.11 | 0.11.1 | 0.11.2 | 0.11.3 | 0.11.4 | 0.11.5 | \
0.12 | 0.12.1 | \
0.13 | 0.13.1 | \
0.14 | 0.14.1 | 0.14.2 | 0.14.3 | 0.14.4 | 0.14.5 | 0.14.6 | \
0.15 | \
0.16 | 0.16.1 | \
0.17 | \
0.18 | 0.18.1 )
;;
*)
func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your $configure_in
file requires the infrastructure from gettext-$ver but this version
is older. Please upgrade to gettext-$ver or newer."
;;
esac
# Check in which directory config.rpath, mkinstalldirs etc. belong.
auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
if test -n "$auxdir"; then
auxdir="$auxdir/"
fi
# Check in which directory the *.m4 macros belong.
m4dir=m4
if test -f Makefile.am; then
# A package using automake.
# Extract the macro directory name from Makefile.am.
aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
m4dir_is_next=
for arg in $aclocal_amflags; do
if test -n "$m4dir_is_next"; then
m4dir="$arg"
break
else
if test "X$arg" = "X-I"; then
m4dir_is_next=yes
else
m4dir_is_next=
fi
fi
done
fi
# Check whether to omit the intl/ directory.
omitintl=`cat "$configure_in" | grep '^AM_GNU_GETTEXT' | sed -n -e 's/^AM_GNU_GETTEXT(\([^(),]*\).*$/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
omitintl=`if test 'external' = "$omitintl"; then echo yes; fi`
# Check in which directory or directories the po/* infrastructure belongs.
sed_extract_config_files='s,#.*$,,
s,^dnl .*$,,
s, dnl .*$,,
/AC_CONFIG_FILES(/ {
ta
:a
s/)/)/
tb
s/\\$//
N
ba
:b
s,^.*AC_CONFIG_FILES([[ ]*\([^]"$`\\)]*\).*$,\1,p
}'
configfiles=`cat "$configure_in" | sed -n -e "$sed_extract_config_files"`
# PO directories have a Makefile.in generated from Makefile.in.in.
# Treat a directory as a PO directory if and only if it has a
# POTFILES.in file. This allows packages to have multiple PO
# directories under different names or in different locations.
sed_remove_Makefile_in='s,/Makefile\.in$,,'
podirs=`for f in $configfiles; do case "$f" in */Makefile.in) echo $f;; esac; done | sed -e "$sed_remove_Makefile_in"`
if test -z "$podirs"; then
# If we cannot get the list of PO directories from configure.ac, assume the
# common default.
podirs="po"
fi
# Set up a temporary checkout directory.
# Set variables
# - work_dir directory containing the temporary checkout
work_dir=tmpwrk$$
mkdir "$work_dir" || {
if test -d "$work_dir"; then
func_fatal_error "directory $work_dir already exists"
else
func_fatal_error "cannot create directory $work_dir"
fi
}
# We support three archive formats.
#
# Format | Size (KiB) for gettext-0.17 | Extra tools needed |
# -------+-----------------------------+--------------------+
# dir | 3000 | -- |
# cvs | 356 | cvs |
# git | 484 | git |
# -------+-----------------------------+--------------------+
case "git" in
dir)
# The archive of different versions is very large, but using it does not
# require special tools.
gzip -d -c < "$gettext_dir/archive.dir.tar.gz" | (cd "$work_dir" && tar xf - "gettext-$ver")
if test `find "$work_dir" -type f -print | wc -l` = 0; then
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
fi
mv "$work_dir/gettext-$ver" "$work_dir/archive"
;;
cvs)
# We distributed the many different versions of the files in a CVS
# repository. This guaranteed a good compression rate:
#
# Including version size in KB of
# "du autopoint-files/archive"
# 0.10.35 240
# 0.10.36 428
# 0.10.37 436
# 0.10.38 488
# 0.10.39 500
# 0.10.40 528
# 0.11 720
# 0.11.1 740
# 0.11.2 748
# 0.11.3 804
# 0.11.4 864
# 0.11.5 880
# 0.12 1032
# 0.12.1 1032
# 0.13 1220
# 0.13.1 1236
# 0.14 1296
# 0.14.1 1300
# 0.14.2 1420
# 0.14.3 1428
# 0.14.4 1464
# 0.14.5 1508
# 0.14.6 1580
# 0.15 1760
# 0.16 1808
# 0.16.1 1812
# 0.17 2128
# 0.18 2656
#
# The requirement that the user must have the CVS program available is not
# a severe restrictions, because most of the people who use autopoint are
# users of CVS.
#
# But the CVS format is now deprecated, because "cvs init" does not work in
# all circumstances
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
# and we are not allowed to distribute the cvs infrastructure files
# ourselves
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
#
# Check availability of the CVS program.
(cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found"
# Set up a temporary CVS repository.
# We need the temporary CVS repository because any checkout needs write
# access to the CVSROOT/history file, so it cannot be under $gettext_dir.
# We need the temporary checkout directory because when --force was not
# given, we need to compare the existing files with the checked out ones.
# Set variables
# - cvs_dir directory containing the temporary repository
cvs_dir=tmpcvs$$
# Use an umask of 077, to avoid attacks that work by overwriting files in
# the "$CVSROOT"/CVSROOT directory.
(umask 077 && mkdir "$cvs_dir") || {
if test -d "$cvs_dir"; then
func_fatal_error "directory $cvs_dir already exists"
else
func_fatal_error "cannot create directory $cvs_dir"
fi
}
CVSROOT="$srcdir/$cvs_dir"
unset CVS_CLIENT_LOG
unset CVS_CLIENT_PORT
unset CVS_IGNORE_REMOTE_ROOT
unset CVS_LOCAL_BRANCH_NUM
unset CVS_NOBASES
unset CVS_PASSFILE
unset CVS_PASSWORD
unset CVS_PROXY_PORT
unset CVS_RCMD_PORT
unset CVS_RSH
unset CVS_SERVER
unset CVS_SERVER_SLEEP
CVS_SIGN_COMMITS=
export CVS_SIGN_COMMITS
unset CVS_SSH
unset CVS_VERIFY_CHECKOUTS
unset CVS_VERIFY_TEMPLATE
unset CVSIGNORE
unset CVSREAD
unset CVSREADONLYFS
unset CVSUMASK
unset CVSWRAPPERS
# Need to pass -d "$CVSROOT", because there may be a CVS directory in the
# current directory.
cvs -d "$CVSROOT" init
gzip -d -c < "$gettext_dir/archive.cvs.tar.gz" | (cd "$cvs_dir" && tar xf -)
cd "$work_dir"
cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'`
(cvs -d "$CVSROOT" checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating'
find archive -name CVS -type d -print | xargs rm -rf
cd ..
rm -rf "$cvs_dir"
# Check that really all CVS directories are gone, otherwise we would overwrite
# the contents of the user's CVS directories.
if test `find $work_dir/archive -name CVS -type d -print | wc -l` != 0; then
rm -rf "$work_dir"
func_fatal_error "failed to remove all CVS subdirectories"
fi
if test `find $work_dir/archive -type f -print | wc -l` = 0; then
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
fi
;;
git)
# Check availability of the git program.
(git --version) >/dev/null 2>/dev/null || func_fatal_error "git program not found"
mkdir "$work_dir/archive"
gzip -d -c < "$gettext_dir/archive.git.tar.gz" | (cd "$work_dir/archive" && tar xf -)
(cd "$work_dir/archive" && git checkout -q "gettext-$ver") || {
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
}
(cd "$work_dir/archive" && rm -rf .git .gitignore)
;;
esac
# func_destfile file
# determines the destination file, relative to the package's top level
# directory, for a given file name, relative to archive.
# Sets variables
# - destfile relative destination file name, or
# empty if the file shall be omitted
# - sharedowner yes if the file is not only owned by GNU gettext but may
# be installed by automake or other tools, otherwise empty
# - allpodirs yes if the file is to be installed in every dir in $podirs
func_destfile ()
{
# There are five categories of files:
# ABOUT_NLS -> top level directory
# config.rpath mkinstalldirs -> $auxdir
# m4/* -> $m4dir/
# intl/* -> intl/
# po/* ->
sharedowner=
allpodirs=
case `echo "$1" | sed -e 's,[^/]*$,,'` in
"" )
case "$1" in
config.rpath ) destfile="$auxdir$1" ;;
mkinstalldirs ) destfile="$auxdir$1" sharedowner=yes ;;
* ) destfile="$1" ;;
esac
;;
m4/ ) destfile=`echo "$1" | sed -e "s,^m4/,$m4dir/,"` ;;
intl/ ) if test -n "$omitintl"; then destfile=""; else destfile="$1"; fi ;;
po/ ) destfile=`echo "$1" | sed -e "s,^po/,,"` allpodirs=yes ;;
* ) destfile="$1" ;;
esac
}
# func_compare existingfile gettextfile
# compares the existing file and the file from gettext, and decides whether the
# existing file should be overwritten with the file from gettext. Returns 0 if
# it should be overwritten, or 1 if it should be skipped.
sed_extract_serial='s/^#.* serial \([^ ]*\).*/\1/p
1q'
func_compare ()
{
if cmp -s "$1" "$2"; then
false
else
case "$2" in
*.m4)
# For interoperability with gnulib. gnulib often has newer versions of
# the *.m4 files than the latest gettext release. Don't overwrite a
# newer version from gnulib with an older version from the gettext
# release. The version can be retrieved from the first line, which
# looks like this: # file.m4 serial NN ...
existing_serial=`sed -n -e "$sed_extract_serial" < "$1"`
gettext_serial=`sed -n -e "$sed_extract_serial" < "$2"`
if test -n "$existing_serial" && test -n "$gettext_serial" \
&& test "$existing_serial" -ge "$gettext_serial" 2> /dev/null; then
false
else
true
fi
;;
*)
true
;;
esac
fi
}
# If some files have been locally modified and we have not been requested
# to overwrite them, then bail out. This is better than leaving a source
# package around where half of the files are locally modified and half are
# original - too great risk of version mismatch.
if test -z "$force"; then
mismatch=
func_tmpdir
mismatchfile="$tmp"/autopoint.diff
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
func_destfile "$file"
if test -n "$destfile"; then
func_compare_to_destfile ()
{
finaldestfile="$1"
if test -f "$finaldestfile"; then
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
if test -n "$sharedowner"; then
echo "autopoint: warning: File $finaldestfile has been locally modified." 1>&2
else
echo "autopoint: File $finaldestfile has been locally modified." 1>&2
mismatch=yes
diff -c "$work_dir/archive/$file" "$finaldestfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
fi
fi
fi
}
if test -n "$allpodirs"; then
for dir in $podirs; do
func_compare_to_destfile "$dir/$destfile"
done
else
func_compare_to_destfile "$destfile"
fi
fi
done
if test -n "$mismatch"; then
rm -rf "$work_dir"
func_fatal_error "Some files have been locally modified. Not overwriting them because --force has not been specified. For your convenience, you find the local modifications in the file '$mismatchfile'."
fi
rm -rf "$tmp"
fi
# func_mkdir_for to
# ensures the directory that would the given file exists.
# 'to' is a relative pathname, relative to the current directory.
func_mkdir_for ()
{
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
if test "X$base" != "X$1" && test -n "$base"; then
func_mkdir_for "$base"
# Recompute base. It was clobbered by the recursive call.
base=`echo "$1" | sed -e 's,/[^/]*$,,'`
test -d "$base" || { echo "Creating directory $base"; mkdir "$base"; }
fi
}
# func_copy from to
# copies a file.
# 'from' is a relative pathname, relative to the current directory.
# 'to' is a relative pathname, relative to the current directory.
func_copy ()
{
if $doit; then
func_mkdir_for "$2"
rm -f "$2"
echo "Copying file $2"
cp "$1" "$2"
else
echo "Copy file $2"
fi
}
# func_backup to
# makes a backup of a file that is about to be overwritten or replaced.
# 'to' is a relative pathname, relative to the current directory.
func_backup ()
{
if $doit; then
if test -f "$1"; then
rm -f "$1~"
cp -p "$1" "$1~"
fi
fi
}
# Now copy the files.
for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/archive/,," | LC_ALL=C sort`; do
func_destfile "$file"
if test -n "$destfile"; then
func_copy_to_destfile ()
{
finaldestfile="$1"
mustcopy=
if test -f "$finaldestfile"; then
if func_compare "$finaldestfile" "$work_dir/archive/$file"; then
if test -n "$force"; then
# Overwrite locally modified file.
mustcopy=yes
fi
# If --force is not specified, don't overwrite locally modified files
# for which GNU gettext is a shared owner.
fi
else
mustcopy=yes
fi
if test -n "$mustcopy"; then
func_backup "$finaldestfile"
func_copy "$work_dir/archive/$file" "$finaldestfile"
fi
}
if test -n "$allpodirs"; then
for dir in $podirs; do
func_copy_to_destfile "$dir/$destfile"
done
else
func_copy_to_destfile "$destfile"
fi
fi
done
# That's it.
rm -rf "$work_dir"
exit 0
Binary file not shown.
Binary file not shown.
-123
View File
@@ -1,123 +0,0 @@
#! /bin/sh
#
# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
# Find a way to echo strings without interpreting backslash.
if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
echo='echo'
else
if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
echo='printf %s\n'
else
echo_func () {
cat <<EOT
$*
EOT
}
echo='echo_func'
fi
fi
# This script is primarily a shell function library. In order for
# ". gettext.sh" to find it, we install it in $PREFIX/bin (that is usually
# contained in $PATH), rather than in some other location such as
# $PREFIX/share/sh-scripts or $PREFIX/share/gettext. In order to not violate
# the Filesystem Hierarchy Standard when doing so, this script is executable.
# Therefore it needs to support the standard --help and --version.
if test -z "$ZSH_VERSION"; then
# zsh is not POSIX compliant: By default, while ". gettext.sh" is executed,
# it sets $0 to "gettext.sh", defeating the purpose of this test. But
# fortunately we know that when running under zsh, this script is always
# being sourced, not executed, because hardly anyone is crazy enough to
# install zsh as /bin/sh.
case "$0" in
gettext.sh | */gettext.sh | *\\gettext.sh)
progname=$0
package=gettext-runtime
version=0.18.1
# func_usage
# outputs to stdout the --help usage message.
func_usage ()
{
echo "GNU gettext shell script function library version $version"
echo "Usage: . gettext.sh"
}
# func_version
# outputs to stdout the --version message.
func_version ()
{
echo "$progname (GNU $package) $version"
echo "Copyright (C) 2003-2007 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
echo "Written by" "Bruno Haible"
}
if test $# = 1; then
case "$1" in
--help | --hel | --he | --h )
func_usage; exit 0 ;;
--version | --versio | --versi | --vers | --ver | --ve | --v )
func_version; exit 0 ;;
esac
fi
func_usage 1>&2
exit 1
;;
esac
fi
# eval_gettext MSGID
# looks up the translation of MSGID and substitutes shell variables in the
# result.
eval_gettext () {
gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
}
# eval_ngettext MSGID MSGID-PLURAL COUNT
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
# shell variables in the result.
eval_ngettext () {
ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
}
# Note: This use of envsubst is much safer than using the shell built-in 'eval'
# would be.
# 1) The security problem with Chinese translations that happen to use a
# character such as \xe0\x60 is avoided.
# 2) The security problem with malevolent translators who put in command lists
# like "$(...)" or "`...`" is avoided.
# 3) The translations can only refer to shell variables that are already
# mentioned in MSGID or MSGID-PLURAL.
#
# Note: "export PATH" above is a dummy; this is for the case when
# `envsubst --variables ...` returns nothing.
#
# Note: In eval_ngettext above, "$1 $2" means a string whose variables set is
# the union of the variables set of "$1" and "$2".
#
# Note: The minimal use of backquote above ensures that trailing newlines are
# not dropped, not from the gettext invocation and not from the value of any
# shell variable.
#
# Note: Field splitting on the `envsubst --variables ...` result is desired,
# since envsubst outputs the variables, separated by newlines. Pathname
# wildcard expansion or tilde expansion has no effect here, since the words
# output by "envsubst --variables ..." consist solely of alphanumeric
# characters and underscore.
File diff suppressed because it is too large. Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-177
View File
@@ -1,177 +0,0 @@
--- gettext-runtime/intl/printf.c
+++ gettext-runtime/intl/printf.c
@@ -69,7 +69,7 @@
#define STATIC static
/* This needs to be consistent with libgnuintl.h.in. */
-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__
/* Don't break __attribute__((format(printf,M,N))).
This redefinition is only possible because the libc in NetBSD, Cygwin,
mingw does not have a function __printf__. */
--- gettext-runtime/intl/libgnuintl.h.in
+++ gettext-runtime/intl/libgnuintl.h.in
@@ -330,7 +330,7 @@
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
#undef printf
-#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__
/* Don't break __attribute__((format(printf,M,N))).
This redefinition is only possible because the libc in NetBSD, Cygwin,
mingw does not have a function __printf__.
---- gettext-tools/gnulib-lib/clean-temp.c
+++ gettext-tools/gnulib-lib/clean-temp.c
@@ -66,9 +66,11 @@
# endif
#endif
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
#if !GNULIB_FCNTL_SAFER
/* The results of open() in this file are not used with fchdir,
--- gettext-tools/gnulib-lib/fstrcmp.c
+++ gettext-tools/gnulib-lib/fstrcmp.c
@@ -55,9 +55,11 @@
#include "minmax.h"
#include "xalloc.h"
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
#define ELEMENT char
--- gettext-tools/gnulib-lib/gl_array_list.c
+++ gettext-tools/gnulib-lib/gl_array_list.c
@@ -55,9 +55,11 @@
/* Checked size_t computations. */
#include "xsize.h"
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
/* -------------------------- gl_list_t Data Type -------------------------- */
--- gettext-tools/gnulib-lib/gl_linkedhash_list.c
+++ gettext-tools/gnulib-lib/gl_linkedhash_list.c
@@ -55,9 +55,11 @@
#include "xsize.h"
+#ifndef _WIN64
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
+#endif
#define WITH_HASHTABLE 1
--- gettext-tools/gnulib-lib/stdio.in.h
+++ gettext-tools/gnulib-lib/stdio.in.h
@@ -642,10 +642,6 @@
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
|| (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
# if defined __GNUC__
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-/* Don't break __attribute__((format(printf,M,N))). */
-# define printf __printf__
-# endif
_GL_FUNCDECL_RPL_1 (__printf__, int,
(const char *format, ...)
__asm__ (@ASM_SYMBOL_PREFIX@
--- gettext-tools/gnulib-lib/tempname.c
+++ gettext-tools/gnulib-lib/tempname.c
@@ -54,6 +54,10 @@
#include <stdint.h>
#include <unistd.h>
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#include <sys/stat.h>
#if _LIBC
@@ -73,6 +73,10 @@
# define __xstat64(version, file, buf) stat (file, buf)
#endif
+#ifdef _WIN32
+# define mkdir(path,mode) _mkdir(path)
+#endif
+
#if ! (HAVE___SECURE_GETENV || _LIBC)
# define __secure_getenv getenv
#endif
--- gettext-tools/src/write-java.c
+++ gettext-tools/src/write-java.c
@@ -30,6 +30,10 @@
#include <stdio.h>
#include <string.h>
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#include <sys/stat.h>
#if !defined S_ISDIR && defined S_IFDIR
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
@@ -53,6 +53,10 @@
# define S_IXUSR 00100
#endif
+#ifdef _WIN32
+# define mkdir(path,mode) _mkdir(path)
+#endif
+
#include "c-ctype.h"
#include "error.h"
#include "xerror.h"
--- gettext-tools/src/write-csharp.c
+++ gettext-tools/src/write-csharp.c
@@ -29,6 +29,10 @@
#include <stdio.h>
#include <string.h>
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#include <sys/stat.h>
#if !defined S_ISDIR && defined S_IFDIR
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
@@ -70,6 +70,10 @@
# define S_IXOTH (S_IXUSR >> 6)
#endif
+#ifdef _WIN32
+# define mkdir(path,mode) _mkdir(path)
+#endif
+
#include "c-ctype.h"
#include "relocatable.h"
#include "error.h"
--- gettext-tools/woe32dll/export.h
+++ gettext-tools/woe32dll/export.h
@@ -90,7 +90,11 @@
--export-all-symbols is used. */
/* IMP(x) is a symbol that contains the address of x. */
+#ifdef _WIN64
+#define IMP(x) __imp_##x
+#else
#define IMP(x) _imp__##x
+#endif
/* Ensure that the variable x is exported from the library, and that a
pseudo-variable IMP(x) is available. */
-66
View File
@@ -1,66 +0,0 @@
/* Class autosprintf - formatted output to an ostream.
Copyright (C) 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef _AUTOSPRINTF_H
#define _AUTOSPRINTF_H
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
#endif
#include <string>
#include <iostream>
namespace gnu
{
/* A temporary object, usually allocated on the stack, representing
the result of an asprintf() call. */
class autosprintf
{
public:
/* Constructor: takes a format string and the printf arguments. */
autosprintf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
/* Copy constructor. */
autosprintf (const autosprintf& src);
/* Destructor: frees the temporarily allocated string. */
~autosprintf ();
/* Conversion to string. */
operator char * () const;
operator std::string () const;
/* Output to an ostream. */
friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
{
stream << (tmp.str ? tmp.str : "(error in autosprintf)");
return stream;
}
private:
char *str;
};
}
#endif /* _AUTOSPRINTF_H */
-357
View File
@@ -1,357 +0,0 @@
/* Public API for GNU gettext PO files - contained in libgettextpo.
Copyright (C) 2003-2008, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GETTEXT_PO_H
#define _GETTEXT_PO_H 1
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/* =========================== Meta Information ============================ */
/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBGETTEXTPO_VERSION 0x001201
extern __declspec (dllimport) int libgettextpo_version;
/* ================================= Types ================================= */
/* A po_file_t represents the contents of a PO file. */
typedef struct po_file *po_file_t;
/* A po_message_iterator_t represents an iterator through a domain of a
PO file. */
typedef struct po_message_iterator *po_message_iterator_t;
/* A po_message_t represents a message in a PO file. */
typedef struct po_message *po_message_t;
/* A po_filepos_t represents a string's position within a source file. */
typedef struct po_filepos *po_filepos_t;
/* A po_error_handler handles error situations. */
struct po_error_handler
{
/* Signal an error. The error message is built from FORMAT and the following
arguments. ERRNUM, if nonzero, is an errno value.
Must increment the error_message_count variable declared in error.h.
Must not return if STATUS is nonzero. */
void (*error) (int status, int errnum,
const char *format, ...)
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
__attribute__ ((__format__ (__printf__, 3, 4)))
#endif
;
/* Signal an error. The error message is built from FORMAT and the following
arguments. The error location is at FILENAME line LINENO. ERRNUM, if
nonzero, is an errno value.
Must increment the error_message_count variable declared in error.h.
Must not return if STATUS is nonzero. */
void (*error_at_line) (int status, int errnum,
const char *filename, unsigned int lineno,
const char *format, ...)
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
__attribute__ ((__format__ (__printf__, 5, 6)))
#endif
;
/* Signal a multiline warning. The PREFIX applies to all lines of the
MESSAGE. Free the PREFIX and MESSAGE when done. */
void (*multiline_warning) (char *prefix, char *message);
/* Signal a multiline error. The PREFIX applies to all lines of the
MESSAGE. Free the PREFIX and MESSAGE when done.
Must increment the error_message_count variable declared in error.h if
PREFIX is non-NULL. */
void (*multiline_error) (char *prefix, char *message);
};
typedef const struct po_error_handler *po_error_handler_t;
/* A po_xerror_handler handles warnings, error and fatal error situations. */
#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */
#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */
#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */
struct po_xerror_handler
{
/* Signal a problem of the given severity.
MESSAGE and/or FILENAME + LINENO indicate where the problem occurred.
If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored.
If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored.
If COLUMN is (size_t)(-1), it should be ignored.
MESSAGE_TEXT is the problem description (if MULTILINE_P is true,
multiple lines of text, each terminated with a newline, otherwise
usually a single line).
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
void (*xerror) (int severity,
po_message_t message,
const char *filename, size_t lineno, size_t column,
int multiline_p, const char *message_text);
/* Signal a problem that refers to two messages.
Similar to two calls to xerror.
If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to
MESSAGE_TEXT2. */
void (*xerror2) (int severity,
po_message_t message1,
const char *filename1, size_t lineno1, size_t column1,
int multiline_p1, const char *message_text1,
po_message_t message2,
const char *filename2, size_t lineno2, size_t column2,
int multiline_p2, const char *message_text2);
};
typedef const struct po_xerror_handler *po_xerror_handler_t;
/* Memory allocation:
The memory allocations performed by these functions use xmalloc(),
therefore will cause a program exit if memory is exhausted.
The memory allocated by po_file_read, and implicitly returned through
the po_message_* functions, lasts until freed with po_file_free. */
/* ============================= po_file_t API ============================= */
/* Create an empty PO file representation in memory. */
extern po_file_t po_file_create (void);
/* Read a PO file into memory.
Return its contents. Upon failure, return NULL and set errno. */
#define po_file_read po_file_read_v3
extern po_file_t po_file_read (const char *filename,
po_xerror_handler_t handler);
/* Write an in-memory PO file to a file.
Upon failure, return NULL and set errno. */
#define po_file_write po_file_write_v2
extern po_file_t po_file_write (po_file_t file, const char *filename,
po_xerror_handler_t handler);
/* Free a PO file from memory. */
extern void po_file_free (po_file_t file);
/* Return the names of the domains covered by a PO file in memory. */
extern const char * const * po_file_domains (po_file_t file);
/* =========================== Header entry API ============================ */
/* Return the header entry of a domain of a PO file in memory.
The domain NULL denotes the default domain.
Return NULL if there is no header entry. */
extern const char * po_file_domain_header (po_file_t file, const char *domain);
/* Return the value of a field in a header entry.
The return value is either a freshly allocated string, to be freed by the
caller, or NULL. */
extern char * po_header_field (const char *header, const char *field);
/* Return the header entry with a given field set to a given value. The field
is added if necessary.
The return value is a freshly allocated string. */
extern char * po_header_set_field (const char *header, const char *field, const char *value);
/* ======================= po_message_iterator_t API ======================= */
/* Create an iterator for traversing a domain of a PO file in memory.
The domain NULL denotes the default domain. */
extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain);
/* Free an iterator. */
extern void po_message_iterator_free (po_message_iterator_t iterator);
/* Return the next message, and advance the iterator.
Return NULL at the end of the message list. */
extern po_message_t po_next_message (po_message_iterator_t iterator);
/* Insert a message in a PO file in memory, in the domain and at the position
indicated by the iterator. The iterator thereby advances past the freshly
inserted message. */
extern void po_message_insert (po_message_iterator_t iterator, po_message_t message);
/* =========================== po_message_t API ============================ */
/* Return a freshly constructed message.
To finish initializing the message, you must set the msgid and msgstr. */
extern po_message_t po_message_create (void);
/* Return the context of a message, or NULL for a message not restricted to a
context. */
extern const char * po_message_msgctxt (po_message_t message);
/* Change the context of a message. NULL means a message not restricted to a
context. */
extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt);
/* Return the msgid (untranslated English string) of a message. */
extern const char * po_message_msgid (po_message_t message);
/* Change the msgid (untranslated English string) of a message. */
extern void po_message_set_msgid (po_message_t message, const char *msgid);
/* Return the msgid_plural (untranslated English plural string) of a message,
or NULL for a message without plural. */
extern const char * po_message_msgid_plural (po_message_t message);
/* Change the msgid_plural (untranslated English plural string) of a message.
NULL means a message without plural. */
extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural);
/* Return the msgstr (translation) of a message.
Return the empty string for an untranslated message. */
extern const char * po_message_msgstr (po_message_t message);
/* Change the msgstr (translation) of a message.
Use an empty string to denote an untranslated message. */
extern void po_message_set_msgstr (po_message_t message, const char *msgstr);
/* Return the msgstr[index] for a message with plural handling, or
NULL when the index is out of range or for a message without plural. */
extern const char * po_message_msgstr_plural (po_message_t message, int index);
/* Change the msgstr[index] for a message with plural handling.
Use a NULL value at the end to reduce the number of plural forms. */
extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr);
/* Return the comments for a message. */
extern const char * po_message_comments (po_message_t message);
/* Change the comments for a message.
comments should be a multiline string, ending in a newline, or empty. */
extern void po_message_set_comments (po_message_t message, const char *comments);
/* Return the extracted comments for a message. */
extern const char * po_message_extracted_comments (po_message_t message);
/* Change the extracted comments for a message.
comments should be a multiline string, ending in a newline, or empty. */
extern void po_message_set_extracted_comments (po_message_t message, const char *comments);
/* Return the i-th file position for a message, or NULL if i is out of
range. */
extern po_filepos_t po_message_filepos (po_message_t message, int i);
/* Remove the i-th file position from a message.
The indices of all following file positions for the message are decremented
by one. */
extern void po_message_remove_filepos (po_message_t message, int i);
/* Add a file position to a message, if it is not already present for the
message.
file is the file name.
start_line is the line number where the string starts, or (size_t)(-1) if no
line number is available. */
extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line);
/* Return the previous context of a message, or NULL for none. */
extern const char * po_message_prev_msgctxt (po_message_t message);
/* Change the previous context of a message. NULL is allowed. */
extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt);
/* Return the previous msgid (untranslated English string) of a message, or
NULL for none. */
extern const char * po_message_prev_msgid (po_message_t message);
/* Change the previous msgid (untranslated English string) of a message.
NULL is allowed. */
extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid);
/* Return the previous msgid_plural (untranslated English plural string) of a
message, or NULL for none. */
extern const char * po_message_prev_msgid_plural (po_message_t message);
/* Change the previous msgid_plural (untranslated English plural string) of a
message. NULL is allowed. */
extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural);
/* Return true if the message is marked obsolete. */
extern int po_message_is_obsolete (po_message_t message);
/* Change the obsolete mark of a message. */
extern void po_message_set_obsolete (po_message_t message, int obsolete);
/* Return true if the message is marked fuzzy. */
extern int po_message_is_fuzzy (po_message_t message);
/* Change the fuzzy mark of a message. */
extern void po_message_set_fuzzy (po_message_t message, int fuzzy);
/* Return true if the message is marked as being a format string of the given
type (e.g. "c-format"). */
extern int po_message_is_format (po_message_t message, const char *format_type);
/* Change the format string mark for a given type of a message. */
extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value);
/* If a numeric range of a message is set, return true and store the minimum
and maximum value in *MINP and *MAXP. */
extern int po_message_is_range (po_message_t message, int *minp, int *maxp);
/* Change the numeric range of a message. MIN and MAX must be non-negative,
with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a
message. */
extern void po_message_set_range (po_message_t message, int min, int max);
/* =========================== po_filepos_t API ============================ */
/* Return the file name. */
extern const char * po_filepos_file (po_filepos_t filepos);
/* Return the line number where the string starts, or (size_t)(-1) if no line
number is available. */
extern size_t po_filepos_start_line (po_filepos_t filepos);
/* ============================ Format type API ============================= */
/* Return a NULL terminated array of the supported format types. */
extern const char * const * po_format_list (void);
/* Return the pretty name associated with a format type.
For example, for "csharp-format", return "C#".
Return NULL if the argument is not a supported format type. */
extern const char * po_format_pretty_name (const char *format_type);
/* ============================= Checking API ============================== */
/* Test whether an entire file PO file is valid, like msgfmt does it.
If it is invalid, pass the reasons to the handler. */
extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler);
/* Test a single message, to be inserted in a PO file in memory, like msgfmt
does it. If it is invalid, pass the reasons to the handler. The iterator
is not modified by this call; it only specifies the file and the domain. */
extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler);
/* Test whether the message translation is a valid format string if the message
is marked as being a format string. If it is invalid, pass the reasons to
the handler. */
#define po_message_check_format po_message_check_format_v2
extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler);
#ifdef __cplusplus
}
#endif
#endif /* _GETTEXT_PO_H */
-464
View File
@@ -1,464 +0,0 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
#include <locale.h>
#if (defined __APPLE__ && defined __MACH__) && 0
# include <xlocale.h>
#endif
/* The LC_MESSAGES locale category is the category used by the functions
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
On systems that don't define it, use an arbitrary value instead.
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
then includes <libintl.h> (i.e. this file!) and then only defines
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
in this case. */
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
# define LC_MESSAGES 1729
#endif
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
/* Provide information about the supported file formats. Returns the
maximum minor revision number supported for a given major revision. */
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
((major) == 0 || (major) == 1 ? 1 : -1)
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBINTL_VERSION 0x001201
extern int libintl_version;
/* We redirect the functions to those prefixed with "libintl_". This is
necessary, because some systems define gettext/textdomain/... in the C
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
If we used the unprefixed names, there would be cases where the
definition in the C library would override the one in the libintl.so
shared library. Recall that on ELF systems, the symbols are looked
up in the following order:
1. in the executable,
2. in the shared libraries specified on the link command line, in order,
3. in the dependencies of the shared libraries specified on the link
command line,
4. in the dlopen()ed shared libraries, in the order in which they were
dlopen()ed.
The definition in the C library would override the one in libintl.so if
either
* -lc is given on the link command line and -lintl isn't, or
* -lc is given on the link command line before -lintl, or
* libintl.so is a dependency of a dlopen()ed shared library but not
linked to the executable at link time.
Since Solaris gettext() behaves differently than GNU gettext(), this
would be unacceptable.
The redirection happens by default through macros in C, so that &gettext
is independent of the compilation unit, but through inline functions in
C++, in order not to interfere with the name mangling of class fields or
class methods called 'gettext'. */
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
If he doesn't, we choose the method. A third possible method is
_INTL_REDIRECT_ASM, supported only by GCC. */
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
# define _INTL_REDIRECT_ASM
# else
# ifdef __cplusplus
# define _INTL_REDIRECT_INLINE
# else
# define _INTL_REDIRECT_MACROS
# endif
# endif
#endif
/* Auxiliary macros. */
#ifdef _INTL_REDIRECT_ASM
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
# define _INTL_STRINGIFY(prefix) #prefix
#else
# define _INTL_ASM(cname)
#endif
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
its n-th argument literally. This enables GCC to warn for example about
printf (gettext ("foo %y")). */
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
#else
# define _INTL_MAY_RETURN_STRING_ARG(n)
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_gettext (const char *__msgid)
_INTL_MAY_RETURN_STRING_ARG (1);
static inline char *gettext (const char *__msgid)
{
return libintl_gettext (__msgid);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define gettext libintl_gettext
#endif
extern char *gettext (const char *__msgid)
_INTL_ASM (libintl_gettext)
_INTL_MAY_RETURN_STRING_ARG (1);
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
_INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dgettext (const char *__domainname, const char *__msgid)
{
return libintl_dgettext (__domainname, __msgid);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dgettext libintl_dgettext
#endif
extern char *dgettext (const char *__domainname, const char *__msgid)
_INTL_ASM (libintl_dgettext)
_INTL_MAY_RETURN_STRING_ARG (2);
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
int __category)
_INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dcgettext (const char *__domainname, const char *__msgid,
int __category)
{
return libintl_dcgettext (__domainname, __msgid, __category);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dcgettext libintl_dcgettext
#endif
extern char *dcgettext (const char *__domainname, const char *__msgid,
int __category)
_INTL_ASM (libintl_dcgettext)
_INTL_MAY_RETURN_STRING_ARG (2);
#endif
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
{
return libintl_ngettext (__msgid1, __msgid2, __n);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define ngettext libintl_ngettext
#endif
extern char *ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_ASM (libintl_ngettext)
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
#endif
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
{
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dngettext libintl_dngettext
#endif
extern char *dngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_ASM (libintl_dngettext)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
#endif
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
{
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dcngettext libintl_dcngettext
#endif
extern char *dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
_INTL_ASM (libintl_dcngettext)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
#endif
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_textdomain (const char *__domainname);
static inline char *textdomain (const char *__domainname)
{
return libintl_textdomain (__domainname);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define textdomain libintl_textdomain
#endif
extern char *textdomain (const char *__domainname)
_INTL_ASM (libintl_textdomain);
#endif
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bindtextdomain (const char *__domainname,
const char *__dirname);
static inline char *bindtextdomain (const char *__domainname,
const char *__dirname)
{
return libintl_bindtextdomain (__domainname, __dirname);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define bindtextdomain libintl_bindtextdomain
#endif
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
_INTL_ASM (libintl_bindtextdomain);
#endif
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
const char *__codeset);
static inline char *bind_textdomain_codeset (const char *__domainname,
const char *__codeset)
{
return libintl_bind_textdomain_codeset (__domainname, __codeset);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
#endif
extern char *bind_textdomain_codeset (const char *__domainname,
const char *__codeset)
_INTL_ASM (libintl_bind_textdomain_codeset);
#endif
/* Support for format strings with positions in *printf(), following the
POSIX/XSI specification.
Note: These replacements for the *printf() functions are visible only
in source files that #include <libintl.h> or #include "gettext.h".
Packages that use *printf() in source files that don't refer to _()
or gettext() but for which the format string could be the return value
of _() or gettext() need to add this #include. Oh well. */
#if !0
#include <stdio.h>
#include <stddef.h>
/* Get va_list. */
#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
# include <stdarg.h>
#else
# include <varargs.h>
#endif
#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef fprintf
#define fprintf libintl_fprintf
extern int fprintf (FILE *, const char *, ...);
#endif
#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vfprintf
#define vfprintf libintl_vfprintf
extern int vfprintf (FILE *, const char *, va_list);
#endif
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
#undef printf
#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
/* Don't break __attribute__((format(printf,M,N))).
This redefinition is only possible because the libc in NetBSD, Cygwin,
mingw does not have a function __printf__.
Alternatively, we could have done this redirection only when compiling with
__GNUC__, together with a symbol redirection:
extern int printf (const char *, ...)
__asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
But doing it now would introduce a binary incompatibility with already
distributed versions of libintl on these systems. */
# define libintl_printf __printf__
#endif
#define printf libintl_printf
extern int printf (const char *, ...);
#endif
#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vprintf
#define vprintf libintl_vprintf
extern int vprintf (const char *, va_list);
#endif
#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef sprintf
#define sprintf libintl_sprintf
extern int sprintf (char *, const char *, ...);
#endif
#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vsprintf
#define vsprintf libintl_vsprintf
extern int vsprintf (char *, const char *, va_list);
#endif
#if 1
#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef snprintf
#define snprintf libintl_snprintf
extern int snprintf (char *, size_t, const char *, ...);
#endif
#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vsnprintf
#define vsnprintf libintl_vsnprintf
extern int vsnprintf (char *, size_t, const char *, va_list);
#endif
#endif
#if 0
#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef asprintf
#define asprintf libintl_asprintf
extern int asprintf (char **, const char *, ...);
#endif
#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vasprintf
#define vasprintf libintl_vasprintf
extern int vasprintf (char **, const char *, va_list);
#endif
#endif
#if 0
#undef fwprintf
#define fwprintf libintl_fwprintf
extern int fwprintf (FILE *, const wchar_t *, ...);
#undef vfwprintf
#define vfwprintf libintl_vfwprintf
extern int vfwprintf (FILE *, const wchar_t *, va_list);
#undef wprintf
#define wprintf libintl_wprintf
extern int wprintf (const wchar_t *, ...);
#undef vwprintf
#define vwprintf libintl_vwprintf
extern int vwprintf (const wchar_t *, va_list);
#undef swprintf
#define swprintf libintl_swprintf
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
#undef vswprintf
#define vswprintf libintl_vswprintf
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
#endif
#endif
/* Support for the locale chosen by the user. */
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
#undef setlocale
#define setlocale libintl_setlocale
extern char *setlocale (int, const char *);
#if 0
#undef newlocale
#define newlocale libintl_newlocale
extern locale_t newlocale (int, const char *, locale_t);
#endif
#endif
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
extern void
libintl_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif /* libintl.h */
-66
View File
@@ -1,66 +0,0 @@
/* Class autosprintf - formatted output to an ostream.
Copyright (C) 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef _AUTOSPRINTF_H
#define _AUTOSPRINTF_H
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
#endif
#include <string>
#include <iostream>
namespace gnu
{
/* A temporary object, usually allocated on the stack, representing
the result of an asprintf() call. */
class autosprintf
{
public:
/* Constructor: takes a format string and the printf arguments. */
autosprintf (const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
/* Copy constructor. */
autosprintf (const autosprintf& src);
/* Destructor: frees the temporarily allocated string. */
~autosprintf ();
/* Conversion to string. */
operator char * () const;
operator std::string () const;
/* Output to an ostream. */
friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp)
{
stream << (tmp.str ? tmp.str : "(error in autosprintf)");
return stream;
}
private:
char *str;
};
}
#endif /* _AUTOSPRINTF_H */
-357
View File
@@ -1,357 +0,0 @@
/* Public API for GNU gettext PO files - contained in libgettextpo.
Copyright (C) 2003-2008, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GETTEXT_PO_H
#define _GETTEXT_PO_H 1
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/* =========================== Meta Information ============================ */
/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBGETTEXTPO_VERSION 0x001201
extern int libgettextpo_version;
/* ================================= Types ================================= */
/* A po_file_t represents the contents of a PO file. */
typedef struct po_file *po_file_t;
/* A po_message_iterator_t represents an iterator through a domain of a
PO file. */
typedef struct po_message_iterator *po_message_iterator_t;
/* A po_message_t represents a message in a PO file. */
typedef struct po_message *po_message_t;
/* A po_filepos_t represents a string's position within a source file. */
typedef struct po_filepos *po_filepos_t;
/* A po_error_handler handles error situations. */
struct po_error_handler
{
/* Signal an error. The error message is built from FORMAT and the following
arguments. ERRNUM, if nonzero, is an errno value.
Must increment the error_message_count variable declared in error.h.
Must not return if STATUS is nonzero. */
void (*error) (int status, int errnum,
const char *format, ...)
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
__attribute__ ((__format__ (__printf__, 3, 4)))
#endif
;
/* Signal an error. The error message is built from FORMAT and the following
arguments. The error location is at FILENAME line LINENO. ERRNUM, if
nonzero, is an errno value.
Must increment the error_message_count variable declared in error.h.
Must not return if STATUS is nonzero. */
void (*error_at_line) (int status, int errnum,
const char *filename, unsigned int lineno,
const char *format, ...)
#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__
__attribute__ ((__format__ (__printf__, 5, 6)))
#endif
;
/* Signal a multiline warning. The PREFIX applies to all lines of the
MESSAGE. Free the PREFIX and MESSAGE when done. */
void (*multiline_warning) (char *prefix, char *message);
/* Signal a multiline error. The PREFIX applies to all lines of the
MESSAGE. Free the PREFIX and MESSAGE when done.
Must increment the error_message_count variable declared in error.h if
PREFIX is non-NULL. */
void (*multiline_error) (char *prefix, char *message);
};
typedef const struct po_error_handler *po_error_handler_t;
/* A po_xerror_handler handles warnings, error and fatal error situations. */
#define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */
#define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */
#define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */
struct po_xerror_handler
{
/* Signal a problem of the given severity.
MESSAGE and/or FILENAME + LINENO indicate where the problem occurred.
If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored.
If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored.
If COLUMN is (size_t)(-1), it should be ignored.
MESSAGE_TEXT is the problem description (if MULTILINE_P is true,
multiple lines of text, each terminated with a newline, otherwise
usually a single line).
Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */
void (*xerror) (int severity,
po_message_t message,
const char *filename, size_t lineno, size_t column,
int multiline_p, const char *message_text);
/* Signal a problem that refers to two messages.
Similar to two calls to xerror.
If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to
MESSAGE_TEXT2. */
void (*xerror2) (int severity,
po_message_t message1,
const char *filename1, size_t lineno1, size_t column1,
int multiline_p1, const char *message_text1,
po_message_t message2,
const char *filename2, size_t lineno2, size_t column2,
int multiline_p2, const char *message_text2);
};
typedef const struct po_xerror_handler *po_xerror_handler_t;
/* Memory allocation:
The memory allocations performed by these functions use xmalloc(),
therefore will cause a program exit if memory is exhausted.
The memory allocated by po_file_read, and implicitly returned through
the po_message_* functions, lasts until freed with po_file_free. */
/* ============================= po_file_t API ============================= */
/* Create an empty PO file representation in memory. */
extern po_file_t po_file_create (void);
/* Read a PO file into memory.
Return its contents. Upon failure, return NULL and set errno. */
#define po_file_read po_file_read_v3
extern po_file_t po_file_read (const char *filename,
po_xerror_handler_t handler);
/* Write an in-memory PO file to a file.
Upon failure, return NULL and set errno. */
#define po_file_write po_file_write_v2
extern po_file_t po_file_write (po_file_t file, const char *filename,
po_xerror_handler_t handler);
/* Free a PO file from memory. */
extern void po_file_free (po_file_t file);
/* Return the names of the domains covered by a PO file in memory. */
extern const char * const * po_file_domains (po_file_t file);
/* =========================== Header entry API ============================ */
/* Return the header entry of a domain of a PO file in memory.
The domain NULL denotes the default domain.
Return NULL if there is no header entry. */
extern const char * po_file_domain_header (po_file_t file, const char *domain);
/* Return the value of a field in a header entry.
The return value is either a freshly allocated string, to be freed by the
caller, or NULL. */
extern char * po_header_field (const char *header, const char *field);
/* Return the header entry with a given field set to a given value. The field
is added if necessary.
The return value is a freshly allocated string. */
extern char * po_header_set_field (const char *header, const char *field, const char *value);
/* ======================= po_message_iterator_t API ======================= */
/* Create an iterator for traversing a domain of a PO file in memory.
The domain NULL denotes the default domain. */
extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain);
/* Free an iterator. */
extern void po_message_iterator_free (po_message_iterator_t iterator);
/* Return the next message, and advance the iterator.
Return NULL at the end of the message list. */
extern po_message_t po_next_message (po_message_iterator_t iterator);
/* Insert a message in a PO file in memory, in the domain and at the position
indicated by the iterator. The iterator thereby advances past the freshly
inserted message. */
extern void po_message_insert (po_message_iterator_t iterator, po_message_t message);
/* =========================== po_message_t API ============================ */
/* Return a freshly constructed message.
To finish initializing the message, you must set the msgid and msgstr. */
extern po_message_t po_message_create (void);
/* Return the context of a message, or NULL for a message not restricted to a
context. */
extern const char * po_message_msgctxt (po_message_t message);
/* Change the context of a message. NULL means a message not restricted to a
context. */
extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt);
/* Return the msgid (untranslated English string) of a message. */
extern const char * po_message_msgid (po_message_t message);
/* Change the msgid (untranslated English string) of a message. */
extern void po_message_set_msgid (po_message_t message, const char *msgid);
/* Return the msgid_plural (untranslated English plural string) of a message,
or NULL for a message without plural. */
extern const char * po_message_msgid_plural (po_message_t message);
/* Change the msgid_plural (untranslated English plural string) of a message.
NULL means a message without plural. */
extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural);
/* Return the msgstr (translation) of a message.
Return the empty string for an untranslated message. */
extern const char * po_message_msgstr (po_message_t message);
/* Change the msgstr (translation) of a message.
Use an empty string to denote an untranslated message. */
extern void po_message_set_msgstr (po_message_t message, const char *msgstr);
/* Return the msgstr[index] for a message with plural handling, or
NULL when the index is out of range or for a message without plural. */
extern const char * po_message_msgstr_plural (po_message_t message, int index);
/* Change the msgstr[index] for a message with plural handling.
Use a NULL value at the end to reduce the number of plural forms. */
extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr);
/* Return the comments for a message. */
extern const char * po_message_comments (po_message_t message);
/* Change the comments for a message.
comments should be a multiline string, ending in a newline, or empty. */
extern void po_message_set_comments (po_message_t message, const char *comments);
/* Return the extracted comments for a message. */
extern const char * po_message_extracted_comments (po_message_t message);
/* Change the extracted comments for a message.
comments should be a multiline string, ending in a newline, or empty. */
extern void po_message_set_extracted_comments (po_message_t message, const char *comments);
/* Return the i-th file position for a message, or NULL if i is out of
range. */
extern po_filepos_t po_message_filepos (po_message_t message, int i);
/* Remove the i-th file position from a message.
The indices of all following file positions for the message are decremented
by one. */
extern void po_message_remove_filepos (po_message_t message, int i);
/* Add a file position to a message, if it is not already present for the
message.
file is the file name.
start_line is the line number where the string starts, or (size_t)(-1) if no
line number is available. */
extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line);
/* Return the previous context of a message, or NULL for none. */
extern const char * po_message_prev_msgctxt (po_message_t message);
/* Change the previous context of a message. NULL is allowed. */
extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt);
/* Return the previous msgid (untranslated English string) of a message, or
NULL for none. */
extern const char * po_message_prev_msgid (po_message_t message);
/* Change the previous msgid (untranslated English string) of a message.
NULL is allowed. */
extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid);
/* Return the previous msgid_plural (untranslated English plural string) of a
message, or NULL for none. */
extern const char * po_message_prev_msgid_plural (po_message_t message);
/* Change the previous msgid_plural (untranslated English plural string) of a
message. NULL is allowed. */
extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural);
/* Return true if the message is marked obsolete. */
extern int po_message_is_obsolete (po_message_t message);
/* Change the obsolete mark of a message. */
extern void po_message_set_obsolete (po_message_t message, int obsolete);
/* Return true if the message is marked fuzzy. */
extern int po_message_is_fuzzy (po_message_t message);
/* Change the fuzzy mark of a message. */
extern void po_message_set_fuzzy (po_message_t message, int fuzzy);
/* Return true if the message is marked as being a format string of the given
type (e.g. "c-format"). */
extern int po_message_is_format (po_message_t message, const char *format_type);
/* Change the format string mark for a given type of a message. */
extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value);
/* If a numeric range of a message is set, return true and store the minimum
and maximum value in *MINP and *MAXP. */
extern int po_message_is_range (po_message_t message, int *minp, int *maxp);
/* Change the numeric range of a message. MIN and MAX must be non-negative,
with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a
message. */
extern void po_message_set_range (po_message_t message, int min, int max);
/* =========================== po_filepos_t API ============================ */
/* Return the file name. */
extern const char * po_filepos_file (po_filepos_t filepos);
/* Return the line number where the string starts, or (size_t)(-1) if no line
number is available. */
extern size_t po_filepos_start_line (po_filepos_t filepos);
/* ============================ Format type API ============================= */
/* Return a NULL terminated array of the supported format types. */
extern const char * const * po_format_list (void);
/* Return the pretty name associated with a format type.
For example, for "csharp-format", return "C#".
Return NULL if the argument is not a supported format type. */
extern const char * po_format_pretty_name (const char *format_type);
/* ============================= Checking API ============================== */
/* Test whether an entire file PO file is valid, like msgfmt does it.
If it is invalid, pass the reasons to the handler. */
extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler);
/* Test a single message, to be inserted in a PO file in memory, like msgfmt
does it. If it is invalid, pass the reasons to the handler. The iterator
is not modified by this call; it only specifies the file and the domain. */
extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler);
/* Test whether the message translation is a valid format string if the message
is marked as being a format string. If it is invalid, pass the reasons to
the handler. */
#define po_message_check_format po_message_check_format_v2
extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler);
#ifdef __cplusplus
}
#endif
#endif /* _GETTEXT_PO_H */
-464
View File
@@ -1,464 +0,0 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
#include <locale.h>
#if (defined __APPLE__ && defined __MACH__) && 0
# include <xlocale.h>
#endif
/* The LC_MESSAGES locale category is the category used by the functions
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
On systems that don't define it, use an arbitrary value instead.
On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
then includes <libintl.h> (i.e. this file!) and then only defines
LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
in this case. */
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
# define LC_MESSAGES 1729
#endif
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
/* Provide information about the supported file formats. Returns the
maximum minor revision number supported for a given major revision. */
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
((major) == 0 || (major) == 1 ? 1 : -1)
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
precedence over _conio_gettext. */
#ifdef __DJGPP__
# undef gettext
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBINTL_VERSION 0x001201
extern int libintl_version;
/* We redirect the functions to those prefixed with "libintl_". This is
necessary, because some systems define gettext/textdomain/... in the C
library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
If we used the unprefixed names, there would be cases where the
definition in the C library would override the one in the libintl.so
shared library. Recall that on ELF systems, the symbols are looked
up in the following order:
1. in the executable,
2. in the shared libraries specified on the link command line, in order,
3. in the dependencies of the shared libraries specified on the link
command line,
4. in the dlopen()ed shared libraries, in the order in which they were
dlopen()ed.
The definition in the C library would override the one in libintl.so if
either
* -lc is given on the link command line and -lintl isn't, or
* -lc is given on the link command line before -lintl, or
* libintl.so is a dependency of a dlopen()ed shared library but not
linked to the executable at link time.
Since Solaris gettext() behaves differently than GNU gettext(), this
would be unacceptable.
The redirection happens by default through macros in C, so that &gettext
is independent of the compilation unit, but through inline functions in
C++, in order not to interfere with the name mangling of class fields or
class methods called 'gettext'. */
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
If he doesn't, we choose the method. A third possible method is
_INTL_REDIRECT_ASM, supported only by GCC. */
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
# define _INTL_REDIRECT_ASM
# else
# ifdef __cplusplus
# define _INTL_REDIRECT_INLINE
# else
# define _INTL_REDIRECT_MACROS
# endif
# endif
#endif
/* Auxiliary macros. */
#ifdef _INTL_REDIRECT_ASM
# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
# define _INTL_STRINGIFY(prefix) #prefix
#else
# define _INTL_ASM(cname)
#endif
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
its n-th argument literally. This enables GCC to warn for example about
printf (gettext ("foo %y")). */
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
#else
# define _INTL_MAY_RETURN_STRING_ARG(n)
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_gettext (const char *__msgid)
_INTL_MAY_RETURN_STRING_ARG (1);
static inline char *gettext (const char *__msgid)
{
return libintl_gettext (__msgid);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define gettext libintl_gettext
#endif
extern char *gettext (const char *__msgid)
_INTL_ASM (libintl_gettext)
_INTL_MAY_RETURN_STRING_ARG (1);
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
_INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dgettext (const char *__domainname, const char *__msgid)
{
return libintl_dgettext (__domainname, __msgid);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dgettext libintl_dgettext
#endif
extern char *dgettext (const char *__domainname, const char *__msgid)
_INTL_ASM (libintl_dgettext)
_INTL_MAY_RETURN_STRING_ARG (2);
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
int __category)
_INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dcgettext (const char *__domainname, const char *__msgid,
int __category)
{
return libintl_dcgettext (__domainname, __msgid, __category);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dcgettext libintl_dcgettext
#endif
extern char *dcgettext (const char *__domainname, const char *__msgid,
int __category)
_INTL_ASM (libintl_dcgettext)
_INTL_MAY_RETURN_STRING_ARG (2);
#endif
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
{
return libintl_ngettext (__msgid1, __msgid2, __n);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define ngettext libintl_ngettext
#endif
extern char *ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_ASM (libintl_ngettext)
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
#endif
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
{
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dngettext libintl_dngettext
#endif
extern char *dngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_ASM (libintl_dngettext)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
#endif
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
{
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define dcngettext libintl_dcngettext
#endif
extern char *dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
_INTL_ASM (libintl_dcngettext)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
#endif
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_textdomain (const char *__domainname);
static inline char *textdomain (const char *__domainname)
{
return libintl_textdomain (__domainname);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define textdomain libintl_textdomain
#endif
extern char *textdomain (const char *__domainname)
_INTL_ASM (libintl_textdomain);
#endif
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bindtextdomain (const char *__domainname,
const char *__dirname);
static inline char *bindtextdomain (const char *__domainname,
const char *__dirname)
{
return libintl_bindtextdomain (__domainname, __dirname);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define bindtextdomain libintl_bindtextdomain
#endif
extern char *bindtextdomain (const char *__domainname, const char *__dirname)
_INTL_ASM (libintl_bindtextdomain);
#endif
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_bind_textdomain_codeset (const char *__domainname,
const char *__codeset);
static inline char *bind_textdomain_codeset (const char *__domainname,
const char *__codeset)
{
return libintl_bind_textdomain_codeset (__domainname, __codeset);
}
#else
#ifdef _INTL_REDIRECT_MACROS
# define bind_textdomain_codeset libintl_bind_textdomain_codeset
#endif
extern char *bind_textdomain_codeset (const char *__domainname,
const char *__codeset)
_INTL_ASM (libintl_bind_textdomain_codeset);
#endif
/* Support for format strings with positions in *printf(), following the
POSIX/XSI specification.
Note: These replacements for the *printf() functions are visible only
in source files that #include <libintl.h> or #include "gettext.h".
Packages that use *printf() in source files that don't refer to _()
or gettext() but for which the format string could be the return value
of _() or gettext() need to add this #include. Oh well. */
#if !0
#include <stdio.h>
#include <stddef.h>
/* Get va_list. */
#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER
# include <stdarg.h>
#else
# include <varargs.h>
#endif
#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef fprintf
#define fprintf libintl_fprintf
extern int fprintf (FILE *, const char *, ...);
#endif
#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vfprintf
#define vfprintf libintl_vfprintf
extern int vfprintf (FILE *, const char *, va_list);
#endif
#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */
#undef printf
#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__
/* Don't break __attribute__((format(printf,M,N))).
This redefinition is only possible because the libc in NetBSD, Cygwin,
mingw does not have a function __printf__.
Alternatively, we could have done this redirection only when compiling with
__GNUC__, together with a symbol redirection:
extern int printf (const char *, ...)
__asm__ (#__USER_LABEL_PREFIX__ "libintl_printf");
But doing it now would introduce a binary incompatibility with already
distributed versions of libintl on these systems. */
# define libintl_printf __printf__
#endif
#define printf libintl_printf
extern int printf (const char *, ...);
#endif
#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vprintf
#define vprintf libintl_vprintf
extern int vprintf (const char *, va_list);
#endif
#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef sprintf
#define sprintf libintl_sprintf
extern int sprintf (char *, const char *, ...);
#endif
#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vsprintf
#define vsprintf libintl_vsprintf
extern int vsprintf (char *, const char *, va_list);
#endif
#if 1
#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef snprintf
#define snprintf libintl_snprintf
extern int snprintf (char *, size_t, const char *, ...);
#endif
#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vsnprintf
#define vsnprintf libintl_vsnprintf
extern int vsnprintf (char *, size_t, const char *, va_list);
#endif
#endif
#if 0
#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef asprintf
#define asprintf libintl_asprintf
extern int asprintf (char **, const char *, ...);
#endif
#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */
#undef vasprintf
#define vasprintf libintl_vasprintf
extern int vasprintf (char **, const char *, va_list);
#endif
#endif
#if 0
#undef fwprintf
#define fwprintf libintl_fwprintf
extern int fwprintf (FILE *, const wchar_t *, ...);
#undef vfwprintf
#define vfwprintf libintl_vfwprintf
extern int vfwprintf (FILE *, const wchar_t *, va_list);
#undef wprintf
#define wprintf libintl_wprintf
extern int wprintf (const wchar_t *, ...);
#undef vwprintf
#define vwprintf libintl_vwprintf
extern int vwprintf (const wchar_t *, va_list);
#undef swprintf
#define swprintf libintl_swprintf
extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
#undef vswprintf
#define vswprintf libintl_vswprintf
extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
#endif
#endif
/* Support for the locale chosen by the user. */
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
#undef setlocale
#define setlocale libintl_setlocale
extern char *setlocale (int, const char *);
#if 0
#undef newlocale
#define newlocale libintl_newlocale
extern locale_t newlocale (int, const char *, locale_t);
#endif
#endif
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
#define libintl_set_relocation_prefix libintl_set_relocation_prefix
extern void
libintl_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif /* libintl.h */
Binary file not shown.
-86
View File
@@ -1,86 +0,0 @@
#!/bin/sh
# Prints a package's identification PACKAGE VERSION or PACKAGE.
#
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
want_version="$1"
# NLS nuisances: Letter ranges are different in the Estonian locale.
LC_ALL=C
while true; do
if test -f configure; then
package=`(grep '^PACKAGE_NAME=' configure; grep '^ *PACKAGE=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
case "$package" in
*[\"\$\`\{\}]*)
# Some packages (gcal) retrieve the package name dynamically.
package=
;;
esac
if test -n "$package"; then
is_gnu=`LC_ALL=C grep "GNU $package" * 2>/dev/null | grep -v '^libtool:'`
if test -n "$is_gnu"; then
package="GNU $package"
fi
if test -n "$want_version"; then
version=`(grep '^PACKAGE_VERSION=' configure; grep '^ *VERSION=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
case "$version" in
*[\"\$\`\{\}]*)
# Some packages (gcal, gcc, clisp) retrieve the version dynamically.
version=
;;
esac
if test -n "$version"; then
echo "$package $version"
else
echo "$package"
fi
else
echo "$package"
fi
exit 0
fi
fi
dir=`basename \`pwd\``
case "$dir" in
i18n)
# This directory name, used in GNU make, is not the top level directory.
;;
*[A-Za-z]*[0-9]*)
package=`echo "$dir" | sed -e 's/^\([^0-9]*\)[0-9].*$/\1/' -e 's/[-_]$//'`
if test -n "$want_version"; then
version=`echo "$dir" | sed -e 's/^[^0-9]*\([0-9].*\)$/\1/'`
echo "$package $version"
else
echo "$package"
fi
exit 0
;;
esac
# Go to parent directory
last=`/bin/pwd`
cd ..
curr=`/bin/pwd`
if test "$last" = "$curr"; then
# Oops, didn't find the package name.
if test -n "$want_version"; then
echo "PACKAGE VERSION"
else
echo "PACKAGE"
fi
exit 0
fi
done
Binary file not shown.
-436
View File
@@ -1,436 +0,0 @@
#!/bin/sh
# Prints the user's email address, with confirmation from the user.
#
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Prerequisites for using ${exec_prefix}/lib and ${datarootdir}/locale.
prefix="/usr/local/i686-w64-mingw32/stow/gettext-0.18.1.1"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
datadir="${datarootdir}"
# Set variables libdir, localedir.
libdir="${exec_prefix}/lib"
localedir="${datarootdir}/locale"
# Support for relocatability.
if test "no" = yes; then
orig_installdir="$libdir"/gettext # see Makefile.am's install rule
# Determine curr_installdir without caring for symlinked callers.
curr_installdir=`echo "$0" | sed -e 's,/[^/]*$,,'`
curr_installdir=`cd "$curr_installdir" && pwd`
# Compute the original/current installation prefixes by stripping the
# trailing directories off the original/current installation directories.
while true; do
orig_last=`echo "$orig_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
curr_last=`echo "$curr_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
if test -z "$orig_last" || test -z "$curr_last"; then
break
fi
if test "$orig_last" != "$curr_last"; then
break
fi
orig_installdir=`echo "$orig_installdir" | sed -e 's,/[^/]*$,,'`
curr_installdir=`echo "$curr_installdir" | sed -e 's,/[^/]*$,,'`
done
# Now relocate the directory variables that we use.
libdir=`echo "$libdir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
localedir=`echo "$localedir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
fi
# Internationalization.
. gettext.sh
TEXTDOMAIN=gettext-tools
export TEXTDOMAIN
TEXTDOMAINDIR="$localedir"
export TEXTDOMAINDIR
# Redirect fileno 3 to interactive I/O.
exec 3>/dev/tty
# Output a prompt.
if test $# != 0; then
echo "$1" 1>&3
fi
# Find the user name on the local machine.
user=`id -u -n 2>/dev/null`
if test -z "$user"; then
user="$USER"
if test -z "$user"; then
user="$LOGNAME"
if test -z "$user"; then
user=unknown
fi
fi
fi
# Find the hostname.
# hostname on some systems (SVR3.2, old Linux) returns a bogus exit status,
# so uname gets run too, so we keep only the first line of output.
#host=`(hostname || uname -n) 2>/dev/null | sed 1q`
host=`"$libdir"/gettext/hostname --short 2>/dev/null | sed 1q`
# Find the hostname.
hostfqdn=`"$libdir"/gettext/hostname --fqdn 2>/dev/null | sed 1q`
# Find a list of email addresses from various mailer configuration files.
# All mailers use configuration files under $HOME. We handle them in a
# last-modified - first-priority order.
cd $HOME
files=""
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
# Mozilla Thunderbird addresses
files="$files .thunderbird/*/prefs.js"
# Mozilla addresses
files="$files .mozilla/*/prefs.js"
# Netscape 4 addresses
files="$files .netscape/liprefs.js .netscape/preferences.js"
# Netscape 3 addresses
files="$files .netscape/preferences"
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
# XEmacs mew addresses
files="$files .emacs .emacs.el"
# KDE2 addresses
files="$files .kde2/share/config/emaildefaults"
# KDE kmail addresses
files="$files .kde2/share/config/kmailrc"
# GNOME evolution 2 addresses
files="$files .gconf/apps/evolution/mail/%gconf.xml"
# GNOME evolution 1 addresses
files="$files evolution/config.xmldb"
# GNOME balsa addresses
files="$files .gnome/balsa"
# StarOffice and OpenOffice addresses
sed_dos2unix='s/\r$//'
sed_soffice51='s,StarOffice 5\.1=\(.*\)$,\1/sofficerc,p'
sed_soffice52='s,StarOffice 5\.2=\(.*\)$,\1/user/sofficerc,p'
sed_ooffice='s,^OpenOffice[^=]*=\(.*\)$,\1/user/config/registry/instance/org/openoffice/UserProfile.xml,p'
files="$files Office51/sofficerc Office52/user/sofficerc "`sed -n -e "$sed_dos2unix" -e "$sed_soffice51" -e "$sed_soffice52" -e "$sed_ooffice" .sversionrc 2>/dev/null | sed -e 's,^file://*,/,'`
# mutt addresses
files="$files .muttrc"
# pine addresses
files="$files .pinerc"
# xfmail addresses
files="$files .xfmail/.xfmailrc"
# tkrat addresses
files="$files .ratatosk/ratatoskrc"
# ----------------------- END MAILER SPECIFIC CODE -----------------------
# Expand wildcards and remove nonexistent files from the list.
nfiles=""
for file in $files; do
if test -r "$file" && test ! -d "$file"; then
nfiles="$nfiles $file"
fi
done
files="$nfiles"
addresses=""
if test -n "$files"; then
for file in `ls -t $files`; do
case "$file" in
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
# Mozilla and Mozilla Thunderbird addresses
.mozilla/*/prefs.js | .thunderbird/*/prefs.js)
addresses="$addresses "`grep -h '^user_pref("mail\.identity\..*\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\..*\.useremail", "\(.*\)");$/\1/'`
;;
# Netscape 4 addresses
.netscape/liprefs.js | .netscape/preferences.js)
addresses="$addresses "`grep -h '^user_pref("mail\.identity\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\.useremail", "\(.*\)");$/\1/'`
;;
# Netscape 3 addresses
.netscape/preferences)
addresses="$addresses "`grep -h '^EMAIL_ADDRESS:' $file 2>/dev/null | sed -e 's/^EMAIL_ADDRESS:[ ]*//'`
;;
.emacs | .emacs.el)
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
addresses="$addresses "`grep -h '[ (]user-mail-address "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]user-mail-address "\([^"]*\)".*$/\1/'`
# XEmacs mew addresses
domains=`grep -h '[ (]mew-mail-domain "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]mew-mail-domain "\([^"]*\)".*$/\1/'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@$domain"
done
fi
;;
# KDE2 addresses
.kde2/share/config/emaildefaults)
addresses="$addresses "`grep -h '^EmailAddress=' $file 2>/dev/null | sed -e 's/^EmailAddress=//'`
;;
# KDE kmail addresses
.kde2/share/config/kmailrc)
addresses="$addresses "`grep -h '^Email Address=' $file 2>/dev/null | sed -e 's/^Email Address=//'`
;;
# GNOME evolution 2 addresses
.gconf/apps/evolution/mail/%gconf.xml)
sedexpr0='s,^.*&lt;addr-spec&gt;\(.*\)&lt;/addr-spec&gt;.*$,\1,p'
addresses="$addresses "`sed -n -e "$sedexpr0" < $file`
;;
# GNOME evolution 1 addresses
evolution/config.xmldb)
sedexpr0='s/^.*<entry name="identity_address_[0-9]*" type="string" value="\([^"]*\)".*$/\1/p'
sedexpr1='s/\(..\)/\\x\1/g'
sedexpr2='s,$,\\n,'
addresses="$addresses "`sed -n -e "$sedexpr0" < $file | while read hexstring; do printf \`echo "$hexstring" | sed -e "$sedexpr1" -e "$sedexpr2"\`; done`
;;
# GNOME balsa addresses
.gnome/balsa)
addresses="$addresses "`grep -h '^Address=' $file 2>/dev/null | sed -e 's/^Address=//'`
;;
# OpenOffice addresses
*/UserProfile.xml)
addresses="$addresses "`sed -n -e 's,^.*<mail cfg:type="string">\(.*\)</mail>.*$,\1,p' $file 2>/dev/null`
;;
# StarOffice addresses
# Not a typo. They really write "Adress" with a single d.
# German orthography...
*/sofficerc)
addresses="$addresses "`grep -h '^User-Adress=' $file 2>/dev/null | sed -e 's/#[^#]*$//' -e 's/^.*#//'`
;;
# mutt addresses
.muttrc)
mutt_addresses=`grep -h '^set from="[^"]*"[ ]*$' $file 2>/dev/null | sed -e 's/^set from="\([^"]*\)"[ ]*$/\1/'`
if test -n "$mutt_addresses"; then
addresses="$addresses $mutt_addresses"
else
# mutt uses $EMAIL as fallback.
if test -n "$EMAIL"; then
addresses="$addresses $EMAIL"
fi
fi
;;
# pine addresses
.pinerc)
domains=`grep -h '^user-domain=' $file 2>/dev/null | sed -e 's/^user-domain=//'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@$domain"
done
else
# The use-only-domain-name option is only used if the user-domain option is not present.
domains=`grep -h '^use-only-domain-name=' $file 2>/dev/null | sed -e 's/^use-only-domain-name=//'`
if test "Yes" = "$domains"; then
addresses="$addresses ${user}@"`echo "$hostfqdn" | sed -e 's/^[^.]*\.//'`
fi
fi
;;
# xfmail addresses
.xfmail/.xfmailrc)
addresses="$addresses "`grep -h '^from=.*<.*>' $file 2>/dev/null | sed -e 's/^.*<\([^<>]*\)>.*$/\1/'`
;;
# tkrat addresses
.ratatosk/ratatoskrc)
domains=`grep -h '^set option(masquerade_as) ' $file 2>/dev/null | sed -e 's/^set option(masquerade_as) //'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@$domain"
done
else
# The domain option is used only if the masquerade_as option is not present.
domains=`grep -h '^set option(domain) ' $file 2>/dev/null | sed -e 's/^set option(domain) //'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@${host}.$domain"
done
fi
fi
;;
# ----------------------- END MAILER SPECIFIC CODE -----------------------
esac
done
fi
# Some Debian systems have a file /etc/mailname.
if test -r /etc/mailname; then
hostmailname=`cat /etc/mailname`
if test -n "$hostmailname"; then
addresses="$addresses ${user}@$hostmailname"
fi
fi
# SuSE Linux >= 8.0 systems have a file /etc/sysconfig/mail.
if test -r /etc/sysconfig/mail; then
hostmailname=`. /etc/sysconfig/mail && echo "$FROM_HEADER"`
if test -n "$hostmailname"; then
addresses="$addresses ${user}@$hostmailname"
fi
fi
# elm has no user-defined addresses.
# mailx has no user-defined addresses.
# mh has no user-defined addresses.
# They use the system default.
addresses="$addresses ${user}@$hostfqdn"
# Normalize addresses: remove addresses without @, lowercase the part after @,
# and remove duplicates.
lowercase_sed='{
h
s/^[^@]*@\(.*\)$/\1/
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
x
s/^\([^@]*\)@.*/\1@/
G
s/\
//
p
}'
naddresses=""
for addr in $addresses; do
case "$addr" in
"<"*">") addr=`echo "$addr" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$addr" in
*@*)
addr=`echo "$addr" | sed -n -e "$lowercase_sed"`
case " $naddresses " in
*" $addr "*) ;;
*) naddresses="$naddresses $addr" ;;
esac
;;
esac
done
addresses="$naddresses"
# Now it's time to ask the user.
case "$addresses" in
" "*" "*)
# At least two addresses.
lines=""
i=0
for addr in $addresses; do
i=`expr $i + 1`
lines="${lines}${i} ${addr}
"
done
while true; do
{ gettext "Which is your email address?"; echo; } 1>&3
echo "$lines" 1>&3
{ gettext "Please choose the number, or enter your email address."; echo; } 1>&3
read answer < /dev/tty
case "$answer" in
*@*) ;;
[0-9]*)
i=0
for addr in $addresses; do
i=`expr $i + 1`
if test "$i" = "$answer"; then
break 2
fi
done
;;
esac
case "$answer" in
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$answer" in
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
*@*.*) ;;
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
esac
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
break
done
;;
" "*)
# One address.
while true; do
{ gettext "Is the following your email address?"; echo; } 1>&3
echo " $addresses" 1>&3
{ gettext "Please confirm by pressing Return, or enter your email address."; echo; } 1>&3
read answer < /dev/tty
if test -z "$answer"; then
addr=`echo "$addresses" | sed -e 's/^ //'`
break
fi
case "$answer" in
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$answer" in
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
*@*.*) ;;
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
esac
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
break
done
;;
"")
# No address.
{ gettext "Couldn't find out about your email address."; echo; } 1>&3
while true; do
{ gettext "Please enter your email address."; echo; } 1>&3
read answer < /dev/tty
case "$answer" in
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$answer" in
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
*@*.*) ;;
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
esac
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
break
done
;;
*) echo "internal error" 1>&3 ; exit 1 ;;
esac
# Print to standard output.
echo "$addr"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-86
View File
@@ -1,86 +0,0 @@
#!/bin/sh
# Prints a package's identification PACKAGE VERSION or PACKAGE.
#
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
want_version="$1"
# NLS nuisances: Letter ranges are different in the Estonian locale.
LC_ALL=C
while true; do
if test -f configure; then
package=`(grep '^PACKAGE_NAME=' configure; grep '^ *PACKAGE=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
case "$package" in
*[\"\$\`\{\}]*)
# Some packages (gcal) retrieve the package name dynamically.
package=
;;
esac
if test -n "$package"; then
is_gnu=`LC_ALL=C grep "GNU $package" * 2>/dev/null | grep -v '^libtool:'`
if test -n "$is_gnu"; then
package="GNU $package"
fi
if test -n "$want_version"; then
version=`(grep '^PACKAGE_VERSION=' configure; grep '^ *VERSION=' configure) | grep -v '=[ ]*$' | sed -e '1q' | sed -e 's/^[^=]*=//' | sed -e "s/^'//" -e "s/'$//"`
case "$version" in
*[\"\$\`\{\}]*)
# Some packages (gcal, gcc, clisp) retrieve the version dynamically.
version=
;;
esac
if test -n "$version"; then
echo "$package $version"
else
echo "$package"
fi
else
echo "$package"
fi
exit 0
fi
fi
dir=`basename \`pwd\``
case "$dir" in
i18n)
# This directory name, used in GNU make, is not the top level directory.
;;
*[A-Za-z]*[0-9]*)
package=`echo "$dir" | sed -e 's/^\([^0-9]*\)[0-9].*$/\1/' -e 's/[-_]$//'`
if test -n "$want_version"; then
version=`echo "$dir" | sed -e 's/^[^0-9]*\([0-9].*\)$/\1/'`
echo "$package $version"
else
echo "$package"
fi
exit 0
;;
esac
# Go to parent directory
last=`/bin/pwd`
cd ..
curr=`/bin/pwd`
if test "$last" = "$curr"; then
# Oops, didn't find the package name.
if test -n "$want_version"; then
echo "PACKAGE VERSION"
else
echo "PACKAGE"
fi
exit 0
fi
done
Binary file not shown.
-436
View File
@@ -1,436 +0,0 @@
#!/bin/sh
# Prints the user's email address, with confirmation from the user.
#
# Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Prerequisites for using ${exec_prefix}/lib and ${datarootdir}/locale.
prefix="/usr/local/x86_64-w64-mingw32/stow/gettext-0.18.1.1"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
datadir="${datarootdir}"
# Set variables libdir, localedir.
libdir="${exec_prefix}/lib"
localedir="${datarootdir}/locale"
# Support for relocatability.
if test "no" = yes; then
orig_installdir="$libdir"/gettext # see Makefile.am's install rule
# Determine curr_installdir without caring for symlinked callers.
curr_installdir=`echo "$0" | sed -e 's,/[^/]*$,,'`
curr_installdir=`cd "$curr_installdir" && pwd`
# Compute the original/current installation prefixes by stripping the
# trailing directories off the original/current installation directories.
while true; do
orig_last=`echo "$orig_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
curr_last=`echo "$curr_installdir" | sed -n -e 's,^.*/\([^/]*\)$,\1,p'`
if test -z "$orig_last" || test -z "$curr_last"; then
break
fi
if test "$orig_last" != "$curr_last"; then
break
fi
orig_installdir=`echo "$orig_installdir" | sed -e 's,/[^/]*$,,'`
curr_installdir=`echo "$curr_installdir" | sed -e 's,/[^/]*$,,'`
done
# Now relocate the directory variables that we use.
libdir=`echo "$libdir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
localedir=`echo "$localedir/" | sed -e "s%^${orig_installdir}/%${curr_installdir}/%" | sed -e 's,/$,,'`
fi
# Internationalization.
. gettext.sh
TEXTDOMAIN=gettext-tools
export TEXTDOMAIN
TEXTDOMAINDIR="$localedir"
export TEXTDOMAINDIR
# Redirect fileno 3 to interactive I/O.
exec 3>/dev/tty
# Output a prompt.
if test $# != 0; then
echo "$1" 1>&3
fi
# Find the user name on the local machine.
user=`id -u -n 2>/dev/null`
if test -z "$user"; then
user="$USER"
if test -z "$user"; then
user="$LOGNAME"
if test -z "$user"; then
user=unknown
fi
fi
fi
# Find the hostname.
# hostname on some systems (SVR3.2, old Linux) returns a bogus exit status,
# so uname gets run too, so we keep only the first line of output.
#host=`(hostname || uname -n) 2>/dev/null | sed 1q`
host=`"$libdir"/gettext/hostname --short 2>/dev/null | sed 1q`
# Find the hostname.
hostfqdn=`"$libdir"/gettext/hostname --fqdn 2>/dev/null | sed 1q`
# Find a list of email addresses from various mailer configuration files.
# All mailers use configuration files under $HOME. We handle them in a
# last-modified - first-priority order.
cd $HOME
files=""
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
# Mozilla Thunderbird addresses
files="$files .thunderbird/*/prefs.js"
# Mozilla addresses
files="$files .mozilla/*/prefs.js"
# Netscape 4 addresses
files="$files .netscape/liprefs.js .netscape/preferences.js"
# Netscape 3 addresses
files="$files .netscape/preferences"
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
# XEmacs mew addresses
files="$files .emacs .emacs.el"
# KDE2 addresses
files="$files .kde2/share/config/emaildefaults"
# KDE kmail addresses
files="$files .kde2/share/config/kmailrc"
# GNOME evolution 2 addresses
files="$files .gconf/apps/evolution/mail/%gconf.xml"
# GNOME evolution 1 addresses
files="$files evolution/config.xmldb"
# GNOME balsa addresses
files="$files .gnome/balsa"
# StarOffice and OpenOffice addresses
sed_dos2unix='s/\r$//'
sed_soffice51='s,StarOffice 5\.1=\(.*\)$,\1/sofficerc,p'
sed_soffice52='s,StarOffice 5\.2=\(.*\)$,\1/user/sofficerc,p'
sed_ooffice='s,^OpenOffice[^=]*=\(.*\)$,\1/user/config/registry/instance/org/openoffice/UserProfile.xml,p'
files="$files Office51/sofficerc Office52/user/sofficerc "`sed -n -e "$sed_dos2unix" -e "$sed_soffice51" -e "$sed_soffice52" -e "$sed_ooffice" .sversionrc 2>/dev/null | sed -e 's,^file://*,/,'`
# mutt addresses
files="$files .muttrc"
# pine addresses
files="$files .pinerc"
# xfmail addresses
files="$files .xfmail/.xfmailrc"
# tkrat addresses
files="$files .ratatosk/ratatoskrc"
# ----------------------- END MAILER SPECIFIC CODE -----------------------
# Expand wildcards and remove nonexistent files from the list.
nfiles=""
for file in $files; do
if test -r "$file" && test ! -d "$file"; then
nfiles="$nfiles $file"
fi
done
files="$nfiles"
addresses=""
if test -n "$files"; then
for file in `ls -t $files`; do
case "$file" in
# ----------------------- BEGIN MAILER SPECIFIC CODE -----------------------
# Mozilla and Mozilla Thunderbird addresses
.mozilla/*/prefs.js | .thunderbird/*/prefs.js)
addresses="$addresses "`grep -h '^user_pref("mail\.identity\..*\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\..*\.useremail", "\(.*\)");$/\1/'`
;;
# Netscape 4 addresses
.netscape/liprefs.js | .netscape/preferences.js)
addresses="$addresses "`grep -h '^user_pref("mail\.identity\.useremail", ".*");$' $file 2>/dev/null | sed -e 's/^user_pref("mail\.identity\.useremail", "\(.*\)");$/\1/'`
;;
# Netscape 3 addresses
.netscape/preferences)
addresses="$addresses "`grep -h '^EMAIL_ADDRESS:' $file 2>/dev/null | sed -e 's/^EMAIL_ADDRESS:[ ]*//'`
;;
.emacs | .emacs.el)
# Emacs/XEmacs rmail, Emacs/XEmacs gnus, XEmacs vm addresses
addresses="$addresses "`grep -h '[ (]user-mail-address "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]user-mail-address "\([^"]*\)".*$/\1/'`
# XEmacs mew addresses
domains=`grep -h '[ (]mew-mail-domain "[^"]*"' $file 2>/dev/null | sed -e 's/^.*[ (]mew-mail-domain "\([^"]*\)".*$/\1/'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@$domain"
done
fi
;;
# KDE2 addresses
.kde2/share/config/emaildefaults)
addresses="$addresses "`grep -h '^EmailAddress=' $file 2>/dev/null | sed -e 's/^EmailAddress=//'`
;;
# KDE kmail addresses
.kde2/share/config/kmailrc)
addresses="$addresses "`grep -h '^Email Address=' $file 2>/dev/null | sed -e 's/^Email Address=//'`
;;
# GNOME evolution 2 addresses
.gconf/apps/evolution/mail/%gconf.xml)
sedexpr0='s,^.*&lt;addr-spec&gt;\(.*\)&lt;/addr-spec&gt;.*$,\1,p'
addresses="$addresses "`sed -n -e "$sedexpr0" < $file`
;;
# GNOME evolution 1 addresses
evolution/config.xmldb)
sedexpr0='s/^.*<entry name="identity_address_[0-9]*" type="string" value="\([^"]*\)".*$/\1/p'
sedexpr1='s/\(..\)/\\x\1/g'
sedexpr2='s,$,\\n,'
addresses="$addresses "`sed -n -e "$sedexpr0" < $file | while read hexstring; do printf \`echo "$hexstring" | sed -e "$sedexpr1" -e "$sedexpr2"\`; done`
;;
# GNOME balsa addresses
.gnome/balsa)
addresses="$addresses "`grep -h '^Address=' $file 2>/dev/null | sed -e 's/^Address=//'`
;;
# OpenOffice addresses
*/UserProfile.xml)
addresses="$addresses "`sed -n -e 's,^.*<mail cfg:type="string">\(.*\)</mail>.*$,\1,p' $file 2>/dev/null`
;;
# StarOffice addresses
# Not a typo. They really write "Adress" with a single d.
# German orthography...
*/sofficerc)
addresses="$addresses "`grep -h '^User-Adress=' $file 2>/dev/null | sed -e 's/#[^#]*$//' -e 's/^.*#//'`
;;
# mutt addresses
.muttrc)
mutt_addresses=`grep -h '^set from="[^"]*"[ ]*$' $file 2>/dev/null | sed -e 's/^set from="\([^"]*\)"[ ]*$/\1/'`
if test -n "$mutt_addresses"; then
addresses="$addresses $mutt_addresses"
else
# mutt uses $EMAIL as fallback.
if test -n "$EMAIL"; then
addresses="$addresses $EMAIL"
fi
fi
;;
# pine addresses
.pinerc)
domains=`grep -h '^user-domain=' $file 2>/dev/null | sed -e 's/^user-domain=//'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@$domain"
done
else
# The use-only-domain-name option is only used if the user-domain option is not present.
domains=`grep -h '^use-only-domain-name=' $file 2>/dev/null | sed -e 's/^use-only-domain-name=//'`
if test "Yes" = "$domains"; then
addresses="$addresses ${user}@"`echo "$hostfqdn" | sed -e 's/^[^.]*\.//'`
fi
fi
;;
# xfmail addresses
.xfmail/.xfmailrc)
addresses="$addresses "`grep -h '^from=.*<.*>' $file 2>/dev/null | sed -e 's/^.*<\([^<>]*\)>.*$/\1/'`
;;
# tkrat addresses
.ratatosk/ratatoskrc)
domains=`grep -h '^set option(masquerade_as) ' $file 2>/dev/null | sed -e 's/^set option(masquerade_as) //'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@$domain"
done
else
# The domain option is used only if the masquerade_as option is not present.
domains=`grep -h '^set option(domain) ' $file 2>/dev/null | sed -e 's/^set option(domain) //'`
if test -n "$domains"; then
for domain in $domains; do
addresses="$addresses ${user}@${host}.$domain"
done
fi
fi
;;
# ----------------------- END MAILER SPECIFIC CODE -----------------------
esac
done
fi
# Some Debian systems have a file /etc/mailname.
if test -r /etc/mailname; then
hostmailname=`cat /etc/mailname`
if test -n "$hostmailname"; then
addresses="$addresses ${user}@$hostmailname"
fi
fi
# SuSE Linux >= 8.0 systems have a file /etc/sysconfig/mail.
if test -r /etc/sysconfig/mail; then
hostmailname=`. /etc/sysconfig/mail && echo "$FROM_HEADER"`
if test -n "$hostmailname"; then
addresses="$addresses ${user}@$hostmailname"
fi
fi
# elm has no user-defined addresses.
# mailx has no user-defined addresses.
# mh has no user-defined addresses.
# They use the system default.
addresses="$addresses ${user}@$hostfqdn"
# Normalize addresses: remove addresses without @, lowercase the part after @,
# and remove duplicates.
lowercase_sed='{
h
s/^[^@]*@\(.*\)$/\1/
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
x
s/^\([^@]*\)@.*/\1@/
G
s/\
//
p
}'
naddresses=""
for addr in $addresses; do
case "$addr" in
"<"*">") addr=`echo "$addr" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$addr" in
*@*)
addr=`echo "$addr" | sed -n -e "$lowercase_sed"`
case " $naddresses " in
*" $addr "*) ;;
*) naddresses="$naddresses $addr" ;;
esac
;;
esac
done
addresses="$naddresses"
# Now it's time to ask the user.
case "$addresses" in
" "*" "*)
# At least two addresses.
lines=""
i=0
for addr in $addresses; do
i=`expr $i + 1`
lines="${lines}${i} ${addr}
"
done
while true; do
{ gettext "Which is your email address?"; echo; } 1>&3
echo "$lines" 1>&3
{ gettext "Please choose the number, or enter your email address."; echo; } 1>&3
read answer < /dev/tty
case "$answer" in
*@*) ;;
[0-9]*)
i=0
for addr in $addresses; do
i=`expr $i + 1`
if test "$i" = "$answer"; then
break 2
fi
done
;;
esac
case "$answer" in
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$answer" in
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
*@*.*) ;;
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
esac
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
break
done
;;
" "*)
# One address.
while true; do
{ gettext "Is the following your email address?"; echo; } 1>&3
echo " $addresses" 1>&3
{ gettext "Please confirm by pressing Return, or enter your email address."; echo; } 1>&3
read answer < /dev/tty
if test -z "$answer"; then
addr=`echo "$addresses" | sed -e 's/^ //'`
break
fi
case "$answer" in
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$answer" in
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
*@*.*) ;;
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
esac
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
break
done
;;
"")
# No address.
{ gettext "Couldn't find out about your email address."; echo; } 1>&3
while true; do
{ gettext "Please enter your email address."; echo; } 1>&3
read answer < /dev/tty
case "$answer" in
"<"*">") answer=`echo "$answer" | sed -e 's/^<//' -e 's/>$//'` ;;
esac
case "$answer" in
*" "*) { gettext "Invalid email address: invalid character."; echo; echo; } 1>&3 ; continue ;;
*@*.*) ;;
*@*) { gettext "Invalid email address: need a fully qualified host name or domain name."; echo; echo; } 1>&3 ; continue ;;
*) { gettext "Invalid email address: missing @"; echo; echo; } 1>&3 ; continue ;;
esac
addr=`echo "$answer" | sed -n -e "$lowercase_sed"`
break
done
;;
*) echo "internal error" 1>&3 ; exit 1 ;;
esac
# Print to standard output.
echo "$addr"
Binary file not shown.
Binary file not shown.
Binary file not shown.
+27
View File
@@ -0,0 +1,27 @@
codecov:
max_report_age: off
notify:
wait_for_ci: false
require_ci_to_pass: false
comment:
require_base: false
require_head: false
coverage:
status:
project:
default:
threshold: 0.07
fixes:
- '/home/actions-runner/_work/zlib-ng/zlib-ng::'
- '/home/actions-runner/_work/zlib-ng/zlib-ng/build/::'
ignore:
- usr/include/.*
- /usr/include/.*
- /build/usr/include/.*
- usr/lib/.*
- /usr/lib/.*
- /build/usr/lib/.*
- usr/lib64/.*
- /usr/lib64/.*
- /build/usr/lib64/.*
- _deps/**/*
+1
View File
@@ -0,0 +1 @@
disable=SC2140,SC2086,SC2046,SC2015,SC1097,SC1035,SC1036,SC1007,SC2154,SC2155,SC2000,SC2034,SC2016,SC1091,SC1090,SC2212,SC2143,SC2129,SC2102,SC2069,SC1041,SC1042,SC1044,SC1046,SC1119,SC1110,SC1111,SC1112,SC1102,SC1105,SC1101,SC1004,SC1003,SC1012,SC2068,SC2065,SC2064,SC2063,SC2059,SC2053,SC2048,SC2044,SC2032,SC2031,SC2030,SC2029,SC2025,SC2024,SC2022,SC2018,SC2019,SC2017,SC2014,SC2013,SC2012,SC2009,SC2001,SC2098,SC2096,SC2094,SC2091,SC2092,SC2088,SC2087,SC2076,SC2072,SC2071,SC2223,SC2221,SC2222,SC2217,SC2207,SC2206,SC2205,SC2190,SC2188,SC2187,SC2185,SC2179,SC2178,SC2174,SC2168,SC2167,SC2163,SC2161,SC2160,SC2153,SC2150,SC2148,SC2147,SC2146,SC2142,SC2139,SC2126,SC2123,SC2120,SC2119,SC2117,SC2114,SC1117,SC2164,SC1083,SC2004,SC2125,SC2128,SC2011,SC1008,SC1019,SC2093,SC1132,SC1129,SC2236,SC2237,SC2231,SC2230,SC2229,SC2106,SC2102,SC2243,SC2244,SC2245,SC2247,SC2248,SC2249,SC2250,SC2251,SC2252,SC2181
+1414 -125
View File
File diff suppressed because it is too large. Load diff
+373
View File
@@ -0,0 +1,373 @@
##
# THIS IS AN UNMAINTAINED COPY OF THE ORIGINAL FILE DISTRIBUTED WITH ZLIB 1.2.11
##
Frequently Asked Questions about zlib
If your question is not there, please check the zlib home page
https://zlib.net/ which may have more recent information.
The latest zlib FAQ is at https://zlib.net/zlib_faq.html
1. Is zlib Y2K-compliant?
Yes. zlib doesn't handle dates.
2. Where can I get a Windows DLL version?
The zlib sources can be compiled without change to produce a DLL. See the
file win32/DLL_FAQ.txt in the zlib distribution.
3. Where can I get a Visual Basic interface to zlib?
See
* https://marknelson.us/1997/01/01/zlib-engine/
* win32/DLL_FAQ.txt in the zlib distribution
4. compress() returns Z_BUF_ERROR.
Make sure that before the call of compress(), the length of the compressed
buffer is equal to the available size of the compressed buffer and not
zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
5. deflate() or inflate() returns Z_BUF_ERROR.
Before making the call, make sure that avail_in and avail_out are not zero.
When setting the parameter flush equal to Z_FINISH, also make sure that
avail_out is big enough to allow processing all pending input. Note that a
Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
made with more input or output space. A Z_BUF_ERROR may in fact be
unavoidable depending on how the functions are used, since it is not
possible to tell whether or not there is more output pending when
strm.avail_out returns with zero. See https://zlib.net/zlib_how.html for a
heavily annotated example.
6. Where's the zlib documentation (man pages, etc.)?
It's in zlib.h . Examples of zlib usage are in the files test/example.c
and test/minigzip.c, with more in examples/ .
7. Why don't you use GNU autoconf or libtool or ...?
Because we would like to keep zlib as a very small and simple package.
zlib is rather portable and doesn't need much configuration.
8. I found a bug in zlib.
Most of the time, such problems are due to an incorrect usage of zlib.
Please try to reproduce the problem with a small program and send the
corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
data files without prior agreement.
9. Why do I get "undefined reference to gzputc"?
If "make test" produces something like
example.o(.text+0x154): undefined reference to `gzputc'
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
/usr/X11R6/lib. Remove any old versions, then do "make install".
10. I need a Delphi interface to zlib.
See the contrib/delphi directory in the zlib distribution.
11. Can zlib handle .zip archives?
Not by itself, no. See the directory contrib/minizip in the zlib
distribution.
12. Can zlib handle .Z files?
No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
the code of uncompress on your own.
13. How can I make a Unix shared library?
By default a shared (and a static) library is built for Unix. So:
make distclean
./configure
make
14. How do I install a shared zlib library on Unix?
After the above, then:
make install
However, many flavors of Unix come with a shared zlib already installed.
Before going to the trouble of compiling a shared version of zlib and
trying to install it, you may want to check if it's already there! If you
can #include <zlib.h>, it's there. The -lz option will probably link to
it. You can check the version at the top of zlib.h or with the
ZLIB_VERSION symbol defined in zlib.h .
15. I have a question about OttoPDF.
We are not the authors of OttoPDF. The real author is on the OttoPDF web
site: Joel Hainley, jhainley@myndkryme.com.
16. Can zlib decode Flate data in an Adobe PDF file?
Yes. See https://www.pdflib.com/ . To modify PDF forms, see
https://sourceforge.net/projects/acroformtool/ .
17. Why am I getting this "register_frame_info not found" error on Solaris?
After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
generates an error such as:
ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
symbol __register_frame_info: referenced symbol not found
The symbol __register_frame_info is not part of zlib, it is generated by
the C compiler (cc or gcc). You must recompile applications using zlib
which have this problem. This problem is specific to Solaris. See
http://www.sunfreeware.com/ for Solaris versions of zlib and applications
using zlib.
18. Why does gzip give an error on a file I make with compress/deflate?
The compress and deflate functions produce data in the zlib format, which
is different and incompatible with the gzip format. The gz* functions in
zlib on the other hand use the gzip format. Both the zlib and gzip formats
use the same compressed data format internally, but have different headers
and trailers around the compressed data.
19. Ok, so why are there two different formats?
The gzip format was designed to retain the directory information about a
single file, such as the name and last modification date. The zlib format
on the other hand was designed for in-memory and communication channel
applications, and has a much more compact header and trailer and uses a
faster integrity check than gzip.
20. Well that's nice, but how do I make a gzip file in memory?
You can request that deflate write the gzip format instead of the zlib
format using deflateInit2(). You can also request that inflate decode the
gzip format using inflateInit2(). Read zlib.h for more details.
21. Is zlib thread-safe?
Yes. However any library routines that zlib uses and any application-
provided memory allocation routines must also be thread-safe. zlib's gz*
functions use stdio library routines, and most of zlib's functions use the
library memory allocation routines by default. zlib's *Init* functions
allow for the application to provide custom memory allocation routines.
Of course, you should only operate on any given zlib or gzip stream from a
single thread at a time.
22. Can I use zlib in my commercial application?
Yes. Please read the license in zlib.h.
23. Is zlib under the GNU license?
No. Please read the license in zlib.h.
24. The license says that altered source versions must be "plainly marked". So
what exactly do I need to do to meet that requirement?
You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
particular, the final version number needs to be changed to "f", and an
identification string should be appended to ZLIB_VERSION. Version numbers
x.x.x.f are reserved for modifications to zlib by others than the zlib
maintainers. For example, if the version of the base zlib you are altering
is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
update the version strings in deflate.c and inftrees.c.
For altered source distributions, you should also note the origin and
nature of the changes in zlib.h, as well as in ChangeLog and README, along
with the dates of the alterations. The origin should include at least your
name (or your company's name), and an email address to contact for help or
issues with the library.
Note that distributing a compiled zlib library along with zlib.h and
zconf.h is also a source distribution, and so you should change
ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
in zlib.h as you would for a full source distribution.
25. Will zlib work on a big-endian or little-endian architecture, and can I
exchange compressed data between them?
Yes and yes.
26. Will zlib work on a 64-bit machine?
Yes. It has been tested on 64-bit machines, and has no dependence on any
data types being limited to 32-bits in length. If you have any
difficulties, please provide a complete problem report to zlib@gzip.org
27. Will zlib decompress data from the PKWare Data Compression Library?
No. The PKWare DCL uses a completely different compressed data format than
does PKZIP and zlib. However, you can look in zlib's contrib/blast
directory for a possible solution to your problem.
28. Can I access data randomly in a compressed stream?
No, not without some preparation. If when compressing you periodically use
Z_FULL_FLUSH, carefully write all the pending data at those points, and
keep an index of those locations, then you can start decompression at those
points. You have to be careful to not use Z_FULL_FLUSH too often, since it
can significantly degrade compression. Alternatively, you can scan a
deflate stream once to generate an index, and then use that index for
random access. See examples/zran.c .
29. Does zlib work on MVS, OS/390, CICS, etc.?
It has in the past, but we have not heard of any recent evidence. There
were working ports of zlib 1.1.4 to MVS, but those links no longer work.
If you know of recent, successful applications of zlib on these operating
systems, please let us know. Thanks.
30. Is there some simpler, easier to read version of inflate I can look at to
understand the deflate format?
First off, you should read RFC 1951. Second, yes. Look in zlib's
contrib/puff directory.
31. Does zlib infringe on any patents?
As far as we know, no. In fact, that was originally the whole point behind
zlib. Look here for some more information:
https://www.gzip.org/#faq11
32. Can zlib work with greater than 4 GB of data?
Yes. inflate() and deflate() will process any amount of data correctly.
Each call of inflate() or deflate() is limited to input and output chunks
of the maximum value that can be stored in the compiler's "unsigned int"
type, but there is no limit to the number of chunks. Note however that the
strm.total_in and strm_total_out counters may be limited to 4 GB. These
counters are provided as a convenience and are not used internally by
inflate() or deflate(). The application can easily set up its own counters
updated after each call of inflate() or deflate() to count beyond 4 GB.
compress() and uncompress() may be limited to 4 GB, since they operate in a
single call. gzseek() and gztell() may be limited to 4 GB depending on how
zlib is compiled. See the zlibCompileFlags() function in zlib.h.
The word "may" appears several times above since there is a 4 GB limit only
if the compiler's "long" type is 32 bits. If the compiler's "long" type is
64 bits, then the limit is 16 exabytes.
33. Does zlib have any security vulnerabilities?
The only one that we are aware of is potentially in gzprintf(). If zlib is
compiled to use sprintf() or vsprintf(), then there is no protection
against a buffer overflow of an 8K string space (or other value as set by
gzbuffer()), other than the caller of gzprintf() assuring that the output
will not exceed 8K. On the other hand, if zlib is compiled to use
snprintf() or vsnprintf(), which should normally be the case, then there is
no vulnerability. The ./configure script will display warnings if an
insecure variation of sprintf() will be used by gzprintf(). Also the
zlibCompileFlags() function will return information on what variant of
sprintf() is used by gzprintf().
If you don't have snprintf() or vsnprintf() and would like one, you can
find a portable implementation here:
https://www.ijs.si/software/snprintf/
Note that you should be using the most recent version of zlib. Versions
1.1.3 and before were subject to a double-free vulnerability, and versions
1.2.1 and 1.2.2 were subject to an access exception when decompressing
invalid compressed data.
34. Is there a Java version of zlib?
Probably what you want is to use zlib in Java. zlib is already included
as part of the Java SDK in the java.util.zip package. If you really want
a version of zlib written in the Java language, look on the zlib home
page for links: https://zlib.net/ .
35. I get this or that compiler or source-code scanner warning when I crank it
up to maximally-pedantic. Can't you guys write proper code?
Many years ago, we gave up attempting to avoid warnings on every compiler
in the universe. It just got to be a waste of time, and some compilers
were downright silly as well as contradicted each other. So now, we simply
make sure that the code always works.
36. Valgrind (or some similar memory access checker) says that deflate is
performing a conditional jump that depends on an uninitialized value.
Isn't that a bug?
No. That is intentional for performance reasons, and the output of deflate
is not affected. This only started showing up recently since zlib 1.2.x
uses malloc() by default for allocations, whereas earlier versions used
calloc(), which zeros out the allocated memory. Even though the code was
correct, versions 1.2.4 and later was changed to not stimulate these
checkers.
37. Will zlib read the (insert any ancient or arcane format here) compressed
data format?
Probably not. Look in the comp.compression FAQ for pointers to various
formats and associated software.
38. How can I encrypt/decrypt zip files with zlib?
zlib doesn't support encryption. The original PKZIP encryption is very
weak and can be broken with freely available programs. To get strong
encryption, use GnuPG, https://www.gnupg.org/ , which already includes zlib
compression. For PKZIP compatible "encryption", look at
http://infozip.sourceforge.net/
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
"gzip" is the gzip format, and "deflate" is the zlib format. They should
probably have called the second one "zlib" instead to avoid confusion with
the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
correctly points to the zlib specification in RFC 1950 for the "deflate"
transfer encoding, there have been reports of servers and browsers that
incorrectly produce or expect raw deflate data per the deflate
specification in RFC 1951, most notably Microsoft. So even though the
"deflate" transfer encoding using the zlib format would be the more
efficient approach (and in fact exactly what the zlib format was designed
for), using the "gzip" transfer encoding is probably more reliable due to
an unfortunate choice of name on the part of the HTTP 1.1 authors.
Bottom line: use the gzip format for HTTP 1.1 encoding.
40. Does zlib support the new "Deflate64" format introduced by PKWare?
No. PKWare has apparently decided to keep that format proprietary, since
they have not documented it as they have previous compression formats. In
any case, the compression improvements are so modest compared to other more
modern approaches, that it's not worth the effort to implement.
41. I'm having a problem with the zip functions in zlib, can you help?
There are no zip functions in zlib. You are probably using minizip by
Giles Vollant, which is found in the contrib directory of zlib. It is not
part of zlib. In fact none of the stuff in contrib is part of zlib. The
files in there are not supported by the zlib authors. You need to contact
the authors of the respective contribution for help.
42. The match.asm code in contrib is under the GNU General Public License.
Since it's part of zlib, doesn't that mean that all of zlib falls under the
GNU GPL?
No. The files in contrib are not part of zlib. They were contributed by
other authors and are provided as a convenience to the user within the zlib
distribution. Each item in contrib has its own license.
43. Is zlib subject to export controls? What is its ECCN?
zlib is not subject to export controls, and so is classified as EAR99.
44. Can you please sign these lengthy legal documents and fax them back to us
so that we can use your software in our product?
No. Go away. Shoo.
+36
View File
@@ -0,0 +1,36 @@
Contents
--------
| Name | Description |
|:-----------------|:---------------------------------------------------------------|
| arch/ | Architecture-specific code |
| doc/ | Documentation for formats and algorithms |
| test/example.c | Zlib usages examples for build testing |
| test/minigzip.c | Minimal gzip-like functionality for build testing |
| test/infcover.c | Inflate code coverage for build testing |
| win32/ | Shared library version resources for Windows |
| CMakeLists.txt | Cmake build script |
| configure | Bash configure/build script |
| adler32.c | Compute the Adler-32 checksum of a data stream |
| chunkset.* | Inline functions to copy small data chunks |
| compress.c | Compress a memory buffer |
| deflate.* | Compress data using the deflate algorithm |
| deflate_fast.c | Compress data using the deflate algorithm with fast strategy |
| deflate_medium.c | Compress data using the deflate algorithm with medium strategy |
| deflate_slow.c | Compress data using the deflate algorithm with slow strategy |
| functable.* | Struct containing function pointers to optimized functions |
| gzguts.h | Internal definitions for gzip operations |
| gzlib.c | Functions common to reading and writing gzip files |
| gzread.c | Read gzip files |
| gzwrite.c | Write gzip files |
| infback.* | Inflate using a callback interface |
| inflate.* | Decompress data |
| inffast.* | Decompress data with speed optimizations |
| inffixed_tbl.h | Table for decoding fixed codes |
| inftrees.h | Generate Huffman trees for efficient decoding |
| trees.* | Output deflated data using Huffman coding |
| uncompr.c | Decompress a memory buffer |
| zconf.h.cmakein | zconf.h template for cmake |
| zendian.h | BYTE_ORDER for endian tests |
| zlib.map | Linux symbol information |
| zlib.pc.in | Pkg-config template |
+19
View File
@@ -0,0 +1,19 @@
(C) 1995-2024 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
+411
View File
@@ -0,0 +1,411 @@
# Makefile for zlib
# Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile and test, type:
# ./configure; make test
# Normally configure builds both a static and a shared library.
# If you want to build just a static library, use: ./configure --static
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
# make install
# To install in $HOME instead of /usr/local, use:
# make install prefix=$HOME
CC=cc
CFLAGS=-O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-g -DZLIB_DEBUG
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
# -Wstrict-prototypes -Wmissing-prototypes
SFLAGS=-O
LDFLAGS=-L.
LIBNAME1=libz-ng
LIBNAME2=zlib-ng
SUFFIX=-ng
TEST_LIBS=$(LIBNAME1).a
LDSHARED=$(CC)
LDSHAREDFLAGS=-shared
LDVERSIONSCRIPT=
VER=2.2.4
VER1=2
STATICLIB=$(LIBNAME1).a
SHAREDLIB=$(LIBNAME1).so
SHAREDLIBV=$(LIBNAME1).so.$(VER)
SHAREDLIBM=$(LIBNAME1).so.$(VER1)
IMPORTLIB=
SHAREDTARGET=$(LIBNAME1).so.$(VER)
PKGFILE=$(LIBNAME2).pc
LIBS=$(STATICLIB) $(SHAREDTARGET)
AR=ar
ARFLAGS=rc
DEFFILE=
RC=
RCFLAGS=
RCOBJS=
STRIP=
RANLIB=ranlib
LDCONFIG=ldconfig
LDSHAREDLIBC=
EXE=
SRCDIR=.
INCLUDES=-I$(SRCDIR)
BUILDDIR=.
ARCHDIR=arch/generic
ARCH_STATIC_OBJS=
ARCH_SHARED_OBJS=
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
sharedlibdir = ${libdir}
includedir = ${prefix}/include
mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
pkgconfigdir = ${libdir}/pkgconfig
OBJZ = \
arch/generic/adler32_c.o \
arch/generic/adler32_fold_c.o \
arch/generic/chunkset_c.o \
arch/generic/compare256_c.o \
arch/generic/crc32_braid_c.o \
arch/generic/crc32_c.o \
arch/generic/crc32_fold_c.o \
arch/generic/slide_hash_c.o \
adler32.o \
compress.o \
crc32.o \
crc32_braid_comb.o \
deflate.o \
deflate_fast.o \
deflate_huff.o \
deflate_medium.o \
deflate_quick.o \
deflate_rle.o \
deflate_slow.o \
deflate_stored.o \
functable.o \
infback.o \
inflate.o \
inftrees.o \
insert_string.o \
insert_string_roll.o \
trees.o \
uncompr.o \
zutil.o \
arch/generic/crc32_chorba_c.o \
cpu_features.o \
$(ARCH_STATIC_OBJS)
OBJG = \
gzlib.o \
gzread.o \
gzwrite.o
TESTOBJG =
OBJC = $(OBJZ) $(OBJG)
PIC_OBJZ = \
arch/generic/adler32_c.lo \
arch/generic/adler32_fold_c.lo \
arch/generic/chunkset_c.lo \
arch/generic/compare256_c.lo \
arch/generic/crc32_braid_c.lo \
arch/generic/crc32_c.lo \
arch/generic/crc32_fold_c.lo \
arch/generic/slide_hash_c.lo \
adler32.lo \
compress.lo \
crc32.lo \
crc32_braid_comb.lo \
deflate.lo \
deflate_fast.lo \
deflate_huff.lo \
deflate_medium.lo \
deflate_quick.lo \
deflate_rle.lo \
deflate_slow.lo \
deflate_stored.lo \
functable.lo \
infback.lo \
inflate.lo \
inftrees.lo \
insert_string.lo \
insert_string_roll.lo \
trees.lo \
uncompr.lo \
zutil.lo \
arch/generic/crc32_chorba_c.lo \
cpu_features.lo \
$(ARCH_SHARED_OBJS)
PIC_OBJG = \
gzlib.lo \
gzread.lo \
gzwrite.lo
PIC_TESTOBJG =
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
OBJS = $(OBJC)
PIC_OBJS = $(PIC_OBJC)
all: static shared
static: example$(EXE) minigzip$(EXE) makefixed$(EXE) maketrees$(EXE) makecrct$(EXE)
shared: examplesh$(EXE) minigzipsh$(EXE)
check: test
.SECONDARY:
$(ARCHDIR)/%.o: $(SRCDIR)/$(ARCHDIR)/%.c
$(MAKE) -C $(ARCHDIR) $(notdir $@)
$(ARCHDIR)/%.lo: $(SRCDIR)/$(ARCHDIR)/%.c
$(MAKE) -C $(ARCHDIR) $(notdir $@)
arch/generic/%.o: $(SRCDIR)/arch/generic/%.c
$(MAKE) -C arch/generic $(notdir $@)
arch/generic/%.lo: $(SRCDIR)/arch/generic/%.c
$(MAKE) -C arch/generic $(notdir $@)
%.o: $(ARCHDIR)/%.o
-cp $< $@
%.lo: $(ARCHDIR)/%.lo
-cp $< $@
test: all
$(MAKE) -C test
infcover.o: $(SRCDIR)/test/infcover.c zlib$(SUFFIX).h zconf$(SUFFIX).h zlib_name_mangling$(SUFFIX).h
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/test/infcover.c
infcover$(EXE): infcover.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ infcover.o $(STATICLIB)
ifneq ($(STRIP),)
$(STRIP) $@
endif
cover: infcover$(EXE)
rm -f *.gcda
./infcover
gcov inf*.c
$(STATICLIB): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
example.o:
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $(SRCDIR)/test/example.c
minigzip.o:
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $(SRCDIR)/test/minigzip.c
makefixed.o:
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/makefixed.c
maketrees.o:
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/maketrees.c
makecrct.o:
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/makecrct.c
zlibrc.o: $(SRCDIR)/win32/zlib$(SUFFIX)1.rc
$(RC) $(RCFLAGS) -o $@ $(SRCDIR)/win32/zlib$(SUFFIX)1.rc
.SUFFIXES: .lo
%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
%.lo: $(SRCDIR)/%.c
$(CC) $(SFLAGS) -DPIC $(INCLUDES) -c -o $@ $<
gzlib.o: $(SRCDIR)/gzlib.c
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
gzlib.lo: $(SRCDIR)/gzlib.c
$(CC) $(SFLAGS) -DPIC -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
gzread.o: gzread.c
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
gzread.lo: gzread.c
$(CC) $(SFLAGS) -DPIC -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
gzwrite.o: $(SRCDIR)/gzwrite.c
$(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
gzwrite.lo: $(SRCDIR)/gzwrite.c
$(CC) $(SFLAGS) -DPIC -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
$(SHAREDTARGET): $(PIC_OBJS) $(DEFFILE) $(RCOBJS)
ifneq ($(SHAREDTARGET),)
$(LDSHARED) $(CFLAGS) $(LDSHAREDFLAGS) $(LDVERSIONSCRIPT) $(LDFLAGS) -o $@ $(DEFFILE) $(PIC_OBJS) $(RCOBJS) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
ifneq ($(SHAREDLIB),$(SHAREDTARGET))
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
endif
endif
example$(EXE): example.o $(TESTOBJG) $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(TESTOBJG) $(TEST_LIBS) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
minigzip$(EXE): minigzip.o $(TESTOBJG) $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(TESTOBJG) $(TEST_LIBS) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
minigzipsh$(EXE): minigzip.o $(PIC_TESTOBJG) $(SHAREDTARGET)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ minigzip.o $(PIC_TESTOBJG) $(SHAREDLIB) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
examplesh$(EXE): example.o $(PIC_TESTOBJG) $(SHAREDTARGET)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ example.o $(PIC_TESTOBJG) $(SHAREDLIB) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
makefixed$(EXE): makefixed.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ makefixed.o $(TEST_LIBS) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
maketrees$(EXE): maketrees.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ maketrees.o $(TEST_LIBS) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
makecrct$(EXE): makecrct.o $(STATICLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ makecrct.o $(TEST_LIBS) $(LDSHAREDLIBC)
ifneq ($(STRIP),)
$(STRIP) $@
endif
install-shared: $(SHAREDTARGET)
ifneq ($(SHAREDTARGET),)
-@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET)
cp $(SHAREDTARGET) $(DESTDIR)$(sharedlibdir)
chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDTARGET)
ifneq ($(SHAREDLIB),$(SHAREDTARGET))
rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM)
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB)
ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM)
($(LDCONFIG) || true) >/dev/null 2>&1
# ldconfig is for Linux
endif
ifneq ($(IMPORTLIB),)
cp $(IMPORTLIB) $(DESTDIR)$(sharedlibdir)
chmod 644 $(DESTDIR)$(sharedlibdir)/$(IMPORTLIB)
endif
endif
install-static: $(STATICLIB)
-@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
rm -f $(DESTDIR)$(libdir)/$(STATICLIB)
cp $(STATICLIB) $(DESTDIR)$(libdir)
chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
-@($(RANLIB) $(DESTDIR)$(libdir)/$(STATICLIB) || true) >/dev/null 2>&1
# The ranlib in install-static is needed on NeXTSTEP which checks file times
install-libs: install-shared install-static
-@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
rm -f $(DESTDIR)$(pkgconfigdir)/$(PKGFILE)
cp $(PKGFILE) $(DESTDIR)$(pkgconfigdir)
chmod 644 $(DESTDIR)$(pkgconfigdir)/$(PKGFILE)
install: install-libs
-@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
rm -f $(DESTDIR)$(includedir)/zlib$(SUFFIX).h $(DESTDIR)$(includedir)/zconf$(SUFFIX).h $(DESTDIR)$(includedir)/zlib_name_mangling$(SUFFIX).h
cp zlib$(SUFFIX).h $(DESTDIR)$(includedir)/zlib$(SUFFIX).h
cp zconf$(SUFFIX).h $(DESTDIR)$(includedir)/zconf$(SUFFIX).h
cp zlib_name_mangling$(SUFFIX).h $(DESTDIR)$(includedir)/zlib_name_mangling$(SUFFIX).h
chmod 644 $(DESTDIR)$(includedir)/zlib$(SUFFIX).h $(DESTDIR)$(includedir)/zconf$(SUFFIX).h $(DESTDIR)$(includedir)/zlib_name_mangling$(SUFFIX).h
uninstall-static:
cd $(DESTDIR)$(libdir) && rm -f $(STATICLIB)
uninstall-shared:
ifneq ($(SHAREDLIB),)
cd $(DESTDIR)$(sharedlibdir) && rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM)
endif
ifneq ($(IMPORTLIB),)
cd $(DESTDIR)$(sharedlibdir) && rm -f $(IMPORTLIB)
endif
uninstall: uninstall-static uninstall-shared
cd $(DESTDIR)$(includedir) && rm -f zlib$(SUFFIX).h zconf$(SUFFIX).h zlib_name_mangling$(SUFFIX).h
cd $(DESTDIR)$(pkgconfigdir) && rm -f $(PKGFILE)
mostlyclean: clean
clean:
@if [ -f $(ARCHDIR)/Makefile ]; then $(MAKE) -C $(ARCHDIR) clean; fi
@if [ -f arch/generic/Makefile ]; then $(MAKE) -C arch/generic clean; fi
@if [ -f test/Makefile ]; then $(MAKE) -C test clean; fi
rm -f *.o *.lo *~ \
example$(EXE) minigzip$(EXE) minigzipsh$(EXE) \
infcover makefixed$(EXE) maketrees$(EXE) makecrct$(EXE) \
$(STATICLIB) $(IMPORTLIB) $(SHAREDLIB) $(SHAREDLIBV) $(SHAREDLIBM) \
foo.gz so_locations \
_match.s maketree
rm -rf objs
rm -f *.gcda *.gcno *.gcov
rm -f a.out a.exe
rm -f *._h
rm -rf btmp1 btmp2 pkgtmp1 pkgtmp2
maintainer-clean: distclean
distclean: clean
@if [ -f $(ARCHDIR)/Makefile ]; then $(MAKE) -C $(ARCHDIR) distclean; fi
@if [ -f test/Makefile ]; then $(MAKE) -C test distclean; fi
rm -f $(PKGFILE) configure.log zconf.h zconf.h.cmakein zlib$(SUFFIX).h zlib_name_mangling$(SUFFIX).h *.pc gzread.c
-@rm -f .DS_Store
# Reset Makefile if building inside source tree
@if [ -f Makefile.in ]; then \
printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile ; \
printf '\ndistclean:\n\t$(MAKE) -f Makefile.in distclean\n' >> Makefile ; \
touch -r $(SRCDIR)/Makefile.in Makefile ; fi
# Reset zconf.h and zconf.h.cmakein if building inside source tree
@if [ -f zconf.h.in ]; then \
cp -p $(SRCDIR)/zconf.h.in zconf.h ; \
grep -v '^#cmakedefine' $(SRCDIR)/zconf.h.in > zconf.h.cmakein &&\
touch -r $(SRCDIR)/zconf.h.in zconf.h.cmakein ; fi
# Cleanup these files if building outside source tree
@if [ ! -f README.md ]; then rm -f Makefile; fi
# Remove arch and test directory if building outside source tree
@if [ ! -f $(ARCHDIR)/Makefile.in ]; then rm -rf arch; fi
@if [ ! -f test/Makefile.in ]; then rm -rf test; fi
tags:
etags $(SRCDIR)/*.[ch]
+111
View File
@@ -0,0 +1,111 @@
Porting applications to use zlib-ng
===================================
Zlib-ng can be used/compiled in two different modes, that require some
consideration by the application developer.
Changes from zlib affecting native and compat modes
---------------------------------------------------
Zlib-ng is not as conservative with memory allocation as Zlib is.
Where Zlib's inflate will allocate a lower amount of memory depending on
compression level and window size, zlib-ng will always allocate the maximum
amount of memory and possibly leave parts of it unused.
Zlib-ng's deflate will however allocate a lower amount of memory depending
on compression level and window size.
Zlib-ng also allocates one "big" buffer instead of doing multiple smaller
allocations. This is faster, can lead to better cache locality and reduces
space lost to alignment padding.
At the time of writing, by default zlib-ng allocates the following amounts
of memory on a 64-bit system (except on S390x that requires ~4KiB more):
- Deflate: 350.272 Bytes
- Inflate: 42.112 Bytes
**Advantages:**
- All memory is allocated during DeflateInit or InflateInit functions,
leaving the actual deflate/inflate functions free from allocations.
- Zlib-ng can only fail from memory allocation errors during init.
- Time spent doing memory allocation systemcalls is all done during init,
allowing applications to do prepare this before doing latency-sensitive
deflate/inflate later.
- Can reduce wasted memory due to buffer alignment padding both by OS and zlib-ng.
- Potentially improved memory locality.
**Disadvantages:**
- Zlib-ng allocates a little more memory than zlib does.
zlib-compat mode
----------------
Zlib-ng can be compiled in zlib-compat mode, suitable for zlib-replacement
in a single application or system-wide.
Please note that zlib-ng in zlib-compat mode tries to maintain both API and
ABI compatibility with the original zlib. Any issues regarding compatibility
can be reported as bugs.
In certain instances you may not be able to simply replace the zlib library/dll
files and expect the application to work. The application may need to be
recompiled against the zlib-ng headers and libs to ensure full compatibility.
It is also possible for the deflate output stream to differ from the original
zlib due to algorithmic differences between the two libraries. Any tests or
applications that depend on the exact length of the deflate stream being a
certain value will need to be updated.
**Advantages:**
- Easy to port to, since it only requires a recompile of the application and
no changes to the application code.
**Disadvantages:**
- Can conflict with a system-installed zlib, as that can often be linked in
by another library you are linking into your application. This can cause
crashes or incorrect output.
- If your application is pre-allocating a memory buffer and you are providing
deflate/inflate init with your own allocator that allocates from that buffer
(looking at you nginx), you should be aware that zlib-ng needs to allocate
more memory than stock zlib needs. The same problem exists with Intel’s and
Cloudflare’s zlib forks. Doing this is not recommended since it makes it
very hard to maintain compatibility over time.
**Build Considerations:**
- Compile against the *zlib.h* provided by zlib-ng
- Configuration header is named *zconf.h*
- Static library is *libz.a* on Unix and macOS, or *zlib.lib* on Windows
- Shared library is *libz.so* on Unix, *libz.dylib* on macOS, or *zlib1.dll*
on Windows
- Type `z_size_t` is *unsigned __int64* on 64-bit Windows, and *unsigned long* on 32-bit Windows, Unix and macOS
- Type `z_uintmax_t` is *unsigned long* in zlib-compat mode, and *size_t* with zlib-ng API
zlib-ng native mode
-------------------
Zlib-ng in native mode is suitable for co-existing with the standard zlib
library, allowing applications to implement support and testing separately.
The zlib-ng native has implemented some modernization and simplifications
in its API, intended to make life easier for application developers.
**Advantages:**
- Does not conflict with other zlib implementations, and can co-exist as a
system library along with zlib.
- In certain places zlib-ng native uses more appropriate data types, removing
the need for some workarounds in the API compared to zlib.
**Disadvantages:**
- Requires minor changes to applications to use the prefixed zlib-ng
function calls and structs. Usually this means a small prefix `zng_` has to be added.
**Build Considerations:**
- Compile against *zlib-ng.h*
- Configuration header is named *zconf-ng.h*
- Static library is *libz-ng.a* on Unix and macOS, or *zlib-ng.lib* on Windows
- Shared library is *libz-ng.so* on Unix, *libz-ng.dylib* on macOS, or
*zlib-ng2.dll* on Windows
- Type `z_size_t` is *size_t*
zlib-ng compile-time detection
------------------------------
To distinguish zlib-ng from other zlib implementations at compile-time check for the
existence of `ZLIBNG_VERSION` defined in the zlib header.
+228
View File
@@ -0,0 +1,228 @@
| CI | Stable | Develop |
|:---|:-------|:--------|
| GitHub Actions | [![Stable CMake](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml/badge.svg?branch=stable)](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml?query=branch%3Astable) <br> [![Stable Configure](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml/badge.svg?branch=stable)](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml?query=branch%3Astable) <br> [![Stable NMake](https://github.com/zlib-ng/zlib-ng/actions/workflows/nmake.yml/badge.svg?branch=stable)](https://github.com/zlib-ng/zlib-ng/actions/workflows/nmake.yml?query=branch%3Astable) | [![Develop CMake](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml/badge.svg?branch=develop)](https://github.com/zlib-ng/zlib-ng/actions/workflows/cmake.yml?query=branch%3Adevelop) <br> [![Develop Configure](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml/badge.svg?branch=develop)](https://github.com/zlib-ng/zlib-ng/actions/workflows/configure.yml?query=branch%3Adevelop) <br> [![Develop NMake](https://github.com/zlib-ng/zlib-ng/actions/workflows/nmake.yml/badge.svg?branch=develop)](https://github.com/zlib-ng/zlib-ng/actions/workflows/nmake.yml?query=branch%3Adevelop) |
| CodeFactor | [![CodeFactor](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/badge/stable)](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/overview/stable) | [![CodeFactor](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/badge/develop)](https://www.codefactor.io/repository/github/zlib-ng/zlib-ng/overview/develop) |
| OSS-Fuzz | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/zlib-ng.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zlib-ng) | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/zlib-ng.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:zlib-ng) |
| Codecov | [![codecov](https://codecov.io/github/zlib-ng/zlib-ng/branch/stable/graph/badge.svg?token=uKsgK9LIuC)](https://codecov.io/github/zlib-ng/zlib-ng/tree/stable) | [![codecov](https://codecov.io/github/zlib-ng/zlib-ng/branch/develop/graph/badge.svg?token=uKsgK9LIuC)](https://codecov.io/github/zlib-ng/zlib-ng/tree/develop) |
## zlib-ng
*zlib data compression library for the next generation systems*
Maintained by Hans Kristian Rosbach
aka Dead2 (zlib-ng àt circlestorm dót org)
Features
--------
* Zlib compatible API with support for dual-linking
* Modernized native API based on zlib API for ease of porting
* Modern C11 syntax and a clean code layout
* Deflate medium and quick algorithms based on Intel’s zlib fork
* Support for CPU intrinsics when available
* Adler32 implementation using SSSE3, AVX2, AVX512, AVX512-VNNI, Neon, VMX & VSX
* CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ARMv8, & IBM Z
* Slide hash implementations using SSE2, AVX2, ARMv6, Neon, VMX & VSX
* Compare256 implementations using SSE2, AVX2, Neon, POWER9 & RVV
* Inflate chunk copying using SSE2, SSSE3, AVX, Neon & VSX
* Support for hardware-accelerated deflate using IBM Z DFLTCC
* Safe unaligned memory read/writes and large bit buffer improvements
* Includes improvements from Cloudflare and Intel forks
* Configure, CMake, and NMake build system support
* Comprehensive set of CMake unit tests
* Code sanitizers, fuzzing, and coverage
* GitHub Actions continuous integration on Windows, macOS, and Linux
* Emulated CI for ARM, AARCH64, PPC, PPC64, RISCV, SPARC64, S390x using qemu
History
-------
The motivation for this fork was seeing several 3rd party contributions with new optimizations not getting
implemented into the official zlib repository.
Mark Adler has been maintaining zlib for a very long time, and he has done a great job and hopefully he will continue
for a long time yet. The idea of zlib-ng is not to replace zlib, but to co-exist as a drop-in replacement with a
lower threshold for code change.
zlib has a long history and is incredibly portable, even supporting many systems that predate the Internet.<br>
That is great, but it can complicate further development and maintainability. The zlib code contains many workarounds
for really old compilers or to accommodate systems with limitations such as operating in a 16-bit environment.
Many of these workarounds are only maintenance burdens, some of them are pretty huge code-wise. With many workarounds
cluttered throughout the code, it makes it harder for new programmers with an idea/interest for zlib to contribute.
I decided to make a fork, merge all the Intel optimizations, some of the Cloudflare optimizations, plus a couple other
smaller patches. Then started cleaning out workarounds, various dead code, all contrib and example code.<br>
The result is a better performing and easier to maintain zlib-ng.
A lot of improvements have gone into zlib-ng since its start, and numerous people and companies have contributed both
small and big improvements, or valuable testing.
Build
-----
<sup>Please read LICENSE.md, it is very simple and very liberal.</sup>
There are two ways to build zlib-ng:
### Cmake
To build zlib-ng using the cross-platform makefile generator cmake.
```
cmake .
cmake --build . --config Release
ctest --verbose -C Release
```
Alternatively, you can use the cmake configuration GUI tool ccmake:
```
ccmake .
```
### Configure
To build zlib-ng using the bash configure script:
```
./configure
make
make test
```
Build Options
-------------
| CMake | configure | Description | Default |
|:---------------------------|:-------------------------|:------------------------------------------------------------------------------------|---------|
| ZLIB_COMPAT | --zlib-compat | Compile with zlib compatible API | OFF |
| ZLIB_ENABLE_TESTS | | Build test binaries | ON |
| WITH_GZFILEOP | --without-gzfileops | Compile with support for gzFile related functions | ON |
| WITH_OPTIM | --without-optimizations | Build with optimisations | ON |
| WITH_NEW_STRATEGIES | --without-new-strategies | Use new strategies | ON |
| WITH_NATIVE_INSTRUCTIONS | | Compiles with full instruction set supported on this host (gcc/clang -march=native) | OFF |
| WITH_RUNTIME_CPU_DETECTION | | Compiles with runtime CPU detection | ON |
| WITH_SANITIZER | | Build with sanitizer (memory, address, undefined) | OFF |
| WITH_GTEST | | Build gtest_zlib | ON |
| WITH_FUZZERS | | Build test/fuzz | OFF |
| WITH_BENCHMARKS | | Build test/benchmarks | OFF |
| WITH_MAINTAINER_WARNINGS | | Build with project maintainer warnings | OFF |
| WITH_CODE_COVERAGE | | Enable code coverage reporting | OFF |
Install
-------
WARNING: We do not recommend manually installing unless you really know what you are doing, because this can
potentially override the system default zlib library, and any incompatibility or wrong configuration of zlib-ng
can make the whole system unusable, requiring recovery or reinstall.
If you still want a manual install, we recommend using the /opt/ path prefix.
For Linux distros, an alternative way to use zlib-ng (if compiled in zlib-compat mode) instead of zlib, is through
the use of the _LD_PRELOAD_ environment variable. If the program is dynamically linked with zlib, then the program
will temporarily attempt to use zlib-ng instead, without risking system-wide instability.
```
LD_PRELOAD=/opt/zlib-ng/libz.so.1.2.13.zlib-ng /usr/bin/program
```
### Cmake
To install zlib-ng system-wide using cmake:
```sh or powershell
cmake --build . --target install
```
### Configure
To install zlib-ng system-wide using the configure script:
```sh
make install
```
### CPack
After building with cmake, an installation package can be created using cpack. By default a tgz package is created,
but you can append `-G <format>` to each command to generate alternative packages types (TGZ, ZIP, RPM, DEB). To easily
create a rpm or deb package, you would use `-G RPM` or `-G DEB` respectively.
```sh or powershell
cd build
cpack --config CPackConfig.cmake
cpack --config CPackSourceConfig.cmake
```
### Vcpkg
Alternatively, you can build and install zlib-ng using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
```sh or powershell
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh # "./bootstrap-vcpkg.bat" for powershell
./vcpkg integrate install
./vcpkg install zlib-ng
```
The zlib-ng port in vcpkg is kept up to date by Microsoft team members and community contributors.
If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
Contributing
------------
Zlib-ng is aiming to be open to contributions, and we would be delighted to receive pull requests on github.
Help with testing and reviewing pull requests etc is also very much appreciated.
Please check the Wiki for more info: [Contributing](https://github.com/zlib-ng/zlib-ng/wiki/Contributing)
Acknowledgments
----------------
Thanks go out to all the people and companies who have taken the time to contribute
code reviews, testing and/or patches. Zlib-ng would not have been nearly as good without you.
The deflate format used by zlib was defined by Phil Katz.<br>
The deflate and zlib specifications were written by L. Peter Deutsch.
zlib was originally created by Jean-loup Gailly (compression) and Mark Adler (decompression).
Advanced Build Options
----------------------
| CMake | configure | Description | Default |
|:--------------------------------|:----------------------|:--------------------------------------------------------------------|------------------------|
| FORCE_SSE2 | --force-sse2 | Skip runtime check for SSE2 instructions (Always on for x86_64) | OFF (x86) |
| WITH_AVX2 | | Build with AVX2 intrinsics | ON |
| WITH_AVX512 | | Build with AVX512 intrinsics | ON |
| WITH_AVX512VNNI | | Build with AVX512VNNI intrinsics | ON |
| WITH_SSE2 | | Build with SSE2 intrinsics | ON |
| WITH_SSSE3 | | Build with SSSE3 intrinsics | ON |
| WITH_SSE42 | | Build with SSE42 intrinsics | ON |
| WITH_PCLMULQDQ | | Build with PCLMULQDQ intrinsics | ON |
| WITH_VPCLMULQDQ | --without-vpclmulqdq | Build with VPCLMULQDQ intrinsics | ON |
| WITH_ARMV8 | --without-armv8 | Build with ARMv8 intrinsics | ON |
| WITH_NEON | --without-neon | Build with NEON intrinsics | ON |
| WITH_ARMV6 | --without-armv6 | Build with ARMv6 intrinsics | ON |
| WITH_ALTIVEC | --without-altivec | Build with AltiVec (VMX) intrinsics | ON |
| WITH_POWER8 | --without-power8 | Build with POWER8 optimisations | ON |
| WITH_RVV | | Build with RVV intrinsics | ON |
| WITH_CRC32_VX | --without-crc32-vx | Build with vectorized CRC32 on IBM Z | ON |
| WITH_DFLTCC_DEFLATE | --with-dfltcc-deflate | Build with DFLTCC intrinsics for compression on IBM Z | OFF |
| WITH_DFLTCC_INFLATE | --with-dfltcc-inflate | Build with DFLTCC intrinsics for decompression on IBM Z | OFF |
| WITH_INFLATE_STRICT | | Build with strict inflate distance checking | OFF |
| WITH_INFLATE_ALLOW_INVALID_DIST | | Build with zero fill for inflate invalid distances | OFF |
| INSTALL_UTILS | | Copy minigzip and minideflate during install | OFF |
| ZLIBNG_ENABLE_TESTS | | Test zlib-ng specific API | ON |
Related Projects
----------------
* Fork of the popular minizip https://github.com/zlib-ng/minizip-ng
* Python tool to benchmark minigzip/minideflate https://github.com/zlib-ng/deflatebench
* Python tool to benchmark pigz https://github.com/zlib-ng/pigzbench
* 3rd party patches for zlib-ng compatibility https://github.com/zlib-ng/patches
+33 -128
View File
@@ -3,148 +3,47 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zbuild.h"
#include "functable.h"
#include "adler32_p.h"
#include "zutil.h"
#define BASE 65521U /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
#define DO16(buf) DO8(buf,0); DO8(buf,8);
/* use NO_DIVIDE if your processor does not do division in hardware --
try it both ways to see which is faster */
#ifdef NO_DIVIDE
/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
(thank you to John Reiser for pointing this out) */
# define CHOP(a) \
do { \
unsigned long tmp = a >> 16; \
a &= 0xffffUL; \
a += (tmp << 4) - tmp; \
} while (0)
# define MOD28(a) \
do { \
CHOP(a); \
if (a >= BASE) a -= BASE; \
} while (0)
# define MOD(a) \
do { \
CHOP(a); \
MOD28(a); \
} while (0)
# define MOD63(a) \
do { /* this assumes a is not negative */ \
z_off64_t tmp = a >> 32; \
a &= 0xffffffffL; \
a += (tmp << 8) - (tmp << 5) + tmp; \
tmp = a >> 16; \
a &= 0xffffL; \
a += (tmp << 4) - tmp; \
tmp = a >> 16; \
a &= 0xffffL; \
a += (tmp << 4) - tmp; \
if (a >= BASE) a -= BASE; \
} while (0)
#ifdef ZLIB_COMPAT
unsigned long Z_EXPORT PREFIX(adler32_z)(unsigned long adler, const unsigned char *buf, size_t len) {
return (unsigned long)FUNCTABLE_CALL(adler32)((uint32_t)adler, buf, len);
}
#else
# define MOD(a) a %= BASE
# define MOD28(a) a %= BASE
# define MOD63(a) a %= BASE
uint32_t Z_EXPORT PREFIX(adler32_z)(uint32_t adler, const unsigned char *buf, size_t len) {
return FUNCTABLE_CALL(adler32)(adler, buf, len);
}
#endif
/* ========================================================================= */
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
unsigned long sum2;
unsigned n;
/* split Adler-32 into component sums */
sum2 = (adler >> 16) & 0xffff;
adler &= 0xffff;
/* in case user likes doing a byte at a time, keep it fast */
if (len == 1) {
adler += buf[0];
if (adler >= BASE)
adler -= BASE;
sum2 += adler;
if (sum2 >= BASE)
sum2 -= BASE;
return adler | (sum2 << 16);
}
/* initial Adler-32 value (deferred check for len == 1 speed) */
if (buf == Z_NULL)
return 1L;
/* in case short lengths are provided, keep it somewhat fast */
if (len < 16) {
while (len--) {
adler += *buf++;
sum2 += adler;
}
if (adler >= BASE)
adler -= BASE;
MOD28(sum2); /* only added so many BASE's */
return adler | (sum2 << 16);
}
/* do length NMAX blocks -- requires just one modulo operation */
while (len >= NMAX) {
len -= NMAX;
n = NMAX / 16; /* NMAX is divisible by 16 */
do {
DO16(buf); /* 16 sums unrolled */
buf += 16;
} while (--n);
MOD(adler);
MOD(sum2);
}
/* do remaining bytes (less than NMAX, still just one modulo) */
if (len) { /* avoid modulos if none remaining */
while (len >= 16) {
len -= 16;
DO16(buf);
buf += 16;
}
while (len--) {
adler += *buf++;
sum2 += adler;
}
MOD(adler);
MOD(sum2);
}
/* return recombined sums */
return adler | (sum2 << 16);
#ifdef ZLIB_COMPAT
unsigned long Z_EXPORT PREFIX(adler32)(unsigned long adler, const unsigned char *buf, unsigned int len) {
return (unsigned long)FUNCTABLE_CALL(adler32)((uint32_t)adler, buf, len);
}
#else
uint32_t Z_EXPORT PREFIX(adler32)(uint32_t adler, const unsigned char *buf, uint32_t len) {
return FUNCTABLE_CALL(adler32)(adler, buf, len);
}
#endif
/* ========================================================================= */
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
return adler32_z(adler, buf, len);
}
/* ========================================================================= */
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
unsigned long sum1;
unsigned long sum2;
static uint32_t adler32_combine_(uint32_t adler1, uint32_t adler2, z_off64_t len2) {
uint32_t sum1;
uint32_t sum2;
unsigned rem;
/* for negative len, return invalid adler32 as a clue for debugging */
if (len2 < 0)
return 0xffffffffUL;
return 0xffffffff;
/* the derivation of this formula is left as an exercise for the reader */
MOD63(len2); /* assumes len2 >= 0 */
len2 %= BASE; /* assumes len2 >= 0 */
rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
sum2 %= BASE;
sum1 += (adler2 & 0xffff) + BASE - 1;
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
if (sum1 >= BASE) sum1 -= BASE;
@@ -155,10 +54,16 @@ local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
}
/* ========================================================================= */
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
return adler32_combine_(adler1, adler2, len2);
#ifdef ZLIB_COMPAT
unsigned long Z_EXPORT PREFIX(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off_t len2) {
return (unsigned long)adler32_combine_((uint32_t)adler1, (uint32_t)adler2, len2);
}
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
unsigned long Z_EXPORT PREFIX4(adler32_combine)(unsigned long adler1, unsigned long adler2, z_off64_t len2) {
return (unsigned long)adler32_combine_((uint32_t)adler1, (uint32_t)adler2, len2);
}
#else
uint32_t Z_EXPORT PREFIX4(adler32_combine)(uint32_t adler1, uint32_t adler2, z_off64_t len2) {
return adler32_combine_(adler1, adler2, len2);
}
#endif
+70
View File
@@ -0,0 +1,70 @@
/* adler32_p.h -- Private inline functions and macros shared with
* different computation of the Adler-32 checksum
* of a data stream.
* Copyright (C) 1995-2011, 2016 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#ifndef ADLER32_P_H
#define ADLER32_P_H
#define BASE 65521U /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
#define ADLER_DO1(sum1, sum2, buf, i) {(sum1) += buf[(i)]; (sum2) += (sum1);}
#define ADLER_DO2(sum1, sum2, buf, i) {ADLER_DO1(sum1, sum2, buf, i); ADLER_DO1(sum1, sum2, buf, i+1);}
#define ADLER_DO4(sum1, sum2, buf, i) {ADLER_DO2(sum1, sum2, buf, i); ADLER_DO2(sum1, sum2, buf, i+2);}
#define ADLER_DO8(sum1, sum2, buf, i) {ADLER_DO4(sum1, sum2, buf, i); ADLER_DO4(sum1, sum2, buf, i+4);}
#define ADLER_DO16(sum1, sum2, buf) {ADLER_DO8(sum1, sum2, buf, 0); ADLER_DO8(sum1, sum2, buf, 8);}
static inline uint32_t adler32_len_1(uint32_t adler, const uint8_t *buf, uint32_t sum2) {
adler += buf[0];
adler %= BASE;
sum2 += adler;
sum2 %= BASE;
return adler | (sum2 << 16);
}
static inline uint32_t adler32_len_16(uint32_t adler, const uint8_t *buf, size_t len, uint32_t sum2) {
while (len) {
--len;
adler += *buf++;
sum2 += adler;
}
adler %= BASE;
sum2 %= BASE; /* only added so many BASE's */
/* return recombined sums */
return adler | (sum2 << 16);
}
static inline uint32_t adler32_copy_len_16(uint32_t adler, const uint8_t *buf, uint8_t *dst, size_t len, uint32_t sum2) {
while (len--) {
*dst = *buf++;
adler += *dst++;
sum2 += adler;
}
adler %= BASE;
sum2 %= BASE; /* only added so many BASE's */
/* return recombined sums */
return adler | (sum2 << 16);
}
static inline uint32_t adler32_len_64(uint32_t adler, const uint8_t *buf, size_t len, uint32_t sum2) {
#ifdef UNROLL_MORE
while (len >= 16) {
len -= 16;
ADLER_DO16(adler, sum2, buf);
buf += 16;
#else
while (len >= 8) {
len -= 8;
ADLER_DO8(adler, sum2, buf, 0);
buf += 8;
#endif
}
/* Process tail (len < 16). */
return adler32_len_16(adler, buf, len, sum2);
}
#endif /* ADLER32_P_H */
+29
View File
@@ -0,0 +1,29 @@
/* arch_functions.h -- Arch-specific function prototypes.
* Copyright (C) 2017 Hans Kristian Rosbach
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#ifndef CPU_FUNCTIONS_H_
#define CPU_FUNCTIONS_H_
#include "zbuild.h"
#include "zutil.h"
#include "crc32.h"
#include "deflate.h"
#include "fallback_builtins.h"
#include "arch/generic/generic_functions.h"
#if defined(X86_FEATURES)
# include "arch/x86/x86_functions.h"
#elif defined(ARM_FEATURES)
# include "arch/arm/arm_functions.h"
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
# include "arch/power/power_functions.h"
#elif defined(S390_FEATURES)
# include "arch/s390/s390_functions.h"
#elif defined(RISCV_FEATURES)
# include "arch/riscv/riscv_functions.h"
#endif
#endif
+283
View File
@@ -0,0 +1,283 @@
/* chunkset_tpl.h -- inline functions to copy small data chunks.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "zbuild.h"
#include <stdlib.h>
/* Returns the chunk size */
Z_INTERNAL uint32_t CHUNKSIZE(void) {
return sizeof(chunk_t);
}
/* Behave like memcpy, but assume that it's OK to overwrite at least
chunk_t bytes of output even if the length is shorter than this,
that the length is non-zero, and that `from` lags `out` by at least
sizeof chunk_t bytes (or that they don't overlap at all or simply that
the distance is less than the length of the copy).
Aside from better memory bus utilisation, this means that short copies
(chunk_t bytes or fewer) will fall straight through the loop
without iteration, which will hopefully make the branch prediction more
reliable. */
#ifndef HAVE_CHUNKCOPY
static inline uint8_t* CHUNKCOPY(uint8_t *out, uint8_t const *from, unsigned len) {
Assert(len > 0, "chunkcopy should never have a length 0");
chunk_t chunk;
int32_t align = ((len - 1) % sizeof(chunk_t)) + 1;
loadchunk(from, &chunk);
storechunk(out, &chunk);
out += align;
from += align;
len -= align;
while (len > 0) {
loadchunk(from, &chunk);
storechunk(out, &chunk);
out += sizeof(chunk_t);
from += sizeof(chunk_t);
len -= sizeof(chunk_t);
}
return out;
}
#endif
/* Perform short copies until distance can be rewritten as being at least
sizeof chunk_t.
This assumes that it's OK to overwrite at least the first
2*sizeof(chunk_t) bytes of output even if the copy is shorter than this.
This assumption holds because inflate_fast() starts every iteration with at
least 258 bytes of output space available (258 being the maximum length
output from a single token; see inflate_fast()'s assumptions below). */
#ifndef HAVE_CHUNKUNROLL
static inline uint8_t* CHUNKUNROLL(uint8_t *out, unsigned *dist, unsigned *len) {
unsigned char const *from = out - *dist;
chunk_t chunk;
while (*dist < *len && *dist < sizeof(chunk_t)) {
loadchunk(from, &chunk);
storechunk(out, &chunk);
out += *dist;
*len -= *dist;
*dist += *dist;
}
return out;
}
#endif
#ifndef HAVE_CHUNK_MAG
/* Loads a magazine to feed into memory of the pattern */
static inline chunk_t GET_CHUNK_MAG(uint8_t *buf, uint32_t *chunk_rem, uint32_t dist) {
/* This code takes string of length dist from "from" and repeats
* it for as many times as can fit in a chunk_t (vector register) */
uint64_t cpy_dist;
uint64_t bytes_remaining = sizeof(chunk_t);
chunk_t chunk_load;
uint8_t *cur_chunk = (uint8_t *)&chunk_load;
while (bytes_remaining) {
cpy_dist = MIN(dist, bytes_remaining);
memcpy(cur_chunk, buf, (size_t)cpy_dist);
bytes_remaining -= cpy_dist;
cur_chunk += cpy_dist;
/* This allows us to bypass an expensive integer division since we're effectively
* counting in this loop, anyway */
*chunk_rem = (uint32_t)cpy_dist;
}
return chunk_load;
}
#endif
#if defined(HAVE_HALF_CHUNK) && !defined(HAVE_HALFCHUNKCOPY)
static inline uint8_t* HALFCHUNKCOPY(uint8_t *out, uint8_t const *from, unsigned len) {
halfchunk_t chunk;
int32_t align = ((len - 1) % sizeof(halfchunk_t)) + 1;
loadhalfchunk(from, &chunk);
storehalfchunk(out, &chunk);
out += align;
from += align;
len -= align;
while (len > 0) {
loadhalfchunk(from, &chunk);
storehalfchunk(out, &chunk);
out += sizeof(halfchunk_t);
from += sizeof(halfchunk_t);
len -= sizeof(halfchunk_t);
}
return out;
}
#endif
/* Copy DIST bytes from OUT - DIST into OUT + DIST * k, for 0 <= k < LEN/DIST.
Return OUT + LEN. */
static inline uint8_t* CHUNKMEMSET(uint8_t *out, uint8_t *from, unsigned len) {
/* Debug performance related issues when len < sizeof(uint64_t):
Assert(len >= sizeof(uint64_t), "chunkmemset should be called on larger chunks"); */
Assert(from != out, "chunkmemset cannot have a distance 0");
chunk_t chunk_load;
uint32_t chunk_mod = 0;
uint32_t adv_amount;
int64_t sdist = out - from;
uint64_t dist = llabs(sdist);
/* We are supporting the case for when we are reading bytes from ahead in the buffer.
* We now have to handle this, though it wasn't _quite_ clear if this rare circumstance
* always needed to be handled here or if we're just now seeing it because we are
* dispatching to this function, more */
if (sdist < 0 && dist < len) {
#ifdef HAVE_MASKED_READWRITE
/* We can still handle this case if we can mitigate over writing _and_ we
* fit the entirety of the copy length with one load */
if (len <= sizeof(chunk_t)) {
/* Tempting to add a goto to the block below but hopefully most compilers
* collapse these identical code segments as one label to jump to */
return CHUNKCOPY(out, from, len);
}
#endif
/* Here the memmove semantics match perfectly, as when this happens we are
* effectively sliding down the contents of memory by dist bytes */
memmove(out, from, len);
return out + len;
}
if (dist == 1) {
memset(out, *from, len);
return out + len;
} else if (dist >= sizeof(chunk_t)) {
return CHUNKCOPY(out, from, len);
}
/* Only AVX2+ as there's 128 bit vectors and 256 bit. We allow for shorter vector
* lengths because they serve to allow more cases to fall into chunkcopy, as the
* distance of the shorter length is still deemed a safe distance. We rewrite this
* here rather than calling the ssse3 variant directly now because doing so required
* dispatching to another function and broke inlining for this function entirely. We
* also can merge an assert and some remainder peeling behavior into the same code blocks,
* making the code a little smaller. */
#ifdef HAVE_HALF_CHUNK
if (len <= sizeof(halfchunk_t)) {
if (dist >= sizeof(halfchunk_t))
return HALFCHUNKCOPY(out, from, len);
if ((dist % 2) != 0 || dist == 6) {
halfchunk_t halfchunk_load = GET_HALFCHUNK_MAG(from, &chunk_mod, (unsigned)dist);
if (len == sizeof(halfchunk_t)) {
storehalfchunk(out, &halfchunk_load);
len -= sizeof(halfchunk_t);
out += sizeof(halfchunk_t);
}
chunk_load = halfchunk2whole(&halfchunk_load);
goto rem_bytes;
}
}
#endif
#ifdef HAVE_CHUNKMEMSET_2
if (dist == 2) {
chunkmemset_2(from, &chunk_load);
} else
#endif
#ifdef HAVE_CHUNKMEMSET_4
if (dist == 4) {
chunkmemset_4(from, &chunk_load);
} else
#endif
#ifdef HAVE_CHUNKMEMSET_8
if (dist == 8) {
chunkmemset_8(from, &chunk_load);
} else
#endif
#ifdef HAVE_CHUNKMEMSET_16
if (dist == 16) {
chunkmemset_16(from, &chunk_load);
} else
#endif
chunk_load = GET_CHUNK_MAG(from, &chunk_mod, (unsigned)dist);
adv_amount = sizeof(chunk_t) - chunk_mod;
while (len >= (2 * sizeof(chunk_t))) {
storechunk(out, &chunk_load);
storechunk(out + adv_amount, &chunk_load);
out += 2 * adv_amount;
len -= 2 * adv_amount;
}
/* If we don't have a "dist" length that divides evenly into a vector
* register, we can write the whole vector register but we need only
* advance by the amount of the whole string that fits in our chunk_t.
* If we do divide evenly into the vector length, adv_amount = chunk_t size*/
while (len >= sizeof(chunk_t)) {
storechunk(out, &chunk_load);
len -= adv_amount;
out += adv_amount;
}
#ifdef HAVE_HALF_CHUNK
rem_bytes:
#endif
if (len) {
memcpy(out, &chunk_load, len);
out += len;
}
return out;
}
Z_INTERNAL uint8_t* CHUNKMEMSET_SAFE(uint8_t *out, uint8_t *from, unsigned len, unsigned left) {
#if OPTIMAL_CMP < 32
static const uint32_t align_mask = 7;
#elif OPTIMAL_CMP == 32
static const uint32_t align_mask = 3;
#endif
len = MIN(len, left);
#if OPTIMAL_CMP < 64
while (((uintptr_t)out & align_mask) && (len > 0)) {
*out++ = *from++;
--len;
--left;
}
#endif
#ifndef HAVE_MASKED_READWRITE
if (UNLIKELY(left < sizeof(chunk_t))) {
while (len > 0) {
*out++ = *from++;
--len;
}
return out;
}
#endif
if (len)
out = CHUNKMEMSET(out, from, len);
return out;
}
static inline uint8_t *CHUNKCOPY_SAFE(uint8_t *out, uint8_t *from, uint64_t len, uint8_t *safe)
{
if (out == from)
return out + len;
uint64_t safelen = (safe - out);
len = MIN(len, safelen);
#ifndef HAVE_MASKED_READWRITE
uint64_t from_dist = (uint64_t)llabs(safe - from);
if (UNLIKELY(from_dist < sizeof(chunk_t) || safelen < sizeof(chunk_t))) {
while (len--) {
*out++ = *from++;
}
return out;
}
#endif
return CHUNKMEMSET(out, from, (unsigned)len);
}
+133
View File
@@ -0,0 +1,133 @@
/* compare256_rle.h -- 256 byte run-length encoding comparison
* Copyright (C) 2022 Nathan Moinvaziri
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "zbuild.h"
#include "zmemory.h"
#include "fallback_builtins.h"
typedef uint32_t (*compare256_rle_func)(const uint8_t* src0, const uint8_t* src1);
/* 8-bit integer comparison */
static inline uint32_t compare256_rle_8(const uint8_t *src0, const uint8_t *src1) {
uint32_t len = 0;
do {
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
if (*src0 != *src1)
return len;
src1 += 1, len += 1;
} while (len < 256);
return 256;
}
/* 16-bit integer comparison */
static inline uint32_t compare256_rle_16(const uint8_t *src0, const uint8_t *src1) {
uint32_t len = 0;
uint16_t src0_cmp;
src0_cmp = zng_memread_2(src0);
do {
if (src0_cmp != zng_memread_2(src1))
return len + (*src0 == *src1);
src1 += 2, len += 2;
if (src0_cmp != zng_memread_2(src1))
return len + (*src0 == *src1);
src1 += 2, len += 2;
if (src0_cmp != zng_memread_2(src1))
return len + (*src0 == *src1);
src1 += 2, len += 2;
if (src0_cmp != zng_memread_2(src1))
return len + (*src0 == *src1);
src1 += 2, len += 2;
} while (len < 256);
return 256;
}
#ifdef HAVE_BUILTIN_CTZ
/* 32-bit integer comparison */
static inline uint32_t compare256_rle_32(const uint8_t *src0, const uint8_t *src1) {
uint32_t sv, len = 0;
uint16_t src0_cmp;
src0_cmp = zng_memread_2(src0);
sv = ((uint32_t)src0_cmp << 16) | src0_cmp;
do {
uint32_t mv, diff;
mv = zng_memread_4(src1);
diff = sv ^ mv;
if (diff) {
#if BYTE_ORDER == LITTLE_ENDIAN
uint32_t match_byte = __builtin_ctz(diff) / 8;
#else
uint32_t match_byte = __builtin_clz(diff) / 8;
#endif
return len + match_byte;
}
src1 += 4, len += 4;
} while (len < 256);
return 256;
}
#endif
#ifdef HAVE_BUILTIN_CTZLL
/* 64-bit integer comparison */
static inline uint32_t compare256_rle_64(const uint8_t *src0, const uint8_t *src1) {
uint32_t src0_cmp32, len = 0;
uint16_t src0_cmp;
uint64_t sv;
src0_cmp = zng_memread_2(src0);
src0_cmp32 = ((uint32_t)src0_cmp << 16) | src0_cmp;
sv = ((uint64_t)src0_cmp32 << 32) | src0_cmp32;
do {
uint64_t mv, diff;
mv = zng_memread_8(src1);
diff = sv ^ mv;
if (diff) {
#if BYTE_ORDER == LITTLE_ENDIAN
uint64_t match_byte = __builtin_ctzll(diff) / 8;
#else
uint64_t match_byte = __builtin_clzll(diff) / 8;
#endif
return len + (uint32_t)match_byte;
}
src1 += 8, len += 8;
} while (len < 256);
return 256;
}
#endif
+48 -25
View File
@@ -3,10 +3,19 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
#include "zbuild.h"
#include "zutil.h"
#define ZLIB_INTERNAL
#include "zlib.h"
/* ===========================================================================
* Architecture-specific hooks.
*/
#ifdef S390_DFLTCC_DEFLATE
# include "arch/s390/dfltcc_common.h"
#else
/* Returns the upper bound on compressed data length based on uncompressed data length, assuming default settings.
* Zero means that arch-specific deflation code behaves identically to the regular zlib-ng algorithms. */
# define DEFLATE_BOUND_COMPLEN(source_len) 0
#endif
/* ===========================================================================
Compresses the source buffer into the destination buffer. The level
@@ -19,57 +28,71 @@
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
uLong sourceLen, int level) {
z_stream stream;
int Z_EXPORT PREFIX(compress2)(unsigned char *dest, z_uintmax_t *destLen, const unsigned char *source,
z_uintmax_t sourceLen, int level) {
PREFIX3(stream) stream;
int err;
const uInt max = (uInt)-1;
uLong left;
const unsigned int max = (unsigned int)-1;
z_size_t left;
left = *destLen;
*destLen = 0;
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
stream.opaque = (voidpf)0;
stream.zalloc = NULL;
stream.zfree = NULL;
stream.opaque = NULL;
err = deflateInit(&stream, level);
if (err != Z_OK) return err;
err = PREFIX(deflateInit)(&stream, level);
if (err != Z_OK)
return err;
stream.next_out = dest;
stream.avail_out = 0;
stream.next_in = (z_const Bytef *)source;
stream.next_in = (z_const unsigned char *)source;
stream.avail_in = 0;
do {
if (stream.avail_out == 0) {
stream.avail_out = left > (uLong)max ? max : (uInt)left;
stream.avail_out = left > (unsigned long)max ? max : (unsigned int)left;
left -= stream.avail_out;
}
if (stream.avail_in == 0) {
stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;
stream.avail_in = sourceLen > (unsigned long)max ? max : (unsigned int)sourceLen;
sourceLen -= stream.avail_in;
}
err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
err = PREFIX(deflate)(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
} while (err == Z_OK);
*destLen = stream.total_out;
deflateEnd(&stream);
PREFIX(deflateEnd)(&stream);
return err == Z_STREAM_END ? Z_OK : err;
}
/* ===========================================================================
*/
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
uLong sourceLen) {
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
int Z_EXPORT PREFIX(compress)(unsigned char *dest, z_uintmax_t *destLen, const unsigned char *source, z_uintmax_t sourceLen) {
return PREFIX(compress2)(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
/* ===========================================================================
If the default memLevel or windowBits for deflateInit() is changed, then
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
uLong ZEXPORT compressBound(uLong sourceLen) {
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
(sourceLen >> 25) + 13;
z_uintmax_t Z_EXPORT PREFIX(compressBound)(z_uintmax_t sourceLen) {
z_uintmax_t complen = DEFLATE_BOUND_COMPLEN(sourceLen);
if (complen > 0)
/* Architecture-specific code provided an upper bound. */
return complen + ZLIB_WRAPLEN;
#ifndef NO_QUICK_STRATEGY
return sourceLen /* The source size itself */
+ (sourceLen == 0 ? 1 : 0) /* Always at least one byte for any input */
+ (sourceLen < 9 ? 1 : 0) /* One extra byte for lengths less than 9 */
+ DEFLATE_QUICK_OVERHEAD(sourceLen) /* Source encoding overhead, padded to next full byte */
+ DEFLATE_BLOCK_OVERHEAD /* Deflate block overhead bytes */
+ ZLIB_WRAPLEN; /* zlib wrapper */
#else
return sourceLen + (sourceLen >> 4) + 7 + ZLIB_WRAPLEN;
#endif
}
Vendored Executable → Regular
+1921 -511
View File
File diff suppressed because it is too large. Load diff
+23
View File
@@ -0,0 +1,23 @@
/* cpu_features.c -- CPU architecture feature check
* Copyright (C) 2017 Hans Kristian Rosbach
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include "zbuild.h"
#include "cpu_features.h"
#include <string.h>
Z_INTERNAL void cpu_check_features(struct cpu_features *features) {
memset(features, 0, sizeof(struct cpu_features));
#if defined(X86_FEATURES)
x86_check_features(&features->x86);
#elif defined(ARM_FEATURES)
arm_check_features(&features->arm);
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
power_check_features(&features->power);
#elif defined(S390_FEATURES)
s390_check_features(&features->s390);
#elif defined(RISCV_FEATURES)
riscv_check_features(&features->riscv);
#endif
}
+43
View File
@@ -0,0 +1,43 @@
/* cpu_features.h -- CPU architecture feature check
* Copyright (C) 2017 Hans Kristian Rosbach
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#ifndef CPU_FEATURES_H_
#define CPU_FEATURES_H_
#ifndef DISABLE_RUNTIME_CPU_DETECTION
#if defined(X86_FEATURES)
# include "arch/x86/x86_features.h"
#elif defined(ARM_FEATURES)
# include "arch/arm/arm_features.h"
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
# include "arch/power/power_features.h"
#elif defined(S390_FEATURES)
# include "arch/s390/s390_features.h"
#elif defined(RISCV_FEATURES)
# include "arch/riscv/riscv_features.h"
#endif
struct cpu_features {
#if defined(X86_FEATURES)
struct x86_cpu_features x86;
#elif defined(ARM_FEATURES)
struct arm_cpu_features arm;
#elif defined(PPC_FEATURES) || defined(POWER_FEATURES)
struct power_cpu_features power;
#elif defined(S390_FEATURES)
struct s390_cpu_features s390;
#elif defined(RISCV_FEATURES)
struct riscv_cpu_features riscv;
#else
char empty;
#endif
};
void cpu_check_features(struct cpu_features *features);
#endif
#endif
+23 -1030
View File
File diff suppressed because it is too large. Load diff
+17 -9440
View File
File diff suppressed because it is too large. Load diff
+56
View File
@@ -0,0 +1,56 @@
/* crc32_braid_comb.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-2022 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* This interleaved implementation of a CRC makes use of pipelined multiple
* arithmetic-logic units, commonly found in modern CPU cores. It is due to
* Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution.
*/
#include "zutil.h"
#include "crc32_braid_p.h"
#include "crc32_braid_tbl.h"
#include "crc32_braid_comb_p.h"
/* ========================================================================= */
static uint32_t crc32_combine_(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
return multmodp(x2nmodp(len2, 3), crc1) ^ crc2;
}
static uint32_t crc32_combine_gen_(z_off64_t len2) {
return x2nmodp(len2, 3);
}
static uint32_t crc32_combine_op_(uint32_t crc1, uint32_t crc2, const uint32_t op) {
return multmodp(op, crc1) ^ crc2;
}
/* ========================================================================= */
#ifdef ZLIB_COMPAT
unsigned long Z_EXPORT PREFIX(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off_t len2) {
return (unsigned long)crc32_combine_((uint32_t)crc1, (uint32_t)crc2, len2);
}
unsigned long Z_EXPORT PREFIX4(crc32_combine)(unsigned long crc1, unsigned long crc2, z_off64_t len2) {
return (unsigned long)crc32_combine_((uint32_t)crc1, (uint32_t)crc2, len2);
}
unsigned long Z_EXPORT PREFIX(crc32_combine_gen)(z_off_t len2) {
return crc32_combine_gen_(len2);
}
unsigned long Z_EXPORT PREFIX4(crc32_combine_gen)(z_off64_t len2) {
return crc32_combine_gen_(len2);
}
unsigned long Z_EXPORT PREFIX(crc32_combine_op)(unsigned long crc1, unsigned long crc2, const unsigned long op) {
return (unsigned long)crc32_combine_op_((uint32_t)crc1, (uint32_t)crc2, (uint32_t)op);
}
#else
uint32_t Z_EXPORT PREFIX4(crc32_combine)(uint32_t crc1, uint32_t crc2, z_off64_t len2) {
return crc32_combine_(crc1, crc2, len2);
}
uint32_t Z_EXPORT PREFIX(crc32_combine_gen)(z_off64_t len2) {
return crc32_combine_gen_(len2);
}
uint32_t Z_EXPORT PREFIX(crc32_combine_op)(uint32_t crc1, uint32_t crc2, const uint32_t op) {
return crc32_combine_op_(crc1, crc2, op);
}
#endif
/* ========================================================================= */
+42
View File
@@ -0,0 +1,42 @@
#ifndef CRC32_BRAID_COMB_P_H_
#define CRC32_BRAID_COMB_P_H_
/*
Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
reflected. For speed, this requires that a not be zero.
*/
static uint32_t multmodp(uint32_t a, uint32_t b) {
uint32_t m, p;
m = (uint32_t)1 << 31;
p = 0;
for (;;) {
if (a & m) {
p ^= b;
if ((a & (m - 1)) == 0)
break;
}
m >>= 1;
b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
}
return p;
}
/*
Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
initialized.
*/
static uint32_t x2nmodp(z_off64_t n, unsigned k) {
uint32_t p;
p = (uint32_t)1 << 31; /* x^0 == 1 */
while (n) {
if (n & 1)
p = multmodp(x2n_table[k & 31], p);
n >>= 1;
k++;
}
return p;
}
#endif /* CRC32_BRAID_COMB_P_H_ */
+40
View File
@@ -0,0 +1,40 @@
#ifndef CRC32_BRAID_P_H_
#define CRC32_BRAID_P_H_
#include "zendian.h"
/* Define BRAID_N, valid range is 1..6 */
#define BRAID_N 5
/* Define BRAID_W and the associated z_word_t type. If BRAID_W is not defined, then a braided
calculation is not used, and the associated tables and code are not compiled.
*/
#if defined(__x86_64__) || defined(_M_AMD64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__)
# define BRAID_W 8
typedef uint64_t z_word_t;
#else
# define BRAID_W 4
typedef uint32_t z_word_t;
#endif
#if BYTE_ORDER == LITTLE_ENDIAN
# define ZSWAPWORD(word) (word)
# define BRAID_TABLE crc_braid_table
#elif BYTE_ORDER == BIG_ENDIAN
# if BRAID_W == 8
# define ZSWAPWORD(word) ZSWAP64(word)
# elif BRAID_W == 4
# define ZSWAPWORD(word) ZSWAP32(word)
# endif
# define BRAID_TABLE crc_braid_big_table
#else
# error "No endian defined"
#endif
#define CRC_DO1 c = crc_table[(c ^ *buf++) & 0xff] ^ (c >> 8)
#define CRC_DO8 CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1; CRC_DO1
/* CRC polynomial. */
#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */
#endif /* CRC32_BRAID_P_H_ */
File diff suppressed because it is too large. Load diff
Loaded 100 of 357 files, more files were not shown because too many files have changed in this diff. Show more