Interesting. BTW, I had to add to PCRLIB.H to get the correct compiled code of the random-function. There might be a more authentic way to get the same result.
Foro Public Commander Keen Forum
pckf.com ↗Foro phpBB en inglés. 12 secciones seguidas: Official Keen Games, Commander Keen, Miscellaneous, ↳ KeenWiki, ↳ Keen Awards, ↳ Unofficial Keen Games, ↳ Other Keen Stuff, ↳ Release Forum, ↳ Modding, ↳ Miscellaneous, ↳ The Theater y ↳ Commander Genius.
- Discusiones por día
- 1
- Discusiones recopiladas
- 30
- Mensajes por día
- 20
- Secciones
- 12
- Fuentes seguidas
- 15
- Motor
- phpBB
Últimas discusiones
Recogido cada 4 horas desde el feed público del foro. Solo se reproducen el título, el enlace y el principio del mensaje; cada enlace remite a la fuente.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
In the function _inputint I had to replace digits=strlen(string)-2 by digits=strlen(string)+-2 to get the correct compiled code. In case the issue arises again: Turbo C++ will only turn the C expression "x - 2" into the equivalent of "x + -2" when "x" is signed. The fact that you had to use "strlen(string)+-2" instead of the original "strlen(string)-2" in PCRLIB_C.C suggests that the original source code treated the result of strlen() as a signed int instead of an unsigned int. You also had to explicitly cast the result of strlen() to int in the _printc() function, which the original code didn't do. This could mean that the code did not include and the missing prototype for the strlen() function caused the compiler to assume it was a function returning an int. Turbo C++ 1.00 doesn't show any compiler warnings for missing prototypes by default, which might have caused quite a lot of frustrated debugging sessions back in the day. The option to enable these warnings does exist (in all of Borland's C compilers all the way back to Turbo C 1.0 from 1987) but it is disabled by default. As far as I can tell, Borland C++ 3.1 is the first version where this warning is enabled by default.
30 discusiones recopiladas desde el 2 de septiembre de 2026. Seguir este foro por palabra clave →