한 이틀전에 한거지만..
그래도 기록상 남겨야지 ㅋ
전에 KLDP에 글을 올려서 물어본적이 있었다 screen에서 토글하는거에 대해서,
그런데 other를 써서 바로전에 세션만 토글이 가능하다고 하네...
그래서 결국 오늘
screen소스 수정을 해서.. 정해진 세션 번호대로 토글이 가능해게 해놨다..
어떻게 고쳤냐면.;
~/.screenrc 파일에
bindkey -k F3 other 1 3
이런식으로 적어노으면 1 <-> 3 간에 토글이 가능하게 하는것이닷!!..
현재세션이랑 이동할려는 세션이렇게 할려고 했느데 단축키가 부족해서 ㅋ
소스파일 열라게 뒤져가지고 (process.c, comm.c) 겨우해결..
comm.c에서 other의 인수 숫자를 몇개 더 받게 늘린다음 (이거 안맞치면 아예
other 기능이 안되더라..;;)
process.c파일에서 각인수를 받게한거 가지고 SwitchWindow였나 그 함수를 적절히
if문써가지고 나타 내면 되었다...
그래서 고친건 한 열줄정도 되서 별거 아닌거 같은데...
"그 기능을 하게 할수 있는 define 이나 구조체를 찾는데 애먹었다는거.."
만세!! 인제 screen도 토글된다..ㅋ
그리고 w3m을 컴파일하는데 이번는 이상하게
Can't find termcap entry TERM 이렇게 에러메세지를 뿌리는데..
terms.c파일에 보니까 tgetent라는 함수에서 ERR나던것..
그래서 임시로 파일하나만들고 이함수를 써가지고 테스트로 한번 해봤는데..
잘되네..이상하네.. 그럼 소스 문제가 아닌데.. 하고 있었는데.. 아 컴파일 옵션이 좀
수상쩍다 싶에서 Makefile안에(in) LIB= 에 -lncursesw 를 추가해주니까
#
# Makefile
# Makefile. Generated from Makefile.in by configure.
#
SHELL=/bin/sh
PACKAGE = w3m
VERSION = 0.5.2
DOMAIN = $(PACKAGE)
prefix = /usr
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
bindir = ${exec_prefix}/bin
datadir = ${datarootdir}
localedir = $(datadir)/locale
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
infodir = ${datarootdir}/info
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
oldincludedir = /usr/include
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
top_srcdir = .
top_builddir = .
VPATH = $(top_srcdir):.
DESTDIR =
CGIBIN_DIR = $(libexecdir)/$(PACKAGE)/cgi-bin
AUXBIN_DIR = $(libexecdir)/$(PACKAGE)
HELP_DIR = ${datarootdir}/w3m
RC_DIR = ~/.w3m
ETC_DIR = $(sysconfdir)
CONF_DIR = $(sysconfdir)/$(PACKAGE)
CFLAGS = $(OPTS) -I. -I$(top_srcdir) -g -O2 -I$(srcdir)/libwc -I/usr/include/gc $(CPPFLAGS) $(DEFS)
WCCFLAGS = -DUSE_UNICODE -I$(srcdir) -I$(srcdir)/..
CPPFLAGS = -I/usr/include/gc
DEFS = -DHAVE_CONFIG_H -DAUXBIN_DIR=\"$(AUXBIN_DIR)\" \
-DCGIBIN_DIR=\"$(CGIBIN_DIR)\" -DHELP_DIR=\"$(HELP_DIR)\" \
-DETC_DIR=\"$(ETC_DIR)\" -DCONF_DIR=\"$(CONF_DIR)\" \
-DRC_DIR=\"$(RC_DIR)\" \
-DLOCALEDIR=\"$(localedir)\"
LDFLAGS =
LIBS = -lm -lnsl -ldl
EXT_LIBS = -L. -lindep -lncursesw -lgc
W3M_LIBS = -L./libwc -lwc -lssl -lcrypto -ldl -lssl -lcrypto -lgpm -ltermcap
WCTARGET = libwc/libwc.a
NLSTARGET = po
MAKE_ARGS = PERL='$(PERL)' MKDIR='$(MKDIR)' \
BIN_DIR='$(bindir)' AUXBIN_DIR='$(AUXBIN_DIR)' \
CGIBIN_DIR='$(CGIBIN_DIR)' \
HELP_DIR='$(HELP_DIR)' MAN_DIR='$(mandir)' ETC_DIR='$(ETC_DIR)' \
CONF_DIR='$(CONF_DIR)' \
RC_DIR='$(RC_DIR)' DESTDIR='$(DESTDIR)' KEYBIND_SRC='$(KEYBIND_SRC)'
IMGCFLAGS = -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng12
IMGLDFLAGS = -lgdk_pixbuf_xlib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
CC0 = gcc
CC = $(CC0)
CPP = gcc -E
RANLIB=ranlib
AWK = gawk
PERL = /usr/bin/perl
MKDIR=mkdir -p
MV=mv
RM=rm
AR=ar
INSTALL=/bin/install -c
INSTALL_PROGRAM=${INSTALL}
INSTALL_SCRIPT=${INSTALL}
INSTALL_DATA=${INSTALL} -m 644
INSTALL_W3MIMGDISPLAY=${INSTALL_PROGRAM}
HELP_FILE = w3mhelp-w3m_en.html
KEYBIND_SRC = keybind.c
KEYBIND_OBJ = keybind.o
VERSION=0.5.2
MODEL=-EN
SRCS=main.c file.c buffer.c display.c etc.c search.c linein.c table.c local.c \
form.c map.c frame.c rc.c menu.c mailcap.c image.c \
symbol.c entity.c terms.c url.c ftp.c mimehead.c regex.c news.c \
func.c cookie.c history.c backend.c $(KEYBIND_SRC)
OBJS=main.o file.o buffer.o display.o etc.o search.o linein.o table.o local.o\
form.o map.o frame.o rc.o menu.o mailcap.o image.o \
symbol.o entity.o terms.o url.o ftp.o mimehead.o regex.o news.o \
func.o cookie.o history.o backend.o $(KEYBIND_OBJ)
LSRCS=anchor.c parsetagx.c tagtable.c istream.c
LOBJS=anchor.o parsetagx.o tagtable.o istream.o
LLOBJS=version.o
ALIBOBJS=Str.o indep.o regex.o textlist.o parsetag.o myctype.o hash.o
ALIB=libindep.a
ALLOBJS=$(OBJS) $(LOBJS) $(LLOBJS)
EXT=
TARGET=$(PACKAGE)$(EXT)
BOOKMARKER=w3mbookmark$(EXT)
HELPER=w3mhelperpanel$(EXT)
INFLATE=inflate$(EXT)
IMGDISPLAY=w3mimgdisplay$(EXT)
MAN1_TARGET=$(PACKAGE).1
MAN1=$(top_srcdir)/doc/w3m.1
MAN1_JA=$(top_srcdir)/doc-jp/w3m.1
LIB_TARGETS=$(BOOKMARKER) $(HELPER)
AUXBIN_TARGETS= w3mimgdisplay$(EXT) inflate$(EXT)
TARGETS=$(TARGET) $(LIB_TARGETS) $(AUXBIN_TARGETS)
HELP_TARGET=w3mhelp.html
HELP_ALLFILES=w3mhelp-w3m_en.html w3mhelp-w3m_ja.html \
w3mhelp-lynx_en.html w3mhelp-lynx_ja.html
DEFUNS=$(top_srcdir)/main.c $(top_srcdir)/menu.c
SCRIPTSUBDIRS= scripts
SUBDIRS = $(SCRIPTSUBDIRS) w3mimg libwc po
.PHONY: $(SUBDIRS)
all: $(TARGETS) all-scripts $(NLSTARGET)
$(TARGET): $(ALLOBJS) $(ALIB) $(WCTARGET)
$(CC) $(CFLAGS) -o $(TARGET) $(ALLOBJS) $(LDFLAGS) $(LIBS) $(EXT_LIBS) $(W3M_LIBS)
$(ALIB): $(ALIBOBJS)
$(AR) rv $(ALIB) $(ALIBOBJS)
$(RANLIB) $(ALIB)
$(OBJS) $(LOBJS): fm.h funcname1.h
tagtable.c: tagtable.tab mktable$(EXT) html.h
./mktable$(EXT) 100 $(srcdir)/tagtable.tab > $@
indep.o: indep.c fm.h funcname1.h
func.o: funcname.c functable.c funcname1.h
keybind.o: funcname2.h
keybind_lynx.o: funcname2.h
parsetagx.o: html.c
funcname.tab: $(DEFUNS)
(echo '#define DEFUN(x,y,z) x y';\
sed -ne '/^DEFUN/{p;n;/^[ ]/p;}' $(DEFUNS)) | $(CPP) - | \
awk '$$1 ~ /^[_A-Za-z]/ { \
for (i=2;i<=NF;i++) { print $$i, $$1} \
}' > $@.tmp
@if cmp -s $@.tmp $@; then \
echo "$@ unchanged"; \
rm -f $@.tmp; \
else \
echo "$@ updated"; \
mv $@.tmp $@; \
fi
funcname.c: funcname.tab
sort funcname.tab | $(AWK) -f $(top_srcdir)/funcname0.awk > $@
funcname1.h: funcname.tab
sort funcname.tab | $(AWK) -f $(top_srcdir)/funcname1.awk > $@
funcname2.h: funcname.tab
sort funcname.tab | $(AWK) -f $(top_srcdir)/funcname2.awk > $@
functable.c: funcname.tab mktable$(EXT)
sort funcname.tab | $(AWK) -f $(top_srcdir)/functable.awk > functable.tab
./mktable$(EXT) 100 functable.tab > $@
-rm -f functable.tab
mktable$(EXT): mktable.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o mktable mktable.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
$(BOOKMARKER): w3mbookmark.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o $(BOOKMARKER) w3mbookmark.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
$(HELPER): w3mhelperpanel.o dummy.o $(ALIB)
$(CC) $(CFLAGS) -o $(HELPER) w3mhelperpanel.o dummy.o $(LDFLAGS) $(LIBS) $(EXT_LIBS)
$(INFLATE): inflate.o $(ALIB)
$(CC) $(CFLAGS) -o $(INFLATE) inflate.o $(LDFLAGS) $(LIBS) -lz
inflate.o: inflate.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/inflate.c
libwc/libwc.a: libwc
libwc:
(cd libwc && $(MAKE) CC='$(CC0)' OPTS='$(OPTS)')
dummy.o: entity.c
$(CC) $(CFLAGS) -DDUMMY -c -o $@ $?
$(IMGDISPLAY): w3mimgdisplay.o $(ALIB) w3mimg/w3mimg.a
$(CC) $(CFLAGS) -o $(IMGDISPLAY) w3mimgdisplay.o w3mimg/w3mimg.a $(LDFLAGS) $(LIBS) $(IMGLDFLAGS)
w3mimgdisplay.o: w3mimgdisplay.c w3mimg/w3mimg.h
$(CC) $(CFLAGS) $(IMGCFLAGS) -o $@ -c $(srcdir)/w3mimgdisplay.c
w3mimg/w3mimg.a: w3mimg
w3mimg:
(cd w3mimg && $(MAKE) CC="$(CC0)" OPTS="$(OPTS)")
po:
(cd $@ && $(MAKE))
install: install-core install-scripts install-po
install-core: $(TARGETS)
-$(MKDIR) $(DESTDIR)$(bindir)
-$(MKDIR) $(DESTDIR)$(AUXBIN_DIR)
-$(MKDIR) $(DESTDIR)$(CGIBIN_DIR)
-$(MKDIR) $(DESTDIR)$(HELP_DIR)
-$(MKDIR) $(DESTDIR)$(mandir)/man1
-$(MKDIR) $(DESTDIR)$(mandir)/ja/man1
$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
$(INSTALL_DATA) $(HELP_FILE) $(DESTDIR)$(HELP_DIR)/$(HELP_TARGET)
$(INSTALL_DATA) $(MAN1) $(DESTDIR)$(mandir)/man1/$(MAN1_TARGET)
$(INSTALL_DATA) $(MAN1_JA) $(DESTDIR)$(mandir)/ja/man1/$(MAN1_TARGET)
targets="$(AUXBIN_TARGETS)"; for file in $$targets; \
do \
case $$file in \
$(IMGDISPLAY)) $(INSTALL_W3MIMGDISPLAY) $$file \
$(DESTDIR)$(AUXBIN_DIR)/$$file;; \
*) $(INSTALL_PROGRAM) $$file $(DESTDIR)$(AUXBIN_DIR)/$$file;; \
esac; \
done
for file in $(LIB_TARGETS); \
do \
$(INSTALL_PROGRAM) $$file $(DESTDIR)$(CGIBIN_DIR)/$$file; \
done
install-helpfile:
-$(MKDIR) $(DESTDIR)$(HELP_DIR)
for file in $(HELP_ALLFILES); \
do \
$(INSTALL_DATA) $$file $(DESTDIR)$(HELP_DIR)/$$file; \
done
install-po:
NLSTARGET="$(NLSTARGET)"; for subdir in $$NLSTARGET; \
do \
(cd $$subdir && $(MAKE) install); \
done
all-scripts:
for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS)); \
done
install-scripts: all-scripts
topdir=`pwd`; \
for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS) install); \
done
uninstall:
-$(RM) $(bindir)/$(TARGET)
-for file in $(AUXBIN_TARGETS); \
do \
$(RM) -f $(AUXBIN_DIR)/$$file; \
done
-for file in $(LIB_TARGETS); \
do \
$(RM) -f $(CGIBIN_DIR)/$$file; \
done
-for file in $(HELP_ALLFILES); \
do \
$(RM) -f $(HELP_DIR)/$$file; \
done
-$(RM) -f $(HELP_DIR)/$(HELP_TARGET)
-$(RM) -f $(mandir)/man1/$(MAN1_TARGET)
-$(RM) -f $(mandir)/ja/man1/$(MAN1_TARGET)
-for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir && $(MAKE) $(MAKE_ARGS) uninstall); \
done
clean: sweep
-$(RM) -f *.o *.a $(TARGETS) mktable$(EXT)
-$(RM) -f funcname.tab
-$(RM) -f funcname.c funcname1.h funcname2.h tagtable.c functable.c
-for dir in w3mimg libwc; \
do \
(cd $$dir && $(MAKE) clean RM="$(RM)"); \
done
-for dir in $(SCRIPTSUBDIRS); \
do \
(cd $$dir && $(MAKE) clean); \
done
distclean: clean
for subdir in po scripts w3mimg libwc; \
do \
(cd $$subdir && $(MAKE) distclean); \
done
-$(RM) -f config.cache config.log config.status
-$(RM) -f w3mhelp-w3m_en.html w3mhelp-w3m_ja.html
-$(RM) -f w3mhelp-lynx_en.html w3mhelp-lynx_ja.html
-$(RM) -f version.c
-$(RM) -f posubst
-$(RM) -f config.h Makefile
-$(RM) -f *core
sweep:
-$(RM) -f core *~ *.bak *.orig *.rej
depend:
makedepend $(CFLAGS) *.c
dist:
cd ..; tar cvfz w3m-$(VERSION).tar.gz w3m
bindist:
cd ..; tar cvfz w3m-$(VERSION)-$(MODEL).tar.gz w3m/w3m* w3m/doc* w3m/Bonus* w3m/README w3m/scripts
정상적이게 그림도 잘나오네...
글다썻다 쟈야지 ㅋ