From 084abf83af60fa6ea208f89777ab6026c2ac25cb Mon Sep 17 00:00:00 2001 From: sje Date: Fri, 2 Feb 2007 14:45:38 +0000 Subject: git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@108 4f64403b-2f21-0410-a795-97e2b3489a10 --- clist_classic_sje/Makefile | 53 -- clist_classic_sje/backup.c | 256 ------- clist_classic_sje/database.c | 218 ------ clist_classic_sje/database.h | 214 ------ clist_classic_sje/db3x.dep | 56 -- clist_classic_sje/db3x.dsp | 239 ------- clist_classic_sje/db3x.dsw | 29 - clist_classic_sje/db3x.mak | 471 ------------- clist_classic_sje/db3x.vcproj | 795 ---------------------- clist_classic_sje/db3x_8.sln | 23 - clist_classic_sje/db3x_8.vcproj | 811 ----------------------- clist_classic_sje/dbcache.c | 229 ------- clist_classic_sje/dbcontacts.c | 270 -------- clist_classic_sje/dbevents.c | 440 ------------ clist_classic_sje/dbheaders.c | 78 --- clist_classic_sje/dbmodulechain.c | 132 ---- clist_classic_sje/dbsettings.c | 957 --------------------------- clist_classic_sje/dbtime.c | 163 ----- clist_classic_sje/docs/clist-license.txt | 340 ---------- clist_classic_sje/docs/clist-readme.txt | 38 -- clist_classic_sje/docs/clist-translation.txt | 216 ------ clist_classic_sje/docs/db3x-license.txt | 340 ---------- clist_classic_sje/docs/db3x-readme.txt | 38 -- clist_classic_sje/docs/db3x-translation.txt | 43 -- clist_classic_sje/encrypt.c | 67 -- clist_classic_sje/encryption.h | 23 - clist_classic_sje/finalcommand.c | 58 -- clist_classic_sje/icon1.ico | Bin 318 -> 0 bytes clist_classic_sje/options.c | 384 ----------- clist_classic_sje/options.h | 42 -- clist_classic_sje/res/blank.ico | Bin 318 -> 0 bytes clist_classic_sje/res/delete.ico | Bin 1406 -> 0 bytes clist_classic_sje/res/dragcopy.cur | Bin 326 -> 0 bytes clist_classic_sje/res/dropuser.cur | Bin 1086 -> 0 bytes clist_classic_sje/res/hyperlin.cur | Bin 326 -> 0 bytes clist_classic_sje/res/rename.ico | Bin 1406 -> 0 bytes clist_classic_sje/resource.h | 559 +++++++++++++++- clist_classic_sje/sync.bat | 4 - 38 files changed, 534 insertions(+), 7052 deletions(-) delete mode 100644 clist_classic_sje/Makefile delete mode 100644 clist_classic_sje/backup.c delete mode 100644 clist_classic_sje/database.c delete mode 100644 clist_classic_sje/database.h delete mode 100644 clist_classic_sje/db3x.dep delete mode 100644 clist_classic_sje/db3x.dsp delete mode 100644 clist_classic_sje/db3x.dsw delete mode 100644 clist_classic_sje/db3x.mak delete mode 100644 clist_classic_sje/db3x.vcproj delete mode 100644 clist_classic_sje/db3x_8.sln delete mode 100644 clist_classic_sje/db3x_8.vcproj delete mode 100644 clist_classic_sje/dbcache.c delete mode 100644 clist_classic_sje/dbcontacts.c delete mode 100644 clist_classic_sje/dbevents.c delete mode 100644 clist_classic_sje/dbheaders.c delete mode 100644 clist_classic_sje/dbmodulechain.c delete mode 100644 clist_classic_sje/dbsettings.c delete mode 100644 clist_classic_sje/dbtime.c delete mode 100644 clist_classic_sje/docs/clist-license.txt delete mode 100644 clist_classic_sje/docs/clist-readme.txt delete mode 100644 clist_classic_sje/docs/clist-translation.txt delete mode 100644 clist_classic_sje/docs/db3x-license.txt delete mode 100644 clist_classic_sje/docs/db3x-readme.txt delete mode 100644 clist_classic_sje/docs/db3x-translation.txt delete mode 100644 clist_classic_sje/encrypt.c delete mode 100644 clist_classic_sje/encryption.h delete mode 100644 clist_classic_sje/finalcommand.c delete mode 100644 clist_classic_sje/icon1.ico delete mode 100644 clist_classic_sje/options.c delete mode 100644 clist_classic_sje/options.h delete mode 100644 clist_classic_sje/res/blank.ico delete mode 100644 clist_classic_sje/res/delete.ico delete mode 100644 clist_classic_sje/res/dragcopy.cur delete mode 100644 clist_classic_sje/res/dropuser.cur delete mode 100644 clist_classic_sje/res/hyperlin.cur delete mode 100644 clist_classic_sje/res/rename.ico delete mode 100644 clist_classic_sje/sync.bat diff --git a/clist_classic_sje/Makefile b/clist_classic_sje/Makefile deleted file mode 100644 index 5a75630..0000000 --- a/clist_classic_sje/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -SRC = commonheaders.c \ - database.c \ - dbcache.c \ - dbcontacts.c \ - dbevents.c \ - dbheaders.c \ - dbini.c \ - dblists.c \ - dbmodulechain.c \ - dbsettings.c \ - dbtime.c \ - encrypt.c \ - init.c -OBJ = $(SRC:.c=.o) -RES = resource.res -LIB = -lgdi32 -lversion -lcomctl32 -lcomdlg32 -lole32 - -CC = gcc -RC = windres -RM = rm - -# Install location -ifdef DEBUG -BIN = ..\..\bin\debug\plugins\dbx_3x.dll -else -BIN = ..\..\bin\release\plugins\dbx_3x.dll -endif - -# Defines -DEFINES = -DWIN32 -D__SEH_NOOP -ifdef DEBUG -DEFINES := $(DEFINES) -D_DEBUG -endif - -# Flags -LFLAGS = -shared -RCFLAGS = --input-format rc --output-format coff -ifdef DEBUG -CFLAGS = -g $(DEFINES) -I../../include -else -CFLAGS = -O1 $(DEFINES) -I../../include -endif - -# Targets -all : $(OBJ) $(RES) - $(CC) $(LFLAGS) $(CFLAGS) -o $(BIN) $(OBJ) $(RES) $(LIB) -Wl - -$(RES) : $(RES:.res=.rc) $(RES:.res=.h) Makefile - $(RC) $(RCFLAGS) -o $(RES) -i $(RES:.res=.rc) - -clean : - $(RM) -f $(OBJ) $(RES) - diff --git a/clist_classic_sje/backup.c b/clist_classic_sje/backup.c deleted file mode 100644 index 8eb26da..0000000 --- a/clist_classic_sje/backup.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" -#include "options.h" - -#define SHOW_PROGRESS_TIME 1000 // show progress window when backup time exceeds this many milliseconds - -extern HANDLE hDbFile; -extern CRITICAL_SECTION csDbAccess; -extern HINSTANCE g_hInst; - -extern Options options; - -struct DBHeader dbHeader; - -UINT timer_id = 0; - - -BOOL CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) { - case WM_INITDIALOG: - { - HWND prog = GetDlgItem(hwndDlg, IDC_PROGRESS); - - TranslateDialogDefault( hwndDlg ); - - SendMessage(prog, PBM_SETPOS, 0, 0); - } - break; - case WM_COMMAND: - if ( HIWORD( wParam ) == BN_CLICKED ) { - switch( LOWORD( wParam )) { - case IDCANCEL: - // in the progress dialog, use the user data to indicate that the user has pressed cancel - SetWindowLong(hwndDlg, GWL_USERDATA, (LONG)1); - return TRUE; - } - } - break; - } - return FALSE; -} - -int RotateBackups(HWND progress_dialog, DWORD start_time) { - char num1[4], num2[4]; - char backupfilename1[MAX_PATH], backupfilename2[MAX_PATH]; - int i; - HWND prog = GetDlgItem(progress_dialog, IDC_PROGRESS); - MSG msg; - - // delete the last file, so that the rest can be rename operations - strcpy(backupfilename1, options.folder); - strcat(backupfilename1, "\\db_backup"); - itoa(options.num_backups - 1, num1, 10); - strcat(backupfilename1, num1); - strcat(backupfilename1, ".dat"); - DeleteFile(backupfilename1); - - for(i = options.num_backups - 1; i > 0 && GetWindowLong(progress_dialog, GWL_USERDATA) == 0; i--) { - strcpy(backupfilename1, options.folder); - strcat(backupfilename1, "\\db_backup"); - itoa(i - 1, num1, 10); - strcat(backupfilename1, num1); - strcat(backupfilename1, ".dat"); - - strcpy(backupfilename2, options.folder); - strcat(backupfilename2, "\\db_backup"); - itoa(i, num2, 10); - strcat(backupfilename2, num2); - strcat(backupfilename2, ".dat"); - - MoveFile(backupfilename1, backupfilename2); - - if(GetTickCount() - start_time >= SHOW_PROGRESS_TIME) - ShowWindow(progress_dialog, SW_SHOW); - - while(PeekMessage(&msg, progress_dialog, 0, 0, PM_REMOVE) != 0) { - if(!IsDialogMessage(progress_dialog, &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - SendMessage(prog, PBM_SETPOS, (WPARAM)(int)(100 * (options.num_backups - i) / options.num_backups), 0); - UpdateWindow(progress_dialog); - - } - - return 0; -} - -int Backup() { - HANDLE hBackupFile; - char backup_filename[MAX_PATH]; - char buff[8192]; - DWORD bytes_read, bytes_written, file_size, total_bytes_copied = 0; - HWND progress_dialog = 0, prog; - MSG msg; - - DWORD start_time = GetTickCount(); - - // ensure the backup folder exists (either create it or return non-zero signifying error) - if(!CreateDirectory(options.folder, 0)) { - DWORD err = GetLastError(); - if(err != ERROR_ALREADY_EXISTS) { - return 1; - } - } - - if(!options.disable_progress) { - progress_dialog = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_COPYPROGRESS), 0, DlgProcProgress); - prog = GetDlgItem(progress_dialog, IDC_PROGRESS); - SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, Translate("Rotating backup files...")); - } - - - RotateBackups(progress_dialog, start_time); - - strcpy(backup_filename, options.folder); - strcat(backup_filename, "\\db_backup0.dat"); - - hBackupFile = CreateFile(backup_filename, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - - if(hBackupFile != INVALID_HANDLE_VALUE) { - if(!options.disable_progress) { - SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, Translate("Copying database file...")); - SendMessage(prog, PBM_SETPOS, (WPARAM)(int)(0), 0); - UpdateWindow(progress_dialog); - } - - EnterCriticalSection(&csDbAccess); - - file_size = GetFileSize(hDbFile, 0); - - if(file_size == 0) { - LeaveCriticalSection(&csDbAccess); - CloseHandle(hBackupFile); - DestroyWindow(progress_dialog); - return 1; - } - - SetFilePointer(hDbFile, sizeof(dbHeader), 0, FILE_BEGIN); - - if(WriteFile(hBackupFile,&dbHeader,sizeof(dbHeader),&bytes_written,NULL) == TRUE) { - total_bytes_copied += bytes_written; - if(!options.disable_progress) { - SendMessage(prog, PBM_SETPOS, (WPARAM)(int)(100.0 * total_bytes_copied / file_size), 0); - UpdateWindow(progress_dialog); - } - } else { - LeaveCriticalSection(&csDbAccess); - CloseHandle(hBackupFile); - DestroyWindow(progress_dialog); - return 1; - } - - while(ReadFile(hDbFile, buff, sizeof(buff), &bytes_read, 0) == TRUE && bytes_read > 0 - && GetWindowLong(progress_dialog, GWL_USERDATA) == 0) - { - if(!WriteFile(hBackupFile, buff, bytes_read, &bytes_written, 0)) { - LeaveCriticalSection(&csDbAccess); - CloseHandle(hBackupFile); - DestroyWindow(progress_dialog); - return 1; - } - total_bytes_copied += bytes_written; - - if(!options.disable_progress) { - - if(GetTickCount() - start_time >= SHOW_PROGRESS_TIME) - ShowWindow(progress_dialog, SW_SHOW); - - - while(PeekMessage(&msg, progress_dialog, 0, 0, PM_REMOVE) != 0) { - if(!IsDialogMessage(progress_dialog, &msg)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - SendMessage(prog, PBM_SETPOS, (WPARAM)(int)(100.0 * total_bytes_copied / file_size), 0); - UpdateWindow(progress_dialog); - } - } - LeaveCriticalSection(&csDbAccess); - - CloseHandle(hBackupFile); - - if(!options.disable_progress && GetWindowLong(progress_dialog, GWL_USERDATA) != 0) - DeleteFile(backup_filename); - else - DBWriteContactSettingDword(0, "db3x", "LastBackupTimestamp", (DWORD)time(0)); - - if(!options.disable_progress) - DestroyWindow(progress_dialog); - - return 0; - } - - DestroyWindow(progress_dialog); - return 1; -} - -VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { - time_t t = time(0), diff = t - (time_t)DBGetContactSettingDword(0, "db3x", "LastBackupTimestamp", (DWORD)t); - if(diff > (time_t)(options.period * (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24))) - Backup(); -} - -int SetBackupTimer(void) { - - if(options.backup_types & BT_PERIODIC) { - if(timer_id == 0) { - time_t t = time(0), diff = t - (time_t)DBGetContactSettingDword(0, "db3x", "LastBackupTimestamp", (DWORD)t); - if(diff > (time_t)(options.period * (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24))) - Backup(); - - timer_id = SetTimer(0, 0, 1000 * 60 * 60, TimerProc); - } - } else { - if(timer_id != 0) { - KillTimer(0, timer_id); - timer_id = 0; - } - } - - - return 0; -} - -int BackupService(WPARAM wParam, LPARAM lParam) { - return Backup(); -} \ No newline at end of file diff --git a/clist_classic_sje/database.c b/clist_classic_sje/database.c deleted file mode 100644 index 2d815dc..0000000 --- a/clist_classic_sje/database.c +++ /dev/null @@ -1,218 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -#include "commonheaders.h" -#include "database.h" - -int ProfileManager(char *szDbDest,int cbDbDest); -int ShouldAutoCreate(void); -int CreateDbHeaders(HANDLE hFile); -int InitialiseDbHeaders(void); -int InitSettings(void); -void UninitSettings(void); -int InitContacts(void); -void UninitContacts(void); -int InitEvents(void); -void UninitEvents(void); -int InitCrypt(void); -int InitTime(void); -int InitModuleNames(void); -void UninitModuleNames(void); -int InitCache(void); -void UninitCache(void); -int InitIni(void); -void UninitIni(void); - -int InitOptions(void); -void UninitOptions(void); - -void FinalCommandSetup(void); -void FinalCommandExecute(void); - -HANDLE hDbFile=INVALID_HANDLE_VALUE; -CRITICAL_SECTION csDbAccess; -struct DBHeader dbHeader; -char szDbPath[MAX_PATH]; - -BOOL bUnloading=FALSE; - -static void UnloadDatabase(void) -{ - CloseHandle(hDbFile); -} - -DWORD CreateNewSpace(int bytes) -{ - DWORD ofsNew; - - ofsNew=dbHeader.ofsFileEnd; - dbHeader.ofsFileEnd+=bytes; - DBWrite(0,&dbHeader,sizeof(dbHeader)); - log2("newspace %d@%08x",bytes,ofsNew); - return ofsNew; -} - -void DeleteSpace(DWORD ofs,int bytes) -{ - PBYTE buf; - log2("deletespace %d@%08x",bytes,ofs); - - // reclaim a little space - will result in e.g. multiple db events with the same handle! -#ifdef DB_RECLAIM - if(ofs + bytes == dbHeader.ofsFileEnd) { - dbHeader.ofsFileEnd-=bytes; - DBWrite(0,&dbHeader,sizeof(dbHeader)); - // shrink file - SetFilePointer(hDbFile, dbHeader.ofsFileEnd, 0, FILE_BEGIN); - SetEndOfFile(hDbFile); - return; - } -#endif - - dbHeader.slackSpace+=bytes; - DBWrite(0,&dbHeader,sizeof(dbHeader)); - buf=(PBYTE)mir_alloc(bytes); - memset(buf,0,bytes); - DBWrite(ofs,buf,bytes); - mir_free(buf); -} - -void UnloadDatabaseModule(void) -{ - bUnloading = TRUE; - - FinalCommandSetup(); - - UninitOptions(); - - //UninitIni(); - UninitEvents(); - UninitSettings(); - UninitContacts(); - UninitModuleNames(); - UninitCache(); - UnloadDatabase(); - DeleteCriticalSection(&csDbAccess); - - FinalCommandExecute(); -} - -static int GetProfileName(WPARAM wParam, LPARAM lParam) -{ - char * p = 0; - p = strrchr(szDbPath, '\\'); - if ( p == 0 ) return 1; - p++; - strncpy((char*)lParam, p, (size_t) wParam); - return 0; -} - -static int GetProfilePath(WPARAM wParam, LPARAM lParam) -{ - char * dst = (char*)lParam; - char * p = 0; - strncpy(dst,szDbPath,wParam); - p = strrchr(dst, '\\'); - if ( p == NULL ) return 1; - *p=0; - return 0; -} - -int LoadDatabaseModule(void) -{ - InitializeCriticalSection(&csDbAccess); - log0("DB logging running"); - { - DWORD dummy=0; - hDbFile=CreateFile(szDbPath,GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, 0, NULL); - if ( hDbFile == INVALID_HANDLE_VALUE ) { - return 1; - } - if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) { - CloseHandle(hDbFile); - return 1; - } - } - //if(ParseCommandLine()) return 1; - if(InitCache()) return 1; - if(InitModuleNames()) return 1; - if(InitContacts()) return 1; - if(InitSettings()) return 1; - if(InitEvents()) return 1; - if(InitCrypt()) return 1; - //if(InitTime()) return 1; - //if(InitIni()) return 1; - CreateServiceFunction(MS_DB_GETPROFILENAME,GetProfileName); - CreateServiceFunction(MS_DB_GETPROFILEPATH,GetProfilePath); - - if(InitOptions()) return 1; - - return 0; -} - -static DWORD DatabaseCorrupted=0; - -void __cdecl dbpanic(void *arg) -{ - - MessageBox(0,Translate("Miranda has detected corruption in your database. This corruption maybe fixed by DBTool. Please download it from http://www.miranda-im.org. Miranda will now shutdown."),Translate("Database Panic"),MB_SETFOREGROUND|MB_TOPMOST|MB_APPLMODAL|MB_ICONWARNING|MB_OK); - TerminateProcess(GetCurrentProcess(),255); - return; -} - -void DatabaseCorruption(void) -{ - int kill=0; - - EnterCriticalSection(&csDbAccess); - if (DatabaseCorrupted==0) { - DatabaseCorrupted++; - kill++; - } else { - /* db is already corrupted, someone else is dealing with it, wait here - so that we don't do any more damage */ - LeaveCriticalSection(&csDbAccess); - Sleep(INFINITE); - return; - } - LeaveCriticalSection(&csDbAccess); - if (kill) { - _beginthread(dbpanic,0,NULL); - Sleep(INFINITE); - } -} - -#ifdef DBLOGGING -void DBLog(const char *file,int line,const char *fmt,...) -{ - FILE *fp; - va_list vararg; - char str[1024]; - - va_start(vararg,fmt); - mir_vsnprintf(str,sizeof(str),fmt,vararg); - va_end(vararg); - fp=fopen("c:\\mirandadatabase.log.txt","at"); - fprintf(fp,"%u: %s %d: %s\n",GetTickCount(),file,line,str); - fclose(fp); -} -#endif diff --git a/clist_classic_sje/database.h b/clist_classic_sje/database.h deleted file mode 100644 index 3e09949..0000000 --- a/clist_classic_sje/database.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - - -//all offsets are relative to the start of the file -//offsets are 0 if there is nothing in the chain or this is the last in the -//chain - -/* tree diagram - -DBHeader - |-->end of file (plain offset) - |-->first contact (DBContact) - | |-->next contact (DBContact) - | | \--> ... - | |-->first settings (DBContactSettings) - | | |-->next settings (DBContactSettings) - | | | \--> ... - | | \-->module name (DBModuleName) - | \-->first/last/firstunread event - |-->user contact (DBContact) - | |-->next contact=NULL - | |-->first settings as above - | \-->first/last/firstunread event as above - \-->first module name (DBModuleName) - \-->next module name (DBModuleName) - \--> ... -*/ - -#define DB_RESIZE_GRANULARITY 16384 -#define DB_THIS_VERSION 0x00000700u -#define DB_SETTINGS_RESIZE_GRANULARITY 128 - -#include -struct DBHeader { - BYTE signature[16]; // 'Miranda ICQ DB',0,26 - DWORD version; //as 4 bytes, ie 1.2.3.10=0x0102030a - //this version is 0x00000700 - DWORD ofsFileEnd; //offset of the end of the database - place to write - //new structures - DWORD slackSpace; //a counter of the number of bytes that have been - //wasted so far due to deleting structures and/or - //re-making them at the end. We should compact when - //this gets above a threshold - DWORD contactCount; //number of contacts in the chain,excluding the user - DWORD ofsFirstContact; //offset to first struct DBContact in the chain - DWORD ofsUser; //offset to struct DBContact representing the user - DWORD ofsFirstModuleName; //offset to first struct DBModuleName in the chain -}; - -#define DBCONTACT_SIGNATURE 0x43DECADEu -struct DBContact { - DWORD signature; - DWORD ofsNext; //offset to the next contact in the chain. zero if - //this is the 'user' contact or the last contact - //in the chain - DWORD ofsFirstSettings; //offset to the first DBContactSettings in the - //chain for this contact. - DWORD eventCount; //number of events in the chain for this contact - DWORD ofsFirstEvent,ofsLastEvent; //offsets to the first and last DBEvent in - //the chain for this contact - DWORD ofsFirstUnreadEvent; //offset to the first (chronological) unread event - //in the chain, 0 if all are read - DWORD timestampFirstUnread; //timestamp of the event at ofsFirstUnreadEvent -}; - -#define DBMODULENAME_SIGNATURE 0x4DDECADEu -struct DBModuleName { - DWORD signature; - DWORD ofsNext; //offset to the next module name in the chain - BYTE cbName; //number of characters in this module name - char name[1]; //name, no nul terminator -}; - -#define DBCONTACTSETTINGS_SIGNATURE 0x53DECADEu -struct DBContactSettings { - DWORD signature; - DWORD ofsNext; //offset to the next contactsettings in the chain - DWORD ofsModuleName; //offset to the DBModuleName of the owner of these - //settings - DWORD cbBlob; //size of the blob in bytes. May be larger than the - //actual size for reducing the number of moves - //required using granularity in resizing - BYTE blob[1]; //the blob. a back-to-back sequence of DBSetting - //structs, the last has cbName=0 -}; - -/* not a valid structure, content is figured out on the fly -struct DBSetting { - BYTE cbName; //number of bytes in the name of this setting - //this =0 marks the end - char szName[...]; //setting name, excluding nul - BYTE dataType; //type of data. see m_database.h, db/contact/getsetting - union { //a load of types of data, length is defined by dataType - BYTE bVal; WORD wVal; DWORD dVal; - struct { - WORD cbString; - char szVal[...]; //excludes nul terminator - }; - struct { - WORD cbBlob; - BYTE blobVal[...]; - }; - }; -}; -*/ - -#define DBEVENT_SIGNATURE 0x45DECADEu -struct DBEvent { - DWORD signature; - DWORD ofsPrev,ofsNext; //offset to the previous and next events in the - //chain. Chain is sorted chronologically - DWORD ofsModuleName; //offset to a DBModuleName struct of the name of - //the owner of this event - DWORD timestamp; //seconds since 00:00:00 01/01/1970 - DWORD flags; //see m_database.h, db/event/add - WORD eventType; //module-defined event type - DWORD cbBlob; //number of bytes in the blob - BYTE blob[1]; //the blob. module-defined formatting -}; -#include - -typedef struct -{ - BYTE bIsResident; - char name[1]; -} - DBCachedSettingName; - -typedef struct -{ - char* name; - DBVARIANT value; -} - DBCachedGlobalValue; - -typedef struct DBCachedContactValue_tag -{ - char* name; - DBVARIANT value; - struct DBCachedContactValue_tag* next; -} - DBCachedContactValue; - -typedef struct -{ - HANDLE hContact; - HANDLE hNext; - DBCachedContactValue* first; -} - DBCachedContactValueList; - - -//databasecorruption: called if any signatures are broken. very very fatal -void DatabaseCorruption(void); -PBYTE DBRead(DWORD ofs,int bytesRequired,int *bytesAvail); //any preview result could be invalidated by the next call -void DBWrite(DWORD ofs,PVOID pData,int count); -void DBFlush(int setting); -void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes); -DWORD CreateNewSpace(int bytes); -void DeleteSpace(DWORD ofs,int bytes); -int GetProfileDirectory(char *szPath,int cbPath); -int GetDefaultProfilePath(char *szPath,int cbPath,int *specified); -int ShouldShowProfileManager(void); -int CheckDbHeaders(struct DBHeader * hdr); -int CreateDbHeaders(HANDLE hFile); -int LoadDatabaseModule(void); -void UnloadDatabaseModule(void); - -#ifdef _DEBUG -#define MAXCACHEDREADSIZE 512 -#else -#define MAXCACHEDREADSIZE 2048 //push it to 1K //technically 4096 would work, but I'm not going to push it -#endif - -#ifdef _DEBUG -//#define DBLOGGING -#endif -#ifdef DBLOGGING -void DBLog(const char *file,int line,const char *fmt,...); -#define logg() DBLog(__FILE__,__LINE__,"") -#define log0(s) DBLog(__FILE__,__LINE__,s) -#define log1(s,a) DBLog(__FILE__,__LINE__,s,a) -#define log2(s,a,b) DBLog(__FILE__,__LINE__,s,a,b) -#define log3(s,a,b,c) DBLog(__FILE__,__LINE__,s,a,b,c) -#define log4(s,a,b,c,d) DBLog(__FILE__,__LINE__,s,a,b,c,d) -#else -#define logg() -#define log0(s) -#define log1(s,a) -#define log2(s,a,b) -#define log3(s,a,b,c) -#define log4(s,a,b,c,d) -#endif diff --git a/clist_classic_sje/db3x.dep b/clist_classic_sje/db3x.dep deleted file mode 100644 index 20d2e5d..0000000 --- a/clist_classic_sje/db3x.dep +++ /dev/null @@ -1,56 +0,0 @@ -# Microsoft Developer Studio Generated Dependency File, included by db3x.mak - -.\commonheaders.c : \ - "..\..\include\m_database.h"\ - "..\..\include\m_langpack.h"\ - "..\..\include\m_plugins.h"\ - "..\..\include\m_system.h"\ - "..\..\include\newpluginapi.h"\ - "..\..\include\win2k.h"\ - ".\commonheaders.h"\ - - -.\database.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\dbcache.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\dbcontacts.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\dbevents.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\dbheaders.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\dbmodulechain.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\dbsettings.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\encrypt.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - - -.\init.c : \ - "..\..\include\m_plugins.h"\ - ".\database.h"\ - diff --git a/clist_classic_sje/db3x.dsp b/clist_classic_sje/db3x.dsp deleted file mode 100644 index 241e039..0000000 --- a/clist_classic_sje/db3x.dsp +++ /dev/null @@ -1,239 +0,0 @@ -# Microsoft Developer Studio Project File - Name="db3x" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=db3x - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "db3x.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "db3x.mak" CFG="db3x - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "db3x - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "db3x - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName ""$/Miranda/miranda/plugins/db3x", WKIAAAAA" -# PROP Scc_LocalPath "." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "db3x - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Yu"commonheaders.h" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x5130000" /dll /map /debug /machine:I386 /out:"../../bin/release/plugins/dbx_3x.dll" /IGNORE:4089 -# SUBTRACT LINK32 /pdb:none /incremental:yes - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr /Yu"commonheaders.h" /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /debug /machine:I386 /out:"../../bin/debug/plugins/dbx_3x.dll" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none /incremental:no - -!ENDIF - -# Begin Target - -# Name "db3x - Win32 Release" -# Name "db3x - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\commonheaders.c -# ADD CPP /Yc"commonheaders.h" -# End Source File -# Begin Source File - -SOURCE=.\database.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbcache.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbcontacts.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbevents.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbheaders.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbmodulechain.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\dbsettings.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\encrypt.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\init.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -# ADD CPP /Yu"commonheaders.h" - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -!ENDIF - -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\commonheaders.h -# End Source File -# Begin Source File - -SOURCE=.\database.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\resource.rc -# End Source File -# End Group -# End Target -# End Project diff --git a/clist_classic_sje/db3x.dsw b/clist_classic_sje/db3x.dsw deleted file mode 100644 index 0f90f8d..0000000 --- a/clist_classic_sje/db3x.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "db3x"=.\db3x.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/clist_classic_sje/db3x.mak b/clist_classic_sje/db3x.mak deleted file mode 100644 index faade4a..0000000 --- a/clist_classic_sje/db3x.mak +++ /dev/null @@ -1,471 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on db3x.dsp -!IF "$(CFG)" == "" -CFG=db3x - Win32 Debug -!MESSAGE No configuration specified. Defaulting to db3x - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "db3x - Win32 Release" && "$(CFG)" != "db3x - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "db3x.mak" CFG="db3x - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "db3x - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "db3x - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "db3x - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "..\..\bin\release\plugins\dbx_3x.dll" - - -CLEAN : - -@erase "$(INTDIR)\commonheaders.obj" - -@erase "$(INTDIR)\database.obj" - -@erase "$(INTDIR)\db3x.pch" - -@erase "$(INTDIR)\dbcache.obj" - -@erase "$(INTDIR)\dbcontacts.obj" - -@erase "$(INTDIR)\dbevents.obj" - -@erase "$(INTDIR)\dbheaders.obj" - -@erase "$(INTDIR)\dbmodulechain.obj" - -@erase "$(INTDIR)\dbsettings.obj" - -@erase "$(INTDIR)\encrypt.obj" - -@erase "$(INTDIR)\init.obj" - -@erase "$(INTDIR)\resource.res" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\dbx_3x.exp" - -@erase "$(OUTDIR)\dbx_3x.lib" - -@erase "$(OUTDIR)\dbx_3x.map" - -@erase "$(OUTDIR)\dbx_3x.pdb" - -@erase "..\..\bin\release\plugins\dbx_3x.dll" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "NDEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\db3x.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x5130000" /dll /incremental:no /pdb:"$(OUTDIR)\dbx_3x.pdb" /map:"$(INTDIR)\dbx_3x.map" /debug /machine:I386 /out:"../../bin/release/plugins/dbx_3x.dll" /implib:"$(OUTDIR)\dbx_3x.lib" /IGNORE:4089 -LINK32_OBJS= \ - "$(INTDIR)\commonheaders.obj" \ - "$(INTDIR)\database.obj" \ - "$(INTDIR)\dbcache.obj" \ - "$(INTDIR)\dbcontacts.obj" \ - "$(INTDIR)\dbevents.obj" \ - "$(INTDIR)\dbheaders.obj" \ - "$(INTDIR)\dbmodulechain.obj" \ - "$(INTDIR)\dbsettings.obj" \ - "$(INTDIR)\encrypt.obj" \ - "$(INTDIR)\init.obj" \ - "$(INTDIR)\resource.res" - -"..\..\bin\release\plugins\dbx_3x.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "..\..\bin\debug\plugins\dbx_3x.dll" "$(OUTDIR)\db3x.bsc" - - -CLEAN : - -@erase "$(INTDIR)\commonheaders.obj" - -@erase "$(INTDIR)\commonheaders.sbr" - -@erase "$(INTDIR)\database.obj" - -@erase "$(INTDIR)\database.sbr" - -@erase "$(INTDIR)\db3x.pch" - -@erase "$(INTDIR)\dbcache.obj" - -@erase "$(INTDIR)\dbcache.sbr" - -@erase "$(INTDIR)\dbcontacts.obj" - -@erase "$(INTDIR)\dbcontacts.sbr" - -@erase "$(INTDIR)\dbevents.obj" - -@erase "$(INTDIR)\dbevents.sbr" - -@erase "$(INTDIR)\dbheaders.obj" - -@erase "$(INTDIR)\dbheaders.sbr" - -@erase "$(INTDIR)\dbmodulechain.obj" - -@erase "$(INTDIR)\dbmodulechain.sbr" - -@erase "$(INTDIR)\dbsettings.obj" - -@erase "$(INTDIR)\dbsettings.sbr" - -@erase "$(INTDIR)\encrypt.obj" - -@erase "$(INTDIR)\encrypt.sbr" - -@erase "$(INTDIR)\init.obj" - -@erase "$(INTDIR)\init.sbr" - -@erase "$(INTDIR)\resource.res" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\db3x.bsc" - -@erase "$(OUTDIR)\dbx_3x.exp" - -@erase "$(OUTDIR)\dbx_3x.lib" - -@erase "$(OUTDIR)\dbx_3x.map" - -@erase "$(OUTDIR)\dbx_3x.pdb" - -@erase "..\..\bin\debug\plugins\dbx_3x.dll" - -@erase "..\..\bin\debug\plugins\dbx_3x.ilk" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "_DEBUG" -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\db3x.bsc" -BSC32_SBRS= \ - "$(INTDIR)\commonheaders.sbr" \ - "$(INTDIR)\database.sbr" \ - "$(INTDIR)\dbcache.sbr" \ - "$(INTDIR)\dbcontacts.sbr" \ - "$(INTDIR)\dbevents.sbr" \ - "$(INTDIR)\dbheaders.sbr" \ - "$(INTDIR)\dbmodulechain.sbr" \ - "$(INTDIR)\dbsettings.sbr" \ - "$(INTDIR)\encrypt.sbr" \ - "$(INTDIR)\init.sbr" - -"$(OUTDIR)\db3x.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\dbx_3x.pdb" /map:"$(INTDIR)\dbx_3x.map" /debug /machine:I386 /out:"../../bin/debug/plugins/dbx_3x.dll" /implib:"$(OUTDIR)\dbx_3x.lib" /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\commonheaders.obj" \ - "$(INTDIR)\database.obj" \ - "$(INTDIR)\dbcache.obj" \ - "$(INTDIR)\dbcontacts.obj" \ - "$(INTDIR)\dbevents.obj" \ - "$(INTDIR)\dbheaders.obj" \ - "$(INTDIR)\dbmodulechain.obj" \ - "$(INTDIR)\dbsettings.obj" \ - "$(INTDIR)\encrypt.obj" \ - "$(INTDIR)\init.obj" \ - "$(INTDIR)\resource.res" - -"..\..\bin\debug\plugins\dbx_3x.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("db3x.dep") -!INCLUDE "db3x.dep" -!ELSE -!MESSAGE Warning: cannot find "db3x.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "db3x - Win32 Release" || "$(CFG)" == "db3x - Win32 Debug" -SOURCE=.\commonheaders.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yc"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\commonheaders.obj" "$(INTDIR)\db3x.pch" : $(SOURCE) "$(INTDIR)" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yc"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\commonheaders.obj" "$(INTDIR)\commonheaders.sbr" "$(INTDIR)\db3x.pch" : $(SOURCE) "$(INTDIR)" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\database.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\database.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\database.obj" "$(INTDIR)\database.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\dbcache.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\dbcache.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\dbcache.obj" "$(INTDIR)\dbcache.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\dbcontacts.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\dbcontacts.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\dbcontacts.obj" "$(INTDIR)\dbcontacts.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\dbevents.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\dbevents.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\dbevents.obj" "$(INTDIR)\dbevents.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\dbheaders.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\dbheaders.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\dbheaders.obj" "$(INTDIR)\dbheaders.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\dbmodulechain.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\dbmodulechain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\dbmodulechain.obj" "$(INTDIR)\dbmodulechain.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\dbsettings.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\dbsettings.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\dbsettings.obj" "$(INTDIR)\dbsettings.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\encrypt.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\encrypt.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\encrypt.obj" "$(INTDIR)\encrypt.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\init.c - -!IF "$(CFG)" == "db3x - Win32 Release" - -CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c - -"$(INTDIR)\init.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ELSEIF "$(CFG)" == "db3x - Win32 Debug" - -CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c - -"$(INTDIR)\init.obj" "$(INTDIR)\init.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x.pch" - $(CPP) @<< - $(CPP_SWITCHES) $(SOURCE) -<< - - -!ENDIF - -SOURCE=.\resource.rc - -"$(INTDIR)\resource.res" : $(SOURCE) "$(INTDIR)" - $(RSC) $(RSC_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/clist_classic_sje/db3x.vcproj b/clist_classic_sje/db3x.vcproj deleted file mode 100644 index 65bf2b5..0000000 --- a/clist_classic_sje/db3x.vcproj +++ /dev/null @@ -1,795 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clist_classic_sje/db3x_8.sln b/clist_classic_sje/db3x_8.sln deleted file mode 100644 index a033a41..0000000 --- a/clist_classic_sje/db3x_8.sln +++ /dev/null @@ -1,23 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db3x", "db3x_8.vcproj", "{8B778B6A-F5EF-49A4-8437-424832F2B280}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release (RECLAIM)|Win32 = Release (RECLAIM)|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B778B6A-F5EF-49A4-8437-424832F2B280}.Debug|Win32.ActiveCfg = Release|Win32 - {8B778B6A-F5EF-49A4-8437-424832F2B280}.Debug|Win32.Build.0 = Release|Win32 - {8B778B6A-F5EF-49A4-8437-424832F2B280}.Release (RECLAIM)|Win32.ActiveCfg = Release (RECLAIM)|Win32 - {8B778B6A-F5EF-49A4-8437-424832F2B280}.Release (RECLAIM)|Win32.Build.0 = Release (RECLAIM)|Win32 - {8B778B6A-F5EF-49A4-8437-424832F2B280}.Release|Win32.ActiveCfg = Release|Win32 - {8B778B6A-F5EF-49A4-8437-424832F2B280}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/clist_classic_sje/db3x_8.vcproj b/clist_classic_sje/db3x_8.vcproj deleted file mode 100644 index e5cfbba..0000000 --- a/clist_classic_sje/db3x_8.vcproj +++ /dev/null @@ -1,811 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/clist_classic_sje/dbcache.c b/clist_classic_sje/dbcache.c deleted file mode 100644 index dd3bc5a..0000000 --- a/clist_classic_sje/dbcache.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" - - -#define CACHESECTIONSIZE 4096 -#define CACHESECTIONCOUNT 32 - -extern HANDLE hDbFile; -extern CRITICAL_SECTION csDbAccess; - -static BOOL safetyMode=TRUE; -static PBYTE pDbCache; -static DWORD lastUseCounter; -struct DBCacheSectionInfo { - DWORD ofsBase; - DWORD lastUsed; -} static cacheSectionInfo[CACHESECTIONCOUNT]; - -static __inline int FindSectionForOffset(const DWORD ofs) -{ - int i; - for(i=0;i=cacheSectionInfo[i].ofsBase && ofs=cacheSectionInfo[i].ofsBase && ofs=cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE) //don't finish at end - CopyMemory(pDbCache+i*CACHESECTIONSIZE,(PBYTE)pData+cacheSectionInfo[i].ofsBase-ofs,CACHESECTIONSIZE); - else CopyMemory(pDbCache+i*CACHESECTIONSIZE,(PBYTE)pData+cacheSectionInfo[i].ofsBase-ofs,bytes-(cacheSectionInfo[i].ofsBase-ofs)); - } - else { //start at beginning - if(ofs+bytes>=cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE) //don't finish at end - CopyMemory(pDbCache+i*CACHESECTIONSIZE+ofs-cacheSectionInfo[i].ofsBase,pData,cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE-ofs); - else CopyMemory(pDbCache+i*CACHESECTIONSIZE+ofs-cacheSectionInfo[i].ofsBase,pData,bytes); - } - } - } -} - -void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes) -{ - DWORD bytesRead; - PBYTE buf; - - log3("move %d %08x->%08x",bytes,ofsSource,ofsDest); - buf=(PBYTE)mir_alloc(bytes); - SetFilePointer(hDbFile,ofsSource,NULL,FILE_BEGIN); - ReadFile(hDbFile,buf,bytes,&bytesRead,NULL); - DBWrite(ofsDest,buf,bytes); - mir_free(buf); - logg(); -} - -static int flushBuffersTimerId; -static VOID CALLBACK DoBufferFlushTimerProc(HWND hwnd,UINT message,UINT idEvent,DWORD dwTime) -{ - KillTimer(NULL,flushBuffersTimerId); - log0("tflush1"); - FlushFileBuffers(hDbFile); - log0("tflush2"); -} - -void DBFlush(int setting) -{ - if(!setting) { - log0("nflush1"); - if(safetyMode) FlushFileBuffers(hDbFile); - log0("nflush2"); - return; - } - KillTimer(NULL,flushBuffersTimerId); - flushBuffersTimerId=SetTimer(NULL,flushBuffersTimerId,50,DoBufferFlushTimerProc); -} - -static int CacheSetSafetyMode(WPARAM wParam,LPARAM lParam) -{ - EnterCriticalSection(&csDbAccess); - safetyMode=wParam; - LeaveCriticalSection(&csDbAccess); - if(safetyMode) FlushFileBuffers(hDbFile); - return 0; -} - -int InitCache(void) -{ - int i; - DWORD bytesRead; - - CreateServiceFunction(MS_DB_SETSAFETYMODE,CacheSetSafetyMode); - pDbCache=(PBYTE)mir_alloc(CACHESECTIONSIZE*CACHESECTIONCOUNT); - lastUseCounter=CACHESECTIONCOUNT; - for(i=0;ihNext != NULL ) { - LeaveCriticalSection(&csDbAccess); - return (int)VL->hNext; - } } } - - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) - ret=(int)(HANDLE)NULL; - else { - if ( VL == NULL ) { - VL = (DBCachedContactValueList*)HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE+HEAP_ZERO_MEMORY,sizeof(DBCachedContactValueList)); - VL->hContact = (HANDLE)wParam; - li.List_Insert(&lContacts,VL,index); - } - VL->hNext = (HANDLE)dbc->ofsNext; - ret=(int)(HANDLE)dbc->ofsNext; - } - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int DeleteContact(WPARAM wParam,LPARAM lParam) -{ - struct DBContact *dbc,*dbcPrev; - DWORD ofsThis,ofsNext,ofsFirstEvent; - struct DBContactSettings *dbcs; - struct DBEvent *dbe; - int index; - - if((HANDLE)wParam==NULL) return 1; - EnterCriticalSection(&csDbAccess); - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - if ( (HANDLE)wParam == (HANDLE)dbHeader.ofsUser ) { - LeaveCriticalSection(&csDbAccess); - log0("FATAL: del of user chain attempted."); - return 1; - } - log0("del contact"); - LeaveCriticalSection(&csDbAccess); - //call notifier while outside mutex - NotifyEventHooks(hContactDeletedEvent,wParam,0); - //get back in - EnterCriticalSection(&csDbAccess); - - { DBCachedContactValueList VLtemp; - VLtemp.hContact = (HANDLE)wParam; - if ( li.List_GetIndex(&lContacts,&VLtemp,&index)) - { - DBCachedContactValueList *VL = ( DBCachedContactValueList* )lContacts.items[index]; - DBCachedContactValue* V = VL->first; - while ( V != NULL ) { - DBCachedContactValue* V1 = V->next; - if ( V->value.type == DBVT_ASCIIZ ) - HeapFree( hCacheHeap, HEAP_NO_SERIALIZE, V->value.pszVal ); - HeapFree( hCacheHeap, HEAP_NO_SERIALIZE, V ); - V = V1; - } - HeapFree( hCacheHeap, HEAP_NO_SERIALIZE, VL ); - - li.List_Remove(&lContacts,index); - } } - - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - //delete settings chain - ofsThis=dbc->ofsFirstSettings; - ofsFirstEvent=dbc->ofsFirstEvent; - while(ofsThis) { - dbcs=(struct DBContactSettings*)DBRead(ofsThis,sizeof(struct DBContactSettings),NULL); - ofsNext=dbcs->ofsNext; - DeleteSpace(ofsThis,offsetof(struct DBContactSettings,blob)+dbcs->cbBlob); - ofsThis=ofsNext; - } - //delete event chain - ofsThis=ofsFirstEvent; - while(ofsThis) { - dbe=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL); - ofsNext=dbe->ofsNext; - DeleteSpace(ofsThis,offsetof(struct DBEvent,blob)+dbe->cbBlob); - ofsThis=ofsNext; - } - //find previous contact in chain and change ofsNext - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbHeader.ofsFirstContact==wParam) { - dbHeader.ofsFirstContact=dbc->ofsNext; - DBWrite(0,&dbHeader,sizeof(dbHeader)); - } - else { - ofsNext=dbc->ofsNext; - ofsThis=dbHeader.ofsFirstContact; - dbcPrev=(struct DBContact*)DBRead(ofsThis,sizeof(struct DBContact),NULL); - while(dbcPrev->ofsNext!=wParam) { - if(dbcPrev->ofsNext==0) DatabaseCorruption(); - ofsThis=dbcPrev->ofsNext; - dbcPrev=(struct DBContact*)DBRead(ofsThis,sizeof(struct DBContact),NULL); - } - dbcPrev->ofsNext=ofsNext; - DBWrite(ofsThis,dbcPrev,sizeof(struct DBContact)); - { - DBCachedContactValueList VLtemp; - VLtemp.hContact = (HANDLE)ofsThis; - if ( li.List_GetIndex(&lContacts,&VLtemp,&index)) - { - DBCachedContactValueList *VL = ( DBCachedContactValueList* )lContacts.items[index]; - VL->hNext = ( HANDLE )ofsNext; - } } - } - //delete contact - DeleteSpace(wParam,sizeof(struct DBContact)); - //decrement contact count - dbHeader.contactCount--; - DBWrite(0,&dbHeader,sizeof(dbHeader)); - DBFlush(0); - //quit - LeaveCriticalSection(&csDbAccess); - return 0; -} - -static int AddContact(WPARAM wParam,LPARAM lParam) -{ - struct DBContact dbc; - DWORD ofsNew; - - log0("add contact"); - EnterCriticalSection(&csDbAccess); - ofsNew=CreateNewSpace(sizeof(struct DBContact)); - dbc.signature=DBCONTACT_SIGNATURE; - dbc.eventCount=0; - dbc.ofsFirstEvent=dbc.ofsLastEvent=0; - dbc.ofsFirstSettings=0; - dbc.ofsNext=dbHeader.ofsFirstContact; - dbc.ofsFirstUnreadEvent=0; - dbc.timestampFirstUnread=0; - dbHeader.ofsFirstContact=ofsNew; - dbHeader.contactCount++; - DBWrite(ofsNew,&dbc,sizeof(struct DBContact)); - DBWrite(0,&dbHeader,sizeof(dbHeader)); - DBFlush(0); - - { int index; - - DBCachedContactValueList *VL = (DBCachedContactValueList*)HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE+HEAP_ZERO_MEMORY,sizeof(DBCachedContactValueList)); - VL->hContact = (HANDLE)ofsNew; - - li.List_GetIndex(&lContacts,VL,&index); - li.List_Insert(&lContacts,VL,index); - } - - LeaveCriticalSection(&csDbAccess); - NotifyEventHooks(hContactAddedEvent,(WPARAM)ofsNew,0); - return (int)ofsNew; -} - -static int IsDbContact(WPARAM wParam,LPARAM lParam) -{ - struct DBContact dbc; - DWORD ofsContact=(DWORD)wParam; - int ret; - - EnterCriticalSection(&csDbAccess); - { - int index; - DBCachedContactValueList VLtemp,*VL; - VLtemp.hContact = (HANDLE)wParam; - if ( li.List_GetIndex(&lContacts,&VLtemp,&index)) - ret = TRUE; - else { - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - ret=dbc.signature==DBCONTACT_SIGNATURE; - - if (ret) { - VL = (DBCachedContactValueList*)HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE+HEAP_ZERO_MEMORY,sizeof(DBCachedContactValueList)); - VL->hContact = (HANDLE)wParam; - li.List_Insert(&lContacts,VL,index); - } } } - - LeaveCriticalSection(&csDbAccess); - return ret; -} diff --git a/clist_classic_sje/dbevents.c b/clist_classic_sje/dbevents.c deleted file mode 100644 index e0f7c02..0000000 --- a/clist_classic_sje/dbevents.c +++ /dev/null @@ -1,440 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" - - -DWORD GetModuleNameOfs(const char *szName); -char *GetModuleNameByOfs(DWORD ofs); - -static int GetEventCount(WPARAM wParam,LPARAM lParam); -static int AddEvent(WPARAM wParam,LPARAM lParam); -static int DeleteEvent(WPARAM wParam,LPARAM lParam); -static int GetBlobSize(WPARAM wParam,LPARAM lParam); -static int GetEvent(WPARAM wParam,LPARAM lParam); -static int MarkEventRead(WPARAM wParam,LPARAM lParam); -static int GetEventContact(WPARAM wParam,LPARAM lParam); -static int FindFirstEvent(WPARAM wParam,LPARAM lParam); -static int FindFirstUnreadEvent(WPARAM wParam,LPARAM lParam); -static int FindLastEvent(WPARAM wParam,LPARAM lParam); -static int FindNextEvent(WPARAM wParam,LPARAM lParam); -static int FindPrevEvent(WPARAM wParam,LPARAM lParam); - -extern CRITICAL_SECTION csDbAccess; -extern struct DBHeader dbHeader; - -static HANDLE hEventDeletedEvent,hEventAddedEvent,hEventFilterAddedEvent; - -int InitEvents(void) -{ - CreateServiceFunction(MS_DB_EVENT_GETCOUNT,GetEventCount); - CreateServiceFunction(MS_DB_EVENT_ADD,AddEvent); - CreateServiceFunction(MS_DB_EVENT_DELETE,DeleteEvent); - CreateServiceFunction(MS_DB_EVENT_GETBLOBSIZE,GetBlobSize); - CreateServiceFunction(MS_DB_EVENT_GET,GetEvent); - CreateServiceFunction(MS_DB_EVENT_MARKREAD,MarkEventRead); - CreateServiceFunction(MS_DB_EVENT_GETCONTACT,GetEventContact); - CreateServiceFunction(MS_DB_EVENT_FINDFIRST,FindFirstEvent); - CreateServiceFunction(MS_DB_EVENT_FINDFIRSTUNREAD,FindFirstUnreadEvent); - CreateServiceFunction(MS_DB_EVENT_FINDLAST,FindLastEvent); - CreateServiceFunction(MS_DB_EVENT_FINDNEXT,FindNextEvent); - CreateServiceFunction(MS_DB_EVENT_FINDPREV,FindPrevEvent); - hEventDeletedEvent=CreateHookableEvent(ME_DB_EVENT_DELETED); - hEventAddedEvent=CreateHookableEvent(ME_DB_EVENT_ADDED); - hEventFilterAddedEvent=CreateHookableEvent(ME_DB_EVENT_FILTER_ADD); - return 0; -} - -void UninitEvents(void) -{ -} - -static int GetEventCount(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBContact *dbc; - - EnterCriticalSection(&csDbAccess); - if(wParam==0) wParam=dbHeader.ofsUser; - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) ret=-1; - else ret=dbc->eventCount; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int AddEvent(WPARAM wParam,LPARAM lParam) -{ - DBEVENTINFO *dbei=(DBEVENTINFO*)lParam; - struct DBContact dbc; - struct DBEvent dbe,*dbeTest; - DWORD ofsNew,ofsModuleName,ofsContact,ofsThis; - - if(dbei==NULL||dbei->cbSize!=sizeof(DBEVENTINFO)) return (int)NULL; - if(dbei->timestamp==0) return (int)NULL; - if (NotifyEventHooks(hEventFilterAddedEvent,wParam,lParam)) { - return (int)NULL; - } - EnterCriticalSection(&csDbAccess); - if(wParam==0) ofsContact=dbHeader.ofsUser; - else ofsContact=wParam; - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - if(dbc.signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return (int)NULL; - } - ofsNew=CreateNewSpace(offsetof(struct DBEvent,blob)+dbei->cbBlob); - ofsModuleName=GetModuleNameOfs(dbei->szModule); - - dbe.signature=DBEVENT_SIGNATURE; - dbe.ofsModuleName=ofsModuleName; - dbe.timestamp=dbei->timestamp; - dbe.flags=dbei->flags; - dbe.eventType=dbei->eventType; - dbe.cbBlob=dbei->cbBlob; - //find where to put it - sort by timestamp - if(dbc.eventCount==0) { - dbe.ofsPrev=wParam; - dbe.ofsNext=0; - dbe.flags|=DBEF_FIRST; - dbc.ofsFirstEvent=dbc.ofsLastEvent=ofsNew; - } - else { - dbeTest=(struct DBEvent*)DBRead(dbc.ofsFirstEvent,sizeof(struct DBEvent),NULL); - // Should new event be placed before first event in chain? - if (dbei->timestamp < dbeTest->timestamp) { - dbe.ofsPrev=wParam; - dbe.ofsNext=dbc.ofsFirstEvent; - dbe.flags|=DBEF_FIRST; - dbc.ofsFirstEvent=ofsNew; - dbeTest=(struct DBEvent*)DBRead(dbe.ofsNext,sizeof(struct DBEvent),NULL); - dbeTest->flags&=~DBEF_FIRST; - dbeTest->ofsPrev=ofsNew; - DBWrite(dbe.ofsNext,dbeTest,sizeof(struct DBEvent)); - } - else { - // Loop through the chain, starting at the end - ofsThis = dbc.ofsLastEvent; - dbeTest = (struct DBEvent*)DBRead(ofsThis, sizeof(struct DBEvent), NULL); - for(;;) { - // If the new event's timesstamp is equal to or greater than the - // current dbevent, it will be inserted after. If not, continue - // with the previous dbevent in chain. - if (dbe.timestamp >= dbeTest->timestamp) { - dbe.ofsPrev = ofsThis; - dbe.ofsNext = dbeTest->ofsNext; - dbeTest->ofsNext = ofsNew; - DBWrite(ofsThis, dbeTest, sizeof(struct DBEvent)); - if (dbe.ofsNext == 0) - dbc.ofsLastEvent = ofsNew; - else { - dbeTest = (struct DBEvent*)DBRead(dbe.ofsNext, sizeof(struct DBEvent), NULL); - dbeTest->ofsPrev = ofsNew; - DBWrite(dbe.ofsNext, dbeTest, sizeof(struct DBEvent)); - } - break; - } - ofsThis = dbeTest->ofsPrev; - dbeTest = (struct DBEvent*)DBRead(ofsThis, sizeof(struct DBEvent), NULL); - } - } - } - dbc.eventCount++; - if(!(dbe.flags&(DBEF_READ|DBEF_SENT))) { - if(dbe.timestamppBlob,dbei->cbBlob); - DBFlush(0); - LeaveCriticalSection(&csDbAccess); - log1("add event @ %08x",ofsNew); - NotifyEventHooks(hEventAddedEvent,wParam,(LPARAM)ofsNew); - return (int)ofsNew; -} - -static int DeleteEvent(WPARAM wParam,LPARAM lParam) -{ - struct DBContact dbc; - DWORD ofsContact,ofsThis; - struct DBEvent dbe,*dbeNext,*dbePrev; - - EnterCriticalSection(&csDbAccess); - if(wParam==0) ofsContact=dbHeader.ofsUser; - else ofsContact=wParam; - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - dbe=*(struct DBEvent*)DBRead(lParam,sizeof(struct DBEvent),NULL); - if(dbc.signature!=DBCONTACT_SIGNATURE || dbe.signature!=DBEVENT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - log1("delete event @ %08x",wParam); - LeaveCriticalSection(&csDbAccess); - //call notifier while outside mutex - NotifyEventHooks(hEventDeletedEvent,wParam,lParam); - //get back in - EnterCriticalSection(&csDbAccess); - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - dbe=*(struct DBEvent*)DBRead(lParam,sizeof(struct DBEvent),NULL); - //check if this was the first unread, if so, recalc the first unread - if(dbc.ofsFirstUnreadEvent==(DWORD)lParam) { - dbeNext=&dbe; - for(;;) { - if(dbeNext->ofsNext==0) { - dbc.ofsFirstUnreadEvent=0; - dbc.timestampFirstUnread=0; - break; - } - ofsThis=dbeNext->ofsNext; - dbeNext=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL); - if(!(dbeNext->flags&(DBEF_READ|DBEF_SENT))) { - dbc.ofsFirstUnreadEvent=ofsThis; - dbc.timestampFirstUnread=dbeNext->timestamp; - break; - } - } - } - //get previous and next events in chain and change offsets - if(dbe.flags&DBEF_FIRST) { - if(dbe.ofsNext==0) { - dbc.ofsFirstEvent=dbc.ofsLastEvent=0; - } - else { - dbeNext=(struct DBEvent*)DBRead(dbe.ofsNext,sizeof(struct DBEvent),NULL); - dbeNext->flags|=DBEF_FIRST; - dbeNext->ofsPrev=dbe.ofsPrev; - DBWrite(dbe.ofsNext,dbeNext,sizeof(struct DBEvent)); - dbc.ofsFirstEvent=dbe.ofsNext; - } - } - else { - if(dbe.ofsNext==0) { - dbePrev=(struct DBEvent*)DBRead(dbe.ofsPrev,sizeof(struct DBEvent),NULL); - dbePrev->ofsNext=0; - DBWrite(dbe.ofsPrev,dbePrev,sizeof(struct DBEvent)); - dbc.ofsLastEvent=dbe.ofsPrev; - } - else { - dbePrev=(struct DBEvent*)DBRead(dbe.ofsPrev,sizeof(struct DBEvent),NULL); - dbePrev->ofsNext=dbe.ofsNext; - DBWrite(dbe.ofsPrev,dbePrev,sizeof(struct DBEvent)); - dbeNext=(struct DBEvent*)DBRead(dbe.ofsNext,sizeof(struct DBEvent),NULL); - dbeNext->ofsPrev=dbe.ofsPrev; - DBWrite(dbe.ofsNext,dbeNext,sizeof(struct DBEvent)); - } - } - //delete event - DeleteSpace(lParam,offsetof(struct DBEvent,blob)+dbe.cbBlob); - //decrement event count - dbc.eventCount--; - DBWrite(ofsContact,&dbc,sizeof(struct DBContact)); - DBFlush(0); - //quit - LeaveCriticalSection(&csDbAccess); - return 0; -} - -static int GetBlobSize(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBEvent *dbe; - - EnterCriticalSection(&csDbAccess); - dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL); - if(dbe->signature!=DBEVENT_SIGNATURE) ret=-1; - else ret=dbe->cbBlob; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int GetEvent(WPARAM wParam,LPARAM lParam) -{ - struct DBEvent *dbe; - DBEVENTINFO *dbei=(DBEVENTINFO*)lParam; - int bytesToCopy,i; - - if(dbei==NULL||dbei->cbSize!=sizeof(DBEVENTINFO)) return 1; - EnterCriticalSection(&csDbAccess); - dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL); - if(dbe->signature!=DBEVENT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - dbei->szModule=GetModuleNameByOfs(dbe->ofsModuleName); - dbei->timestamp=dbe->timestamp; - dbei->flags=dbe->flags; - dbei->eventType=dbe->eventType; - if(dbei->cbBlobcbBlob) bytesToCopy=dbei->cbBlob; - else bytesToCopy=dbe->cbBlob; - dbei->cbBlob=dbe->cbBlob; - if(dbei->pBlob == 0 && bytesToCopy > 0) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - for(i=0;;i+=MAXCACHEDREADSIZE) { - if(bytesToCopy-i<=MAXCACHEDREADSIZE) { - CopyMemory(dbei->pBlob+i,DBRead(wParam+offsetof(struct DBEvent,blob)+i,bytesToCopy-i,NULL),bytesToCopy-i); - break; - } - CopyMemory(dbei->pBlob+i,DBRead(wParam+offsetof(struct DBEvent,blob)+i,MAXCACHEDREADSIZE,NULL),MAXCACHEDREADSIZE); - } - LeaveCriticalSection(&csDbAccess); - return 0; -} - -static int MarkEventRead(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBEvent *dbe; - struct DBContact dbc; - DWORD ofsThis; - - EnterCriticalSection(&csDbAccess); - if(wParam==0) wParam=dbHeader.ofsUser; - dbc=*(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - dbe=(struct DBEvent*)DBRead(lParam,sizeof(struct DBEvent),NULL); - if(dbe->signature!=DBEVENT_SIGNATURE || dbc.signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return -1; - } - if(dbe->flags&DBEF_READ || dbe->flags&DBEF_SENT) { - ret=(int)dbe->flags; - LeaveCriticalSection(&csDbAccess); - return ret; - } - log1("mark read @ %08x",wParam); - dbe->flags|=DBEF_READ; - DBWrite(lParam,dbe,sizeof(struct DBEvent)); - ret=(int)dbe->flags; - if(dbc.ofsFirstUnreadEvent==(DWORD)lParam) { - for(;;) { - if(dbe->ofsNext==0) { - dbc.ofsFirstUnreadEvent=0; - dbc.timestampFirstUnread=0; - break; - } - ofsThis=dbe->ofsNext; - dbe=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL); - if(!(dbe->flags&(DBEF_READ|DBEF_SENT))) { - dbc.ofsFirstUnreadEvent=ofsThis; - dbc.timestampFirstUnread=dbe->timestamp; - break; - } - } - } - DBWrite(wParam,&dbc,sizeof(struct DBContact)); - DBFlush(0); - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int GetEventContact(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBEvent *dbe; - - EnterCriticalSection(&csDbAccess); - dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL); - if(dbe->signature!=DBEVENT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return -1; - } - while(!(dbe->flags&DBEF_FIRST)) - dbe=(struct DBEvent*)DBRead(dbe->ofsPrev,sizeof(struct DBEvent),NULL); - ret=(int)(HANDLE)dbe->ofsPrev; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int FindFirstEvent(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBContact *dbc; - - EnterCriticalSection(&csDbAccess); - if(wParam==0) wParam=dbHeader.ofsUser; - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) ret=(int)(HANDLE)NULL; - else ret=(int)dbc->ofsFirstEvent; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int FindFirstUnreadEvent(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBContact *dbc; - - EnterCriticalSection(&csDbAccess); - if(wParam==0) wParam=dbHeader.ofsUser; - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) ret=(int)(HANDLE)NULL; - else ret=(int)dbc->ofsFirstUnreadEvent; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int FindLastEvent(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBContact *dbc; - - EnterCriticalSection(&csDbAccess); - if(wParam==0) wParam=dbHeader.ofsUser; - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) ret=(int)(HANDLE)NULL; - else ret=(int)dbc->ofsLastEvent; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int FindNextEvent(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBEvent *dbe; - - EnterCriticalSection(&csDbAccess); - dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL); - if(dbe->signature!=DBEVENT_SIGNATURE) ret=(int)(HANDLE)NULL; - else ret=(int)(HANDLE)dbe->ofsNext; - LeaveCriticalSection(&csDbAccess); - return ret; -} - -static int FindPrevEvent(WPARAM wParam,LPARAM lParam) -{ - int ret; - struct DBEvent *dbe; - - EnterCriticalSection(&csDbAccess); - dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL); - if(dbe->signature!=DBEVENT_SIGNATURE) ret=(int)(HANDLE)NULL; - else if(dbe->flags&DBEF_FIRST) ret=(int)(HANDLE)NULL; - else ret=(int)(HANDLE)dbe->ofsPrev; - LeaveCriticalSection(&csDbAccess); - return ret; -} diff --git a/clist_classic_sje/dbheaders.c b/clist_classic_sje/dbheaders.c deleted file mode 100644 index da7cb6e..0000000 --- a/clist_classic_sje/dbheaders.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" - -extern struct DBHeader dbHeader; -extern HANDLE hDbFile; - -struct DBSignature { - char name[15]; - BYTE eof; -}; -static struct DBSignature dbSignature={"Miranda ICQ DB",0x1A}; - -//the cache has not been loaded when these functions are used - -int CreateDbHeaders(HANDLE hFile) -{ - struct DBContact user; - DWORD bytesWritten; - - CopyMemory(dbHeader.signature,&dbSignature,sizeof(dbHeader.signature)); - dbHeader.version=DB_THIS_VERSION; - dbHeader.ofsFileEnd=sizeof(struct DBHeader); - dbHeader.slackSpace=0; - dbHeader.contactCount=0; - dbHeader.ofsFirstContact=0; - dbHeader.ofsFirstModuleName=0; - dbHeader.ofsUser=0; - //create user - dbHeader.ofsUser=dbHeader.ofsFileEnd; - dbHeader.ofsFileEnd+=sizeof(struct DBContact); - SetFilePointer(hFile,0,NULL,FILE_BEGIN); - WriteFile(hFile,&dbHeader,sizeof(dbHeader),&bytesWritten,NULL); - user.signature=DBCONTACT_SIGNATURE; - user.ofsNext=0; - user.ofsFirstSettings=0; - user.eventCount=0; - user.ofsFirstEvent=user.ofsLastEvent=0; - SetFilePointer(hFile,dbHeader.ofsUser,NULL,FILE_BEGIN); - WriteFile(hFile,&user,sizeof(struct DBContact),&bytesWritten,NULL); - FlushFileBuffers(hFile); - return 0; -} - -int CheckDbHeaders(struct DBHeader * hdr) -{ - if(memcmp(hdr->signature,&dbSignature,sizeof(hdr->signature))) return 1; - if(hdr->version!=DB_THIS_VERSION) return 2; - if(hdr->ofsUser==0) return 3; - return 0; -} - -int InitialiseDbHeaders(void) -{ - return 0; -} diff --git a/clist_classic_sje/dbmodulechain.c b/clist_classic_sje/dbmodulechain.c deleted file mode 100644 index 352a06c..0000000 --- a/clist_classic_sje/dbmodulechain.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" - -extern struct DBHeader dbHeader; - -static int EnumModuleNames(WPARAM wParam,LPARAM lParam); - -struct ModuleName { - char *name; - DWORD hash; - DWORD ofs; -}; -static struct ModuleName *moduleName; -static int moduleNameCount; - -int InitModuleNames(void) -{ - struct DBModuleName *dbmn; - DWORD ofsThis,ofsNext; - int nameLen; - - moduleNameCount=0; - moduleName=NULL; - ofsThis=dbHeader.ofsFirstModuleName; - dbmn=(struct DBModuleName*)DBRead(ofsThis,sizeof(struct DBModuleName),NULL); - while(ofsThis) { - if(dbmn->signature!=DBMODULENAME_SIGNATURE) DatabaseCorruption(); - moduleName=(struct ModuleName*)mir_realloc(moduleName,sizeof(struct ModuleName)*(moduleNameCount+1)); - moduleName[moduleNameCount].ofs=ofsThis; - moduleName[moduleNameCount].hash=dbmn->cbName; //very very simple hash so far - moduleName[moduleNameCount].name=(char*)mir_alloc(dbmn->cbName+1); - ofsNext=dbmn->ofsNext; - nameLen=dbmn->cbName; - CopyMemory(moduleName[moduleNameCount].name,DBRead(ofsThis+offsetof(struct DBModuleName,name),nameLen,NULL),nameLen); - moduleName[moduleNameCount].name[nameLen]=0; - moduleNameCount++; - ofsThis=ofsNext; - dbmn=(struct DBModuleName*)DBRead(ofsThis,sizeof(struct DBModuleName),NULL); - } - CreateServiceFunction(MS_DB_MODULES_ENUM,EnumModuleNames); - return 0; -} - -void UninitModuleNames(void) -{ - int i; - for(i=0;iofsFirstSettings; - while(ofsThis) { - dbcs=(struct DBContactSettings*)DBRead(ofsThis,sizeof(struct DBContactSettings),NULL); - if(dbcs->signature!=DBCONTACTSETTINGS_SIGNATURE) DatabaseCorruption(); - if(dbcs->ofsModuleName==ofsModuleName) { - settingsGroupOfsCache[nextSGOCacheEntry].ofsContact=ofsContact; - settingsGroupOfsCache[nextSGOCacheEntry].ofsModuleName=ofsModuleName; - settingsGroupOfsCache[nextSGOCacheEntry].ofsSettingsGroup=ofsThis; - if(++nextSGOCacheEntry==SETTINGSGROUPOFSCOUNT) nextSGOCacheEntry=0; - return ofsThis; - } - ofsThis=dbcs->ofsNext; - } - return 0; -} - -static void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup) -{ - int i; - - for(i=0;itype == DBVT_UTF8 || d->type == DBVT_ASCIIZ ) ? d->pszVal : NULL; - - memcpy( d, s, sizeof( DBVARIANT )); - if (( s->type == DBVT_UTF8 || s->type == DBVT_ASCIIZ ) && s->pszVal != NULL ) { - if ( szSave != NULL ) - d->pszVal = (char*)HeapReAlloc(hCacheHeap,HEAP_NO_SERIALIZE,szSave,strlen(s->pszVal)+1); - else - d->pszVal = (char*)HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE,strlen(s->pszVal)+1); - strcpy(d->pszVal,s->pszVal); - } - - switch( d->type ) { - case DBVT_BYTE: log1( "set cached byte: %d", d->bVal ); break; - case DBVT_WORD: log1( "set cached word: %d", d->wVal ); break; - case DBVT_DWORD: log1( "set cached dword: %d", d->dVal ); break; - case DBVT_UTF8: - case DBVT_ASCIIZ: log1( "set cached string: '%s'", d->pszVal ); break; - default: log1( "set cached crap: %d", d->type ); break; -} } - -static void FreeCachedVariant( DBVARIANT* V ) -{ - if (( V->type == DBVT_ASCIIZ || V->type == DBVT_UTF8 ) && V->pszVal != NULL ) - HeapFree(hCacheHeap,HEAP_NO_SERIALIZE,V->pszVal); -} - -static DBVARIANT* GetCachedValuePtr( HANDLE hContact, char* szSetting, int bAllocate ) -{ - int index; - - if ( hContact == 0 ) { - DBCachedGlobalValue Vtemp, *V; - Vtemp.name = szSetting; - if ( li.List_GetIndex(&lGlobalSettings,&Vtemp,&index)) { - V = (DBCachedGlobalValue*)lGlobalSettings.items[index]; - if ( bAllocate == -1 ) { - FreeCachedVariant( &V->value ); - li.List_Remove(&lGlobalSettings,index); - HeapFree(hCacheHeap,HEAP_NO_SERIALIZE,V); - return NULL; - } } - else { - if ( bAllocate != 1 ) - return NULL; - - V = (DBCachedGlobalValue*)HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE+HEAP_ZERO_MEMORY,sizeof(DBCachedGlobalValue)); - V->name = szSetting; - li.List_Insert(&lGlobalSettings,V,index); - } - - return &V->value; - } - else { - DBCachedContactValue *V, *V1; - DBCachedContactValueList VLtemp,*VL; - - VLtemp.hContact=hContact; - if ( li.List_GetIndex(&lContacts,&VLtemp,&index)) { - VL = (DBCachedContactValueList*)lContacts.items[index]; - } - else { - if ( bAllocate == -1 ) - return NULL; - - VL = (DBCachedContactValueList*)HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE+HEAP_ZERO_MEMORY,sizeof(DBCachedContactValueList)); - VL->hContact = hContact; - li.List_Insert(&lContacts,VL,index); - } - - for ( V = VL->first; V != NULL; V = V->next) - if (strcmp(V->name,szSetting)==0) - break; - - if ( V == NULL ) - { if ( bAllocate != 1 ) - return NULL; - - V = HeapAlloc(hCacheHeap,HEAP_NO_SERIALIZE+HEAP_ZERO_MEMORY,sizeof(DBCachedContactValue)); - V->next = VL->first; - VL->first = V; - V->name = szSetting; - } - else if ( bAllocate == -1 ) { - FreeCachedVariant(&V->value); - if ( VL->first == V ) - VL->first = V->next; - for ( V1=VL->first; V1 != NULL; V1 = V1->next ) - if ( V1->next == V ) { - V1->next = V->next; - break; - } - HeapFree(hCacheHeap,HEAP_NO_SERIALIZE,V); - return NULL; - } - - return &V->value; -} } - -#define NeedBytes(n) if(bytesRemaining<(n)) pBlob=(PBYTE)DBRead(ofsBlobPtr,(n),&bytesRemaining) -#define MoveAlong(n) {int x=n; pBlob+=(x); ofsBlobPtr+=(x); bytesRemaining-=(x);} -#define VLT(n) ((n==DBVT_UTF8)?DBVT_ASCIIZ:n) -static __inline int GetContactSettingWorker(HANDLE hContact,DBCONTACTGETSETTING *dbcgs,int isStatic) -{ - struct DBContact dbc; - struct DBContactSettings dbcs; - DWORD ofsModuleName,ofsContact,ofsSettingsGroup,ofsBlobPtr; - int settingNameLen; - int bytesRemaining; - PBYTE pBlob; - char* szCachedSettingName; - - if ((!dbcgs->szSetting) || (!dbcgs->szModule)) - return 1; - settingNameLen=strlen(dbcgs->szSetting); - - EnterCriticalSection(&csDbAccess); - - log3("get [%08p] %s/%s",hContact,dbcgs->szModule,dbcgs->szSetting); - - szCachedSettingName = GetCachedSetting(dbcgs->szModule,dbcgs->szSetting,settingNameLen); - { - DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 0 ); - if ( pCachedValue != NULL ) { - if ( pCachedValue->type == DBVT_ASCIIZ || pCachedValue->type == DBVT_UTF8 ) { - int cbOrigLen = dbcgs->pValue->cchVal; - char* cbOrigPtr = dbcgs->pValue->pszVal; - memcpy( dbcgs->pValue, pCachedValue, sizeof( DBVARIANT )); - if ( isStatic ) { - int cbLen = 0; - if ( pCachedValue->pszVal != NULL ) - cbLen = strlen( pCachedValue->pszVal ); - - cbOrigLen--; - dbcgs->pValue->pszVal = cbOrigPtr; - if(cbLenpValue->pszVal,pCachedValue->pszVal,cbOrigLen); - dbcgs->pValue->pszVal[cbOrigLen]=0; - dbcgs->pValue->cchVal=cbLen; - } - else { - dbcgs->pValue->pszVal = (char*)mir_alloc(strlen(pCachedValue->pszVal)+1); - strcpy(dbcgs->pValue->pszVal,pCachedValue->pszVal); - } - } - else - memcpy( dbcgs->pValue, pCachedValue, sizeof( DBVARIANT )); - - switch( dbcgs->pValue->type ) { - case DBVT_BYTE: log1( "get cached byte: %d", dbcgs->pValue->bVal ); break; - case DBVT_WORD: log1( "get cached word: %d", dbcgs->pValue->wVal ); break; - case DBVT_DWORD: log1( "get cached dword: %d", dbcgs->pValue->dVal ); break; - case DBVT_UTF8: - case DBVT_ASCIIZ: log1( "get cached string: '%s'", dbcgs->pValue->pszVal); break; - default: log1( "get cached crap: %d", dbcgs->pValue->type ); break; - } - - LeaveCriticalSection(&csDbAccess); - return ( pCachedValue->type == DBVT_DELETED ) ? 1 : 0; - } } - - ofsModuleName=GetModuleNameOfs(dbcgs->szModule); - if(hContact==NULL) ofsContact=dbHeader.ofsUser; - else ofsContact=(DWORD)hContact; - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - if(dbc.signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsContact,ofsModuleName); - if(ofsSettingsGroup) { - dbcs=*(struct DBContactSettings*)DBRead(ofsSettingsGroup,sizeof(struct DBContactSettings),&bytesRemaining); - ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob); - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - while(pBlob[0]) { - NeedBytes(1+settingNameLen); - if(pBlob[0]==settingNameLen && !memcmp(pBlob+1,dbcgs->szSetting,settingNameLen)) { - MoveAlong(1+settingNameLen); - NeedBytes(5); - if(isStatic && pBlob[0]&DBVTF_VARIABLELENGTH && VLT(dbcgs->pValue->type) != VLT(pBlob[0])) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - dbcgs->pValue->type=pBlob[0]; - switch(pBlob[0]) { - case DBVT_DELETED: { /* this setting is deleted */ - dbcgs->pValue->type=DBVT_DELETED; - LeaveCriticalSection(&csDbAccess); - return 2; - } - case DBVT_BYTE: dbcgs->pValue->bVal=pBlob[1]; break; - case DBVT_WORD: dbcgs->pValue->wVal=*(PWORD)(pBlob+1); break; - case DBVT_DWORD: dbcgs->pValue->dVal=*(PDWORD)(pBlob+1); break; - case DBVT_UTF8: - case DBVT_ASCIIZ: - NeedBytes(3+*(PWORD)(pBlob+1)); - if(isStatic) { - dbcgs->pValue->cchVal--; - if(*(PWORD)(pBlob+1)pValue->cchVal) dbcgs->pValue->cchVal=*(PWORD)(pBlob+1); - CopyMemory(dbcgs->pValue->pszVal,pBlob+3,dbcgs->pValue->cchVal); - dbcgs->pValue->pszVal[dbcgs->pValue->cchVal]=0; - dbcgs->pValue->cchVal=*(PWORD)(pBlob+1); - } - else { - dbcgs->pValue->pszVal=(char*)mir_alloc(1+*(PWORD)(pBlob+1)); - CopyMemory(dbcgs->pValue->pszVal,pBlob+3,*(PWORD)(pBlob+1)); - dbcgs->pValue->pszVal[*(PWORD)(pBlob+1)]=0; - } - break; - case DBVT_BLOB: - NeedBytes(3+*(PWORD)(pBlob+1)); - if(isStatic) { - if(*(PWORD)(pBlob+1)pValue->cpbVal) dbcgs->pValue->cpbVal=*(PWORD)(pBlob+1); - CopyMemory(dbcgs->pValue->pbVal,pBlob+3,dbcgs->pValue->cchVal); - } - else { - dbcgs->pValue->pbVal=(char*)mir_alloc(*(PWORD)(pBlob+1)); - CopyMemory(dbcgs->pValue->pbVal,pBlob+3,*(PWORD)(pBlob+1)); - } - dbcgs->pValue->cpbVal=*(PWORD)(pBlob+1); - break; - } - - /**** add to cache **********************/ - if ( dbcgs->pValue->type != DBVT_BLOB ) - { - DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 1 ); - if ( pCachedValue != NULL ) - SetCachedVariant(dbcgs->pValue,pCachedValue); - } - - LeaveCriticalSection(&csDbAccess); - logg(); - return 0; - } - NeedBytes(1); - MoveAlong(pBlob[0]+1); - NeedBytes(3); - MoveAlong(1+GetSettingValueLength(pBlob)); - NeedBytes(1); - } } - - /**** add missing setting to cache **********************/ - if ( dbcgs->pValue->type != DBVT_BLOB ) - { - DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 1 ); - if ( pCachedValue != NULL ) - pCachedValue->type = DBVT_DELETED; - } - - LeaveCriticalSection(&csDbAccess); - logg(); - return 1; -} - -static int GetContactSetting(WPARAM wParam,LPARAM lParam) -{ - DBCONTACTGETSETTING* dgs = ( DBCONTACTGETSETTING* )lParam; - dgs->pValue->type = 0; - if ( GetContactSettingWorker(( HANDLE )wParam, dgs, 0 )) - return 1; - - if ( dgs->pValue->type == DBVT_UTF8 ) { - mir_utf8decode( dgs->pValue->pszVal, NULL ); - dgs->pValue->type = DBVT_ASCIIZ; - } - - return 0; -} - -static int GetContactSettingStr(WPARAM wParam,LPARAM lParam) -{ - DBCONTACTGETSETTING* dgs = (DBCONTACTGETSETTING*)lParam; - int iSaveType = dgs->pValue->type; - - if ( GetContactSettingWorker(( HANDLE )wParam, dgs, 0 )) - return 1; - - if ( iSaveType == 0 || iSaveType == dgs->pValue->type ) - return 0; - - if ( dgs->pValue->type != DBVT_ASCIIZ && dgs->pValue->type != DBVT_UTF8 ) - return 0; - - if ( iSaveType == DBVT_WCHAR ) { - if ( dgs->pValue->type != DBVT_UTF8 ) { - int len = MultiByteToWideChar( CP_ACP, 0, dgs->pValue->pszVal, -1, NULL, 0 ); - wchar_t* wszResult = ( wchar_t* )mir_alloc(( len+1 )*sizeof( wchar_t )); - if ( wszResult == NULL ) - return 1; - - MultiByteToWideChar( CP_ACP, 0, dgs->pValue->pszVal, -1, wszResult, len ); - wszResult[ len ] = 0; - mir_free( dgs->pValue->pszVal ); - dgs->pValue->pwszVal = wszResult; - } - else { - char* savePtr = dgs->pValue->pszVal; - mir_utf8decode( dgs->pValue->pszVal, &dgs->pValue->pwszVal ); - mir_free( savePtr ); - } - } - else if ( iSaveType == DBVT_UTF8 ) { - char* tmpBuf = mir_utf8encode( dgs->pValue->pszVal ); - if ( tmpBuf == NULL ) - return 1; - - mir_free( dgs->pValue->pszVal ); - dgs->pValue->pszVal = tmpBuf; - } - else if ( iSaveType == DBVT_ASCIIZ ) - mir_utf8decode( dgs->pValue->pszVal, NULL ); - - dgs->pValue->type = iSaveType; - return 0; -} - -static int GetContactSettingStatic(WPARAM wParam,LPARAM lParam) -{ - DBCONTACTGETSETTING* dgs = (DBCONTACTGETSETTING*)lParam; - if ( GetContactSettingWorker(( HANDLE )wParam, dgs, 1 )) - return 1; - - if ( dgs->pValue->type == DBVT_UTF8 ) { - mir_utf8decode( dgs->pValue->pszVal, NULL ); - dgs->pValue->type = DBVT_ASCIIZ; - } - - return 0; -} - -static int FreeVariant(WPARAM wParam,LPARAM lParam) -{ - DBVARIANT *dbv=(DBVARIANT*)lParam; - if ( dbv == 0 ) return 1; - switch ( dbv->type ) { - case DBVT_ASCIIZ: - case DBVT_UTF8: - case DBVT_WCHAR: - { - if ( dbv->pszVal ) mir_free(dbv->pszVal); - dbv->pszVal=0; - break; - } - case DBVT_BLOB: - { - if ( dbv->pbVal ) mir_free(dbv->pbVal); - dbv->pbVal=0; - break; - } - } - dbv->type=0; - return 0; -} - -static int SetSettingResident(WPARAM wParam,LPARAM lParam) -{ - char* szSetting; - size_t cbSettingNameLen = strlen(( char* )lParam ); - int idx; - char* szTemp = ( char* )alloca( cbSettingNameLen+2 ); - strcpy( szTemp+1, ( char* )lParam ); - - EnterCriticalSection(&csDbAccess); - if ( !li.List_GetIndex( &lSettings, szTemp, &idx )) - szSetting = InsertCachedSetting( szTemp, cbSettingNameLen+2, idx ); - else - szSetting = lSettings.items[ idx ]; - - *szSetting = (char)wParam; - - LeaveCriticalSection(&csDbAccess); - return 0; -} - -static int WriteContactSetting(WPARAM wParam,LPARAM lParam) -{ - DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam; - struct DBContact dbc; - DWORD ofsModuleName; - struct DBContactSettings dbcs; - PBYTE pBlob; - int settingNameLen=0; - int moduleNameLen=0; - int settingDataLen=0; - - int bytesRequired,bytesRemaining; - DWORD ofsContact,ofsSettingsGroup,ofsBlobPtr; - - if (dbcws == NULL) - return 1; - - if (dbcws->value.type == DBVT_WCHAR) { - if (dbcws->value.pszVal != NULL) { - char* val = mir_utf8encodeW(dbcws->value.pwszVal); - if ( val == NULL ) - return 1; - - dbcws->value.pszVal = ( char* )alloca( strlen( val )+1 ); - strcpy( dbcws->value.pszVal, val ); - mir_free(val); - dbcws->value.type = DBVT_UTF8; - } - else return 1; - } - - if(dbcws->value.type!=DBVT_BYTE && dbcws->value.type!=DBVT_WORD && dbcws->value.type!=DBVT_DWORD && dbcws->value.type!=DBVT_ASCIIZ && dbcws->value.type!=DBVT_UTF8 && dbcws->value.type!=DBVT_BLOB) - return 1; - if ((!dbcws->szModule) || (!dbcws->szSetting) || ((dbcws->value.type == DBVT_ASCIIZ || dbcws->value.type == DBVT_UTF8 )&& dbcws->value.pszVal == NULL) || (dbcws->value.type == DBVT_BLOB && dbcws->value.pbVal == NULL) ) - return 1; - // the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name - settingNameLen=strlen(dbcws->szSetting); - moduleNameLen=strlen(dbcws->szModule); - if ( settingNameLen > 0xFE ) - { - #ifdef _DEBUG - OutputDebugString("WriteContactSetting() got a > 255 setting name length. \n"); - #endif - return 1; - } - if ( moduleNameLen > 0xFE ) - { - #ifdef _DEBUG - OutputDebugString("WriteContactSetting() got a > 255 module name length. \n"); - #endif - return 1; - } - - // the db can not tolerate strings/blobs longer than 0xFFFF since the format writes 2 lengths - switch( dbcws->value.type ) { - case DBVT_ASCIIZ: case DBVT_BLOB: case DBVT_UTF8: - { int len = ( dbcws->value.type != DBVT_BLOB ) ? strlen(dbcws->value.pszVal) : dbcws->value.cpbVal; - if ( len >= 0xFFFF ) { - #ifdef _DEBUG - OutputDebugString("WriteContactSetting() writing huge string/blob, rejecting ( >= 0xFFFF ) \n"); - #endif - return 1; - } - } - } - - EnterCriticalSection(&csDbAccess); - { - char* szCachedSettingName = GetCachedSetting(dbcws->szModule, dbcws->szSetting, settingNameLen); - if ( dbcws->value.type != DBVT_BLOB ) { - DBVARIANT* pCachedValue = GetCachedValuePtr((HANDLE)wParam, szCachedSettingName, 1); - if ( pCachedValue != NULL ) { - BOOL bIsIdentical = FALSE; - if ( pCachedValue->type == dbcws->value.type ) { - switch(dbcws->value.type) { - case DBVT_BYTE: bIsIdentical = pCachedValue->bVal == dbcws->value.bVal; break; - case DBVT_WORD: bIsIdentical = pCachedValue->wVal == dbcws->value.wVal; break; - case DBVT_DWORD: bIsIdentical = pCachedValue->dVal == dbcws->value.dVal; break; - case DBVT_UTF8: - case DBVT_ASCIIZ: bIsIdentical = strcmp( pCachedValue->pszVal, dbcws->value.pszVal ) == 0; break; - } - if ( bIsIdentical ) { - LeaveCriticalSection(&csDbAccess); - return 0; - } - } - SetCachedVariant(&dbcws->value, pCachedValue); - } - if ( szCachedSettingName[-1] != 0 ) { - LeaveCriticalSection(&csDbAccess); - NotifyEventHooks(hSettingChangeEvent,wParam,lParam); - return 0; - } - } - else GetCachedValuePtr((HANDLE)wParam, szCachedSettingName, -1); - } - - ofsModuleName=GetModuleNameOfs(dbcws->szModule); - if(wParam==0) ofsContact=dbHeader.ofsUser; - else ofsContact=wParam; - - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - if(dbc.signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - log0("write setting"); - //make sure the module group exists - ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsContact,ofsModuleName); - if(ofsSettingsGroup==0) { //module group didn't exist - make it - if(dbcws->value.type&DBVTF_VARIABLELENGTH) { - if(dbcws->value.type==DBVT_ASCIIZ || dbcws->value.type==DBVT_UTF8) bytesRequired=strlen(dbcws->value.pszVal)+2; - else if(dbcws->value.type==DBVT_BLOB) bytesRequired=dbcws->value.cpbVal+2; - } - else bytesRequired=dbcws->value.type; - bytesRequired+=2+settingNameLen; - bytesRequired+=(DB_SETTINGS_RESIZE_GRANULARITY-(bytesRequired%DB_SETTINGS_RESIZE_GRANULARITY))%DB_SETTINGS_RESIZE_GRANULARITY; - ofsSettingsGroup=CreateNewSpace(bytesRequired+offsetof(struct DBContactSettings,blob)); - dbcs.signature=DBCONTACTSETTINGS_SIGNATURE; - dbcs.ofsNext=dbc.ofsFirstSettings; - dbcs.ofsModuleName=ofsModuleName; - dbcs.cbBlob=bytesRequired; - dbcs.blob[0]=0; - dbc.ofsFirstSettings=ofsSettingsGroup; - DBWrite(ofsContact,&dbc,sizeof(struct DBContact)); - DBWrite(ofsSettingsGroup,&dbcs,sizeof(struct DBContactSettings)); - ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob); - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - } - else { - dbcs=*(struct DBContactSettings*)DBRead(ofsSettingsGroup,sizeof(struct DBContactSettings),&bytesRemaining); - //find if the setting exists - ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob); - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - while(pBlob[0]) { - NeedBytes(settingNameLen+1); - if(pBlob[0]==settingNameLen && !memcmp(pBlob+1,dbcws->szSetting,settingNameLen)) - break; - NeedBytes(1); - MoveAlong(pBlob[0]+1); - NeedBytes(3); - MoveAlong(1+GetSettingValueLength(pBlob)); - NeedBytes(1); - } - if(pBlob[0]) { //setting already existed, and up to end of name is in cache - MoveAlong(1+settingNameLen); - //if different type or variable length and length is different - NeedBytes(3); - if(pBlob[0]!=dbcws->value.type || ((pBlob[0]==DBVT_ASCIIZ || pBlob[0]==DBVT_UTF8) && *(PWORD)(pBlob+1)!=strlen(dbcws->value.pszVal)) || (pBlob[0]==DBVT_BLOB && *(PWORD)(pBlob+1)!=dbcws->value.cpbVal)) { - //bin it - int nameLen,valLen; - DWORD ofsSettingToCut; - NeedBytes(3); - nameLen=1+settingNameLen; - valLen=1+GetSettingValueLength(pBlob); - ofsSettingToCut=ofsBlobPtr-nameLen; - MoveAlong(valLen); - NeedBytes(1); - while(pBlob[0]) { - MoveAlong(pBlob[0]+1); - NeedBytes(3); - MoveAlong(1+GetSettingValueLength(pBlob)); - NeedBytes(1); - } - DBMoveChunk(ofsSettingToCut,ofsSettingToCut+nameLen+valLen,ofsBlobPtr+1-ofsSettingToCut); - ofsBlobPtr-=nameLen+valLen; - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - } - else { - //replace existing setting at pBlob - MoveAlong(1); //skip data type - switch(dbcws->value.type) { - case DBVT_BYTE: DBWrite(ofsBlobPtr,&dbcws->value.bVal,1); break; - case DBVT_WORD: DBWrite(ofsBlobPtr,&dbcws->value.wVal,2); break; - case DBVT_DWORD: DBWrite(ofsBlobPtr,&dbcws->value.dVal,4); break; - case DBVT_UTF8: - case DBVT_ASCIIZ: DBWrite(ofsBlobPtr+2,dbcws->value.pszVal,strlen(dbcws->value.pszVal)); break; - case DBVT_BLOB: DBWrite(ofsBlobPtr+2,dbcws->value.pbVal,dbcws->value.cpbVal); break; - } - //quit - DBFlush(1); - LeaveCriticalSection(&csDbAccess); - //notify - NotifyEventHooks(hSettingChangeEvent,wParam,lParam); - return 0; - } - } - } - //cannot do a simple replace, add setting to end of list - //pBlob already points to end of list - //see if it fits - if(dbcws->value.type&DBVTF_VARIABLELENGTH) { - if(dbcws->value.type==DBVT_ASCIIZ || dbcws->value.type==DBVT_UTF8) bytesRequired=strlen(dbcws->value.pszVal)+2; - else if(dbcws->value.type==DBVT_BLOB) bytesRequired=dbcws->value.cpbVal+2; - } - else bytesRequired=dbcws->value.type; - bytesRequired+=2+settingNameLen; - bytesRequired+=ofsBlobPtr+1-(ofsSettingsGroup+offsetof(struct DBContactSettings,blob)); - if((DWORD)bytesRequired>dbcs.cbBlob) { - //doesn't fit: move entire group - struct DBContactSettings *dbcsPrev; - DWORD ofsDbcsPrev,oldSize,ofsNew; - - InvalidateSettingsGroupOfsCacheEntry(ofsSettingsGroup); - bytesRequired+=(DB_SETTINGS_RESIZE_GRANULARITY-(bytesRequired%DB_SETTINGS_RESIZE_GRANULARITY))%DB_SETTINGS_RESIZE_GRANULARITY; - //find previous group to change its offset - ofsDbcsPrev=dbc.ofsFirstSettings; - if(ofsDbcsPrev==ofsSettingsGroup) ofsDbcsPrev=0; - else { - dbcsPrev=(struct DBContactSettings*)DBRead(ofsDbcsPrev,sizeof(struct DBContactSettings),NULL); - while(dbcsPrev->ofsNext!=ofsSettingsGroup) { - if(dbcsPrev->ofsNext==0) DatabaseCorruption(); - ofsDbcsPrev=dbcsPrev->ofsNext; - dbcsPrev=(struct DBContactSettings*)DBRead(ofsDbcsPrev,sizeof(struct DBContactSettings),NULL); - } - } - //create the new one - ofsNew=CreateNewSpace(bytesRequired+offsetof(struct DBContactSettings,blob)); - //copy across - DBMoveChunk(ofsNew,ofsSettingsGroup,bytesRequired+offsetof(struct DBContactSettings,blob)); - oldSize=dbcs.cbBlob; - dbcs.cbBlob=bytesRequired; - DBWrite(ofsNew,&dbcs,offsetof(struct DBContactSettings,blob)); - if(ofsDbcsPrev==0) { - dbc.ofsFirstSettings=ofsNew; - DBWrite(ofsContact,&dbc,sizeof(struct DBContact)); - } - else { - dbcsPrev=(struct DBContactSettings*)DBRead(ofsDbcsPrev,sizeof(struct DBContactSettings),NULL); - dbcsPrev->ofsNext=ofsNew; - DBWrite(ofsDbcsPrev,dbcsPrev,offsetof(struct DBContactSettings,blob)); - } - DeleteSpace(ofsSettingsGroup,oldSize+offsetof(struct DBContactSettings,blob)); - ofsBlobPtr+=ofsNew-ofsSettingsGroup; - ofsSettingsGroup=ofsNew; - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - } - //we now have a place to put it and enough space: make it - DBWrite(ofsBlobPtr,&settingNameLen,1); - DBWrite(ofsBlobPtr+1,(PVOID)dbcws->szSetting,settingNameLen); - MoveAlong(1+settingNameLen); - DBWrite(ofsBlobPtr,&dbcws->value.type,1); - MoveAlong(1); - switch(dbcws->value.type) { - case DBVT_BYTE: DBWrite(ofsBlobPtr,&dbcws->value.bVal,1); MoveAlong(1); break; - case DBVT_WORD: DBWrite(ofsBlobPtr,&dbcws->value.wVal,2); MoveAlong(2); break; - case DBVT_DWORD: DBWrite(ofsBlobPtr,&dbcws->value.dVal,4); MoveAlong(4); break; - case DBVT_UTF8: - case DBVT_ASCIIZ: - { int len=strlen(dbcws->value.pszVal); - DBWrite(ofsBlobPtr,&len,2); - DBWrite(ofsBlobPtr+2,dbcws->value.pszVal,len); - MoveAlong(2+len); - } - break; - case DBVT_BLOB: - DBWrite(ofsBlobPtr,&dbcws->value.cpbVal,2); - DBWrite(ofsBlobPtr+2,dbcws->value.pbVal,dbcws->value.cpbVal); - MoveAlong(2+dbcws->value.cpbVal); - break; - } - { BYTE zero=0; - DBWrite(ofsBlobPtr,&zero,1); - } - //quit - DBFlush(1); - LeaveCriticalSection(&csDbAccess); - //notify - NotifyEventHooks(hSettingChangeEvent,wParam,lParam); - return 0; -} - -static int DeleteContactSetting(WPARAM wParam,LPARAM lParam) -{ - DBCONTACTGETSETTING *dbcgs=(DBCONTACTGETSETTING*)lParam; - struct DBContact *dbc; - DWORD ofsModuleName,ofsSettingsGroup,ofsBlobPtr; - struct DBContactSettings dbcs; - PBYTE pBlob; - int settingNameLen=strlen(dbcgs->szSetting),bytesRemaining; - char* szCachedSettingName; - WPARAM saveWparam = wParam; - - if ((!dbcgs->szModule) || (!dbcgs->szSetting)) - return 1; - - EnterCriticalSection(&csDbAccess); - ofsModuleName=GetModuleNameOfs(dbcgs->szModule); - if(wParam==0) wParam=dbHeader.ofsUser; - - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - //make sure the module group exists - ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(dbc,wParam,ofsModuleName); - if(ofsSettingsGroup==0) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); - if(dbc->signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(dbc,wParam,ofsModuleName); - if(ofsSettingsGroup==0) { - LeaveCriticalSection(&csDbAccess); - return 1; - } - dbcs=*(struct DBContactSettings*)DBRead(ofsSettingsGroup,sizeof(struct DBContactSettings),NULL); - //find if the setting exists - ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob); - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - while(pBlob[0]) { - NeedBytes(settingNameLen+1); - if(pBlob[0]==settingNameLen && !memcmp(pBlob+1,dbcgs->szSetting,settingNameLen)) - break; - NeedBytes(1); - MoveAlong(pBlob[0]+1); - NeedBytes(3); - MoveAlong(1+GetSettingValueLength(pBlob)); - NeedBytes(1); - } - if(!pBlob[0]) { //setting didn't exist - LeaveCriticalSection(&csDbAccess); - return 1; - } - { //bin it - int nameLen,valLen; - DWORD ofsSettingToCut; - MoveAlong(1+settingNameLen); - NeedBytes(3); - nameLen=1+settingNameLen; - valLen=1+GetSettingValueLength(pBlob); - ofsSettingToCut=ofsBlobPtr-nameLen; - MoveAlong(valLen); - NeedBytes(1); - while(pBlob[0]) { - MoveAlong(pBlob[0]+1); - NeedBytes(3); - MoveAlong(1+GetSettingValueLength(pBlob)); - NeedBytes(1); - } - DBMoveChunk(ofsSettingToCut,ofsSettingToCut+nameLen+valLen,ofsBlobPtr+1-ofsSettingToCut); - } - - szCachedSettingName = GetCachedSetting(dbcgs->szModule,dbcgs->szSetting,settingNameLen); - GetCachedValuePtr((HANDLE)saveWparam, szCachedSettingName, -1 ); - - //quit - DBFlush(1); - LeaveCriticalSection(&csDbAccess); - { //notify - DBCONTACTWRITESETTING dbcws; - dbcws.szModule=dbcgs->szModule; - dbcws.szSetting=dbcgs->szSetting; - dbcws.value.type=DBVT_DELETED; - NotifyEventHooks(hSettingChangeEvent,saveWparam,(LPARAM)&dbcws); - } - return 0; -} - -static int EnumContactSettings(WPARAM wParam,LPARAM lParam) -{ - DBCONTACTENUMSETTINGS *dbces=(DBCONTACTENUMSETTINGS*)lParam; - struct DBContact dbc; - struct DBContactSettings dbcs; - DWORD ofsModuleName,ofsContact,ofsBlobPtr; - int bytesRemaining, result; - PBYTE pBlob; - char szSetting[256]; - - if (!dbces->szModule) - return -1; - - EnterCriticalSection(&csDbAccess); - - ofsModuleName=GetModuleNameOfs(dbces->szModule); - if(wParam==0) ofsContact=dbHeader.ofsUser; - else ofsContact=wParam; - dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL); - if(dbc.signature!=DBCONTACT_SIGNATURE) { - LeaveCriticalSection(&csDbAccess); - return -1; - } - dbces->ofsSettings=GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsContact,ofsModuleName); - if(!dbces->ofsSettings) { - LeaveCriticalSection(&csDbAccess); - return -1; - } - dbcs=*(struct DBContactSettings*)DBRead(dbces->ofsSettings,sizeof(struct DBContactSettings),&bytesRemaining); - ofsBlobPtr=dbces->ofsSettings+offsetof(struct DBContactSettings,blob); - pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining); - if(pBlob[0]==0) { - LeaveCriticalSection(&csDbAccess); - return -1; - } - result = 0; - while(pBlob[0]) { - NeedBytes(1); - NeedBytes(1+pBlob[0]); - CopyMemory(szSetting,pBlob+1,pBlob[0]); szSetting[pBlob[0]]=0; - result = (dbces->pfnEnumProc)(szSetting,dbces->lParam); - MoveAlong(1+pBlob[0]); - NeedBytes(3); - MoveAlong(1+GetSettingValueLength(pBlob)); - NeedBytes(1); - } - LeaveCriticalSection(&csDbAccess); - return result; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// -// Module initialization procedure - -static int stringCompare( DBCachedSettingName* p1, DBCachedSettingName* p2 ) -{ - return strcmp( p1->name, p2->name ); -} - -static int stringCompare2( DBCachedGlobalValue* p1, DBCachedGlobalValue* p2 ) -{ - return strcmp( p1->name, p2->name ); -} - -static int handleCompare( void* p1, void* p2 ) -{ - if ( *( long* )p1 == *( long* )p2 ) - return 0; - - return *( long* )p1 - *( long* )p2; -} - -int InitSettings(void) -{ - CreateServiceFunction(MS_DB_CONTACT_GETSETTING,GetContactSetting); - CreateServiceFunction(MS_DB_CONTACT_GETSETTING_STR,GetContactSettingStr); - CreateServiceFunction(MS_DB_CONTACT_GETSETTINGSTATIC,GetContactSettingStatic); - CreateServiceFunction(MS_DB_CONTACT_FREEVARIANT,FreeVariant); - CreateServiceFunction(MS_DB_CONTACT_WRITESETTING,WriteContactSetting); - CreateServiceFunction(MS_DB_CONTACT_DELETESETTING,DeleteContactSetting); - CreateServiceFunction(MS_DB_CONTACT_ENUMSETTINGS,EnumContactSettings); - CreateServiceFunction(MS_DB_SETSETTINGRESIDENT,SetSettingResident); - hSettingChangeEvent=CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED); - - hCacheHeap=HeapCreate(HEAP_NO_SERIALIZE,0,0); - lSettings.sortFunc=stringCompare; - lSettings.increment=50; - lContacts.sortFunc=handleCompare; - lContacts.increment=100; - lGlobalSettings.sortFunc=stringCompare2; - lGlobalSettings.increment=100; - return 0; -} - -void UninitSettings(void) -{ - HeapDestroy(hCacheHeap); - li.List_Destroy(&lContacts); - li.List_Destroy(&lSettings); - li.List_Destroy(&lGlobalSettings); -} diff --git a/clist_classic_sje/dbtime.c b/clist_classic_sje/dbtime.c deleted file mode 100644 index e9189b9..0000000 --- a/clist_classic_sje/dbtime.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" - -static int daysInMonth[12]={31,28,31,30,31,30,31,31,30,31,30,31}; -static int IsLeapYear(int year) -{ - if(year&3) return 0; - if(year%100) return 1; - if(year%400) return 0; - return 1; -} - -static int CompareSystemTimes(SYSTEMTIME *st,SYSTEMTIME *switchDate) -{ - FILETIME ft1,ft2; - - if(switchDate->wYear==0) { //strange day-in-month thing - SYSTEMTIME tempst; - - //short-circuit if the months aren't the same - if(st->wMonthwMonth) return -1; - if(st->wMonth>switchDate->wMonth) return 1; - - tempst=*switchDate; - tempst.wYear=st->wYear; - tempst.wDay=1; - SystemTimeToFileTime(&tempst,&ft1); - FileTimeToSystemTime(&ft1,&tempst); //gets the day of week of the first of the month - tempst.wDay=1+(7+switchDate->wDayOfWeek-tempst.wDayOfWeek)%7; - if(switchDate->wDay==5) { //last wDayOfWeek in month - if(tempst.wMonth==2) { - if(IsLeapYear(tempst.wYear)) daysInMonth[1]=29; - else daysInMonth[1]=28; - } - tempst.wDay+=7*3; //can't be less than 4 of that day in the month - if(tempst.wDay+7<=daysInMonth[switchDate->wMonth-1]) tempst.wDay+=7; - } - else tempst.wDay+=7*(switchDate->wDay-1); //nth of month - SystemTimeToFileTime(&tempst,&ft2); - } - else { - switchDate->wYear=st->wYear; - SystemTimeToFileTime(switchDate,&ft2); - } - SystemTimeToFileTime(st,&ft1); - return CompareFileTime(&ft1,&ft2); -} - -static int TimestampToLocal(WPARAM wParam,LPARAM lParam) -{ - TIME_ZONE_INFORMATION tzInfo; - LARGE_INTEGER liFiletime; - FILETIME filetime; - SYSTEMTIME st; - - GetTimeZoneInformation(&tzInfo); - if(tzInfo.StandardDate.wMonth==0) { //no daylight savings time - return (int)(wParam-tzInfo.Bias*60); - } - //this huge number is the difference between 1970 and 1601 in seconds - liFiletime.QuadPart=(mir_i64(11644473600)+(__int64)wParam)*10000000; - filetime.dwHighDateTime=liFiletime.HighPart; - filetime.dwLowDateTime=liFiletime.LowPart; - FileTimeToSystemTime(&filetime,&st); - if(tzInfo.DaylightDate.wMonth0) { - return (int)(wParam-(tzInfo.Bias+tzInfo.StandardBias)*60); - } - return (int)(wParam-(tzInfo.Bias+tzInfo.DaylightBias)*60); - } - else { - //southern hemisphere - if(CompareSystemTimes(&st,&tzInfo.StandardDate)<0 || - CompareSystemTimes(&st,&tzInfo.DaylightDate)>0) { - return (int)(wParam-(tzInfo.Bias+tzInfo.DaylightBias)*60); - } - return (int)(wParam-(tzInfo.Bias+tzInfo.StandardBias)*60); - } - return 0; -} - -static int TimestampToString(WPARAM wParam,LPARAM lParam) -{ - DBTIMETOSTRING *tts=(DBTIMETOSTRING*)lParam; - LARGE_INTEGER liFiletime; - FILETIME filetime; - SYSTEMTIME st; - char dateTimeStr[64]; - char *pDest,*pFormat; - int destCharsLeft,dateTimeStrLen; - - //this huge number is the difference between 1970 and 1601 in seconds - liFiletime.QuadPart=(mir_i64(11644473600)+(__int64)(DWORD)TimestampToLocal(wParam,0))*10000000; - filetime.dwHighDateTime=liFiletime.HighPart; - filetime.dwLowDateTime=liFiletime.LowPart; - FileTimeToSystemTime(&filetime,&st); - destCharsLeft=tts->cbDest; - for(pFormat=tts->szFormat,pDest=tts->szDest;*pFormat;pFormat++) { - switch(*pFormat) { - case 't': - GetTimeFormat(LOCALE_USER_DEFAULT,TIME_NOSECONDS,&st,NULL,dateTimeStr,sizeof(dateTimeStr)); - break; - case 's': - GetTimeFormat(LOCALE_USER_DEFAULT,0,&st,NULL,dateTimeStr,sizeof(dateTimeStr)); - break; - case 'm': - GetTimeFormat(LOCALE_USER_DEFAULT,TIME_NOMINUTESORSECONDS,&st,NULL,dateTimeStr,sizeof(dateTimeStr)); - break; - case 'd': - GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&st,NULL,dateTimeStr,sizeof(dateTimeStr)); - break; - case 'D': - GetDateFormat(LOCALE_USER_DEFAULT,DATE_LONGDATE,&st,NULL,dateTimeStr,sizeof(dateTimeStr)); - break; - default: - if(destCharsLeft) { - *pDest++=*pFormat; - destCharsLeft--; - } - continue; - } - dateTimeStrLen=strlen(dateTimeStr); - if(destCharsLeftszDest[tts->cbDest-1]=0; - return 0; -} - -int InitTime(void) -{ - CreateServiceFunction(MS_DB_TIME_TIMESTAMPTOLOCAL,TimestampToLocal); - CreateServiceFunction(MS_DB_TIME_TIMESTAMPTOSTRING,TimestampToString); - return 0; -} diff --git a/clist_classic_sje/docs/clist-license.txt b/clist_classic_sje/docs/clist-license.txt deleted file mode 100644 index 7f11610..0000000 --- a/clist_classic_sje/docs/clist-license.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/clist_classic_sje/docs/clist-readme.txt b/clist_classic_sje/docs/clist-readme.txt deleted file mode 100644 index 18d96a0..0000000 --- a/clist_classic_sje/docs/clist-readme.txt +++ /dev/null @@ -1,38 +0,0 @@ -################################################################ -# Classic Contact List Plugin -################################################################ - -About ------ -The Classic Contact List control is used to view your contacts -in Miranda IM. - - -Requirements ------------- - - Miranda IM 0.4 - - -History -------- -0.4.0.0 - - CList separated from core (initial release) - - -Copyright ---------- -Copyright (C) 2003-2005 Miranda IM Development Team - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/clist_classic_sje/docs/clist-translation.txt b/clist_classic_sje/docs/clist-translation.txt deleted file mode 100644 index 2530575..0000000 --- a/clist_classic_sje/docs/clist-translation.txt +++ /dev/null @@ -1,216 +0,0 @@ -Miranda Language Pack Version 1 -Locale: 0809 -Authors: Miranda IM Development Team -Author-email: info@miranda-im.org -Last-Modified-Using: Miranda IM 0.4 -Plugins-included: - -; Generated by lpgen on Thu May 12 12:11:20 2005 -; Translations: 184 - -; clcitems.c -;[Offline] - -; clcopts.c -;[Contact List] -;[List] -;[List Background] -;[List Text] -;[] - -; clistmenus.c -;[E&xit] -;[&Message] -;[&File] -;[User &Details] -;[View &History] - -; clistmod.c -;[Connecting] -;[Online] -;[Away] -;[DND] -;[NA] -;[Occupied] -;[Free for chat] -;[Invisible] -;[Out to lunch] -;[On the phone] -;[Idle] -;[Connecting (attempt %d)] -;[This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network.] -;[Delete Contact] -;[De&lete] -;[&Add permanently to list] - -; clistopts.c -;[Hotkeys] -;[Events] -;[Global] - -; clistsettings.c -;[(Unknown Contact)] -;['(Unknown Contact)'] - -; clisttray.c -;[&Main Menu] -;[&Status] - -; clui.c -;[&Rename] - -; cluiopts.c -;[Window] -;[Status Bar] - -; groups.c -;[New Group] -;[You already have a group with that name. Please enter a unique name for the group.] -;[Rename Group] -;[This group] - -; resource.rc -;[Hide from list only, in order to keep their history and ignore/visibility settings] -;[Are you sure you want to delete %s?] -;[Show/Hide:] -;[HotKey1] -;[Read Msg:] -;[Net Search:] -;[Open in new browser window] -;[Show Options] -;[Hide offline users] -;[Hide empty groups] -;[Disable groups] -;[Ask before deleting contacts] -;[Sort contacts by name] -;[Sort contacts by status] -;[Sort contacts by protocol] -;[Single click interface] -;[Always show status in tooltip] -;[Disable icon blinking] -;[Show] -;[Cycle icons every] -;[Spin1] -;[Show multiple icons] -;[Only when statuses differ] -;[Spin5] -;[Always on top] -;[Tool style main window] -;[Minimize to tray] -;[Hide contact list after it has been idle for] -;[Automatically resize window to height of list] -;[Size upwards] -;[Fade contact list in/out] -;[Transparent contact list] -;[Slider2] -;[Show menu bar] -;[Easy move] -;[Show title bar] -;[If window is partially covered, bring to front instead of hiding] -;[Show drop shadow (restart required)] -;[Pin to desktop] -;[Show divider between online and offline contacts] -;[Hot track items as mouse passes over] -;[Disable drag and drop of items] -;[Disable rename of items by clicking twice] -;[Show selection even when list is not focused] -;[Make selection highlight translucent] -;[Draw a line alongside group names] -;[Show counts of number of contacts in a group] -;[Hide group counts when there are none online] -;[Sort groups alphabetically] -;[Quicksearch in open groups only] -;[Scroll list smoothly] -;[Grey out entire list when:] -;[Dim idle contacts] -;[Hide vertical scroll bar] -;[Typeface] -;[Size] -;[Style] -;[Colour] -;[Bold] -;[Italic] -;[Underline] -;[Gamma correction] -;[Use background image] -;[Stretch to width] -;[Stretch to height] -;[Tile horizontally] -;[Tile vertically] -;[Scroll with text] -;[Stretch proportionally] -;[Use Windows colours] -;[Show status bar] -;[Show icons] -;[Show protocol names] -;[Show status text] -;[Right click opens status menu] -;[Right click opens Miranda IM menu] -;[Make sections equal width] -;[Show bevels on panels] -;[Show resize grip indicator] -;[No] -;[Yes] -;[...] -;[Use Options->Ignore (expert mode) to unhide contacts.] -;[This will erase all history and settings for this contact!] -;[URL:] -;[ms delay] -;[icon when statuses differ] -;[seconds, when statuses differ] -;[seconds] -;[maximum] -;[% of screen] -;[Title bar text:] -;[Inactive opacity:] -;[Active opacity:] -;[000%] -;['Hide Offline' means to hide:] -;[Indent groups by:] -;[pixels] -;[Time:] -;[milliseconds] -;[Left margin:] -;[same] -;[as:] -;[Row height:] -;[Selected text:] -;[Hottrack text:] -;[Quicksearch text:] -;[Size:] -;[Colour:] -;[Background colour] -;[Selection colour] -;[System tray icon] -;[System tray icon when using multiple protocols] -;[Contact List Sorting] -;[Translucency options (Windows 2000/XP only)] -;[Items] -;[Groups] -;[Visual] -;[Fonts] -;[Rows] -;[Additional Colours] -;[Contact List Background] -;[&Offline\tCtrl+0] -;[On&line\tCtrl+1] -;[&Away\tCtrl+2] -;[&NA\tCtrl+3] -;[Occ&upied\tCtrl+4] -;[&DND\tCtrl+5] -;[&Free for chat\tCtrl+6] -;[&Invisible\tCtrl+7] -;[On the &Phone\tCtrl+8] -;[Out to &Lunch\tCtrl+9] -;[&Hide/Show] -;[&New Group] -;[&Hide Offline Users] -;[Hide &Offline Users out here] -;[Hide &Empty Groups] -;[Disable &Groups] -;[Hide Miranda] -;[&New Subgroup] -;[&Hide Offline Users in here] -;[&Rename Group] -;[&Delete Group] - diff --git a/clist_classic_sje/docs/db3x-license.txt b/clist_classic_sje/docs/db3x-license.txt deleted file mode 100644 index 7f11610..0000000 --- a/clist_classic_sje/docs/db3x-license.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/clist_classic_sje/docs/db3x-readme.txt b/clist_classic_sje/docs/db3x-readme.txt deleted file mode 100644 index eb5707c..0000000 --- a/clist_classic_sje/docs/db3x-readme.txt +++ /dev/null @@ -1,38 +0,0 @@ -################################################################ -# Classic Database Driver for Miranda IM -################################################################ - -About ------ -The Classic Database Driver is used to store all contacts and -events in Miranda IM. - - -Requirements ------------- - - Miranda IM 0.4 - - -History -------- -0.4.0.0 - - DB driver separated from core (initial release) - - -Copyright ---------- -Copyright (C) 2003-2005 Miranda IM Development Team - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/clist_classic_sje/docs/db3x-translation.txt b/clist_classic_sje/docs/db3x-translation.txt deleted file mode 100644 index fc265cc..0000000 --- a/clist_classic_sje/docs/db3x-translation.txt +++ /dev/null @@ -1,43 +0,0 @@ -Miranda Language Pack Version 1 -Locale: 0809 -Authors: Miranda IM Development Team -Author-email: info@miranda-im.org -Last-Modified-Using: Miranda IM 0.4 -Plugins-included: - -; Generated by lpgen on Wed Apr 6 12:41:12 2005 -; Translations: 27 - -; database.c -;[Miranda has detected corruption in your database. This corruption maybe fixed by DBTool. Please download it from http://www.miranda-im.org. Miranda will now shutdown.] -;[Database Panic] - -; dbini.c -;[Invalid setting type. The first character of every value must be b, w, d, l, s or n.] -;[Install Database Settings] - -; resource.rc -;[&Allow all further changes to this section] -;[Yes] -;[&Yes] -;[No] -;[No to all] -;[&View contents] -;[&No] -;[Cancel Import] -;[&Recycle] -;[&Delete] -;[&Move/Rename] -;[&Leave] -;[A file containing new database settings has been placed in the Miranda IM directory.] -;[Do you want to import the settings now?] -;[Security systems to prevent malicious changes are in place and you will be warned before changes that are not known to be safe.] -;[Database settings are being imported from] -;[This file wishes to change the setting] -;[to the value] -;[Do you want to allow this change?] -;[The import has completed from] -;[What do you want to do with the file now?] -;[Database Setting Change] -;[Database Import Complete] - diff --git a/clist_classic_sje/encrypt.c b/clist_classic_sje/encrypt.c deleted file mode 100644 index 1382a27..0000000 --- a/clist_classic_sje/encrypt.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "database.h" - -//VERY VERY VERY BASIC ENCRYPTION FUNCTION - - -void Encrypt(char*msg,BOOL up) -{ - int i; - int jump; - if (up) - { - jump=5; - } - else - { - jump=-5; - } - - for (i=0;msg[i];i++) - { - msg[i]=msg[i]+jump; - } - -} - -static int EncodeString(WPARAM wParam,LPARAM lParam) -{ - Encrypt((char*)lParam,TRUE); - return 0; -} - -static int DecodeString(WPARAM wParam,LPARAM lParam) -{ - Encrypt((char*)lParam,FALSE); - return 0; -} - -int InitCrypt(void) -{ - CreateServiceFunction(MS_DB_CRYPT_ENCODESTRING,EncodeString); - CreateServiceFunction(MS_DB_CRYPT_DECODESTRING,DecodeString); - return 0; -} diff --git a/clist_classic_sje/encryption.h b/clist_classic_sje/encryption.h deleted file mode 100644 index 73c2d7e..0000000 --- a/clist_classic_sje/encryption.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -Miranda ICQ: the free icq client for MS Windows -Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ -#ifndef MODULAR -#include - -void Encrypt(char*msg,BOOL up); -#endif \ No newline at end of file diff --git a/clist_classic_sje/finalcommand.c b/clist_classic_sje/finalcommand.c deleted file mode 100644 index 2e8ecbb..0000000 --- a/clist_classic_sje/finalcommand.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" - -char exit_command[MAX_PATH], - exit_command_dir[MAX_PATH], - exit_command_params[MAX_PATH]; - -BOOL command_valid = FALSE, - command_dir_valid = FALSE, - command_params_valid = FALSE; - -void FinalCommandSetup(void) { - DBVARIANT dbv; - - if(!DBGetContactSetting(0, "db3x", "ExitCommand", &dbv) && dbv.type == DBVT_ASCIIZ) { - strncpy(exit_command, dbv.pszVal, MAX_PATH); - command_valid = TRUE; - DBFreeVariant(&dbv); - - if(!DBGetContactSetting(0, "db3x", "ExitCommandParams", &dbv) && dbv.type == DBVT_ASCIIZ) { - strncpy(exit_command_params, dbv.pszVal, MAX_PATH); - command_params_valid = TRUE; - DBFreeVariant(&dbv); - } - if(!DBGetContactSetting(0, "db3x", "ExitCommandDir", &dbv) && dbv.type == DBVT_ASCIIZ) { - strncpy(exit_command_dir, dbv.pszVal, MAX_PATH); - command_dir_valid = TRUE; - DBFreeVariant(&dbv); - } - } -} - -void FinalCommandExecute(void) { - if(command_valid) - ShellExecute(0, 0, exit_command, command_params_valid ? exit_command_params : 0, command_dir_valid ? exit_command_dir : 0, SW_SHOWNORMAL); -} diff --git a/clist_classic_sje/icon1.ico b/clist_classic_sje/icon1.ico deleted file mode 100644 index 171f5dd..0000000 Binary files a/clist_classic_sje/icon1.ico and /dev/null differ diff --git a/clist_classic_sje/options.c b/clist_classic_sje/options.c deleted file mode 100644 index 9381923..0000000 --- a/clist_classic_sje/options.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" -#include "../../include/m_utils.h" -#include "../../include/m_trigger.h" -#include "../updater/m_updater.h" - -#include - -#include "database.h" -#include "options.h" - -extern HINSTANCE g_hInst; -Options options; - - -#define SUB_DIR "\\AutoBackups" -int GetProfileDirectory(char *szPath,int cbPath) { - return CallService(MS_DB_GETPROFILEPATH, (WPARAM)cbPath, (LPARAM)szPath); -} - -int Backup(void); -int BackupService(WPARAM wParam, LPARAM lParam); -int SetBackupTimer(void); - -int LoadOptions(void) { - DBVARIANT dbv; - - options.backup_types = (BackupType)DBGetContactSettingByte(0, "db3x", "BackupType", (BYTE)(BT_EXIT | BT_PERIODIC)); - options.period = (unsigned int)DBGetContactSettingWord(0, "db3x", "Period", 1); - options.period_type = (PeriodType)DBGetContactSettingByte(0, "db3x", "PeriodType", (BYTE)PT_DAYS); - - if(!DBGetContactSetting(0, "db3x", "Folder", &dbv) && dbv.type == DBVT_ASCIIZ) { - if(strlen(dbv.pszVal) >= 2 && dbv.pszVal[1] == ':') { - strncpy(options.folder, dbv.pszVal, MAX_PATH); - } else { - GetProfileDirectory(options.folder, MAX_PATH); - strcat(options.folder, "\\"); - strcat(options.folder, dbv.pszVal); - } - DBFreeVariant(&dbv); - } else { - int len; - GetProfileDirectory(options.folder, MAX_PATH); - len = strlen(options.folder); - strncat(options.folder, SUB_DIR, MAX_PATH - len); - } - - options.num_backups = (unsigned int)DBGetContactSettingWord(0, "db3x", "NumBackups", 3); - - options.disable_progress = (BOOL)DBGetContactSettingByte(0, "db3x", "NoProgress", 0); - - SetBackupTimer(); - return 0; -} - -int SaveOptions(void) { - char prof_dir[MAX_PATH]; - int prof_len, opt_len; - - DBWriteContactSettingByte(0, "db3x", "BackupType", (BYTE)options.backup_types); - DBWriteContactSettingWord(0, "db3x", "Period", (WORD)options.period); - DBWriteContactSettingByte(0, "db3x", "PeriodType", (BYTE)options.period_type); - - GetProfileDirectory(prof_dir, MAX_PATH); - strcat(prof_dir, "\\"); - prof_len = strlen(prof_dir); - opt_len = strlen(options.folder); - - if(opt_len > prof_len && strncmp(options.folder, prof_dir, prof_len) == 0) { - DBWriteContactSettingString(0, "db3x", "Folder", (options.folder + prof_len)); - } else - DBWriteContactSettingString(0, "db3x", "Folder", options.folder); - - DBWriteContactSettingWord(0, "db3x", "NumBackups", (WORD)options.num_backups); - DBWriteContactSettingByte(0, "db3x", "NoProgress", (BYTE)options.disable_progress); - - SetBackupTimer(); - return 0; -} - -Options new_options; - -int SetDlgState(HWND hwndDlg) { - HWND hwndCtrl; - char buff[10]; - - if(new_options.backup_types == BT_DISABLED) { - CheckDlgButton(hwndDlg, IDC_RAD_DISABLED, BST_CHECKED); - hwndCtrl = GetDlgItem(hwndDlg, IDC_RAD_DISABLED); - EnableWindow(hwndCtrl, FALSE); - - CheckDlgButton(hwndDlg, IDC_RAD_START, BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_EXIT, BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_PERIODIC, BST_UNCHECKED); - hwndCtrl = GetDlgItem(hwndDlg, IDC_ED_PERIOD); - EnableWindow(hwndCtrl, FALSE); - hwndCtrl = GetDlgItem(hwndDlg, IDC_RAD_DAYS); - EnableWindow(hwndCtrl, FALSE); - hwndCtrl = GetDlgItem(hwndDlg, IDC_RAD_HOURS); - EnableWindow(hwndCtrl, FALSE); - } else { - hwndCtrl = GetDlgItem(hwndDlg, IDC_RAD_DISABLED); - EnableWindow(hwndCtrl, TRUE); - CheckDlgButton(hwndDlg, IDC_RAD_DISABLED, BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_START, new_options.backup_types & BT_START ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_EXIT, new_options.backup_types & BT_EXIT ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_PERIODIC, new_options.backup_types & BT_PERIODIC ? BST_CHECKED : BST_UNCHECKED); - hwndCtrl = GetDlgItem(hwndDlg, IDC_ED_PERIOD); - EnableWindow(hwndCtrl, new_options.backup_types & BT_PERIODIC); - hwndCtrl = GetDlgItem(hwndDlg, IDC_RAD_DAYS); - EnableWindow(hwndCtrl, new_options.backup_types & BT_PERIODIC); - hwndCtrl = GetDlgItem(hwndDlg, IDC_RAD_HOURS); - EnableWindow(hwndCtrl, new_options.backup_types & BT_PERIODIC); - } - - SetDlgItemText(hwndDlg, IDC_ED_PERIOD, itoa(new_options.period, buff, 10)); - - switch(new_options.period_type) { - case PT_DAYS: - CheckDlgButton(hwndDlg, IDC_RAD_DAYS, BST_CHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_HOURS, BST_UNCHECKED); - break; - case PT_HOURS: - CheckDlgButton(hwndDlg, IDC_RAD_DAYS, BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_RAD_HOURS, BST_CHECKED); - break; - } - - SetDlgItemText(hwndDlg, IDC_ED_NUMBACKUPS, itoa(new_options.num_backups, buff, 10)); - - SetDlgItemText(hwndDlg, IDC_ED_FOLDER, new_options.folder); - - CheckDlgButton(hwndDlg, IDC_CHK_NOPROG, new_options.disable_progress ? BST_CHECKED : BST_UNCHECKED); - - return 0; -} - -BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - char buff[10]; - char folder_buff[MAX_PATH]; - BROWSEINFO bi; - LPCITEMIDLIST pidl; - - switch ( msg ) { - case WM_INITDIALOG: - TranslateDialogDefault( hwndDlg ); - memcpy(&new_options, &options, sizeof(Options)); - SetDlgState(hwndDlg); - return TRUE; - case WM_COMMAND: - if ( HIWORD( wParam ) == EN_CHANGE && ( HWND )lParam == GetFocus()) { - switch( LOWORD( wParam )) { - case IDC_ED_PERIOD: - case IDC_ED_FOLDER: - case IDC_ED_NUMBACKUPS: - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - } - } - if ( HIWORD( wParam ) == BN_CLICKED ) { - switch( LOWORD( wParam )) { - case IDC_RAD_DISABLED: - if(IsDlgButtonChecked(hwndDlg, IDC_RAD_DISABLED)) { - new_options.backup_types = BT_DISABLED; - } - SetDlgState(hwndDlg); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_RAD_START: - if(IsDlgButtonChecked(hwndDlg, IDC_RAD_START)) - new_options.backup_types |= BT_START; - else - new_options.backup_types &= ~BT_START; - SetDlgState(hwndDlg); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_RAD_EXIT: - if(IsDlgButtonChecked(hwndDlg, IDC_RAD_EXIT)) - new_options.backup_types |= BT_EXIT; - else - new_options.backup_types &= ~BT_EXIT; - SetDlgState(hwndDlg); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_RAD_PERIODIC: - if(IsDlgButtonChecked(hwndDlg, IDC_RAD_PERIODIC)) - new_options.backup_types |= BT_PERIODIC; - else - new_options.backup_types &= ~BT_PERIODIC; - SetDlgState(hwndDlg); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_RAD_DAYS: - new_options.period_type = PT_DAYS; - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - case IDC_RAD_HOURS: - new_options.period_type = PT_HOURS; - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - - case IDC_BUT_BROWSE: - bi.hwndOwner = hwndDlg; - bi.pidlRoot = 0; - bi.pszDisplayName = folder_buff; - bi.lpszTitle = Translate("Select Backup Folder"); - bi.ulFlags = 0; - bi.lpfn = 0; - bi.lParam = 0; - bi.iImage = 0; - - if((pidl = SHBrowseForFolder(&bi)) != 0) { - SHGetPathFromIDList(pidl, folder_buff); - SetDlgItemText(hwndDlg, IDC_ED_FOLDER, folder_buff); - SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 ); - - CoTaskMemFree((void *)pidl); - } - break; - case IDC_BUT_NOW: - Backup(); - break; - case IDC_CHK_NOPROG: - new_options.disable_progress = IsDlgButtonChecked(hwndDlg, IDC_CHK_NOPROG); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - } - } - - break; - case WM_NOTIFY: - if (((LPNMHDR)lParam)->code == PSN_APPLY ) { - GetDlgItemText(hwndDlg, IDC_ED_PERIOD, buff, sizeof(buff)); - new_options.period = atoi(buff); - GetDlgItemText(hwndDlg, IDC_ED_NUMBACKUPS, buff, sizeof(buff)); - new_options.num_backups = atoi(buff); - GetDlgItemText(hwndDlg, IDC_ED_FOLDER, folder_buff, MAX_PATH); - - { - BOOL folder_ok = TRUE; - if(!CreateDirectory(folder_buff, 0)) { - DWORD err = GetLastError(); - if(err != ERROR_ALREADY_EXISTS) { - char msg_buff[512]; - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, err, 0, msg_buff, 512, 0); - MessageBox(0, msg_buff, Translate("Error Creating Backup Folder"), MB_OK | MB_ICONERROR); - folder_ok = FALSE; - } - } - - if(folder_ok) { - strncpy(new_options.folder, folder_buff, MAX_PATH); - memcpy(&options, &new_options, sizeof(Options)); - SaveOptions(); - } else { - memcpy(&new_options, &options, sizeof(Options)); - SetDlgState(hwndDlg); - } - } - return TRUE; - - } - break; - } - - return FALSE; -} - -int OptInit(WPARAM wParam, LPARAM lParam) { - OPTIONSDIALOGPAGE odp = {0}; -#define OPTIONPAGE_OLD_SIZE2 60 - //odp.cbSize = sizeof(odp); - odp.cbSize = OPTIONPAGE_OLD_SIZE2; - odp.position = -790000000; - odp.hInstance = g_hInst; - odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS); - odp.pszTitle = Translate("Database Backups"); - odp.pszGroup = Translate("Services"); - odp.flags = ODPF_BOLDGROUPS; - odp.nIDBottomSimpleControl = 0; - odp.pfnDlgProc = DlgProcOpts; - CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp ); - - return 0; -} - -int ModulesLoaded(WPARAM wParam, LPARAM lParam) { - CLISTMENUITEM menu; - - HookEvent(ME_OPT_INITIALISE, OptInit); - - ZeroMemory(&menu,sizeof(menu)); - menu.cbSize=sizeof(menu); - menu.flags = CMIM_ALL; - - menu.hIcon=LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_MENU)); - - // main menu item - menu.pszName = (char *)Translate("Backup Profile"); - menu.pszService = MS_DB_BACKUP; - menu.position = 500100000; - CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&menu); - - // register trigger action for triggerplugin - if(ServiceExists(MS_TRIGGER_REGISTERACTION)) { - // create update action for triggerplugin - ACTIONREGISTER ar = {0}; - ar.cbSize = sizeof(ACTIONREGISTER); - ar.pszName = Translate("Backup Database"); - ar.pszService = MS_DB_BACKUPTRGR; - - CallService(MS_TRIGGER_REGISTERACTION, 0, (LPARAM)&ar); - } - - - return 0; -} - -// can't do this on unload, since other plugins will be have already been unloaded, but their hooks -// for setting changed event not cleared. the backup on exit function will write to the db, calling those hooks. -int PreShutdown(WPARAM wParam, LPARAM lParam) { - if(options.backup_types & BT_EXIT) - Backup(); - - return 0; -} - -int BackupServiceTrgr(WPARAM wParam, LPARAM lParam) { - if(wParam & ACT_PERFORM) { - return CallService(MS_DB_BACKUP, 0, 0); - } - return 0; -} - -int InitOptions(void) { - - OleInitialize(0); - - CreateServiceFunction(MS_DB_BACKUP, BackupService); - CreateServiceFunction(MS_DB_BACKUPTRGR, BackupServiceTrgr); - - // we have to wait for the options module to load! - HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded); - - HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); - - // but, our stuff has loaded so... - LoadOptions(); - - if(options.backup_types & BT_START) - Backup(); - - return 0; -} - -int UninitOptions(void) { - - OleUninitialize(); - - return 0; -} - diff --git a/clist_classic_sje/options.h b/clist_classic_sje/options.h deleted file mode 100644 index 5f027bc..0000000 --- a/clist_classic_sje/options.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - -Miranda IM: the free IM client for Microsoft* Windows* - -Copyright 2000-2003 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include "resource.h" - -typedef enum { BT_DISABLED = 0, BT_START = 1, BT_EXIT = 2, BT_PERIODIC = 4} BackupType; -typedef enum { PT_DAYS, PT_HOURS} PeriodType; - -typedef struct Options_tag { - int backup_types; - unsigned int period; - PeriodType period_type; - char folder[MAX_PATH]; - unsigned int num_backups; - BOOL disable_progress; -} Options; - - -#define MS_DB_BACKUP "DB/Backup" -#define MS_DB_BACKUPTRGR "DB/BackupTrigger" diff --git a/clist_classic_sje/res/blank.ico b/clist_classic_sje/res/blank.ico deleted file mode 100644 index 7845f62..0000000 Binary files a/clist_classic_sje/res/blank.ico and /dev/null differ diff --git a/clist_classic_sje/res/delete.ico b/clist_classic_sje/res/delete.ico deleted file mode 100644 index 9b0f0ff..0000000 Binary files a/clist_classic_sje/res/delete.ico and /dev/null differ diff --git a/clist_classic_sje/res/dragcopy.cur b/clist_classic_sje/res/dragcopy.cur deleted file mode 100644 index 89c7c96..0000000 Binary files a/clist_classic_sje/res/dragcopy.cur and /dev/null differ diff --git a/clist_classic_sje/res/dropuser.cur b/clist_classic_sje/res/dropuser.cur deleted file mode 100644 index a84b19e..0000000 Binary files a/clist_classic_sje/res/dropuser.cur and /dev/null differ diff --git a/clist_classic_sje/res/hyperlin.cur b/clist_classic_sje/res/hyperlin.cur deleted file mode 100644 index f0f548c..0000000 Binary files a/clist_classic_sje/res/hyperlin.cur and /dev/null differ diff --git a/clist_classic_sje/res/rename.ico b/clist_classic_sje/res/rename.ico deleted file mode 100644 index 2c6bc2a..0000000 Binary files a/clist_classic_sje/res/rename.ico and /dev/null differ diff --git a/clist_classic_sje/resource.h b/clist_classic_sje/resource.h index 3e69e1e..4baa48f 100644 --- a/clist_classic_sje/resource.h +++ b/clist_classic_sje/resource.h @@ -1,13 +1,349 @@ //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. +// Microsoft Visual C++ generated include file. // Used by resource.rc // +#define IDC_AUTHICON 1 #define IDC_NOTOALL 3 +#define IDC_APPLY 3 +#define IDI_MIRANDA 102 +#define IDD_ABOUT 103 +#define IDI_SMS 103 +#define IDI_ONLINE 104 +#define IDI_OFFLINE 105 +#define IDD_GNUPL 110 +#define IDD_ADDED 115 +#define IDD_URLSEND 119 +#define IDD_URLRECV 120 +#define IDD_AUTHREQ 121 +#define IDD_DETAILS 125 +#define IDD_OPT_CLIST 126 +#define IDD_HISTORY 127 +#define IDI_AWAY 128 +#define IDI_FREE4CHAT 129 +#define IDI_INVISIBLE 130 +#define IDI_NA 131 +#define IDD_OPT_SOUND 134 +#define IDI_SENDURL 135 +#define IDI_RECVMSG 136 +#define IDI_SENDMSG 137 +#define IDI_URL 138 +#define IDI_DND 158 +#define IDI_OCCUPIED 159 +#define IDI_USERDETAILS 160 +#define IDI_FINDUSER 161 +#define IDI_HELP 162 +#define IDI_OPTIONS 163 +#define IDI_MIRANDAWEBSITE 172 +#define IDI_RENAME 173 +#define IDI_HISTORY 174 +#define IDI_DELETE 175 +#define IDR_CONTEXT 180 +#define IDC_DROP 183 +#define IDD_OPT_HOTKEY 184 +#define IDD_HISTORY_FIND 192 +#define IDI_SENDEMAIL 193 +#define IDD_FILERECV 194 +#define IDD_PROFILEMANAGER 197 +#define IDD_NEWPROFILE 198 +#define IDR_CLISTMENU 199 +#define IDI_BLANK 200 +#define IDD_FINDADD 201 +#define IDI_USERONLINE 201 +#define IDD_OPT_AUTOAWAY 202 +#define IDI_GROUPSHUT 202 +#define IDD_OPTIONS 203 +#define IDI_GROUPOPEN 203 +#define IDD_PLUGINCONFLICT 204 +#define IDD_FILESEND 205 +#define IDI_NOTICK 205 +#define IDD_OPT_PLUGINS 206 +#define IDI_TICK 206 +#define IDD_OPT_ICONS 207 +#define IDI_FILE 207 +#define IDI_TIMESTAMP 208 +#define IDI_CHANGEFONT 209 +#define IDI_ADDCONTACT 210 +#define IDI_SMALLDOT 211 +#define IDI_FILLEDBLOB 212 +#define IDD_READAWAYMSG 213 +#define IDI_EMPTYBLOB 213 +#define IDD_OPT_IGNORE 214 +#define IDC_HYPERLINKHAND 214 +#define IDD_OPT_VISIBILITY 215 +#define IDC_DROPUSER 215 +#define IDD_SETAWAYMSG 216 +#define IDI_DETAILSLOGO 216 +#define IDD_OPT_AWAYMSG 217 +#define IDD_OPT_CLUI 218 +#define IDD_INFO_SUMMARY 220 +#define IDD_INFO_CONTACT 221 +#define IDD_INFO_BACKGROUND 222 +#define IDD_INFO_NOTES 223 +#define IDD_ADDEMAIL 226 +#define IDD_ICONINDEX 227 +#define IDD_OPT_CLC 228 +#define IDD_OPT_CLCTEXT 229 +#define IDD_OPT_CLCBKG 230 +#define IDD_INFO_LOCATION 231 +#define IDD_INFO_WORK 232 +#define IDD_ADDPHONE 233 +#define IDD_OPT_SBAR 234 #define IDD_INSTALLINI 235 #define IDD_WARNINICHANGE 236 #define IDD_INIIMPORTDONE 237 -#define IDD_OPTIONS 238 -#define IDD_COPYPROGRESS 239 +#define IDD_OPT_CLCTEXTSIMPLE 239 +#define IDB_SORTCOLUP 239 +#define IDB_SORTCOLDOWN 240 +#define IDD_OPT_NETLIB 246 +#define IDD_NETLIBLOGOPTS 247 +#define IDD_FILETRANSFERINFO 249 +#define IDD_OPT_FILETRANSFER 250 +#define IDD_FILEEXISTS 251 +#define IDD_DELETECONTACT 254 +#define IDD_DENYREASON 256 +#define IDD_ADDCONTACT 257 +#define IDD_OPT_CONTACT 261 +#define IDI_MULTISEND 263 +#define IDI_DOWNARROW 264 +#define IDD_CREDITS 265 +#define IDD_OPT_IDLE 268 +#define IDC_SAVE 1001 +#define IDI_ONTHEPHONE 1002 +#define IDC_MESSAGE 1002 +#define IDI_OUTTOLUNCH 1003 +#define IDC_AUTOCLOSE 1004 +#define IDC_FROM 1005 +#define IDC_AUTOMIN 1005 +#define IDC_DATE 1006 +#define IDC_DUMPRECV 1006 +#define IDC_MSG 1008 +#define IDC_PROXYDNS 1008 +#define IDC_NAME 1009 +#define IDC_PROXYTYPE 1009 +#define IDC_STATIC23 1010 +#define IDC_SPECIFYPORTS 1013 +#define IDC_ST_ENTERMSG 1013 +#define IDC_ST_ENTERURL 1014 +#define IDC_SPECIFYPORTSO 1014 +#define IDC_TEXT 1019 +#define IDC_SHOWNAMES 1024 +#define IDC_ABOUT 1032 +#define IDC_MYNOTES 1033 +#define IDC_URLS 1037 +#define IDC_REPLY 1039 +#define IDC_URL 1041 +#define IDC_REASON 1046 +#define IDC_EMAIL 1048 +#define IDC_NAMENICK 1049 +#define IDC_NAMEFIRST 1050 +#define IDC_NAMELAST 1051 +#define IDC_NICK 1053 +#define IDC_GENDER 1060 +#define IDC_CITY 1061 +#define IDC_STATE 1062 +#define IDC_COUNTRY 1063 +#define IDC_AGE 1064 +#define IDC_ZIP 1064 +#define IDC_PHONE 1065 +#define IDC_STREET 1065 +#define IDC_COMPANY 1066 +#define IDC_LANGUAGE1 1066 +#define IDC_TIMEZONE 1067 +#define IDC_DEPARTMENT 1067 +#define IDC_LOCALTIME 1068 +#define IDC_DETAILS 1069 +#define IDC_POSITION 1069 +#define IDC_LANGUAGE2 1069 +#define IDC_ADD 1070 +#define IDC_LANGUAGE3 1070 +#define IDC_MOREOPTIONS 1071 +#define IDC_USERMENU 1071 +#define IDC_MIN2TRAY 1073 +#define IDC_ONTOP 1074 +#define IDC_SHOWMAINMENU 1075 +#define IDC_CLIENTDRAG 1076 +#define IDC_EDIT 1078 +#define IDC_LIST 1079 +#define IDC_HISTORY 1080 +#define IDC_USESOUND 1085 +#define IDC_TOOLWND 1097 +#define IDC_ONECLK 1098 +#define IDC_SHOWCAPTION 1098 +#define IDC_HIDEOFFLINE 1099 +#define IDC_SHOWHIDE 1100 +#define IDC_HIDEEMPTYGROUPS 1100 +#define IDC_SORTBYSTATUS 1101 +#define IDC_FADEINOUT 1101 +#define IDC_READMSG 1102 +#define IDC_AUTOSIZE 1102 +#define IDC_DISABLEGROUPS 1102 +#define IDC_AUTOSIZEUPWARD 1103 +#define IDC_ALWAYSSTATUS 1103 +#define IDC_NETSEARCH 1104 +#define IDC_CONFIRMDELETE 1104 +#define IDC_SORTBYPROTO 1105 +#define IDC_SHOWOPTIONS 1105 +#define IDC_SEARCHURL 1106 +#define IDC_BUILDTIME 1108 +#define IDC_NUMBER 1113 +#define IDC_UIN 1123 +#define IDC_TRANSPARENT 1124 +#define IDC_TRANSINACTIVE 1126 +#define IDC_TRANSACTIVE 1128 +#define IDC_FINDWHAT 1131 +#define IDC_FIND 1132 +#define IDC_FILE 1133 +#define IDC_PROFILELIST 1134 +#define IDC_NEWPROFILE 1135 +#define IDC_NEWPROFILENAME 1136 +#define IDC_TABS 1141 +#define IDC_RESULTS 1142 +#define IDC_STATUS 1144 +#define IDC_SCREENSAVE 1145 +#define IDC_TIMED 1146 +#define IDC_AWAYTIME 1147 +#define IDC_USEPROXY 1148 +#define IDC_SETNA 1148 +#define IDC_PROXYAUTH 1149 +#define IDC_NATIME 1149 +#define IDC_PROXYHOST 1150 +#define IDC_PROXYPORT 1151 +#define IDC_PROXYUSER 1152 +#define IDC_PROXYPASS 1153 +#define IDC_STATIC11 1154 +#define IDC_STATIC12 1155 +#define IDC_STATIC21 1156 +#define IDC_STATIC22 1157 +#define IDC_STATIC31 1158 +#define IDC_STATIC32 1159 +#define IDC_PROXYAUTHNTLM 1160 +#define IDC_HKSHOWHIDE 1162 +#define IDC_HKREADMSG 1163 +#define IDC_SOUNDLIST 1163 +#define IDC_HKSEARCH 1164 +#define IDC_CHANGE 1164 +#define IDC_PREVIEW 1165 +#define IDC_HKSHOWOPTIONS 1165 +#define IDC_PLUGINLIST 1167 +#define IDC_FEATURENAME 1168 +#define IDC_CHOOSE 1169 +#define IDC_TO 1170 +#define IDC_ABOUTGROUP 1175 +#define IDC_DESCRIPTION 1176 +#define IDC_AUTHOR 1177 +#define IDC_COPYRIGHT 1178 +#define IDC_VERSION 1179 +#define IDC_HOMEPAGE 1181 +#define IDC_RESTARTREQD 1182 +#define IDC_ICONSET 1183 +#define IDC_BROWSE 1184 +#define IDC_RUNATSTARTBROWSE 1185 +#define IDC_PAGETREE 1186 +#define IDC_RUNNOW 1186 +#define IDC_INACTIVEPERC 1187 +#define IDC_ACTIVEPERC 1188 +#define IDC_SEARCHNEWWND 1188 +#define IDC_RETRIEVING 1193 +#define IDC_TITLETEXT 1196 +#define IDC_GETMORE 1200 +#define IDC_VISIBLEICON 1204 +#define IDC_INVISIBLEICON 1205 +#define IDC_FILEICON 1206 +#define IDC_ONLINEICON 1207 +#define IDC_FILENAMES 1208 +#define IDC_ALLICON 1208 +#define IDC_DONTREPLY 1209 +#define IDC_NONEICON 1209 +#define IDC_USEPREVIOUS 1210 +#define IDC_NODIALOG 1211 +#define IDC_USESPECIFIC 1212 +#define IDC_FILEDIR 1213 +#define IDC_ALLFILESPROGRESS 1217 +#define IDC_CURRENTSPEED 1219 +#define IDC_STAWAYTYPE 1220 +#define IDC_WHITERECT 1221 +#define IDC_ALLSPEED 1221 +#define IDC_CURRENTFILEPROGRESS 1222 +#define IDC_CURRENTFILEGROUP 1223 +#define IDC_FIRSTNAME 1224 +#define IDC_LASTNAME 1225 +#define IDC_CURRENTTRANSFERRED 1225 +#define IDC_DOBDAY 1226 +#define IDC_DOBMONTH 1227 +#define IDC_WEBPAGE 1228 +#define IDC_DOBYEAR 1228 +#define IDC_UPDATING 1231 +#define IDC_NAMEORDER 1234 +#define IDC_AUTOHIDE 1235 +#define IDC_HIDETIME 1236 +#define IDC_RECONNECTREQD 1239 +#define IDC_IMPORT 1241 +#define IDC_TOMAIN 1243 +#define IDC_TOPROTO 1244 +#define IDC_PROTOLIST 1245 +#define IDC_TODEFICON 1246 +#define IDC_IMPORTMULTI 1247 +#define IDC_MAXSIZEHEIGHT 1254 +#define IDC_MAXSIZESPIN 1255 +#define IDC_FONTID 1256 +#define IDC_SAMETYPE 1257 +#define IDC_SAMESTYLE 1258 +#define IDC_SAMECOLOUR 1259 +#define IDC_SAMEAS 1260 +#define IDC_TYPEFACE 1261 +#define IDC_BOLD 1262 +#define IDC_ITALIC 1263 +#define IDC_COLOUR 1264 +#define IDC_UNDERLINE 1265 +#define IDC_HOTCOLOUR 1267 +#define IDC_SAMESIZE 1268 +#define IDC_BKGCOLOUR 1269 +#define IDC_FILENAME 1271 +#define IDC_SCROLL 1277 +#define IDC_PROPORTIONAL 1278 +#define IDC_SELCOLOUR 1281 +#define IDC_QUICKCOLOUR 1282 +#define IDC_SMOOTHTIME 1283 +#define IDC_SMOOTHTIMESPIN 1284 +#define IDC_GREYOUT 1285 +#define IDC_ROWHEIGHT 1285 +#define IDC_ROWHEIGHTSPIN 1286 +#define IDC_GREYOUTOPTS 1288 +#define IDC_GROUPINDENT 1289 +#define IDC_GROUPINDENTSPIN 1290 +#define IDC_LEFTMARGIN 1291 +#define IDC_SAMPLE 1292 +#define IDC_LEFTMARGINSPIN 1292 +#define IDC_FONTSIZE 1293 +#define IDC_STRETCHH 1298 +#define IDC_STRETCHV 1299 +#define IDC_TILEH 1300 +#define IDC_SCRIPT 1300 +#define IDC_TILEV 1301 +#define IDC_GAMMACORRECT 1302 +#define IDC_INTERESTS 1305 +#define IDC_EMAILS 1306 +#define IDC_PAST 1307 +#define IDC_HIDEOFFLINEOPTS 1308 +#define IDC_PHONES 1308 +#define IDC_SMS 1310 +#define IDC_AREA 1312 +#define IDC_UPDATE 1313 +#define IDC_DONTCYCLE 1315 +#define IDC_PRIMARYSTATUS 1316 +#define IDC_CYCLE 1317 +#define IDC_CYCLETIME 1318 +#define IDC_CYCLETIMESPIN 1319 +#define IDC_HIDETIMESPIN 1320 +#define IDC_MULTITRAY 1321 +#define IDC_ALWAYSMULTI 1322 +#define IDC_SHOWICON 1323 +#define IDC_SHOWPROTO 1324 +#define IDC_SHOWSTATUS 1325 +#define IDC_EQUALSECTIONS 1326 +#define IDC_SHOWSBAR 1329 +#define IDC_RIGHTMIRANDA 1330 +#define IDC_RIGHTSTATUS 1331 #define IDC_ININAME 1333 #define IDC_VIEWINI 1334 #define IDC_SECURITYINFO 1335 @@ -19,33 +355,206 @@ #define IDC_NEWNAME 1341 #define IDC_MOVE 1342 #define IDC_LEAVE 1343 - -#define IDC_ED_PERIOD 1344 -#define IDC_RAD_DAYS 1345 -#define IDC_RAD_HOURS 1346 -#define IDC_ED_FOLDER 1347 -#define IDC_BUT_BROWSE 1348 -#define IDC_ED_NUMBACKUPS 1349 -#define IDC_BUT_NOW 1350 -#define IDC_CHK_NOPROG 1351 -#define IDC_RAD_DISABLED 1352 -#define IDC_RAD_START 1353 -#define IDC_RAD_EXIT 1354 -#define IDC_RAD_PERIODIC 1355 - -#define IDC_PROGRESS 1356 -#define IDC_PROGRESSMESSAGE 1357 - -#define IDI_MENU 240 - +#define IDC_EXPERT 1346 +#define IDC_SORTBYNAME 1347 +#define IDC_STAUTOHIDESECS 1349 +#define IDC_STCLISTGROUP 1350 +#define IDC_DISABLEDRAGDROP 1351 +#define IDC_NOTEDITLABELS 1352 +#define IDC_SHOWSELALWAYS 1353 +#define IDC_TRACKSELECT 1354 +#define IDC_SHOWGROUPCOUNTS 1355 +#define IDC_HIDECOUNTSWHENEMPTY 1356 +#define IDC_DIVIDERONOFF 1357 +#define IDC_NOTNOTRANSLUCENTSEL 1358 +#define IDC_LINEWITHGROUPS 1359 +#define IDC_QUICKSEARCHVISONLY 1360 +#define IDC_SORTGROUPSALPHA 1361 +#define IDC_NOTNOSMOOTHSCROLLING 1362 +#define IDC_BITMAP 1363 +#define IDC_STWINDOWGROUP 1364 +#define IDC_STATIC01 1365 +#define IDC_CATEGORYLIST 1366 +#define IDC_LOADICONS 1369 +#define IDC_STICONSGROUP 1371 +#define IDC_MSGICON 1375 +#define IDC_URLICON 1376 +#define IDC_STNOPAGE 1377 +#define IDC_STCHECKMARKS 1380 +#define IDC_STSAMETEXT 1382 +#define IDC_STASTEXT 1383 +#define IDC_STSIZETEXT 1384 +#define IDC_STCOLOURTEXT 1385 +#define IDC_STHORZBAR 1386 +#define IDC_MIRANDA 1388 +#define IDC_STATUSBAR 1389 +#define IDC_PROTOIDGROUP 1392 +#define IDC_BYPROTOID 1393 +#define IDC_PROTOID 1394 +#define IDC_EMAILGROUP 1395 +#define IDC_BYEMAIL 1396 +#define IDC_STNAMENICK 1397 +#define IDC_NAMEGROUP 1398 +#define IDC_BYNAME 1399 +#define IDC_STNAMEFIRST 1400 +#define IDC_STNAMELAST 1401 +#define IDC_ADVANCEDGROUP 1402 +#define IDC_BYADVANCED 1403 +#define IDC_ADVANCED 1404 +#define IDC_STSIMPLERIGHT 1440 +#define IDC_NETLIBUSERS 1443 +#define IDC_STOFTENPORT 1445 +#define IDC_STATIC51 1446 +#define IDC_STATIC52 1447 +#define IDC_STATIC43 1448 +#define IDC_LOGOPTIONS 1449 +#define IDC_PORTSRANGE 1450 +#define IDC_TOCONSOLE 1451 +#define IDC_STATIC53 1451 +#define IDC_SHOWCONSOLEATSTART 1452 +#define IDC_PORTSRANGEO 1452 +#define IDC_STATIC54 1453 +#define IDC_SHOWCONSOLE 1454 +#define IDC_TOOUTPUTDEBUGSTRING 1455 +#define IDC_TOFILE 1456 +#define IDC_CLEARCONSOLE 1457 +#define IDC_RUNATSTART 1458 +#define IDC_DUMPSENT 1464 +#define IDC_DUMPPROXY 1466 +#define IDC_TEXTDUMPS 1467 +#define IDC_AUTODETECTTEXT 1468 +#define IDC_TIMEFORMAT 1469 +#define IDC_FILENAMEBROWSE 1470 +#define IDC_SHOWTHISDLGATSTART 1471 +#define IDC_FILEDIRBROWSE 1475 +#define IDC_ALLFILESGROUP 1476 +#define IDC_SCANCMDLINEBROWSE 1476 +#define IDC_ALLTRANSFERRED 1477 +#define IDC_OPENFOLDER 1478 +#define IDC_OPENFILE 1479 +#define IDC_TOTALSIZE 1480 +#define IDC_APPENDNICKTODIR 1483 +#define IDC_AUTOACCEPT 1484 +#define IDC_SCANCMDLINE 1485 +#define IDC_WARNBEFOREOPENING 1488 +#define IDC_SCANDURINGDL 1489 +#define IDC_SCANAFTERDL 1490 +#define IDC_NOSCANNER 1491 +#define IDC_ST_CMDLINE 1492 +#define IDC_ST_CMDLINEHELP 1493 +#define IDC_PROPERTIES 1496 +#define IDC_RESUME 1497 +#define IDC_EXISTINGICON 1499 +#define IDC_RESUMEALL 1500 +#define IDC_OVERWRITE 1501 +#define IDC_OVERWRITEALL 1502 +#define IDC_SKIP 1503 +#define IDC_EXISTINGSIZE 1506 +#define IDC_EXISTINGDATE 1507 +#define IDC_EXISTINGTYPE 1508 +#define IDC_NEWICON 1509 +#define IDC_NEWSIZE 1510 +#define IDC_NEWDATE 1511 +#define IDC_NEWTYPE 1512 +#define IDC_SAVEAS 1513 +#define IDC_ASK 1516 +#define IDC_RENAME 1519 +#define IDC_VIRUSSCANNERGROUP 1520 +#define IDC_HIDE 1534 +#define IDC_TOPLINE 1535 +#define IDC_GPLBTN 1536 +#define IDC_MAIL 1536 +#define IDC_MYHANDLE 1540 +#define IDC_GROUP 1541 +#define IDC_ADDED 1542 +#define IDC_AUTH 1543 +#define IDC_PLUGINSTATIC1 1559 +#define IDC_DELETEHISTORY 1560 +#define IDC_HOTKEYURLSTR 1567 +#define IDC_SETNASTR 1568 +#define IDC_AAUTHOR 1569 +#define IDC_AHOMEPAGE 1570 +#define IDC_AVERSION 1571 +#define IDC_ACOPYRIGHT 1572 +#define IDC_ADESCRIPTION 1573 +#define IDC_PLUGINENABLE 1574 +#define IDC_AUTHREQ 1577 +#define IDC_AUTHGB 1578 +#define IDC_BRINGTOFRONT 1579 +#define IDC_PROTOCOL 1580 +#define IDC_BRINGTOFRONT2 1580 +#define IDC_CONTRIBLINK 1586 +#define IDC_HOMELINK 1587 +#define IDC_SUPPORTLINK 1588 +#define IDC_DEVS 1589 +#define IDC_GPL 1590 +#define IDC_LOGO 1591 +#define IDC_CREDITSTEXT 1595 +#define IDC_WSLOCK 1599 +#define IDC_BLINKTIME 1607 +#define IDC_BLINKSPIN 1608 +#define IDC_DISABLEBLINK 1609 +#define IDC_IDLE 1610 +#define IDC_SBPANELBEVEL 1611 +#define IDC_DROPSHADOW 1612 +#define IDC_SHOWGRIP 1612 +#define IDC_NOSCROLLBAR 1613 +#define IDC_SHOWGRIP2 1613 +#define IDC_CLCBKGND 1613 +#define IDC_BUTTON1 1633 +#define IDC_IDLECHECK 1636 +#define IDC_IDLEONWINDOWS 1637 +#define IDC_IDLEONMIRANDA 1638 +#define IDC_IDLEUSEGLI 1639 +#define IDC_SCREENSAVER 1642 +#define IDC_LOCKED 1643 +#define IDC_IDLESHORT 1644 +#define IDC_IDLELONG 1645 +#define IDC_IDLE1STTIME 1646 +#define IDC_IDLE2NDTIME 1647 +#define IDC_IDLEPRIVATE 1649 +#define IDC_AASTATUS 1650 +#define IDC_AASHORTIDLE 1651 +#define IDC_AALONGSTATUS 1652 +#define IDC_AALONGIDLE 1656 +#define IDC_ONDESKTOP 1657 +#define IDC_WINCOLOUR 1659 +#define IDC_ICONBLINK 1660 +#define IDC_STMSDELAY 1661 +#define IDC_NOBORDER 1662 +#define IDI_SEARCHALL 32548 +#define ID_ICQ_EXIT 40001 +#define IDM_COPY 40001 +#define ID_RESET 40002 +#define POPUP_HIDEEMPTYGROUPS 40003 +#define POPUP_NEWSUBGROUP 40004 +#define POPUP_HIDEOFFLINE 40005 +#define POPUP_GROUPHIDEOFFLINE 40006 +#define POPUP_HIDEOFFLINEROOT 40007 +#define POPUP_DISABLEGROUPS 40008 +#define IDC_SENDMESSAGE 40009 +#define IDM_COPYALL 40011 +#define IDM_SELECTALL 40012 +#define IDM_CLEAR 40013 +#define IDM_OPENNEW 40014 +#define IDM_OPENEXISTING 40015 +#define IDM_COPYLINK 40016 +#define POPUP_HIDEMIRANDA 40017 +#define POPUP_OPTIONS 40018 +#define POPUP_EXIT 40019 +#define ID_TRAY_HIDE 40038 +#define ID_TRAY_EXIT 40040 +#define POPUP_NEWGROUP 40050 +#define POPUP_RENAMEGROUP 40052 +#define POPUP_DELETEGROUP 40053 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 273 -#define _APS_NEXT_COMMAND_VALUE 40018 -#define _APS_NEXT_CONTROL_VALUE 1676 +#define _APS_NEXT_RESOURCE_VALUE 269 +#define _APS_NEXT_COMMAND_VALUE 40020 +#define _APS_NEXT_CONTROL_VALUE 1663 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/clist_classic_sje/sync.bat b/clist_classic_sje/sync.bat deleted file mode 100644 index 60d3f6b..0000000 --- a/clist_classic_sje/sync.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo off - -rem *** this is just a dummy file, so that the 'post-build' copied from the project I -rem *** modified in miranda's svn does not cause an error :) \ No newline at end of file -- cgit v1.2.3