Introduction
Introduction Statistics Contact Development Disclaimer Help
Make tabwidth a global variable. - sam - An updated version of the sam text edi…
git clone git://vernunftzentrum.de/sam.git
Log
Files
Refs
LICENSE
---
commit 71c66d8c4077758f7f74ffae154d164577f1186c
parent 64ce996d964cb54a14d344c0ea242a73aaedd4f9
Author: Rob King <[email protected]>
Date: Tue, 17 May 2016 23:46:45 -0500
Make tabwidth a global variable.
Diffstat:
include/frame.h | 2 ++
libframe/frinit.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/include/frame.h b/include/frame.h
@@ -69,5 +69,7 @@ Point _frptofcharptb(Frame*, ulong, Point, int);
Point _frptofcharnb(Frame*, ulong, int);
int _frstrlen(Frame*, int);
+extern int tabwidth;
+
#define NRUNE(b) ((b)->nrune<0? 1 : (b)->nrune)
#define NBYTE(b) strlen((char*)(b)->a.ptr)
diff --git a/libframe/frinit.c b/libframe/frinit.c
@@ -4,10 +4,11 @@
#include <libg.h>
#include <frame.h>
+int tabwidth = 8;
+
void
frinit(Frame *f, Rectangle r, XftFont *ft, Bitmap *b)
{
- int tabwidth = 8;
int tabs = atoi(getenv("TABS") ? getenv("TABS") : "");
if (tabs > 0 && tabs < 12)
tabwidth = tabs;
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.