~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/mbsalign.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Align/Truncate a string in a given screen width
2
 
   Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
2
   Copyright (C) 2009-2012 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
21
21
enum {
22
22
  /* Use unibyte mode for invalid multibyte strings
23
23
     or when heap memory is exhausted.  */
24
 
  MBA_UNIBYTE_FALLBACK = 0x0001
 
24
  MBA_UNIBYTE_FALLBACK = 0x0001,
 
25
 
 
26
  /* As an optimization, don't do multibyte processing
 
27
     when we know no multibyte characters are present.  */
 
28
  MBA_UNIBYTE_ONLY = 0x0002,
 
29
 
 
30
  /* Don't add leading padding.  */
 
31
  MBA_NO_LEFT_PAD = 0x0004,
 
32
 
 
33
  /* Don't add trailing padding.  */
 
34
  MBA_NO_RIGHT_PAD = 0x0008
25
35
 
26
36
#if 0 /* Other possible options.  */
27
 
  /* Skip invalid multibyte chars rather than failing  */
28
 
  MBA_IGNORE_INVALID   = 0x0002,
29
 
 
30
 
  /* Align multibyte strings using "figure space" (\u2007)  */
31
 
  MBA_USE_FIGURE_SPACE = 0x0004,
32
 
 
33
 
  /* Don't add any padding  */
34
 
  MBA_TRUNCATE_ONLY    = 0x0008,
35
 
 
36
 
  /* Don't truncate  */
37
 
  MBA_PAD_ONLY         = 0x0010,
 
37
  /* Skip invalid multibyte chars rather than failing.  */
 
38
  MBA_IGNORE_INVALID
 
39
 
 
40
  /* Align multibyte strings using "figure space" (\u2007).  */
 
41
  MBA_USE_FIGURE_SPACE
 
42
 
 
43
  /* Don't truncate.  */
 
44
  MBA_NO_TRUNCATE
 
45
 
 
46
  /* Ensure no leading whitespace.  */
 
47
  MBA_LSTRIP
 
48
 
 
49
  /* Ensure no trailing whitespace.  */
 
50
  MBA_RSTRIP
38
51
#endif
39
52
};
40
53