Updated with Tizen:Base source codes
[external/procps.git] / packaging / procps-3.2.3-pseudo.patch
1 --- procps-3.2.5/top.h.pseudo   2005-03-17 13:32:05.305659080 +0100
2 +++ procps-3.2.5/top.h  2005-03-17 13:34:04.837487480 +0100
3 @@ -149,8 +149,13 @@
4     int _len = 1 + snprintf(_str, sizeof(_str), fmt, ## arg);   \
5     if (Batch) _ptr = _str;                                   \
6     else {                                                 \
7 -      _ptr = &Pseudo_scrn[Pseudo_row++ * Pseudo_cols];  \
8 -      if (memcmp(_ptr, _str, _len)) {                \
9 +      int _rest;                                         \
10 +      _ptr = &Pseudo_scrn[Pseudo_row * Pseudo_cols];    \
11 +      _rest = Pseudo_size-(_ptr-Pseudo_scrn);           \
12 +      Pseudo_row = (Pseudo_row+1) % Screen_rows;       \
13 +      if (_rest < _len)                                \
14 +         _len = _rest;                               \
15 +      if (memcmp(_ptr, _str, _len)) {               \
16           memcpy(_ptr, _str, _len);                \
17        } else {                                 \
18           _ptr = "\n";                       \