Staging
v0.5.1
https://github.com/python/cpython
Revision bda1418e65730dc7c2c85d31a670b01bd0cef2df authored by Neal Norwitz on 15 June 2006, 10:24:49 UTC, committed by Neal Norwitz on 15 June 2006, 10:24:49 UTC
1 parent 643ad19
Raw File
Tip revision: bda1418e65730dc7c2c85d31a670b01bd0cef2df authored by Neal Norwitz on 15 June 2006, 10:24:49 UTC
Print some more info to get an idea of how much longer the test will last
Tip revision: bda1418
generrmap.c
#include <stdio.h>
#include <errno.h>

/* Extract the mapping of Win32 error codes to errno */

int main()
{
	int i;
	printf("/* Generated file. Do not edit. */\n");
	printf("int winerror_to_errno(int winerror)\n");
	printf("{\n\tswitch(winerror) {\n");
	for(i=1; i < 65000; i++) {
		_dosmaperr(i);
		if (errno == EINVAL)
			continue;
		printf("\t\tcase %d: return %d;\n", i, errno);
	}
	printf("\t\tdefault: return EINVAL;\n");
	printf("\t}\n}\n");
}
back to top