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

« back to all changes in this revision

Viewing changes to HostnameMeter.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:
 
1
/*
 
2
htop
 
3
(C) 2004-2006 Hisham H. Muhammad
 
4
Released under the GNU GPL, see the COPYING file
 
5
in the source distribution for its full text.
 
6
*/
 
7
 
 
8
#include "HostnameMeter.h"
 
9
#include "Meter.h"
 
10
 
 
11
#include <unistd.h>
 
12
 
 
13
#include "debug.h"
 
14
 
 
15
int HostnameMeter_attributes[] = {
 
16
   HOSTNAME
 
17
};
 
18
 
 
19
static void HostnameMeter_setValues(Meter* this, char* buffer, int size) {
 
20
   gethostname(buffer, size-1);
 
21
}
 
22
 
 
23
MeterType HostnameMeter = {
 
24
   .setValues = HostnameMeter_setValues, 
 
25
   .display = NULL,
 
26
   .mode = TEXT_METERMODE,
 
27
   .total = 100.0,
 
28
   .items = 1,
 
29
   .attributes = HostnameMeter_attributes,
 
30
   .name = "Hostname",
 
31
   .uiName = "Hostname",
 
32
   .caption = "Hostname: ",
 
33
};