Description: Replace deprecated GLib functions.
Author: Yavor Doganov <yavor@gnu.org>
Forwarded: https://savannah.nongnu.org/bugs/?57076
Last-Update: 2019-10-18
---

--- grdesktop-0.23+d040330.orig/src/options.c
+++ grdesktop-0.23+d040330/src/options.c
@@ -91,7 +91,7 @@
 		count = g_list_length(screensize);
 		for(i=0; i<count; i++) {
 			item = g_list_nth_data(screensize, i);
-			if(!g_strcasecmp(SHASH("geometry"), item)) {
+			if(!g_ascii_strcasecmp(SHASH("geometry"), item)) {
 				found = TRUE;
 				break;
 			}
@@ -156,9 +156,9 @@
 		while((entry = readdir(kbdir)) != NULL) {
 			if(entry->d_name[0] == '.')
 				continue;
-			if(!g_strcasecmp(entry->d_name, "common"))
+			if(!g_ascii_strcasecmp(entry->d_name, "common"))
 				continue;
-			if(!g_strcasecmp(entry->d_name, "modifiers"))
+			if(!g_ascii_strcasecmp(entry->d_name, "modifiers"))
 				continue;
 
 			gtk_list_store_append(GTK_LIST_STORE(model), &iter);
@@ -168,10 +168,10 @@
 			count++;
 
 			if(SHASH("keymap") != NULL) {
-				if(!g_strcasecmp(SHASH("keymap"), entry->d_name))
+				if(!g_ascii_strcasecmp(SHASH("keymap"), entry->d_name))
 					ipath = count;
 			}
-			if(!g_strcasecmp("EN", entry->d_name))
+			if(!g_ascii_strcasecmp("EN", entry->d_name))
 				ipath_en = count;
 		}
 	}
@@ -257,7 +257,7 @@
 		gchar *item;
 		item = g_list_nth_data(hostnames, i);
 
-		if(!g_strncasecmp(item, newitem, MAXHOSTNAMELEN))
+		if(!g_ascii_strncasecmp(item, newitem, MAXHOSTNAMELEN))
 			continue;
 
 		if(max >= MAXHOSTS)	/* store only max hosts */
@@ -393,7 +393,7 @@
 	/* get the current username */
 	if(!strlen(SHASH("username"))) {
 		g_hash_table_insert(config, "username",
-			g_strup((gchar*)g_get_user_name()));
+			g_ascii_strup((gchar*)g_get_user_name(), -1));
 	}
 
 	return(0);
@@ -444,7 +444,7 @@
 }
 
 gchar *screenCommand() {
-	if(!g_strcasecmp(SHASH("geometry"), _("Fullscreen"))) {
+	if(!g_ascii_strcasecmp(SHASH("geometry"), _("Fullscreen"))) {
 		return("-f ");
 	}
 
--- grdesktop-0.23+d040330.orig/src/rdpparse.c
+++ grdesktop-0.23+d040330/src/rdpparse.c
@@ -42,7 +42,7 @@
 #endif
 
 	if(SHASH("geometry") != NULL) {
-		if(!g_strcasecmp(SHASH("geometry"), _("Fullscreen"))) {
+		if(!g_ascii_strcasecmp(SHASH("geometry"), _("Fullscreen"))) {
 			fprintf(file, "screen mode id:i:%d\n", 2);
 			fprintf(file, "desktopwidth:i:%d\n", 640);
 			fprintf(file, "desktopheight:i:%d\n", 480);
@@ -164,27 +164,27 @@
 	g_warning("RDP: line: %s [%s -> %s]", line, items[0], items[2]);
 #endif
 
-	if(!g_strcasecmp(items[0], "username"))
+	if(!g_ascii_strcasecmp(items[0], "username"))
 		insert_option("username", items[2]);
-	else if(!g_strcasecmp(items[0], "domain"))
+	else if(!g_ascii_strcasecmp(items[0], "domain"))
 		insert_option("domain", items[2]);
-	else if(!g_strcasecmp(items[0], "alternate shell"))
+	else if(!g_ascii_strcasecmp(items[0], "alternate shell"))
 		insert_option("program", items[2]);
-	else if(!g_strcasecmp(items[0], "shell working directory"))
+	else if(!g_ascii_strcasecmp(items[0], "shell working directory"))
 		insert_option("ppath", items[2]);
-	else if(!g_strcasecmp(items[0], "full address"))
+	else if(!g_ascii_strcasecmp(items[0], "full address"))
 		insert_option("hostname", items[2]);
-	else if(!g_strcasecmp(items[0], "session bpp"))
+	else if(!g_ascii_strcasecmp(items[0], "session bpp"))
 		insert_option("colorsize", mod_color(items[2]));
-	else if(!g_strcasecmp(items[0], "bitmapcachepersistenable"))
+	else if(!g_ascii_strcasecmp(items[0], "bitmapcachepersistenable"))
 		insert_option("bitmapupd", mod_bitmapupd(items[2]));
-	else if(!g_strcasecmp(items[0], "desktopwidth"))
+	else if(!g_ascii_strcasecmp(items[0], "desktopwidth"))
 		insert_option("geometry",
 			mod_geometry(items[2], SHASH("geometry"), 'W'));
-	else if(!g_strcasecmp(items[0], "desktopheight"))
+	else if(!g_ascii_strcasecmp(items[0], "desktopheight"))
 		insert_option("geometry",
 			mod_geometry(items[2], SHASH("geometry"), 'H'));
-	else if(!g_strcasecmp(items[0], "screen mode id"))
+	else if(!g_ascii_strcasecmp(items[0], "screen mode id"))
 		insert_option("fullscreen", mod_fullscreen(items[2]));
 
 	if(items != NULL)
