Sisyphus repositório
Última atualização: 1 junho 2020 | SRPMs: 17567 | Visitas: 18664200
en ru br
ALT Linux repositórios
S:0.4.10-alt6
5.0: 0.4.10-alt3
4.1: 0.4.10-alt2
4.0: 0.4.10-alt1
3.0: 0.4.7-alt3

Group :: Jogos/Enigmas
RPM: netwalk

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: netwalk-0.4.7-home.patch
Download


diff -Naur netwalk-0.4.7.orig/linux/config_file.c netwalk-0.4.7/linux/config_file.c
--- netwalk-0.4.7.orig/linux/config_file.c	2004-08-06 23:50:05 +0400
+++ netwalk-0.4.7/linux/config_file.c	2005-03-04 19:14:26 +0300
@@ -5,9 +5,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#define NETWALK_SHARE_DIR "."
-//#define NETWALK_SHARE_DIR "/usr/share/netwalk"
-
 FILE *config_get_fp()
 {
     FILE *fp;
@@ -15,6 +12,7 @@
     char *home_dir = getenv("HOME");
     char *netwalk_dir;
     char *config_file;
+    char *font_file;
     struct stat stbuf;
 
     if (!home_dir) {
@@ -24,9 +22,9 @@
     
     netwalk_dir = malloc(strlen(home_dir) + 100);
     config_file = malloc(strlen(home_dir) + 100);
-
     strcpy(netwalk_dir, home_dir);
     strcat(netwalk_dir,"/.netwalk");
+    font_file = "/usr/share/netwalk/Vera.ttf";
 
     if (stat(netwalk_dir, &stbuf)) {
 	if (mkdir(netwalk_dir, 0755)) {
@@ -45,7 +43,11 @@
 	    fprintf(stderr, "Can't create %s\n", config_file);
 	    exit(1);
 	}
-	fprintf(fp, "font %s/Vera.ttf\n", NETWALK_SHARE_DIR);
+	if (!fopen(font_file, "r")) {
+	    fprintf(stderr, "Can't find font file at %s\n",font_file);
+	    exit(1);
+	}
+	fprintf(fp, "font %s\n", font_file);
 	fprintf(fp, "fontsize 11\n");
 	fprintf(fp, "hiscores %s/hiscores.txt\n", netwalk_dir);
 	fprintf(fp, "showmoves 0\n");
diff -Naur netwalk-0.4.7.orig/main.c netwalk-0.4.7/main.c
--- netwalk-0.4.7.orig/main.c	2005-02-07 09:54:02 +0300
+++ netwalk-0.4.7/main.c	2005-03-04 19:13:03 +0300
@@ -1587,7 +1587,7 @@
 	window_add_widget(enter_name_window, l_en1);
 
 	textbox_init(tb_en1);
-	textbox_put_text(tb_en1, "Anonymous");
+	textbox_put_text(tb_en1, getenv("USER"));
 	window_add_widget(enter_name_window, tb_en1);
 
 	button_init(b_en1);
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009