Browse Source

* TXT->SQL converter fixup
- Added missing char_id insert which totally messed up the conversion
- Fixed login converter ignoring many columns (although it had the data)
- Pointed out that Login-stored account variable conversion is MISSING!
- Pointed out that Status, Homunculus and Mapreg conversion is MISSING!
- Blocked the config functions from exiting server when file not found
- Finally added VS8 project files for this thing

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10835 54d463be-8e91-2dee-dedb-b68131a5f0ec

ultramage 18 years ago
parent
commit
3935c7bf4a

+ 8 - 0
Changelog-Trunk.txt

@@ -3,6 +3,14 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2007/07/01
+	* TXT->SQL converter fixup [ultramage]
+	- Added missing char_id insert which totally messed up the conversion
+	- Fixed login converter ignoring many columns (although it had the data)
+	- Pointed out that Login-stored account variable conversion is MISSING!
+	- Pointed out that Status, Homunculus and Mapreg conversion is MISSING!
+	- Blocked the config functions from exiting server when file not found
+	- Finally added VS8 project files for this thing
 2007/06/28
 	* Added a missing line to enable @displayskill atcommand [DracoRPG]
 2007/06/26

+ 20 - 0
eAthena-8.sln

@@ -16,6 +16,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-8\mapcac
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ladmin", "vcproj-8\ladmin.vcproj", "{D356871D-58E1-450B-967A-E8E9646175AF}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-login", "vcproj-9\txt-converter-login.vcproj", "{D356871D-58E1-450B-967A-E9E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-char", "vcproj-9\txt-converter-char.vcproj", "{D356871D-58E1-450B-967A-EAE9646175AF}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -110,6 +114,22 @@ Global
 		{D356871D-58E1-450B-967A-E8E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
 		{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
 		{D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Release|Win32.Build.0 = Release|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+		{D356871D-58E1-450B-967A-E9E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Release|Win32.Build.0 = Release|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+		{D356871D-58E1-450B-967A-EAE9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 7 - 3
src/char/char.c

@@ -42,6 +42,10 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+// private declarations
+#define CHAR_CONF_NAME	"conf/char_athena.conf"
+#define LAN_CONF_NAME	"conf/subnet_athena.conf"
+
 #ifndef TXT_SQL_CONVERT
 struct mmo_map_server {
 	uint32 ip;
@@ -4018,8 +4022,8 @@ int char_config_read(const char *cfgName)
 	FILE* fp = fopen(cfgName, "r");
 
 	if (fp == NULL) {
-		ShowFatalError("Configuration file not found: %s.\n", cfgName);
-		exit(1);
+		ShowError("Configuration file not found: %s.\n", cfgName);
+		return 1;
 	}
 
 	ShowInfo("Reading configuration file %s...\n", cfgName);
@@ -4278,7 +4282,7 @@ int do_init(int argc, char **argv)
 	mapindex_init(); //Needed here for the start-point reading.
 	start_point.map = mapindex_name2id("new_zone01");
 	char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
-	char_lan_config_read((argc > 3) ? argv[3] : LOGIN_LAN_CONF_NAME);
+	char_lan_config_read((argc > 3) ? argv[3] : LAN_CONF_NAME);
 
 	if (strcmp(userid, "s1")==0 && strcmp(passwd, "p1")==0) {
 		ShowError("Using the default user/password s1/p1 is NOT RECOMMENDED.\n");

+ 0 - 4
src/char/char.h

@@ -10,10 +10,6 @@
 #define START_CHAR_NUM 150000
 #define MAX_MAP_SERVERS 30
 
-#define CHAR_CONF_NAME	"conf/char_athena.conf"
-
-#define LOGIN_LAN_CONF_NAME	"conf/subnet_athena.conf"
-
 #define DEFAULT_AUTOSAVE_INTERVAL 300*1000
 
 struct character_data {

+ 7 - 4
src/char_sql/char.c

@@ -32,6 +32,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+// private declarations
+#define CHAR_CONF_NAME  "conf/char_athena.conf"
+#define LAN_CONF_NAME	"conf/subnet_athena.conf"
+#define SQL_CONF_NAME	"conf/inter_athena.conf"
+
 #ifndef TXT_SQL_CONVERT
 static struct dbt *char_db_;
 #endif
@@ -68,8 +73,6 @@ char login_db_level[32] = "level";
 
 int lowest_gm_level = 1;
 
-char *SQL_CONF_NAME = "conf/inter_athena.conf";
-
 struct mmo_map_server {
 	uint32 ip;
 	uint16 port;
@@ -509,8 +512,8 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
 {	//Insert the barebones to then update the rest.
 	char t_name[NAME_LENGTH*2];
 	jstrescapecpy(t_name, p->name);
-	sprintf(tmp_sql, "REPLACE INTO `%s` (`account_id`, `char_num`, `name`)  VALUES ('%d', '%d', '%s')",
-		char_db, p->account_id, p->char_num, t_name);
+	sprintf(tmp_sql, "REPLACE INTO `%s` (`char_id`, `account_id`, `char_num`, `name`)  VALUES ('%d', '%d', '%d', '%s')",
+		char_db, p->char_id, p->account_id, p->char_num, t_name);
 	if(mysql_query(&mysql_handle, tmp_sql))
 	{
 		ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));

+ 0 - 2
src/char_sql/char.h

@@ -22,8 +22,6 @@
 #define START_CHAR_NUM 150000
 #define MAX_MAP_SERVERS 30
 
-#define LAN_CONF_NAME	"conf/subnet_athena.conf"
-
 #define DEFAULT_AUTOSAVE_INTERVAL 300*1000
 
 struct itemtmp {

+ 1 - 1
src/common/core.c

@@ -134,7 +134,7 @@ const char* get_svn_revision(void)
 	if(*eA_svn_version)
 		return eA_svn_version;
 
-	if ((fp = fopen(".svn/entries", "r")))
+	if ((fp = fopen(".svn/entries", "r")) != NULL)
 	{
 		char line[1024];
 		int rev;

+ 1 - 1
src/common/malloc.c

@@ -289,7 +289,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
 	ShowFatalError("Memory manager::memmgr_malloc() serious error (allocating %d+%d bytes at %s:%d)\n", sizeof(struct unit_head_large), size, file, line);
 	memmgr_info();
 	exit(1);
-	return NULL;
+	//return NULL;
 };
 
 void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func )

+ 0 - 2
src/common/mmo.h

@@ -97,8 +97,6 @@
 //Room for initial 100k characters
 #define DEFAULT_MAX_CHAR_ID 250000
 
-#define CHAR_CONF_NAME  "conf/char_athena.conf"
-
 //Base Homun skill.
 #define HM_SKILLBASE 8000
 #define MAX_HOMUNSKILL 16

+ 1 - 1
src/common/showmsg.c

@@ -376,7 +376,7 @@ int	VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
 					//    \033[2K - Clears all characters of the whole line.
 
 					uint8 num = (numbers[numpoint]>>4)*10+(numbers[numpoint]&0x0F);
-					COORD origin = {0,info.dwCursorPosition.Y};
+					COORD origin = {0,info.dwCursorPosition.Y}; //warning C4204
 					SHORT cnt;
 					DWORD tmp;
 					if(num==1)

+ 53 - 40
src/txt-converter/char-converter.c

@@ -1,10 +1,7 @@
 // (c) eAthena Dev Team - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include "../common/cbasetypes.h"
 #include "../common/mmo.h"
 #include "../common/core.h"
 #include "../common/strlib.h"
@@ -25,12 +22,15 @@
 #include "../char_sql/int_guild.h"
 #include "../char_sql/inter.h"
 
-char t_name[256];
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #define CHAR_CONF_NAME "conf/char_athena.conf"
 #define SQL_CONF_NAME "conf/inter_athena.conf"
 #define INTER_CONF_NAME "conf/inter_athena.conf"
 //--------------------------------------------------------
+
 int convert_init(void)
 {
 	char line[65536];
@@ -41,16 +41,17 @@ int convert_init(void)
 
 	ShowWarning("Make sure you backup your databases before continuing!\n");
 	printf("\n");
+
 	ShowNotice("Do you wish to convert your Character Database to SQL? (y/n) : ");
-	input=getchar();
-	if(input == 'y' || input == 'Y'){
+	input = getchar();
+	if(input == 'y' || input == 'Y')
+	{
 		struct character_data char_dat;
 		struct accreg reg;
 
 		ShowStatus("Converting Character Database...\n");
-		fp = fopen(char_txt, "r");
-		memset (&char_dat, 0, sizeof(struct character_data));
-		if(fp==NULL) {
+		if( (fp = fopen(char_txt, "r")) == NULL )
+		{
 			ShowError("Unable to open file [%s]!\n", char_txt);
 			return 0;
 		}
@@ -58,9 +59,9 @@ int convert_init(void)
 		while(fgets(line, sizeof(line), fp))
 		{
 			lineno++;
-			memset(&char_dat, 0, sizeof(char_dat));
+			memset(&char_dat, 0, sizeof(struct character_data));
 			ret=mmo_char_fromstr(line, &char_dat.status, char_dat.global, &char_dat.global_num);
-			if(ret > 0){
+			if(ret > 0) {
 				count++;
 				parse_friend_txt(&char_dat.status); //Retrieve friends.
 				mmo_char_tosql(char_dat.status.char_id , &char_dat.status);
@@ -78,7 +79,7 @@ int convert_init(void)
 		ShowStatus("Converted %d characters.\n", count);
 		fclose(fp);
 		ShowStatus("Converting Account variables Database...\n");
-		if( (fp=fopen(accreg_txt,"r")) ==NULL )
+		if( (fp = fopen(accreg_txt, "r")) == NULL )
 		{
 			ShowError("Unable to open file %s!", accreg_txt);
 			return 1;
@@ -91,7 +92,7 @@ int convert_init(void)
 			if(inter_accreg_fromstr(line, &reg) == 0 && reg.account_id > 0) {
 				count++;
 				inter_accreg_tosql(reg.account_id, 0, &reg, 2); //Type 2: Account regs
-			}else{
+			} else {
 				ShowError("accreg reading: broken data [%s] at %s:%d\n", line, accreg_txt, lineno);
 			}
 		}
@@ -102,14 +103,15 @@ int convert_init(void)
 	while(getchar() != '\n');
 	printf("\n");
 	ShowNotice("Do you wish to convert your Storage Database to SQL? (y/n) : ");
-	input=getchar();
-	if(input == 'y' || input == 'Y') {
+	input = getchar();
+	if(input == 'y' || input == 'Y')
+	{
 		struct storage storage_;
 		printf("\n");
 		ShowStatus("Converting Storage Database...\n");
-		fp=fopen(storage_txt,"r");
-		if(fp==NULL){
-			ShowError("can't read : %s\n",storage_txt);
+		if( (fp = fopen(storage_txt,"r")) == NULL )
+		{
+			ShowError("can't read : %s\n", storage_txt);
 			return 0;
 		}
 		lineno = count = 0;
@@ -132,15 +134,18 @@ int convert_init(void)
 		fclose(fp);
 	}
 
+	//FIXME: CONVERT STATUS DATA HERE!!!
+
 	while(getchar() != '\n');
 	printf("\n");
 	ShowNotice("Do you wish to convert your Pet Database to SQL? (y/n) : ");
 	input=getchar();
-	if(input == 'y' || input == 'Y') {
+	if(input == 'y' || input == 'Y')
+	{
 		struct s_pet p;
 		printf("\n");
 		ShowStatus("Converting Pet Database...\n");
-		if( (fp=fopen(pet_txt,"r")) ==NULL )
+		if( (fp = fopen(pet_txt, "r")) == NULL )
 		{
 			ShowError("Unable to open file %s!", pet_txt);
 			return 1;
@@ -150,10 +155,10 @@ int convert_init(void)
 		{
 			lineno++;
 			memset (&p, 0, sizeof(struct s_pet));
-			if(inter_pet_fromstr(line, &p)==0 && p.pet_id>0){
+			if(inter_pet_fromstr(line, &p)==0 && p.pet_id>0) {
 				count++;
 				inter_pet_tosql(p.pet_id,&p);
-			}else{
+			} else {
 				ShowError("pet reading: broken data [%s] at %s:%d\n", line, pet_txt, lineno);
 			}
 		}
@@ -161,15 +166,18 @@ int convert_init(void)
 		fclose(fp);
 	}
 
+	//FIXME: CONVERT HOMUNCULUS DATA AND SKILLS HERE!!!
+
 	while(getchar() != '\n');
 	printf("\n");
 	ShowNotice("Do you wish to convert your Party Database to SQL? (y/n) : ");
 	input=getchar();
-	if(input == 'y' || input == 'Y') {
+	if(input == 'y' || input == 'Y')
+	{
 		struct party p;
 		printf("\n");
 		ShowStatus("Converting Party Database...\n");
-		if( (fp=fopen(party_txt,"r")) ==NULL )
+		if( (fp = fopen(party_txt, "r")) == NULL )
 		{
 			ShowError("Unable to open file %s!", party_txt);
 			return 1;
@@ -193,14 +201,15 @@ int convert_init(void)
 
 	while(getchar() != '\n');
 	printf("\n");
-	ShowNotice("Do you wish to convert your Guilds/Guild Castles Database to SQL? (y/n) : ");
+	ShowNotice("Do you wish to convert your Guilds and Castles Database to SQL? (y/n) : ");
 	input=getchar();
-	if(input == 'y' || input == 'Y') {
+	if(input == 'y' || input == 'Y')
+	{
 		struct guild g;
 		struct guild_castle gc;
 		printf("\n");
 		ShowStatus("Converting Guild Database...\n");
-		if( (fp=fopen(guild_txt,"r")) ==NULL )
+		if( (fp = fopen(guild_txt, "r")) == NULL )
 		{
 			ShowError("Unable to open file %s!", guild_txt);
 			return 1;
@@ -220,7 +229,7 @@ int convert_init(void)
 		ShowStatus("Converted %d guilds.\n", count);
 		fclose(fp);
 		ShowStatus("Converting Guild Castles Database...\n");
-		if( (fp=fopen(castle_txt,"r")) ==NULL )
+		if( (fp = fopen(castle_txt, "r")) == NULL )
 		{
 			ShowError("Unable to open file %s!", castle_txt);
 			return 1;
@@ -229,7 +238,7 @@ int convert_init(void)
 		while(fgets(line, sizeof(line), fp))
 		{
 			lineno++;
-			memset (&gc, 0, sizeof(struct guild_castle));
+			memset(&gc, 0, sizeof(struct guild_castle));
 			if (inter_guildcastle_fromstr(line, &gc) == 0) {
 				inter_guildcastle_tosql(&gc);
 				count++;
@@ -245,13 +254,14 @@ int convert_init(void)
 	printf("\n");
 	ShowNotice("Do you wish to convert your Guild Storage Database to SQL? (y/n) : ");
 	input=getchar();
-	if(input == 'y' || input == 'Y') {
+	if(input == 'y' || input == 'Y')
+	{
 		struct guild_storage storage_;
 		printf("\n");
 		ShowStatus("Converting Guild Storage Database...\n");
-		fp=fopen(guild_storage_txt,"r");
-		if(fp==NULL){
-			ShowError("can't read : %s\n",guild_storage_txt);
+		if( (fp = fopen(guild_storage_txt, "r")) == NULL )
+		{
+			ShowError("can't read : %s\n", guild_storage_txt);
 			return 0;
 		}
 		lineno = count = 0;
@@ -271,20 +281,23 @@ int convert_init(void)
 		ShowStatus("Converted %d guild storages.\n", count);
 		fclose(fp);
 	}
+
+	//FIXME: CONVERT MAPREG HERE! (after enforcing MAPREGSQL for sql)
+
 	return 0;
 }
 
-int do_init(int argc, char **argv)
+int do_init(int argc, char** argv)
 {
-	char_config_read((argc>1)?argv[1]:CHAR_CONF_NAME);
+	char_config_read( (argc > 1) ? argv[1] : CHAR_CONF_NAME);
 	mapindex_init();
-	sql_config_read((argc>2)?argv[2]:SQL_CONF_NAME);
-	inter_init_txt((argc > 3) ? argv[3] :INTER_CONF_NAME);
-	inter_init_sql((argc > 3) ? argv[3] :INTER_CONF_NAME);
+	sql_config_read( (argc > 2) ? argv[2] : SQL_CONF_NAME);
+	inter_init_txt( (argc > 3) ? argv[3] : INTER_CONF_NAME);
+	inter_init_sql( (argc > 3) ? argv[3] : INTER_CONF_NAME);
 	convert_init();
 	ShowStatus("Everything's been converted!\n");
 	mapindex_final();
-	exit (0);
+	return 0;
 }
 
 void do_abort(void) {}

+ 82 - 91
src/txt-converter/login-converter.c

@@ -1,39 +1,26 @@
 // (c) eAthena Dev Team - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h"
+#include "../common/core.h"
+#include "../common/db.h"
+#include "../common/showmsg.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "cbasetypes.h"
-#ifdef __WIN32
-#include <my_global.h>
-#include <my_sys.h>
+
+#ifdef WIN32
+#include <winsock2.h>
 #endif
 #include <mysql.h>
 
-#include "../common/mmo.h"
-#include "../common/core.h"
-#include "../common/db.h"
-
-struct auth_dat_ {
-	int account_id, sex;
-	char userid[24], pass[24], lastlogin[24];
-	int logincount;
-	int state; // packet 0x006a value + 1 (0: compte OK)
-	char email[40]; // e-mail (by default: a@a.com)
-	char error_message[20]; // Message of error code #6 = You are Prohibited to log in until %s (packet 0x006a)
-	time_t ban_until_time; // # of seconds 1/1/1970 (timestamp): ban time limit of the account (0 = no ban)
-	time_t connect_until_time; // # of seconds 1/1/1970 (timestamp): Validity limit of the account (0 = unlimited)
-	char last_ip[16]; // save of last IP of connection
-	char memo[255]; // a memo field
-	int account_reg2_num;
-	struct global_reg account_reg2[ACCOUNT_REG2_NUM];
-} *auth_dat;
-
 char login_account_id[256]="account_id";
 char login_userid[256]="userid";
 char login_user_pass[256]="user_pass";
 char login_db[256]="login";
+char globalreg_db[256]="global_reg_value";
 
 static struct dbt *gm_account_db;
 
@@ -44,6 +31,9 @@ char db_server_pw[32] = "ragnarok";
 char db_server_logindb[32] = "ragnarok";
 
 #define INTER_CONF_NAME "conf/inter_athena.conf"
+#define GM_ACCOUNT_NAME "conf/GM_account.txt"
+#define ACCOUNT_TXT_NAME "save/account.txt"
+//--------------------------------------------------------
 
 int isGM(int account_id)
 {
@@ -59,120 +49,122 @@ int read_gm_account()
 	char line[8192];
 	struct gm_account *p;
 	FILE *fp;
-	int c=0;
-
-	gm_account_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int));
-
-	printf("Starting reading gm_account\n");
-
-	if( (fp=fopen("conf/GM_account.txt","r"))==NULL )
+	int line_counter = 0, gm_counter = 0;
+	
+	ShowStatus("Starting reading gm_account\n");
+	
+	if( (fp = fopen(GM_ACCOUNT_NAME,"r")) == NULL )
 		return 1;
+	
+	gm_account_db = db_alloc(__FILE__,__LINE__,DB_INT,DB_OPT_BASE,sizeof(int)); //FIXME: never deallocated
+	
 	while(fgets(line,sizeof(line),fp))
 	{
-		if(line[0] == '/' || line[1] == '/' || line[2] == '/')
+		line_counter++;
+		if ((line[0] == '/' && line[1] == '/') || line[0] == '\0' || line[0] == '\n' || line[0] == '\r')
 			continue;
-
+		
 		p = (struct gm_account*)malloc(sizeof(struct gm_account));
 		if(p==NULL){
-			printf("gm_account: out of memory!\n");
+			ShowFatalError("gm_account: out of memory!\n");
 			exit(0);
 		}
-
+		
 		if(sscanf(line,"%d %d",&p->account_id,&p->level) != 2 || p->level <= 0) {
-			printf("gm_account: broken data [conf/GM_account.txt] line %d\n",c);
+			ShowWarning("gm_account: unsupported data format [conf/GM_account.txt] on line %d\n", line_counter);
 			continue;
 		}
 		else {
 			if(p->level > 99)
 				p->level = 99;
 			idb_put(gm_account_db,p->account_id,p);
-			c++;
-			printf("GM ID: %d Level: %d\n",p->account_id,p->level);
+			gm_counter++;
+			ShowInfo("GM ID: %d Level: %d\n",p->account_id,p->level);
 		}
 	}
+
 	fclose(fp);
-	printf("%d ID of gm_accounts read.\n",c);
+	ShowStatus("%d ID of gm_accounts read.\n", gm_counter);
 	return 0;
 }
 
-int mmo_auth_init(void)
+int convert_login(void)
 {
 	MYSQL mysql_handle;
 	char tmpsql[1024];
-	MYSQL_RES* 	sql_res ;
-	MYSQL_ROW	sql_row ;
+	int line_counter = 0;
 	FILE *fp;
 	int account_id, logincount, user_level, state, n, i;
 	char line[2048], userid[2048], pass[2048], lastlogin[2048], sex, email[2048], error_message[2048], last_ip[2048], memo[2048];
 	time_t ban_until_time;
 	time_t connect_until_time;
-	char t_uid[256];
+	char dummy[2048];
 
 	mysql_init(&mysql_handle);
-	if(!mysql_real_connect(&mysql_handle, db_server_ip, db_server_id, db_server_pw,
-		db_server_logindb ,db_server_port, (char *)NULL, 0)) {
+	if(!mysql_real_connect(&mysql_handle, db_server_ip, db_server_id, db_server_pw, db_server_logindb ,db_server_port, (char *)NULL, 0)) {
 			//pointer check
 			printf("%s\n",mysql_error(&mysql_handle));
 			exit(1);
 	}
-	else {
-		printf ("Connect: Success!\n");
-	}
-	printf ("Convert start...\n");
-
-
-	fp=fopen("save/account.txt","r");
-	auth_dat = (struct auth_dat_*)malloc(sizeof(auth_dat[0])*256);
-	if(fp==NULL)
+	ShowStatus("Connect: Success!\n");
+	
+	ShowStatus("Convert start...\n");
+	fp = fopen(ACCOUNT_TXT_NAME,"r");
+	if(fp == NULL)
 		return 0;
-	while(fgets(line,1023,fp)!=NULL)
+
+	while(fgets(line,sizeof(line),fp) != NULL)
 	{
+		line_counter++;
 		if(line[0]=='/' && line[1]=='/')
 			continue;
 
-		i = sscanf(line, "%d\t%[^\t]\t%[^\t]\t%[^\t]\t%c\t%d\t%d\t"
-			"%[^\t]\t%[^\t]\t%ld\t%[^\t]\t%[^\t]\t%ld%n",
+		i = sscanf(line, "%d\t%[^\t]\t%[^\t]\t%[^\t]\t%c\t%d\t%d\t%[^\t]\t%[^\t]\t%ld\t%[^\t]\t%[^\t]\t%ld\t%[^\r\n]%n",
 			&account_id, userid, pass, lastlogin, &sex, &logincount, &state,
-			email, error_message, &connect_until_time, last_ip, memo, &ban_until_time, &n);
+			email, error_message, &connect_until_time, last_ip, memo, &ban_until_time, dummy, &n);
 
-		sprintf(tmpsql, "SELECT `%s`,`%s`,`%s`,`lastlogin`,`logincount`,`sex`,`connect_until`,`last_ip`,`ban_until`,`state`"
-			" FROM `%s` WHERE `%s`='%s'", login_account_id, login_userid, login_user_pass, login_db, login_userid, t_uid);
+		if (i < 13) {
+			ShowWarning("Skipping incompatible data on line %d\n", line_counter);
+			continue;
+ 		}
+
+		if (i > 13)
+			ShowWarning("Reading login account variables is not implemented, data will be lost! (line %d)\n", line_counter);
 
-		if(mysql_query(&mysql_handle, tmpsql) ) {
-			printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
-		}
 		user_level = isGM(account_id);
-		printf ("userlevel: %s (%d)- %d\n",userid, account_id, user_level);
-		sql_res = mysql_store_result(&mysql_handle) ;
-		sql_row = mysql_fetch_row(sql_res);	//row fetching
-		if (!sql_row) //no row -> insert
-			sprintf(tmpsql, "INSERT INTO `login` (`account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`) VALUES (%d, '%s', '%s', '%s', '%c', %d, 'user@athena', %d);",account_id , userid, pass,lastlogin,sex,logincount, user_level);
-		else //row reside -> updating
-			sprintf(tmpsql, "UPDATE `login` SET `account_id`='%d', `userid`='%s', `user_pass`='%s', `lastlogin`='%s', `sex`='%c', `logincount`='%d', `email`='user@athena', `level`='%d'\nWHERE `account_id`='%d';",account_id , userid, pass,lastlogin,sex,logincount, user_level, account_id);
-		printf ("Query: %s\n",tmpsql);
-		mysql_free_result(sql_res) ; //resource free
+		ShowInfo("Converting user (id: %d, name: %s, gm level: %d)\n", account_id, userid, user_level);
+		sprintf(tmpsql,
+			"REPLACE INTO `login` "
+			"(`account_id`, `userid`, `user_pass`, `lastlogin`, `sex`, `logincount`, `email`, `level`, `error_message`, `connect_until`, `last_ip`, `memo`, `ban_until`, `state`) "
+			"VALUES "
+			"(%d, '%s', '%s', '%s', '%c', %d, '%s', %d, '%s', %u, '%s', '%s', %u, %d)",
+			account_id , userid, pass, lastlogin, sex, logincount, email, user_level, error_message, (uint32)connect_until_time, last_ip, memo, (uint32)ban_until_time, state);
 		if(mysql_query(&mysql_handle, tmpsql) ) {
-			printf("DB server Error - %s\n", mysql_error(&mysql_handle) );
+			ShowError("DB server Error - %s\n", mysql_error(&mysql_handle) );
+			ShowError("Query: %s\n", tmpsql);
 		}
+	
+		//TODO: parse the rest of the line to read the login-stored account variables, and import them to `global_reg_value`
+		//      then remove the 'dummy' buffer
 	}
 	fclose(fp);
 
-	printf ("Convert end...\n");
+	ShowStatus("Convert end...\n");
 
 	return 0;
 }
 
-int login_config_read(const char *cfgName)
+int login_config_read(const char* cfgName)
 {
 	int i;
 	char line[1024], w1[1024], w2[1024];
 	FILE *fp;
 
-	printf ("Start reading interserver configuration: %s\n",cfgName);
+	ShowStatus("Start reading interserver configuration: %s\n", cfgName);
 
 	fp=fopen(cfgName,"r");
 	if(fp==NULL){
-		printf("File not found: %s\n", cfgName);
+		ShowError("File not found: %s\n", cfgName);
 		return 1;
 	}
 
@@ -188,23 +180,23 @@ int login_config_read(const char *cfgName)
 		//add for DB connection
 		if(strcmpi(w1,"db_server_ip")==0){
 			strcpy(db_server_ip, w2);
-			printf ("set db_server_ip : %s\n",w2);
+			ShowStatus("set db_server_ip : %s\n",w2);
 		}
 		else if(strcmpi(w1,"db_server_port")==0){
 			db_server_port=atoi(w2);
-			printf ("set db_server_port : %s\n",w2);
+			ShowStatus("set db_server_port : %s\n",w2);
 		}
 		else if(strcmpi(w1,"db_server_id")==0){
 			strcpy(db_server_id, w2);
-			printf ("set db_server_id : %s\n",w2);
+			ShowStatus("set db_server_id : %s\n",w2);
 		}
 		else if(strcmpi(w1,"db_server_pw")==0){
 			strcpy(db_server_pw, w2);
-			printf ("set db_server_pw : %s\n",w2);
+			ShowStatus("set db_server_pw : %s\n",w2);
 		}
 		else if(strcmpi(w1,"db_server_logindb")==0){
 			strcpy(db_server_logindb, w2);
-			printf ("set db_server_logindb : %s\n",w2);
+			ShowStatus("set db_server_logindb : %s\n",w2);
 		}
 		//support the import command, just like any other config
 		else if(strcmpi(w1,"import")==0){
@@ -212,23 +204,22 @@ int login_config_read(const char *cfgName)
 		}
 	}
 	fclose(fp);
-	printf ("End reading interserver configuration...\n");
+	ShowStatus("End reading interserver configuration...\n");
 	return 0;
 }
 
-int do_init(int argc,char **argv)
+int do_init(int argc, char** argv)
 {
-	char input;
-	login_config_read( (argc>1)?argv[1]:INTER_CONF_NAME );
+	int input;
+	login_config_read( (argc > 1) ? argv[1] : INTER_CONF_NAME );
 	read_gm_account();
 
-	printf("\nWarning : Make sure you backup your databases before continuing!\n");
-	printf("\nDo you wish to convert your Login Database to SQL? (y/n) : ");
-	input=getchar();
+	ShowInfo("\nWarning : Make sure you backup your databases before continuing!\n");
+	ShowInfo("\nDo you wish to convert your Login Database to SQL? (y/n) : ");
+	input = getchar();
 	if(input == 'y' || input == 'Y')
-		mmo_auth_init();
-	printf ("Everything's been converted!\n");
-	exit (0);
+		convert_login();
+	return 0;
 }
 
 void do_abort(void) {}

+ 480 - 0
vcproj-8/txt-converter-char.vcproj

@@ -0,0 +1,480 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="txt-converter-char"
+	ProjectGUID="{D356871D-58E1-450B-967A-EAE9646175AF}"
+	RootNamespace="txt-converter-char"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\tools"
+			IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;TXT_SQL_CONVERT"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				DefaultCharIsUnsigned="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib oldnames.lib ws2_32.lib libmysql.lib zdll.lib"
+				OutputFile="$(OutDir)\char-converter.exe"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="..\lib"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\char-converter.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\tools"
+			IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="true"
+				EnableFiberSafeOptimizations="true"
+				WholeProgramOptimization="true"
+				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;TXT_SQL_CONVERT"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				DefaultCharIsUnsigned="false"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough=""
+				PrecompiledHeaderFile=""
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib oldnames.lib ws2_32.lib libmysql.lib zdll.lib"
+				OutputFile="$(OutDir)\char-converter.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="..\lib"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\char-converter.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				LinkTimeCodeGeneration="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="char"
+			>
+			<File
+				RelativePath="..\src\char\char.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\char\char.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char\int_guild.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\char\int_guild.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char\int_party.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\char\int_party.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char\int_pet.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\char\int_pet.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char\int_storage.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\char\int_storage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char\inter.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\$(InputName)1.obj"
+						XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\char\inter.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="common"
+			>
+			<File
+				RelativePath="..\src\common\core.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\core.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\ers.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\ers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\malloc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\malloc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\mapindex.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\mapindex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\showmsg.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\showmsg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\strlib.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\strlib.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\utils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\utils.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="char_sql"
+			>
+			<File
+				RelativePath="..\src\char_sql\char.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\char.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_guild.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_guild.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_party.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_party.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_pet.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_pet.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_storage.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\int_storage.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\inter.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\char_sql\inter.h"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\src\txt-converter\char-converter.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

+ 260 - 0
vcproj-8/txt-converter-login.vcproj

@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="txt-converter-login"
+	ProjectGUID="{D356871D-58E1-450B-967A-E9E9646175AF}"
+	RootNamespace="txt-converter-login"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\tools"
+			IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;TXT_SQL_CONVERT"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				DefaultCharIsUnsigned="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib oldnames.lib ws2_32.lib libmysql.lib zdll.lib"
+				OutputFile="$(OutDir)\login-converter.exe"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="..\lib"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\login-converter.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\tools"
+			IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="true"
+				EnableFiberSafeOptimizations="true"
+				WholeProgramOptimization="true"
+				AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
+				PreprocessorDefinitions="WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;TXT_SQL_CONVERT"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				DefaultCharIsUnsigned="false"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderThrough=""
+				PrecompiledHeaderFile=""
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmt.lib oldnames.lib ws2_32.lib libmysql.lib zdll.lib"
+				OutputFile="$(OutDir)\login-converter.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="..\lib"
+				IgnoreAllDefaultLibraries="true"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="$(OutDir)\login-converter.pdb"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
+				LinkTimeCodeGeneration="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="common"
+			>
+			<File
+				RelativePath="..\src\common\core.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\core.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\db.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\db.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\ers.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\ers.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\malloc.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\malloc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\showmsg.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\showmsg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\utils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\common\utils.h"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\src\txt-converter\login-converter.c"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>