From owner-freebsd-ports Sun Feb 14 21:27:36 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA04458 for freebsd-ports-outgoing; Sun, 14 Feb 1999 21:27:36 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from mail.TISLINK.com (mail.TISLINK.com [207.141.125.3]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id VAA04453 for ; Sun, 14 Feb 1999 21:27:34 -0800 (PST) (envelope-from jrpullen@ocean.otr.usm.edu) Received: from Pullen.Tislink.com (unverified [207.141.125.107]) by mail.TISLINK.com (EMWAC SMTPRS 0.83) with SMTP id ; Sun, 14 Feb 1999 23:29:01 -0600 Message-ID: <36C7B028.41C67EA6@ocean.st.usm.edu> Date: Sun, 14 Feb 1999 23:27:04 -0600 From: "Joel R. Pullen" Organization: USM X-Mailer: Mozilla 3.04 (X11; I; FreeBSD 3.0-RELEASE i386) MIME-Version: 1.0 To: freebsd-ports@FreeBSD.ORG Subject: FTE Port Content-Type: multipart/mixed; boundary="------------446B9B3D2781E494167EB0E7" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------446B9B3D2781E494167EB0E7 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I have recently found that the fte editor can be used in FreeBSD. I made a patch for the source... I think it would be nice to have it in the ports collection for other FreeBSD users to have. Seems the problem stems from an sprintf() statement mangling the filenames in the file selection dialogs. Looks like a compiler error since it dosn't affect all platforms. I found a work around that helps to fix the filename problems. This program has both an slang interface for the console and an X11 interface with syntax highlighting...so it could be useful for alot of people to do coding, etc... http://www.kiss.uni-lj.si/~k4fr0235/fte cd fte-0.49.7/src; patch < fte-0.49.7.bsd.diff; make unix -Joel Pullen --------------446B9B3D2781E494167EB0E7 Content-Type: text/plain; charset=us-ascii; name="fte-0.49.7.bsd.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fte-0.49.7.bsd.diff" Only in fte-0.49.7.new/src: compkeys diff -abcdr fte-0.49.7/src/fte-unix.mak fte-0.49.7.new/src/fte-unix.mak *** fte-0.49.7/src/fte-unix.mak Sun Dec 20 08:06:42 1998 --- fte-0.49.7.new/src/fte-unix.mak Sun Feb 14 12:56:22 1999 *************** *** 5,11 **** # vfte - for Linux console directly (with limitations, see con_linux.cpp) ! TARGETS = xfte vfte sfte #TARGETS = xfte vfte PRIMARY = xfte --- 5,12 ---- # vfte - for Linux console directly (with limitations, see con_linux.cpp) ! TARGETS = xfte sfte ! #TARGETS = xfte vfte sfte #TARGETS = xfte vfte PRIMARY = xfte *************** *** 121,134 **** #LD = CC #COPTIONS = -xc++ ! LIBDIR = ! INCDIR = OPTIMIZE = -O2 -g #OPTIMIZE = -O -g #OPTIMIZE = -O -s ! CCFLAGS = $(OPTIMIZE) $(I18NOPTIONS) $(COPTIONS) -DUNIX $(UOS) $(INCDIR) $(XINCDIR) $(QINCDIR) $(MINCDIR) $(SINCDIR) LDFLAGS = $(OPTIMIZE) $(LIBDIR) $(XLIBDIR) $(QLIBDIR) $(MLIBDIR) OEXT = o --- 122,138 ---- #LD = CC #COPTIONS = -xc++ ! LIBDIR = -L/usr/local/lib ! INCDIR = -I/usr/local/include ! ! # Fix Date for Monty/Day/Year instead of Year/Month/Day ! DATE_FORMAT = -DMONTH_DAY_YEAR OPTIMIZE = -O2 -g #OPTIMIZE = -O -g #OPTIMIZE = -O -s ! CCFLAGS = $(OPTIMIZE) $(DATE_FORMAT) $(I18NOPTIONS) $(COPTIONS) -DUNIX $(UOS) $(INCDIR) $(XINCDIR) $(QINCDIR) $(MINCDIR) $(SINCDIR) LDFLAGS = $(OPTIMIZE) $(LIBDIR) $(XLIBDIR) $(QLIBDIR) $(MLIBDIR) OEXT = o *************** *** 140,146 **** XLIBS = -lX11 $(SOCKETLIB) VLIBS = -lgpm -lncurses # -ltermcap outdated by ncurses ! SLIBS = -lslang QLIBS = -lqt #MLIBS = -lXm -lXp -lXt -lXpm -lXext --- 144,150 ---- XLIBS = -lX11 $(SOCKETLIB) VLIBS = -lgpm -lncurses # -ltermcap outdated by ncurses ! SLIBS = -lslang -ltermcap QLIBS = -lqt #MLIBS = -lXm -lXp -lXt -lXpm -lXext *************** *** 173,180 **** #qfte: g_qt.moc g_qt_dlg.moc $(OBJS) $(QOBJS) # $(LD) $(LDFLAGS) $(OBJS) $(QOBJS) $(QLIBS) $(XLIBS) -o qfte ! vfte: $(OBJS) $(VOBJS) ! $(LD) $(LDFLAGS) $(OBJS) $(VOBJS) $(VLIBS) -o vfte sfte: $(OBJS) $(SOBJS) compkeys $(LD) $(LDFLAGS) $(OBJS) $(SOBJS) $(SLIBS) -o sfte --- 177,184 ---- #qfte: g_qt.moc g_qt_dlg.moc $(OBJS) $(QOBJS) # $(LD) $(LDFLAGS) $(OBJS) $(QOBJS) $(QLIBS) $(XLIBS) -o qfte ! #vfte: $(OBJS) $(VOBJS) ! # $(LD) $(LDFLAGS) $(OBJS) $(VOBJS) $(VLIBS) -o vfte sfte: $(OBJS) $(SOBJS) compkeys $(LD) $(LDFLAGS) $(OBJS) $(SOBJS) $(SLIBS) -o sfte diff -abcdr fte-0.49.7/src/o_directory.cpp fte-0.49.7.new/src/o_directory.cpp *** fte-0.49.7/src/o_directory.cpp Sun Dec 20 08:29:30 1998 --- fte-0.49.7.new/src/o_directory.cpp Sun Feb 14 12:49:29 1999 *************** *** 58,72 **** --- 58,94 ---- Year = Mon = Day = Hour = Min = Sec = 0; } + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + memset(s, 0, sizeof(s)); + sprintf(s, + #ifdef MONTH_DAY_YEAR + #if 1 + " %02d/%02d/%04d %02d:%02d:%02d %8ld ", + #endif + Mon, Day, Year, Hour, Min, Sec, + #else + " %04/%02d/%02d %02d:%02d:%02d %8ld ", + #endif + Files[Line]->Size()); + strcat(s, Files[Line]->Name()); + s[strlen(s)] = (Files[Line]->Type() == fiDIRECTORY)? SLASH : ' '; + s[strlen(s)] = '\0'; + #else sprintf(s, + #ifdef MONTH_DAY_YEAR + " %02d/%02d/%04d %02d:%02d:%02d %8ld %.500s%c", + Mon, Day, Year, Hour, Min, Sec, + #else #if 1 " %04d/%02d/%02d %02d:%02d:%02d %8ld %.500s%c", #endif Year, Mon, Day, Hour, Min, Sec, + #endif Files[Line]->Size(), Files[Line]->Name(), // (Files[Line]->Type() == fiDIRECTORY)? '\\' : ' '); (Files[Line]->Type() == fiDIRECTORY)? SLASH : ' '); + #endif if (Col < int(strlen(s))) MoveStr(B, 0, Width, s + Col, (Files[Line]->Type() == fiDIRECTORY) ? --------------446B9B3D2781E494167EB0E7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message