Mercurial > hg > xemacs-beta
comparison src/dired-msw.c @ 867:804517e16990
[xemacs-hg @ 2002-06-05 09:54:39 by ben]
Textual renaming: text/char names
abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization.
[a] distinguish between "charptr" when it refers to operations on
the pointer itself and when it refers to operations on text; and
[b] use consistent naming for everything referring to internal
format, i.e.
Itext == text in internal format
Ibyte == a byte in such text
Ichar == a char as represented in internal character format
thus e.g.
set_charptr_emchar -> set_itext_ichar
The pre and post tags on either side of this change are:
pre-internal-format-textual-renaming
post-internal-format-textual-renaming
See the Internals Manual for details of exactly how this was done,
how to handle the change in your workspace, etc.
author | ben |
---|---|
date | Wed, 05 Jun 2002 09:58:45 +0000 |
parents | 6728e641994e |
children | 79c6ff3eef26 |
comparison
equal
deleted
inserted
replaced
866:613552a02607 | 867:804517e16990 |
---|---|
116 FILETIME ftCreationTime; | 116 FILETIME ftCreationTime; |
117 FILETIME ftLastAccessTime; | 117 FILETIME ftLastAccessTime; |
118 FILETIME ftLastWriteTime; | 118 FILETIME ftLastWriteTime; |
119 DWORD nFileSizeHigh; | 119 DWORD nFileSizeHigh; |
120 DWORD nFileSizeLow; | 120 DWORD nFileSizeLow; |
121 Intbyte *cFileName; | 121 Ibyte *cFileName; |
122 } Win32_file; | 122 } Win32_file; |
123 | 123 |
124 typedef struct | 124 typedef struct |
125 { | 125 { |
126 Dynarr_declare (Win32_file); | 126 Dynarr_declare (Win32_file); |
282 (eigetch_char (filename, 1) == '.' && | 282 (eigetch_char (filename, 1) == '.' && |
283 eigetch_char (filename, 2) == '\0'))) || | 283 eigetch_char (filename, 2) == '\0'))) || |
284 hide_dot))) | 284 hide_dot))) |
285 { | 285 { |
286 file.cFileName = | 286 file.cFileName = |
287 (Intbyte *) xmalloc (sizeof (Intbyte) * (1 + len)); | 287 (Ibyte *) xmalloc (sizeof (Ibyte) * (1 + len)); |
288 memcpy (file.cFileName, eidata (filename), len); | 288 memcpy (file.cFileName, eidata (filename), len); |
289 file.cFileName[len] = '\0'; | 289 file.cFileName[len] = '\0'; |
290 Dynarr_add (files, file); | 290 Dynarr_add (files, file); |
291 } | 291 } |
292 } | 292 } |
304 mswindows_format_file (Win32_file *file, int display_size, int add_newline) | 304 mswindows_format_file (Win32_file *file, int display_size, int add_newline) |
305 { | 305 { |
306 Lisp_Object luser; | 306 Lisp_Object luser; |
307 double file_size; | 307 double file_size; |
308 DECLARE_EISTRING (puta); | 308 DECLARE_EISTRING (puta); |
309 CIntbyte buf[666]; | 309 CIbyte buf[666]; |
310 | 310 |
311 file_size = | 311 file_size = |
312 file->nFileSizeHigh * (double)UINT_MAX + file->nFileSizeLow; | 312 file->nFileSizeHigh * (double)UINT_MAX + file->nFileSizeLow; |
313 #if INDENT_LISTING | 313 #if INDENT_LISTING |
314 eicat_c (puta, " "); | 314 eicat_c (puta, " "); |
332 | 332 |
333 if (file->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) | 333 if (file->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) |
334 is_executable = 1; | 334 is_executable = 1; |
335 else if (qxestrcharlen (file->cFileName) > 4) | 335 else if (qxestrcharlen (file->cFileName) > 4) |
336 { | 336 { |
337 Intbyte *end = file->cFileName + qxestrlen (file->cFileName); | 337 Ibyte *end = file->cFileName + qxestrlen (file->cFileName); |
338 DEC_CHARPTR (end); | 338 DEC_IBYTEPTR (end); |
339 DEC_CHARPTR (end); | 339 DEC_IBYTEPTR (end); |
340 DEC_CHARPTR (end); | 340 DEC_IBYTEPTR (end); |
341 DEC_CHARPTR (end); | 341 DEC_IBYTEPTR (end); |
342 if (qxestrcasecmp (end, ".exe") == 0 | 342 if (qxestrcasecmp (end, ".exe") == 0 |
343 || qxestrcasecmp (end, ".com") == 0 | 343 || qxestrcasecmp (end, ".com") == 0 |
344 || qxestrcasecmp (end, ".bat") == 0 | 344 || qxestrcasecmp (end, ".bat") == 0 |
345 #if 0 | 345 #if 0 |
346 || qxestrcasecmp (end, ".pif") == 0 | 346 || qxestrcasecmp (end, ".pif") == 0 |
362 luser = Fuser_login_name (Qnil); | 362 luser = Fuser_login_name (Qnil); |
363 if (!STRINGP (luser)) | 363 if (!STRINGP (luser)) |
364 sprintf (buf, "%-9d", 0); | 364 sprintf (buf, "%-9d", 0); |
365 else | 365 else |
366 { | 366 { |
367 Intbyte *str; | 367 Ibyte *str; |
368 | 368 |
369 str = XSTRING_DATA (luser); | 369 str = XSTRING_DATA (luser); |
370 sprintf (buf, "%-8s ", str); | 370 sprintf (buf, "%-8s ", str); |
371 } | 371 } |
372 eicat_raw (puta, (Intbyte *) buf, strlen (buf)); | 372 eicat_raw (puta, (Ibyte *) buf, strlen (buf)); |
373 { | 373 { |
374 CIntbyte *cptr = buf; | 374 CIbyte *cptr = buf; |
375 sprintf (buf, "%-8d ", getgid ()); | 375 sprintf (buf, "%-8d ", getgid ()); |
376 cptr += 9; | 376 cptr += 9; |
377 if (file_size > 99999999.0) | 377 if (file_size > 99999999.0) |
378 { | 378 { |
379 file_size = (file_size + 1023.0) / 1024.; | 379 file_size = (file_size + 1023.0) / 1024.; |
386 sprintf (cptr, "%8.0f ", file_size); | 386 sprintf (cptr, "%8.0f ", file_size); |
387 while (*cptr) | 387 while (*cptr) |
388 ++cptr; | 388 ++cptr; |
389 { | 389 { |
390 time_t t, now; | 390 time_t t, now; |
391 Intbyte *ctimebuf; | 391 Ibyte *ctimebuf; |
392 | 392 |
393 if ( | 393 if ( |
394 #if 0 | 394 #if 0 |
395 /* | 395 /* |
396 * This doesn't work. | 396 * This doesn't work. |
468 wildcard, full_directory_p); | 468 wildcard, full_directory_p); |
469 } | 469 } |
470 | 470 |
471 if (!NILP (switches)) | 471 if (!NILP (switches)) |
472 { | 472 { |
473 Intbyte *cptr, *cptr_end; | 473 Ibyte *cptr, *cptr_end; |
474 | 474 |
475 CHECK_STRING (switches); | 475 CHECK_STRING (switches); |
476 cptr = XSTRING_DATA (switches); | 476 cptr = XSTRING_DATA (switches); |
477 cptr_end = cptr + XSTRING_LENGTH (switches); | 477 cptr_end = cptr + XSTRING_LENGTH (switches); |
478 while (cptr < cptr_end) | 478 while (cptr < cptr_end) |
479 { | 479 { |
480 Emchar ch = charptr_emchar (cptr); | 480 Ichar ch = itext_ichar (cptr); |
481 switch (ch) | 481 switch (ch) |
482 { | 482 { |
483 case 'A': | 483 case 'A': |
484 hide_dot = 0; | 484 hide_dot = 0; |
485 break; | 485 break; |
498 break; | 498 break; |
499 case 't': | 499 case 't': |
500 sort_by = MSWINDOWS_SORT_BY_MOD_DATE; | 500 sort_by = MSWINDOWS_SORT_BY_MOD_DATE; |
501 break; | 501 break; |
502 } | 502 } |
503 INC_CHARPTR (cptr); | 503 INC_IBYTEPTR (cptr); |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 if (!NILP (wildcard)) | 507 if (!NILP (wildcard)) |
508 { | 508 { |