aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/st.c b/st.c
index 641f896..ec747cc 100644
--- a/st.c
+++ b/st.c
@@ -109,19 +109,6 @@ typedef struct {
109 int narg; /* nb of args */ 109 int narg; /* nb of args */
110} STREscape; 110} STREscape;
111 111
112/* function definitions used in config.h */
113static void clipcopy(const Arg *);
114static void clippaste(const Arg *);
115static void numlock(const Arg *);
116static void selpaste(const Arg *);
117static void printsel(const Arg *);
118static void printscreen(const Arg *) ;
119static void iso14755(const Arg *);
120static void toggleprinter(const Arg *);
121static void sendbreak(const Arg *);
122
123/* config.h for applying patches and the configuration. */
124#include "config.h"
125 112
126static void execsh(char **); 113static void execsh(char **);
127static void stty(char **); 114static void stty(char **);
@@ -199,14 +186,6 @@ static uchar utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
199static Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000}; 186static Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
200static Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF}; 187static Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
201 188
202/* config.h array lengths */
203size_t colornamelen = LEN(colorname);
204size_t mshortcutslen = LEN(mshortcuts);
205size_t shortcutslen = LEN(shortcuts);
206size_t selmaskslen = LEN(selmasks);
207size_t keyslen = LEN(key);
208size_t mappedkeyslen = LEN(mappedkeys);
209
210ssize_t 189ssize_t
211xwrite(int fd, const char *s, size_t len) 190xwrite(int fd, const char *s, size_t len)
212{ 191{
@@ -586,24 +565,6 @@ getsel(void)
586} 565}
587 566
588void 567void
589selpaste(const Arg *dummy)
590{
591 xselpaste();
592}
593
594void
595clipcopy(const Arg *dummy)
596{
597 xclipcopy();
598}
599
600void
601clippaste(const Arg *dummy)
602{
603 xclippaste();
604}
605
606void
607selclear(void) 568selclear(void)
608{ 569{
609 if (sel.ob.x == -1) 570 if (sel.ob.x == -1)
@@ -1572,7 +1533,7 @@ csihandle(void)
1572 break; 1533 break;
1573 case 'c': /* DA -- Device Attributes */ 1534 case 'c': /* DA -- Device Attributes */
1574 if (csiescseq.arg[0] == 0) 1535 if (csiescseq.arg[0] == 0)
1575 ttywrite(vtiden, sizeof(vtiden) - 1); 1536 ttywrite(vtiden, strlen(vtiden));
1576 break; 1537 break;
1577 case 'C': /* CUF -- Cursor <n> Forward */ 1538 case 'C': /* CUF -- Cursor <n> Forward */
1578 case 'a': /* HPR -- Cursor <n> Forward */ 1539 case 'a': /* HPR -- Cursor <n> Forward */
@@ -1791,7 +1752,7 @@ strhandle(void)
1791 dec = base64dec(strescseq.args[2]); 1752 dec = base64dec(strescseq.args[2]);
1792 if (dec) { 1753 if (dec) {
1793 xsetsel(dec, CurrentTime); 1754 xsetsel(dec, CurrentTime);
1794 clipcopy(NULL); 1755 xclipcopy();
1795 } else { 1756 } else {
1796 fprintf(stderr, "erresc: invalid base64\n"); 1757 fprintf(stderr, "erresc: invalid base64\n");
1797 } 1758 }
@@ -2134,7 +2095,7 @@ tcontrolcode(uchar ascii)
2134 case 0x99: /* TODO: SGCI */ 2095 case 0x99: /* TODO: SGCI */
2135 break; 2096 break;
2136 case 0x9a: /* DECID -- Identify Terminal */ 2097 case 0x9a: /* DECID -- Identify Terminal */
2137 ttywrite(vtiden, sizeof(vtiden) - 1); 2098 ttywrite(vtiden, strlen(vtiden));
2138 break; 2099 break;
2139 case 0x9b: /* TODO: CSI */ 2100 case 0x9b: /* TODO: CSI */
2140 case 0x9c: /* TODO: ST */ 2101 case 0x9c: /* TODO: ST */
@@ -2206,7 +2167,7 @@ eschandle(uchar ascii)
2206 } 2167 }
2207 break; 2168 break;
2208 case 'Z': /* DECID -- Identify Terminal */ 2169 case 'Z': /* DECID -- Identify Terminal */
2209 ttywrite(vtiden, sizeof(vtiden) - 1); 2170 ttywrite(vtiden, strlen(vtiden));
2210 break; 2171 break;
2211 case 'c': /* RIS -- Reset to inital state */ 2172 case 'c': /* RIS -- Reset to inital state */
2212 treset(); 2173 treset();