aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2017-10-10 11:30:36 -0500
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:53:24 -0600
commitd5275012b45149a2a6e94679609aacca478221ad (patch)
tree881a9c32d0d617fc472e23836779a7379c97e875 /st.c
parent3518dba2a5fb57f601b74528ddeb67f173e4024b (diff)
downloadst-d5275012b45149a2a6e94679609aacca478221ad.tar.gz
st-d5275012b45149a2a6e94679609aacca478221ad.zip
Move zoom functions into x.c
This makes x(un)loadfonts internal to x.c. Needed to reorder includes and move a typedef to keep the compiler happy. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'st.c')
-rw-r--r--st.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/st.c b/st.c
index 6338510..f1f7bc1 100644
--- a/st.c
+++ b/st.c
@@ -31,8 +31,8 @@
31#define Glyph Glyph_ 31#define Glyph Glyph_
32#define Font Font_ 32#define Font Font_
33 33
34#include "win.h"
35#include "st.h" 34#include "st.h"
35#include "win.h"
36 36
37#if defined(__linux) 37#if defined(__linux)
38 #include <pty.h> 38 #include <pty.h>
@@ -128,9 +128,6 @@ static void clipcopy(const Arg *);
128static void clippaste(const Arg *); 128static void clippaste(const Arg *);
129static void numlock(const Arg *); 129static void numlock(const Arg *);
130static void selpaste(const Arg *); 130static void selpaste(const Arg *);
131static void zoom(const Arg *);
132static void zoomabs(const Arg *);
133static void zoomreset(const Arg *);
134static void printsel(const Arg *); 131static void printsel(const Arg *);
135static void printscreen(const Arg *) ; 132static void printscreen(const Arg *) ;
136static void iso14755(const Arg *); 133static void iso14755(const Arg *);
@@ -2574,37 +2571,6 @@ tresize(int col, int row)
2574} 2571}
2575 2572
2576void 2573void
2577zoom(const Arg *arg)
2578{
2579 Arg larg;
2580
2581 larg.f = usedfontsize + arg->f;
2582 zoomabs(&larg);
2583}
2584
2585void
2586zoomabs(const Arg *arg)
2587{
2588 xunloadfonts();
2589 xloadfonts(usedfont, arg->f);
2590 cresize(0, 0);
2591 ttyresize();
2592 redraw();
2593 xhints();
2594}
2595
2596void
2597zoomreset(const Arg *arg)
2598{
2599 Arg larg;
2600
2601 if (defaultfontsize > 0) {
2602 larg.f = defaultfontsize;
2603 zoomabs(&larg);
2604 }
2605}
2606
2607void
2608resettitle(void) 2574resettitle(void)
2609{ 2575{
2610 xsettitle(opt_title ? opt_title : "st"); 2576 xsettitle(opt_title ? opt_title : "st");