Removed C++ style comments.

This commit is contained in:
Gregg Mattinson 2002-06-28 17:37:34 +00:00 committed by Alexandre Julliard
parent f320e74c59
commit 88773cd403
11 changed files with 119 additions and 118 deletions

View File

@ -56,20 +56,20 @@ typedef struct tagCRYPTPROV
{ {
HMODULE hModule; HMODULE hModule;
PPROVFUNCS pFuncs; PPROVFUNCS pFuncs;
HCRYPTPROV hPrivate; //CSP's handle - Should not be given to application under any circumstances! HCRYPTPROV hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
PVTableProvStruc pVTable; PVTableProvStruc pVTable;
} CRYPTPROV, *PCRYPTPROV; } CRYPTPROV, *PCRYPTPROV;
typedef struct tagCRYPTKEY typedef struct tagCRYPTKEY
{ {
PCRYPTPROV pProvider; PCRYPTPROV pProvider;
HCRYPTKEY hPrivate; //CSP's handle - Should not be given to application under any circumstances! HCRYPTKEY hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
} CRYPTKEY, *PCRYPTKEY; } CRYPTKEY, *PCRYPTKEY;
typedef struct tagCRYPTHASH typedef struct tagCRYPTHASH
{ {
PCRYPTPROV pProvider; PCRYPTPROV pProvider;
HCRYPTHASH hPrivate; //CSP's handle - Should not be given to application under any circumstances! HCRYPTHASH hPrivate; /*CSP's handle - Should not be given to application under any circumstances!*/
} CRYPTHASH, *PCRYPTHASH; } CRYPTHASH, *PCRYPTHASH;
#define MAXPROVTYPES 999 #define MAXPROVTYPES 999

View File

@ -29,7 +29,7 @@ typedef struct _tagCHARLISTENTRY
typedef struct _tagCHARLIST typedef struct _tagCHARLIST
{ {
unsigned int nCount; // Entries Count; unsigned int nCount; /* Entries Count; */
CHARLISTENTRY *pHead; CHARLISTENTRY *pHead;
CHARLISTENTRY *pTail; CHARLISTENTRY *pTail;
} CHARLIST; } CHARLIST;

View File

@ -383,7 +383,7 @@ typedef struct
TW_INT16 dataArgType; /* DSM_Entry dataArgType parameter */ TW_INT16 dataArgType; /* DSM_Entry dataArgType parameter */
TW_INT16 message; /* DSM_Entry message parameter */ TW_INT16 message; /* DSM_Entry message parameter */
TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ TW_INT32 pDataSize; /* Size of pData (0 if NULL) */
// TW_MEMREF pData; /* Based on implementation specifics, a */ /* TW_MEMREF pData; */ /* Based on implementation specifics, a */
/* pData parameter makes no sense in this */ /* pData parameter makes no sense in this */
/* structure, but data (if provided) will be*/ /* structure, but data (if provided) will be*/
/* appended in the data block. */ /* appended in the data block. */
@ -396,7 +396,7 @@ typedef struct
TW_UINT16 returnCode; /* Thunker DsEntry return code. */ TW_UINT16 returnCode; /* Thunker DsEntry return code. */
TW_UINT16 conditionCode; /* Thunker DsEntry condition code. */ TW_UINT16 conditionCode; /* Thunker DsEntry condition code. */
TW_INT32 pDataSize; /* Size of pData (0 if NULL) */ TW_INT32 pDataSize; /* Size of pData (0 if NULL) */
// TW_MEMREF pData; /* Based on implementation specifics, a */ /* TW_MEMREF pData; */ /* Based on implementation specifics, a */
/* pData parameter makes no sense in this */ /* pData parameter makes no sense in this */
/* structure, but data (if provided) will be*/ /* structure, but data (if provided) will be*/
/* appended in the data block. */ /* appended in the data block. */
@ -660,7 +660,7 @@ typedef struct {
#define TWSS_A5 5 #define TWSS_A5 5
#define TWSS_B4 6 #define TWSS_B4 6
#define TWSS_B6 7 #define TWSS_B6 7
//#define TWSS_B 8 /*#define TWSS_B 8 */
/* Added 1.7 */ /* Added 1.7 */
#define TWSS_USLEDGER 9 #define TWSS_USLEDGER 9
#define TWSS_USEXECUTIVE 10 #define TWSS_USEXECUTIVE 10

View File

@ -159,7 +159,7 @@ typedef struct IFEntry
* an IP route table entry is unknown */ * an IP route table entry is unknown */
typedef struct IPRouteEntry { typedef struct IPRouteEntry {
unsigned long ire_addr; unsigned long ire_addr;
unsigned long ire_index; //matches if_index in IFEntry and iae_index in IPAddrEntry unsigned long ire_index; /*matches if_index in IFEntry and iae_index in IPAddrEntry */
unsigned long ire_metric; unsigned long ire_metric;
unsigned long ire_option4; unsigned long ire_option4;
unsigned long ire_option5; unsigned long ire_option5;

View File

@ -56,13 +56,13 @@ extern "C" {
#define SS_INVALID_SRB 0xE0 #define SS_INVALID_SRB 0xE0
#define SS_OLD_MANAGER 0xE1 #define SS_OLD_MANAGER 0xE1
#define SS_BUFFER_ALIGN 0xE1 // Win32 #define SS_BUFFER_ALIGN 0xE1 /* Win32 */
#define SS_ILLEGAL_MODE 0xE2 #define SS_ILLEGAL_MODE 0xE2
#define SS_NO_ASPI 0xE3 #define SS_NO_ASPI 0xE3
#define SS_FAILED_INIT 0xE4 #define SS_FAILED_INIT 0xE4
#define SS_ASPI_IS_BUSY 0xE5 #define SS_ASPI_IS_BUSY 0xE5
#define SS_BUFFER_TO_BIG 0xE6 #define SS_BUFFER_TO_BIG 0xE6
#define SS_MISMATCHED_COMPONENTS 0xE7 // DLLs/EXE version mismatch #define SS_MISMATCHED_COMPONENTS 0xE7 /* DLLs/EXE version mismatch */
#define SS_NO_ADAPTERS 0xE8 #define SS_NO_ADAPTERS 0xE8
#define SS_INSUFFICIENT_RESOURCES 0xE9 #define SS_INSUFFICIENT_RESOURCES 0xE9
#define SS_ASPI_IS_SHUTDOWN 0xEA #define SS_ASPI_IS_SHUTDOWN 0xEA
@ -101,7 +101,7 @@ extern "C" {
#define SC_GETSET_TIMEOUTS 0x08 #define SC_GETSET_TIMEOUTS 0x08
/* SRB Status.. MS defined */ /* SRB Status.. MS defined */
#define SS_SECURITY_VIOLATION 0xE2 // Replaces SS_INVALID_MODE #define SS_SECURITY_VIOLATION 0xE2 /* Replaces SS_INVALID_MODE */
/*** END DEFS */ /*** END DEFS */
#include "pshpack1.h" #include "pshpack1.h"

View File

@ -77,8 +77,8 @@ VOID LANGUAGE_LoadMenus(VOID)
LANGUAGE_UpdateWindowCaption(); LANGUAGE_UpdateWindowCaption();
/* Change Resource names */ /* Change Resource names */
// lstrcpyn(STRING_MENU_Xx + sizeof(STRING_MENU_Xx) - 3, lang, 3); /*lstrcpyn(STRING_MENU_Xx + sizeof(STRING_MENU_Xx) - 3, lang, 3);*/
// lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3); /*lstrcpyn(STRING_PAGESETUP_Xx + sizeof(STRING_PAGESETUP_Xx) - 3, lang, 3);*/
/* Create menu */ /* Create menu */
hMainMenu = LoadMenu(Globals.hInstance, MAIN_MENU); hMainMenu = LoadMenu(Globals.hInstance, MAIN_MENU);
@ -95,9 +95,10 @@ VOID LANGUAGE_LoadMenus(VOID)
Globals.hMainMenu = hMainMenu; Globals.hMainMenu = hMainMenu;
} }
//VOID LANGUAGE_DefaultHandle(WPARAM wParam) /*VOID LANGUAGE_DefaultHandle(WPARAM wParam)
//{ {
// if ((wParam >=NP_FIRST_LANGUAGE) && (wParam<=NP_LAST_LANGUAGE)) if ((wParam >=NP_FIRST_LANGUAGE) && (wParam<=NP_LAST_LANGUAGE))
// LANGUAGE_SelectByNumber(wParam - NP_FIRST_LANGUAGE); LANGUAGE_SelectByNumber(wParam - NP_FIRST_LANGUAGE);
// else printf("Unimplemented menu command %i\n", wParam); else printf("Unimplemented menu command %i\n", wParam);
//} }
*/

View File

@ -22,4 +22,4 @@
VOID LANGUAGE_UpdateWindowCaption(VOID); VOID LANGUAGE_UpdateWindowCaption(VOID);
VOID LANGUAGE_LoadMenus(VOID); VOID LANGUAGE_LoadMenus(VOID);
//VOID LANGUAGE_DefaultHandle(WPARAM wParam); /*VOID LANGUAGE_DefaultHandle(WPARAM wParam);*/

View File

@ -745,8 +745,8 @@ int NOTEPAD_MenuCommand (WPARAM wParam)
case 0x136: DIALOG_HelpNoWarranty(); break; case 0x136: DIALOG_HelpNoWarranty(); break;
case 0x137: DIALOG_HelpAboutWine(); break; case 0x137: DIALOG_HelpAboutWine(); break;
// default: /* default: */
// LANGUAGE_DefaultHandle(wParam); /* LANGUAGE_DefaultHandle(wParam); */
} }
return 0; return 0;
} }

View File

@ -22,11 +22,11 @@
void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext) void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext)
{ {
const WCHAR* end; // end of processed string const WCHAR* end; /* end of processed string */
const WCHAR* p; // search pointer const WCHAR* p; /* search pointer */
const WCHAR* s; // copy pointer const WCHAR* s; /* copy pointer */
// extract drive name /* extract drive name */
if (path[0] && path[1]==':') { if (path[0] && path[1]==':') {
if (drv) { if (drv) {
*drv++ = *path++; *drv++ = *path++;
@ -36,11 +36,11 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR*
} else if (drv) } else if (drv)
*drv = L'\0'; *drv = L'\0';
// search for end of string or stream separator /* search for end of string or stream separator */
for(end=path; *end && *end!=L':'; ) for(end=path; *end && *end!=L':'; )
end++; end++;
// search for begin of file extension /* search for begin of file extension */
for(p=end; p>path && *--p!=L'\\' && *p!=L'/'; ) for(p=end; p>path && *--p!=L'\\' && *p!=L'/'; )
if (*p == L'.') { if (*p == L'.') {
end = p; end = p;
@ -51,7 +51,7 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR*
for(s=end; *ext=*s++; ) for(s=end; *ext=*s++; )
ext++; ext++;
// search for end of directory name /* search for end of directory name */
for(p=end; p>path; ) for(p=end; p>path; )
if (*--p=='\\' || *p=='/') { if (*--p=='\\' || *p=='/') {
p++; p++;
@ -77,11 +77,11 @@ void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR*
void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext) void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext)
{ {
const CHAR* end; // end of processed string const CHAR* end; /* end of processed string */
const CHAR* p; // search pointer const CHAR* p; /* search pointer */
const CHAR* s; // copy pointer const CHAR* s; /* copy pointer */
// extract drive name /* extract drive name */
if (path[0] && path[1]==':') { if (path[0] && path[1]==':') {
if (drv) { if (drv) {
*drv++ = *path++; *drv++ = *path++;
@ -91,11 +91,11 @@ void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext)
} else if (drv) } else if (drv)
*drv = '\0'; *drv = '\0';
// search for end of string or stream separator /* search for end of string or stream separator */
for(end=path; *end && *end!=':'; ) for(end=path; *end && *end!=':'; )
end++; end++;
// search for begin of file extension /* search for begin of file extension */
for(p=end; p>path && *--p!='\\' && *p!='/'; ) for(p=end; p>path && *--p!='\\' && *p!='/'; )
if (*p == '.') { if (*p == '.') {
end = p; end = p;
@ -106,7 +106,7 @@ void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext)
for(s=end; (*ext=*s++); ) for(s=end; (*ext=*s++); )
ext++; ext++;
// search for end of directory name /* search for end of directory name */
for(p=end; p>path; ) for(p=end; p>path; )
if (*--p=='\\' || *p=='/') { if (*--p=='\\' || *p=='/') {
p++; p++;

View File

@ -25,7 +25,7 @@
#include "resource.h" #include "resource.h"
// for read_directory_unix() /* for read_directory_unix() */
#if !defined(_NO_EXTENSIONS) #if !defined(_NO_EXTENSIONS)
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -123,7 +123,7 @@ typedef struct {
HWND hwnd; HWND hwnd;
Pane left; Pane left;
Pane right; Pane right;
int focus_pane; // 0: left 1: right int focus_pane; /* 0: left 1: right */
WINDOWPLACEMENT pos; WINDOWPLACEMENT pos;
int split_pos; int split_pos;
BOOL header_wdths_ok; BOOL header_wdths_ok;
@ -186,7 +186,7 @@ static void read_directory_win(Entry* parent, LPCTSTR path)
entry->level = level; entry->level = level;
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
// hide directory entry "." /* hide directory entry "." */
if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
LPCTSTR name = entry->data.cFileName; LPCTSTR name = entry->data.cFileName;
@ -304,7 +304,7 @@ BOOL to_filetime(const time_t* t, FILETIME* ftime)
stime.wYear = tm->tm_year+1900; stime.wYear = tm->tm_year+1900;
stime.wMonth = tm->tm_mon+1; stime.wMonth = tm->tm_mon+1;
// stime.wDayOfWeek /* stime.wDayOfWeek */
stime.wDay = tm->tm_mday; stime.wDay = tm->tm_mday;
stime.wHour = tm->tm_hour; stime.wHour = tm->tm_hour;
stime.wMinute = tm->tm_min; stime.wMinute = tm->tm_min;
@ -442,7 +442,7 @@ static Entry* read_tree_unix(Root* root, LPCTSTR path, int sortOrder)
#endif #endif
// directories first... /* directories first... */
static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2) static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
{ {
int dir1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; int dir1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
@ -532,10 +532,10 @@ static int compareDate(const void* arg1, const void* arg2)
static int (*sortFunctions[])(const void* arg1, const void* arg2) = { static int (*sortFunctions[])(const void* arg1, const void* arg2) = {
compareName, // SORT_NAME compareName, /* SORT_NAME */
compareExt, // SORT_EXT compareExt, /* SORT_EXT */
compareSize, // SORT_SIZE compareSize, /* SORT_SIZE */
compareDate // SORT_DATE compareDate /* SORT_DATE */
}; };
@ -556,7 +556,7 @@ static void SortDirectory(Entry* parent, SORT_ORDER sortOrder)
for(entry=parent->down; entry; entry=entry->next) for(entry=parent->down; entry; entry=entry->next)
*p++ = entry; *p++ = entry;
// call qsort with the appropriate compare function /* call qsort with the appropriate compare function */
qsort(array, len, sizeof(array[0]), sortFunctions[sortOrder]); qsort(array, len, sizeof(array[0]), sortFunctions[sortOrder]);
parent->down = array[0]; parent->down = array[0];
@ -686,7 +686,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path)
entry = read_tree_win(root, path, child->sortOrder); entry = read_tree_win(root, path, child->sortOrder);
} }
//@@lstrcpy(root->entry.data.cFileName, drv); /*@@lstrcpy(root->entry.data.cFileName, drv); */
wsprintf(root->entry.data.cFileName, _T("%s - %s"), drv, root->fs); wsprintf(root->entry.data.cFileName, _T("%s - %s"), drv, root->fs);
root->entry.data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY; root->entry.data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY;
@ -699,7 +699,7 @@ static ChildWnd* alloc_child_window(LPCTSTR path)
} }
// recursively free all child entries /* recursively free all child entries */
static void free_entries(Entry* parent) static void free_entries(Entry* parent)
{ {
Entry *entry, *next=parent->down; Entry *entry, *next=parent->down;
@ -717,7 +717,7 @@ static void free_entries(Entry* parent)
} }
} }
// free all memory associated with a child window /* free all memory associated with a child window */
static void free_child_window(ChildWnd* child) static void free_child_window(ChildWnd* child)
{ {
free_entries(&child->root.entry); free_entries(&child->root.entry);
@ -725,7 +725,7 @@ static void free_child_window(ChildWnd* child)
} }
// get full path of specified directory entry /* get full path of specified directory entry */
static void get_path(Entry* dir, PTSTR path) static void get_path(Entry* dir, PTSTR path)
{ {
Entry* entry; Entry* entry;
@ -907,7 +907,7 @@ static struct FullScreenParameters {
RECT orgPos; RECT orgPos;
BOOL wasZoomed; BOOL wasZoomed;
} g_fullscreen = { } g_fullscreen = {
FALSE // mode FALSE /* mode */
}; };
void frame_get_clientspace(HWND hwnd, PRECT prect) void frame_get_clientspace(HWND hwnd, PRECT prect)
@ -1018,7 +1018,7 @@ BOOL activate_drive_window(LPCTSTR path)
_tsplitpath(path, drv1, 0, 0, 0); _tsplitpath(path, drv1, 0, 0, 0);
// search for a already open window for the same drive /* search for a already open window for the same drive */
for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) { for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
ChildWnd* child = (ChildWnd*) GetWindowLong(child_wnd, GWL_USERDATA); ChildWnd* child = (ChildWnd*) GetWindowLong(child_wnd, GWL_USERDATA);
@ -1077,7 +1077,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
return 0; return 0;
} }
GetCurrentDirectory(MAX_PATH, path); //@@ letztes Verzeichnis pro Laufwerk speichern GetCurrentDirectory(MAX_PATH, path); /*@@ letztes Verzeichnis pro Laufwerk speichern */
child = alloc_child_window(path); child = alloc_child_window(path);
if (!create_child_window(child)) if (!create_child_window(child))
@ -1158,7 +1158,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
#endif #endif
#endif #endif
//TODO: There are even more menu items! /*TODO: There are even more menu items! */
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
case ID_LICENSE: case ID_LICENSE:
@ -1187,14 +1187,14 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
case WM_SIZE: case WM_SIZE:
resize_frame(hwnd, LOWORD(lparam), HIWORD(lparam)); resize_frame(hwnd, LOWORD(lparam), HIWORD(lparam));
break; // do not pass message to DefFrameProc break; /* do not pass message to DefFrameProc */
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
case WM_GETMINMAXINFO: { case WM_GETMINMAXINFO: {
LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam; LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam;
lpmmi->ptMaxTrackSize.x <<= 1;//2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN lpmmi->ptMaxTrackSize.x <<= 1;/*2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN */
lpmmi->ptMaxTrackSize.y <<= 1;//2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN lpmmi->ptMaxTrackSize.y <<= 1;/*2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN */
break;} break;}
case FRM_CALC_CLIENT: case FRM_CALC_CLIENT:
@ -1211,7 +1211,7 @@ LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
const static LPTSTR g_pos_names[COLUMNS] = { const static LPTSTR g_pos_names[COLUMNS] = {
_T(""), // symbol _T(""), /* symbol */
_T("Name"), _T("Name"),
_T("Size"), _T("Size"),
_T("CDate"), _T("CDate"),
@ -1229,18 +1229,18 @@ const static LPTSTR g_pos_names[COLUMNS] = {
const static int g_pos_align[] = { const static int g_pos_align[] = {
0, 0,
HDF_LEFT, // Name HDF_LEFT, /* Name */
HDF_RIGHT, // Size HDF_RIGHT, /* Size */
HDF_LEFT, // CDate HDF_LEFT, /* CDate */
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
HDF_LEFT, // ADate HDF_LEFT, /* ADate */
HDF_LEFT, // MDate HDF_LEFT, /* MDate */
HDF_LEFT, // Index HDF_LEFT, /* Index */
HDF_CENTER, // Links HDF_CENTER, /* Links */
#endif #endif
HDF_CENTER, // Attributes HDF_CENTER, /* Attributes */
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
HDF_LEFT // Security HDF_LEFT /* Security */
#endif #endif
}; };
@ -1319,7 +1319,7 @@ static void init_output(HWND hwnd)
static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol); static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol);
// calculate prefered width for all visible columns /* calculate prefered width for all visible columns */
static BOOL calc_widths(Pane* pane, BOOL anyway) static BOOL calc_widths(Pane* pane, BOOL anyway)
{ {
@ -1376,11 +1376,11 @@ static BOOL calc_widths(Pane* pane, BOOL anyway)
ListBox_SetHorizontalExtent(pane->hwnd, x); ListBox_SetHorizontalExtent(pane->hwnd, x);
// no change? /* no change? */
if (!memcmp(orgWidths, pane->widths, sizeof(orgWidths))) if (!memcmp(orgWidths, pane->widths, sizeof(orgWidths)))
return FALSE; return FALSE;
// don't move, if only collapsing an entry /* don't move, if only collapsing an entry */
if (!anyway && pane->widths[0]<orgWidths[0] && if (!anyway && pane->widths[0]<orgWidths[0] &&
!memcmp(orgWidths+1, pane->widths+1, sizeof(orgWidths)-sizeof(int))) { !memcmp(orgWidths+1, pane->widths+1, sizeof(orgWidths)-sizeof(int))) {
pane->widths[0] = orgWidths[0]; pane->widths[0] = orgWidths[0];
@ -1395,7 +1395,7 @@ static BOOL calc_widths(Pane* pane, BOOL anyway)
} }
// calculate one prefered column width /* calculate one prefered column width */
static void calc_single_width(Pane* pane, int col) static void calc_single_width(Pane* pane, int col)
{ {
@ -1442,7 +1442,7 @@ static void calc_single_width(Pane* pane, int col)
} }
// insert listbox entries after index idx /* insert listbox entries after index idx */
static void insert_entries(Pane* pane, Entry* parent, int idx) static void insert_entries(Pane* pane, Entry* parent, int idx)
{ {
@ -1459,7 +1459,7 @@ static void insert_entries(Pane* pane, Entry* parent, int idx)
continue; continue;
#endif #endif
// don't display entries "." and ".." in the left pane /* don't display entries "." and ".." in the left pane */
if (pane->treePane && (entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) if (pane->treePane && (entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
&& entry->data.cFileName[0]==_T('.')) && entry->data.cFileName[0]==_T('.'))
if ( if (
@ -1498,11 +1498,11 @@ static void create_tree_window(HWND parent, Pane* pane, int id, int id_header)
SendMessage(pane->hwnd, WM_SETFONT, (WPARAM)Globals.hfont, FALSE); SendMessage(pane->hwnd, WM_SETFONT, (WPARAM)Globals.hfont, FALSE);
// insert entries into listbox /* insert entries into listbox */
if (entry) if (entry)
insert_entries(pane, entry, -1); insert_entries(pane, entry, -1);
// calculate column widths /* calculate column widths */
if (!s_init) { if (!s_init) {
s_init = 1; s_init = 1;
init_output(pane->hwnd); init_output(pane->hwnd);
@ -1576,7 +1576,7 @@ static void calc_tabbed_width(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR
DrawTextEx(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_NOPREFIX|DT_EXPANDTABS|DT_TABSTOP, &dtp);*/ DrawTextEx(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_NOPREFIX|DT_EXPANDTABS|DT_TABSTOP, &dtp);*/
DrawText(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_EXPANDTABS|DT_TABSTOP|(2<<8)); DrawText(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_EXPANDTABS|DT_TABSTOP|(2<<8));
//@@ rt (0,0) ??? /*@@ rt (0,0) ??? */
if (rt.right > pane->widths[col]) if (rt.right > pane->widths[col])
pane->widths[col] = rt.right; pane->widths[col] = rt.right;
@ -1614,7 +1614,7 @@ static void output_number(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str
if (*s) if (*s)
*d++ = *s++; *d++ = *s++;
// insert number separator characters /* insert number separator characters */
pos = lstrlen(s) % 3; pos = lstrlen(s) % 3;
while(*s) while(*s)
@ -1661,7 +1661,7 @@ static int is_exe_file(LPCTSTR ext)
static int is_registered_type(LPCTSTR ext) static int is_registered_type(LPCTSTR ext)
{ {
//TODO /* TODO */
return 1; return 1;
} }
@ -1735,7 +1735,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
hrgn_org = 0; hrgn_org = 0;
} }
// HGDIOBJ holdPen = SelectObject(dis->hDC, GetStockObject(BLACK_PEN)); /* HGDIOBJ holdPen = SelectObject(dis->hDC, GetStockObject(BLACK_PEN)); */
ExtSelectClipRgn(dis->hDC, hrgn, RGN_AND); ExtSelectClipRgn(dis->hDC, hrgn, RGN_AND);
DeleteObject(hrgn); DeleteObject(hrgn);
@ -1779,7 +1779,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
SelectClipRgn(dis->hDC, hrgn_org); SelectClipRgn(dis->hDC, hrgn_org);
if (hrgn_org) DeleteObject(hrgn_org); if (hrgn_org) DeleteObject(hrgn_org);
// SelectObject(dis->hDC, holdPen); /* SelectObject(dis->hDC, holdPen); */
} else if (calcWidthCol==col || calcWidthCol==COLUMNS) { } else if (calcWidthCol==col || calcWidthCol==COLUMNS) {
int right = img_pos + IMAGE_WIDTH - Globals.spaceSize.cx; int right = img_pos + IMAGE_WIDTH - Globals.spaceSize.cx;
@ -1851,7 +1851,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
col++; col++;
// ouput file name /* ouput file name */
if (calcWidthCol == -1) if (calcWidthCol == -1)
output_text(pane, dis, col, entry->data.cFileName, 0); output_text(pane, dis, col, entry->data.cFileName, 0);
else if (calcWidthCol==col || calcWidthCol==COLUMNS) else if (calcWidthCol==col || calcWidthCol==COLUMNS)
@ -1863,7 +1863,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
if (!pane->treePane) { if (!pane->treePane) {
#endif #endif
// display file size /* display file size */
if (visible_cols & COL_SIZE) { if (visible_cols & COL_SIZE) {
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
if (!(attrs&FILE_ATTRIBUTE_DIRECTORY)) if (!(attrs&FILE_ATTRIBUTE_DIRECTORY))
@ -1871,7 +1871,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
{ {
QWORD size; QWORD size;
*(DWORD*)(&size) = entry->data.nFileSizeLow; //TODO: platform spefific *(DWORD*)(&size) = entry->data.nFileSizeLow; /*TODO: platform spefific */
*(((DWORD*)&size)+1) = entry->data.nFileSizeHigh; *(((DWORD*)&size)+1) = entry->data.nFileSizeHigh;
_stprintf(buffer, _T("%") LONGLONGARG _T("d"), size); _stprintf(buffer, _T("%") LONGLONGARG _T("d"), size);
@ -1879,13 +1879,13 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
if (calcWidthCol == -1) if (calcWidthCol == -1)
output_number(pane, dis, col, buffer); output_number(pane, dis, col, buffer);
else if (calcWidthCol==col || calcWidthCol==COLUMNS) else if (calcWidthCol==col || calcWidthCol==COLUMNS)
calc_width(pane, dis, col, buffer);//TODO: not ever time enough calc_width(pane, dis, col, buffer);/*TODO: not ever time enough */
} }
col++; col++;
} }
// display file date /* display file date */
if (visible_cols & (COL_DATE|COL_TIME)) { if (visible_cols & (COL_DATE|COL_TIME)) {
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
format_date(&entry->data.ftCreationTime, buffer, visible_cols); format_date(&entry->data.ftCreationTime, buffer, visible_cols);
@ -1913,7 +1913,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
if (entry->bhfi_valid) { if (entry->bhfi_valid) {
((DWORD*)&index)[0] = entry->bhfi.nFileIndexLow; //TODO: platform spefific ((DWORD*)&index)[0] = entry->bhfi.nFileIndexLow; /*TODO: platform spefific */
((DWORD*)&index)[1] = entry->bhfi.nFileIndexHigh; ((DWORD*)&index)[1] = entry->bhfi.nFileIndexHigh;
if (visible_cols & COL_INDEX) { if (visible_cols & COL_INDEX) {
@ -1937,7 +1937,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
col += 2; col += 2;
#endif #endif
// show file attributes /* show file attributes */
if (visible_cols & COL_ATTRIBUTES) { if (visible_cols & COL_ATTRIBUTES) {
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
_tcscpy(buffer, _T(" \t \t \t \t ")); _tcscpy(buffer, _T(" \t \t \t \t "));
@ -2002,15 +2002,15 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
} }
// draw focus frame /* draw focus frame */
if ((dis->itemState&ODS_FOCUS) && calcWidthCol==-1) { if ((dis->itemState&ODS_FOCUS) && calcWidthCol==-1) {
// Currently [04/2000] Wine neither behaves exactly the same /* Currently [04/2000] Wine neither behaves exactly the same */
// way as WIN 95 nor like Windows NT... /* way as WIN 95 nor like Windows NT... */
HGDIOBJ lastBrush; HGDIOBJ lastBrush;
HPEN lastPen; HPEN lastPen;
HPEN hpen; HPEN hpen;
if (!(GetVersion() & 0x80000000)) { // Windows NT? if (!(GetVersion() & 0x80000000)) { /* Windows NT? */
LOGBRUSH lb = {PS_SOLID, RGB(255,255,255)}; LOGBRUSH lb = {PS_SOLID, RGB(255,255,255)};
hpen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, 0); hpen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, 0);
} else } else
@ -2090,7 +2090,7 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
RECT clnt; RECT clnt;
GetClientRect(pane->hwnd, &clnt); GetClientRect(pane->hwnd, &clnt);
// move immediate to simulate HDS_FULLDRAG (for now [04/2000] not realy needed with WINELIB) /* move immediate to simulate HDS_FULLDRAG (for now [04/2000] not realy needed with WINELIB) */
Header_SetItem(pane->hwndHeader, idx, phdn->pitem); Header_SetItem(pane->hwndHeader, idx, phdn->pitem);
pane->widths[idx] += dx; pane->widths[idx] += dx;
@ -2147,7 +2147,7 @@ static void scan_entry(ChildWnd* child, Entry* entry)
int idx = ListBox_GetCurSel(child->left.hwnd); int idx = ListBox_GetCurSel(child->left.hwnd);
HCURSOR crsrOld = SetCursor(LoadCursor(0, IDC_WAIT)); HCURSOR crsrOld = SetCursor(LoadCursor(0, IDC_WAIT));
// delete sub entries in left pane /* delete sub entries in left pane */
for(;;) { for(;;) {
LRESULT res = ListBox_GetItemData(child->left.hwnd, idx+1); LRESULT res = ListBox_GetItemData(child->left.hwnd, idx+1);
Entry* sub = (Entry*) res; Entry* sub = (Entry*) res;
@ -2158,17 +2158,17 @@ static void scan_entry(ChildWnd* child, Entry* entry)
ListBox_DeleteString(child->left.hwnd, idx+1); ListBox_DeleteString(child->left.hwnd, idx+1);
} }
// empty right pane /* empty right pane */
ListBox_ResetContent(child->right.hwnd); ListBox_ResetContent(child->right.hwnd);
// release memory /* release memory */
free_entries(entry); free_entries(entry);
// read contents from disk /* read contents from disk */
get_path(entry, path); get_path(entry, path);
read_directory(entry, path, child->sortOrder); read_directory(entry, path, child->sortOrder);
// insert found entries in right pane /* insert found entries in right pane */
insert_entries(&child->right, entry->down, -1); insert_entries(&child->right, entry->down, -1);
calc_widths(&child->right, FALSE); calc_widths(&child->right, FALSE);
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
@ -2181,7 +2181,7 @@ static void scan_entry(ChildWnd* child, Entry* entry)
} }
// expand a directory entry /* expand a directory entry */
static BOOL expand_entry(ChildWnd* child, Entry* dir) static BOOL expand_entry(ChildWnd* child, Entry* dir)
{ {
@ -2201,7 +2201,7 @@ static BOOL expand_entry(ChildWnd* child, Entry* dir)
p = p->next; p = p->next;
} }
// no subdirectories ? /* no subdirectories ? */
if (!(p->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) if (!(p->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
return FALSE; return FALSE;
@ -2209,7 +2209,7 @@ static BOOL expand_entry(ChildWnd* child, Entry* dir)
dir->expanded = TRUE; dir->expanded = TRUE;
// insert entries in left pane /* insert entries in left pane */
insert_entries(&child->left, p, idx); insert_entries(&child->left, p, idx);
if (!child->header_wdths_ok) { if (!child->header_wdths_ok) {
@ -2232,7 +2232,7 @@ static void collapse_entry(Pane* pane, Entry* dir)
ShowWindow(pane->hwnd, SW_HIDE); ShowWindow(pane->hwnd, SW_HIDE);
// hide sub entries /* hide sub entries */
for(;;) { for(;;) {
LRESULT res = ListBox_GetItemData(pane->hwnd, idx+1); LRESULT res = ListBox_GetItemData(pane->hwnd, idx+1);
Entry* sub = (Entry*) res; Entry* sub = (Entry*) res;
@ -2318,7 +2318,7 @@ static void activate_entry(ChildWnd* child, Pane* pane)
} }
} else { } else {
//TODO: start program, open document... /*TODO: start program, open document... */
} }
} }
@ -2363,7 +2363,7 @@ static BOOL pane_command(Pane* pane, UINT cmd)
break;} break;}
#endif #endif
// TODO: more command ids... /* TODO: more command ids... */
default: default:
return FALSE; return FALSE;
@ -2529,8 +2529,8 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
{LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam; {LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam;
lpmmi->ptMaxTrackSize.x <<= 1;//2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN lpmmi->ptMaxTrackSize.x <<= 1;/*2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN */
lpmmi->ptMaxTrackSize.y <<= 1;//2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN lpmmi->ptMaxTrackSize.y <<= 1;/*2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN */
break;} break;}
#endif #endif
@ -2594,7 +2594,7 @@ LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam
case WM_SIZE: case WM_SIZE:
if (wparam != SIZE_MINIMIZED) if (wparam != SIZE_MINIMIZED)
resize_tree(child, LOWORD(lparam), HIWORD(lparam)); resize_tree(child, LOWORD(lparam), HIWORD(lparam));
// fall through /* fall through */
default: def: default: def:
return DefMDIChildProc(hwnd, nmsg, wparam, lparam); return DefMDIChildProc(hwnd, nmsg, wparam, lparam);
@ -2620,12 +2620,12 @@ LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
case WM_SETFOCUS: case WM_SETFOCUS:
child->focus_pane = pane==&child->right? 1: 0; child->focus_pane = pane==&child->right? 1: 0;
ListBox_SetSel(hwnd, TRUE, 1); ListBox_SetSel(hwnd, TRUE, 1);
//TODO: check menu items /*TODO: check menu items */
break; break;
case WM_KEYDOWN: case WM_KEYDOWN:
if (wparam == VK_TAB) { if (wparam == VK_TAB) {
//TODO: SetFocus(Globals.hdrivebar) /*TODO: SetFocus(Globals.hdrivebar) */
SetFocus(child->focus_pane? child->left.hwnd: child->right.hwnd); SetFocus(child->focus_pane? child->left.hwnd: child->right.hwnd);
} }
} }
@ -2702,7 +2702,7 @@ static void InitInstance(HINSTANCE hinstance)
Globals.hInstance = hinstance; Globals.hInstance = hinstance;
// create main window /* create main window */
Globals.hMainWnd = CreateWindowEx(0, (LPCTSTR)(int)hframeClass, _T("Wine File"), WS_OVERLAPPEDWINDOW, Globals.hMainWnd = CreateWindowEx(0, (LPCTSTR)(int)hframeClass, _T("Wine File"), WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
0/*hWndParent*/, Globals.hMenuFrame, hinstance, 0/*lpParam*/); 0/*hWndParent*/, Globals.hMenuFrame, hinstance, 0/*lpParam*/);
@ -2732,7 +2732,7 @@ static void InitInstance(HINSTANCE hinstance)
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
#ifdef __linux__ #ifdef __linux__
// insert unix file system button /* insert unix file system button */
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)_T("/\0")); SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)_T("/\0"));
drivebarBtn.idCommand = ID_DRIVE_UNIX_FS; drivebarBtn.idCommand = ID_DRIVE_UNIX_FS;
@ -2740,7 +2740,7 @@ static void InitInstance(HINSTANCE hinstance)
drivebarBtn.iString++; drivebarBtn.iString++;
#endif #endif
// register windows drive root strings /* register windows drive root strings */
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)Globals.drives); SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)Globals.drives);
#endif #endif
@ -2748,7 +2748,7 @@ static void InitInstance(HINSTANCE hinstance)
for(p=Globals.drives; *p; ) { for(p=Globals.drives; *p; ) {
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
// insert drive letter /* insert drive letter */
TCHAR b[3] = {tolower(*p)}; TCHAR b[3] = {tolower(*p)};
SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)b); SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)b);
#endif #endif
@ -2793,7 +2793,7 @@ static void InitInstance(HINSTANCE hinstance)
WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_BORDER|CCS_NODIVIDER, 0,0,0,0, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_BORDER|CCS_NODIVIDER, 0,0,0,0,
Globals.hMainWnd, (HMENU)IDW_STATUSBAR, hinstance, 0);*/ Globals.hMainWnd, (HMENU)IDW_STATUSBAR, hinstance, 0);*/
//TODO: read paths and window placements from registry /*TODO: read paths and window placements from registry */
GetCurrentDirectory(MAX_PATH, path); GetCurrentDirectory(MAX_PATH, path);
child = alloc_child_window(path); child = alloc_child_window(path);
@ -2821,7 +2821,7 @@ void ExitInstance()
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
// search for already running win[e]files /* search for already running win[e]files */
static int g_foundPrevInstance = 0; static int g_foundPrevInstance = 0;
@ -2850,7 +2850,7 @@ int APIENTRY WinMain(HINSTANCE hinstance,
MSG msg; MSG msg;
#ifdef _NO_EXTENSIONS #ifdef _NO_EXTENSIONS
// allow only one running instance /* allow only one running instance */
EnumWindows(EnumWndProc, (LPARAM)WINEFILEFRAME); EnumWindows(EnumWndProc, (LPARAM)WINEFILEFRAME);
if (g_foundPrevInstance) if (g_foundPrevInstance)
@ -2860,7 +2860,7 @@ int APIENTRY WinMain(HINSTANCE hinstance,
InitInstance(hinstance); InitInstance(hinstance);
if (cmdshow == SW_SHOWNORMAL) { if (cmdshow == SW_SHOWNORMAL) {
//TODO: read window placement from registry /*TODO: read window placement from registry */
cmdshow = SW_MAXIMIZE; cmdshow = SW_MAXIMIZE;
} }

View File

@ -80,7 +80,7 @@ enum IMAGE {
#define IDW_STATUSBAR 0x100 #define IDW_STATUSBAR 0x100
#define IDW_TOOLBAR 0x101 #define IDW_TOOLBAR 0x101
#define IDW_DRIVEBAR 0x102 #define IDW_DRIVEBAR 0x102
#define IDW_FIRST_CHILD 0xC000 //0x200 #define IDW_FIRST_CHILD 0xC000 /*0x200*/
#define IDW_TREE_LEFT 3 #define IDW_TREE_LEFT 3
#define IDW_TREE_RIGHT 6 #define IDW_TREE_RIGHT 6
@ -128,7 +128,7 @@ typedef struct
HIMAGELIST himl; HIMAGELIST himl;
TCHAR drives[BUFFER_LEN]; TCHAR drives[BUFFER_LEN];
BOOL prescan_node; //TODO BOOL prescan_node; /*TODO*/
UINT wStringTableOffset; UINT wStringTableOffset;
} WINEFILE_GLOBALS; } WINEFILE_GLOBALS;