Skip to content

Commit e7b6e80

Browse files
committed
deimos.curses: Stop using std.conv
This causes a ModuleInfo to be created.
1 parent 086510d commit e7b6e80

File tree

1 file changed

+114
-116
lines changed

1 file changed

+114
-116
lines changed

source/deimos/curses.di

Lines changed: 114 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
/* $Id: curses.h.in,v 1.277 2021/09/24 16:07:37 tom Exp $ */
3737
module deimos.curses;
3838

39-
import std.conv : octal;
40-
4139
extern (C):
4240

4341
/*
@@ -1365,108 +1363,108 @@ extern __gshared NCURSES_EXPORT_VAR!(int) TABSIZE;
13651363
*
13661364
* A few key codes do not depend upon the terminfo entry.
13671365
*/
1368-
enum KEY_CODE_YES = octal!400; /* A wchar_t contains a key code */
1369-
enum KEY_MIN = octal!401; /* Minimum curses key */
1370-
enum KEY_BREAK = octal!401; /* Break key (unreliable) */
1371-
enum KEY_SRESET = octal!530; /* Soft (partial) reset (unreliable) */
1372-
enum KEY_RESET = octal!531; /* Reset or hard reset (unreliable) */
1366+
enum KEY_CODE_YES = /*0400*/ 0x100; /* A wchar_t contains a key code */
1367+
enum KEY_MIN = /*0401*/ 0x101; /* Minimum curses key */
1368+
enum KEY_BREAK = /*0401*/ 0x101; /* Break key (unreliable) */
1369+
enum KEY_SRESET = /*0530*/ 0x158; /* Soft (partial) reset (unreliable) */
1370+
enum KEY_RESET = /*0531*/ 0x159; /* Reset or hard reset (unreliable) */
13731371
/*
13741372
* These definitions were generated by ./MKkey_defs.sh ./Caps ./Caps-ncurses
13751373
*/
1376-
enum KEY_DOWN = octal!402; /* down-arrow key */
1377-
enum KEY_UP = octal!403; /* up-arrow key */
1378-
enum KEY_LEFT = octal!404; /* left-arrow key */
1379-
enum KEY_RIGHT = octal!405; /* right-arrow key */
1380-
enum KEY_HOME = octal!406; /* home key */
1381-
enum KEY_BACKSPACE = octal!407; /* backspace key */
1382-
enum KEY_F0 = octal!410; /* Function keys. Space for 64 */
1374+
enum KEY_DOWN = /*0402*/ 0x102; /* down-arrow key */
1375+
enum KEY_UP = /*0403*/ 0x103; /* up-arrow key */
1376+
enum KEY_LEFT = /*0404*/ 0x104; /* left-arrow key */
1377+
enum KEY_RIGHT = /*0405*/ 0x105; /* right-arrow key */
1378+
enum KEY_HOME = /*0406*/ 0x106; /* home key */
1379+
enum KEY_BACKSPACE = /*0407*/ 0x107; /* backspace key */
1380+
enum KEY_F0 = /*0410*/ 0x108; /* Function keys. Space for 64 */
13831381
auto KEY_F(n)(n n) { pragma(inline, true); return (KEY_F0+(n)); } /* Value of function key n */
1384-
enum KEY_DL = octal!510; /* delete-line key */
1385-
enum KEY_IL = octal!511; /* insert-line key */
1386-
enum KEY_DC = octal!512; /* delete-character key */
1387-
enum KEY_IC = octal!513; /* insert-character key */
1388-
enum KEY_EIC = octal!514; /* sent by rmir or smir in insert mode */
1389-
enum KEY_CLEAR = octal!515; /* clear-screen or erase key */
1390-
enum KEY_EOS = octal!516; /* clear-to-end-of-screen key */
1391-
enum KEY_EOL = octal!517; /* clear-to-end-of-line key */
1392-
enum KEY_SF = octal!520; /* scroll-forward key */
1393-
enum KEY_SR = octal!521; /* scroll-backward key */
1394-
enum KEY_NPAGE = octal!522; /* next-page key */
1395-
enum KEY_PPAGE = octal!523; /* previous-page key */
1396-
enum KEY_STAB = octal!524; /* set-tab key */
1397-
enum KEY_CTAB = octal!525; /* clear-tab key */
1398-
enum KEY_CATAB = octal!526; /* clear-all-tabs key */
1399-
enum KEY_ENTER = octal!527; /* enter/send key */
1400-
enum KEY_PRINT = octal!532; /* print key */
1401-
enum KEY_LL = octal!533; /* lower-left key (home down) */
1402-
enum KEY_A1 = octal!534; /* upper left of keypad */
1403-
enum KEY_A3 = octal!535; /* upper right of keypad */
1404-
enum KEY_B2 = octal!536; /* center of keypad */
1405-
enum KEY_C1 = octal!537; /* lower left of keypad */
1406-
enum KEY_C3 = octal!540; /* lower right of keypad */
1407-
enum KEY_BTAB = octal!541; /* back-tab key */
1408-
enum KEY_BEG = octal!542; /* begin key */
1409-
enum KEY_CANCEL = octal!543; /* cancel key */
1410-
enum KEY_CLOSE = octal!544; /* close key */
1411-
enum KEY_COMMAND = octal!545; /* command key */
1412-
enum KEY_COPY = octal!546; /* copy key */
1413-
enum KEY_CREATE = octal!547; /* create key */
1414-
enum KEY_END = octal!550; /* end key */
1415-
enum KEY_EXIT = octal!551; /* exit key */
1416-
enum KEY_FIND = octal!552; /* find key */
1417-
enum KEY_HELP = octal!553; /* help key */
1418-
enum KEY_MARK = octal!554; /* mark key */
1419-
enum KEY_MESSAGE = octal!555; /* message key */
1420-
enum KEY_MOVE = octal!556; /* move key */
1421-
enum KEY_NEXT = octal!557; /* next key */
1422-
enum KEY_OPEN = octal!560; /* open key */
1423-
enum KEY_OPTIONS = octal!561; /* options key */
1424-
enum KEY_PREVIOUS = octal!562; /* previous key */
1425-
enum KEY_REDO = octal!563; /* redo key */
1426-
enum KEY_REFERENCE = octal!564; /* reference key */
1427-
enum KEY_REFRESH = octal!565; /* refresh key */
1428-
enum KEY_REPLACE = octal!566; /* replace key */
1429-
enum KEY_RESTART = octal!567; /* restart key */
1430-
enum KEY_RESUME = octal!570; /* resume key */
1431-
enum KEY_SAVE = octal!571; /* save key */
1432-
enum KEY_SBEG = octal!572; /* shifted begin key */
1433-
enum KEY_SCANCEL = octal!573; /* shifted cancel key */
1434-
enum KEY_SCOMMAND = octal!574; /* shifted command key */
1435-
enum KEY_SCOPY = octal!575; /* shifted copy key */
1436-
enum KEY_SCREATE = octal!576; /* shifted create key */
1437-
enum KEY_SDC = octal!577; /* shifted delete-character key */
1438-
enum KEY_SDL = octal!600; /* shifted delete-line key */
1439-
enum KEY_SELECT = octal!601; /* select key */
1440-
enum KEY_SEND = octal!602; /* shifted end key */
1441-
enum KEY_SEOL = octal!603; /* shifted clear-to-end-of-line key */
1442-
enum KEY_SEXIT = octal!604; /* shifted exit key */
1443-
enum KEY_SFIND = octal!605; /* shifted find key */
1444-
enum KEY_SHELP = octal!606; /* shifted help key */
1445-
enum KEY_SHOME = octal!607; /* shifted home key */
1446-
enum KEY_SIC = octal!610; /* shifted insert-character key */
1447-
enum KEY_SLEFT = octal!611; /* shifted left-arrow key */
1448-
enum KEY_SMESSAGE = octal!612; /* shifted message key */
1449-
enum KEY_SMOVE = octal!613; /* shifted move key */
1450-
enum KEY_SNEXT = octal!614; /* shifted next key */
1451-
enum KEY_SOPTIONS = octal!615; /* shifted options key */
1452-
enum KEY_SPREVIOUS = octal!616; /* shifted previous key */
1453-
enum KEY_SPRINT = octal!617; /* shifted print key */
1454-
enum KEY_SREDO = octal!620; /* shifted redo key */
1455-
enum KEY_SREPLACE = octal!621; /* shifted replace key */
1456-
enum KEY_SRIGHT = octal!622; /* shifted right-arrow key */
1457-
enum KEY_SRSUME = octal!623; /* shifted resume key */
1458-
enum KEY_SSAVE = octal!624; /* shifted save key */
1459-
enum KEY_SSUSPEND = octal!625; /* shifted suspend key */
1460-
enum KEY_SUNDO = octal!626; /* shifted undo key */
1461-
enum KEY_SUSPEND = octal!627; /* suspend key */
1462-
enum KEY_UNDO = octal!630; /* undo key */
1463-
enum KEY_MOUSE = octal!631; /* Mouse event has occurred */
1382+
enum KEY_DL = /*0510*/ 0x148; /* delete-line key */
1383+
enum KEY_IL = /*0511*/ 0x149; /* insert-line key */
1384+
enum KEY_DC = /*0512*/ 0x14a; /* delete-character key */
1385+
enum KEY_IC = /*0513*/ 0x14b; /* insert-character key */
1386+
enum KEY_EIC = /*0514*/ 0x14c; /* sent by rmir or smir in insert mode */
1387+
enum KEY_CLEAR = /*0515*/ 0x14d; /* clear-screen or erase key */
1388+
enum KEY_EOS = /*0516*/ 0x14e; /* clear-to-end-of-screen key */
1389+
enum KEY_EOL = /*0517*/ 0x14f; /* clear-to-end-of-line key */
1390+
enum KEY_SF = /*0520*/ 0x150; /* scroll-forward key */
1391+
enum KEY_SR = /*0521*/ 0x151; /* scroll-backward key */
1392+
enum KEY_NPAGE = /*0522*/ 0x152; /* next-page key */
1393+
enum KEY_PPAGE = /*0523*/ 0x153; /* previous-page key */
1394+
enum KEY_STAB = /*0524*/ 0x154; /* set-tab key */
1395+
enum KEY_CTAB = /*0525*/ 0x155; /* clear-tab key */
1396+
enum KEY_CATAB = /*0526*/ 0x156; /* clear-all-tabs key */
1397+
enum KEY_ENTER = /*0527*/ 0x157; /* enter/send key */
1398+
enum KEY_PRINT = /*0532*/ 0x15a; /* print key */
1399+
enum KEY_LL = /*0533*/ 0x15b; /* lower-left key (home down) */
1400+
enum KEY_A1 = /*0534*/ 0x15c; /* upper left of keypad */
1401+
enum KEY_A3 = /*0535*/ 0x15d; /* upper right of keypad */
1402+
enum KEY_B2 = /*0536*/ 0x15e; /* center of keypad */
1403+
enum KEY_C1 = /*0537*/ 0x15f; /* lower left of keypad */
1404+
enum KEY_C3 = /*0540*/ 0x160; /* lower right of keypad */
1405+
enum KEY_BTAB = /*0541*/ 0x161; /* back-tab key */
1406+
enum KEY_BEG = /*0542*/ 0x162; /* begin key */
1407+
enum KEY_CANCEL = /*0543*/ 0x163; /* cancel key */
1408+
enum KEY_CLOSE = /*0544*/ 0x164; /* close key */
1409+
enum KEY_COMMAND = /*0545*/ 0x165; /* command key */
1410+
enum KEY_COPY = /*0546*/ 0x166; /* copy key */
1411+
enum KEY_CREATE = /*0547*/ 0x167; /* create key */
1412+
enum KEY_END = /*0550*/ 0x168; /* end key */
1413+
enum KEY_EXIT = /*0551*/ 0x169; /* exit key */
1414+
enum KEY_FIND = /*0552*/ 0x16a; /* find key */
1415+
enum KEY_HELP = /*0553*/ 0x16b; /* help key */
1416+
enum KEY_MARK = /*0554*/ 0x16c; /* mark key */
1417+
enum KEY_MESSAGE = /*0555*/ 0x16d; /* message key */
1418+
enum KEY_MOVE = /*0556*/ 0x16e; /* move key */
1419+
enum KEY_NEXT = /*0557*/ 0x16f; /* next key */
1420+
enum KEY_OPEN = /*0560*/ 0x170; /* open key */
1421+
enum KEY_OPTIONS = /*0561*/ 0x171; /* options key */
1422+
enum KEY_PREVIOUS = /*0562*/ 0x172; /* previous key */
1423+
enum KEY_REDO = /*0563*/ 0x173; /* redo key */
1424+
enum KEY_REFERENCE = /*0564*/ 0x174; /* reference key */
1425+
enum KEY_REFRESH = /*0565*/ 0x175; /* refresh key */
1426+
enum KEY_REPLACE = /*0566*/ 0x176; /* replace key */
1427+
enum KEY_RESTART = /*0567*/ 0x177; /* restart key */
1428+
enum KEY_RESUME = /*0570*/ 0x178; /* resume key */
1429+
enum KEY_SAVE = /*0571*/ 0x179; /* save key */
1430+
enum KEY_SBEG = /*0572*/ 0x17a; /* shifted begin key */
1431+
enum KEY_SCANCEL = /*0573*/ 0x17b; /* shifted cancel key */
1432+
enum KEY_SCOMMAND = /*0574*/ 0x17c; /* shifted command key */
1433+
enum KEY_SCOPY = /*0575*/ 0x17d; /* shifted copy key */
1434+
enum KEY_SCREATE = /*0576*/ 0x17e; /* shifted create key */
1435+
enum KEY_SDC = /*0577*/ 0x17f; /* shifted delete-character key */
1436+
enum KEY_SDL = /*0600*/ 0x180; /* shifted delete-line key */
1437+
enum KEY_SELECT = /*0601*/ 0x181; /* select key */
1438+
enum KEY_SEND = /*0602*/ 0x182; /* shifted end key */
1439+
enum KEY_SEOL = /*0603*/ 0x183; /* shifted clear-to-end-of-line key */
1440+
enum KEY_SEXIT = /*0604*/ 0x184; /* shifted exit key */
1441+
enum KEY_SFIND = /*0605*/ 0x185; /* shifted find key */
1442+
enum KEY_SHELP = /*0606*/ 0x186; /* shifted help key */
1443+
enum KEY_SHOME = /*0607*/ 0x187; /* shifted home key */
1444+
enum KEY_SIC = /*0610*/ 0x188; /* shifted insert-character key */
1445+
enum KEY_SLEFT = /*0611*/ 0x189; /* shifted left-arrow key */
1446+
enum KEY_SMESSAGE = /*0612*/ 0x18a; /* shifted message key */
1447+
enum KEY_SMOVE = /*0613*/ 0x18b; /* shifted move key */
1448+
enum KEY_SNEXT = /*0614*/ 0x18c; /* shifted next key */
1449+
enum KEY_SOPTIONS = /*0615*/ 0x18d; /* shifted options key */
1450+
enum KEY_SPREVIOUS = /*0616*/ 0x18e; /* shifted previous key */
1451+
enum KEY_SPRINT = /*0617*/ 0x18f; /* shifted print key */
1452+
enum KEY_SREDO = /*0620*/ 0x190; /* shifted redo key */
1453+
enum KEY_SREPLACE = /*0621*/ 0x191; /* shifted replace key */
1454+
enum KEY_SRIGHT = /*0622*/ 0x192; /* shifted right-arrow key */
1455+
enum KEY_SRSUME = /*0623*/ 0x193; /* shifted resume key */
1456+
enum KEY_SSAVE = /*0624*/ 0x194; /* shifted save key */
1457+
enum KEY_SSUSPEND = /*0625*/ 0x195; /* shifted suspend key */
1458+
enum KEY_SUNDO = /*0626*/ 0x196; /* shifted undo key */
1459+
enum KEY_SUSPEND = /*0627*/ 0x197; /* suspend key */
1460+
enum KEY_UNDO = /*0630*/ 0x198; /* undo key */
1461+
enum KEY_MOUSE = /*0631*/ 0x199; /* Mouse event has occurred */
14641462

14651463
version (NCURSES_EXT_FUNCS) {
1466-
enum KEY_RESIZE = octal!632; /* Terminal resize event */
1464+
enum KEY_RESIZE = /*0632*/ 0x19a; /* Terminal resize event */
14671465
}
14681466

1469-
enum KEY_MAX = octal!777; /* Maximum key value is 0632 */
1467+
enum KEY_MAX = /*0777*/ 0x1ff; /* Maximum key value is 0632 */
14701468
/* $Id: curses.wide,v 1.51 2021/05/22 20:28:29 tom Exp $ */
14711469
/*
14721470
* vile:cmode:
@@ -1796,12 +1794,12 @@ auto NCURSES_MOUSE_MASK(b,m)(b b,m m) { pragma(inline, true); return ((m) << ((
17961794
auto NCURSES_MOUSE_MASK(b,m)(b b,m m) { pragma(inline, true); return ((m) << (((b) - 1) * 6)); }
17971795
}
17981796

1799-
enum NCURSES_BUTTON_RELEASED = octal!01L;
1800-
enum NCURSES_BUTTON_PRESSED = octal!02L;
1801-
enum NCURSES_BUTTON_CLICKED = octal!04L;
1802-
enum NCURSES_DOUBLE_CLICKED = octal!10L;
1803-
enum NCURSES_TRIPLE_CLICKED = octal!20L;
1804-
enum NCURSES_RESERVED_EVENT = octal!40L;
1797+
enum NCURSES_BUTTON_RELEASED = /*001*/ 0x01L;
1798+
enum NCURSES_BUTTON_PRESSED = /*002*/ 0x02L;
1799+
enum NCURSES_BUTTON_CLICKED = /*004*/ 0x04L;
1800+
enum NCURSES_DOUBLE_CLICKED = /*010*/ 0x08L;
1801+
enum NCURSES_TRIPLE_CLICKED = /*020*/ 0x10L;
1802+
enum NCURSES_RESERVED_EVENT = /*040*/ 0x20L;
18051803

18061804
/* event masks */
18071805
enum BUTTON1_RELEASED = NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED);
@@ -1840,10 +1838,10 @@ enum BUTTON5_CLICKED = NCURSES_MOUSE_MASK(5, NCURSES_BUTTON_CLICKED);
18401838
enum BUTTON5_DOUBLE_CLICKED = NCURSES_MOUSE_MASK(5, NCURSES_DOUBLE_CLICKED);
18411839
enum BUTTON5_TRIPLE_CLICKED = NCURSES_MOUSE_MASK(5, NCURSES_TRIPLE_CLICKED);
18421840

1843-
enum BUTTON_CTRL = NCURSES_MOUSE_MASK(6, octal! 01L);
1844-
enum BUTTON_SHIFT = NCURSES_MOUSE_MASK(6, octal! 02L);
1845-
enum BUTTON_ALT = NCURSES_MOUSE_MASK(6, octal! 04L);
1846-
enum REPORT_MOUSE_POSITION = NCURSES_MOUSE_MASK(6, octal! 10L);
1841+
enum BUTTON_CTRL = NCURSES_MOUSE_MASK(6, /*001*/ 0x01L);
1842+
enum BUTTON_SHIFT = NCURSES_MOUSE_MASK(6, /*002*/ 0x02L);
1843+
enum BUTTON_ALT = NCURSES_MOUSE_MASK(6, /*004*/ 0x04L);
1844+
enum REPORT_MOUSE_POSITION = NCURSES_MOUSE_MASK(6, /*010*/ 0x08L);
18471845

18481846
} else {
18491847

@@ -1852,22 +1850,22 @@ enum BUTTON2_RESERVED_EVENT = NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT);
18521850
enum BUTTON3_RESERVED_EVENT = NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT);
18531851
enum BUTTON4_RESERVED_EVENT = NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT);
18541852

1855-
enum BUTTON_CTRL = NCURSES_MOUSE_MASK(5, octal! 01L);
1856-
enum BUTTON_SHIFT = NCURSES_MOUSE_MASK(5, octal! 02L);
1857-
enum BUTTON_ALT = NCURSES_MOUSE_MASK(5, octal! 04L);
1858-
enum REPORT_MOUSE_POSITION = NCURSES_MOUSE_MASK(5, octal! 10L);
1853+
enum BUTTON_CTRL = NCURSES_MOUSE_MASK(5, /*001*/ 0x01L);
1854+
enum BUTTON_SHIFT = NCURSES_MOUSE_MASK(5, /*002*/ 0x02L);
1855+
enum BUTTON_ALT = NCURSES_MOUSE_MASK(5, /*004*/ 0x04L);
1856+
enum REPORT_MOUSE_POSITION = NCURSES_MOUSE_MASK(5, /*010*/ 0x08L);
18591857

18601858
}
18611859

18621860
enum ALL_MOUSE_EVENTS = (REPORT_MOUSE_POSITION - 1);
18631861

18641862
/* macros to extract single event-bits from masks */
1865-
auto BUTTON_RELEASE(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, octal!01)); }
1866-
auto BUTTON_PRESS(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, octal!02)); }
1867-
auto BUTTON_CLICK(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, octal!04)); }
1868-
auto BUTTON_DOUBLE_CLICK(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, octal!10)); }
1869-
auto BUTTON_TRIPLE_CLICK(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, octal!20)); }
1870-
auto BUTTON_RESERVED_EVENT(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, octal!40)); }
1863+
auto BUTTON_RELEASE(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, /*001*/ 0x01)); }
1864+
auto BUTTON_PRESS(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, /*002*/ 0x02)); }
1865+
auto BUTTON_CLICK(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, /*004*/ 0x04)); }
1866+
auto BUTTON_DOUBLE_CLICK(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, /*010*/ 0x08)); }
1867+
auto BUTTON_TRIPLE_CLICK(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, /*020*/ 0x10)); }
1868+
auto BUTTON_RESERVED_EVENT(e, x)(e e, x x) { pragma(inline, true); return ((e) & NCURSES_MOUSE_MASK(x, /*040*/ 0x20)); }
18711869

18721870
struct MEVENT
18731871
{

0 commit comments

Comments
 (0)