shithub: qk1

Download patch

ref: 98096fe3bd72a2d032bb33575690c0fc3734dd87
parent: 1a3b7dc68ec19b9bae701bd251c0f866dffffaf6
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Feb 1 13:37:32 EST 2024

(u)vlong -> (u/s)64int

--- a/fns.h
+++ b/fns.h
@@ -56,10 +56,10 @@
 #pragma varargck	argpos	fatal	1
 _Noreturn void	fatal(char*, ...);
 void*	emalloc(long);
-vlong	flen(int);
+s64int	flen(int);
 double	dtime(void);
 void	game_shutdown(void);
-uvlong	nanosec(void);
+u64int	nanosec(void);
 
 char *lerr(void);
 int	sys_mkdir(char *path);
--- a/fs.c
+++ b/fs.c
@@ -102,7 +102,7 @@
 static byte *loadbuf;
 static mem_user_t *loadcache;
 static FILE *demobf;
-static vlong demoofs;
+static s64int demoofs;
 
 #define	GBIT32(p)	((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24))
 #define	PBIT32(p,v)	(p)[0]=(v);(p)[1]=(v)>>8;(p)[2]=(v)>>16;(p)[3]=(v)>>24
@@ -266,10 +266,10 @@
 	put32(bf, w.u);
 }
 
-static vlong
+static s64int
 bsize(FILE *bf)
 {
-	vlong o, n;
+	s64int o, n;
 
 	o = ftell(bf);
 	fseek(bf, 0, SEEK_END);
--- a/nanosec.c
+++ b/nanosec.c
@@ -7,11 +7,11 @@
  * so need to use cycles() instead, but fall back to
  * nsec() in case we can't
  */
-uvlong
+u64int
 nanosec(void)
 {
-	static uvlong fasthz, xstart;
-	uvlong x, div;
+	static u64int fasthz, xstart;
+	u64int x, div;
 
 	if(fasthz == ~0ULL)
 		return nsec() - xstart;
--- a/posix/platform.h
+++ b/posix/platform.h
@@ -15,8 +15,6 @@
 #include <unistd.h>
 
 typedef unsigned char uchar;
-typedef long long vlong;
-typedef unsigned long long uvlong;
 typedef int8_t s8int;
 typedef uint8_t u8int;
 typedef int16_t s16int;
--- a/qw/sys.h
+++ b/qw/sys.h
@@ -8,7 +8,7 @@
 extern int svonly;
 
 int Sys_mkdir(char *);
-vlong flen(int);
+s64int flen(int);
 
 void Sys_Error(char *, ...);
 void Sys_Printf(char *, ...);
@@ -22,6 +22,6 @@
 void Sys_SetFPCW(void);
 void Sys_Init(void);
 void initparm(quakeparms_t *);
-uvlong nanosec(void);
+u64int nanosec(void);
 
 void*	emalloc(ulong);
--- a/screen.c
+++ b/screen.c
@@ -308,9 +308,9 @@
 
 static void SCR_DrawFPS (void)
 {
-	static uvlong lastframetime;
+	static u64int lastframetime;
 	static int lastcnt, fps;
-	uvlong t;
+	u64int t;
 	int n;
 	char s[16];
 
--- a/snd_mix.c
+++ b/snd_mix.c
@@ -34,7 +34,7 @@
 
 static int ainit, mixbufi;
 static byte mixbufs[2][Ssamp*Sblk], *mixbuf;
-static vlong sndt, sampt;
+static s64int sndt, sampt;
 static int nsamp;
 static int sampbuf[Ssamp*2];
 static int scalt[32][256];
--- a/sys_plan9.c
+++ b/sys_plan9.c
@@ -97,10 +97,10 @@
 	return p;
 }
 
-vlong
+s64int
 flen(int fd)
 {
-	vlong l;
+	s64int l;
 	Dir *d;
 
 	if((d = dirfstat(fd)) == nil)	/* file assumed extant and readable */
--- a/sys_unix.c
+++ b/sys_unix.c
@@ -78,7 +78,7 @@
 	return p;
 }
 
-uvlong
+u64int
 nanosec(void)
 {
 	static time_t sec0;
--- a/sys_windows.c
+++ b/sys_windows.c
@@ -78,7 +78,7 @@
 	return p;
 }
 
-uvlong
+u64int
 nanosec(void)
 {
 	static time_t sec0;