Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: Python/C/Pascal ... How To Choose ? Date: 9 Nov 2025 02:37:37 GMT Lines: 72 Message-ID: References: <10eopoa$2u7bc$2@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net 4XBo7v2zAuRVDNZ2ggLmUQds90tzotF5nBWiJelSpM8UzzHbF/ Cancel-Lock: sha1:6Gx8+myMi2gEsmv/S0etv8C2eUQ= sha256:g0gEI8IgfdQwNg3zPCR8J8hyP+xBQ+wcQiXQsPsO3zM= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:77149 On Sun, 09 Nov 2025 01:11:38 +0000, vallor wrote: > At 8 Nov 2025 20:29:34 GMT, rbowman wrote: > >> On Sat, 8 Nov 2025 02:01:12 -0500, c186282 wrote: >> >> >> > The ffmpeg command line required is long and complicated. Some >> > literal stuff, some vars. Then I remember that 'C' is a total BASTARD >> > when it comes to strings. >> >> Only if you don't know the language. sprintf() is your friend if >> strcat() won't do. Consider that sprintf() returns the number of bytes >> printed. >> >> char* ptr = buffer ptr += sprintf(ptr, "sone value %d ", x); >> ptr += sprintf(ptr, "another value %d ", y); >> >> allows you to build whatever you want in buffer. (assuming buffer is >> valid memory and you're doing some sanity checking. >> >> >> > Note neither 'C' or FP have a straight-up equiv for 'sleep()'. This >> > is critical to my app. Turbo had something like it ... but it was >> > like a legacy lib and not sure to be as accurate or versatile as >> > Python sleep(). >> >> man 3 sleep man 3 usleep man 2 nanosleep >> >> What do you think CPython is doing? > > These are POSIX functions -- could he be using something non-POSIX? > > (I'm not much of a Windows C programmer, so not sure if this question > even makes sense.) Possibly but my assumption is someone posting in a Linux group is using a POSIX system. The Windows MSVCRT does have Sleep(), which takes milliseconds as an argument. My experience on Windows is skewed since we used the MKS Nutcracker toolkit that implemented a POSIX environment that allowed utilizing the legacy code with minimal modifications. It also included the PTC X server since the GUIs used Motif. it is similar to Cygwin but is proprietary. The runtime license fee for the clients is minimal and avoids any LGPL complications. While the toolkit includes common Unix command line utilities it doesn't get into the whole Linux feel like Cygwin. In the '90s there were two different philosophies. Cygwin, which was developed by Corrina Vinschen and others wanted the whole Unix feel. MinGW, ultimately ran by Mumit Khan, wanted to use the GCC tools to build native Windows applications. It's a minefield. The MKS setup uses the Visual C/C++ compiler. For a long time it more or less supported C89, and then some C99 features were added. The latest version has most of the C11 and C17 standards, but not all. The runtime has some POSIX functions like _sleep(), the rationale being anything that is system dependent should have an initial underscore. The C++ compiler has mixed compliance too and unless you really go out of your way to write plain vanilla code you wind up using MS specific calls that won't port.