~ubuntu-branches/ubuntu/natty/iptraf/natty-proposed

« back to all changes in this revision

Viewing changes to support/input.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2006-10-15 13:34:14 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061015133414-77itbhydih1z3amr
* Sync with Ubuntu fixes (by Oliver Grawert and Michael Vogt)
  * added fix for /var/run detection (since it is a tmpfs by default on
    Ubuntu) [and fixed ubuntu fix]
  * added support for ath devices
  * fixed FTBFS by changing linux/if_tr.h to netinet/if_tr.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
#include <curses.h>
13
13
#include <panel.h>
 
14
#include <ctype.h>
14
15
#include "input.h"
15
16
 
16
17
void tx_initfields(struct FIELDLIST *list, int leny, int lenx, int begy,
31
32
}
32
33
 
33
34
void tx_addfield(struct FIELDLIST *list, unsigned int len,
34
 
              unsigned int y, unsigned int x, char *initstr)
 
35
              unsigned int y, unsigned int x, const char *initstr)
35
36
{
36
37
    struct FIELD *newfield;
37
38
    int i;
94
95
        case 8:
95
96
        case KEY_DC:
96
97
        case KEY_LEFT:
 
98
    case 127:
97
99
            if (field->tlen > 0) {
98
100
                getyx(list->fieldwin, y, x);
99
101
                x--;
193
195
    del_panel(list->fieldpanel);
194
196
    delwin(list->fieldwin);
195
197
}
 
198
 
 
199
char *tx_ltrim(char *str)
 
200
{
 
201
    char *cptr = str;
 
202
 
 
203
    while (isspace(*cptr))
 
204
        cptr++;
 
205
 
 
206
    return cptr;
 
207
}