/[qemacs]/qemacs/hex.c
ViewVC logotype

Diff of /qemacs/hex.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by chqrlie, Mon May 9 01:37:13 2005 UTC revision 1.4 by chqrlie, Wed May 11 15:12:14 2005 UTC
# Line 46  static int hex_display(EditState *s, Dis Line 46  static int hex_display(EditState *s, Dis
46      if (len > s->disp_width)      if (len > s->disp_width)
47          len = s->disp_width;          len = s->disp_width;
48      if (s->mode == &hex_mode) {      if (s->mode == &hex_mode) {
49          for(j=0;j<s->disp_width;j++) {          for (j = 0; j < s->disp_width; j++) {
50              display_char(ds, -1, -1, ' ');              display_char(ds, -1, -1, ' ');
51              offset1 = offset + j;              offset1 = offset + j;
52              if (j < len) {              if (j < len) {
# Line 67  static int hex_display(EditState *s, Dis Line 67  static int hex_display(EditState *s, Dis
67          display_char(ds, -1, -1, ' ');          display_char(ds, -1, -1, ' ');
68      }      }
69      eof = 0;      eof = 0;
70      for(j=0;j<s->disp_width;j++) {      for (j = 0; j < s->disp_width; j++) {
71          offset1 = offset + j;          offset1 = offset + j;
72          if (j < len) {          if (j < len) {
73              eb_read(s->b, offset + j, &b, 1);              eb_read(s->b, offset + j, &b, 1);
# Line 172  int detect_binary(const unsigned char *b Line 172  int detect_binary(const unsigned char *b
172    
173      for (i = 0; i < size; i++) {      for (i = 0; i < size; i++) {
174          c = buf[i];          c = buf[i];
175          if (c < 32 &&          if (c < 32 &&
176              (c != '\r' && c != '\n' && c != '\t' &&              (c != '\r' && c != '\n' && c != '\t' &&
177               c != '\e' && c != '\b' && c != '\f'))               c != '\e' && c != '\b' && c != '\f'))
178              return 1;              return 1;
179      }      }
180      return 0;      return 0;
181  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26