fldiff-1.1/0000755000076400007640000000000010740330746011255 5ustar mikemikefldiff-1.1/configure.in0000644000076400007640000001475410526137512013577 0ustar mikemike# # "$Id: configure.in 407 2006-11-13 18:54:02Z mike $" # # Configure script for fldiff, a graphical diff program. # # Copyright 2005-2006 by Michael Sweet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # dnl We need at least autoconf 2.50... AC_PREREQ(2.50) AC_INIT(fldiff.cxx) dnl Version number... VERSION="1.1" AC_SUBST(VERSION) AC_DEFINE_UNQUOTED(VERSION, "fldiff $VERSION") dnl Get the operating system and version number... uname=`uname` uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'` if test "x$uname" = xIRIX64; then uname="IRIX" fi if test "x$uname" = x; then # MingW doesn't provide any output when uname is run, even with "-s"... uname="CYGWIN" fi dnl Clear default debugging options and set normal optimization by dnl default unless the user asks for debugging specifically. CXXFLAGS="${CXXFLAGS:=}" AC_SUBST(CXXFLAGS) LDFLAGS="${LDFLAGS:=}" AC_SUBST(LDFLAGS) OPTIM="-O" AC_SUBST(OPTIM) AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], if eval "test x$enable_debug = xyes"; then OPTIM="-g" else LDFLAGS="$LDFLAGS -s" fi) AC_ARG_WITH(docdir, [ --with-docdir set directory for documentation], docdir="$withval", docdir="NONE") AC_SUBST(docdir) dnl Checks for programs... AC_PROG_CC AC_PROG_CXX AC_PATH_PROG(CP,cp) AC_PATH_PROG(MKDIR,mkdir) AC_PATH_PROG(RM,rm) dnl Check for FLTK... AC_PATH_PROG(FLTKCONFIG,fltk-config) if test "x$FLTKCONFIG" = x; then AC_MSG_ERROR([Sorry, fldiff requires FLTK 1.1.x.]) else CXXFLAGS="`$FLTKCONFIG --use-images --cflags` $CXXFLAGS" LIBS="`$FLTKCONFIG --use-images --ldflags` $LIBS" fi AC_SUBST(FLTKCONFIG) dnl Update compiler options... if test -n "$GCC"; then # Starting with GCC 3.0, you must link C++ programs against either # libstdc++ (shared by default), or libsupc++ (always static). If # you care about binary portability between Linux distributions, # you need to either 1) build your own GCC with static C++ libraries # or 2) link using gcc and libsupc++. We choose the latter since # fldiff doesn't (currently) use any of the stdc++ library. # # Also, GCC 3.0.x still has problems compiling some code. You may # or may not have success with it. USE 3.0.x WITH EXTREME CAUTION! # # Previous versions of GCC do not have the reliance on the stdc++ # or g++ libraries, so the extra supc++ library is not needed. AC_MSG_CHECKING(if libsupc++ is required) SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`" if test -n "$SUPC" -a "$SUPC" != "libsupc++.a"; then # This is gcc 3.x, and it knows of libsupc++, so we need it LIBS="$LIBS -lsupc++" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi if test "x$uname" != xDarwin; then CXX="$CC" fi if test -z "$OPTIM"; then OPTIM="-O2 -fforce-mem -fforce-addr -fcaller-saves" fi OPTIM="-Wall -Wno-return-type $OPTIM" # See if GCC supports -fno-rtti... AC_MSG_CHECKING(if GCC supports -fno-rtti) OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti" AC_TRY_COMPILE(,, CXXFLAGS="$CXXFLAGS -fno-rtti" AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) CFLAGS="$OLDCFLAGS" # See if GCC supports -fno-exceptions... AC_MSG_CHECKING(if GCC supports -fno-exceptions) OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-exceptions" AC_TRY_COMPILE(,, OPTIM="$OPTIM -fno-exceptions" AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) CFLAGS="$OLDCFLAGS" # See if we are running HP-UX or Solaris; if so, try the # -fpermissive option... case $uname in SunOS* | HP-UX*) AC_MSG_CHECKING(if GCC supports -fpermissive) OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fpermissive" AC_TRY_COMPILE(,, OPTIM="$OPTIM -fpermissive" AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) CFLAGS="$OLDCFLAGS" ;; *) ;; esac else case $uname in AIX*) if test -z "$OPTIM"; then OPTIM="-O2" fi ;; HP-UX*) if test -z "$OPTIM"; then OPTIM="+O2" fi OPTIM="$OPTIM +DAportable" ;; IRIX*) if test -z "$OPTIM"; then OPTIM="-O2" fi if test $uversion -ge 62; then OPTIM="$OPTIM -n32 -mips3" OPTIM="$OPTIM -OPT:Olimit=3000" OPTIM="-fullwarn -woff 1209,1506,1692 $OPTIM" else OPTIM="-fullwarn $OPTIM" fi ;; SunOS*) # Solaris if test -z "$OPTIM"; then OPTIM="-xO4" fi ;; *) # Running some other operating system; inform the user they # should contribute the necessary options to # epm@easysw.com... echo "Building fldiff with default compiler optimizations; contact" echo "fldiff@easysw.com with the uname and compiler options needed for" echo "your platform, or set the CFLAGS and CXXFLAGS environment" echo "variable before running configure." ;; esac fi dnl Fix "prefix" variable if it hasn't been specified... if test "$prefix" = "NONE"; then prefix="/usr/local" fi dnl Fix "exec_prefix" variable if it hasn't been specified... if test "$exec_prefix" = "NONE"; then exec_prefix="$prefix" fi dnl Fix "datadir" variable if it hasn't been specified... if test "$datadir" = "\${prefix}/share"; then datadir="$prefix/share" fi dnl Fix "docdir" variable if it hasn't been specified... if test "$docdir" = "NONE"; then docdir="$datadir/doc/fldiff" fi dnl Fix "mandir" variable if it hasn't been specified... if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then case "$uname" in *BSD* | Darwin* | Linux*) # BSD, Darwin (MacOS X), and Linux mandir="/usr/share/man" ;; IRIX*) # SGI IRIX mandir="/usr/share/catman/u_man" ;; *) # All others mandir="/usr/man" ;; esac fi dnl See if we have the X11 desktop stuff used by GNOME and KDE... AC_MSG_CHECKING(if GNOME/KDE desktop is in use) desktopdir="" for dir in /usr/share/applnk /etc/X11/applnk; do if test -d $dir; then desktopdir=$dir break fi done if test x$desktopdir = x; then AC_MSG_RESULT(no) INSTALLDESKTOP="" UNINSTALLDESKTOP="" else AC_MSG_RESULT(yes) INSTALLDESKTOP="install-desktop" UNINSTALLDESKTOP="uninstall-desktop" fi AC_SUBST(desktopdir) AC_SUBST(INSTALLDESKTOP) AC_SUBST(UNINSTALLDESKTOP) dnl Output the makefile and list file... AC_OUTPUT(Makefile fldiff.list) # # End of "$Id: configure.in 407 2006-11-13 18:54:02Z mike $". # fldiff-1.1/FavoritesMenu.cxx0000644000076400007640000001023010402320377014556 0ustar mikemike// // "$Id: FavoritesMenu.cxx 386 2006-03-04 14:15:27Z mike $" // // FavoritesMenu widget code. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // FavoritesMenu::add_favorite() - Add saved directory. // FavoritesMenu::handle() - Handle UI events. // Favorites::load_menu() - Load the current directory favorites. // FavoritesMenu::quote() - Quote a filename for a menu item. // FavoritesMenu::unquote() - Unquote a pathname from a menu. // #include "FavoritesMenu.h" #include #include #include // // 'FavoritesMenu::add_favorite()' - Add saved directory. // void FavoritesMenu::add_favorite(const char *d) // I - Directory to add { int i; // Looping var char name[255], // Preference name filename[1024]; // Filename Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "filechooser"); // File chooser preferences // See if directory is already in favorites... for (i = 0; i < 100; i ++) { sprintf(name, "favorite%02d", i); prefs.get(name, filename, "", sizeof(filename)); if (!filename[0]) break; if (!strcmp(filename, d)) return; } prefs.set(name, d); } // // 'FavoritesMenu::handle()' - Handle UI events. // int // O - 1 if handled, 0 otherwise FavoritesMenu::handle(int event) // I - Event { // Reload the menu when a mouse button or key is pressed... if (event == FL_PUSH || event == FL_SHORTCUT) load_menu(); // Now pass the event to the menu button widget... return (Fl_Menu_Button::handle(event)); } // // 'Favorites::load_menu()' - Load the current directory favorites. // void FavoritesMenu::load_menu() { int i; // Looping var char name[255], // Preference name filename[1024], // Filename menuitem[2048]; // Menu item const char *home; // Home directory Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "filechooser"); // File chooser preferences // Clear the list clear(); add("Add to Favorites", FL_ALT + 'a', 0); add("Manage Favorites", FL_ALT + 'm', 0, 0, FL_MENU_DIVIDER); add("Filesystems", FL_ALT + 'f', 0); if ((home = getenv("HOME")) != NULL) { quote(menuitem, home, sizeof(menuitem)); add(menuitem, FL_ALT + 'h', 0); } for (i = 0; i < 100; i ++) { sprintf(name, "favorite%02d", i); prefs.get(name, filename, "", sizeof(filename)); if (!filename[0]) break; quote(menuitem, filename, sizeof(menuitem)); add(menuitem, i < 10 ? FL_ALT + '0' + i : 0, 0); } if (i == 100) ((Fl_Menu_Item *)menu())[0].deactivate(); } // // 'FavoritesMenu::quote()' - Quote a filename for a menu item. // void FavoritesMenu::quote(char *dst, // O - Destination string const char *src, // I - Source string int dstsize)// I - Size of destination string { dstsize --; while (*src && dstsize > 1) { if (*src == '\\') { // Convert backslash to forward slash... *dst++ = '\\'; *dst++ = '/'; src ++; } else if (*src == '@') { // Quote @... *dst++ = '@'; *dst++ = *src++; } else if (*src == '/') { // Quote /... *dst++ = '\\'; *dst++ = *src++; } else *dst++ = *src++; } *dst = '\0'; } // // 'FavoritesMenu::unquote()' - Unquote a pathname from a menu. // void FavoritesMenu::unquote(char *dst, // O - Destination string const char *src, // I - Source string int dstsize) // I - Size of destination string { dstsize --; while (*src && dstsize > 1) { if (*src == '\\' || *src == '@') src ++; *dst++ = *src++; } *dst = '\0'; } // // End of "$Id: FavoritesMenu.cxx 386 2006-03-04 14:15:27Z mike $". // fldiff-1.1/fldiff.desktop0000644000076400007640000000024010201472260014064 0ustar mikemike[Desktop Entry] Name=fldiff Comment=Graphical Diff TryExec=fldiff Exec=fldiff Icon=fldiff Terminal=false Type=Application Encoding=UTF-8 Categories=Development fldiff-1.1/fldiff.jpg0000644000076400007640000012446010526142030013205 0ustar mikemikeJFIFKKC    ' .)10.)-,3:J>36F7,-@WAFLNRSR2>ZaZP`JQROC&&O5-5OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO" >3ji}z !!!!!!!!!!!N)ǁA"{{ ^$atuuuuuuuuuuup᯹ͦ/٪7<7<7<7<7<7<7<7<7<7<7<9#̳{7ɏ׼aovynhVynfOU +{{{{{{{{{:TJؙ#(K}1 ^ߗ O4ӖtsO*YjI$DDI$DB\֢ؒlgkdmfleTlakelfIr("H"$"HDow\:3a:|{Y.&Q)M˔ƴvM[أѽc4Fםnj^~veُv}8|qK+\!)&=-R_W4n`ZXiQ|kЍbeh= l]YH'6Lq70-8eE.'WAU&4zmbUFn`z/:F)iUjue#M7ܠid8X270Ǥ|azO%XRXGnp+~r5E,rk9-&;*PsEنaaaaaaaa 2sDsdϔGvQ|6No"ܞSfiw<9afR00000000 D5jgVK8S+8RpI³ DT ?]-_!Zaijgn³sijg N)8VpY_ۢf"%T{wo݋~S-f976lacƵXT N ~o"\هie'< [ojȖXUVPV|q#\;ƹK;kk[d*ӸhߨĞwaT_ۢi[)puk pe-1EpHaն;)(V:,d3EaE3EDf5OUr}[Yq@G@Zes>Uf!RBRu(fhf&8S:,4f5P%n "M6a-~vl 0M?nv*N}A 6{ #[*yS0}X`+ r|rQAqlt6H i5^_*Pri_ۢD`t>-3=bb[w@V&9ln13孌8Ydzͬ⸎0_D&/a7E-`L 0&`L 0&`L 0&`L 0&F,&l[꿷E/', gݸV.mqZ {،ZNdfņΡw6CLVIOoQ)D̙nx٬{%Җϳ=[c3{lEkb/~Z1dfo JU:.ee"5y+tXVw.ߛ_m߄PnY,.I*)-ˁ*WAL170ň/oQl`z>jm7Jy ;oɫ+M_Ulc5bBr}WQ|KFjafغ~yPY?.LY->$[9۶?Q1vq<n /72fT0Yd:"dtș2 dfl[n)vf ]-׭,Wf)RՍY.]`26X)R(՘2,Z*IX PXzdivVS_ۢ}F] =tf; aKR  FLL++cд:D꿷EMTG.Ņ8aFU5fqZ HVx^/-I1k(g 9Nӷ83eM>f5z6Y ]_ۢ}FPBAYYg cB \d>k>2Pk>1>ԳLӦ2[#2: %TzhUC#bj6 : c &?>j'WԳL攅k-k!4lhwaCbVY<tm[,}nvPM>t_O TzAI4.JCN48334k8%E=5qg 0:U,7ܾ%!"81Yk5fYk5fYk5fY#bx~CѱErGU,`P&a00m6Mim6Mim6Mim aQo"9pXZy06}W賕ZY-qT6a+a37$zkc6#2ύFuQn7xmg!;3_n6#Z=Ւmp `Sw[g-LVlU٥EËB줓,m^34w|9c'꿷E.ۉg-XLx=oU,ő99GK3Ơ;Zy ٫mWlU6u6_]ll3]m2+769l3t&ULcf]E-vK]yճ_-_mv:~_ۢ,o68בG9]-؃V__q܃hC `$V;-X}}l2bec41" 97%*R_zn48Qrlԣ+`X[RB&G21a}T|F/dyh<\O4 ֬#9 ̀V_ۢV"AՆQ*01LJ@Ll0jʚ5M!Wj.P|F%j͑s`zrB>2x=a²+a8NuP%n ! : Ѫ@P:'ڃ4Xʬµ1PS0qWNE2?wiĭ>>"c#KPǁd g֡p *)JH .(mTI })ԏ}W谭Q0+C ,dM%p!K*VVB5.U8CqD(N%?)%Ar=t]u.JtP8P TkM jX"xZ|faREDֹwv5tV,__a≨q([Bkѫ5F\ 'ւh2Eq5,Zau" HH=t +LT` [E+*Be!C5Q ԫ0VVtjD}W谚i(Fі"e(ji!⇊jtUU%Wc63c63c63c63c6M͌͌͌͌9i[Kbbbbbbbbbbb2_T3#83#83#83#83#83#83#83#83#83#83#83#83#83#83#83#83#83#83#8?! 0@Pp1?Viiiik4M4M4M4˼eYeYeYFYDDeeYeYeY""""}zׯ^NSu:zׯ^NSu:N9OEUUUUUsUUUUUUUWτϧ"*?sF?~ODsꈈW v%L> x[?.N ^ƨpjpj`ax**l[[߁.M/K 4ǃL85ǃ\x)ӊeq4iM?iOFj4Qڍ4iM?ǃbQ*V.Nr=<#DŽ{xo=xG "2Et9%6Ól96Ól96Ól93$dbY1efV7.ƚ~MUF PS(Ř˱eb1f,ŘY'ƚ NSjNibߣؼ̼̼ȼ̼̼[~/2OIf͙͌6fٛ3fl͐W+36l#6G'`0F#`L0F+P:!1"2AQa q0@B#PR3br`?MbNkTG˾jT@X! @OW 8bHV*O8 *[62ͲTlh hw@++G5KKGLi}w@Mfc#LjﺀwkAoUUcVVVUQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQZOQ[VUpiFވ3|uIݹy(p*VhB.laT~t|v*Of=Y@HG(kHU \’"*56[HXfV el[-el[-ezIpӚlS NҬTDY4ƫ+*e*0.[-el[-eV?&CE[=ٕ)eE F"ʲUd*(kX')O mƗSr<)䬬/q>طkm!pSTH" ldT|FUJm("P%VP$mRANt*&UKbE,e#OrʟiAR֧G-ke# łb-܄F`a BǸl}PS&$BQPxEаpMڎ#p|2Xfl0d4tYb&NCNdD&e3:YJVR*eQ(q+H.h6 (7BdidJ3 k(M"h94m0Futee0D|4MB]66NnTr9h7X&$B%;, S12VVyYj,̣xr 5PfBh39'T\S PЀ30lWI*4R ͢GD@0J.pHe0Vg_bࢶ2s;)oj hU>I ؜>hC 3z6+xڶO$48AL.m`;.&j>I i;}.)Zm,_w?djj<pL# :o #sߒtr:hFɧR%> T˒)SO ' HA-.XkjvAiUB{}}tOuǀCL^\ۚy̍dmU8e|SymyN9bq]~G?h:y/s.^ܿޠvJ S!V*y ݀5""S0C*?쌿iQ*$ 8ۙ>>tӜC5sZF~ B*w B5Y:a4j#HQǺP~UY>Q]hV[rG5'V$3 (Ŋ>J1JmlmȸUa6:lbM2@c$ږ.P{T9C$O-t{VO³wI0Sx};yG rQpXV|Q|si4{UMVj%Dm+@Mk]TJFEm=T*ĪPOY ;U|=8x5Y6f!2I T w0DtjMSpPj.n'%6 ?KF|bȏTgjQ"<,3 ].8XZYK Wj(RH_ )Sਰᪿ]eB' 6hwQ΋{벘V@U(@Ei(ܕYH a"x! }ӺҬu<xpebh3^?nW䙂;҈}{?>^?n!a)3D&[2>ъҔCtqI00gMSchN!!:Dy' !:YeP8l\+;dޜyOxqt>/*1m^8O0'_^rT0Ff.*K-E-(tԄ1_؟SIWnMoo|߲cUdAwdc@E"M:m&-ߒ{:H>hp@@|OKa|4qsm4RLJ}1;䝉&nrĴPÏ/-/E$84?% YvxQe_Gx{}8†y@1!I455s!v PN3sHO'!8&t]J[{2E;4C&]OR(&欯WrlE SU ,T&btT4G71ԏDڊZPva4Nhg"bB>9vyY_u晈A-b >\'L͓Hna1]n _(M&ldTBh۫[xWOT8SS&|) df^*r+P015Mĵ )1lIx+#Őitj߂~{LE P'_wӚfc<q8>@]a茾CH!3T>˳0(1@F1Jd90bu9(78o;5[MP%6ivkCq*yi!bM*1FPŅI b86挼_]8sTp0potw^V:'KTvuQ'SjR|؝ =<1M' ႘ii! y#ɐxࡥQU6;O$vU[(66cӚixx]hC8>Kgk.z'}ݯDT@ -@pdzNDT'6OMS0 FJpnT)h4+C2 Q&8&)<{:y,x@# C&D D,A oNC<{-;)P"Wf1R.sM*<4hZB2*YiHVB*L42}Dݤ-!YL#UNYiHVP,N逴EwGM75Bi氖Epry+(V_9֞{(sF 2sXpU>jps $7t#Uek+Q-nZVnZܵk+YZVe G< -QͅѤⵕek+YZVaƫ[-nZVek+YZʉhcDX~dE%i+IZJV%i+IZJV%i+IZJ> ø&͠;%i+IZJV%i+IZJV%i+IZJV=q+O}$yK[-oZԵkRK[-oZԵkRK[-oZԵkRK[-oZԵkRK[-oZԵkRK[-oZԵkRK[-oZԵkRK[-oZԵkRK[-oZԵkRK[*3*!1AQaq 0@P?!H"D$H"D$H"D$H"D$H"D$H"D$H"D$H"D$H"D$H"\>r '0r '0r '0r ' r ' r '0@`d1fDQI' A]5P1GO(a8r '(` MU9DH)zn r ' r ' r ' s ' s ' WVEP%&rDBhGHqp<ЊxK@@bK P"`8E~X\;Cv3>gh|;Cv3>gx|;Cv3>gh|;Cv3>gh|;Cv3>gh|;Cv3>gh|;Cv3>gh|;Cv3>gh|;Cv3ԝ.S/X1 hYox9ۿ"dk&C+0 IܱBD%8P*E⡒c!GpEc ;bDX|e%ql$^*FP9@ghN3rӮAzܫ#[`$eQ|G`U3Q(1pgpzpzpzpzpzpzpzpz*!F> 1N=q0B 1jh@ dS(b( w($gc4cjI:+͝lN\\\\\\\\j 8,y0P3)$K Unp4)A6$>LzBbi2((((\%)Cxx2N뙐%% *AB-$ys@*}z3ɄIp(^NRB0DZb((((1 8 dk B Ct@̲&3"QHp?'2 V8V:94 B,׋#mp{}* G?2B-[W /<@4Ђ :xˆ#hk,(YT +N >qsAB:!7L#r u6clD3d|BH@c ZaRFCeW}JE>\p%F' @܃ Lpޯ?g.%)'PBYUaEf;>Ct%@HQHģʌ1#~!0 +EȐX/Y 7j!f C@*=XT0dn cHA8fjcu$OCj+tHZFo'<4URE |=,86~4q!9 S58ĤL^DP1a9DEB=^HI" 1X(GDd$:xC+[23,0HQp6VV C=-ft l6'EpB-*CȉT/an2Ba^ېBQ^  ^SH3,q+t3R-"4SAq+hj^ ש[3 Rx8̗]Ja%!zyD=fRg'@j%EXFvbDV/p~҈1C7k SfVw(D9FIש:xIzPh}{ŕq713CAH-0=~)"a WU@68pe!"0D ⠡ T4S%r^0B~]FϦjck*?b #DzsA̔/0ѣF4hЋx+ζ }tֶ&0]hs`X>~:&^0#p,=ؗ uxHxG@ᴴ3T5V}g+pn!vKT46XMQ M#L+q!Dže%ej@pN 8'pN 8'pN 8'pN 8'z+Ye.ɮ1"((mCh!QEQEQEQE{1<"djLFYtGf WNe3s \nK:ȗ!V|O(TZ\/T<YY9hHB:W 0{$st.p>O rf TNdoLJ !g!cbR $ (h@B?j3ww73p"T쨘*]'XƷ9@ W̖RpyK@X YHK $b@#"Y r&RP8ѯ$H^aC6PjbxO  X p) 7j -aT8gO@ ,FaNq 1 "2Cd3f,L9H@ M~ 8@D@ͬKM@S zM #9:xE9ea+U|hmLɴ& z@wκ{ @D#,(]` nHΈ̪@Adt" Lb,DL1yGHÐV;QTH 7Dn*iha'aFkn E2yDޑ*pyd(|XSB$Q C9(v֘ǤZkk'`AA4Z . =%/RwlO |Ey\"+jQ;4|ƕ91gV7a硠B(% F&ZPfc{1?l &&'@'R' @% w϶ڧ wNmP# @%n c_(A,Q:1)5 aK`Bb4E0Bc1^Ѐ”G1? sDMшi+_%g0Abq NQ0d QDy jb;m m "׊LaPzЦW ʡ h9YF )c1^Na'mA`<|\QNϻ:x//e<~̠HF^6a0N 1R19j^d0 1ZL[yB@AG%2w(Ti3: 'L,xX0/LSXSX*P,$8A 8z cg,`D)ߜu@t!6{\Ӝ7:TSuN:TSuN:TSuN:TYtЂtXA -) n96 o@7"5O3!HPD"(((((( {1<42 0(F! Fa6c 7n#qF7n#qF7n#qF7ǃ@4 PH;=b͑ k]LF]I> Kj(PKY*XCl4`U yKqqqqqpAqyɷ:hH8>J耏T&M>F E *e2LAt\Xbŋ,Xbŋ,Xbŋ,X~,"@@+!d@HlIvC ]$  Eq-{u24Iҙ!XQjs)'^ 1"eQEQEQEQEQEbx^Bp 1=O6Mp7p̔n*@*` rfȀ4 {+h`,SǢ ,& X4`HQ@De.c` Z,.CXVESͯ)~͛`}?0"<1AV! t%Xʰco+ G0 `|MPI 0pnq!dž5g#LOS),]B 5&fq!Dž叜Y?FkaAb$]ߔ@g1WK}3ɁGLSNұ!-b`q 0JuƔPaMw#+TpfB "T%^ plZL~X_Q]?E(nؠ+= TGlgT @\b~d H-L NH Daj`"t> ^(X88Hq~c 2^$iTrѱ bG'3fB`(gXfH `-KU2O;@}`$2+04Y9 <$*UN"}Buc`)D@}@gHX`( 8+jʻAM[{LJn!HcNFAo | D)P+!om[!b8!`5e şIl &=1!CB~т.ǔ5G@,/sz#BWDfly,P6HI UH_!!(N3AmhR`@9xG.gȁ1AT4#b'HO ؍z6LysIQFo0"< Hs5Z?&?`0 sd|3  N>-ygИk{N"y FQx6Y$(WLSQkHAm&9X[jT#CEyD΁Y%#9=yE1ow#?&Ha.zSQYrӳZU Cre(>keFC;>T($hTPwҿ@z%I+z~&a- AD#7pht[h[tEHvm5bxB(`SuN:TSuN:TSuN:TSuN:TQf_muftQJYm"+ zEZw4CAX#34 H(fhYJh,,tizOf443H,p4E&ܴLV sJ+CP6-B[l@!flZ]}Pd N{1B Gf?Oq!DŽUyʲ*i1=O[L:0U%H@adD(  !JI4?..uĂ8z"! ,@ 8G031!Ȯ#.yb^ QҌ« шlI//@L]l5M/8d kEzx$ oR3:P FMX*)F@ @rT}BgXAhqT4 MPA"4H\yh CJ&:P >$0 =ApAZcѴ&e(f@X1teYvJV&Ȏ"eLnQ0'@kKۿi'qcFF@CJ¡ŋ,h9"& Pc 0j +6uf8`HV%!Ȭ˙& $`L`sPt#A@L@9գML:x m/bxA@Da@1u' BWPp!PQYԹҿ$%H.?аCc6s7O'HEIU),+!SOauB.LyCXTN*QW00:J }D{1%'FPG; }B t@Csz>dt4>lIԢ; v@>dv@>d6 'dLcS; }F6f)[ YK>dv@>dv@>sX;sy96՟~I<<8pȌp8?<<<<;+ϽW&0ApB :<<<<(Ϻ[-<1>><<<<(J6:㮾N<<<<(O-T[b,8j0ӌ0 0 0 %QQaD8 <<<Qb,,)2I (B 2?@0A( @ ?@ @6 ?4q0,A?1bN<#{^p8?s\a.Q\cr{0ǔ$I)*{}0`s|C"( ({%8_|GmfF5L*Z"yDQ(JiD*/F9SVj9fdݕ]LSޝ"L%9B !!AAA C!d2dAAA C!d*!1AQaq0@ P?::::::::::::::::::::::::::::::::::::::Gh7lJ;q]rch?{sCZǷyi g'=O{΁ZOOOOOOOOOOOOG'L0P\_ubΌ T.5=t.jĔptğ@e("AhHW0\pAp{DKѠSZOO{OOk:81x]c} *vb-ECXx:T 97`5g@k D>p;  ( ,r "K+ۯy_%{t:ΟL|y'gw>wgz}|#QXj" b.P#nQ㍔ |dxOFӥݼݥq( 3BcZ Ʒv]Lf8oňBն(L[^u,mTccjhQDbQU3u%R7 8+h[Z8{C VݽeIB=%T2AM)HcU{}ߝ¿ox_?3+o;׏~|O>O;|״~+o6>bd+b04Io8`FMΣPWW/d^!òVN Ç ώ;-eé;,vz[8pÇ8pÇ8pÇ8pÇ8pÇ8pÇ8pXHt?ao3e_TGEɩuC<j( ΂9T@,`#jd+XҾZ@؀3w@oOh$XhhMK^"]mӚ%iWh]?@ڬnYRm .yo0A UP],r^q6g,bW;tc;udB5$(Hgi1VlAB^bCb`ˡW}+E}X@6 ; #JUpL֭u_M!0~H 1͙/  m4;|w;|wCo0n;84M)AF x@XKf{WZSMFx FZZzZT56YfU髮C\}cknzU-m<Ĩ:kD%>D_XKAC6щ!-szcg(GK+w;|w;|?>5A ˥fpWU>E^J[teо2cf3ف#,l"AwZE^S,mHF.R,LהDJQnլg+!8}YQ -X]`l0٨K[Une4n)lN՝?p7z:zE4z~c|c4K6!wE +{WwhmfmcA['P ֕`;!41R:U [i87KvhX15cxb-CC-w5]IV[{qA ++x ެ0Bjg,tCBT+R7.LƝRL!AVg֗*!jXѩEÚ2,8Ҋ""N%4pn "5X8%D 9ֵ xzs<q#j1MwlP]Qmz@1mUEB`6xȰ\D]烤SG2V˸2\& SIH*؉ &Զ̤Ev洋^ԫ %AeTaP&a #(51bi-P.ZbapC\n=r/Hd^#/#8KǓ=jx5`QK U)C2f2g}c0XN i1U@5@He%3%Cbr-D-$'I:INt$'I:INt$'I:INt$'I:INtsHO0koȗ}Z*؅SN%8SN%8SHe8Jq)ĩJq3] @Jq)ħJq)ħJq)ħJq) ?>5JKeJڑM5cyh긵n_/QqGFfulz^1[/YX ƫdC2th9x]du/LYmLA ƫaCi K=̘JAa9uHrP5y־UQ*QK=4iq]ZJƫz+ IYއpL7%*/27KjԴ] F2@,0b e F+5WZ!:yC=ZjmKyeYo,[-N3ЉumM"Q^נQ셨9sˆ"ceh= Viꍓ:9Z_+Rk^uC*EB#P[uz0G)wM\ieڊw0\b6bpP—j^DjݷYa9`ko3,lk^-dU&qW؏E+:4ӲŹdD.j+Gt0c$ 8cDkc39#+}IHrX,^E `av3j D(BmrYD8K4}W*SsX Ma}bU.7~uQLʌ*dzE"2%gZj}&9k\=jx-!ч,Uq] X*j"6UzzL\. n0eyJsJ TKFSE4x,P ZwtTl/ DtP/_hTy@j[iLQxŜ[ZwDtFnPin-J,Rn!8='@mI?>5xw|-el[-eRQbt Ibw̬2F;s=QģYC)0$ F _U~РCAҗ3mϜcM"\JkvutZ ,G&ZAԍ%Qhh)gp4 }x"zYzpw̰_q۴4Ԗ~3Y /}GPVS_j/8Pj*#ñ"dtrXjOq/b^IȮ}w}j Ig$Y,rK9%Ig$Y,rK9%Ig$Y,rK9%Ig$Y,rK9%HsO ]pݳo㘏H[lӤr*K,#.\Euj1X+1,& BrK!mtFT-es,储cJU, ^~|kK-IuY kΎ_&X.]Ύgx TkZCK+Ђk-ơ.t=U40S:8q&EΗaF1]nf\*cO* * L%J)Z4n(JzFMÆVKQ h{F@g5Ve ţx+]")zMpR4l)Q0B|"#hֽ\F0`c:FXԲ:Šb4Fvn$0|Jʴٰ pᵢ=0uEi%6FZOHH8 u e V^H꫖oڧ֗ZZ(SJw{#<\TѮ%?QՕCz `&AD14J57Ǽq9b ::2huVZ&Q bapsy(3]BzimL j[LVЄW4Xn P⦥K\Z7! Mb75% Rf `х/I Tn" ,M=ƴnuT\82/y#}):'q u2uk[J7LŃ/t+yaƽa8;śt_BVW |ںKKiDKbPZijGU<%.yt<Fz]0gE۱`7DoV2gZiV&T4LAծl OxG-QH/mj7z3P󕨪4lRմzݤoB[kB݇^lm?=ƴnͪ,qaXItCx*vb}òqZƟ[CV"Dh-b"g5 h:~|kK-O :h+^E4Lm܎#<P )--+9eRtV1H@ -% -`M|e}[^`iqR{ύi{:ߗ~lBk\HXiGm  K̜Zy8q6#q{k@)+2b>yZr)_BrP6& ho) O8-eu$X${m×!|s0nVvoPxhJiriea@c#+^tASc.@Ǘ- Lq) LT\.7KuY=H5qIn \Zn[ԞZ^ġ$@ޛvۘ7*~d0,>A{-uSbqu 6Ncw'X tuuuSknħ)NR9Jr)S)NR9Jr)S)NR9Jr)S)NP}SaԽEohՠ4Q-]^a}vϤ3N0JI,aFS8{>lMVkr'|w;|w;|w;|)?>5@^}|?kU^(4.aP4 (8suZ>:5vmhSK fCݝF:1юtcF:1юtcF:1юtc2xV[XH(HhEEH6iє^qCs)3L]jłR/Q,V4P;.p8Lwhb#6D] pK/_I~%K/_I~%K/_HZ^Ĥ¢ZUkJ˒;ʔŭCSkQ|" RU5 ztRp9V`5͌qt*iXc!-&,z?c-<;K.Z /` x K)S1۾ǔ'8kzgeqnm%X?! lK Q6kZ*cL3/3C{S)mV IJCKuՕ*Z^%XQ[k` kz\O@@)` ^4Tn&/8a>y_!cIy±ww=ƴ:yّC0߸e5\}0EWqeWa_5[W\RbLK4#Z6غxNVCg*<Il/L@"L%neTwA2,|M<~!=bQȺgK(TB`6itX{:A(XU/S#ˢ2DFh4w,t*}bvg5Q[IZ74LAg3ɗ,%vXhj֢خ.e}1g_H:+725ZƐL6H^{FjiRCPY}Zq/bTOBP0 FY,лq>Ҋʌb&(-:6^Uʦ(AGj%"+&SXC](}#4*J~ V%;e WMAu@ag:kYnd`iaj^1_oXc>=Q_cyJ P7y\6&9Zch&xyi:{_~hdN6ڲ/D-ҲJ=$EW#1K;v lS"Z{{Bm3jD}$EERo+1p%iR\r؅@Ѡ$x#}i^QV"PhC|0V&$w)-x[ITMm]=^wҷtR_1<]ţ0kY1fQ!oX| M0 5NDsq/bPMEPjbP\FyϢŵ,횄]~EŠA@|E%$c9]ay ꘈEbQÒvbt{WQf7VرXbg'bԩk3.v3Zu=ƴ4 ь̀0sOY"5}"T djKx wP k,T~Z_k~&ol 7Ec^կE#+By +~]R.|7s.TCƸ.ij[ØzXeYEA 6kB{W-L [+T\:* ߒ v|7&SJbQT95(khty3d+, +poo"J iƈ6XS*ì,F|OZ^jr0)+xys dtҼs ]4(ix+["RN@a&DggSC¶(;7E@[[{. SKƚtk!O^@U ,Τ@!b`nֽEo,&UPGO5 OŧQjݥ7<5:>3 Ŷ\ۅ"ؗțSK(p FU`@by** >㠺 МAj*U >IxS@*utw#՚+EmRY͓eO!Rޝ^!]sJU~ NCR6SXm?h[ԇ"]Snx][HRw֙kfP]^|H 緂HbxIS-]_a`P{U[d?q/b)yfoy)yg}>/Aܔ2(2<*yEQ9]iVMrEZZYqG̬ *6k  wz{WܴRg{%HdnqU1(%!RC`#NryAQP[o Ow =g+y]͎h;u9&lj |JQhb)1yqauZKp@v6KgZ1)Dֺ}]'D@P `QѷɀqK Ua~|kK؆X^&ۖ0ҜswW*}v_JUSy1nN sK6oZ ֛k %{ ޹1*QZdoL̼Ɓ{ݵv4Mڛ+M-W @EyT\媼qeizZ3Vτ@x za+Sv)j=.+:4V^i"V72+-Wrz8*hK7aO6j& mB{uY[s)̧2f W ׺v(.&NjP/9dcɅSNa^,oM 2t![.0\J\P+lÁp](^=Be@l:+LsN -UV6i:Va X*ƹq7v>Z E3.ԟXJUT*\R#%s]8*fYieAP3h7q*9J# TMלѺx[&T4pѰТ]:e(qMdLu%9SNe9]Oq/beJ)F?19(Q4|P{ؕsIbFK¶yJ`- ^#C] m`VwMjTv_H 6*(cp@G=`9ps02=5%Υx qT0ɤKpk T҇H R&gVD vL(0Bɷq<zߔ\:-BgbQrf '֠˙^pg{F}F]Y7Ұ|osXr\X .jh(FT=Jgւ!,P F|F^:]GI,jkhmB4o2P)Ҏ!\6,!Z%ߖFԞZ^*&TnEĠ4u:qF^^dT%-0M CeϤ-V` @b<iekZJɜ)e<"f%ru+FA]h(16ꐼcٖ_4:9Ʉm:@y plTQM>|o iHu[L@TiK01;GZX@1s};~:{G YɎ ؀\o⩓B$ J֥ d`_p%qwH!za^^!sjm%gQd;%`#ՅVs[`@K劜/W?#+ >+yk^Z BR5)NPɈ *~b*i[Enua~a2>uqzXQ5W/]`()8<޺2uXD٠htr6L,`m-oCIFR# Kq#EBϓ/////W=ƴPo"ӨL dFezH]R3#TXɧi#hDy2 [=&C2S7W}e#V(D!ᯔEͅ 1]!0΍3Fҙ4mzf5leTnN,ѽbبV˝7Q\ *F1a֢GMK<-5AMƖɚT67X5|6v\:X(`/>@V>(,zDf(h/0"V7+WY^(inHTX@խTef%0 ضtJGU-:\59ՇNv(VVZ$LPYNVI^lZ&%{-ܶZp̊TXn(cVbÉt6Waj)ظRS"Z g4j]qf0ڥ("3Zպ`(B[%f6҂WLb}LoN%WYz6ѵ6+Ӊ,|E,\,"}]kpFZ)&&< hȡc[G))LnY79'p}?>5E ]A(>R*:%RVWW2D5QRX\ O(k+n 5qK*.oT̏*|9b <-"*" WBQk)*ĽZ\SjVǴєO< UPEfNU`ϟH <(fŻuU"1,wmWsUdnI^^^^^^^SGFtKɅfJ2DuXuf:5E5ePG;5LwbL:Y 8u`XS hc}2ٕhlgd]kV )sY & Ƭ0@Q1tsS^Sb279e1%Q+LQ5£(kTY5bL15@Q`o*n}> (tevB5D73=ԮvYd5 բ(7wrԁ^Rb=l6CT8thbJ(@h-41\Bqwu[l4%! \+_B 8ņth[j.^W/9^;JX ukX+a4LUn9y}`-P*V Xtbe]8P ;QWMH+`^"TTS/,*'XHHZ@Pe,ъ! Zq|@B.N A:kۅ#2lw?, X9=˞ KE.mVThTT;wz((Q[ ٖXb{ 8+&j"p*lЬxM6KFx%*Dϴ0,raZzje]Zq1D5SP@olɯSڼQVIGZ|K%w 7:K_4``U&=qѮAت#Y0_( C7@:6b-MjKUKo{ύP( Ǚ㢼*Y3xO' }>.9 kJ#>/ZảlFS4U:t@h-mTU:v#V*T)BU:NuSTAR-3 }>xO' '(ع0"3~|iL(u*Z }]iMs?~?s$-&~*^ϼ!?s?~?r$I%cyz3-B3&jDDesu:hO?~?sW=Q4(םg?s?~]~ȒI$–u%yY(sϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3}_>Wϫg3΄#0x JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJfldiff-1.1/configure0000775000076400007640000035656710740330743013211 0ustar mikemike#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="fldiff.cxx" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias VERSION CXXFLAGS LDFLAGS OPTIM CC CFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CP MKDIR RM FLTKCONFIG desktopdir INSTALLDESKTOP UNINSTALLDESKTOP LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug turn on debugging default=no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-docdir set directory for documentation Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu VERSION="1.1" cat >>confdefs.h <<_ACEOF #define VERSION "fldiff $VERSION" _ACEOF uname=`uname` uversion=`uname -r | sed -e '1,$s/[^0-9]//g'` if test "x$uname" = xIRIX64; then uname="IRIX" fi if test "x$uname" = x; then # MingW doesn't provide any output when uname is run, even with "-s"... uname="CYGWIN" fi CXXFLAGS="${CXXFLAGS:=}" LDFLAGS="${LDFLAGS:=}" OPTIM="-O" # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; if eval "test x$enable_debug = xyes"; then OPTIM="-g" else LDFLAGS="$LDFLAGS -s" fi fi # Check whether --with-docdir was given. if test "${with_docdir+set}" = set; then withval=$with_docdir; docdir="$withval" else docdir="NONE" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_CP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CP in [\\/]* | ?:[\\/]*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CP=$ac_cv_path_CP if test -n "$CP"; then { echo "$as_me:$LINENO: result: $CP" >&5 echo "${ECHO_T}$CP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MKDIR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then { echo "$as_me:$LINENO: result: $MKDIR" >&5 echo "${ECHO_T}$MKDIR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_RM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RM=$ac_cv_path_RM if test -n "$RM"; then { echo "$as_me:$LINENO: result: $RM" >&5 echo "${ECHO_T}$RM" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "fltk-config", so it can be a program name with args. set dummy fltk-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_FLTKCONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FLTKCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_FLTKCONFIG="$FLTKCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLTKCONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi FLTKCONFIG=$ac_cv_path_FLTKCONFIG if test -n "$FLTKCONFIG"; then { echo "$as_me:$LINENO: result: $FLTKCONFIG" >&5 echo "${ECHO_T}$FLTKCONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$FLTKCONFIG" = x; then { { echo "$as_me:$LINENO: error: Sorry, fldiff requires FLTK 1.1.x." >&5 echo "$as_me: error: Sorry, fldiff requires FLTK 1.1.x." >&2;} { (exit 1); exit 1; }; } else CXXFLAGS="`$FLTKCONFIG --use-images --cflags` $CXXFLAGS" LIBS="`$FLTKCONFIG --use-images --ldflags` $LIBS" fi if test -n "$GCC"; then # Starting with GCC 3.0, you must link C++ programs against either # libstdc++ (shared by default), or libsupc++ (always static). If # you care about binary portability between Linux distributions, # you need to either 1) build your own GCC with static C++ libraries # or 2) link using gcc and libsupc++. We choose the latter since # fldiff doesn't (currently) use any of the stdc++ library. # # Also, GCC 3.0.x still has problems compiling some code. You may # or may not have success with it. USE 3.0.x WITH EXTREME CAUTION! # # Previous versions of GCC do not have the reliance on the stdc++ # or g++ libraries, so the extra supc++ library is not needed. { echo "$as_me:$LINENO: checking if libsupc++ is required" >&5 echo $ECHO_N "checking if libsupc++ is required... $ECHO_C" >&6; } SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`" if test -n "$SUPC" -a "$SUPC" != "libsupc++.a"; then # This is gcc 3.x, and it knows of libsupc++, so we need it LIBS="$LIBS -lsupc++" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$uname" != xDarwin; then CXX="$CC" fi if test -z "$OPTIM"; then OPTIM="-O2 -fforce-mem -fforce-addr -fcaller-saves" fi OPTIM="-Wall -Wno-return-type $OPTIM" # See if GCC supports -fno-rtti... { echo "$as_me:$LINENO: checking if GCC supports -fno-rtti" >&5 echo $ECHO_N "checking if GCC supports -fno-rtti... $ECHO_C" >&6; } OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then CXXFLAGS="$CXXFLAGS -fno-rtti" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$OLDCFLAGS" # See if GCC supports -fno-exceptions... { echo "$as_me:$LINENO: checking if GCC supports -fno-exceptions" >&5 echo $ECHO_N "checking if GCC supports -fno-exceptions... $ECHO_C" >&6; } OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-exceptions" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then OPTIM="$OPTIM -fno-exceptions" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$OLDCFLAGS" # See if we are running HP-UX or Solaris; if so, try the # -fpermissive option... case $uname in SunOS* | HP-UX*) { echo "$as_me:$LINENO: checking if GCC supports -fpermissive" >&5 echo $ECHO_N "checking if GCC supports -fpermissive... $ECHO_C" >&6; } OLDCFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fpermissive" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then OPTIM="$OPTIM -fpermissive" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$OLDCFLAGS" ;; *) ;; esac else case $uname in AIX*) if test -z "$OPTIM"; then OPTIM="-O2" fi ;; HP-UX*) if test -z "$OPTIM"; then OPTIM="+O2" fi OPTIM="$OPTIM +DAportable" ;; IRIX*) if test -z "$OPTIM"; then OPTIM="-O2" fi if test $uversion -ge 62; then OPTIM="$OPTIM -n32 -mips3" OPTIM="$OPTIM -OPT:Olimit=3000" OPTIM="-fullwarn -woff 1209,1506,1692 $OPTIM" else OPTIM="-fullwarn $OPTIM" fi ;; SunOS*) # Solaris if test -z "$OPTIM"; then OPTIM="-xO4" fi ;; *) # Running some other operating system; inform the user they # should contribute the necessary options to # epm@easysw.com... echo "Building fldiff with default compiler optimizations; contact" echo "fldiff@easysw.com with the uname and compiler options needed for" echo "your platform, or set the CFLAGS and CXXFLAGS environment" echo "variable before running configure." ;; esac fi if test "$prefix" = "NONE"; then prefix="/usr/local" fi if test "$exec_prefix" = "NONE"; then exec_prefix="$prefix" fi if test "$datadir" = "\${prefix}/share"; then datadir="$prefix/share" fi if test "$docdir" = "NONE"; then docdir="$datadir/doc/fldiff" fi if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then case "$uname" in *BSD* | Darwin* | Linux*) # BSD, Darwin (MacOS X), and Linux mandir="/usr/share/man" ;; IRIX*) # SGI IRIX mandir="/usr/share/catman/u_man" ;; *) # All others mandir="/usr/man" ;; esac fi { echo "$as_me:$LINENO: checking if GNOME/KDE desktop is in use" >&5 echo $ECHO_N "checking if GNOME/KDE desktop is in use... $ECHO_C" >&6; } desktopdir="" for dir in /usr/share/applnk /etc/X11/applnk; do if test -d $dir; then desktopdir=$dir break fi done if test x$desktopdir = x; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } INSTALLDESKTOP="" UNINSTALLDESKTOP="" else { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } INSTALLDESKTOP="install-desktop" UNINSTALLDESKTOP="uninstall-desktop" fi ac_config_files="$ac_config_files Makefile fldiff.list" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "fldiff.list") CONFIG_FILES="$CONFIG_FILES fldiff.list" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim VERSION!$VERSION$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim OPTIM!$OPTIM$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim CXX!$CXX$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CP!$CP$ac_delim MKDIR!$MKDIR$ac_delim RM!$RM$ac_delim FLTKCONFIG!$FLTKCONFIG$ac_delim desktopdir!$desktopdir$ac_delim INSTALLDESKTOP!$INSTALLDESKTOP$ac_delim UNINSTALLDESKTOP!$UNINSTALLDESKTOP$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # # End of "$Id: configure.in 407 2006-11-13 18:54:02Z mike $". # fldiff-1.1/fldiff.spec0000644000076400007640000000243610526137512013366 0ustar mikemike# # "$Id$" # # RPM "spec" file for fldiff. # # Copyright 2005 by Michael Sweet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # Summary: fldiff Name: fldiff Version: 1.1 Release: 1 Copyright: GPL Group: Development/Tools Source: http://www.easysw.com/~mike/fldiff/fldiff-%{version}-source.tar.gz Url: http://www.easysw.com/~mike/fldiff Packager: Michael Sweet Vendor: Michael Sweet # Use buildroot so as not to disturb the version already installed BuildRoot: /var/tmp/%{name}-root %description %prep %setup ./configure --prefix=/usr --mandir=/usr/share/man %build make %install # Make sure the RPM_BUILD_ROOT directory exists. rm -rf $RPM_BUILD_ROOT make BUILDROOT=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/bin/* /usr/share/applnk/* %dir /usr/share/doc/fldiff /usr/share/doc/fldiff/* /usr/share/man/* /usr/share/icons/* # # End of "$Id$". # fldiff-1.1/FavoritesMenu.h0000644000076400007640000000227010402320377014210 0ustar mikemike// // "$Id: FavoritesMenu.h 386 2006-03-04 14:15:27Z mike $" // // FavoritesMenu widget header. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #ifndef _FavoritesMenu_h_ # define _FavoritesMenu_h_ # include # include # include class FavoritesMenu : public Fl_Menu_Button { void load_menu(); public: FavoritesMenu(int X, int Y, int W, int H, const char *L = (const char *)0) : Fl_Menu_Button(X, Y, W, H, L) {} void add_favorite(const char *d); int handle(int event); static void quote(char *dst, const char *src, int dstsize); static void unquote(char *dst, const char *src, int dstsize); }; #endif // !_FavoritesMenu_h_ // // End of "$Id: FavoritesMenu.h 386 2006-03-04 14:15:27Z mike $". // fldiff-1.1/PtProcess.cxx0000644000076400007640000000665310526137512013733 0ustar mikemike//======================================================================== // PtProcess.cxx //======================================================================== // Portable Process with pipes Handling // Features easy File and Pipe/Process opening and reading uniformization // support of read "r" or write "w" popen modes // Copyright F. Costantini 2006 // Version 1.0 //======================================================================== // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. //======================================================================== #if defined(WIN32) #include #include #include #endif #include #include "PtProcess.h" #ifdef WIN32 void CPtProcess::clean_close(HANDLE& h) { if (h!= INVALID_HANDLE_VALUE) CloseHandle(h); h = INVALID_HANDLE_VALUE; } bool CPtProcess::createPipe(HANDLE * h, BOOL bInheritHnd) { SECURITY_ATTRIBUTES sa; sa.nLength = sizeof(sa); sa.lpSecurityDescriptor = NULL; sa.bInheritHandle = bInheritHnd; return CreatePipe (&h[0],&h[1],&sa,0) ? true : false; } FILE * CPtProcess::freeHandles() { clean_close(pin[0]); clean_close(pin[1]); clean_close(pout[0]); clean_close(pout[1]); clean_close(perr[0]); clean_close(perr[1]); return NULL; // convenient for error management } #endif CPtProcess::CPtProcess() { _fpt= NULL; } CPtProcess::~CPtProcess() { if (_fpt) { close(); } } // file open : FILE * CPtProcess::fopen(const char *cmd, const char *mode) { #ifdef WIN32 pin[0] = pin[1] = pout[0] = pout[1] = perr[0] = perr[1] = INVALID_HANDLE_VALUE; #endif if (_fpt) close(); // close first before reuse _fpt = ::fopen(cmd,mode); return _fpt; } // pipe open : FILE * CPtProcess::popen(const char *cmd, const char *mode) { #if defined(WIN32) // PRECONDITIONS if (!mode || !*mode || (*mode!='r' && *mode!='w') ) return NULL; if (_fpt) close(); // close first before reuse ptmode = *mode; pin[0] = pin[1] = pout[0] = pout[1] = perr[0] = perr[1] = INVALID_HANDLE_VALUE; // stderr to stdout wanted ? int fusion = (strstr(cmd,"2>&1") !=NULL); // Create windows pipes if (!createPipe(pin) || !createPipe(pout) || (!fusion && !createPipe(perr) ) ) return freeHandles(); // error // Initialize Startup Info ZeroMemory(&si, sizeof(STARTUPINFO)); si.cb = sizeof(STARTUPINFO); si.dwFlags = STARTF_USESTDHANDLES; si.hStdInput = pin[0]; si.hStdOutput = pout[1]; si.hStdError = fusion ? pout[1] : perr [1]; if ( CreateProcess(NULL, (LPTSTR) cmd,NULL,NULL,TRUE, DETACHED_PROCESS,NULL,NULL, &si, &pi)) { // don't need theses handles inherited by child process: clean_close(pin[0]); clean_close(pout[1]); clean_close(perr[1]); HANDLE & h = *mode == 'r' ? pout[0] : pin[1]; _fpt = _fdopen(_open_osfhandle((long) h,_O_BINARY),mode); h= INVALID_HANDLE_VALUE; // reset the handle pointer that is shared // with _fpt so we don't free it twice } if (!_fpt) freeHandles(); return _fpt; #else _fpt=::popen(cmd,mode); return _fpt; #endif } // close: int CPtProcess::close() { #if defined(WIN32) if (_fpt) { fclose(_fpt); clean_close(perr[0]); fclose(_fpt); clean_close(pin[1]); clean_close(pout[0]); _fpt = NULL; return 0; } return -1; #else int ret = ::pclose(_fpt); _fpt=NULL; return ret; #endif } fldiff-1.1/DiffChooser.cxx0000644000076400007640000002006010402320377014164 0ustar mikemike// // "$Id: DiffChooser.cxx 386 2006-03-04 14:15:27Z mike $" // // DiffChooser widget code. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // DiffChooser::DiffChooser() - Create a new chooser. // DiffChooser::browser_cb() - Handle selections in the file browser. // DiffChooser::count() - Return the number of selected files. // DiffChooser::input_cb() - Handle input in the filename field. // DiffChooser::menu_cb() - Handle favorites menu selections. // DiffChooser::value() - Set the filename value. // DiffChooser::value() - Get the filename for the specified item. // #include "DiffChooser.h" #include "FavoritesWindow.h" #include #include #include // // 'DiffChooser::DiffChooser()' - Create a new chooser. // DiffChooser::DiffChooser(int X, // I - X position int Y, // I - Y position int W, // I - Width int H, // I - Height const char *L) // I - Label : Fl_Group(X, Y, W, H, L), input_(X, Y, W, 35), menu_(X, Y + 35, W, 25, "Favorites"), browser_(X, Y + 60, W, H - 60) { end(); resizable(&browser_); browser_.callback((Fl_Callback *)browser_cb, this); browser_.type(FL_MULTI_BROWSER); browser_.when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED); input_.callback((Fl_Callback *)input_cb, this); input_.when(FL_WHEN_ENTER_KEY_CHANGED); menu_.callback((Fl_Callback *)menu_cb, this); value("."); } // // 'DiffChooser::browser_cb()' - Handle selections in the file browser. // void DiffChooser::browser_cb(Fl_File_Browser *fb, // I - File browser widget DiffChooser *dc) // I - DiffChooser widget { char filename[1024]; // Filename if (fb->value() <= 0) return; snprintf(filename, sizeof(filename), "%s%s", dc->directory_, fb->text(fb->value())); if (fl_filename_isdir(filename)) { if (Fl::event_clicks()) dc->value(filename); else { filename[strlen(filename) - 1] = '\0'; dc->input_.value(filename); dc->do_callback(); } } else { dc->input_.value(filename); dc->do_callback(); } } // // 'DiffChooser::count()' - Return the number of selected files. // int // O - Count of selected items DiffChooser::count() { int i, // Looping var count; // Count of selected items for (i = 1, count = 0; i <= browser_.size(); i ++) if (browser_.selected(i)) count ++; return (count); } // // 'DiffChooser::input_cb()' - Handle input in the filename field. // void DiffChooser::input_cb(Fl_File_Input *fi,// I - File input widget DiffChooser *dc)// I - DiffChooser widget { const char *val; // Filename value char matchname[1024], // Matching filename *ptr; // Pointer into filename int i, // Looping var min_match, // Minimum number of matching chars max_match, // Maximum number of matching chars num_files, // Number of files in directory first_line; // First matching line const char *file; // File from directory val = fi->value(); i = strlen(val); if (Fl::event_key() == FL_Enter || Fl::event_key() == FL_KP_Enter || Fl::event_key() == '/' || (i > 0 && val[i - 1] == '/')) { if (!fl_filename_isdir(val) && *val) { dc->do_callback(); return; } dc->value(val); } matchname[sizeof(matchname) - 1] = '\0'; if (Fl::event_key() == '/' || Fl::event_key() == FL_Delete || Fl::event_key() == FL_BackSpace) { strncpy(matchname, val, sizeof(matchname) - 1); if ((ptr = strrchr(matchname, '/')) != NULL) ptr[1] = '\0'; if (strcmp(matchname, dc->directory_)) { strcpy(dc->directory_, matchname); dc->browser_.load(dc->directory_); } } if ((val = strrchr(val, '/')) == NULL) val = fi->value(); else val ++; // Do filename completion as possible... num_files = dc->browser_.size(); min_match = strlen(val); max_match = min_match + 1; first_line = 0; if (min_match > 0) { for (i = 1; i <= num_files && max_match > min_match; i ++) { file = dc->browser_.text(i); if (!strncmp(val, file, min_match)) { // OK, this one matches; check against the previous match if (!first_line) { // First match; copy stuff over... strncpy(matchname, file, sizeof(matchname) - 1); max_match = strlen(matchname); // Strip trailing /, if any... if (matchname[max_match - 1] == '/') { max_match --; matchname[max_match] = '\0'; } // And then make sure that the item is visible dc->browser_.topline(i); first_line = i; } else { // Succeeding match; compare to find maximum string match... while (max_match > min_match) if (!strncmp(file, matchname, max_match)) break; else max_match --; // Truncate the string as needed... matchname[max_match] = '\0'; } } } } // Scroll the file list if we have a match... dc->browser_.deselect(0); if (first_line) dc->browser_.select(first_line); dc->browser_.redraw(); // Add a partial match to the input field... if (first_line && min_match < max_match && Fl::event_key() != FL_BackSpace && Fl::event_key() != FL_Delete) { // Replace the text... i = val - fi->value(); fi->replace(i, i + min_match, matchname); // Highlight it with the cursor at the end of the selection so // s/he can press the right arrow to accept the selection // (Tab and End also do this for both cases.) fi->position(i + max_match, i + min_match); } else fi->position(fi->size()); } // // 'DiffChooser::menu_cb()' - Handle favorites menu selections. // void DiffChooser::menu_cb(FavoritesMenu *fm, // I - Favorites menu widget DiffChooser *dc) // I - DiffChooser widget { int i; // Menu item FavoritesWindow *fw; // Favorites window switch (i = fm->value()) { case 0 : // Add to favorites fm->add_favorite(dc->directory_); break; case 1 : // Manage favorites fw = new FavoritesWindow(); fw->show(); while (fw->shown()) Fl::wait(); delete fw; break; case 2 : // Filesystems dc->value(""); break; default : // Something else dc->value(fm->text(i)); break; } } // // 'DiffChooser::value()' - Set the filename value. // void DiffChooser::value(const char *f) // I - New filename { char *ptr; // Pointer in filename if (!f || !*f) { browser_.load(""); input_.value(""); directory_[0] = '\0'; return; } fl_filename_absolute(filename_, sizeof(filename_), f); ptr = filename_ + strlen(filename_) - 3; if (ptr > filename_ && (!strcmp(ptr, "/..") || !strcmp(ptr - 1, "/../"))) { if (*ptr != '/') ptr --; *ptr = '\0'; if ((ptr = strrchr(filename_, '/')) != NULL) *ptr = '\0'; } if (fl_filename_isdir(filename_)) { if (filename_[strlen(filename_) - 1] != '/') snprintf(directory_, sizeof(directory_), "%s/", filename_); else strcpy(directory_, filename_); input_.value(directory_); } else { input_.value(filename_); if ((ptr = strrchr(filename_, '/')) != NULL) ptr[1] = '\0'; strcpy(directory_, filename_); } browser_.load(directory_); } // // 'DiffChooser::value()' - Get the filename for the specified item. // const char * // O - Filename DiffChooser::value(int i) // I - Item number { // Range check... if (i < 1 || i > browser_.size()) return (NULL); snprintf(filename_, sizeof(filename_), "%s%s", directory_, browser_.text(i)); return (filename_); } // // End of "$Id: DiffChooser.cxx 386 2006-03-04 14:15:27Z mike $". // fldiff-1.1/index.html0000644000076400007640000001432410526142144013251 0ustar mikemike fldiff - graphical diff program

fldiff - graphical diff program

Last Updated: Nov 13, 2006

fldiff (screenshot) is a graphical diff program that shows the differences between two files/directories, or a file/directory and a CVS or Subversion repository. It is inspired by xdiff (Motif-based) and xxdiff (Qt-based), whose choice of GUI toolkit has hampered their portability to many of the systems I work with.

fldiff uses the Fast Light Toolkit (FLTK) and has been tested on AIX, IRIX, Linux, MacOS X, and Solaris, and should also run on Windows.

fldiff is copyright 2005-2006 by Michael Sweet and is free software provided under the terms of the GNU General Public License v2. Please report any problems and suggestions on the fltk.general newsgroup.

News

fldiff 1.1 - Nov 13, 2006

A couple new features and a minor bug fix since the 1.0.1 release:

  • Now use the GTK+ scheme, when available.
  • Added support for running fldiff on Windows.
  • Added "ignore whitespace" option for diffs.
  • Clicking on the scrollbar's down arrow would cause fldiff to crash if the diff fit in the window.

Downloading fldiff

The current release of fldiff is available here:

fldiff-1.1-source.tar.gz

The fldiff source code is available via Subversion from the following URL:

http://svn.easysw.com/public/fltk/applications/trunk/fldiff/

You can keep up-to-date by using Subversion to download the source code:

svn co http://svn.easysw.com/public/fltk/applications/trunk/fldiff/ fldiff

Compiling fldiff

Run the following commands after downloading the tarball:

./configure
make

Alternately, you can create an RPM using the following command:

rpmbuild -ta fldiff-1.1-source.tar.gz

Using fldiff

The current version is very simple. Run fldiff with two filenames to show the differences between them, or with one filename to show the changes against the current CVS or Subversion repos:

fldiff old new

fldiff file
fldiff file :revision

fldiff directory
fldiff directory :revision

After doing the diff, a window will appear with the diff:

The fldiff Window
The fldiff Window

The bar in the center of the window shows the changes in the entire file in yellow - the darkened box is the part of the diff you are viewing. If the diff is larger than can be represented in the change bar, a small zoom overlay will appear showing a full window's worth of changes centered at the mouse position.

Click in the change bar to immediately move to that position in the file or the up/down arrow button to move up or down in the diff. You can also use the PageUp, PageDown, Up, Down, BackSpace, Space, Home, End, N, and P keys to move up and down within the diff. The N and P keys show the next and previous changes in the diff, respectively.

Use the scrollbars to scroll within the diff; the scrollbars are linked so scrolling one side also scrolls the other side.

You can search both sides of the diff by pressing CTRL+f or choosing Find... from the Search menu. Repeat the search by pressing CTRL+g or choosing Find Next from the Search menu.

Drag the mouse to select the text on either side. Press CTRL+a to select all of the text on the left or SHIFT+CTRL+a to select all of the text on the right. Press CTRL+c to copy the corresponding lines of text to the clipboard.

The File menu allows you to open new diffs and close the current diff. You can also drop files in the diff window to open new diffs or double-click on filenames when comparing directories.

Choose Preferences from the Edit menu to show the preferences dialog which allows you to customize the display. These preferences and the current window size are remembered each time you run the program or open a new file.

Design Details

The diff display is implemented in the DiffView widget class derived from Fl_Group. The load() method uses the diff, cvs, or svn commands to obtain a unified diff and then builds an array of lines w/changes that are displayed by the draw() method. A custom handle() method intercepts mouse clicks and drags in the change bar.

The application window is implemented in the DiffWindow widget class derived from Fl_Overlay_Window. Inline methods are provided which map to the DiffView widget methods, and static callbacks handle the higher-level ops.

The open/compare window is implemented in the DiffOpenWindow widget class derived from Fl_Double_Window. The file/directory choosers are implemented using the DiffChooser widget class, which in turn uses the Fl_File_Input, Fl_File_Browser, and FavoritesMenu classes. Favorite management is handled by the FavoritesWindow class.

fldiff-1.1/COPYING0000644000076400007640000004311010200743234012276 0ustar mikemike GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. fldiff-1.1/vc6/0000755000076400007640000000000010655001605011745 5ustar mikemikefldiff-1.1/vc6/fldiff.dsw0000644000076400007640000000103110526137512013715 0ustar mikemikeMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "fldiff"=".\fldiff.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### fldiff-1.1/vc6/fldiff.dsp0000644000076400007640000001176610526137512013726 0ustar mikemike# Microsoft Developer Studio Project File - Name="fldiff" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 CFG=fldiff - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "fldiff.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "fldiff.mak" CFG="fldiff - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "fldiff - Win32 Release" (based on "Win32 (x86) Application") !MESSAGE "fldiff - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe !IF "$(CFG)" == "fldiff - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "VERSION=\"fldiff v1.1\"" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "NDEBUG" # ADD RSC /l 0x40c /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 # ADD LINK32 fltk.lib wsock32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 !ELSEIF "$(CFG)" == "fldiff - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "VERSION=\"fldiff v1.1\"" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x40c /d "_DEBUG" # ADD RSC /l 0x40c /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept # ADD LINK32 fltkd.lib wsock32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"c:\devl\cygwin\bin\fldiff.exe" /pdbtype:sept !ENDIF # Begin Target # Name "fldiff - Win32 Release" # Name "fldiff - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\DiffChooser.cxx # End Source File # Begin Source File SOURCE=..\DiffOpenWindow.cxx # End Source File # Begin Source File SOURCE=..\DiffView.cxx # End Source File # Begin Source File SOURCE=..\DiffWindow.cxx # End Source File # Begin Source File SOURCE=..\FavoritesMenu.cxx # End Source File # Begin Source File SOURCE=..\FavoritesWindow.cxx # End Source File # Begin Source File SOURCE=..\fldiff.cxx # End Source File # Begin Source File SOURCE=..\PtProcess.cxx # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\DiffChooser.h # End Source File # Begin Source File SOURCE=..\DiffOpenWindow.h # End Source File # Begin Source File SOURCE=..\DiffView.h # End Source File # Begin Source File SOURCE=..\DiffWindow.h # End Source File # Begin Source File SOURCE=..\FavoritesMenu.h # End Source File # Begin Source File SOURCE=..\FavoritesWindow.h # End Source File # Begin Source File SOURCE=..\PtProcess.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project fldiff-1.1/FavoritesWindow.h0000644000076400007640000000300310402320377014546 0ustar mikemike// // "$Id: FavoritesWindow.h 386 2006-03-04 14:15:27Z mike $" // // FavoritesWindow widget definitions. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #ifndef _FavoritesWindow_h_ # define _FavoritesWindow_h_ # include # include # include # include # include class FavoritesWindow : public Fl_Double_Window { Fl_File_Browser browser_; Fl_Button up_; Fl_Button delete_; Fl_Button down_; Fl_Return_Button ok_; Fl_Button cancel_; static void browser_cb(Fl_File_Browser *b, FavoritesWindow *fw); static void cancel_cb(Fl_Button *b, FavoritesWindow *fw); static void delete_cb(Fl_Button *b, FavoritesWindow *fw); static void down_cb(Fl_Button *b, FavoritesWindow *fw); void load(); static void ok_cb(Fl_Return_Button *b, FavoritesWindow *fw); void save(); static void up_cb(Fl_Button *b, FavoritesWindow *fw); public: FavoritesWindow(); void show(); }; #endif // !_FavoritesWindow_h_ // // End of "$Id: FavoritesWindow.h 386 2006-03-04 14:15:27Z mike $". // fldiff-1.1/DiffWindow.cxx0000644000076400007640000007723110526137512014051 0ustar mikemike// // "$Id: DiffWindow.cxx 407 2006-11-13 18:54:02Z mike $" // // DiffWindow widget code. // // Copyright 2005-2006 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // DiffWindow::DiffWindow() - Create a diff window. // DiffWindow::~DiffWindow() - Destroy a diff window. // DiffWindow::about_cb() - Show the about dialog. // DiffWindow::close_cb() - Close the current window. // DiffWindow::compare_cb() - Compare files. // DiffWindow::compare_selected_cb() - Compare selected files. // DiffWindow::copy_cb() - Copy the diff view selection. // DiffWindow::draw_overlay() - Draw the zoom overlay... // DiffWindow::find_cb() - Find a string in the diff. // DiffWindow::find_next_cb() - Find the next occurrence of the string. // DiffWindow::find_window() - Find a window that already has a diff open. // DiffWindow::handle() - Handle UI events in the window. // DiffWindow::load() - Load a diff. // DiffWindow::load_prefs() - Load preferences... // DiffWindow::next_change_cb() - Show the next change. // DiffWindow::open() - Open a diff. // DiffWindow::prefs_cb() - Show the preferences. // DiffWindow::prev_change_cb() - Show the previous change. // DiffWindow::quit_cb() - Quit the fldiff application. // DiffWindow::rediff_cb() - Redo the diff view. // DiffWindow::resize() - Resize the window... // DiffWindow::save_prefs() - Save preferences... // DiffWindow::select_cb() - Handle selections in the diff view. // DiffWindow::select_left_cb() - Select everything on the left side. // DiffWindow::select_none_cb() - Select nothing. // DiffWindow::select_right_cb() - Select everything on the right side. // DiffWindow::using_cb() - Show help window. // #include "DiffWindow.h" #include "DiffOpenWindow.h" #include #include #include #include #include #include #include #include #include #include #if defined(WIN32) #include #define snprintf _snprintf #define access _access #else #include #endif // // Width/height of scrollbars... // #define SCROLLER 16 // // DiffWindow globals... // Fl_Preferences DiffWindow::prefs_(Fl_Preferences::USER, "fltk.org", "fldiff"); DiffWindow *DiffWindow::first_ = (DiffWindow *)0; const char *DiffWindow::help_text_ = "The bar in the center of the window shows the changes in the\n" "entire file in yellow - the darkened box is the part of the diff\n" "you are viewing. If the diff is larger than can be represented\n" "in the change bar, a small zoom overlay will appear showing a\n" "full window's worth of changes centered at the mouse\n" "position.

\n" "

Click in the change bar to immediately move to that position\n" "in the file or the up/down arrow button to move up or down in\n" "the diff. You can also use the PageUp,\n" "PageDown, Up, Down,\n" "BackSpace, Space, Home,\n" "End, N, and P keys to move up\n" "and down within the diff. The N and P keys\n" "show the next and previous changes in the diff,\n" "respectively.

\n" "

Use the scrollbars to scroll within the diff; the scrollbars\n" "are linked so scrolling one side also scrolls the other\n" "side.

\n" "

You can search both sides of the diff by pressing\n" "CTRL+f or choosing Find... from the\n" "Search menu. Repeat the search by pressing\n" "CTRL+g or choosing Find Next from the\n" "Search menu.

\n" "

Drag the mouse to select the text on either side. Press\n" "CTRL+a to select all of the text on the left or\n" "SHIFT+CTRL+a to select all of the text on the right.\n" "Press CTRL+c to copy the corresponding lines of text\n" "to the clipboard.

\n" "

The File menu allows you to open new diffs and\n" "close the current diff. You can also drop files in the diff\n" "window to open new diffs or double-click on filenames when\n" "comparing directories.

\n" "

Choose Preferences from the Edit menu\n" "to show the preferences dialog which allows you to customize the\n" "display. These preferences and the current window size are\n" "remembered each time you run the program or open a new file.

\n"; // // 'DiffWindow::DiffWindow()' - Create a diff window. // DiffWindow::DiffWindow(const char *file1, // I - First file const char *file2) // I - Second file : Fl_Overlay_Window(640, 480), menubar_(0, 0, 640, 25), view_(0, 25, 640, 455) { int W, // Width of window H; // Height of window // Finalize the UI... end(); resizable(&view_); menubar_.box(FL_THIN_UP_BOX); menubar_.add("&File/Open\\/Compare...", FL_COMMAND | 'o', (Fl_Callback *)compare_cb, this); menubar_.add("&File/Open\\/Compare &Selected", FL_COMMAND | 'y', (Fl_Callback *)compare_selected_cb, this); menubar_.add("&File/&Close", FL_COMMAND | 'w', (Fl_Callback *)close_cb, this, FL_MENU_DIVIDER); menubar_.add("&File/&Redo Diff", FL_COMMAND | 'r', (Fl_Callback *)rediff_cb, this, FL_MENU_DIVIDER); menubar_.add("&File/&Quit", FL_COMMAND | 'q', (Fl_Callback *)quit_cb, this); menubar_.add("&Edit/Copy", FL_COMMAND | 'c', (Fl_Callback *)copy_cb, this, FL_MENU_DIVIDER); menubar_.add("&Edit/Select Left", FL_COMMAND | 'a', (Fl_Callback *)select_left_cb, this); menubar_.add("&Edit/Select Right", FL_COMMAND | 'A', (Fl_Callback *)select_right_cb, this); menubar_.add("&Edit/Select None", FL_COMMAND | 'n', (Fl_Callback *)select_none_cb, this, FL_MENU_DIVIDER); menubar_.add("&Edit/Preferences...", 0, (Fl_Callback *)prefs_cb, this); menubar_.add("&Search/Find...", FL_COMMAND | 'f', (Fl_Callback *)find_cb, this); menubar_.add("&Search/Find Next", FL_COMMAND | 'g', (Fl_Callback *)find_next_cb, this, FL_MENU_DIVIDER); menubar_.add("&Search/Previous Change", 'p', (Fl_Callback *)prev_change_cb, this); menubar_.add("&Search/Next Change", 'n', (Fl_Callback *)next_change_cb, this); menubar_.add("&Help/Using fldiff...", FL_F + 1, (Fl_Callback *)using_cb, this); menubar_.add("&Help/About fldiff...", 0, (Fl_Callback *)about_cb, this); view_.callback((Fl_Callback *)select_cb, this); load_prefs(); // Get the previous window size and resize... prefs_.get("window_width", W, 640); prefs_.get("window_height", H, 480); resize(x(), y(), W, H); // Clear the zoom data... zoom_ = true; zoom_pos_ = -1; // Clear the search data... search_[0] = '\0'; search_line_ = -1; search_right_ = true; // Load the diff... file1_ = NULL; file2_ = NULL; load(file1, file2); select_cb(&view_, this); // Add this window to the list... next_ = first_; first_ = this; } // // 'DiffWindow::~DiffWindow()' - Destroy a diff window. // DiffWindow::~DiffWindow() { DiffWindow *current, // Current diff window *prev; // Previous diff window // Free the filenames... if (file1_) free((void *)file1_); if (file2_) free((void *)file2_); // Remove the window from the list... for (current = first_, prev = (DiffWindow *)0; current; prev = current, current = current->next_) if (current == this) break; if (current) { if (prev) prev->next_ = current->next_; else first_ = current->next_; } } // // 'DiffWindow::about_cb()' - Show the about dialog. // void DiffWindow::about_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { fl_message(VERSION "\nCopyright 2005-2006 by Michael Sweet\n" "This program is free software provided under the\n" "terms of the GNU General Public License v2."); } // // 'DiffWindow::close_cb()' - Close the current window. // void DiffWindow::close_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { if (dw->next_ || first_ != dw) Fl::delete_widget(dw); else dw->load(NULL, NULL); } // // 'DiffWindow::compare_cb()' - Compare files. // void DiffWindow::compare_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { DiffOpenWindow *dow; // Open dialog window int i, j; // Looping vars int c1, // First count c2; // Second count const char *f1, // First file *f2; // Second file int W, // Width of window H; // Height of window // Create and show the open window... dow = new DiffOpenWindow(dw->file1_ ? dw->file1_ : ".", dw->file2_ ? dw->file2_ : "."); // Get the previous window size and resize... prefs_.get("open_width", W, 640); prefs_.get("open_height", H, 480); dow->resize(dow->x(), dow->y(), W, H); dow->show(); while (dow->shown()) Fl::wait(); prefs_.set("open_width", dow->w()); prefs_.set("open_height", dow->h()); // See what is chosen in each window... c1 = dow->dc1()->count(); c2 = dow->dc2()->count(); if (c1 > 0 && c2 <= 1) { // Compare N files against a single file/directory. f2 = dow->dc2()->value(); i = strlen(f2); j = strlen(dow->dc1()->directory()); if (!strncmp(f2, dow->dc1()->directory(), i) && (i == j || (i == (j - 1) && dow->dc1()->directory()[i] == '/'))) f2 = NULL; if (c1 <= 1) { // Compare one file/directory against another file/directory... f1 = dow->dc1()->value(); dw->open(f1, f2); } else { // Compare two or more files/directories against another file/directory... for (i = 1; i <= dow->dc1()->size(); i ++) if (dow->dc1()->selected(i)) { f1 = dow->dc1()->value(i); dw->open(f1, f2); } } } else if (c1 && c2) { // Compare against multiple files/directories... if (c1 <= 1) { // Compare a single file/directory against N files/directories... f1 = dow->dc1()->value(); i = strlen(f1); j = strlen(dow->dc2()->directory()); if (!strncmp(f1, dow->dc2()->directory(), i) && (i == j || (i == (j - 1) && dow->dc2()->directory()[i] == '/'))) f1 = NULL; for (i = 1; i <= dow->dc2()->size(); i ++) if (dow->dc2()->selected(i)) { f2 = dow->dc2()->value(i); dw->open(f2, f1); } } else if (c1 == c2) { // Compare N files/directories... for (i = 1, j = 0; i <= dow->dc1()->size(); i ++) if (dow->dc1()->selected(i)) { f1 = dow->dc1()->value(i); for (j ++; j <= dow->dc1()->size(); j ++) if (dow->dc2()->selected(j)) break; if (j <= dow->dc1()->size()) { f2 = dow->dc2()->value(j); dw->open(f1, f2); } } } else { // We don't support comparing N to M... fl_alert("Can only compare N files/directories against 1 or N files/directories!"); } } // Delete the file chooser... delete dow; } // // 'DiffWindow::compare_selected_cb()' - Compare selected files. // void DiffWindow::compare_selected_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { int i; // Looping var char nfile1[1024], // New first file nfile2[1024]; // New second file const char *nfptr2; // Pointer to second file for (i = dw->view_.select_start(); i <= dw->view_.select_end(); i ++) { if (dw->view_.left(i) && dw->view_.right(i)) { snprintf(nfile1, sizeof(nfile1), "%s/%s", dw->file1_, dw->view_.left(i)); if (dw->file2_ && dw->file2_[0] != ':') { snprintf(nfile2, sizeof(nfile2), "%s/%s", dw->file2_, dw->view_.right(i)); nfptr2 = nfile2; } else nfptr2 = dw->file2_; dw->open(nfile1, nfptr2); } else if (dw->view_.left(i)) fl_alert("No diff available for \"%s\"", dw->view_.left(i)); else fl_alert("No diff available for \"%s\"", dw->view_.right(i)); } } // // 'DiffWindow::copy_cb()' - Copy the diff view selection. // void DiffWindow::copy_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { char *buf = dw->view_.selection(); // Selection text if (buf) { Fl::copy(buf, strlen(buf), 1); free(buf); } } // // 'DiffWindow::draw_overlay()' - Draw the zoom overlay... // void DiffWindow::draw_overlay() { int xoffset, // X offset ystart, // Start Y pos yend, // End Y pos pstart, // Page start Y pos pend; // Page end Y pos int line, // Current line startline, // Start line endline, // End line lines; // Lines per page if (zoom_pos_ >= 0 && view_.count()) { lines = (h() - 25 - SCROLLER) / textsize(); line = (zoom_pos_ - 26 - SCROLLER) * view_.count() / (h() - 3 * SCROLLER - 27); startline = line - lines / 2; endline = line + lines / 2; if (startline < 0) { endline -= startline; startline = 0; } if (endline >= view_.count()) { startline -= endline - view_.count() + 1; endline = view_.count() - 1; } if (startline < 0) startline = 0; xoffset = (w() + SCROLLER) / 2; ystart = zoom_pos_ - line + startline - 1; yend = zoom_pos_ - line + endline + 1; if (ystart < 25) { yend -= ystart - 25; ystart = 25; } if (yend >= (h() - SCROLLER)) { ystart -= yend - h() + SCROLLER + 1; yend = h() - SCROLLER - 1; } pstart = startline * (h() - 27 - 3 * SCROLLER) / view_.count() + 25 + SCROLLER; pend = (endline + 1) * (h() - 27 - 3 * SCROLLER) / view_.count() + 26 + SCROLLER; fl_color(fl_color_average(FL_DARK2, textcolor(), 0.5f)); fl_rectf(xoffset + 30, ystart, SCROLLER, yend - ystart); fl_color(textcolor()); fl_rect(xoffset + 30, ystart, SCROLLER, yend - ystart); fl_rect(xoffset - SCROLLER, pstart, SCROLLER, pend - pstart); fl_line(xoffset, pstart, xoffset + 30, ystart); fl_line(xoffset, pend, xoffset + 30, yend); fl_color(selection_color()); for (line = startline; line <= endline; line ++) if (view_.line_changed(line)) { if (view_.left(line) && view_.right(line)) fl_xyline(xoffset + 31, ystart + line - startline + 1, xoffset + 30 + SCROLLER); else if (view_.left(line)) fl_xyline(xoffset + 31, ystart + line - startline + 1, xoffset + 30 + SCROLLER / 2); else fl_xyline(xoffset + 31 + SCROLLER / 2, ystart + line - startline + 1, xoffset + 30 + SCROLLER); } } } // // 'DiffWindow::find_cb()' - Find a string in the diff. // void DiffWindow::find_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { const char *s; // String if ((s = fl_input("Search For?", dw->search_)) != NULL) { strncpy(dw->search_, s, sizeof(dw->search_) - 1); dw->search_[sizeof(dw->search_) - 1] = '\0'; dw->search_line_ = -1; dw->search_right_ = true; find_next_cb(m, dw); } } // // 'DiffWindow::find_next_cb()' - Find the next occurrence of the string. // void DiffWindow::find_next_cb(Fl_Menu_Bar *m,// I - Menubar DiffWindow *dw) // I - Window { const char *line; // Text from line if (!dw->search_[0]) { fl_beep(); return; } dw->view_.select(-1, -1, false); while (dw->search_line_ < dw->view_.count()) { // Advance to the next if (dw->search_right_) { dw->search_right_ = false; dw->search_line_ ++; if (dw->search_line_ >= dw->view_.count()) break; } else dw->search_right_ = true; if (dw->search_right_) line = dw->view_.right(dw->search_line_); else line = dw->view_.left(dw->search_line_); if (line && strstr(line, dw->search_) != NULL) { dw->view_.select(dw->search_line_, dw->search_line_, dw->search_right_); dw->view_.showline(dw->search_line_); return; } } fl_alert("Search string not found."); } // // 'DiffWindow::find_window()' - Find a window that already has a diff open. // DiffWindow * // O - Window or NULL DiffWindow::find_window(const char *f1, // I - First file const char *f2) // I - Second file { DiffWindow *dw; // Current window char filename[1024]; // Real second file filename[sizeof(filename) - 1] = '\0'; if (f1 && f2) { if (!fl_filename_isdir(f1) && fl_filename_isdir(f2)) { if (f2[strlen(f2) - 1] == '/') snprintf(filename, sizeof(filename), "%s%s", f2, fl_filename_name(f1)); else snprintf(filename, sizeof(filename), "%s/%s", f2, fl_filename_name(f1)); } else strncpy(filename, f2, sizeof(filename) - 1); } else if (f2) strncpy(filename, f2, sizeof(filename) - 1); for (dw = first_; dw; dw = dw->next_) if (((dw->file1_ == f1 || (dw->file1_ && f1 && !strcmp(dw->file1_, f1))) && (dw->file2_ == f2 || (dw->file2_ && f2 && !strcmp(dw->file2_, filename))) || ((dw->file1_ && f2 && !strcmp(dw->file1_, filename)) && (dw->file2_ && f1 && !strcmp(dw->file2_, f1))))) return (dw); return ((DiffWindow *)0); } // // 'DiffWindow::handle()' - Handle UI events in the window. // int // O - 1 if handled, 0 otherwise DiffWindow::handle(int event) // I - Event { char *ptr; // Pointer into DND data int num_files; // Number of files in URL list char *files[100]; // Files switch (event) { case FL_PUSH : if (zoom_pos_ >= 0) { zoom_pos_ = -1; redraw_overlay(); } break; case FL_RELEASE : case FL_MOVE : case FL_DRAG : if (Fl::event_y() >= (25 + SCROLLER) && Fl::event_y() < (h() - 2 * SCROLLER) && Fl::event_x() >= ((w() - SCROLLER) / 2) && Fl::event_x() < ((w() + SCROLLER) / 2) && zoom_ && view_.count() > (h() - 27 - SCROLLER)) { zoom_pos_ = Fl::event_y(); redraw_overlay(); } else if (zoom_pos_ >= 0) { zoom_pos_ = -1; redraw_overlay(); } break; case FL_DND_ENTER : Fl::focus(this); case FL_ENTER : case FL_LEAVE : case FL_FOCUS : case FL_UNFOCUS : case FL_DND_LEAVE : case FL_DND_DRAG : return (1); case FL_DND_RELEASE : take_focus(); return (1); case FL_PASTE : printf("PASTE: \"%s\"\n", Fl::event_text()); for (ptr = (char *)Fl::event_text(), num_files = 0; ptr && *ptr;) { if (!strncmp(ptr, "file:", 5)) { files[num_files] = ptr + 5; num_files ++; } else if (ptr[0] == '/') { files[num_files] = ptr; num_files ++; } if ((ptr = strstr(ptr, "\r\n")) != NULL) { *ptr = '\0'; ptr += 2; } if (num_files >= (int)(sizeof(files) / sizeof(files[0]))) break; } if (num_files < 1 || num_files > 2) fl_alert("Sorry, fldiff only supports comparing 1 file to a\n" "repository or 2 files to each other..."); else if (file1_) { DiffWindow *dw; // New diff window if (num_files == 1) dw = new DiffWindow(files[0], NULL); else dw = new DiffWindow(files[0], files[1]); dw->show(); } else if (num_files == 1) load(files[0], NULL); else load(files[0], files[1]); return (1); } return (Fl_Overlay_Window::handle(event)); } // // 'DiffWindow::load()' - Load a diff. // bool // O - True on success, false on failure DiffWindow::load(const char *file1, // I - First file const char *file2) // I - Second file { Fl_Menu_Item *item; // Compare selected menu item... char filename[1024]; // Real second file item = (Fl_Menu_Item *)menubar_.menu() + 2; item->deactivate(); redraw(); if (file1_) free((void *)file1_); if (file2_) free((void *)file2_); if (file1 && !*file1) file1 = NULL; if (file2 && !*file2) file2 = NULL; filename[sizeof(filename) - 1] = '\0'; if (file1 && file2) { if (!fl_filename_isdir(file1) && fl_filename_isdir(file2)) { if (file2[strlen(file2) - 1] == '/') snprintf(filename, sizeof(filename), "%s%s", file2, fl_filename_name(file1)); else snprintf(filename, sizeof(filename), "%s/%s", file2, fl_filename_name(file1)); } else strncpy(filename, file2, sizeof(filename) - 1); } else if (file2) strncpy(filename, file2, sizeof(filename) - 1); file1_ = file1 ? strdup(file1) : NULL; file2_ = file2 ? strdup(filename) : NULL; if (!view_.load(file1_, file2_)) { if (file1_ || file2_) fl_alert("Sorry, no diff available!"); label(VERSION); return (false); } // Format a title... if (file2_ && file2_[0] != ':') snprintf(title_, sizeof(title_), "%s <-> %s - " VERSION, file1_, file2_); else if (file2_) snprintf(title_, sizeof(title_), "r%s <-> %s - " VERSION, file2_ + 1, file1_); else snprintf(title_, sizeof(title_), "repos <-> %s - " VERSION, file1_); label(title_); select_cb(&view_, this); return (true); } // // 'DiffWindow::load_prefs()' - Load preferences... // void DiffWindow::load_prefs() { int v; // Value prefs_.get("color", v, FL_WHITE); color((Fl_Color)v); prefs_.get("selection_color", v, FL_YELLOW); selection_color((Fl_Color)v); prefs_.get("showlinenum", v, true); showlinenum(v ? true : false); prefs_.get("tabwidth", v, 8); tabwidth(v); prefs_.get("textcolor", v, FL_BLACK); textcolor((Fl_Color)v); prefs_.get("textsize", v, FL_NORMAL_SIZE); textsize(v); prefs_.get("ignoreblanks", v, false); ignoreblanks(v ? true : false); } // // 'DiffWindow::next_change_cb()' - Show the next change. // void DiffWindow::next_change_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { int i; // Looping var // Skip the rest of the current change at the bottom of the screen... i = dw->view_.topline() + (dw->view_.h() - SCROLLER) / dw->view_.textsize() - 1; while (i < dw->view_.count() && dw->view_.line_changed(i)) i ++; // Then find the next change... for (; i < dw->view_.count(); i ++) if (dw->view_.line_changed(i)) { dw->view_.showline(i); return; } fl_alert("No more changes follow the current position."); } // // 'DiffWindow::open()' - Open a diff. // void DiffWindow::open(const char *f1, // I - First file const char *f2) // I - Second file { DiffWindow *dw; // New diff window if ((dw = find_window(f1, f2)) == NULL) { // Diff not already open... if (file1_) { // Create a new window dw = new DiffWindow(f1, f2); } else { // Load in the current window dw = this; load(f1, f2); } } // Show/raise the window... dw->show(); } // // 'DiffWindow::prefs_cb()' - Show the preferences. // void DiffWindow::prefs_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { Fl_Double_Window *win; // Preferences window Fl_Group *group; // Control group Fl_Spinner *tabwidth, // Tab size *textsize; // Text size Fl_Button *textfg, // Foreground color *textbg, // Background color *hicolor; // Highlight color Fl_Check_Button *linenum; // Show line numbers? Fl_Check_Button *ignoreb; // ignore blanks during diff compare ? Fl_Button *ok, // OK button *cancel; // Cancel button Fl_Widget *current; // Current widget win = new Fl_Double_Window(220, 310, "Preferences - " VERSION); win->modal(); group = new Fl_Group(10, 10, 200, 255); group->box(FL_THIN_DOWN_BOX); group->color(FL_GRAY - 1); tabwidth = new Fl_Spinner(160, 20, 40, 25, "Tab Width:"); tabwidth->align(FL_ALIGN_LEFT); tabwidth->range(1.0, 20.0); tabwidth->step(1.0); tabwidth->value(dw->view_.tabwidth()); textsize = new Fl_Spinner(160, 55, 40, 25, "Text Size:"); textsize->align(FL_ALIGN_LEFT); textsize->range(6.0, 20.0); textsize->step(1.0); textsize->value(dw->view_.textsize()); textfg = new Fl_Button(160, 90, 25, 25, "Text Color:"); textfg->align(FL_ALIGN_LEFT); textfg->color(dw->view_.textcolor()); textfg->box(FL_BORDER_BOX); textbg = new Fl_Button(160, 125, 25, 25, "Background Color:"); textbg->align(FL_ALIGN_LEFT); textbg->color(dw->view_.color()); textbg->box(FL_BORDER_BOX); hicolor = new Fl_Button(160, 160, 25, 25, "Highlight Color:"); hicolor->align(FL_ALIGN_LEFT); hicolor->color(dw->view_.selection_color()); hicolor->box(FL_BORDER_BOX); linenum = new Fl_Check_Button(160, 195, 25, 25, "Show Line Numbers:"); linenum->align(FL_ALIGN_LEFT); linenum->value(dw->view_.showlinenum()); ignoreb = new Fl_Check_Button(160, 230, 25, 25, "Ignore Whitespace:"); ignoreb->align(FL_ALIGN_LEFT); ignoreb->value(dw->view_.ignoreblanks()); group->end(); ok = new Fl_Button(100, 275, 40, 25, "OK"); ok->shortcut(FL_Enter); cancel = new Fl_Button(150, 275, 60, 25, "Cancel"); win->end(); win->hotspot(win); win->show(); while (win->shown()) { if ((current = Fl::readqueue()) == cancel) break; else if (current == ok) { // Apply prefs dw->view_.color(textbg->color()); dw->view_.textcolor(textfg->color()); dw->view_.tabwidth((int)tabwidth->value()); dw->view_.textsize((int)textsize->value()); dw->view_.selection_color(hicolor->color()); dw->view_.showlinenum(linenum->value() ? true : false); dw->view_.ignoreblanks(ignoreb->value() ? true : false); // Reload the diff... dw->view_.load(dw->file1_, dw->file2_); // Save prefs... dw->save_prefs(); break; } else if (current == textfg || current == textbg || current == hicolor) current->color(fl_show_colormap(current->color())); Fl::wait(); } win->hide(); delete win; } // // 'DiffWindow::prev_change_cb()' - Show the previous change. // void DiffWindow::prev_change_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { int i; // Looping var for (i = dw->view_.topline() - 1; i >= 0; i --) if (dw->view_.line_changed(i)) { while (i >= 0 && dw->view_.line_changed(i)) i --; dw->view_.showline(i + 1); return; } fl_alert("No more changes precede the current position."); } // // 'DiffWindow::quit_cb()' - Quit the fldiff application. // void DiffWindow::quit_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { for (dw = first_; dw; dw = dw->next_) Fl::delete_widget(dw); } // // 'DiffWindow::rediff_cb()' - Redo the diff view. // void DiffWindow::rediff_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { dw->view_.load(dw->file1_, dw->file2_); } // // 'DiffWindow::resize()' - Resize the window... // void DiffWindow::resize(int X, // I - X position int Y, // I - Y position int W, // I - Width int H) // I - Height { prefs_.set("window_width", W); prefs_.set("window_height", H); Fl_Overlay_Window::resize(X, Y, W, H); } // // 'DiffWindow::save_prefs()' - Save preferences... // void DiffWindow::save_prefs() { // Save the window prefs for the next run... prefs_.set("color", color()); prefs_.set("selection_color", selection_color()); prefs_.set("showlinenum", showlinenum()); prefs_.set("tabwidth", tabwidth()); prefs_.set("textcolor", textcolor()); prefs_.set("textsize", textsize()); prefs_.set("ignoreblanks", ignoreblanks()); } // // 'DiffWindow::select_cb()' - Handle selections in the diff view. // void DiffWindow::select_cb(DiffView *dv, // I - View DiffWindow *dw) // I - Window { Fl_Menu_Item *item; // Copy menu item... item = (Fl_Menu_Item *)dw->menubar_.menu() + 8; if (dw->view_.selection_length()) item->activate(); else item->deactivate(); item = (Fl_Menu_Item *)dw->menubar_.menu() + 2; if (dw->view_.directories() && dw->view_.select_start() >= 0) { item->activate(); if (Fl::event_clicks()) compare_selected_cb(&(dw->menubar_), dw); } else item->deactivate(); } // // 'DiffWindow::select_left_cb()' - Select everything on the left side. // void DiffWindow::select_left_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { dw->view_.select(0, dw->view_.count() - 1, false); } // // 'DiffWindow::select_none_cb()' - Select nothing. // void DiffWindow::select_none_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { dw->view_.select(-1, -1, false); } // // 'DiffWindow::select_right_cb()' - Select everything on the right side. // void DiffWindow::select_right_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { dw->view_.select(0, dw->view_.count() - 1, true); } // // 'DiffWindow::using_cb()' - Show help window. // void DiffWindow::using_cb(Fl_Menu_Bar *m, // I - Menubar DiffWindow *dw) // I - Window { Fl_Double_Window *win; // Help window Fl_Help_View *help; // Help widget Fl_Button *smaller, // Smaller text *bigger, // Bigger text *close; // Close button Fl_Box *box; // Box Fl_Group *group; // Resize group Fl_Widget *current; // Currently pressed widget int v; // Text size int W, H; // Width and height win = new Fl_Double_Window(400, 300, "Help - " VERSION); dw->prefs_.get("help_textsize", v, FL_NORMAL_SIZE); help = new Fl_Help_View(10, 10, 380, 245); help->textsize(v); help->value(help_text_); group = new Fl_Group(10, 265, 380, 25); box = new Fl_Box(10, 265, 25, 25); smaller = new Fl_Button(270, 265, 25, 25, "F"); smaller->labelsize(8); smaller->tooltip("Make text smaller..."); if (help->textsize() == 8) smaller->deactivate(); bigger = new Fl_Button(305, 265, 25, 25, "F"); bigger->labelsize(20); bigger->tooltip("Make text larger..."); if (help->textsize() == 32) bigger->deactivate(); close = new Fl_Button(340, 265, 50, 25, "Close"); group->resizable(box); group->end(); win->end(); win->resizable(help); dw->prefs_.get("help_window_width", W, 400); dw->prefs_.get("help_window_height", H, 300); win->resize(win->x(), win->y(), W, H); win->show(); while ((current = Fl::readqueue()) != close && win->shown() && dw->shown()) { if (current == smaller) { help->textsize(help->textsize() - 1); if (help->textsize() == 8) smaller->deactivate(); bigger->activate(); } else if (current == bigger) { help->textsize(help->textsize() + 1); if (help->textsize() == 32) bigger->deactivate(); smaller->activate(); } Fl::wait(); } dw->prefs_.set("help_textsize", help->textsize()); dw->prefs_.set("help_window_width", win->w()); dw->prefs_.set("help_window_height", win->h()); win->hide(); delete win; } // // End of "$Id: DiffWindow.cxx 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/FavoritesWindow.cxx0000644000076400007640000001367610402320377015142 0ustar mikemike// // "$Id: FavoritesWindow.cxx 386 2006-03-04 14:15:27Z mike $" // // FavoritesWindows widget code. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // #include "FavoritesWindow.h" // // 'FavoritesWindow::FavoritesWindow()' - Create a favorites management window. // FavoritesWindow::FavoritesWindow() : Fl_Double_Window(355, 150, "Manage Favorites"), browser_(10, 10, 300, 95), up_(320, 10, 25, 25, "@8>"), delete_(320, 45, 25, 25, "X"), down_(320, 80, 25, 25, "@2>"), ok_(185, 115, 75, 25, "OK"), cancel_(270, 115, 75, 25, "Cancel") { end(); modal(); browser_.type(FL_HOLD_BROWSER); browser_.when(FL_WHEN_RELEASE_ALWAYS); browser_.callback((Fl_Callback *)browser_cb, this); up_.callback((Fl_Callback *)up_cb, this); delete_.callback((Fl_Callback *)delete_cb, this); down_.callback((Fl_Callback *)down_cb, this); ok_.callback((Fl_Callback *)ok_cb, this); cancel_.callback((Fl_Callback *)cancel_cb, this); } // // 'FavoritesWindow::browser_cb()' - Handle clicks in the favorites list. // void FavoritesWindow::browser_cb(Fl_File_Browser *b, // I - Favorites browser FavoritesWindow *fw) // I - Favorites window { int i; // Current item i = fw->browser_.value(); if (i) { if (i > 1) fw->up_.activate(); else fw->up_.deactivate(); fw->delete_.activate(); if (i < fw->browser_.size()) fw->down_.activate(); else fw->down_.deactivate(); } else { fw->up_.deactivate(); fw->delete_.deactivate(); fw->down_.deactivate(); } } // // 'FavoritesWindow::cancel_cb()' - Cancel (close) the window. // void FavoritesWindow::cancel_cb(Fl_Button *b, // I - Cancel button FavoritesWindow *fw) // I - Favorites window { fw->hide(); } // // 'FavoritesWindow::delete_cb()' - Delete the current directory. // void FavoritesWindow::delete_cb(Fl_Button *b, // I - Delete button FavoritesWindow *fw) // I - Favorites window { int i; // Current item i = fw->browser_.value(); fw->browser_.remove(i); if (i > fw->browser_.size()) i --; fw->browser_.select(i); if (i < fw->browser_.size()) fw->down_.activate(); else fw->down_.deactivate(); if (i > 1) fw->up_.activate(); else fw->up_.deactivate(); if (!i) fw->delete_.deactivate(); fw->ok_.activate(); } // // 'FavoritesWindow::down_cb()' - Move the current directory down one line. // void FavoritesWindow::down_cb(Fl_Button *b, // I - Down button FavoritesWindow *fw) // I - Favorites window { int i; // Current item i = fw->browser_.value(); fw->browser_.insert(i + 2, fw->browser_.text(i), fw->browser_.data(i)); fw->browser_.remove(i); fw->browser_.select(i + 1); if ((i + 1) == fw->browser_.size()) fw->down_.deactivate(); fw->up_.activate(); fw->ok_.activate(); } // // 'FavoritesWindow::load()' - Load the favorites list. // void FavoritesWindow::load() { int i; // Looping var char name[32], // Preference name filename[1024]; // Directory in list Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "filechooser"); // File chooser preferences // Load the favorites list... browser_.clear(); browser_.deselect(); for (i = 0; i < 100; i ++) { // Get favorite directory 0 to 99... sprintf(name, "favorite%02d", i); prefs.get(name, filename, "", sizeof(filename)); // Stop on the first empty favorite... if (!filename[0]) break; // Add the favorite to the list... browser_.add(filename, Fl_File_Icon::find(filename, Fl_File_Icon::DIRECTORY)); } up_.deactivate(); delete_.deactivate(); down_.deactivate(); ok_.deactivate(); } // // 'FavoritesWindow::ok_cb()' - Save the favorites list and close. // void FavoritesWindow::ok_cb(Fl_Return_Button *b, // I - OK button FavoritesWindow *fw) // I - Favorites window { fw->save(); fw->hide(); } // // 'FavoritesWindow::save()' - Save the favorites list. // void FavoritesWindow::save() { int i; // Looping var char name[32], // Preference name filename[1024]; // Directory in list Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "filechooser"); // File chooser preferences // Copy the new list over... for (i = 0; i < browser_.size(); i ++) { // Set favorite directory 0 to 99... sprintf(name, "favorite%02d", i); prefs.set(name, browser_.text(i + 1)); } // Clear old entries as necessary... for (; i < 100; i ++) { // Clear favorite directory 0 to 99... sprintf(name, "favorite%02d", i); prefs.get(name, filename, "", sizeof(filename)); if (filename[0]) prefs.set(name, ""); else break; } } // // 'FavoritesWindow::show()' - Load the favorites list and show. // void FavoritesWindow::show() { load(); Fl_Double_Window::show(); } // // 'FavoritesWindow::up_cb()' - Move the current directory up one line. // void FavoritesWindow::up_cb(Fl_Button *b, // I - Up button FavoritesWindow *fw) // I - Favorites window { int i; // Current item i = fw->browser_.value(); fw->browser_.insert(i - 1, fw->browser_.text(i), fw->browser_.data(i)); fw->browser_.remove(i + 1); fw->browser_.select(i - 1); if (i == 2) fw->up_.deactivate(); fw->down_.activate(); fw->ok_.activate(); } // // End of "$Id: FavoritesWindow.cxx 386 2006-03-04 14:15:27Z mike $". // fldiff-1.1/DiffOpenWindow.h0000644000076400007640000000272710526137512014316 0ustar mikemike// // "$Id: DiffOpenWindow.h 407 2006-11-13 18:54:02Z mike $" // // DiffOpenWindow widget definitions. // // Copyright 2005-2006 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #ifndef _DiffOpenWindow_h_ # define _DiffOpenWindow_h_ # include # include # include # include # include "DiffChooser.h" class DiffOpenWindow : public Fl_Double_Window { DiffChooser dc1_, dc2_; // Choosers Fl_Button compare_, // Open/Compare button cancel_; // Cancel button static void compare_cb(Fl_Button *b, DiffOpenWindow *dow); static void cancel_cb(Fl_Button *b, DiffOpenWindow *dow); static void dc_cb(DiffChooser *dc, DiffOpenWindow *dow); public: DiffOpenWindow(const char *v1 = (const char *)0, const char *v2 = (const char *)0); DiffChooser *dc1() { return (&dc1_); } DiffChooser *dc2() { return (&dc2_); } void resize(int X, int Y, int W, int H); void show(); }; #endif // !_DiffOpenWindow_h_ // // End of "$Id: DiffOpenWindow.h 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/DiffView.cxx0000644000076400007640000010626010526137512013507 0ustar mikemike// // "$Id: DiffView.cxx 407 2006-11-13 18:54:02Z mike $" // // DiffView widget code. // // Copyright 2005-2006 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // DiffView::DiffView() - Create a diff viewing widget. // DiffView::~DiffView() - Destroy a diff viewing widget. // DiffView::add_line() - Add a line to the diff... // DiffView::clear() - Remove all lines from the viewer. // DiffView::draw() - Draw the diff viewer... // DiffView::expand_tabs() - Expand tabs on a line. // DiffView::handle() - Handle user events. // DiffView::load() - Load a diff. // DiffView::resize() - Resize a diff viewing widget. // DiffView::scroll_cb() - Scroll the diff. // DiffView::select() - Select specific lines. // DiffView::selection() - Return the current text selection. // DiffView::selection_length() - Return the length of the current selection. // DiffView::showline() - Show a line in the diff... // DiffView::timeout_cb() - Repeat scrollbar buttons... // #include "DiffView.h" #include #include #include #include #include #include #include #include "PtProcess.h" // // Width/height of scrollbars... // #define SCROLLER 16 // // 'DiffView::DiffView()' - Create a diff viewing widget. // DiffView::DiffView(int X, // I - X position int Y, // I - Y position int W, // I - Width int H, // I - Height const char *L) // I - Label : Fl_Group(X, Y, W, H, L), hscroll1_(X, Y + H - SCROLLER, (W - SCROLLER) / 2, SCROLLER), hscroll2_(X + (W + SCROLLER) / 2, Y + H - SCROLLER, (W - SCROLLER) / 2, SCROLLER) { // Don't add any more widgets to this one... end(); // Initialize this instance with defaults... alloc_ = 0; count_ = 0; ignoreblanks_ = false; linefmt_[0] = '\0'; linenum_ = 0; lines_ = (DiffLine **)0; maxwidth_ = 0; select_end_ = -1; select_right_ = false; select_start_ = -1; showlinenum_ = true; state_ = IDLE; tabwidth_ = 8; textcolor_ = FL_BLACK; textfont_ = FL_COURIER; textsize_ = FL_NORMAL_SIZE; topline_ = 0; box(FL_FLAT_BOX); selection_color(FL_YELLOW); // Connect the scrollbars to the DiffView widget and initialize them... hscroll1_.callback((Fl_Callback *)scroll_cb, this); hscroll1_.deactivate(); hscroll1_.type(FL_HORIZONTAL); hscroll1_.value(0, w() / 2 - SCROLLER, 0, 1); hscroll2_.callback((Fl_Callback *)scroll_cb, this); hscroll2_.deactivate(); hscroll2_.type(FL_HORIZONTAL); hscroll2_.value(0, w() / 2 - SCROLLER, 0, 1); } // // 'DiffView::~DiffView()' - Destroy a diff viewing widget. // DiffView::~DiffView() { // Remove all lines, freeing memory... clear(); } // // 'DiffView::add_line()' - Add a line to the diff... // void DiffView::add_line(const char *left, // I - First line or NULL const char *right, // I - Second line or NULL bool changed, // I - Line changed? int pos) // I - Position to add to { int start, // First changed column end, // Last changed column leftlen, // First line length rightlen; // Second line length DiffLine *line, // Current line **temp; // New array if (pos < 0 || pos >= count_) { // Add a new line... if (count_ >= alloc_) { temp = new DiffLine *[alloc_ + 50]; if (count_) { memcpy(temp, lines_, count_ * sizeof(DiffLine *)); delete[] lines_; } lines_ = temp; alloc_ += 50; } line = new DiffLine; line->left = (char *)0; line->dleft = (char *)0; line->right = (char *)0; line->dright = (char *)0; lines_[count_] = line; count_ ++; } else { // Update an existing line... line = lines_[pos]; } // Copy left/right strings as needed... if (left) { line->left = strdup(left); line->dleft = expand_tabs(left); } if (right) { line->right = strdup(right); line->dright = expand_tabs(right); } // Save the "changed" state... line->changed = changed; // Update the maximum width of the text... if (line->dleft && (leftlen = strlen(line->dleft)) > maxwidth_) maxwidth_ = leftlen; else leftlen = 0; if (line->dright && (rightlen = strlen(line->dright)) > maxwidth_) maxwidth_ = rightlen; else rightlen = 0; if (changed) { // Update the start/end offsets so we can highlight the changed portion // of the line. if (!line->dleft) { line->start = 0; line->end = rightlen; } else if (!line->dright) { line->start = 0; line->end = leftlen; } else if (directories_) { line->start = 0; if (leftlen > rightlen) line->end = leftlen; else line->end = rightlen; } else { for (start = 0; line->dleft[start] == line->dright[start]; start ++); line->start = start; if (leftlen > rightlen) line->end = leftlen; else if (rightlen > leftlen) line->end = rightlen; else { for (end = start + 1; line->dleft[end] && line->dright[end]; end ++) if (line->dleft[end] != line->dright[end]) line->end = end + 1; } } } } // // 'DiffView::clear()' - Remove all lines from the viewer. // void DiffView::clear() { int i; // Looping var // Free the text on each line... for (i = 0; i < count_; i ++) { if (lines_[i]->left) free(lines_[i]->left); if (lines_[i]->dleft) free(lines_[i]->dleft); if (lines_[i]->right) free(lines_[i]->right); if (lines_[i]->dright) free(lines_[i]->dright); } // Free the line array... if (alloc_) delete[] lines_; // Reset array and display data... alloc_ = 0; count_ = 0; directories_ = false; lines_ = (DiffLine **)0; linefmt_[0] = '\0'; linenum_ = 0; maxwidth_ = 0; select_start_ = -1; select_end_ = -1; select_right_ = false; topline_ = 0; hscroll1_.deactivate(); hscroll1_.value(0, w() / 2 - SCROLLER, 0, 1); hscroll2_.deactivate(); hscroll2_.value(0, w() / 2 - SCROLLER, 0, 1); Fl::remove_timeout((void (*)(void *))timeout_cb, (void *)this); } // // 'DiffView::draw()' - Draw the diff viewer... // void DiffView::draw() { int i, // Looping var yy, // Current Y position xoffset, // X offset for line xwidth, // Width of column ystart, // Start line of change yend, // End line of change pstart, // Start line of page pend, // End line of page firstline, // First line number secondline; // Second line number char number[255]; // Line number DiffLine **line, // Current line **last; // Last line if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_CHILD)) { // Do a full redraw... Fl_Group::draw(); fl_color(FL_GRAY); fl_rectf(x() + (w() - SCROLLER) / 2, y() + h() - SCROLLER, SCROLLER, SCROLLER); } else { // Do a partial redraw of the text (scrolled)... fl_color(color()); fl_rectf(x(), y(), (w() - SCROLLER) / 2, h() - SCROLLER); fl_rectf(x() + (w() + SCROLLER) / 2, y(), (w() - SCROLLER) / 2, h() - SCROLLER); } // Clear the diff bar... xoffset = x() + (w() - SCROLLER) / 2; fl_color(FL_DARK2); fl_rectf(xoffset, y(), SCROLLER, h() - SCROLLER); // Draw the up/down arrows... if ((count_ * textsize_) <= (h() - SCROLLER)) set_flag(INACTIVE); draw_box(state_ == UPARROW ? FL_DOWN_BOX : FL_UP_BOX, xoffset, y(), SCROLLER, SCROLLER, FL_GRAY); draw_box(state_ == DOWNARROW ? FL_DOWN_BOX : FL_UP_BOX, xoffset, y() + h() - 2 * SCROLLER, SCROLLER, SCROLLER, FL_GRAY); clear_flag(INACTIVE); // Stolen from Fl_Scrollbar.cxx... :) if ((count_ * textsize_) > (h() - SCROLLER)) fl_color(labelcolor()); else fl_color(fl_inactive(labelcolor())); int w1 = (SCROLLER-4)/3; int x1 = xoffset+(SCROLLER-2*w1-1)/2; int yy1 = y()+(SCROLLER-w1-1)/2; if (Fl::scheme_ && !strcmp(Fl::scheme_, "gtk+")) { fl_polygon(x1, yy1+w1, x1+w1, yy1+w1-1, x1+2*w1, yy1+w1, x1+w1, yy1); yy1 += h()-2*SCROLLER; fl_polygon(x1, yy1, x1+w1, yy1+1, x1+w1, yy1+w1); fl_polygon(x1+w1, yy1+1, x1+2*w1, yy1, x1+w1, yy1+w1); } else { fl_polygon(x1, yy1+w1, x1+2*w1, yy1+w1, x1+w1, yy1); yy1 += h()-2*SCROLLER; fl_polygon(x1, yy1, x1+w1, yy1+w1, x1+2*w1, yy1); } // Return early if we have no lines... if (!count_) return; // Prepare the text font and display vars... fl_font(textfont_, textsize_); xwidth = (int)fl_width(' '); last = lines_ + count_; // Draw the left side (first file)... fl_push_clip(x() + linenum_, y(), (w() - SCROLLER) / 2 - linenum_, h() - SCROLLER); firstline = topline_ / textsize_; line = lines_ + firstline; yy = y() + textsize_ - topline_ + firstline * textsize_; for (i = (h() + textsize_ - 1) / textsize_, xoffset = x() + linenum_ - hscroll1_.value(); i > 0 && line < last; i --, yy += textsize_, line ++, firstline ++) { if (!(*line)->dleft) { fl_color(fl_color_average(textcolor(), color(), 0.1f)); fl_rectf(x() + linenum_, yy - textsize_, (w() - SCROLLER) / 2 - linenum_, textsize_); continue; } if (firstline >= select_start_ && firstline <= select_end_ && (!select_right_ || directories_)) { // Show selected line... fl_color(textcolor_); fl_rectf(x() + linenum_, yy - textsize_, (w() - SCROLLER) / 2 - linenum_, textsize_); fl_color(color()); } else if ((*line)->changed) { // Highlight change... fl_color(fl_color_average(selection_color(), color(), 0.33f)); fl_rectf(x() + linenum_, yy - textsize_, (w() - SCROLLER) / 2 - linenum_, textsize_); fl_color(selection_color()); fl_rectf(xoffset + (*line)->start * xwidth, yy - textsize_, ((*line)->end - (*line)->start) * xwidth, textsize_); fl_color(fl_contrast(textcolor_, selection_color())); } else fl_color(textcolor_); // Draw the left text... fl_draw((*line)->dleft, xoffset, yy - fl_descent()); } fl_pop_clip(); // Draw the right side (second file)... fl_push_clip(x() + (w() + SCROLLER) / 2 + linenum_, y(), (w() - SCROLLER) / 2 - linenum_, h() - SCROLLER); secondline = topline_ / textsize_; line = lines_ + secondline; yy = y() + textsize_ - topline_ + secondline * textsize_; for (i = (h() + textsize_ - 1) / textsize_, xoffset = x() + (w() + SCROLLER) / 2 + linenum_ - hscroll1_.value(); i > 0 && line < last; i --, yy += textsize_, line ++, secondline ++) { if (!(*line)->dright) { fl_color(fl_color_average(textcolor(), color(), 0.1f)); fl_rectf(x() + (w() + SCROLLER) / 2 + linenum_, yy - textsize_, (w() - SCROLLER) / 2 - linenum_, textsize_); continue; } if (secondline >= select_start_ && secondline <= select_end_ && (select_right_ || directories_)) { // Show selected line... fl_color(textcolor_); fl_rectf(x() + (w() + SCROLLER) / 2 + linenum_, yy - textsize_, (w() - SCROLLER) / 2 - linenum_, textsize_); fl_color(color()); } else if ((*line)->changed) { // Highlight change... fl_color(fl_color_average(selection_color(), color(), 0.33f)); fl_rectf(x() + (w() + SCROLLER) / 2 + linenum_, yy - textsize_, (w() - SCROLLER) / 2 - linenum_, textsize_); fl_color(selection_color()); fl_rectf(xoffset + (*line)->start * xwidth, yy - textsize_, ((*line)->end - (*line)->start) * xwidth, textsize_); fl_color(fl_contrast(textcolor_, selection_color())); } else fl_color(textcolor_); // Draw the right text... fl_draw((*line)->dright, xoffset, yy - fl_descent()); } fl_pop_clip(); // Draw a box for the current position in the diff... xoffset = x() + (w() - SCROLLER) / 2; if ((count_ * textsize_) > (h() - SCROLLER)) { pstart = topline_ * (h() - 3 * SCROLLER - 2) / textsize_ / count_; pend = (topline_ + h() - SCROLLER) * (h() - 3 * SCROLLER - 2) / textsize_ / count_; } else { pstart = 0; pend = h() - 3 * SCROLLER - 2; } fl_color(fl_color_average(FL_DARK2, textcolor_, 0.5f)); fl_rectf(xoffset, y() + pstart + SCROLLER, SCROLLER, pend - pstart + 2); // Draw change markers... fl_color(selection_color()); for (line = lines_, i = 0, ystart = -1, yend = -1; line < last; line ++, i ++) { if ((*line)->changed) { yend = i; if (ystart < 0) ystart = i; } else if (ystart >= 0) { ystart = ystart * (h() - 3 * SCROLLER - 2) / count_; yend = (yend + 1) * (h() - 3 * SCROLLER - 2) / count_ - 1; if (ystart >= yend) fl_xyline(xoffset + 1, ystart + y() + SCROLLER + 1, xoffset + SCROLLER - 2); else fl_rectf(xoffset + 1, ystart + y() + SCROLLER + 1, SCROLLER - 2, yend - ystart); ystart = -1; } } if (ystart >= 0) { ystart = ystart * (h() - 3 * SCROLLER - 2) / count_; yend = (yend + 1) * (h() - 3 * SCROLLER - 2) / count_ - 1; if (ystart >= yend) fl_xyline(xoffset + 1, ystart + y() + SCROLLER + 1, xoffset + SCROLLER - 2); else fl_rectf(xoffset + 1, ystart + y() + SCROLLER + 1, SCROLLER - 2, yend - ystart); ystart = -1; } // Outline the box... fl_color(textcolor_); fl_rect(xoffset, pstart + y() + SCROLLER, SCROLLER, pend - pstart + 2); // Draw line numbers... if (showlinenum_) { fl_push_clip(x(), y(), w(), h() - SCROLLER); fl_color(fl_color_average(color(), textcolor_, 0.75f)); fl_yxline(x() + linenum_ - 2, y(), y() + h() - SCROLLER); fl_yxline(x() + (w() + SCROLLER) / 2 + linenum_ - 2, y(), y() + h() - SCROLLER); fl_color(textcolor_); line = lines_; yy = y() + textsize_ - fl_descent() - topline_; for (firstline = 1, secondline = 1; line < last; yy += textsize_, line ++) { if (yy < y()) { if ((*line)->left) firstline ++; if ((*line)->right) secondline ++; continue; } if (yy >= (y() + h() - SCROLLER)) break; if ((*line)->left) { sprintf(number, linefmt_, firstline); fl_draw(number, x(), yy); firstline ++; } if ((*line)->right) { sprintf(number, linefmt_, secondline); fl_draw(number, x() + (w() + SCROLLER) / 2, yy); secondline ++; } } fl_pop_clip(); } } // // 'DiffView::expand_tabs()' - Expand tabs on a line. // char * // O - Copy of expanded string DiffView::expand_tabs(const char *s) // I - String to expand { char *ptr, // Pointer into new line buf[2048]; // New string int col; // Current column if (!s) return (NULL); for (ptr = buf, col = 0; *s && *s != '\n' && *s != '\r'; s ++) if (*s == '\t') { do { if (ptr < (buf + sizeof(buf) - 1)) *ptr++ = ' '; col ++; } while (col % tabwidth_); } else if (ptr < (buf + sizeof(buf) - 1)) { *ptr++ = *s; col ++; } else break; *ptr = '\0'; return (strdup(buf)); } // // 'DiffView::handle()' - Handle user events. // int // O - 1 if handled, 0 otherwise DiffView::handle(int event) // I - Event { int v; // Temporary value bool doscrolling; // True if we should scroll vertically... doscrolling = (count_ * textsize_) > (h() - SCROLLER); switch (event) { case FL_PUSH : if (Fl::event_y() >= y() && Fl::event_y() < (y() + h() - SCROLLER)) { if (Fl::event_x() < (x() + (w() - SCROLLER) / 2)) { state_ = SELECTING; select_start_ = (Fl::event_y() - y() + topline_) / textsize_; select_end_ = -1; select_right_ = false; if (select_start_ >= count_) select_start_ = count_ - 1; if (Fl::event_clicks() > 0) { select_end_ = select_start_; if (lines_[select_start_]->left) Fl::copy(lines_[select_start_]->left, 1); } damage(FL_DAMAGE_SCROLL); return (1); } else if (Fl::event_x() >= (x() + (w() + SCROLLER) / 2)) { state_ = SELECTING; select_start_ = (Fl::event_y() - y() + topline_) / textsize_; select_end_ = -1; select_right_ = true; if (select_start_ >= count_) select_start_ = count_ - 1; if (Fl::event_clicks() > 0) { select_end_ = select_start_; if (lines_[select_start_]->right) Fl::copy(lines_[select_start_]->right, 1); } damage(FL_DAMAGE_SCROLL); return (1); } else if (Fl::event_y() < (y() + SCROLLER)) { state_ = UPARROW; if ((count_ * textsize_) > (h() - SCROLLER)) { topline_ -= textsize_; if (topline_ < 0) topline_ = 0; else Fl::add_timeout(0.5f, (void (*)(void *))timeout_cb, (void *)this); damage(FL_DAMAGE_SCROLL); } return (1); } else if (Fl::event_y() >= (y() + h() - 2 * SCROLLER)) { state_ = DOWNARROW; if ((count_ * textsize_) > (h() - SCROLLER)) { topline_ += textsize_; if (topline_ > (count_ * textsize_ - h() + SCROLLER)) topline_ = count_ * textsize_ - h() + SCROLLER; else Fl::add_timeout(0.5f, (void (*)(void *))timeout_cb, (void *)this); damage(FL_DAMAGE_SCROLL); } return (1); } else if (doscrolling) state_ = SCROLLING; } case FL_DRAG : switch (state_) { case IDLE : break; case SCROLLING : v = (Fl::event_y() - y() - SCROLLER - 1) * count_ * textsize_ / (h() - 3 * SCROLLER - 2) - (h() - SCROLLER) / 2; if (v > (count_ * textsize_ - h() + SCROLLER)) v = count_ * textsize_ - h() + SCROLLER; else if (v < 0) v = 0; topline_ = v; damage(FL_DAMAGE_SCROLL); return (1); case SELECTING : // First determine the current line... select_end_ = (Fl::event_y() - y() + topline_) / textsize_; if (select_end_ >= count_) select_end_ = count_ - 1; // Then scroll as needed... if ((Fl::event_y() - y()) < textsize_) { // Scroll up... v = topline_ - textsize_; if (v < 0) v = 0; topline_ = v; } else if ((Fl::event_y() - y()) >= (h() - textsize_ - SCROLLER)) { // Scroll down... v = topline_ + textsize_; if (v > (count_ * textsize_ - h() + SCROLLER)) v = count_ * textsize_ - h() + SCROLLER; topline_ = v; } damage(FL_DAMAGE_SCROLL); return (1); } break; case FL_RELEASE : switch (state_) { case SELECTING : if (select_end_ >= 0) { // Copy the selection to the selection buffer... char *buf = selection(); Fl::copy(buf, strlen(buf), 0); free(buf); } do_callback(); case UPARROW : case DOWNARROW : damage(FL_DAMAGE_SCROLL); case SCROLLING : state_ = IDLE; return (1); } break; case FL_MOUSEWHEEL : if (Fl::event_dy() && doscrolling) { // Scroll vertically... topline_ += (h() - SCROLLER) * Fl::event_dy() / 8; if (topline_ < 0) topline_ = 0; else if (topline_ > (count_ * textsize_ - h() + SCROLLER)) topline_ = count_ * textsize_ - h() + SCROLLER; damage(FL_DAMAGE_SCROLL); return (1); } break; case FL_SHORTCUT : if (doscrolling) switch (Fl::event_key()) { case FL_Up : topline_ -= textsize_; if (topline_ < 0) topline_ = 0; damage(FL_DAMAGE_SCROLL); return (1); case FL_Down : topline_ += textsize_; if (topline_ > (count_ * textsize_ - h() + SCROLLER)) topline_ = count_ * textsize_ - h() + SCROLLER; damage(FL_DAMAGE_SCROLL); return (1); case FL_Page_Up : case FL_BackSpace : topline_ -= h() - SCROLLER; if (topline_ < 0) topline_ = 0; damage(FL_DAMAGE_SCROLL); return (1); case FL_Page_Down : case ' ' : topline_ += h() - SCROLLER; if (topline_ > (count_ * textsize_ - h() + SCROLLER)) topline_ = count_ * textsize_ - h() + SCROLLER; damage(FL_DAMAGE_SCROLL); return (1); case FL_Home : topline_ = 0; damage(FL_DAMAGE_SCROLL); return (1); case FL_End : topline_ = count_ * textsize_ - h() + SCROLLER; damage(FL_DAMAGE_SCROLL); return (1); } break; } return (Fl_Group::handle(event)); } // // 'DiffView::load()' - Load a diff. // bool // O - True on success, false otherwise DiffView::load(const char *file1, // I - First file const char *file2) // I - Second file { char command[1024]; // Diff command CPtProcess pdiff, // Diff process pfp; // Original file/directory listing const char *cptr; // Const pointer into line char *ptr, // Pointer into line line[10240], // Line from file/diff *dirname, // Directory name from directory diff *filename, // Filename from directory diff *left, // Left file *right; // Right file bool changed; // Changed? int fplinenum, // Line number in first file start, // Current start line count, // Count of lines newstart, // New file start newcount, // New file count xwidth, // Column pixel width pos; // Insert position // Clear the current view... clear(); // Validate input... if (!file1) return (false); // Do the diff... if (file2 && file2[0] != ':') { const char *diffopt = ignoreblanks() ? "-bBwE" : ""; if (fl_filename_isdir(file1)) { if (fl_filename_isdir(file2)) { snprintf(command, sizeof(command), "diff %s -q \"%s\" \"%s\"", diffopt, file1, file2); directories_ = true; } else { if ((cptr = strrchr(file2, '/')) != NULL) cptr ++; else cptr = file2; snprintf(command, sizeof(command), "diff %s -u \"%s/%s\" \"%s\"", diffopt, file1, cptr, file2); } } else if (fl_filename_isdir(file2)) { if ((cptr = strrchr(file1, '/')) != NULL) cptr ++; else cptr = file1; snprintf(command, sizeof(command), "diff %s -u \"%s\" \"%s/%s\"", diffopt, file1, file2, cptr); } else snprintf(command, sizeof(command), "diff %s -u \"%s\" \"%s\"", diffopt, file1, file2); } else if (fl_filename_isdir(file1)) { directories_ = true; snprintf(line, sizeof(line), "%s/CVS", file1); if (!access(line, 0)) { if (file2) snprintf(command, sizeof(command), "cvs diff -r \"%s\" -u \"%s\"", file2 + 1, file1); else snprintf(command, sizeof(command), "cvs diff -u \"%s\"", file1); } else { snprintf(line, sizeof(line), "%s/.svn", file1); if (!access(line, 0)) { if (file2) snprintf(command, sizeof(command), "svn diff -N -r \"%s\" \"%s\"", file2 + 1, file1); else snprintf(command, sizeof(command), "svn diff -N \"%s\"", file1); } else return (false); } } else { strncpy(line, file1, sizeof(line) - 1); line[sizeof(line) - 1] = '\0'; if ((ptr = strrchr(line, '/')) != NULL) ptr ++; else ptr = line; strncpy(ptr, "CVS", sizeof(line) - 1 - (ptr - line)); if (!access(line, 0)) { if (file2) snprintf(command, sizeof(command), "cvs -q diff -r \"%s\" -u \"%s\"", file2 + 1, file1); else snprintf(command, sizeof(command), "cvs -q diff -u \"%s\"", file1); } else { strncpy(ptr, ".svn", sizeof(line) - 1 - (ptr - line)); if (!access(line, 0)) { const char *diffopt = ignoreblanks() ? "--diff-cmd diff --extensions '-bBwEu'" : ""; if (file2) snprintf(command, sizeof(command), "svn diff %s -r \"%s\" \"%s\"", diffopt, file2 + 1, file1); else snprintf(command, sizeof(command), "svn diff %s \"%s\"", diffopt, file1); } else return (false); } } if (!pdiff.popen(command)) { fl_alert("Diff command failed!\n\n%s", command); return (false); } // Open the original file... if (file2 && file2[0] != ':') { if (directories_) { snprintf(command, sizeof(command), "ls -a1 \"%s\"", file2); pfp.popen(command, "r"); } else pfp.fopen(file2, "r"); } else if (directories_) { snprintf(command, sizeof(command), "ls -a1 \"%s\"", file1); pfp.popen(command, "r"); } else pfp.fopen(file1, "r"); if (!pfp.is_open()) { fl_alert("Unable to open \"%s\":\n\n%s", file2 ? file2 : file1, strerror(errno)); pdiff.close(); return (false); } // Loop until we run out of diffs... fplinenum = 1; if (directories_) { while (pfp.get_line(line, sizeof(line))) { ptr = line + strlen(line) - 1; if (ptr >= line && *ptr == '\n') *ptr = '\0'; add_line(line, line, false); } } while (pdiff.get_line(line, sizeof(line))) { if (directories_) { changed = true; if (!strncmp(line, "Only in ", 8) && (ptr = strstr(line + 8, ": ")) != NULL) { // Extract directory and path... *ptr = '\0'; dirname = line + 8; filename = ptr + 2; if (filename[0]) filename[strlen(filename) - 1] = '\0'; if (!strcmp(file1, dirname)) { left = filename; right = NULL; } else { left = NULL; right = filename; } } else if (!strncmp(line, "Files ", 6) && (ptr = strstr(line + 6, " and ")) != NULL) { *ptr = '\0'; if ((filename = strrchr(line + 6, '/')) != NULL) filename ++; else filename = line + 6; left = filename; right = filename; } else if (!strncmp(line, "Common subdirectories: ", 23) && (ptr = strstr(line + 23, " and ")) != NULL) { changed = false; *ptr = '\0'; if ((filename = strrchr(line + 23, '/')) != NULL) filename ++; else filename = line + 23; left = filename; right = filename; } else if (!strncmp(line, "Index: ", 7) || !strncmp(line, "M ", 7)) { if ((filename = strrchr(line + 7, '/')) != NULL) filename ++; else filename = line + 7; ptr = filename + strlen(filename) - 1; if (ptr >= filename && *ptr == '\n') *ptr = '\0'; left = filename; right = filename; } else if (!strncmp(line, "? ", 7) || !strncmp(line, "A ", 7)) { if ((filename = strrchr(line + 7, '/')) != NULL) filename ++; else filename = line + 7; ptr = filename + strlen(filename) - 1; if (ptr >= filename && *ptr == '\n') *ptr = '\0'; left = NULL; right = filename; } else if (!strncmp(line, "? ", 2)) { if ((filename = strrchr(line + 2, '/')) != NULL) filename ++; else filename = line + 2; ptr = filename + strlen(filename) - 1; if (ptr >= filename && *ptr == '\n') *ptr = '\0'; left = NULL; right = filename; } else continue; if (!changed) continue; if (left && !right) { // Insert line for (pos = 0; pos < count_; pos ++) if (lines_[pos]->right && strcmp(lines_[pos]->right, filename) > 0) break; if (pos >= count_) add_line(left, right, changed); else { DiffLine *line, // Current line **temp; // New array if (count_ >= alloc_) { temp = new DiffLine *[alloc_ + 50]; if (count_) { memcpy(temp, lines_, count_ * sizeof(DiffLine *)); delete[] lines_; } lines_ = temp; alloc_ += 50; } line = new DiffLine; line->left = strdup(left); line->dleft = expand_tabs(left); line->right = (char *)0; line->dright = (char *)0; line->changed = true; line->start = 0; line->end = strlen(line->dleft); memmove(lines_ + pos + 1, lines_ + pos, (count_ - pos) * sizeof(DiffLine *)); lines_[pos] = line; count_ ++; } } else { // Update existing line for (pos = 0; pos < count_; pos ++) if (lines_[pos]->right && !strcmp(lines_[pos]->right, filename)) { if (!left) { free(lines_[pos]->left); lines_[pos]->left = (char *)0; free(lines_[pos]->dleft); lines_[pos]->dleft = (char *)0; } else if (!right) { free(lines_[pos]->right); lines_[pos]->right = (char *)0; free(lines_[pos]->dright); lines_[pos]->dright = (char *)0; } lines_[pos]->changed = true; break; } } } else { // Skip until we see "@@ -start,count +start,count @@"... if (sscanf(line, "@@ -%d,%d +%d,%d @@", &start, &count, &newstart, &newcount) != 4) continue; while (fplinenum < newstart) { if (!pfp.get_line(line, sizeof(line))) break; add_line(line, line, false); fplinenum ++; } pos = -1; while (count > 0 || newcount > 0) { if (!pdiff.get_line(line, sizeof(line))) break; if (line[0] == '+') { add_line(NULL, line + 1, true, pos); newcount --; if (pos >= 0) pos ++; } else if (line[0] == '-') { if (pos < 0) pos = count_; add_line(line + 1, NULL, true); count --; } else { add_line(line + 1, line + 1, false); count --; newcount --; pos = -1; } if (line[0] != '-') { pfp.get_line(line, sizeof(line)); fplinenum ++; } } } } pdiff.close(); if (directories_) pfp.close(); else { while (pfp.get_line(line, sizeof(line)) != NULL) add_line(line, line, false); pfp.close(); } fl_font(textfont_, textsize_); xwidth = (int)fl_width(' '); maxwidth_ *= xwidth; if (showlinenum_) { sprintf(line, "%d", count_); linenum_ = (int)strlen(line); sprintf(linefmt_, "%%%dd ", linenum_); linenum_ = (linenum_ + 1) * xwidth; } hscroll1_.value(0, w() / 2 - SCROLLER - linenum_, 0, maxwidth_); hscroll2_.value(0, w() / 2 - SCROLLER - linenum_, 0, maxwidth_); topline_ = 0; if (maxwidth_ > (w() / 2 - SCROLLER - linenum_)) { hscroll1_.activate(); hscroll2_.activate(); } redraw(); return (true); } // // 'DiffView::resize()' - Resize a diff viewing widget. // void DiffView::resize(int X, // I - X position int Y, // I - Y position int W, // I - Width int H) // I - Height { int v; // Scroll value Fl_Widget::resize(X, Y, W, H); hscroll1_.resize(X, Y + H - SCROLLER, (W - SCROLLER) / 2, SCROLLER); hscroll2_.resize(X + (W + SCROLLER) / 2, Y + H - SCROLLER, (W - SCROLLER) / 2, SCROLLER); // Update scrollbars... if (maxwidth_ > ((W - SCROLLER) / 2 - linenum_)) { hscroll1_.activate(); hscroll2_.activate(); if ((hscroll1_.value() + (W - SCROLLER) / 2 - linenum_) > maxwidth_) v = maxwidth_ - (W - SCROLLER) / 2 + linenum_; else v = hscroll1_.value(); } else { hscroll1_.deactivate(); hscroll2_.deactivate(); v = 0; } hscroll1_.value(v, (W - SCROLLER) / 2 - linenum_, 0, maxwidth_); hscroll2_.value(v, (W - SCROLLER) / 2 - linenum_, 0, maxwidth_); if ((count_ * textsize_) > (h() - SCROLLER)) { if ((topline_ + h() - SCROLLER) > (count_ * textsize_)) topline_ = count_ * textsize_ - h() + SCROLLER; } else topline_ = 0; } // // 'DiffView::scroll_cb()' - Scroll the diff. // void DiffView::scroll_cb(Fl_Scrollbar *s, // I - Scrollbar widget DiffView *d) // I - DiffView widget { if (s == &(d->hscroll1_)) d->hscroll2_.value(d->hscroll1_.value(), (d->w() - SCROLLER) / 2 - d->linenum_, 0, d->maxwidth_); else if (s == &(d->hscroll2_)) d->hscroll1_.value(d->hscroll2_.value(), (d->w() - SCROLLER) / 2 - d->linenum_, 0, d->maxwidth_); d->damage(FL_DAMAGE_SCROLL); } // // 'DiffView::select()' - Select specific lines. // void DiffView::select(int s, // I - Start line int e, // I - End line bool r) // I - Righthand side? { char *buf; // Selection buffer select_start_ = s; select_end_ = e; select_right_ = r; damage(FL_DAMAGE_SCROLL); if ((buf = selection()) != NULL) { Fl::copy(buf, strlen(buf), 0); free(buf); } } // // 'DiffView::selection()' - Return the current text selection. // char * // O - Selected text or NULL DiffView::selection() { int i; // Looping var char *buf, // Selection buffer *ptr; // Pointer into line if (select_end_ < 0) return (NULL); buf = (char *)calloc(1, selection_length() + 1); for (ptr = buf, i = select_start_; i <= select_end_; i ++, ptr += strlen(ptr)) if (select_right_ && lines_[i]->right) strcpy(ptr, lines_[i]->right); else if (!select_right_ && lines_[i]->left) strcpy(ptr, lines_[i]->left); return (buf); } // // 'DiffView::selection_length()' - Return the length of the current selection. // int // Length of selection text DiffView::selection_length() { int i; // Looping var int len; // Length of selection text if (select_end_ < 0) return (0); for (len = 0, i = select_start_; i <= select_end_; i ++) if (select_right_ && lines_[i]->right) len += strlen(lines_[i]->right); else if (!select_right_ && lines_[i]->left) len += strlen(lines_[i]->left); return (len); } // // 'DiffView::showline()' - Show a line in the diff... // void DiffView::showline(int l) // I - Line to show { l *= textsize_; if (l < topline_ || l >= (topline_ + h() - SCROLLER)) { l -= (h() - SCROLLER) / 2; if (l < 0) l = 0; else if (l > (count_ * textsize_ - h() + SCROLLER)) l = count_ * textsize_ - h() + SCROLLER; topline_ = l; damage(FL_DAMAGE_SCROLL); } } // // 'DiffView::timeout_cb()' - Repeat scrollbar buttons... // void DiffView::timeout_cb(DiffView *d) // I - DiffView widget { if (d->state_ == UPARROW && d->topline_ > 0) { d->topline_ -= 2 * d->textsize_; if (d->topline_ <= 0) d->topline_ = 0; else Fl::add_timeout(0.1f, (void (*)(void *))timeout_cb, (void *)d); d->damage(FL_DAMAGE_SCROLL); } else if (d->state_ == DOWNARROW && d->topline_ < (d->count_ * d->textsize_ - d->h() + SCROLLER)) { d->topline_ += 2 * d->textsize_; if (d->topline_ >= (d->count_ * d->textsize_ - d->h() + SCROLLER)) d->topline_ = d->count_ * d->textsize_ - d->h() + SCROLLER; else Fl::add_timeout(0.1f, (void (*)(void *))timeout_cb, (void *)d); d->damage(FL_DAMAGE_SCROLL); } } // // End of "$Id: DiffView.cxx 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/DiffWindow.h0000644000076400007640000000753710526137512013500 0ustar mikemike// // "$Id: DiffWindow.h 407 2006-11-13 18:54:02Z mike $" // // DiffWindow widget definitions. // // Copyright 2005-2006 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #ifndef _DiffWindow_h_ # define _DiffWindow_h_ # include # include # include # include # include "DiffView.h" // // DiffWindow widget to support multiple file diffs... // class DiffWindow : public Fl_Overlay_Window { Fl_Menu_Bar menubar_; // Menubar DiffView view_; // Diff viewing widget const char *file1_, // First file *file2_; // Second file DiffWindow *next_; // Next window int search_line_; // Current line in search bool search_right_; // Searched on the right side? char search_[1024], // Search text title_[1024]; // Window title bool zoom_; // Show zoom overlay? int zoom_pos_; // Zoom overlay position static DiffWindow *first_; // First window static const char *help_text_; // Help text static Fl_Preferences prefs_; // Application preferences... void draw_overlay(); void load_prefs(); void open(const char *f1, const char *f2); void save_prefs(); static void about_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void close_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void compare_selected_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void compare_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void copy_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void find_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void find_next_cb(Fl_Menu_Bar *m, DiffWindow *dw); static DiffWindow *find_window(const char *f1, const char *f2); static void next_change_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void prefs_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void prev_change_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void quit_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void rediff_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void select_cb(DiffView *dv, DiffWindow *dw); static void select_left_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void select_none_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void select_right_cb(Fl_Menu_Bar *m, DiffWindow *dw); static void using_cb(Fl_Menu_Bar *m, DiffWindow *dw); public: DiffWindow(const char *file1, const char *file2); ~DiffWindow(); void color(Fl_Color c) { view_.color(c); } Fl_Color color() const { return (view_.color()); } int handle(int event); bool load(const char *file1, const char *file2); void resize(int X, int Y, int W, int H); void selection_color(Fl_Color c) { view_.selection_color(c); } Fl_Color selection_color() const { return (view_.selection_color()); } void showlinenum(bool b) { view_.showlinenum(b); } bool showlinenum() const { return (view_.showlinenum()); } void ignoreblanks(bool b) { view_.ignoreblanks(b); } bool ignoreblanks() const { return (view_.ignoreblanks()); } void tabwidth(int t) { view_.tabwidth(t); } int tabwidth() const { return (view_.tabwidth()); } void textcolor(Fl_Color c) { view_.textcolor(c); } Fl_Color textcolor() const { return (view_.textcolor()); } void textfont(uchar f) { view_.textfont(f); } uchar textfont() const { return (view_.textfont()); } void textsize(uchar s) { view_.textsize(s); } uchar textsize() const { return (view_.textsize()); } void zoom(bool b) { zoom_ = b; } bool zoom() const { return (zoom_); } }; #endif // !_DiffWindow_h_ // // End of "$Id: DiffWindow.h 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/makesrcdist0000755000076400007640000000163410206275447013523 0ustar mikemike#!/bin/sh # # "$Id$" # # makesrcdist - make a source distribution of fldiff. # echo "Getting distribution..." if test $# = 0; then echo -n "Version number for distribution? " read version else version=$1 fi cd /tmp if test $version = snapshot; then url="https://svn.easysw.com/public/fltk/applications/trunk/fldiff" else url="https://svn.easysw.com/public/fltk/applications/tags/fldiff-$version" svn copy https://svn.easysw.com/public/fltk/applications/trunk/fldiff/ "$url" \ -m "Tag $version" || exit 1 fi rm -rf fldiff-$version svn export $url fldiff-$version cd fldiff-$version echo "Removing Subversion files and directories..." rm -f makesrcdist autoconf cd .. echo "Making .tar.gz distribution..." gtar czf fldiff-$version-source.tar.gz fldiff-$version echo "Removing distribution directory..." rm -rf fldiff-$version echo "Done!" # # End of "$Id: makesrcdist 85 2004-11-17 16:32:26Z mike $". # fldiff-1.1/fldiff.readme0000644000076400007640000000053610206275404013666 0ustar mikemikefldiff is a graphical diff program that shows the differences between two files/directories, or a file/directory and a CVS or Subversion repository. fldiff is copyright 2005 by Michael Sweet and is free software provided under the terms of the GNU General Public License v2. Please report any problems and suggestions on the fltk.general newsgroup. fldiff-1.1/fldiff.png0000644000076400007640000000052310200750474013210 0ustar mikemikePNG  IHDR szzbKGDlc pHYs  tIME'5铈dtEXtComment̖IDATXWA '~oZDV5SV|Du⺉E'bƩ|~NOڞMrJR]p%7hwh@6WwEAv\@{$r `+w8P$z};ZL­$# G\̖9Um}cdp"׌KDa]޳Exڬ)IENDB`fldiff-1.1/Makefile.in0000644000076400007640000000516610441575037013334 0ustar mikemike# # "$Id: Makefile.in 388 2006-06-07 16:09:03Z fabien $" # # Makefile for fldiff, a graphical diff program. # # Copyright 2005 by Michael Sweet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # Installation directories prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datadir = @datadir@ mandir = @mandir@ docdir = @docdir@ desktopdir = @desktopdir@ # Compiler definitions... CP = @CP@ CXX = @CXX@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ -DVERSION=\"fldiff\ v@VERSION@\" @OPTIM@ FLTKCONFIG = @FLTKCONFIG@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ MKDIR = @MKDIR@ -p RM = @RM@ -f # Rules for compiling... .SUFFIXES: .cxx .o .cxx.o: $(CXX) $(CXXFLAGS) -c $< # Objects... OBJS = \ DiffChooser.o \ DiffOpenWindow.o \ DiffView.o \ DiffWindow.o \ FavoritesMenu.o \ FavoritesWindow.o \ PtProcess.o \ fldiff.o # Standard install targets... all: fldiff clean: $(RM) fldiff $(RM) $(OBJS) $(RM) *.bck $(RM) *~ depend: makedepend -Y -f .depend $(OBJS:.o=.cxx) distclean: clean $(RM) -r autom4te* $(RM) config.* $(RM) configure install: @INSTALLDESKTOP@ $(MKDIR) $(BUILDROOT)$(bindir) cp fldiff $(BUILDROOT)$(bindir) $(MKDIR) $(BUILDROOT)$(mandir)/man1 cp fldiff.man $(BUILDROOT)$(mandir)/man1/fldiff.1 $(MKDIR) $(BUILDROOT)$(docdir) cp index.html fldiff.jpg COPYING $(BUILDROOT)$(docdir) install-desktop: $(MKDIR) $(BUILDROOT)$(desktopdir)/Development cp fldiff.desktop $(BUILDROOT)$(desktopdir)/Development $(MKDIR) $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps cp fldiff.png $(BUILDROOT)$(datadir)/icons/hicolor/32x32/apps uninstall: @UNINSTALLDESKTOP@ $(RM) $(BUILDROOT)$(bindir)/fldiff $(RM) $(BUILDROOT)$(mandir)/man1/fldiff.1 rm -rf $(BUILDROOT)$(docdir) uninstall-desktop: $(RM) $(desktopdir)/Development/fldiff.desktop $(RM) $(datadir)/icons/hicolor/32x32/apps/fldiff.png # Build the fldiff program... fldiff: $(OBJS) Makefile $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(FLTKCONFIG) --post $@ $(OBJS): Makefile # autoconf stuff... Makefile: configure Makefile.in if test -f config.status; then \ ./config.status --recheck; \ ./config.status; \ else \ ./configure; \ fi configure: configure.in autoconf # Include dependencies... include .depend # # End of "$Id: Makefile.in 388 2006-06-07 16:09:03Z fabien $". # fldiff-1.1/DiffChooser.h0000644000076400007640000000346310441575037013631 0ustar mikemike// // "$Id: DiffChooser.h 388 2006-06-07 16:09:03Z fabien $" // // DiffChooser widget definitions. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #ifndef _DiffChooser_h_ # define _DiffChooser_h_ # include # include # include # include # include "FavoritesMenu.h" #if defined(WIN32) #include #define snprintf _snprintf #define access _access #else #include #endif class DiffChooser : public Fl_Group { Fl_File_Input input_; // Input field FavoritesMenu menu_; // Favorites button Fl_File_Browser browser_; // File browser char directory_[1024];// Directory name char filename_[1024];// Cached filename static void browser_cb(Fl_File_Browser *fb, DiffChooser *dc); static void input_cb(Fl_File_Input *fi, DiffChooser *dc); static void menu_cb(FavoritesMenu *fm, DiffChooser *dc); public: DiffChooser(int X, int Y, int W, int H, const char *L = (const char *)0); int count(); void deselect() { browser_.deselect(); } const char *directory() { return (directory_); } int selected(int i) { return (browser_.selected(i)); } int size() { return (browser_.size()); } void value(const char *f); const char *value() { return (input_.value()); } const char *value(int i); }; #endif // !_DiffChooser_h_ // // End of "$Id: DiffChooser.h 388 2006-06-07 16:09:03Z fabien $". // fldiff-1.1/fldiff.cxx0000644000076400007640000000256010526137512013234 0ustar mikemike// // "$Id: fldiff.cxx 407 2006-11-13 18:54:02Z mike $" // // A graphical diff program. // // Copyright 2005 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // main() - Show the differences between two files. // #include "DiffWindow.h" #include #include #include // // 'main()' - Show the differences between two files. // int // O - Exit status main(int argc, // I - Number of command-line args char *argv[]) // I - Command-line arguments { DiffWindow *dw; // Diff window... // Use POSIX locale for all commands... putenv("LANG=C"); // Use the GTK+ scheme... Fl::scheme("gtk+"); // Create the window... if (argc > 1) dw = new DiffWindow(argv[1], argv[2]); else dw = new DiffWindow(NULL, NULL); dw->show(1, argv); // Run until all windows are closed... Fl::run(); // Return with no errors... return (0); } // // End of "$Id: fldiff.cxx 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/fldiff.list.in0000644000076400007640000000235110206230524014000 0ustar mikemike# # "$Id$" # # EPM list file for fldiff. # # Copyright 2005 by Michael Sweet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # %product fldiff %description Graphical diff program %version @VERSION@ %license COPYING %vendor Michael Sweet %readme fldiff.readme $prefix=@prefix@ $exec_prefix=@exec_prefix@ $bindir=@bindir@ $datadir=@datadir@ $mandir=@mandir@ $docdir=@docdir@ $desktopdir=@desktopdir@ f 0555 root sys $bindir/fldiff fldiff f 0444 root sys $mandir/man1/fldiff.1 fldiff.man d 0555 root sys $docdir - f 0555 root sys $docdir/index.html index.html f 0555 root sys $docdir/fldiff.jpg fldiff.jpg d 0555 root sys $desktopdir/Development - f 0444 root sys $desktopdir/Development/fldiff.desktop fldiff.desktop d 0555 root sys $datadir/icons/hicolor/32x32/apps f 0444 root sys $datadir/icons/hicolor/32x32/apps/fldiff.png fldiff.png # # End of "$Id$". # fldiff-1.1/CHANGES0000644000076400007640000000103310526137512012243 0ustar mikemikeCHANGES - 2006-11-13 -------------------- v1.1 - Now use the GTK+ scheme, when available. - Added support for running fldiff on Windows. - Added "ignore whitespace" option for diffs. - Clicking on the scrollbar's down arrow would cause fldiff to crash if the diff fit in the window. v1.0.1 - Clicking on "cancel" in the open/compare dialog would still try to do a diff. - Clicking on the directory buttons in the open/compare dialog did not refresh the file list for that directory. v1.0 - First stable release. fldiff-1.1/DiffView.h0000644000076400007640000000756610526137512013145 0ustar mikemike// // "$Id: DiffView.h 407 2006-11-13 18:54:02Z mike $" // // DiffView widget definitions. // // Copyright 2005-2006 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #ifndef _DiffView_h_ # define _DiffView_h_ # include # include # include # if defined(WIN32) # include # else # include # endif // WIN32 // // DiffView widget to view file differences... // class DiffView : public Fl_Group { enum { IDLE = 0, // Not doing anything SCROLLING = 1, // Scrolling SELECTING = 2, // Selecting text UPARROW = 3, // Holding the up arrow DOWNARROW = 4 // Holding the down arrow }; struct DiffLine { char *left, // First file's line *dleft, // Display version *right, // Second file's line *dright; // Display version bool changed; // This line is changed? int start, // Start of changes end; // End of changes }; int alloc_, // Allocated lines count_; // Number of lines in buffer bool directories_; // True if we are comparing directories DiffLine **lines_; // Lines in buffer char linefmt_[16]; // Line number format int linenum_; // Width of line numbers int maxwidth_; // Maximum width of lines int select_start_, // Start of current selection select_end_; // End of current selection bool select_right_, // Select the right side? showlinenum_, // Show line numbers? ignoreblanks_; // ignore blanks during diff ? int state_, // Scroll/selecting state tabwidth_; // Width of tabs Fl_Color textcolor_; // Text color uchar textfont_, // Text font textsize_; // Text size int topline_; // Top position Fl_Scrollbar hscroll1_, // Horizontal scrollbar for first file hscroll2_; // Horizontal scrollbar for second file void add_line(const char *left, const char *right, bool changed, int pos = -1); void draw(); char *expand_tabs(const char *s); static void scroll_cb(Fl_Scrollbar *s, DiffView *d); static void timeout_cb(DiffView *d); public: DiffView(int X, int Y, int W, int H, const char *L = 0); ~DiffView(); void clear(); int count() const { return (count_); } bool directories() const { return (directories_); } int handle(int event); const char *left(int l) { return (lines_[l]->left); } bool line_changed(int l) { return (lines_[l]->changed); } bool load(const char *file1, const char *file2); void resize(int X, int Y, int W, int H); const char *right(int l) { return (lines_[l]->right); } void select(int s, int e, bool r); int select_end() const { return (select_end_); } int select_start() const { return (select_start_); } char *selection(); int selection_length(); void showline(int l); void showlinenum(bool b) { showlinenum_ = b; } bool showlinenum() const { return (showlinenum_); } void ignoreblanks(bool b) { ignoreblanks_ = b; } bool ignoreblanks() const { return (ignoreblanks_); } void tabwidth(int t) { tabwidth_ = t; } int tabwidth() const { return (tabwidth_); } void textcolor(Fl_Color c) { textcolor_ = c; } Fl_Color textcolor() const { return (textcolor_); } void textfont(uchar f) { textfont_ = f; } uchar textfont() const { return (textfont_); } void textsize(uchar s) { textsize_ = s; } uchar textsize() const { return (textsize_); } int topline() const { return (topline_ / textsize_); } }; #endif // !_DiffView_h_ // // End of "$Id: DiffView.h 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/fldiff.man0000644000076400007640000000253610200743234013201 0ustar mikemike.\" .\" "$Id$" .\" .\" Manual page for fldiff. .\" .\" Copyright 2005 by Michael Sweet .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License v2 as published .\" by the Free Software Foundation. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .TH fldiff 1 "fldiff" "4 February 2005" "Michael Sweet" .SH NAME fldiff \- compare files and directories graphically .SH SYNOPSIS .B fldiff [ .I first [ .I second ] ] .SH DESCRIPTION \fBfldiff\fR is a graphical diff program that shows the differences between two files/directories, or a file/directory and a CVS or Subversion repository. .SH COPYRIGHT Copyright 2005 by Michael Sweet .LP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation. .LP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .\" .\" End of "$Id$". .\" fldiff-1.1/DiffOpenWindow.cxx0000644000076400007640000000673510526137512014674 0ustar mikemike// // "$Id: DiffOpenWindow.cxx 407 2006-11-13 18:54:02Z mike $" // // DiffOpenWindow widget code. // // Copyright 2005-2006 by Michael Sweet. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Contents: // // DiffOpenWindow::DiffOpenWindow() - Create an open/compare window. // DiffOpenWindow::compare_cb() - Confirm the open/compare. // DiffOpenWindow::cancel_cb() - Cancel the open/compare. // DiffOpenWindow::dc_cb() - Handle selections in either chooser. // DiffOpenWindow::resize() - Resize the window. // DiffOpenWindow::show() - Show the window. // #include "DiffOpenWindow.h" // // 'DiffOpenWindow::DiffOpenWindow()' - Create an open/compare window. // DiffOpenWindow::DiffOpenWindow( const char *v1, // I - First value const char *v2) // I - Second value : Fl_Double_Window(640, 480, "Open/Compare"), dc1_(10, 25, 305, 410, "File/Directory 1:"), dc2_(325, 25, 305, 410, "File/Directory 2:"), compare_(435, 445, 120, 25, "Open/Compare"), cancel_(565, 445, 65, 25, "Cancel") { end(); modal(); resizable(this); size_range(255, 225, Fl::w(), Fl::h()); dc1_.align(FL_ALIGN_TOP_LEFT); dc1_.callback((Fl_Callback *)dc_cb, this); dc1_.labelfont(FL_HELVETICA_BOLD); dc1_.value(v1); dc2_.align(FL_ALIGN_TOP_LEFT); dc2_.callback((Fl_Callback *)dc_cb, this); dc2_.labelfont(FL_HELVETICA_BOLD); dc2_.value(v2); compare_.callback((Fl_Callback *)compare_cb, this); compare_.shortcut(FL_Enter); cancel_.callback((Fl_Callback *)cancel_cb, this); } // // 'DiffOpenWindow::compare_cb()' - Confirm the open/compare. // void DiffOpenWindow::compare_cb( Fl_Button *b, // I - Open/compare button DiffOpenWindow *dow) // I - Diff open window { dow->hide(); } // // 'DiffOpenWindow::cancel_cb()' - Cancel the open/compare. // void DiffOpenWindow::cancel_cb( Fl_Button *b, // I - Cancel button DiffOpenWindow *dow) // I - Diff open window { dow->dc1_.deselect(); dow->dc2_.deselect(); dow->hide(); } // // 'DiffOpenWindow::dc_cb()' - Handle selections in either chooser. // void DiffOpenWindow::dc_cb( DiffChooser *dc, // I - Diff chooser DiffOpenWindow *dow) // I - Diff open window { if (dow->dc1_.count()) { dow->compare_.activate(); if (Fl::event_clicks()) dow->do_callback(); } else dow->compare_.deactivate(); } // // 'DiffOpenWindow::resize()' - Resize the window. // void DiffOpenWindow::resize(int X, // I - X position int Y, // I - Y position int W, // I - Width int H) // I - Height { Fl_Double_Window::resize(X, Y, W, H); dc1_.resize(10, 25, (W - 30) / 2, H - 70); dc2_.resize(20 + (W - 30) / 2, 25, (W - 30) / 2, H - 70); compare_.resize(W - 205, H - 35, 120, 25); cancel_.resize(W - 75, H - 35, 65, 25); } // // 'DiffOpenWindow::show()' - Show the window. // void DiffOpenWindow::show() { if (dc1_.count()) compare_.activate(); else compare_.deactivate(); hotspot(this); Fl_Double_Window::show(); } // // End of "$Id: DiffOpenWindow.cxx 407 2006-11-13 18:54:02Z mike $". // fldiff-1.1/.depend0000644000076400007640000000046610206230524012511 0ustar mikemike# DO NOT DELETE DiffChooser.o: DiffChooser.h FavoritesMenu.h FavoritesWindow.h DiffOpenWindow.o: DiffOpenWindow.h DiffChooser.h FavoritesMenu.h DiffView.o: DiffView.h DiffWindow.o: DiffWindow.h DiffView.h FavoritesMenu.o: FavoritesMenu.h FavoritesWindow.o: FavoritesWindow.h fldiff.o: DiffWindow.h DiffView.h fldiff-1.1/PtProcess.h0000644000076400007640000000277510526137512013361 0ustar mikemike#ifndef __PT_PROCESS_H #define __PT_PROCESS_H //======================================================================== // PtProcess.h //======================================================================== // Portable Process with pipes Handling // Features easy File and Pipe/Process opening and reading uniformization // support of read "r" or write "w" popen modes // Copyright F. Costantini 2006 // Version 1.0 //======================================================================== // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License v2 as published // by the Free Software Foundation. //======================================================================== #ifdef WIN32 #include #endif #include class CPtProcess { public: // construction / destruction CPtProcess(); virtual ~CPtProcess(); FILE * popen (const char *cmd, const char *mode="r"); FILE * fopen (const char *file, const char *mode="r"); int close(); bool is_open() const { return _fpt!=NULL ? true : false ;} FILE * desc() const { return _fpt;} char * get_line(char * line, size_t s) const { return _fpt ? fgets(line, s, _fpt) : NULL; } #ifdef WIN32 public: static bool createPipe(HANDLE * h, BOOL bInheritHnd=TRUE); protected: HANDLE pin[2], pout[2], perr[2]; char ptmode; PROCESS_INFORMATION pi; STARTUPINFO si; private: FILE * freeHandles(); static void clean_close(HANDLE& h); #endif protected: FILE * _fpt; }; #endif