Get Cosmopolitan into releasable state

A new rollup tool now exists for flattening out the headers in a way
that works better for our purposes than cpp. A lot of the API clutter
has been removed. APIs that aren't a sure thing in terms of general
recommendation are now marked internal.

There's now a smoke test for the amalgamation archive and gigantic
header file. So we can now guarantee you can use this project on the
easiest difficulty setting without the gigantic repository.

A website is being created, which is currently a work in progress:
https://justine.storage.googleapis.com/cosmopolitan/index.html
This commit is contained in:
Justine Tunney 2020-11-25 08:19:00 -08:00
parent dba7552c1e
commit ea0b5d9d1c
775 changed files with 6864 additions and 3963 deletions

View file

@ -1,10 +1,9 @@
#ifndef COSMOPOLITAN_LIBC_NT_REGISTRY_H_
#define COSMOPOLITAN_LIBC_NT_REGISTRY_H_
#include "libc/nt/enum/keyaccess.h"
#include "libc/nt/enum/reggetvalueflags.h"
#include "libc/nt/enum/regtype.h"
#include "libc/nt/enum/securityinformation.h"
#if 0
#include "libc/nt/struct/filetime.h"
#include "libc/nt/struct/securityattributes.h"
#include "libc/nt/struct/valent.h"
/* ░░░░
@ -29,46 +28,39 @@
cosmopolitan § new technology » registry
*/
#endif
#define kNtMaxKeyNameChars 255
#define kNtMaxKeyNameChars 255
#define kNtMaxValueNameChars 16383
#define kNtMaxValueBytes 0x100000
#define kNtMaxValueBytes 0x100000
#define kNtHkeyClassesRoot 0x80000000l
#define kNtHkeyCurrentUser 0x80000001l
#define kNtHkeyLocalMachine 0x80000002l
#define kNtHkeyUsers 0x80000003l
#define kNtHkeyPerformanceData 0x80000004l
#define kNtHkeyPerformanceText 0x80000050l
#define kNtHkeyPerformanceNlstext 0x80000060l
#define kNtHkeyCurrentConfig 0x80000005l
#define kNtHkeyDynData 0x80000006l
#define kNtHkeyClassesRoot 0x80000000l
#define kNtHkeyCurrentUser 0x80000001l
#define kNtHkeyLocalMachine 0x80000002l
#define kNtHkeyUsers 0x80000003l
#define kNtHkeyPerformanceData 0x80000004l
#define kNtHkeyPerformanceText 0x80000050l
#define kNtHkeyPerformanceNlstext 0x80000060l
#define kNtHkeyCurrentConfig 0x80000005l
#define kNtHkeyDynData 0x80000006l
#define kNtHkeyCurrentUserLocalSettings 0x80000007l
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
struct NtFileTime;
struct NtSecurityAttributes;
struct NtValent;
int RegOpenKey(int64_t hKey, const char16_t *opt_lpSubKey,
int64_t *out_phkResult) paramsnonnull((3));
int RegOpenKeyEx(int64_t hKey, const char16_t *opt_lpSubKey,
uint32_t opt_ulOptions, enum NtKeyAccess samDesired,
int64_t *out_phkResult) paramsnonnull((5));
uint32_t opt_ulOptions, int samDesired, int64_t *out_phkResult)
paramsnonnull((5));
int RegCloseKey(int64_t hKey);
int RegGetValue(int64_t hkey, const char16_t *opt_lpSubKey,
const char16_t *opt_lpValue, enum NtRegGetValueFlags dwFlags,
enum NtRegType *opt_pdwType, void *opt_out_pvData,
uint32_t *opt_inout_pcbDataBytes);
int RegSetValue(int64_t hKey, const char16_t *lpSubKey, enum NtRegType dwType,
const char16_t *opt_lpValue, unsigned dwFlags, int *opt_pdwType,
void *opt_out_pvData, uint32_t *opt_inout_pcbDataBytes);
int RegSetValue(int64_t hKey, const char16_t *lpSubKey, int dwType,
const char16_t *lpData, uint32_t cbData);
int RegSetValueEx(int64_t hKey, const char16_t *lpValueName, uint32_t Reserved,
enum NtRegType dwType, const unsigned char *lpData,
uint32_t cbData);
int dwType, const unsigned char *lpData, uint32_t cbData);
int RegQueryInfoKey(int64_t hKey, char16_t *opt_out_lpClass,
uint32_t *opt_inout_lpClassLen, uint32_t *lpReserved,
@ -89,19 +81,19 @@ int RegEnumKeyEx(int64_t hKey, uint32_t dwIndex, char16_t *out_lpName,
int RegEnumValue(int64_t hKey, uint32_t dwIndex, char16_t *lpValueName,
uint32_t *lpValueNameLen, uint32_t *lpReserved,
enum NtRegType *opt_out_lpType, unsigned char *opt_out_lpData,
int *opt_out_lpType, unsigned char *opt_out_lpData,
uint32_t *opt_inout_lpcbDataBytes);
int RegQueryValue(int64_t hKey, const char16_t *opt_lpSubKey,
char16_t *opt_out_lpData, int32_t *opt_inout_lpcbDataBytes);
int RegQueryValueEx(int64_t hKey, const char16_t *opt_lpValueName,
uint32_t *lpReserved, enum NtRegType *opt_out_lpType,
uint32_t *lpReserved, int *opt_out_lpType,
unsigned char *opt_out_lpData,
uint32_t *opt_inout_lpcbDataBytes);
int RegOverridePredefKey(int64_t hKey, int64_t hNewHKey);
int RegOpenUserClassesRoot(void *hToken, uint32_t dwOptions,
enum NtKeyAccess samDesired, int64_t *phkResult);
int RegOpenCurrentUser(enum NtKeyAccess samDesired, int64_t *phkResult);
int RegOpenUserClassesRoot(void *hToken, uint32_t dwOptions, int samDesired,
int64_t *phkResult);
int RegOpenCurrentUser(int samDesired, int64_t *phkResult);
int RegDisablePredefinedCache();
int RegConnectRegistry(const char16_t *lpMachineName, int64_t hKey,
int64_t *phkResult);
@ -109,13 +101,12 @@ int RegConnectRegistryEx(const char16_t *lpMachineName, int64_t hKey,
uint32_t Flags, int64_t *phkResult);
int RegCreateKey(int64_t hKey, const char16_t *lpSubKey, int64_t *phkResult);
int RegCreateKeyEx(int64_t hKey, const char16_t *lpSubKey, uint32_t Reserved,
int16_t *lpClass, uint32_t dwOptions,
enum NtKeyAccess samDesired,
int16_t *lpClass, uint32_t dwOptions, int samDesired,
struct NtSecurityAttributes *lpSecurityAttributes,
int64_t *phkResult, uint32_t *lpdwDisposition);
int RegDeleteKey(int64_t hKey, const char16_t *lpSubKey);
int RegDeleteKeyEx(int64_t hKey, const char16_t *lpSubKey,
enum NtKeyAccess samDesired, uint32_t Reserved);
int RegDeleteKeyEx(int64_t hKey, const char16_t *lpSubKey, int samDesired,
uint32_t Reserved);
int RegDeleteTree(int64_t hKey, const char16_t *opt_lpSubKey);
int RegDisableReflectionKey(int64_t hBase);
int RegEnableReflectionKey(int64_t hBase);