Created
August 22, 2012 12:26
-
-
Save saitoha/3425064 to your computer and use it in GitHub Desktop.
yaft on mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/x/common.h b/x/common.h | |
| index 9a264b3..9343344 100644 | |
| --- a/x/common.h | |
| +++ b/x/common.h | |
| @@ -3,9 +3,16 @@ | |
| #include <ctype.h> | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| +# if 0 | |
| #include <linux/fb.h> | |
| +# endif | |
| #include <math.h> | |
| +# if 0 | |
| #include <pty.h> | |
| +#else | |
| +#include <sys/ioctl.h> | |
| +#include <util.h> | |
| +#endif | |
| #include <signal.h> | |
| #include <stdbool.h> | |
| #include <stdint.h> | |
| diff --git a/x/conf.h b/x/conf.h | |
| index 600be27..4b0e9a3 100644 | |
| --- a/x/conf.h | |
| +++ b/x/conf.h | |
| @@ -1,13 +1,14 @@ | |
| /* See LICENSE for licence details. */ | |
| /* font path */ | |
| static char *font_path[] = { | |
| - "/home/nak/haru/.fonts/milk.yaft", | |
| - "/home/nak/haru/.fonts/ambhalf.fix", | |
| + "/Users/user/.yaft/fonts/shnm-jis0208.yaft", | |
| + "/Users/user/.yaft/fonts/shnm-jis0201.yaft", | |
| + "/Users/user/.yaft/fonts/shnm-iso8859.yaft", | |
| NULL, | |
| }; | |
| /* glyph alias file */ | |
| -static char *glyph_alias = "/home/nak/haru/.fonts/ambiguous-half.alias"; | |
| +static char *glyph_alias = "/Users/user/.yaft/fonts/ambiguous-wide.alias"; | |
| /* framubuffer device */ | |
| static char *fb_path = "/dev/fb0"; | |
| @@ -38,3 +39,4 @@ enum { | |
| TABSTOP = 8, | |
| SELECT_TIMEOUT = 20000, | |
| }; | |
| + | |
| diff --git a/x/makefile b/x/makefile | |
| index 8c7572f..6a36a2f 100644 | |
| --- a/x/makefile | |
| +++ b/x/makefile | |
| @@ -3,7 +3,7 @@ CFLAGS = -std=c99 -pedantic -Os | |
| -march=native -mtune=native \ | |
| -Ofast -flto -pipe -Wall | |
| #-pg | |
| -LDFLAGS = -lutil -lm -lX11 | |
| +LDFLAGS = -L/opt/local/lib -lutil -lm -lX11 | |
| HDR = *.h | |
| DST = yaftx | |
| diff --git a/x/terminal.h b/x/terminal.h | |
| index 334b594..f1b61c4 100644 | |
| --- a/x/terminal.h | |
| +++ b/x/terminal.h | |
| @@ -4,7 +4,7 @@ void init_cell(cell *cp) | |
| cp->code = DEFAULT_CHAR; | |
| cp->color.fg = DEFAULT_FG; | |
| cp->color.bg = DEFAULT_BG; | |
| - cp->attribute = RESET; | |
| + cp->attribute = (u8)RESET; | |
| cp->wide = HALF; | |
| } | |
| @@ -271,7 +271,9 @@ void resize(terminal *term, int lines, int cols) | |
| size.ws_row = lines; | |
| size.ws_col = cols; | |
| size.ws_xpixel = size.ws_ypixel = 0; | |
| - eioctl(term->fd, TIOCSWINSZ, &size); | |
| +#if 0 | |
| + eioctl(term->fd, TIOCSWINSZ, &size); | |
| +#endif | |
| } | |
| void term_init(terminal *term, pair res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment