Mercurial > minori
changeset 310:a4257370de16
dep/animone: prepare for v1.0 release; it should be ready by now
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Tue, 11 Jun 2024 04:38:51 -0400 |
parents | bf89fbf7ff38 |
children | fb0f6b5050ff |
files | dep/animone/configure.ac dep/animone/src/fd/bsd.cc dep/animone/src/fd/proc.cc dep/animone/src/fd/win32.cc dep/animone/src/fd/xnu.cc dep/animone/src/util/win32.cc dep/animone/src/win/x11.cc |
diffstat | 7 files changed, 41 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/dep/animone/configure.ac Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/configure.ac Tue Jun 11 04:38:51 2024 -0400 @@ -1,4 +1,4 @@ -AC_INIT([animone], [0.1.0-alpha.1]) +AC_INIT([animone], [1.0.0]) AC_CANONICAL_HOST
--- a/dep/animone/src/fd/bsd.cc Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/src/fd/bsd.cc Tue Jun 11 04:38:51 2024 -0400 @@ -1,3 +1,9 @@ +/* + * fd/win32.cc: support for most BSDs + * + * should support (Free/Open/Net)BSD. possibly more, + * but this code is untested outside of FreeBSD. + */ #include "animone/fd/bsd.h" #include "animone.h" #include "animone/fd.h"
--- a/dep/animone/src/fd/proc.cc Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/src/fd/proc.cc Tue Jun 11 04:38:51 2024 -0400 @@ -1,3 +1,8 @@ +/* + * fd/win32.cc: support for linux's /proc filesystem + * + * plan 9 caused this monstrocity... + */ #include "animone/fd/proc.h" #include "animone.h" #include "animone/util.h"
--- a/dep/animone/src/fd/win32.cc Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/src/fd/win32.cc Tue Jun 11 04:38:51 2024 -0400 @@ -1,3 +1,16 @@ +/* + * fd/win32.cc: support for windows + * + * this file is noticably more complex than *nix, and that's because + * there is no "simple" way to get the paths of a file. In fact, this thing requires + * you to use *internal functions* that can't even be linked to, hence why we have to + * use GetProcAddress and such. what a mess. + * + * Speaking of which, because this file uses internal functions of the OS, it is not + * even guaranteed to work far into the future. however, just like with macOS, these + * things have stayed the same since Vista so if Microsoft *really* wants compatibility + * then they're pretty much forced to keeping this the same anyway. + */ #include "animone/fd/win32.h" #include "animone.h" #include "animone/util/win32.h" @@ -18,16 +31,6 @@ #include <windows.h> #include <winternl.h> -/* This file is noticably more complex than Unix and Linux, and that's because - * there is no "simple" way to get the paths of a file. In fact, this thing requires - * you to use *internal functions* that can't even be linked to, hence why we have to - * use GetProcAddress and such. What a mess. - * - * Speaking of which, because this file uses internal functions of the OS, it is not - * guaranteed to work far into the future. However, it has worked since NT 6.0 (Vista) - * at least, so it's unlikely to be changed much ever. - */ - /* SystemExtendedHandleInformation is only available in NT 5.1+ (XP and higher) and provides information for * 32-bit PIDs, unlike SystemHandleInformation */
--- a/dep/animone/src/fd/xnu.cc Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/src/fd/xnu.cc Tue Jun 11 04:38:51 2024 -0400 @@ -1,6 +1,12 @@ +/* + * fd/xnu.cc: support for macOS's kernel + * + * this used to have all sorts of hacks for getting the process name, + * but ultimately I just decided that it's better to just parse the + * PID path from xnu, which should work perfectly fine. + */ #include "animone/fd/xnu.h" #include "animone.h" -#include "animone/util/osx.h" #include <cassert> #include <memory>
--- a/dep/animone/src/util/win32.cc Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/src/util/win32.cc Tue Jun 11 04:38:51 2024 -0400 @@ -1,3 +1,6 @@ +/* + * util/win32.cc: utility functions only useful on windows + */ #include "animone/util/win32.h" #include <shlobj.h> /* SHGetKnownFolderPath */
--- a/dep/animone/src/win/x11.cc Tue Jun 11 04:24:59 2024 -0400 +++ b/dep/animone/src/win/x11.cc Tue Jun 11 04:38:51 2024 -0400 @@ -1,3 +1,9 @@ +/* + * win/x11.c: support for X11 using XCB + * + * some things might be wrong here due to + * having to use recursive logic, but whatever + */ #include "animone/win/x11.h" #include "animone.h" #include "animone/fd.h" /* GetProcessName() */ @@ -17,8 +23,6 @@ #include <iostream> -/* This uses XCB (and it uses it *right*), so it should be plenty fast */ - static size_t str_nlen(const char* s, size_t len) { size_t i = 0; for (; i < len && s[i]; i++)