comparison src/dialog-msw.c @ 2421:ab71ad6ff3dd

[xemacs-hg @ 2004-12-06 03:50:53 by ben] (none) README.packages: Document use of --package-prefix. Fix error in specifying standard package location. make-docfile.c: Use QXE_PATH_MAX. info.el: Correct doc string giving example package path. menubar-items.el: Move Prefix Rectangle command up one level. xemacs/packages.texi: Add long form of Lisp Reference Manual to links. Add links pointing to Lisp Reference Manual for more detailed package discussion. lispref/range-tables.texi: Document range-table changes. internals/internals.texi: Update history section. elhash.c, elhash.h, profile.c: Create inchash_eq() to allow direct incrementing of hash-table entry. Use in profile.c to try to reduce profiling overhead. Increase initial size of profile hash tables to reduce profiling overhead. buffer.c, device-msw.c, dialog-msw.c, dired-msw.c, editfns.c, event-msw.c, events.c, glyphs-msw.c, keymap.c, objects-msw.c, process-nt.c, syswindows.h, text.c, text.h, unexnt.c: Rename xetcs* -> qxetcs* for consistency with qxestr*. Rename ei*_c(_*) -> ei*_ascii(_*) since they work with ASCII-only strings not "C strings", whatever those are. This is the last place where "c" was incorrectly being used for "ascii". dialog-msw.c, dumper.c, event-msw.c, fileio.c, glyphs-gtk.c, glyphs-x.c, nt.c, process-nt.c, realpath.c, sysdep.c, sysfile.h, unexcw.c, unexnext.c, unexnt.c: Try to avoid differences in systems that do or do not include final null byte in PATH_MAX. Create PATH_MAX_INTERNAL and PATH_MAX_EXTERNAL and use them everywhere. Rewrite code in dumper.c to avoid use of PATH_MAX. When necessary in nt.c, use _MAX_PATH instead of MAX_PATH to be consistent with other places. text.c: Code to short-circuit when binary or Unicode was not working due to EOL wrapping. Fix this code to work when either no EOL autodetection or no CR's or LF's in the text. lisp.h, rangetab.c, rangetab.h, regex.c, search.c: Implement different types of ranges (open/closed start and end). Change default to be start-closed, end-open.
author ben
date Mon, 06 Dec 2004 03:52:23 +0000
parents ecf1ebac70d8
children 6fa9919a9a0b
comparison
equal deleted inserted replaced
2420:ad56e5a6d09f 2421:ab71ad6ff3dd
1 /* Implements elisp-programmable dialog boxes -- MS Windows interface. 1 /* Implements elisp-programmable dialog boxes -- MS Windows interface.
2 Copyright (C) 1998 Kirill M. Katsnelson <kkm@kis.ru> 2 Copyright (C) 1998 Kirill M. Katsnelson <kkm@kis.ru>
3 Copyright (C) 2000, 2001, 2002, 2003 Ben Wing. 3 Copyright (C) 2000, 2001, 2002, 2003, 2004 Ben Wing.
4 4
5 This file is part of XEmacs. 5 This file is part of XEmacs.
6 6
7 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
342 342
343 static int 343 static int
344 CALLBACK handle_directory_proc (HWND hwnd, UINT msg, 344 CALLBACK handle_directory_proc (HWND hwnd, UINT msg,
345 LPARAM lParam, LPARAM lpData) 345 LPARAM lParam, LPARAM lpData)
346 { 346 {
347 Extbyte szDir[MAX_PATH * MAX_XETCHAR_SIZE]; 347 Extbyte szDir[PATH_MAX_EXTERNAL];
348 struct param_data *pd = (struct param_data *) lpData; 348 struct param_data *pd = (struct param_data *) lpData;
349 349
350 switch (msg) 350 switch (msg)
351 { 351 {
352 case BFFM_INITIALIZED: 352 case BFFM_INITIALIZED:
363 363
364 case BFFM_VALIDATEFAILED: 364 case BFFM_VALIDATEFAILED:
365 if (pd->validate) 365 if (pd->validate)
366 return TRUE; 366 return TRUE;
367 else 367 else
368 pd->unknown_fname = xetcsdup ((Extbyte *) lParam); 368 pd->unknown_fname = qxetcsdup ((Extbyte *) lParam);
369 break; 369 break;
370 370
371 default: 371 default:
372 break; 372 break;
373 } 373 }
428 if (SHGetMalloc (&pMalloc) == NOERROR) 428 if (SHGetMalloc (&pMalloc) == NOERROR)
429 { 429 {
430 pidl = qxeSHBrowseForFolder (&bi); 430 pidl = qxeSHBrowseForFolder (&bi);
431 if (pidl) 431 if (pidl)
432 { 432 {
433 Extbyte *szDir = alloca_extbytes (MAX_PATH * MAX_XETCHAR_SIZE); 433 Extbyte *szDir = alloca_extbytes (PATH_MAX_EXTERNAL);
434 434
435 if (qxeSHGetPathFromIDList (pidl, szDir)) 435 if (qxeSHGetPathFromIDList (pidl, szDir))
436 ret = tstr_to_local_file_format (szDir); 436 ret = tstr_to_local_file_format (szDir);
437 437
438 XECOMCALL1 (pMalloc, Free, pidl); 438 XECOMCALL1 (pMalloc, Free, pidl);
464 ofn.lStructSize = sizeof (ofn); 464 ofn.lStructSize = sizeof (ofn);
465 ofn.Flags = OFN_EXPLORER; 465 ofn.Flags = OFN_EXPLORER;
466 ofn.hwndOwner = FRAME_MSWINDOWS_HANDLE (f); 466 ofn.hwndOwner = FRAME_MSWINDOWS_HANDLE (f);
467 ofn.lpstrFile = (XELPTSTR) fnbuf; 467 ofn.lpstrFile = (XELPTSTR) fnbuf;
468 ofn.nMaxFile = sizeof (fnbuf) / XETCHAR_SIZE; 468 ofn.nMaxFile = sizeof (fnbuf) / XETCHAR_SIZE;
469 xetcscpy (fnbuf, XETEXT ("")); 469 qxetcscpy (fnbuf, XETEXT (""));
470 470
471 LOCAL_FILE_FORMAT_TO_TSTR (Fexpand_file_name (build_string (""), Qnil), 471 LOCAL_FILE_FORMAT_TO_TSTR (Fexpand_file_name (build_string (""), Qnil),
472 ofn.lpstrInitialDir); 472 ofn.lpstrInitialDir);
473 473
474 { 474 {
478 { 478 {
479 Extbyte *fnout; 479 Extbyte *fnout;
480 480
481 CHECK_STRING (value); 481 CHECK_STRING (value);
482 LOCAL_FILE_FORMAT_TO_TSTR (value, fnout); 482 LOCAL_FILE_FORMAT_TO_TSTR (value, fnout);
483 xetcscpy (fnbuf, fnout); 483 qxetcscpy (fnbuf, fnout);
484 } 484 }
485 else if (EQ (key, Q_title)) 485 else if (EQ (key, Q_title))
486 { 486 {
487 CHECK_STRING (value); 487 CHECK_STRING (value);
488 LISP_STRING_TO_TSTR (value, ofn.lpstrTitle); 488 LISP_STRING_TO_TSTR (value, ofn.lpstrTitle);