Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 1999 23:27:04 -0600
From:      "Joel R. Pullen" <jrpullen@ocean.otr.usm.edu>
To:        freebsd-ports@FreeBSD.ORG
Subject:   FTE Port
Message-ID:  <36C7B028.41C67EA6@ocean.st.usm.edu>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36C7B028.41C67EA6>