pinosaur
/
st.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove variable names from function declarations.
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
00fca99
..
6522c9d
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-359,7
+359,7
@@
static void csidump(void);
static void csihandle(void);
static void csiparse(void);
static void csireset(void);
static void csihandle(void);
static void csiparse(void);
static void csireset(void);
-static int eschandle(uchar
ascii
);
+static int eschandle(uchar);
static void strdump(void);
static void strhandle(void);
static void strparse(void);
static void strdump(void);
static void strhandle(void);
static void strparse(void);
@@
-406,7
+406,7
@@
static void ttyread(void);
static void ttyresize(void);
static void ttysend(char *, size_t);
static void ttywrite(const char *, size_t);
static void ttyresize(void);
static void ttysend(char *, size_t);
static void ttywrite(const char *, size_t);
-static void tstrsequence(uchar
c
);
+static void tstrsequence(uchar);
static void xdraws(char *, Glyph, int, int, int, int);
static void xhints(void);
static void xdraws(char *, Glyph, int, int, int, int);
static void xhints(void);
@@
-996,6
+996,8
@@
selnotify(XEvent *e) {
ofs = 0;
xsev = (XSelectionEvent *)e;
ofs = 0;
xsev = (XSelectionEvent *)e;
+ if (xsev->property == None)
+ return;
do {
if(XGetWindowProperty(xw.dpy, xw.win, xsev->property, ofs,
BUFSIZ/4, False, AnyPropertyType,
do {
if(XGetWindowProperty(xw.dpy, xw.win, xsev->property, ofs,
BUFSIZ/4, False, AnyPropertyType,
@@
-2270,12
+2272,23
@@
strhandle(void) {
void
strparse(void) {
void
strparse(void) {
+ int c;
char *p = strescseq.buf;
strescseq.narg = 0;
strescseq.buf[strescseq.len] = '\0';
char *p = strescseq.buf;
strescseq.narg = 0;
strescseq.buf[strescseq.len] = '\0';
- while(p && strescseq.narg < STR_ARG_SIZ)
- strescseq.args[strescseq.narg++] = strsep(&p, ";");
+
+ if(*p == '\0')
+ return;
+
+ while(strescseq.narg < STR_ARG_SIZ) {
+ strescseq.args[strescseq.narg++] = p;
+ while((c = *p) != ';' && c != '\0')
+ ++p;
+ if(c == '\0')
+ return;
+ *p++ = '\0';
+ }
}
void
}
void
@@
-2635,7
+2648,6
@@
tputc(char *c, int len) {
c = "\357\277\275"; /* UTF_INVALID */
width = 1;
}
c = "\357\277\275"; /* UTF_INVALID */
width = 1;
}
- control = ISCONTROLC1(unicodep);
ascii = unicodep;
}
ascii = unicodep;
}
@@
-2650,7
+2662,7
@@
tputc(char *c, int len) {
* character.
*/
if(term.esc & ESC_STR) {
* character.
*/
if(term.esc & ESC_STR) {
- if(
width
== 1 &&
+ if(
len
== 1 &&
(ascii == '\a' || ascii == 030 ||
ascii == 032 || ascii == 033 ||
ISCONTROLC1(unicodep))) {
(ascii == '\a' || ascii == 030 ||
ascii == 032 || ascii == 033 ||
ISCONTROLC1(unicodep))) {