~ubuntu-branches/ubuntu/trusty/htop/trusty-proposed

« back to all changes in this revision

Viewing changes to RichString.c

  • Committer: Bazaar Package Importer
  • Author(s): Eugene V. Lyubimkin
  • Date: 2009-04-05 11:51:34 UTC
  • mfrom: (1.1.13 upstream) (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090405115134-xyuzxp308k5qos0k
Tags: 0.8.1+svn149-1
* New upstream development snapshot:
  - Allow building withough PLPA support. (Closes: #521861)
* debian/patches:
  - 010-make-desktop-file-valid.patch: deleted, merged upstream.
  - 100-upstream-sort-by-processor-and-session.patch: deleted, merged
    upstream.
  - 110-upstream-fix-page-size-on-BSD.patch: deleted, merged upstream.
  - 120-upstream-explain-cpu-bars-in-monochrome-mode.patch: deleted, merged
    upstream.
  - 200-filter-non-printable-characters.patch: deleted, upstream has own
    version of this patch.
  - 610-rename-veid-to-ctid.patch: deleted, merged upstream.
  - 600-openvz-veid-on-kernels-gt-2.6.18.patch: refreshed.
  - 800-tree-view-without-userland-threads.patch: deleted, merged upstream.
  - 700-ltrace-support.patch: refreshed, added the description.
* debian/rules:
  - Deal more robustly with config.{sub,guess} files, thanks to Roger Leigh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include <stdlib.h>
10
10
#include <string.h>
11
11
#include <curses.h>
 
12
#include <ctype.h>
12
13
 
13
14
#include "debug.h"
14
15
#include <assert.h>
89
90
inline void RichString_appendn(RichString* this, int attrs, char* data_c, int len) {
90
91
   int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len);
91
92
   for (int i = this->len, j = 0; i < last; i++, j++)
92
 
      this->chstr[i] = data_c[j] | attrs;
 
93
      this->chstr[i] = (isprint(data_c[j]) ? data_c[j] : '?') | attrs;
 
94
 
93
95
   this->chstr[last] = 0;
94
96
   this->len = last;
95
97
}