Re: dd gigabytes
On Sun, Mar 23, 2014 at 05:20:29PM -0600, Theo de Raadt wrote: Fine with me. dd is often used in portable scripts. Do we need to document this as an extension, or has it already arrived in other implimentations? it should be added to the note in STANDARDS describing the other multipliers which are extensions. jmc
Stop mixing route and address flags
Diff below stops mixing interface address flags with routing entry ones and makes it explicitly which flag are used especially with the cloning flag. This is part of my work to cleanup the rtinit() interface to be able to reuse it for creating local route entries. This diff should not introduce any behavior change, I appreciate tests and oks. Martin Index: net/if_var.h === RCS file: /home/ncvs/src/sys/net/if_var.h,v retrieving revision 1.5 diff -u -p -r1.5 if_var.h --- net/if_var.h20 Mar 2014 13:19:06 - 1.5 +++ net/if_var.h24 Mar 2014 12:19:03 - @@ -290,11 +290,12 @@ struct ifaddr { TAILQ_ENTRY(ifaddr) ifa_list; /* list of addresses for interface */ /* check or clean routes (+ or -)'d */ void(*ifa_rtrequest)(int, struct rtentry *); - u_int ifa_flags; /* mostly rt_flags for cloning */ + u_int ifa_flags; /* interface flags, see below */ u_int ifa_refcnt; /* count of references */ int ifa_metric; /* cost of going out this interface */ }; -#defineIFA_ROUTE RTF_UP /* route installed */ + +#defineIFA_ROUTE 0x01/* Automagicaly installed route */ /* * Interface multicast address. Index: net/route.c === RCS file: /home/ncvs/src/sys/net/route.c,v retrieving revision 1.156 diff -u -p -r1.156 route.c --- net/route.c 21 Mar 2014 10:44:42 - 1.156 +++ net/route.c 24 Mar 2014 12:19:03 - @@ -1118,7 +1118,7 @@ rtinit(struct ifaddr *ifa, int cmd, int } bzero(info, sizeof(info)); info.rti_ifa = ifa; - info.rti_flags = flags | ifa-ifa_flags; + info.rti_flags = flags; info.rti_info[RTAX_DST] = dst; if (cmd == RTM_ADD) info.rti_info[RTAX_GATEWAY] = ifa-ifa_addr; Index: netinet/if_ether.c === RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving revision 1.122 diff -u -p -r1.122 if_ether.c --- netinet/if_ether.c 18 Mar 2014 14:55:49 - 1.122 +++ netinet/if_ether.c 24 Mar 2014 12:19:03 - @@ -867,7 +867,6 @@ arp_ifinit(struct arpcom *ac, struct ifa satosin(ifa-ifa_addr)-sin_addr.s_addr, ac-ac_enaddr); ifa-ifa_rtrequest = arp_rtrequest; - ifa-ifa_flags |= RTF_CLONING; } /* Index: netinet/in.c === RCS file: /home/ncvs/src/sys/netinet/in.c,v retrieving revision 1.93 diff -u -p -r1.93 in.c --- netinet/in.c21 Mar 2014 10:32:17 - 1.93 +++ netinet/in.c24 Mar 2014 12:19:03 - @@ -329,9 +329,9 @@ in_control(struct socket *so, u_long cmd } if (ia-ia_flags IFA_ROUTE) { ia-ia_ifa.ifa_dstaddr = sintosa(oldaddr); - rtinit((ia-ia_ifa), (int)RTM_DELETE, RTF_HOST); + rtinit(ia-ia_ifa, RTM_DELETE, RTF_UP | RTF_HOST); ia-ia_ifa.ifa_dstaddr = sintosa(ia-ia_dstaddr); - rtinit((ia-ia_ifa), (int)RTM_ADD, RTF_HOST|RTF_UP); + rtinit(ia-ia_ifa, RTM_ADD, RTF_UP | RTF_HOST); } splx(s); break; @@ -807,7 +807,7 @@ in_scrubhost(struct in_ifaddr *ia0) if ((ia-ia_flags IFA_ROUTE) != 0) continue; - rtinit(ia0-ia_ifa, RTM_DELETE, RTF_HOST); + rtinit(ia0-ia_ifa, RTM_DELETE, RTF_UP | RTF_HOST); ia0-ia_flags = ~IFA_ROUTE; error = rtinit(ia-ia_ifa, RTM_ADD, RTF_UP | RTF_HOST); if (!error) @@ -816,7 +816,7 @@ in_scrubhost(struct in_ifaddr *ia0) return (error); } - rtinit(ia0-ia_ifa, RTM_DELETE, RTF_HOST); + rtinit(ia0-ia_ifa, RTM_DELETE, RTF_UP | RTF_HOST); ia0-ia_flags = ~IFA_ROUTE; return (0); @@ -858,7 +858,7 @@ in_addprefix(struct in_ifaddr *ia0) /* move to a real interface instead of carp interface */ if (ia-ia_ifp-if_type == IFT_CARP ia0-ia_ifp-if_type != IFT_CARP) { - rtinit(ia-ia_ifa, RTM_DELETE, 0); + rtinit(ia-ia_ifa, RTM_DELETE, RTF_UP | RTF_CLONING); ia-ia_flags = ~IFA_ROUTE; break; } @@ -873,7 +873,7 @@ in_addprefix(struct in_ifaddr *ia0) /* * noone seem to have prefix route. insert it. */ - error = rtinit(ia0-ia_ifa, RTM_ADD, RTF_UP); + error = rtinit(ia0-ia_ifa, RTM_ADD, RTF_UP | RTF_CLONING); if (!error) ia0-ia_flags |= IFA_ROUTE; return error; @@ -918,9 +918,9 @@ in_scrubprefix(struct
xucred change
I found out, after a bit of head-scratching, that you will have to make sure you're running the newly compiled mountd if you want cred-mapping to make sense. e.g., the usual build kernel, reboot, make build is not enough. You also have to kill mountd and start the new one, otherwise -maproot=root won't work.
Re: thinkpad adaptive keyboard patch
On Mon, Mar 17, 2014 at 07:11:09PM +, rivo nurges wrote: Hi! New 2nd generation Lenovo X1 Carbon has touchable lcd strip instead of the F1-12 keys and the multimedia keys. It has 5 modes with tons of useless buttons triggering acpi hotkey events and 6th inactive mode. This patch adds support for switching between the Home and the Function modes. The Function mode has the standard F1-12 buttons and the Home mode has Volume, Mute and Brightness buttons. Other functions of the the Home mode are ignored. On power up BIOS activates the Function mode for us, on suspend it goes to the inactive mode and we need to reenable it when coming from suspend. The patch has been tested on X1 Carbon, X220 and X61s New version. Style fixes suggested by jcs@, no functional changes. -- rix Index: sys/dev/acpi/acpithinkpad.c === RCS file: /OpenBSD/src/sys/dev/acpi/acpithinkpad.c,v retrieving revision 1.34 diff -u -p -r1.34 acpithinkpad.c --- sys/dev/acpi/acpithinkpad.c 4 Nov 2013 11:57:26 - 1.34 +++ sys/dev/acpi/acpithinkpad.c 24 Mar 2014 20:14:50 - @@ -30,7 +30,8 @@ #include audio.h #include wskbd.h -#defineTHINKPAD_HKEY_VERSION 0x0100 +#defineTHINKPAD_HKEY_VERSION1 0x0100 +#defineTHINKPAD_HKEY_VERSION2 0x0200 #defineTHINKPAD_CMOS_VOLUME_DOWN 0x00 #defineTHINKPAD_CMOS_VOLUME_UP 0x01 @@ -65,6 +66,15 @@ #defineTHINKPAD_BUTTON_MICROPHONE_MUTE 0x101b #defineTHINKPAD_BUTTON_FN_F11 0x100b #defineTHINKPAD_BUTTON_HIBERNATE 0x100c +#defineTHINKPAD_ADAPTIVE_NEXT 0x1101 +#defineTHINKPAD_ADAPTIVE_QUICK 0x1102 +#defineTHINKPAD_ADAPTIVE_SNIP 0x1105 +#defineTHINKPAD_ADAPTIVE_VOICE 0x1108 +#defineTHINKPAD_ADAPTIVE_GESTURES 0x110a +#defineTHINKPAD_ADAPTIVE_SETTINGS 0x110e +#defineTHINKPAD_ADAPTIVE_TAB 0x110f +#defineTHINKPAD_ADAPTIVE_REFRESH 0x1110 +#defineTHINKPAD_ADAPTIVE_BACK 0x #define THINKPAD_PORT_REPL_DOCKED 0x4010 #define THINKPAD_PORT_REPL_UNDOCKED0x4011 #defineTHINKPAD_LID_OPEN 0x5001 @@ -85,6 +95,9 @@ #define THINKPAD_ECOFFSET_FANLO0x84 #define THINKPAD_ECOFFSET_FANHI0x85 +#defineTHINKPAD_ADAPTIVE_MODE_HOME 1 +#defineTHINKPAD_ADAPTIVE_MODE_FUNCTION 3 + struct acpithinkpad_softc { struct devicesc_dev; @@ -110,6 +123,8 @@ int thinkpad_volume_up(struct acpithinkp intthinkpad_volume_mute(struct acpithinkpad_softc *); intthinkpad_brightness_up(struct acpithinkpad_softc *); intthinkpad_brightness_down(struct acpithinkpad_softc *); +intthinkpad_adaptive_change(struct acpithinkpad_softc *); +intthinkpad_activate(struct device *, int); voidthinkpad_sensor_attach(struct acpithinkpad_softc *sc); voidthinkpad_sensor_refresh(void *); @@ -119,7 +134,8 @@ extern int wskbd_set_mixervolume(long, l #endif struct cfattach acpithinkpad_ca = { - sizeof(struct acpithinkpad_softc), thinkpad_match, thinkpad_attach + sizeof(struct acpithinkpad_softc), thinkpad_match, thinkpad_attach, + NULL, thinkpad_activate }; struct cfdriver acpithinkpad_cd = { @@ -144,7 +160,7 @@ thinkpad_match(struct device *parent, vo MHKV, 0, NULL, res)) return (0); - if (res != THINKPAD_HKEY_VERSION) + if (!(res == THINKPAD_HKEY_VERSION1 || res == THINKPAD_HKEY_VERSION2)) return (0); return (1); @@ -328,6 +344,18 @@ thinkpad_hotkey(struct aml_node *node, i #endif handled = 1; break; + case THINKPAD_ADAPTIVE_NEXT: + case THINKPAD_ADAPTIVE_QUICK: + thinkpad_adaptive_change(sc); + handled = 1; + break; + case THINKPAD_ADAPTIVE_BACK: + case THINKPAD_ADAPTIVE_GESTURES: + case THINKPAD_ADAPTIVE_REFRESH: + case THINKPAD_ADAPTIVE_SETTINGS: + case THINKPAD_ADAPTIVE_SNIP: + case THINKPAD_ADAPTIVE_TAB: + case THINKPAD_ADAPTIVE_VOICE: case THINKPAD_BACKLIGHT_CHANGED: case THINKPAD_BRIGHTNESS_CHANGED: case THINKPAD_BUTTON_BATTERY_INFO: @@ -453,4 +481,50 @@ int thinkpad_brightness_down(struct acpithinkpad_softc *sc) { return (thinkpad_cmos(sc, THINKPAD_CMOS_BRIGHTNESS_DOWN)); +} + +int +thinkpad_adaptive_change(struct acpithinkpad_softc *sc) +{ + struct aml_value arg; + int64_t mode; + + if (aml_evalinteger(sc-sc_acpi, sc-sc_devnode, GTRW, + 0, NULL, mode)) { + printf(%s: couldn't get adaptive keyboard mode\n, DEVNAME(sc)); + return
dd oldebcdic is old
Last call, convert your oldebcdic tapes (not to be confused with old ebcdic tapes) now before it's too late. Index: args.c === RCS file: /cvs/src/bin/dd/args.c,v retrieving revision 1.23 diff -u -p -r1.23 args.c --- args.c 24 Mar 2014 21:42:41 - 1.23 +++ args.c 24 Mar 2014 21:56:08 - @@ -275,9 +275,6 @@ static const struct conv { { ebcdic, C_EBCDIC, C_ASCII,a2e_POSIX }, { ibm,C_EBCDIC, C_ASCII,a2ibm_POSIX }, { lcase, C_LCASE,C_UCASE,NULL }, - { oldascii, C_ASCII,C_EBCDIC, e2a_32V }, - { oldebcdic, C_EBCDIC, C_ASCII,a2e_32V }, - { oldibm, C_EBCDIC, C_ASCII,a2ibm_32V }, { osync, C_OSYNC,C_BS, NULL }, { swab, C_SWAB, 0, NULL }, { sync, C_SYNC, 0, NULL }, Index: conv_tab.c === RCS file: /cvs/src/bin/dd/conv_tab.c,v retrieving revision 1.5 diff -u -p -r1.5 conv_tab.c --- conv_tab.c 27 Oct 2009 23:59:21 - 1.5 +++ conv_tab.c 24 Mar 2014 21:56:08 - @@ -37,11 +37,7 @@ #include sys/types.h /* - * There are currently six tables: - * - * ebcdic - ascii32V conv=oldascii - * ascii - ebcdic 32V conv=oldebcdic - * ascii - ibm ebcdic 32V conv=oldibm + * There are currently three tables: * * ebcdic - asciiPOSIX/S5conv=ascii * ascii - ebcdic POSIX/S5conv=ebcdic @@ -52,8 +48,7 @@ * * Tables used for conversions to/from IBM and EBCDIC to support an extension * to POSIX P1003.2/D11. The tables referencing POSIX contain data extracted - * from tables 4-3 and 4-4 in P1003.2/Draft 11. The historic tables were - * constructed by running against a file with all possible byte values. + * from tables 4-3 and 4-4 in P1003.2/Draft 11. * * More information can be obtained in Correspondences of 8-Bit and Hollerith * Codes for Computer Environments-A USASI Tutorial, Communications of the @@ -61,114 +56,6 @@ */ u_char casetab[256]; - -/* EBCDIC to ASCII -- 32V compatible. */ -const u_char e2a_32V[] = { - , 0001, 0002, 0003, 0234, 0011, 0206, 0177, /* */ - 0227, 0215, 0216, 0013, 0014, 0015, 0016, 0017, /* 0010 */ - 0020, 0021, 0022, 0023, 0235, 0205, 0010, 0207, /* 0020 */ - 0030, 0031, 0222, 0217, 0034, 0035, 0036, 0037, /* 0030 */ - 0200, 0201, 0202, 0203, 0204, 0012, 0027, 0033, /* 0040 */ - 0210, 0211, 0212, 0213, 0214, 0005, 0006, 0007, /* 0050 */ - 0220, 0221, 0026, 0223, 0224, 0225, 0226, 0004, /* 0060 */ - 0230, 0231, 0232, 0233, 0024, 0025, 0236, 0032, /* 0070 */ - 0040, 0240, 0241, 0242, 0243, 0244, 0245, 0246, /* 0100 */ - 0247, 0250, 0133, 0056, 0074, 0050, 0053, 0041, /* 0110 */ - 0046, 0251, 0252, 0253, 0254, 0255, 0256, 0257, /* 0120 */ - 0260, 0261, 0135, 0044, 0052, 0051, 0073, 0136, /* 0130 */ - 0055, 0057, 0262, 0263, 0264, 0265, 0266, 0267, /* 0140 */ - 0270, 0271, 0174, 0054, 0045, 0137, 0076, 0077, /* 0150 */ - 0272, 0273, 0274, 0275, 0276, 0277, 0300, 0301, /* 0160 */ - 0302, 0140, 0072, 0043, 0100, 0047, 0075, 0042, /* 0170 */ - 0303, 0141, 0142, 0143, 0144, 0145, 0146, 0147, /* 0200 */ - 0150, 0151, 0304, 0305, 0306, 0307, 0310, 0311, /* 0210 */ - 0312, 0152, 0153, 0154, 0155, 0156, 0157, 0160, /* 0220 */ - 0161, 0162, 0313, 0314, 0315, 0316, 0317, 0320, /* 0230 */ - 0321, 0176, 0163, 0164, 0165, 0166, 0167, 0170, /* 0240 */ - 0171, 0172, 0322, 0323, 0324, 0325, 0326, 0327, /* 0250 */ - 0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337, /* 0260 */ - 0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347, /* 0270 */ - 0173, 0101, 0102, 0103, 0104, 0105, 0106, 0107, /* 0300 */ - 0110, 0111, 0350, 0351, 0352, 0353, 0354, 0355, /* 0310 */ - 0175, 0112, 0113, 0114, 0115, 0116, 0117, 0120, /* 0320 */ - 0121, 0122, 0356, 0357, 0360, 0361, 0362, 0363, /* 0330 */ - 0134, 0237, 0123, 0124, 0125, 0126, 0127, 0130, /* 0340 */ - 0131, 0132, 0364, 0365, 0366, 0367, 0370, 0371, /* 0350 */ - 0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, /* 0360 */ - 0070, 0071, 0372, 0373, 0374, 0375, 0376, 0377, /* 0370 */ -}; - -/* ASCII to EBCDIC -- 32V compatible. */ -const u_char a2e_32V[] = { - , 0001, 0002, 0003, 0067, 0055, 0056, 0057, /* */ - 0026, 0005, 0045, 0013, 0014, 0015,
Re: dd oldebcdic is old
On 3/24/14, Ted Unangst t...@tedunangst.com wrote: Last call, convert your oldebcdic tapes (not to be confused with old ebcdic tapes) now before it's too late. Just curious why this removal? Saving space? --patrick Index: args.c === RCS file: /cvs/src/bin/dd/args.c,v retrieving revision 1.23 diff -u -p -r1.23 args.c --- args.c24 Mar 2014 21:42:41 - 1.23 +++ args.c24 Mar 2014 21:56:08 - @@ -275,9 +275,6 @@ static const struct conv { { ebcdic, C_EBCDIC, C_ASCII,a2e_POSIX }, { ibm,C_EBCDIC, C_ASCII,a2ibm_POSIX }, { lcase, C_LCASE,C_UCASE,NULL }, - { oldascii, C_ASCII,C_EBCDIC, e2a_32V }, - { oldebcdic, C_EBCDIC, C_ASCII,a2e_32V }, - { oldibm, C_EBCDIC, C_ASCII,a2ibm_32V }, { osync, C_OSYNC,C_BS, NULL }, { swab, C_SWAB, 0, NULL }, { sync, C_SYNC, 0, NULL }, Index: conv_tab.c === RCS file: /cvs/src/bin/dd/conv_tab.c,v retrieving revision 1.5 diff -u -p -r1.5 conv_tab.c --- conv_tab.c27 Oct 2009 23:59:21 - 1.5 +++ conv_tab.c24 Mar 2014 21:56:08 - @@ -37,11 +37,7 @@ #include sys/types.h /* - * There are currently six tables: - * - * ebcdic - ascii32V conv=oldascii - * ascii - ebcdic 32V conv=oldebcdic - * ascii - ibm ebcdic 32V conv=oldibm + * There are currently three tables: * * ebcdic - asciiPOSIX/S5conv=ascii * ascii - ebcdic POSIX/S5conv=ebcdic @@ -52,8 +48,7 @@ * * Tables used for conversions to/from IBM and EBCDIC to support an extension * to POSIX P1003.2/D11. The tables referencing POSIX contain data extracted - * from tables 4-3 and 4-4 in P1003.2/Draft 11. The historic tables were - * constructed by running against a file with all possible byte values. + * from tables 4-3 and 4-4 in P1003.2/Draft 11. * * More information can be obtained in Correspondences of 8-Bit and Hollerith * Codes for Computer Environments-A USASI Tutorial, Communications of the @@ -61,114 +56,6 @@ */ u_char casetab[256]; - -/* EBCDIC to ASCII -- 32V compatible. */ -const u_char e2a_32V[] = { - , 0001, 0002, 0003, 0234, 0011, 0206, 0177, /* */ - 0227, 0215, 0216, 0013, 0014, 0015, 0016, 0017, /* 0010 */ - 0020, 0021, 0022, 0023, 0235, 0205, 0010, 0207, /* 0020 */ - 0030, 0031, 0222, 0217, 0034, 0035, 0036, 0037, /* 0030 */ - 0200, 0201, 0202, 0203, 0204, 0012, 0027, 0033, /* 0040 */ - 0210, 0211, 0212, 0213, 0214, 0005, 0006, 0007, /* 0050 */ - 0220, 0221, 0026, 0223, 0224, 0225, 0226, 0004, /* 0060 */ - 0230, 0231, 0232, 0233, 0024, 0025, 0236, 0032, /* 0070 */ - 0040, 0240, 0241, 0242, 0243, 0244, 0245, 0246, /* 0100 */ - 0247, 0250, 0133, 0056, 0074, 0050, 0053, 0041, /* 0110 */ - 0046, 0251, 0252, 0253, 0254, 0255, 0256, 0257, /* 0120 */ - 0260, 0261, 0135, 0044, 0052, 0051, 0073, 0136, /* 0130 */ - 0055, 0057, 0262, 0263, 0264, 0265, 0266, 0267, /* 0140 */ - 0270, 0271, 0174, 0054, 0045, 0137, 0076, 0077, /* 0150 */ - 0272, 0273, 0274, 0275, 0276, 0277, 0300, 0301, /* 0160 */ - 0302, 0140, 0072, 0043, 0100, 0047, 0075, 0042, /* 0170 */ - 0303, 0141, 0142, 0143, 0144, 0145, 0146, 0147, /* 0200 */ - 0150, 0151, 0304, 0305, 0306, 0307, 0310, 0311, /* 0210 */ - 0312, 0152, 0153, 0154, 0155, 0156, 0157, 0160, /* 0220 */ - 0161, 0162, 0313, 0314, 0315, 0316, 0317, 0320, /* 0230 */ - 0321, 0176, 0163, 0164, 0165, 0166, 0167, 0170, /* 0240 */ - 0171, 0172, 0322, 0323, 0324, 0325, 0326, 0327, /* 0250 */ - 0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337, /* 0260 */ - 0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347, /* 0270 */ - 0173, 0101, 0102, 0103, 0104, 0105, 0106, 0107, /* 0300 */ - 0110, 0111, 0350, 0351, 0352, 0353, 0354, 0355, /* 0310 */ - 0175, 0112, 0113, 0114, 0115, 0116, 0117, 0120, /* 0320 */ - 0121, 0122, 0356, 0357, 0360, 0361, 0362, 0363, /* 0330 */ - 0134, 0237, 0123, 0124, 0125, 0126, 0127, 0130, /* 0340 */ - 0131, 0132, 0364, 0365, 0366, 0367, 0370, 0371, /* 0350 */ - 0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, /* 0360 */ - 0070, 0071, 0372, 0373, 0374, 0375, 0376, 0377, /* 0370 */ -}; - -/* ASCII to EBCDIC -- 32V compatible. */ -const u_char a2e_32V[] = { -
Re: dd oldebcdic is old
I don't see any point in doing this. Justify it. Last call, convert your oldebcdic tapes (not to be confused with old ebcdic tapes) now before it's too late. Index: args.c === RCS file: /cvs/src/bin/dd/args.c,v retrieving revision 1.23 diff -u -p -r1.23 args.c --- args.c24 Mar 2014 21:42:41 - 1.23 +++ args.c24 Mar 2014 21:56:08 - @@ -275,9 +275,6 @@ static const struct conv { { ebcdic, C_EBCDIC, C_ASCII,a2e_POSIX }, { ibm,C_EBCDIC, C_ASCII,a2ibm_POSIX }, { lcase, C_LCASE,C_UCASE,NULL }, - { oldascii, C_ASCII,C_EBCDIC, e2a_32V }, - { oldebcdic, C_EBCDIC, C_ASCII,a2e_32V }, - { oldibm, C_EBCDIC, C_ASCII,a2ibm_32V }, { osync, C_OSYNC,C_BS, NULL }, { swab, C_SWAB, 0, NULL }, { sync, C_SYNC, 0, NULL }, Index: conv_tab.c === RCS file: /cvs/src/bin/dd/conv_tab.c,v retrieving revision 1.5 diff -u -p -r1.5 conv_tab.c --- conv_tab.c27 Oct 2009 23:59:21 - 1.5 +++ conv_tab.c24 Mar 2014 21:56:08 - @@ -37,11 +37,7 @@ #include sys/types.h /* - * There are currently six tables: - * - * ebcdic - ascii32V conv=oldascii - * ascii - ebcdic 32V conv=oldebcdic - * ascii - ibm ebcdic 32V conv=oldibm + * There are currently three tables: * * ebcdic - asciiPOSIX/S5conv=ascii * ascii - ebcdic POSIX/S5conv=ebcdic @@ -52,8 +48,7 @@ * * Tables used for conversions to/from IBM and EBCDIC to support an extension * to POSIX P1003.2/D11. The tables referencing POSIX contain data extracted - * from tables 4-3 and 4-4 in P1003.2/Draft 11. The historic tables were - * constructed by running against a file with all possible byte values. + * from tables 4-3 and 4-4 in P1003.2/Draft 11. * * More information can be obtained in Correspondences of 8-Bit and Hollerith * Codes for Computer Environments-A USASI Tutorial, Communications of the @@ -61,114 +56,6 @@ */ u_char casetab[256]; - -/* EBCDIC to ASCII -- 32V compatible. */ -const u_char e2a_32V[] = { - , 0001, 0002, 0003, 0234, 0011, 0206, 0177, /* */ - 0227, 0215, 0216, 0013, 0014, 0015, 0016, 0017, /* 0010 */ - 0020, 0021, 0022, 0023, 0235, 0205, 0010, 0207, /* 0020 */ - 0030, 0031, 0222, 0217, 0034, 0035, 0036, 0037, /* 0030 */ - 0200, 0201, 0202, 0203, 0204, 0012, 0027, 0033, /* 0040 */ - 0210, 0211, 0212, 0213, 0214, 0005, 0006, 0007, /* 0050 */ - 0220, 0221, 0026, 0223, 0224, 0225, 0226, 0004, /* 0060 */ - 0230, 0231, 0232, 0233, 0024, 0025, 0236, 0032, /* 0070 */ - 0040, 0240, 0241, 0242, 0243, 0244, 0245, 0246, /* 0100 */ - 0247, 0250, 0133, 0056, 0074, 0050, 0053, 0041, /* 0110 */ - 0046, 0251, 0252, 0253, 0254, 0255, 0256, 0257, /* 0120 */ - 0260, 0261, 0135, 0044, 0052, 0051, 0073, 0136, /* 0130 */ - 0055, 0057, 0262, 0263, 0264, 0265, 0266, 0267, /* 0140 */ - 0270, 0271, 0174, 0054, 0045, 0137, 0076, 0077, /* 0150 */ - 0272, 0273, 0274, 0275, 0276, 0277, 0300, 0301, /* 0160 */ - 0302, 0140, 0072, 0043, 0100, 0047, 0075, 0042, /* 0170 */ - 0303, 0141, 0142, 0143, 0144, 0145, 0146, 0147, /* 0200 */ - 0150, 0151, 0304, 0305, 0306, 0307, 0310, 0311, /* 0210 */ - 0312, 0152, 0153, 0154, 0155, 0156, 0157, 0160, /* 0220 */ - 0161, 0162, 0313, 0314, 0315, 0316, 0317, 0320, /* 0230 */ - 0321, 0176, 0163, 0164, 0165, 0166, 0167, 0170, /* 0240 */ - 0171, 0172, 0322, 0323, 0324, 0325, 0326, 0327, /* 0250 */ - 0330, 0331, 0332, 0333, 0334, 0335, 0336, 0337, /* 0260 */ - 0340, 0341, 0342, 0343, 0344, 0345, 0346, 0347, /* 0270 */ - 0173, 0101, 0102, 0103, 0104, 0105, 0106, 0107, /* 0300 */ - 0110, 0111, 0350, 0351, 0352, 0353, 0354, 0355, /* 0310 */ - 0175, 0112, 0113, 0114, 0115, 0116, 0117, 0120, /* 0320 */ - 0121, 0122, 0356, 0357, 0360, 0361, 0362, 0363, /* 0330 */ - 0134, 0237, 0123, 0124, 0125, 0126, 0127, 0130, /* 0340 */ - 0131, 0132, 0364, 0365, 0366, 0367, 0370, 0371, /* 0350 */ - 0060, 0061, 0062, 0063, 0064, 0065, 0066, 0067, /* 0360 */ - 0070, 0071, 0372, 0373, 0374, 0375, 0376, 0377, /* 0370 */ -}; - -/* ASCII to EBCDIC -- 32V compatible. */ -const u_char a2e_32V[] = { - , 0001, 0002, 0003, 0067, 0055, 0056, 0057,