Staging
v0.5.1
https://github.com/python/cpython
Revision fcf1ea5c86fb2b1efb54a780e31a69b24c0658f4 authored by Georg Brandl on 04 August 2009, 20:26:39 UTC, committed by Georg Brandl on 04 August 2009, 20:26:39 UTC
svn+ssh://svn.python.org/python/branches/py3k

................
  r74309 | georg.brandl | 2009-08-04 22:25:54 +0200 (Di, 04 Aug 2009) | 9 lines

  Merged revisions 74307 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74307 | georg.brandl | 2009-08-04 22:22:43 +0200 (Di, 04 Aug 2009) | 1 line

    Add donation link to docs footer.
  ........
................
1 parent 216dc7b
Raw File
Tip revision: fcf1ea5c86fb2b1efb54a780e31a69b24c0658f4 authored by Georg Brandl on 04 August 2009, 20:26:39 UTC
Merged revisions 74309 via svnmerge from
Tip revision: fcf1ea5
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