// SDB-CGEN V2.6.2
#include <ctype.h>
#include <stdio.h>
#include <string.h>

struct kv { const char *name; const char *value; };
static const struct kv kvs[] = {
// gcc -DMAIN=1 dos_x86_16.c ; ./a.out > dos_x86_16.h
	{"AllocateMemory", "0x21,72,0,"},
	{"0x21.72", "AllocateMemory"},
	{"BufferedInput", "0x21,10,0,"},
	{"0x21.10", "BufferedInput"},
	{"CanonicalizeFileName", "0x21,96,0,"},
	{"0x21.96", "CanonicalizeFileName"},
	{"CloseFile", "0x21,62,0,"},
	{"0x21.62", "CloseFile"},
	{"CommitFile", "0x21,104,0,"},
	{"0x21.104", "CommitFile"},
	{"CreateChildPSP", "0x21,85,0,"},
	{"0x21.85", "CreateChildPSP"},
	{"CreateDirectory", "0x21,57,0,"},
	{"0x21.57", "CreateDirectory"},
	{"CreateFile", "0x21,60,0,"},
	{"0x21.60", "CreateFile"},
	{"CreateNewFile", "0x21,91,0,"},
	{"0x21.91", "CreateNewFile"},
	{"CreateNewPSP", "0x21,38,0,"},
	{"0x21.38", "CreateNewPSP"},
	{"CreateTemporaryFile", "0x21,90,0,"},
	{"0x21.90", "CreateTemporaryFile"},
	{"DirectCharInputWithoutEcho", "0x21,8,0,"},
	{"0x21.8", "DirectCharInputWithoutEcho"},
	{"DirectConsoleOutput", "0x21,6,0,"},
	{"0x21.6", "DirectConsoleOutput"},
	{"DiskReset", "0x21,13,0,"},
	{"0x21.13", "DiskReset"},
	{"DoubleByteCharacterSet", "0x21,99,0,"},
	{"0x21.99", "DoubleByteCharacterSet"},
	{"Dup", "0x21,69,0,"},
	{"0x21.69", "Dup"},
	{"Dup2", "0x21,70,0,"},
	{"0x21.70", "Dup2"},
	{"ExecuteProgram", "0x21,75,0,"},
	{"0x21.75", "ExecuteProgram"},
	{"ExtendedBreakCheck", "0x21,51,0,"},
	{"0x21.51", "ExtendedBreakCheck"},
	{"ExtendedOpenCreate", "0x21,108,0,"},
	{"0x21.108", "ExtendedOpenCreate"},
	{"FCB_CloseFile", "0x21,16,0,"},
	{"0x21.16", "FCB_CloseFile"},
	{"FCB_CreateOrTruncateFile", "0x21,22,0,"},
	{"0x21.22", "FCB_CreateOrTruncateFile"},
	{"FCB_DeleteFile", "0x21,19,0,"},
	{"0x21.19", "FCB_DeleteFile"},
	{"FCB_FindFirstMatchingFile", "0x21,17,0,"},
	{"0x21.17", "FCB_FindFirstMatchingFile"},
	{"FCB_FindNextMatchingFile", "0x21,18,0,"},
	{"0x21.18", "FCB_FindNextMatchingFile"},
	{"FCB_GetAllocationOfDefaultDrive", "0x21,27,0,"},
	{"0x21.27", "FCB_GetAllocationOfDefaultDrive"},
	{"FCB_GetAllocationOfSpecificDrive", "0x21,28,0,"},
	{"0x21.28", "FCB_GetAllocationOfSpecificDrive"},
	{"FCB_GetFileSize", "0x21,35,0,"},
	{"0x21.35", "FCB_GetFileSize"},
	{"FCB_OpenFile", "0x21,15,0,"},
	{"0x21.15", "FCB_OpenFile"},
	{"FCB_ParseFileIntoFCB", "0x21,41,0,"},
	{"0x21.41", "FCB_ParseFileIntoFCB"},
	{"FCB_ReadRandomBlock", "0x21,39,0,"},
	{"0x21.39", "FCB_ReadRandomBlock"},
	{"FCB_ReadRandomRecord", "0x21,33,0,"},
	{"0x21.33", "FCB_ReadRandomRecord"},
	{"FCB_ReadSequential", "0x21,20,0,"},
	{"0x21.20", "FCB_ReadSequential"},
	{"FCB_RenameFile", "0x21,23,0,"},
	{"0x21.23", "FCB_RenameFile"},
	{"FCB_SetRandomRecordNumber", "0x21,36,0,"},
	{"0x21.36", "FCB_SetRandomRecordNumber"},
	{"FCB_WriteRandomBlock", "0x21,40,0,"},
	{"0x21.40", "FCB_WriteRandomBlock"},
	{"FCB_WriteRandomRecord", "0x21,34,0,"},
	{"0x21.34", "FCB_WriteRandomRecord"},
	{"FCB_WriteSequential", "0x21,21,0,"},
	{"0x21.21", "FCB_WriteSequential"},
	{"FileRegionLock", "0x21,92,0,"},
	{"0x21.92", "FileRegionLock"},
	{"FindFirstMatchingFile", "0x21,78,0,"},
	{"0x21.78", "FindFirstMatchingFile"},
	{"FindNextMatchingFile", "0x21,79,0,"},
	{"0x21.79", "FindNextMatchingFile"},
	{"FreeMemory", "0x21,73,0,"},
	{"0x21.73", "FreeMemory"},
	{"GetCountryInformation", "0x21,101,0,"},
	{"0x21.101", "GetCountryInformation"},
	{"GetCurrentDefaultDrive", "0x21,25,0,"},
	{"0x21.25", "GetCurrentDefaultDrive"},
	{"GetCurrentDirectory", "0x21,71,0,"},
	{"0x21.71", "GetCurrentDirectory"},
	{"GetCurrentPSP", "0x21,81,0,"},
	{"0x21.81", "GetCurrentPSP"},
	{"GetCurrentPSPAddress", "0x21,98,0,"},
	{"0x21.98", "GetCurrentPSPAddress"},
	{"GetDOSVersion", "0x21,48,0,"},
	{"0x21.48", "GetDOSVersion"},
	{"GetDiskTransferArea", "0x21,47,0,"},
	{"0x21.47", "GetDiskTransferArea"},
	{"GetDriveParameterBlockForDefaultDrive", "0x21,31,0,"},
	{"0x21.31", "GetDriveParameterBlockForDefaultDrive"},
	{"GetDriveParameterBlockForSpecificDrive", "0x21,50,0,"},
	{"0x21.50", "GetDriveParameterBlockForSpecificDrive"},
	{"GetExtendedErrorInformation", "0x21,89,0,"},
	{"0x21.89", "GetExtendedErrorInformation"},
	{"GetFreeDiskSpace", "0x21,54,0,"},
	{"0x21.54", "GetFreeDiskSpace"},
	{"GetIndosFlag", "0x21,52,0,"},
	{"0x21.52", "GetIndosFlag"},
	{"GetInterruptVector", "0x21,53,0,"},
	{"0x21.53", "GetInterruptVector"},
	{"GetListOfLists", "0x21,82,0,"},
	{"0x21.82", "GetListOfLists"},
	{"GetReturnCode", "0x21,77,0,"},
	{"0x21.77", "GetReturnCode"},
	{"GetSetDiskSerialNumber", "0x21,105,0,"},
	{"0x21.105", "GetSetDiskSerialNumber"},
	{"GetSetFileAttributes", "0x21,67,0,"},
	{"0x21.67", "GetSetFileAttributes"},
	{"GetSetFileDateTime", "0x21,87,0,"},
	{"0x21.87", "GetSetFileDateTime"},
	{"GetSetGlobalCodePageTable", "0x21,102,0,"},
	{"0x21.102", "GetSetGlobalCodePageTable"},
	{"GetSetMemoryAllocationStrategy", "0x21,88,0,"},
	{"0x21.88", "GetSetMemoryAllocationStrategy"},
	{"GetSetSwitch", "0x21,55,0,"},
	{"0x21.55", "GetSetSwitch"},
	{"GetStdinStatus", "0x21,11,0,"},
	{"0x21.11", "GetStdinStatus"},
	{"GetSystemDate", "0x21,42,0,"},
	{"0x21.42", "GetSystemDate"},
	{"GetSystemTime", "0x21,44,0,"},
	{"0x21.44", "GetSystemTime"},
	{"GetVerifyFlag", "0x21,84,0,"},
	{"0x21.84", "GetVerifyFlag"},
	{"Ioctl", "0x21,68,0,"},
	{"0x21.68", "Ioctl"},
	{"Lseek", "0x21,66,0,"},
	{"0x21.66", "Lseek"},
	{"NetworkFunctions", "0x21,93,0,"},
	{"0x21.93", "NetworkFunctions"},
	{"NetworkRedirection", "0x21,95,0,"},
	{"0x21.95", "NetworkRedirection"},
	{"OpenFile", "0x21,61,0,"},
	{"0x21.61", "OpenFile"},
	{"ReadCharFromStdaux", "0x21,3,0,"},
	{"0x21.3", "ReadCharFromStdaux"},
	{"ReadFile", "0x21,63,0,"},
	{"0x21.63", "ReadFile"},
	{"ReadFromFlushedStdin", "0x21,12,0,"},
	{"0x21.12", "ReadFromFlushedStdin"},
	{"ReadFromStdin", "0x21,7,0,"},
	{"0x21.7", "ReadFromStdin"},
	{"ReadFromStdinWithEcho", "0x21,1,0,"},
	{"0x21.1", "ReadFromStdinWithEcho"},
	{"RemoveDirectory", "0x21,58,0,"},
	{"0x21.58", "RemoveDirectory"},
	{"RenameFile", "0x21,86,0,"},
	{"0x21.86", "RenameFile"},
	{"ResizeMemoryBlock", "0x21,74,0,"},
	{"0x21.74", "ResizeMemoryBlock"},
	{"SelectDefaultDrive", "0x21,14,0,"},
	{"0x21.14", "SelectDefaultDrive"},
	{"SetCountryCode", "0x21,56,0,"},
	{"0x21.56", "SetCountryCode"},
	{"SetCurrentDirectory", "0x21,59,0,"},
	{"0x21.59", "SetCurrentDirectory"},
	{"SetCurrentPSP", "0x21,80,0,"},
	{"0x21.80", "SetCurrentPSP"},
	{"SetDeviceDriverLookaheadFlag", "0x21,100,0,"},
	{"0x21.100", "SetDeviceDriverLookaheadFlag"},
	{"SetDiskTransferAddress", "0x21,26,0,"},
	{"0x21.26", "SetDiskTransferAddress"},
	{"SetHandleCount", "0x21,103,0,"},
	{"0x21.103", "SetHandleCount"},
	{"SetInterruptVector", "0x21,37,0,"},
	{"0x21.37", "SetInterruptVector"},
	{"SetSystemDate", "0x21,43,0,"},
	{"0x21.43", "SetSystemDate"},
	{"SetSystemTime", "0x21,45,0,"},
	{"0x21.45", "SetSystemTime"},
	{"SetVerifyFlag", "0x21,46,0,"},
	{"0x21.46", "SetVerifyFlag"},
	{"TerminateAndStayResident", "0x21,49,0,"},
	{"0x21.49", "TerminateAndStayResident"},
	{"TerminateProcess", "0x21,0,1,i arg0"},
	{"0x21.0", "TerminateProcess"},
	{"TerminateProcessWithReturnCode", "0x21,76,0,"},
	{"0x21.76", "TerminateProcessWithReturnCode"},
	{"TranslateBiosBlock", "0x21,83,0,"},
	{"0x21.83", "TranslateBiosBlock"},
	{"UnlinkFile", "0x21,65,0,"},
	{"0x21.65", "UnlinkFile"},
	{"WriteCharToPrinter", "0x21,5,0,"},
	{"0x21.5", "WriteCharToPrinter"},
	{"WriteCharToStdaux", "0x21,4,0,"},
	{"0x21.4", "WriteCharToStdaux"},
	{"WriteCharToStdout", "0x21,2,0,"},
	{"0x21.2", "WriteCharToStdout"},
	{"WriteFile", "0x21,64,0,"},
	{"0x21.64", "WriteFile"},
	{"WriteStringToStdout", "0x21,9,0,"},
	{"0x21.9", "WriteStringToStdout"},
	{"_", "0x21"},
  {NULL, NULL}
};
typedef int (*GperfForeachCallback)(void *user, const char *k, const char *v);
int gperf_dos_x86_16_foreach(GperfForeachCallback cb, void *user) {
  int i = 0; while (kvs[i].name) {
  cb (user, kvs[i].name, kvs[i].value);
  i++;}
  return 0;
}
const char *gperf_dos_x86_16_get(const char *s) {
  int i = 0; while (kvs[i].name) {
  if (!strcmp (s, kvs[i].name)) return kvs[i].value;
  i++;}
  return NULL;
}
#define sdb_hash_c_dos_x86_16(x,y) gperf_dos_x86_16_hash(x)
const unsigned int gperf_dos_x86_16_hash(const char *s) {
  int sum = strlen (s);
  while (*s) { sum += *s; s++; }
  return sum;
}
struct {const char *name;void *get;void *hash;void *foreach;} gperf_dos_x86_16 = {
  .name = "dos-x86-16",
  .get = &gperf_dos_x86_16_get,
  .hash = &gperf_dos_x86_16_hash,
  .foreach = &gperf_dos_x86_16_foreach
};

#if MAIN
int main () {
	const char *s = ((char*(*)(char*))gperf_dos_x86_16.get)("foo");
	printf ("%s\n", s);
}
#endif
