From 6fa71d275b5c6ffb9cd59d8e32c060f0f1f3df37 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 11 Dec 2010 18:51:43 +0000 Subject: [PATCH] support another non-equality '<>' token --- ChangeLog | 4 ++++ src/frontend/inpcom.c | 16 ++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14cf05fcf..7348c728c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-12-11 Robert Larice + * src/frontend/inpcom.c : + support another non-equality '<>' token + 2010-12-11 Robert Larice * src/frontend/inpcom.c : don't transform operators ('&|' -> '&&' '&' -> '&&' etc) pass them *literally* diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index fdffd8941..cfc1be9e2 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -4337,19 +4337,11 @@ static void inp_bsource_compat(struct line *deck) else if ((actchar == '>') || (actchar == '<') || (actchar == '!') || (actchar == '=') ) { - /* >=, <=, !=, == */ - if ((*(str_ptr+1) == '=')) { - buf[0] = actchar; - buf[1] = '='; - buf[2] = '\0'; + /* >=, <=, !=, ==, <>, ... */ + char *beg = str_ptr++; + if ((*str_ptr == '=') || (*str_ptr == '<') || (*str_ptr == '>')) str_ptr++; - } - else { - buf[0] = actchar; - buf[1] = '\0'; - } - cwl->wl_word = copy(buf); - str_ptr++; + cwl->wl_word = copy_substring(beg, str_ptr); ustate = 1; /* we have an operator */ } else if ((actchar == '|') || (actchar == '&'))