Staging
v0.5.1
https://github.com/python/cpython
Revision 2751cb00290c9c805057665a8ea7218ea17921d8 authored by Martin v. Löwis on 22 November 2010, 09:01:54 UTC, committed by Martin v. Löwis on 22 November 2010, 09:01:54 UTC
........
  r86681 | martin.v.loewis | 2010-11-22 10:00:02 +0100 (Mo, 22 Nov 2010) | 2 lines

  Issue #10459: Update CJK character names to Unicode 6.0.
........
1 parent 0b7cac1
Raw File
Tip revision: 2751cb00290c9c805057665a8ea7218ea17921d8 authored by Martin v. Löwis on 22 November 2010, 09:01:54 UTC
Blocked revisions 86681 via svnmerge
Tip revision: 2751cb0
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