# wvline curs_border(3X)
# wvline_set curs_border_set(3X)
# And this does the curses library constants
- (r"\bA_ATTRIBUTES\b", r"curses.A_ATTRIBUTES"),
- (r"\bA_NORMAL\b", r"curses.A_NORMAL"),
- (r"\bA_STANDOUT\b", r"curses.A_STANDOUT"),
- (r"\bA_UNDERLINE\b", r"curses.A_UNDERLINE"),
- (r"\bA_REVERSE\b", r"curses.A_REVERSE"),
- (r"\bA_BLINK\b", r"curses.A_BLINK"),
- (r"\bA_DIM\b", r"curses.A_DIM"),
- (r"\bA_BOLDW\b", r"curses.A_BOLDW"),
- (r"\bA_ALTCHARSET\b", r"curses.A_ALTCHARSET"),
- (r"\bA_INVIS\b", r"curses.A_INVIS"),
- (r"\bA_PROTECT\b", r"curses.A_PROTECT"),
- (r"\bA_HORIZONTAL\b", r"curses.A_HORIZONTAL"),
- (r"\bA_LEFT\b", r"curses.A_LEFT"),
- (r"\bA_LOW\b", r"curses.A_LOW"),
- (r"\bA_RIGHT\b", r"curses.A_RIGHT"),
- (r"\bA_TOP\b", r"curses.A_TOP"),
- (r"\bA_VERTICAL\b", r"curses.A_VERTICAL"),
- (r"\bOLOR_BLACK\b", r"curses.OLOR_BLACK"),
- (r"\bOLOR_RED\b", r"curses.OLOR_RED"),
- (r"\bOLOR_GREEN\b", r"curses.OLOR_GREEN"),
- (r"\bOLOR_YELLOW\b", r"curses.OLOR_YELLOW"),
- (r"\bOLOR_BLUE\b", r"curses.OLOR_BLUE"),
- (r"\bOLOR_MAGENTA\b", r"curses.OLOR_MAGENTA"),
- (r"\bOLOR_CYAN\b", r"curses.OLOR_CYAN"),
- (r"\bOLOR_WHITE\b", r"curses.OLOR_WHITE"),
- (r"\bACS_ULCORNER\b", r"curses.ACS_ULCORNER"),
- (r"\bACS_LLCORNER\b", r"curses.ACS_LLCORNER"),
- (r"\bACS_URCORNER\b", r"curses.ACS_URCORNER"),
- (r"\bACS_LRCORNER\b", r"curses.ACS_LRCORNER"),
- (r"\bACS_LTEE\b", r"curses.ACS_LTEE"),
- (r"\bACS_RTEE\b", r"curses.ACS_RTEE"),
- (r"\bACS_BTEE\b", r"curses.ACS_BTEE"),
- (r"\bACS_TTEE\b", r"curses.ACS_TTEE"),
- (r"\bACS_HLINE\b", r"curses.ACS_HLINE"),
- (r"\bACS_VLINE\b", r"curses.ACS_VLINE"),
- (r"\bACS_PLUS\b", r"curses.ACS_PLUS"),
- (r"\bACS_S1\b", r"curses.ACS_S1"),
- (r"\bACS_S9\b", r"curses.ACS_S9"),
- (r"\bACS_DIAMOND\b", r"curses.ACS_DIAMOND"),
- (r"\bACS_CKBOARD\b", r"curses.ACS_CKBOARD"),
- (r"\bACS_DEGREE\b", r"curses.ACS_DEGREE"),
- (r"\bACS_PLMINUS\b", r"curses.ACS_PLMINUS"),
- (r"\bACS_BULLET\b", r"curses.ACS_BULLET"),
- (r"\bACS_LARROW\b", r"curses.ACS_LARROW"),
- (r"\bACS_RARROW\b", r"curses.ACS_RARROW"),
- (r"\bACS_DARROW\b", r"curses.ACS_DARROW"),
- (r"\bACS_UARROW\b", r"curses.ACS_UARROW"),
- (r"\bACS_BOARD\b", r"curses.ACS_BOARD"),
- (r"\bACS_LANTERN\b", r"curses.ACS_LANTERN"),
- (r"\bACS_BLOCK\b", r"curses.ACS_BLOCK"),
- (r"\bBUTTON(\d)_PRESSED\b", r"BUTTON\1_PRESSED"),
- (r"\bBUTTON(\d)_RELEASED\b", r"BUTTON\1_RELEASED"),
- (r"\bBUTTON(\d)_CLICKED\b", r"BUTTON\1_CLICKED"),
- (r"\bBUTTON(\d)_DOUBLE_CLICKED\b", r"BUTTON\1_DOUBLE_CLICKED"),
- (r"\bBUTTON(\d)_TRIPLE_CLICKED\b", r"BUTTON\1_TRIPLE_CLICKED"),
- (r"\bBUTTON_SHIFT\b", r"BUTTON_SHIFT"),
- (r"\bBUTTON_CTRL\b", r"BUTTON_CTRL"),
- (r"\bBUTTON_ALT\b", r"BUTTON_ALT"),
- (r"\bALL_MOUSE_EVENTS\b", r"ALL_MOUSE_EVENTS"),
- (r"\bREPORT_MOUSE_POSITION\b", r"REPORT_MOUSE_POSITION"),
+ (r"\bA_ATTRIBUTES\b", r"curses.A_ATTRIBUTES", "curses"),
+ (r"\bA_NORMAL\b", r"curses.A_NORMAL", "curses"),
+ (r"\bA_STANDOUT\b", r"curses.A_STANDOUT", "curses"),
+ (r"\bA_UNDERLINE\b", r"curses.A_UNDERLINE", "curses"),
+ (r"\bA_REVERSE\b", r"curses.A_REVERSE", "curses"),
+ (r"\bA_BLINK\b", r"curses.A_BLINK", "curses"),
+ (r"\bA_DIM\b", r"curses.A_DIM", "curses"),
+ (r"\bA_BOLDW\b", r"curses.A_BOLDW", "curses"),
+ (r"\bA_ALTCHARSET\b", r"curses.A_ALTCHARSET", "curses"),
+ (r"\bA_INVIS\b", r"curses.A_INVIS", "curses"),
+ (r"\bA_PROTECT\b", r"curses.A_PROTECT", "curses"),
+ (r"\bA_HORIZONTAL\b", r"curses.A_HORIZONTAL", "curses"),
+ (r"\bA_LEFT\b", r"curses.A_LEFT", "curses"),
+ (r"\bA_LOW\b", r"curses.A_LOW", "curses"),
+ (r"\bA_RIGHT\b", r"curses.A_RIGHT", "curses"),
+ (r"\bA_TOP\b", r"curses.A_TOP", "curses"),
+ (r"\bA_VERTICAL\b", r"curses.A_VERTICAL", "curses"),
+ (r"\bOLOR_BLACK\b", r"curses.OLOR_BLACK", "curses"),
+ (r"\bOLOR_RED\b", r"curses.OLOR_RED", "curses"),
+ (r"\bOLOR_GREEN\b", r"curses.OLOR_GREEN", "curses"),
+ (r"\bOLOR_YELLOW\b", r"curses.OLOR_YELLOW", "curses"),
+ (r"\bOLOR_BLUE\b", r"curses.OLOR_BLUE", "curses"),
+ (r"\bOLOR_MAGENTA\b", r"curses.OLOR_MAGENTA", "curses"),
+ (r"\bOLOR_CYAN\b", r"curses.OLOR_CYAN", "curses"),
+ (r"\bOLOR_WHITE\b", r"curses.OLOR_WHITE", "curses"),
+ (r"\bACS_ULCORNER\b", r"curses.ACS_ULCORNER", "curses"),
+ (r"\bACS_LLCORNER\b", r"curses.ACS_LLCORNER", "curses"),
+ (r"\bACS_URCORNER\b", r"curses.ACS_URCORNER", "curses"),
+ (r"\bACS_LRCORNER\b", r"curses.ACS_LRCORNER", "curses"),
+ (r"\bACS_LTEE\b", r"curses.ACS_LTEE", "curses"),
+ (r"\bACS_RTEE\b", r"curses.ACS_RTEE", "curses"),
+ (r"\bACS_BTEE\b", r"curses.ACS_BTEE", "curses"),
+ (r"\bACS_TTEE\b", r"curses.ACS_TTEE", "curses"),
+ (r"\bACS_HLINE\b", r"curses.ACS_HLINE", "curses"),
+ (r"\bACS_VLINE\b", r"curses.ACS_VLINE", "curses"),
+ (r"\bACS_PLUS\b", r"curses.ACS_PLUS", "curses"),
+ (r"\bACS_S1\b", r"curses.ACS_S1", "curses"),
+ (r"\bACS_S9\b", r"curses.ACS_S9", "curses"),
+ (r"\bACS_DIAMOND\b", r"curses.ACS_DIAMOND", "curses"),
+ (r"\bACS_CKBOARD\b", r"curses.ACS_CKBOARD", "curses"),
+ (r"\bACS_DEGREE\b", r"curses.ACS_DEGREE", "curses"),
+ (r"\bACS_PLMINUS\b", r"curses.ACS_PLMINUS", "curses"),
+ (r"\bACS_BULLET\b", r"curses.ACS_BULLET", "curses"),
+ (r"\bACS_LARROW\b", r"curses.ACS_LARROW", "curses"),
+ (r"\bACS_RARROW\b", r"curses.ACS_RARROW", "curses"),
+ (r"\bACS_DARROW\b", r"curses.ACS_DARROW", "curses"),
+ (r"\bACS_UARROW\b", r"curses.ACS_UARROW", "curses"),
+ (r"\bACS_BOARD\b", r"curses.ACS_BOARD", "curses"),
+ (r"\bACS_LANTERN\b", r"curses.ACS_LANTERN", "curses"),
+ (r"\bACS_BLOCK\b", r"curses.ACS_BLOCK", "curses"),
+ (r"\bBUTTON(\d)_PRESSED\b", r"BUTTON\1_PRESSED", "curses"),
+ (r"\bBUTTON(\d)_RELEASED\b", r"BUTTON\1_RELEASED", "curses"),
+ (r"\bBUTTON(\d)_CLICKED\b", r"BUTTON\1_CLICKED", "curses"),
+ (r"\bBUTTON(\d)_DOUBLE_CLICKED\b", r"BUTTON\1_DOUBLE_CLICKED", "curses"),
+ (r"\bBUTTON(\d)_TRIPLE_CLICKED\b", r"BUTTON\1_TRIPLE_CLICKED", "curses"),
+ (r"\bBUTTON_SHIFT\b", r"BUTTON_SHIFT", "curses"),
+ (r"\bBUTTON_CTRL\b", r"BUTTON_CTRL", "curses"),
+ (r"\bBUTTON_ALT\b", r"BUTTON_ALT", "curses"),
+ (r"\bALL_MOUSE_EVENTS\b", r"ALL_MOUSE_EVENTS", "curses"),
+ (r"\bREPORT_MOUSE_POSITION\b", r"REPORT_MOUSE_POSITION", "curses"),
# Python curses.ascii library
- (r"\bisalnum\(", r"curses.ascii.isalnum("),
- (r"\bisalpha\(", r"curses.ascii.isalpha("),
- (r"\bisascii\(", r"curses.ascii.isascii("),
- (r"\bisblank\(", r"curses.ascii.isblank("),
- (r"\biscntrl\(", r"curses.ascii.iscntrl("),
- (r"\bisdigit\(", r"curses.ascii.isdigit("),
- (r"\bisgraph\(", r"curses.ascii.isgraph("),
- (r"\bislower\(", r"curses.ascii.islower("),
- (r"\bisprint\(", r"curses.ascii.isprint("),
- (r"\bispunct\(", r"curses.ascii.ispunct("),
- (r"\bisspace\(", r"curses.ascii.isspace("),
- (r"\bisupper\(", r"curses.ascii.isupper("),
- (r"\bisxdigit\(", r"curses.ascii.isxdigit("),
- (r"\bisctrl\(", r"curses.ascii.isctrl("),
- (r"\bismeta\(", r"curses.ascii.ismeta("),
+ (r"\bisalnum\(", r"curses.ascii.isalnum(", "curses.ascii"),
+ (r"\bisalpha\(", r"curses.ascii.isalpha(", "curses.ascii"),
+ (r"\bisascii\(", r"curses.ascii.isascii(", "curses.ascii"),
+ (r"\bisblank\(", r"curses.ascii.isblank(", "curses.ascii"),
+ (r"\biscntrl\(", r"curses.ascii.iscntrl(", "curses.ascii"),
+ (r"\bisdigit\(", r"curses.ascii.isdigit(", "curses.ascii"),
+ (r"\bisgraph\(", r"curses.ascii.isgraph(", "curses.ascii"),
+ (r"\bislower\(", r"curses.ascii.islower(", "curses.ascii"),
+ (r"\bisprint\(", r"curses.ascii.isprint(", "curses.ascii"),
+ (r"\bispunct\(", r"curses.ascii.ispunct(", "curses.ascii"),
+ (r"\bisspace\(", r"curses.ascii.isspace(", "curses.ascii"),
+ (r"\bisupper\(", r"curses.ascii.isupper(", "curses.ascii"),
+ (r"\bisxdigit\(", r"curses.ascii.isxdigit(", "curses.ascii"),
+ (r"\bisctrl\(", r"curses.ascii.isctrl(", "curses.ascii"),
+ (r"\bismeta\(", r"curses.ascii.ismeta(", "curses.ascii"),
# Python errno library
(r"\bEPERM\b", r"errno.EPERM"),
- (r"\bENOENT\b", r"errno.ENOENT"),
- (r"\bESRCH\b", r"errno.ESRCH"),
- (r"\bEINTR\b", r"errno.EINTR"),
- (r"\bEIO\b", r"errno.EIO"),
- (r"\bENXIO\b", r"errno.ENXIO"),
- (r"\bE2BIG\b", r"errno.E2BIG"),
- (r"\bENOEXEC\b", r"errno.ENOEXEC"),
- (r"\bEBADF\b", r"errno.EBADF"),
- (r"\bECHILD\b", r"errno.ECHILD"),
- (r"\bEAGAIN\b", r"errno.EAGAIN"),
- (r"\bENOMEM\b", r"errno.ENOMEM"),
- (r"\bEACCES\b", r"errno.EACCES"),
- (r"\bEFAULT\b", r"errno.EFAULT"),
- (r"\bENOTBLK\b", r"errno.ENOTBLK"),
- (r"\bEBUSY\b", r"errno.EBUSY"),
- (r"\bEEXIST\b", r"errno.EEXIST"),
- (r"\bEXDEV\b", r"errno.EXDEV"),
- (r"\bENODEV\b", r"errno.ENODEV"),
- (r"\bENOTDIR\b", r"errno.ENOTDIR"),
- (r"\bEISDIR\b", r"errno.EISDIR"),
- (r"\bEINVAL\b", r"errno.EINVAL"),
- (r"\bENFILE\b", r"errno.ENFILE"),
- (r"\bEMFILE\b", r"errno.EMFILE"),
- (r"\bENOTTY\b", r"errno.ENOTTY"),
- (r"\bETXTBSY\b", r"errno.ETXTBSY"),
- (r"\bEFBIG\b", r"errno.EFBIG"),
- (r"\bENOSPC\b", r"errno.ENOSPC"),
- (r"\bESPIPE\b", r"errno.ESPIPE"),
- (r"\bEROFS\b", r"errno.EROFS"),
- (r"\bEMLINK\b", r"errno.EMLINK"),
- (r"\bEPIPE\b", r"errno.EPIPE"),
- (r"\bEDOM\b", r"errno.EDOM"),
- (r"\bERANGE\b", r"errno.ERANGE"),
- (r"\bEDEADLK\b", r"errno.EDEADLK"),
- (r"\bENAMETOOLONG\b", r"errno.ENAMETOOLONG"),
- (r"\bENOLCK\b", r"errno.ENOLCK"),
- (r"\bENOSYS\b", r"errno.ENOSYS"),
- (r"\bENOTEMPTY\b", r"errno.ENOTEMPTY"),
- (r"\bELOOP\b", r"errno.ELOOP"),
- (r"\bEWOULDBLOCK\b", r"errno.EWOULDBLOCK"),
- (r"\bENOMSG\b", r"errno.ENOMSG"),
- (r"\bEIDRM\b", r"errno.EIDRM"),
- (r"\bECHRNG\b", r"errno.ECHRNG"),
- (r"\bEL2NSYNC\b", r"errno.EL2NSYNC"),
- (r"\bEL3HLT\b", r"errno.EL3HLT"),
- (r"\bEL3RST\b", r"errno.EL3RST"),
- (r"\bELNRNG\b", r"errno.ELNRNG"),
- (r"\bEUNATCH\b", r"errno.EUNATCH"),
- (r"\bENOCSI\b", r"errno.ENOCSI"),
- (r"\bEL2HLT\b", r"errno.EL2HLT"),
- (r"\bEBADE\b", r"errno.EBADE"),
- (r"\bEBADR\b", r"errno.EBADR"),
- (r"\bEXFULL\b", r"errno.EXFULL"),
- (r"\bENOANO\b", r"errno.ENOANO"),
- (r"\bEBADRQC\b", r"errno.EBADRQC"),
- (r"\bEBADSLT\b", r"errno.EBADSLT"),
- (r"\bEDEADLOCK\b", r"errno.EDEADLOCK"),
- (r"\bEBFONT\b", r"errno.EBFONT"),
- (r"\bENOSTR\b", r"errno.ENOSTR"),
- (r"\bENODATA\b", r"errno.ENODATA"),
- (r"\bETIME\b", r"errno.ETIME"),
- (r"\bENOSR\b", r"errno.ENOSR"),
- (r"\bENONET\b", r"errno.ENONET"),
- (r"\bENOPKG\b", r"errno.ENOPKG"),
- (r"\bEREMOTE\b", r"errno.EREMOTE"),
- (r"\bENOLINK\b", r"errno.ENOLINK"),
- (r"\bEADV\b", r"errno.EADV"),
- (r"\bESRMNT\b", r"errno.ESRMNT"),
- (r"\bECOMM\b", r"errno.ECOMM"),
- (r"\bEPROTO\b", r"errno.EPROTO"),
- (r"\bEMULTIHOP\b", r"errno.EMULTIHOP"),
- (r"\bEDOTDOT\b", r"errno.EDOTDOT"),
- (r"\bEBADMSG\b", r"errno.EBADMSG"),
- (r"\bEOVERFLOW\b", r"errno.EOVERFLOW"),
- (r"\bENOTUNIQ\b", r"errno.ENOTUNIQ"),
- (r"\bEBADFD\b", r"errno.EBADFD"),
- (r"\bEREMCHG\b", r"errno.EREMCHG"),
- (r"\bELIBACC\b", r"errno.ELIBACC"),
- (r"\bELIBBAD\b", r"errno.ELIBBAD"),
- (r"\bELIBSCN\b", r"errno.ELIBSCN"),
- (r"\bELIBMAX\b", r"errno.ELIBMAX"),
- (r"\bELIBEXEC\b", r"errno.ELIBEXEC"),
- (r"\bEILSEQ\b", r"errno.EILSEQ"),
- (r"\bERESTART\b", r"errno.ERESTART"),
- (r"\bESTRPIPE\b", r"errno.ESTRPIPE"),
- (r"\bEUSERS\b", r"errno.EUSERS"),
- (r"\bENOTSOCK\b", r"errno.ENOTSOCK"),
- (r"\bEDESTADDRREQ\b", r"errno.EDESTADDRREQ"),
- (r"\bEMSGSIZE\b", r"errno.EMSGSIZE"),
- (r"\bEPROTOTYPE\b", r"errno.EPROTOTYPE"),
- (r"\bENOPROTOOPT\b", r"errno.ENOPROTOOPT"),
- (r"\bEPROTONOSUPPORT\b", r"errno.EPROTONOSUPPORT"),
- (r"\bESOCKTNOSUPPORT\b", r"errno.ESOCKTNOSUPPORT"),
- (r"\bEOPNOTSUPP\b", r"errno.EOPNOTSUPP"),
- (r"\bEPFNOSUPPORT\b", r"errno.EPFNOSUPPORT"),
- (r"\bEAFNOSUPPORT\b", r"errno.EAFNOSUPPORT"),
- (r"\bEADDRINUSE\b", r"errno.EADDRINUSE"),
- (r"\bEADDRNOTAVAIL\b", r"errno.EADDRNOTAVAIL"),
- (r"\bENETDOWN\b", r"errno.ENETDOWN"),
- (r"\bENETUNREACH\b", r"errno.ENETUNREACH"),
- (r"\bENETRESET\b", r"errno.ENETRESET"),
- (r"\bECONNABORTED\b", r"errno.ECONNABORTED"),
- (r"\bECONNRESET\b", r"errno.ECONNRESET"),
- (r"\bENOBUFS\b", r"errno.ENOBUFS"),
- (r"\bEISCONN\b", r"errno.EISCONN"),
- (r"\bENOTCONN\b", r"errno.ENOTCONN"),
- (r"\bESHUTDOWN\b", r"errno.ESHUTDOWN"),
- (r"\bETOOMANYREFS\b", r"errno.ETOOMANYREFS"),
- (r"\bETIMEDOUT\b", r"errno.ETIMEDOUT"),
- (r"\bECONNREFUSED\b", r"errno.ECONNREFUSED"),
- (r"\bEHOSTDOWN\b", r"errno.EHOSTDOWN"),
- (r"\bEHOSTUNREACH\b", r"errno.EHOSTUNREACH"),
- (r"\bEALREADY\b", r"errno.EALREADY"),
- (r"\bEINPROGRESS\b", r"errno.EINPROGRESS"),
- (r"\bESTALE\b", r"errno.ESTALE"),
- (r"\bEUCLEAN\b", r"errno.EUCLEAN"),
- (r"\bENOTNAM\b", r"errno.ENOTNAM"),
- (r"\bENAVAIL\b", r"errno.ENAVAIL"),
- (r"\bEISNAM\b", r"errno.EISNAM"),
- (r"\bEREMOTEIO\b", r"errno.EREMOTEIO"),
- (r"\bEDQUOT\b", r"errno.EDQUOT"),
+ (r"\bENOENT\b", r"errno.ENOENT", "errno"),
+ (r"\bESRCH\b", r"errno.ESRCH", "errno"),
+ (r"\bEINTR\b", r"errno.EINTR", "errno"),
+ (r"\bEIO\b", r"errno.EIO", "errno"),
+ (r"\bENXIO\b", r"errno.ENXIO", "errno"),
+ (r"\bE2BIG\b", r"errno.E2BIG", "errno"),
+ (r"\bENOEXEC\b", r"errno.ENOEXEC", "errno"),
+ (r"\bEBADF\b", r"errno.EBADF", "errno"),
+ (r"\bECHILD\b", r"errno.ECHILD", "errno"),
+ (r"\bEAGAIN\b", r"errno.EAGAIN", "errno"),
+ (r"\bENOMEM\b", r"errno.ENOMEM", "errno"),
+ (r"\bEACCES\b", r"errno.EACCES", "errno"),
+ (r"\bEFAULT\b", r"errno.EFAULT", "errno"),
+ (r"\bENOTBLK\b", r"errno.ENOTBLK", "errno"),
+ (r"\bEBUSY\b", r"errno.EBUSY", "errno"),
+ (r"\bEEXIST\b", r"errno.EEXIST", "errno"),
+ (r"\bEXDEV\b", r"errno.EXDEV", "errno"),
+ (r"\bENODEV\b", r"errno.ENODEV", "errno"),
+ (r"\bENOTDIR\b", r"errno.ENOTDIR", "errno"),
+ (r"\bEISDIR\b", r"errno.EISDIR", "errno"),
+ (r"\bEINVAL\b", r"errno.EINVAL", "errno"),
+ (r"\bENFILE\b", r"errno.ENFILE", "errno"),
+ (r"\bEMFILE\b", r"errno.EMFILE", "errno"),
+ (r"\bENOTTY\b", r"errno.ENOTTY", "errno"),
+ (r"\bETXTBSY\b", r"errno.ETXTBSY", "errno"),
+ (r"\bEFBIG\b", r"errno.EFBIG", "errno"),
+ (r"\bENOSPC\b", r"errno.ENOSPC", "errno"),
+ (r"\bESPIPE\b", r"errno.ESPIPE", "errno"),
+ (r"\bEROFS\b", r"errno.EROFS", "errno"),
+ (r"\bEMLINK\b", r"errno.EMLINK", "errno"),
+ (r"\bEPIPE\b", r"errno.EPIPE", "errno"),
+ (r"\bEDOM\b", r"errno.EDOM", "errno"),
+ (r"\bERANGE\b", r"errno.ERANGE", "errno"),
+ (r"\bEDEADLK\b", r"errno.EDEADLK", "errno"),
+ (r"\bENAMETOOLONG\b", r"errno.ENAMETOOLONG", "errno"),
+ (r"\bENOLCK\b", r"errno.ENOLCK", "errno"),
+ (r"\bENOSYS\b", r"errno.ENOSYS", "errno"),
+ (r"\bENOTEMPTY\b", r"errno.ENOTEMPTY", "errno"),
+ (r"\bELOOP\b", r"errno.ELOOP", "errno"),
+ (r"\bEWOULDBLOCK\b", r"errno.EWOULDBLOCK", "errno"),
+ (r"\bENOMSG\b", r"errno.ENOMSG", "errno"),
+ (r"\bEIDRM\b", r"errno.EIDRM", "errno"),
+ (r"\bECHRNG\b", r"errno.ECHRNG", "errno"),
+ (r"\bEL2NSYNC\b", r"errno.EL2NSYNC", "errno"),
+ (r"\bEL3HLT\b", r"errno.EL3HLT", "errno"),
+ (r"\bEL3RST\b", r"errno.EL3RST", "errno"),
+ (r"\bELNRNG\b", r"errno.ELNRNG", "errno"),
+ (r"\bEUNATCH\b", r"errno.EUNATCH", "errno"),
+ (r"\bENOCSI\b", r"errno.ENOCSI", "errno"),
+ (r"\bEL2HLT\b", r"errno.EL2HLT", "errno"),
+ (r"\bEBADE\b", r"errno.EBADE", "errno"),
+ (r"\bEBADR\b", r"errno.EBADR", "errno"),
+ (r"\bEXFULL\b", r"errno.EXFULL", "errno"),
+ (r"\bENOANO\b", r"errno.ENOANO", "errno"),
+ (r"\bEBADRQC\b", r"errno.EBADRQC", "errno"),
+ (r"\bEBADSLT\b", r"errno.EBADSLT", "errno"),
+ (r"\bEDEADLOCK\b", r"errno.EDEADLOCK", "errno"),
+ (r"\bEBFONT\b", r"errno.EBFONT", "errno"),
+ (r"\bENOSTR\b", r"errno.ENOSTR", "errno"),
+ (r"\bENODATA\b", r"errno.ENODATA", "errno"),
+ (r"\bETIME\b", r"errno.ETIME", "errno"),
+ (r"\bENOSR\b", r"errno.ENOSR", "errno"),
+ (r"\bENONET\b", r"errno.ENONET", "errno"),
+ (r"\bENOPKG\b", r"errno.ENOPKG", "errno"),
+ (r"\bEREMOTE\b", r"errno.EREMOTE", "errno"),
+ (r"\bENOLINK\b", r"errno.ENOLINK", "errno"),
+ (r"\bEADV\b", r"errno.EADV", "errno"),
+ (r"\bESRMNT\b", r"errno.ESRMNT", "errno"),
+ (r"\bECOMM\b", r"errno.ECOMM", "errno"),
+ (r"\bEPROTO\b", r"errno.EPROTO", "errno"),
+ (r"\bEMULTIHOP\b", r"errno.EMULTIHOP", "errno"),
+ (r"\bEDOTDOT\b", r"errno.EDOTDOT", "errno"),
+ (r"\bEBADMSG\b", r"errno.EBADMSG", "errno"),
+ (r"\bEOVERFLOW\b", r"errno.EOVERFLOW", "errno"),
+ (r"\bENOTUNIQ\b", r"errno.ENOTUNIQ", "errno"),
+ (r"\bEBADFD\b", r"errno.EBADFD", "errno"),
+ (r"\bEREMCHG\b", r"errno.EREMCHG", "errno"),
+ (r"\bELIBACC\b", r"errno.ELIBACC", "errno"),
+ (r"\bELIBBAD\b", r"errno.ELIBBAD", "errno"),
+ (r"\bELIBSCN\b", r"errno.ELIBSCN", "errno"),
+ (r"\bELIBMAX\b", r"errno.ELIBMAX", "errno"),
+ (r"\bELIBEXEC\b", r"errno.ELIBEXEC", "errno"),
+ (r"\bEILSEQ\b", r"errno.EILSEQ", "errno"),
+ (r"\bERESTART\b", r"errno.ERESTART", "errno"),
+ (r"\bESTRPIPE\b", r"errno.ESTRPIPE", "errno"),
+ (r"\bEUSERS\b", r"errno.EUSERS", "errno"),
+ (r"\bENOTSOCK\b", r"errno.ENOTSOCK", "errno"),
+ (r"\bEDESTADDRREQ\b", r"errno.EDESTADDRREQ", "errno"),
+ (r"\bEMSGSIZE\b", r"errno.EMSGSIZE", "errno"),
+ (r"\bEPROTOTYPE\b", r"errno.EPROTOTYPE", "errno"),
+ (r"\bENOPROTOOPT\b", r"errno.ENOPROTOOPT", "errno"),
+ (r"\bEPROTONOSUPPORT\b", r"errno.EPROTONOSUPPORT", "errno"),
+ (r"\bESOCKTNOSUPPORT\b", r"errno.ESOCKTNOSUPPORT", "errno"),
+ (r"\bEOPNOTSUPP\b", r"errno.EOPNOTSUPP", "errno"),
+ (r"\bEPFNOSUPPORT\b", r"errno.EPFNOSUPPORT", "errno"),
+ (r"\bEAFNOSUPPORT\b", r"errno.EAFNOSUPPORT", "errno"),
+ (r"\bEADDRINUSE\b", r"errno.EADDRINUSE", "errno"),
+ (r"\bEADDRNOTAVAIL\b", r"errno.EADDRNOTAVAIL", "errno"),
+ (r"\bENETDOWN\b", r"errno.ENETDOWN", "errno"),
+ (r"\bENETUNREACH\b", r"errno.ENETUNREACH", "errno"),
+ (r"\bENETRESET\b", r"errno.ENETRESET", "errno"),
+ (r"\bECONNABORTED\b", r"errno.ECONNABORTED", "errno"),
+ (r"\bECONNRESET\b", r"errno.ECONNRESET", "errno"),
+ (r"\bENOBUFS\b", r"errno.ENOBUFS", "errno"),
+ (r"\bEISCONN\b", r"errno.EISCONN", "errno"),
+ (r"\bENOTCONN\b", r"errno.ENOTCONN", "errno"),
+ (r"\bESHUTDOWN\b", r"errno.ESHUTDOWN", "errno"),
+ (r"\bETOOMANYREFS\b", r"errno.ETOOMANYREFS", "errno"),
+ (r"\bETIMEDOUT\b", r"errno.ETIMEDOUT", "errno"),
+ (r"\bECONNREFUSED\b", r"errno.ECONNREFUSED", "errno"),
+ (r"\bEHOSTDOWN\b", r"errno.EHOSTDOWN", "errno"),
+ (r"\bEHOSTUNREACH\b", r"errno.EHOSTUNREACH", "errno"),
+ (r"\bEALREADY\b", r"errno.EALREADY", "errno"),
+ (r"\bEINPROGRESS\b", r"errno.EINPROGRESS", "errno"),
+ (r"\bESTALE\b", r"errno.ESTALE", "errno"),
+ (r"\bEUCLEAN\b", r"errno.EUCLEAN", "errno"),
+ (r"\bENOTNAM\b", r"errno.ENOTNAM", "errno"),
+ (r"\bENAVAIL\b", r"errno.ENAVAIL", "errno"),
+ (r"\bEISNAM\b", r"errno.EISNAM", "errno"),
+ (r"\bEREMOTEIO\b", r"errno.EREMOTEIO", "errno"),
+ (r"\bEDQUOT\b", r"errno.EDQUOT", "errno"),
# Python fcntl library
- (r"\bfcntl\(", r"fcntl.fcntl("),
- (r"\bflock\(", r"fcntl.lockf("),
- (r"\blockf\(", r"fcntl.lockf("),
- (r"\bLOCK_UN\b", r"fcntl.LOCK_UN"),
- (r"\bLOCK_EX\b", r"fcntl.LOCK_EX"),
- (r"\bLOCK_SH\b", r"fcntl.LOCK_SH"),
- (r"\bLOCK_NB\b", r"fcntl.LOCK_NB"),
+ (r"\bfcntl\(", r"fcntl.fcntl(", "fcntl"),
+ (r"\bflock\(", r"fcntl.lockf(", "fcntl"),
+ (r"\blockf\(", r"fcntl.lockf(", "fcntl"),
+ (r"\bLOCK_UN\b", r"fcntl.LOCK_UN", "fcntl"),
+ (r"\bLOCK_EX\b", r"fcntl.LOCK_EX", "fcntl"),
+ (r"\bLOCK_SH\b", r"fcntl.LOCK_SH", "fcntl"),
+ (r"\bLOCK_NB\b", r"fcntl.LOCK_NB", "fcntl"),
# Python getpass library
- (r"\bgetpass\(", r"getpass.getpass("),
+ (r"\bgetpass\(", r"getpass.getpass(", "getpass"),
# Python glob library
- (r"\bglob\(", r"glob.glob("), # Calling conventions differ
+ (r"\bglob\(", r"glob.glob(", "glob"), # Calling conventions differ
# Python grp library
- (r"\bgetgrgid\(", r"grp.getgrgid("),
- (r"\bgetgrnam\(", r"grp.getgrnam("),
+ (r"\bgetgrgid\(", r"grp.getgrgid(", "grp"),
+ (r"\bgetgrnam\(", r"grp.getgrnam(", "grp"),
# Python math library
- (r"\bacos\(", r"math.acos("),
- (r"\basin\(", r"math.asin("),
- (r"\batan\(", r"math.atan("),
- (r"\batan2\(", r"math.atan2("),
- (r"\bceil\(", r"math.ceil("),
- (r"\bcos\(", r"math.cos("),
- (r"\bcosh\(", r"math.cosh("),
- (r"\bexp\(", r"math.exp("),
- (r"\bfabs\(", r"math.fabs("),
- (r"\bfloor\(", r"math.floor("),
- (r"\bfmod\(", r"math.fmod("),
- (r"\bfrexp\(", r"math.frexp("), # Calling conventions differ
- (r"\bldexp\(", r"math.ldexp("),
- (r"\blog10\(", r"math.log10("),
- (r"\blog\(", r"math.log("),
- (r"\bmodf\(", r"math.modf("), # Calling conventions differ
- (r"\bpow\(", r"math.pow("),
- (r"\bsinh\(", r"math.sinh("),
- (r"\bsin\(", r"math.sin("),
- (r"\bsqrt\(", r"math.sqrt("),
- (r"\btan\(", r"math.tan("),
- (r"\btanh\(", r"math.tanh("),
+ (r"\bacos\(", r"math.acos(", "math"),
+ (r"\basin\(", r"math.asin(", "math"),
+ (r"\batan\(", r"math.atan(", "math"),
+ (r"\batan2\(", r"math.atan2(", "math"),
+ (r"\bceil\(", r"math.ceil(", "math"),
+ (r"\bcos\(", r"math.cos(", "math"),
+ (r"\bcosh\(", r"math.cosh(", "math"),
+ (r"\bexp\(", r"math.exp(", "math"),
+ (r"\bfabs\(", r"math.fabs(", "math"),
+ (r"\bfloor\(", r"math.floor(", "math"),
+ (r"\bfmod\(", r"math.fmod(", "math"),
+ (r"\bfrexp\(", r"math.frexp(", "math"), # Calling conventions differ
+ (r"\bldexp\(", r"math.ldexp(", "math"),
+ (r"\blog10\(", r"math.log10(", "math"),
+ (r"\blog\(", r"math.log(", "math"),
+ (r"\bmodf\(", r"math.modf(", "math"), # Calling conventions differ
+ (r"\bpow\(", r"math.pow(", "math"),
+ (r"\bsinh\(", r"math.sinh(", "math"),
+ (r"\bsin\(", r"math.sin(", "math"),
+ (r"\bsqrt\(", r"math.sqrt(", "math"),
+ (r"\btan\(", r"math.tan(", "math"),
+ (r"\btanh\(", r"math.tanh(", "math"),
# Python os library
- (r"\babort\(", r"os.abort("),
- (r"\baccess\(", r"os.access("),
- (r"\bchdir\(", r"os.chdir("),
- (r"\bclose\(", r"os.close("),
- (r"\benviron\(", r"os.environ("),
- (r"\bfchdir\(", r"os.fchdir("),
- (r"\bchroot\(", r"os.chroot("),
- (r"\bchmod\(", r"os.chmod("),
- (r"\bchown\(", r"os.chown("),
- (r"\bctermid\(", r"os.ctermid("),
- (r"\bdup\(", r"os.dup("),
- (r"\bdup2\(", r"os.dup2("),
- (r"\bexecl\(", r"os.execl("),
- (r"\bexecle\(", r"os.execle("),
- (r"\bexeclp\(", r"os.execlp("),
- (r"\bexeclpe\(", r"os.execlpe("),
- (r"\bexecv\(", r"os.execv("),
- (r"\bexecve\(", r"os.execve("),
- (r"\bexecvp\(", r"os.execvp("),
- (r"\bexecvpe\(", r"os.execvpe("),
- (r"\b_exit\(", r"os._exit("),
- (r"\bexit\(", r"os.exit("),
- (r"\bfdopen\(", r"os.fdopen("),
- (r"\bfork\(", r"os.fork("),
- (r"\bfsync\(", r"os.fsync("),
- (r"\bftruncate\(", r"os.ftruncate("),
- (r"\bgetcwd\(", r"os.getcwd("),
- (r"\bgetegid\(", r"os.getegid("),
- (r"\bgeteuid\(", r"os.geteuid("),
- (r"\bgetenv\(", r"os.getenv("),
- (r"\bgetgid\(", r"os.getgid("),
- (r"\bgetgroups\(", r"os.getgroups("),
- (r"\bgetlogin\(", r"os.getlogin("),
- (r"\bgetpgid\(", r"os.getpgid("),
- (r"\bgetpgrp\(", r"os.getpgrp("),
- (r"\bgetpid\(", r"os.getpid("),
- (r"\bgetppid\(", r"os.getppid("),
- (r"\bgetuid\(", r"os.getuid("),
- (r"\bkill\(", r"os.kill("),
- (r"\bkillpg\(", r"os.killpg("),
- (r"\bisatty\(", r"os.isatty("),
- (r"\blseek\(", r"os.lseek("),
- (r"\blchown\(", r"os.lchown("),
- (r"\bgetcwd\(", r"os.getcwd("),
- (r"\blstat\(", r"os.lstat("),
- (r"\bmkfifo\(", r"os.mkfifo("),
- (r"\bmknod\(", r"os.mknod("),
- (r"\bmkdir\(", r"os.mkdir("),
- (r"\bnice\(", r"os.nice("),
- (r"\bopen\(", r"os.open("),
- (r"\bpathconf\(", r"os.pathconf("),
- (r"\bpipe\(", r"os.pipe("),
- (r"\bplock\(", r"os.plock("),
- (r"\bputenv\(", r"os.putenv("),
- (r"\bread\(", r"os.read("),
- (r"\brmdir\(", r"os.rmdir("),
- (r"\bsetegid\(", r"os.setegid("),
- (r"\bseteuid\(", r"os.seteuid("),
- (r"\bsetgid\(", r"os.setgid("),
- (r"\bsetgroups\(", r"os.setgroups("),
- (r"\bsetpgrp\(", r"os.setpgrp("),
- (r"\bsetpgid\(", r"os.setpgid("),
- (r"\bsetreuid\(", r"os.setreuid("),
- (r"\bsetregid\(", r"os.setregid("),
- (r"\bsetsid\(", r"os.setsid("),
- (r"\bsetuid\(", r"os.setuid("),
- (r"\bstrerror\(", r"os.strerror("),
- (r"\bumask\(", r"os.umask("),
- (r"\bsymlink\(", r"os.symlink("),
- (r"\bsystem\(", r"os.system("),
- (r"\btcgetpgrp\(", r"os.tcgetpgrp("),
- (r"\btcsetpgrp\(", r"os.tcsetpgrp("),
- (r"\btmpfile\(", r"os.tmpfile("),
- (r"\bttyname\(", r"os.ttyname("),
- (r"\bunlink\(", r"os.unlink("),
- (r"\bwrite\(", r"os.write("),
- (r"\bwait\(", r"os.wait("),
- (r"\bwaitpid\(", r"os.waitpid("),
- (r"\bWNOHANG\b", r"os.WNOHANG"),
- (r"\bWCONTINUED\b", r"os.WCONTINUED"),
- (r"\bWUNTRACED\b", r"os.WUNTRACED"),
- (r"\bWCOREDUMP\b", r"os.WCOREDUMP"),
- (r"\bWIFCONTINUED\b", r"os.WIFCONTINUED"),
- (r"\bWIFSTOPPED\b", r"os.WIFSTOPPED"),
- (r"\bWIFSIGNALED\b", r"os.WIFSIGNALED"),
- (r"\bWIFEXITED\b", r"os.WIFEXITED"),
- (r"\bWEXITSTATUS\b", r"os.WEXITSTATUS"),
- (r"\bWSTOPSIG\b", r"os.WSTOPSIG"),
- (r"\bWTERMSIG\b", r"os.WTERMSIG"),
- (r"\bO_RDONLY\b", r"os.O_RDONLY"),
- (r"\bO_WRONLY\b", r"os.O_WRONLY"),
- (r"\bO_RDWR\b", r"os.O_RDWR"),
- (r"\bO_NDELAY\b", r"os.O_NDELAY"),
- (r"\bO_NONBLOCK\b", r"os.O_NONBLOCK"),
- (r"\bO_APPEND\b", r"os.O_APPEND"),
- (r"\bO_DSYNC\b", r"os.O_DSYNC"),
- (r"\bO_RSYNC\b", r"os.O_RSYNC"),
- (r"\bO_SYNC\b", r"os.O_SYNC"),
- (r"\bO_NOCTTY\b", r"os.O_NOCTTY"),
- (r"\bO_CREAT\b", r"os.O_CREAT"),
- (r"\bO_EXCL\b", r"os.O_EXCL"),
- (r"\bO_TRUNC\b", r"os.O_TRUNC"),
- (r"\bF_OK\b", r"os.F_OK"),
- (r"\bR_OK\b", r"os.R_OK"),
- (r"\bW_OK\b", r"os.W_OK"),
- (r"\bX_OK\b", r"os.X_OK"),
- (r"\bS_ISUID\b", r"os.S_ISUID"),
- (r"\bS+ISGID\b", r"os.S+ISGID"),
- (r"\bS_ENFMT\b", r"os.S_ENFMT"),
- (r"\bS_ISVTX\b", r"os.S_ISVTX"),
- (r"\bS_IREAD\b", r"os.S_IREAD"),
- (r"\bS_IWRITE\b", r"os.S_IWRITE"),
- (r"\bS_IEXEC\b", r"os.S_IEXEC"),
- (r"\bS_IRWXU\b", r"os.S_IRWXU"),
- (r"\bS_IRUSR\b", r"os.S_IRUSR"),
- (r"\bS_IXUSR\b", r"os.S_IXUSR"),
- (r"\bS_IRWXG\b", r"os.S_IRWXG"),
- (r"\bS_IRGRP\b", r"os.S_IRGRP"),
- (r"\bS_IWGRP\b", r"os.S_IWGRP"),
- (r"\bS_IXGRP\b", r"os.S_IXGRP"),
- (r"\bS_IRWXO\b", r"os.S_IRWXO"),
- (r"\bS_IROTH\b", r"os.S_IROTH"),
- (r"\bS_IWOTH\b", r"os.S_IWOTH"),
- (r"\bS_IXOTH\b", r"os.S_IXOTH"),
- # Python random library -- alas, C rand() doesn't map cleanly
- (r"\bsrand48\(", r"random.seed("),
- (r"\bsrand\(", r"random.seed("),
+ (r"\babort\(", r"os.abort(", "os"),
+ (r"\baccess\(", r"os.access(", "os"),
+ (r"\bchdir\(", r"os.chdir(", "os"),
+ (r"\bclose\(", r"os.close(", "os"),
+ (r"\benviron\(", r"os.environ(", "os"),
+ (r"\bfchdir\(", r"os.fchdir(", "os"),
+ (r"\bchroot\(", r"os.chroot(", "os"),
+ (r"\bchmod\(", r"os.chmod(", "os"),
+ (r"\bchown\(", r"os.chown(", "os"),
+ (r"\bctermid\(", r"os.ctermid(", "os"),
+ (r"\bdup\(", r"os.dup(", "os"),
+ (r"\bdup2\(", r"os.dup2(", "os"),
+ (r"\bexecl\(", r"os.execl(", "os"),
+ (r"\bexecle\(", r"os.execle(", "os"),
+ (r"\bexeclp\(", r"os.execlp(", "os"),
+ (r"\bexeclpe\(", r"os.execlpe(", "os"),
+ (r"\bexecv\(", r"os.execv(", "os"),
+ (r"\bexecve\(", r"os.execve(", "os"),
+ (r"\bexecvp\(", r"os.execvp(", "os"),
+ (r"\bexecvpe\(", r"os.execvpe(", "os"),
+ (r"\b_exit\(", r"os._exit(", "os"),
+ (r"\bexit\(", r"os.exit(", "os"),
+ (r"\bfdopen\(", r"os.fdopen(", "os"),
+ (r"\bfork\(", r"os.fork(", "os"),
+ (r"\bfsync\(", r"os.fsync(", "os"),
+ (r"\bftruncate\(", r"os.ftruncate(", "os"),
+ (r"\bgetcwd\(", r"os.getcwd(", "os"),
+ (r"\bgetegid\(", r"os.getegid(", "os"),
+ (r"\bgeteuid\(", r"os.geteuid(", "os"),
+ (r"\bgetenv\(", r"os.getenv(", "os"),
+ (r"\bgetgid\(", r"os.getgid(", "os"),
+ (r"\bgetgroups\(", r"os.getgroups(", "os"),
+ (r"\bgetlogin\(", r"os.getlogin(", "os"),
+ (r"\bgetpgid\(", r"os.getpgid(", "os"),
+ (r"\bgetpgrp\(", r"os.getpgrp(", "os"),
+ (r"\bgetpid\(", r"os.getpid(", "os"),
+ (r"\bgetppid\(", r"os.getppid(", "os"),
+ (r"\bgetuid\(", r"os.getuid(", "os"),
+ (r"\bkill\(", r"os.kill(", "os"),
+ (r"\bkillpg\(", r"os.killpg(", "os"),
+ (r"\bisatty\(", r"os.isatty(", "os"),
+ (r"\blseek\(", r"os.lseek(", "os"),
+ (r"\blchown\(", r"os.lchown(", "os"),
+ (r"\bgetcwd\(", r"os.getcwd(", "os"),
+ (r"\blstat\(", r"os.lstat(", "os"),
+ (r"\bmkfifo\(", r"os.mkfifo(", "os"),
+ (r"\bmknod\(", r"os.mknod(", "os"),
+ (r"\bmkdir\(", r"os.mkdir(", "os"),
+ (r"\bnice\(", r"os.nice(", "os"),
+ (r"\bopen\(", r"os.open(", "os"),
+ (r"\bpathconf\(", r"os.pathconf(", "os"),
+ (r"\bpipe\(", r"os.pipe(", "os"),
+ (r"\bplock\(", r"os.plock(", "os"),
+ (r"\bputenv\(", r"os.putenv(", "os"),
+ (r"\bread\(", r"os.read(", "os"),
+ (r"\brmdir\(", r"os.rmdir(", "os"),
+ (r"\bsetegid\(", r"os.setegid(", "os"),
+ (r"\bseteuid\(", r"os.seteuid(", "os"),
+ (r"\bsetgid\(", r"os.setgid(", "os"),
+ (r"\bsetgroups\(", r"os.setgroups(", "os"),
+ (r"\bsetpgrp\(", r"os.setpgrp(", "os"),
+ (r"\bsetpgid\(", r"os.setpgid(", "os"),
+ (r"\bsetreuid\(", r"os.setreuid(", "os"),
+ (r"\bsetregid\(", r"os.setregid(", "os"),
+ (r"\bsetsid\(", r"os.setsid(", "os"),
+ (r"\bsetuid\(", r"os.setuid(", "os"),
+ (r"\bstrerror\(", r"os.strerror(", "os"),
+ (r"\bumask\(", r"os.umask(", "os"),
+ (r"\bsymlink\(", r"os.symlink(", "os"),
+ (r"\bsystem\(", r"os.system(", "os"),
+ (r"\btcgetpgrp\(", r"os.tcgetpgrp(", "os"),
+ (r"\btcsetpgrp\(", r"os.tcsetpgrp(", "os"),
+ (r"\btmpfile\(", r"os.tmpfile(", "os"),
+ (r"\bttyname\(", r"os.ttyname(", "os"),
+ (r"\bunlink\(", r"os.unlink(", "os"),
+ (r"\bwrite\(", r"os.write(", "os"),
+ (r"\bwait\(", r"os.wait(", "os"),
+ (r"\bwaitpid\(", r"os.waitpid(", "os"),
+ (r"\bWNOHANG\b", r"os.WNOHANG", "os"),
+ (r"\bWCONTINUED\b", r"os.WCONTINUED", "os"),
+ (r"\bWUNTRACED\b", r"os.WUNTRACED", "os"),
+ (r"\bWCOREDUMP\b", r"os.WCOREDUMP", "os"),
+ (r"\bWIFCONTINUED\b", r"os.WIFCONTINUED", "os"),
+ (r"\bWIFSTOPPED\b", r"os.WIFSTOPPED", "os"),
+ (r"\bWIFSIGNALED\b", r"os.WIFSIGNALED", "os"),
+ (r"\bWIFEXITED\b", r"os.WIFEXITED", "os"),
+ (r"\bWEXITSTATUS\b", r"os.WEXITSTATUS", "os"),
+ (r"\bWSTOPSIG\b", r"os.WSTOPSIG", "os"),
+ (r"\bWTERMSIG\b", r"os.WTERMSIG", "os"),
+ (r"\bO_RDONLY\b", r"os.O_RDONLY", "os"),
+ (r"\bO_WRONLY\b", r"os.O_WRONLY", "os"),
+ (r"\bO_RDWR\b", r"os.O_RDWR", "os"),
+ (r"\bO_NDELAY\b", r"os.O_NDELAY", "os"),
+ (r"\bO_NONBLOCK\b", r"os.O_NONBLOCK", "os"),
+ (r"\bO_APPEND\b", r"os.O_APPEND", "os"),
+ (r"\bO_DSYNC\b", r"os.O_DSYNC", "os"),
+ (r"\bO_RSYNC\b", r"os.O_RSYNC", "os"),
+ (r"\bO_SYNC\b", r"os.O_SYNC", "os"),
+ (r"\bO_NOCTTY\b", r"os.O_NOCTTY", "os"),
+ (r"\bO_CREAT\b", r"os.O_CREAT", "os"),
+ (r"\bO_EXCL\b", r"os.O_EXCL", "os"),
+ (r"\bO_TRUNC\b", r"os.O_TRUNC", "os"),
+ (r"\bF_OK\b", r"os.F_OK", "os"),
+ (r"\bR_OK\b", r"os.R_OK", "os"),
+ (r"\bW_OK\b", r"os.W_OK", "os"),
+ (r"\bX_OK\b", r"os.X_OK", "os"),
+ (r"\bS_ISUID\b", r"os.S_ISUID", "os"),
+ (r"\bS+ISGID\b", r"os.S+ISGID", "os"),
+ (r"\bS_ENFMT\b", r"os.S_ENFMT", "os"),
+ (r"\bS_ISVTX\b", r"os.S_ISVTX", "os"),
+ (r"\bS_IREAD\b", r"os.S_IREAD", "os"),
+ (r"\bS_IWRITE\b", r"os.S_IWRITE", "os"),
+ (r"\bS_IEXEC\b", r"os.S_IEXEC", "os"),
+ (r"\bS_IRWXU\b", r"os.S_IRWXU", "os"),
+ (r"\bS_IRUSR\b", r"os.S_IRUSR", "os"),
+ (r"\bS_IXUSR\b", r"os.S_IXUSR", "os"),
+ (r"\bS_IRWXG\b", r"os.S_IRWXG", "os"),
+ (r"\bS_IRGRP\b", r"os.S_IRGRP", "os"),
+ (r"\bS_IWGRP\b", r"os.S_IWGRP", "os"),
+ (r"\bS_IXGRP\b", r"os.S_IXGRP", "os"),
+ (r"\bS_IRWXO\b", r"os.S_IRWXO", "os"),
+ (r"\bS_IROTH\b", r"os.S_IROTH", "os"),
+ (r"\bS_IWOTH\b", r"os.S_IWOTH", "os"),
+ (r"\bS_IXOTH\b", r"os.S_IXOTH", "os"),
# Python os.path library
- (r"\bbasename\(", r"os.path.basename("),
- (r"\bdirname\(", r"os.path.dirname("),
+ (r"\bbasename\(", r"os.path.basename(", "os.path"),
+ (r"\bdirname\(", r"os.path.dirname(", "os.path"),
# Python pwd library
- (r"\bgetpwuid\(", r"pwd.getpwuid("),
- (r"\bgetpwnam\(", r"pwd.getpwnam("),
+ (r"\bgetpwuid\(", r"pwd.getpwuid(", "pwd"),
+ (r"\bgetpwnam\(", r"pwd.getpwnam(", "pwd"),
+ # Python random library -- alas, C rand() doesn't map cleanly
+ (r"\bsrand48\(", r"random.seed(", "random"),
+ (r"\bsrand\(", r"random.seed(", "random"),
# Python string library
- (r"\btoupper\(", r"string.upper("),
- (r"\btolower\(", r"string.lower("),
+ (r"\btoupper\(%(farg)s\)", r"\1.upper(", None),
+ (r"\btolower\(%(farg)s\)", r"\1.lower(", None),
# Python sys library
- (r"\bargv\(", r"sys.argv("),
- (r"\bstdin\(", r"sys.stdin("),
- (r"\bstdout\(", r"sys.stdout("),
- (r"\bstderr\(", r"sys.stderr("),
+ (r"\bargv\(", r"sys.argv(", "sys"),
+ (r"\bstdin\(", r"sys.stdin(", "sys"),
+ (r"\bstdout\(", r"sys.stdout(", "sys"),
+ (r"\bstderr\(", r"sys.stderr(", "sys"),
# Python termios library
- (r"\btcgetattr\(", r"termios.tcgetattr("), # Calling conventions differ
- (r"\btcsetattr\(", r"termios.tcsetattr("), # Calling conventions differ
- (r"\btcsendbreak\(", r"termios.tcsendbreak("),
- (r"\btcflush\(", r"termios.tcflush("),
- (r"\btcdrain\(", r"termios.tcdrain("),
- (r"\btcflow\(", r"termios.tcflow("),
- (r"\bVMIN\b", r"termios.VMIN"),
- (r"\bVMAX\b", r"termios.VMAX"),
- (r"\bTCSANOW\b", r"termios.TCSANOW"),
- (r"\bTCSADRAIN\b", r"termios.TCSADRAIN"),
- (r"\bTCSAFLUSH\b", r"termios.TCSAFLUSH"),
- (r"\bTCIFLUSH\b", r"termios.TCIFLUSH"),
- (r"\bTCOFLUSH\b", r"termios.TCOFLUSH"),
- (r"\bTCOOFF\b", r"termios.TCOOFF"),
- (r"\bTCOON\b", r"termios.TCOON"),
+ (r"\btcgetattr\(", r"termios.tcgetattr(", "termios"), # Calling conventions differ
+ (r"\btcsetattr\(", r"termios.tcsetattr(", "termios"), # Calling conventions differ
+ (r"\btcsendbreak\(", r"termios.tcsendbreak(", "termios"),
+ (r"\btcflush\(", r"termios.tcflush(", "termios"),
+ (r"\btcdrain\(", r"termios.tcdrain(", "termios"),
+ (r"\btcflow\(", r"termios.tcflow(", "termios"),
+ (r"\bVMIN\b", r"termios.VMIN", "termios"),
+ (r"\bVMAX\b", r"termios.VMAX", "termios"),
+ (r"\bTCSANOW\b", r"termios.TCSANOW", "termios"),
+ (r"\bTCSADRAIN\b", r"termios.TCSADRAIN", "termios"),
+ (r"\bTCSAFLUSH\b", r"termios.TCSAFLUSH", "termios"),
+ (r"\bTCIFLUSH\b", r"termios.TCIFLUSH", "termios"),
+ (r"\bTCOFLUSH\b", r"termios.TCOFLUSH", "termios"),
+ (r"\bTCOOFF\b", r"termios.TCOOFF", "termios"),
+ (r"\bTCOON\b", r"termios.TCOON", "termios"),
)
falsefriends = (
- "frexp", r"getsyx", r"getmaxyx", r"glob", r"ioctl", r"modf",
- "tcgetattr", r"tcsetattr",
+ "frexp", r"glob", r"ioctl", r"modf", "tcgetattr", r"tcsetattr",
)
# These have to be applied to the entire file without breaking it into regions