[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[giFTcurs-commits] giFTcurs ./giFTcurs.conf.5 src/main.c src/giftc...
From: |
Göran Weinholt |
Subject: |
[giFTcurs-commits] giFTcurs ./giFTcurs.conf.5 src/main.c src/giftc... |
Date: |
Tue, 14 Oct 2003 15:48:00 -0400 |
CVSROOT: /cvsroot/giftcurs
Module name: giFTcurs
Branch:
Changes by: Göran Weinholt <address@hidden> 03/10/14 15:47:59
Modified files:
. : giFTcurs.conf.5
src : main.c giftcurs.h ui_draw.c
Log message:
Add a setting to have rounded corners if we're using utf8.
Patches:
Index: giFTcurs/giFTcurs.conf.5
diff -u giFTcurs/giFTcurs.conf.5:1.29 giFTcurs/giFTcurs.conf.5:1.30
--- giFTcurs/giFTcurs.conf.5:1.29 Wed Aug 27 06:15:17 2003
+++ giFTcurs/giFTcurs.conf.5 Tue Oct 14 15:47:58 2003
@@ -1,4 +1,4 @@
-.\" $Id: giFTcurs.conf.5,v 1.29 2003/08/27 10:15:17 weinholt Exp $
+.\" $Id: giFTcurs.conf.5,v 1.30 2003/10/14 19:47:58 weinholt Exp $
.TH GIFTCURS.CONF 5 "21 August 2003"
.SH NAME
giFTcurs.conf \- giFTcurs configuration file
@@ -48,11 +48,15 @@
For example, a value of 5242880 will prevent accidental cancellations
of downloads > 5MB.
.TP
-.I set max-console value
+.I set max\-console value
This specifies how many lines should be saved in the console backlog.
.TP
-.I set wrap-console value
+.I set wrap\-console value
If this value is non-zero, lines are wrapped in the console.
+.TP
+.I set fancy\-utf8
+If this value is non-zero, giFTcurs will use rounded corners if the
+locale uses UTF-8.
.TP
.I sort hits
Specify the sorting methods to be used for displaying hits. ; separates
Index: giFTcurs/src/giftcurs.h
diff -u giFTcurs/src/giftcurs.h:1.63 giFTcurs/src/giftcurs.h:1.64
--- giFTcurs/src/giftcurs.h:1.63 Mon Sep 15 17:28:19 2003
+++ giFTcurs/src/giftcurs.h Tue Oct 14 15:47:59 2003
@@ -18,7 +18,7 @@
* along with giFTcurs; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: giftcurs.h,v 1.63 2003/09/15 21:28:19 saturn Exp $
+ * $Id: giftcurs.h,v 1.64 2003/10/14 19:47:59 weinholt Exp $
*/
#ifndef _GIFTCURS_H
#define _GIFTCURS_H
@@ -44,7 +44,13 @@
extern const char *server_port; /* Allow symbolic port specification */
extern const char *profile_name;
extern gboolean verbose;
+#ifdef WIDE_NCURSES
extern gboolean utf8; /* Are we using UTF-8? */
+extern gboolean fancy_utf8; /* Use cool UTF-8 line drawing chars. */
+#else
+#define utf8 0
+#define fancy_utf8 0
+#endif
void graceful_death(void);
Index: giFTcurs/src/main.c
diff -u giFTcurs/src/main.c:1.137 giFTcurs/src/main.c:1.138
--- giFTcurs/src/main.c:1.137 Sat Aug 23 16:01:44 2003
+++ giFTcurs/src/main.c Tue Oct 14 15:47:59 2003
@@ -18,7 +18,7 @@
* along with giFTcurs; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: main.c,v 1.137 2003/08/23 20:01:44 weinholt Exp $
+ * $Id: main.c,v 1.138 2003/10/14 19:47:59 weinholt Exp $
*/
#include "giftcurs.h"
@@ -46,7 +46,10 @@
const char *server_port = "1213";
const char *profile_name = NULL;
gboolean verbose = FALSE;
+#ifdef WIDE_NCURSES
gboolean utf8 = FALSE;
+gboolean fancy_utf8 = FALSE;
+#endif
static gboolean do_remap_linechars = 0;
static gboolean show_usage = -1;
@@ -98,8 +101,10 @@
textdomain(PACKAGE);
#endif
+#ifdef WIDE_NCURSES
/* Determine if we need to take UTF-8 into account when doing I/O. */
utf8 = g_get_charset(NULL);
+#endif
/* Initialize the logging system */
log_init();
@@ -107,6 +112,11 @@
/* Parse configuration file(s) */
load_uiconfig();
load_configuration();
+
+#ifdef WIDE_NCURSES
+ /* Should we use rounded corners and generally cool stuff? */
+ fancy_utf8 = utf8 && atoi(get_config("set", "fancy-utf8", "0"));
+#endif
/* Parse arguments */
program_name = g_path_get_basename(argv[0]);
Index: giFTcurs/src/ui_draw.c
diff -u giFTcurs/src/ui_draw.c:1.110 giFTcurs/src/ui_draw.c:1.111
--- giFTcurs/src/ui_draw.c:1.110 Mon Oct 13 17:42:37 2003
+++ giFTcurs/src/ui_draw.c Tue Oct 14 15:47:59 2003
@@ -18,7 +18,7 @@
* along with giFTcurs; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: ui_draw.c,v 1.110 2003/10/13 21:42:37 weinholt Exp $
+ * $Id: ui_draw.c,v 1.111 2003/10/14 19:47:59 weinholt Exp $
*/
#include "giftcurs.h"
@@ -36,10 +36,19 @@
attrset(attr);
/* Corners */
- mvaddch(y, x, ACS_ULCORNER);
- mvaddch(y, x + w - 1, ACS_URCORNER);
- mvaddch(y + h - 1, x, ACS_LLCORNER);
- mvaddch(y + h - 1, x + w - 1, ACS_LRCORNER);
+ if (fancy_utf8) {
+#ifdef WIDE_NCURSES
+ mvaddwstr(y, x, L"\x256D");
+ mvaddwstr(y, x + w - 1, L"\x256E");
+ mvaddwstr(y + h - 1, x, L"\x2570");
+ mvaddwstr(y + h - 1, x + w - 1, L"\x256F");
+#endif
+ } else {
+ mvaddch(y, x, ACS_ULCORNER);
+ mvaddch(y, x + w - 1, ACS_URCORNER);
+ mvaddch(y + h - 1, x, ACS_LLCORNER);
+ mvaddch(y + h - 1, x + w - 1, ACS_LRCORNER);
+ }
/* Edges */
mvhline(y, x + 1, ACS_HLINE, w - 2);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [giFTcurs-commits] giFTcurs ./giFTcurs.conf.5 src/main.c src/giftc...,
Göran Weinholt <=