├── INSTALL ├── NEWS ├── po ├── ChangeLog ├── stamp-cat-id ├── POTFILES.in └── cat-id-tbl.c ├── appres.rc ├── AUTHORS ├── lib ├── fileblocks.c ├── vccompat.h ├── Makefile.am ├── unistd.h ├── sys │ └── time.h ├── gtkdateedit.h ├── nvstore.h ├── scandir.c ├── nvstore.c ├── getopt1.c └── getopt.h ├── intl ├── Makefile.am ├── po2tbl.sed.in └── libgettext.h ├── appres.RES ├── doc ├── back.png ├── cd-up.png ├── mapv.png ├── treev.png ├── window.png ├── beyeview.png ├── cd-root.png ├── dirtree.png ├── filelist.png ├── viewport.png ├── Makefile.am ├── custom.dsl ├── about.html ├── fsv.html ├── t1.html ├── mouse.html ├── startup.html └── window.html ├── fsv_icon.ico ├── fsv_icon.png ├── ChangeLog ├── gtkgl ├── TODO ├── NEWS ├── gtkgl │ ├── gtkgl.def │ ├── gtkglarea.h │ ├── gdkgl.h │ └── gtkglarea.c ├── AUTHORS ├── config.h ├── README ├── gtkgl_vc2005.vcproj └── gtkgl.vcproj ├── .gitignore ├── dbg ├── Makefile.am └── debug.h ├── src ├── TODO ├── winutils.h ├── xmaps │ ├── mini-regfile.xpm │ ├── mini-chardev.xpm │ ├── mini-symlink.xpm │ ├── mini-unknown.xpm │ ├── mini-socket.xpm │ ├── mini-folder.xpm │ ├── mini-fifo.xpm │ ├── mini-folder-open.xpm │ ├── mini-blockdev.xpm │ ├── button_cancel.xpm │ ├── back.xpm │ ├── cd-up.xpm │ ├── cd-root.xpm │ ├── button_ok.xpm │ ├── socket.xpm │ ├── symlink.xpm │ ├── unknown.xpm │ ├── fifo.xpm │ ├── birdseye_view.xpm │ ├── regfile.xpm │ ├── chardev.xpm │ ├── folder.xpm │ └── fsv-icon.xpm ├── winutils.c ├── fsv.h ├── scanfs.h ├── about.h ├── viewport.h ├── colexp.h ├── dialog.h ├── ogl.h ├── tmaptext.h ├── filelist.h ├── dirtree.h ├── window.h ├── Makefile.am ├── animation.h ├── callbacks.h ├── fnmatch.h ├── color.h ├── camera.h ├── geometry.h ├── callbacks.c ├── gui.h ├── about.c └── fnmatch.c ├── NOTES ├── fsvwin.sln ├── fsvwin_vc2005.sln ├── TODO └── README.md /INSTALL: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /po/stamp-cat-id: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /appres.rc: -------------------------------------------------------------------------------- 1 | 1 ICON DISCARDABLE "fsv_icon.ico" -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Daniel Richard G. 2 | -------------------------------------------------------------------------------- /lib/fileblocks.c: -------------------------------------------------------------------------------- 1 | /* dummy for autoconf */ 2 | -------------------------------------------------------------------------------- /intl/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = libgettext.h po2tbl.sed.in 2 | -------------------------------------------------------------------------------- /appres.RES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/appres.RES -------------------------------------------------------------------------------- /doc/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/back.png -------------------------------------------------------------------------------- /doc/cd-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/cd-up.png -------------------------------------------------------------------------------- /doc/mapv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/mapv.png -------------------------------------------------------------------------------- /doc/treev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/treev.png -------------------------------------------------------------------------------- /doc/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/window.png -------------------------------------------------------------------------------- /fsv_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/fsv_icon.ico -------------------------------------------------------------------------------- /fsv_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/fsv_icon.png -------------------------------------------------------------------------------- /doc/beyeview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/beyeview.png -------------------------------------------------------------------------------- /doc/cd-root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/cd-root.png -------------------------------------------------------------------------------- /doc/dirtree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/dirtree.png -------------------------------------------------------------------------------- /doc/filelist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/filelist.png -------------------------------------------------------------------------------- /doc/viewport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiekus/fsvwin/HEAD/doc/viewport.png -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 0.9 (9 September 1999) 2 | ---------------------- 3 | 4 | * Initial release. 5 | -------------------------------------------------------------------------------- /gtkgl/TODO: -------------------------------------------------------------------------------- 1 | 1) Ensure windows compatability exists 2 | 2) code audit 3 | 3) begin using glitz. This will provide better cross-platform support 4 | -------------------------------------------------------------------------------- /lib/vccompat.h: -------------------------------------------------------------------------------- 1 | #ifndef __VCCOMPAT_H__ 2 | #define __VCCOMPAT_H__ 3 | 4 | #include 5 | typedef unsigned long uid_t; 6 | typedef unsigned long gid_t; 7 | typedef unsigned long pid_t; 8 | 9 | #endif //__VCCOMPAT_H__ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | Debug/ 3 | Release/ 4 | *_Debug/ 5 | *_Release/ 6 | gtkgl/*_Debug/ 7 | gtkgl/*_Release/ 8 | *.obj 9 | *.ncb 10 | *.suo 11 | *.pdb 12 | *.lib 13 | *.exe 14 | *.dll 15 | *.manifest 16 | *.vcproj.* -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings 2 | 3 | src/about.c 4 | src/common.c 5 | src/dialog.c 6 | src/dirtree.c 7 | src/filelist.c 8 | src/fsv.c 9 | src/scanfs.c 10 | src/window.c 11 | -------------------------------------------------------------------------------- /lib/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LIBRARIES = libmisc.a 2 | 3 | INCLUDES = @GTK_CFLAGS@ 4 | 5 | noinst_HEADERS = \ 6 | getopt.h \ 7 | nvstore.h 8 | libmisc_a_SOURCES = getopt.c getopt1.c nvstore.c 9 | libmisc_a_LIBADD = @LIBOBJS@ 10 | -------------------------------------------------------------------------------- /dbg/Makefile.am: -------------------------------------------------------------------------------- 1 | if DEBUG 2 | DEBUG_LIBS = libdebug.a 3 | else 4 | DEBUG_LIBS = 5 | endif 6 | 7 | INCLUDES = @GTK_CFLAGS@ 8 | 9 | noinst_LIBRARIES = $(DEBUG_LIBS) 10 | 11 | noinst_HEADERS = debug.h 12 | libdebug_a_SOURCES = debug.c 13 | -------------------------------------------------------------------------------- /gtkgl/NEWS: -------------------------------------------------------------------------------- 1 | 2 | ============= 3 | Version 2.0.1 4 | ============= 5 | 6 | General 7 | * Code reorganisation and cleanup. 8 | * 64-bit and Win32 portability fixes. 9 | * Support for newer autotools versions. 10 | * Fix Cygwin and MinGW builds. 11 | 12 | Examples 13 | * New fragment shader and vertex shader example program. 14 | 15 | -------------------------------------------------------------------------------- /src/TODO: -------------------------------------------------------------------------------- 1 | old authors TODO: Finishing a camera pan (ahead of time) does not perform final update on scrollbars. 2 | GENBTC TODO: 3 | Scrollbars dont seem to do anything on Win32. 4 | In Viewport.c, the bottom function controls the keyboard events, make it so that you can move around with the keyboard, or fix the scrollbars. 5 | 6 | DiscV (disc view) - just a buncha crop circles lol -------------------------------------------------------------------------------- /src/winutils.h: -------------------------------------------------------------------------------- 1 | /* winutils.h */ 2 | /* Windows specific utilities */ 3 | /* This part is Copyright (C)2019 Thiekus. Original license applies */ 4 | 5 | #ifndef FSV_WINUTILS_H 6 | #define FSV_WINUTILS_H 7 | 8 | #include 9 | 10 | char 11 | *win_fix_path_slashes( char *path ); 12 | 13 | int 14 | win_get_file_type_name( const char *file_path, char *desc ); 15 | 16 | #endif /* FSV_WINUTILS_H */ -------------------------------------------------------------------------------- /gtkgl/gtkgl/gtkgl.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | gdk_gl_choose_visual 3 | gdk_gl_context_attrlist_share_new 4 | gdk_gl_context_new 5 | gdk_gl_context_share_new 6 | gdk_gl_get_config 7 | gdk_gl_get_info 8 | gdk_gl_make_current 9 | gdk_gl_pixmap_make_current 10 | gdk_gl_pixmap_new 11 | gdk_gl_query 12 | gdk_gl_swap_buffers 13 | gdk_gl_use_gdk_font 14 | gdk_gl_wait_gdk 15 | gdk_gl_wait_gl 16 | gtk_gl_area_get_type 17 | gtk_gl_area_make_current 18 | gtk_gl_area_new 19 | gtk_gl_area_new_vargs 20 | gtk_gl_area_share_new 21 | gtk_gl_area_swap_buffers 22 | -------------------------------------------------------------------------------- /src/xmaps/mini-regfile.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_regfile_xpm[] = { 3 | "16 16 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #FFFFC0", 7 | "@ c #FFFFFF", 8 | "# c #C0C000", 9 | " .. ", 10 | " .+... ", 11 | " .+@+@+... ", 12 | " .@@@@@+@+..", 13 | " .+@@@@+@+@+.", 14 | " .+@@@+@++++.", 15 | " .+@+@+@+@+++.", 16 | " .@+@+@+@+@+#.", 17 | " .@+@+@+@+@++. ", 18 | " .++@+++@+++++. ", 19 | ".++++@+@+@+@++. ", 20 | ".#++++++@++++#. ", 21 | " ..#+++++++++. ", 22 | " ...#+++++#. ", 23 | " ...#+#. ", 24 | " ... "}; 25 | -------------------------------------------------------------------------------- /src/xmaps/mini-chardev.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_chardev_xpm[] = { 3 | "16 16 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #C0C0C0", 7 | "@ c #808080", 8 | "# c #FFFFFF", 9 | "$ c #C0FFFF", 10 | " ........... ", 11 | " .+++++++++++. ", 12 | " .+@@@@@@@@@+. ", 13 | " .+@.......#+. ", 14 | " .+@.$$....#+. ", 15 | " .+@.......#+. ", 16 | " .+@.......#+. ", 17 | " .+@.......#+. ", 18 | " .+++++++++++. ", 19 | " .@@@@@@@@@@@. ", 20 | " ........... ", 21 | " .@ ", 22 | " @. ", 23 | " .@ .. ", 24 | " ..+. ", 25 | " .. "}; 26 | -------------------------------------------------------------------------------- /src/xmaps/mini-symlink.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_symlink_xpm[] = { 3 | "16 16 6 1", 4 | " c None", 5 | ". c #808080", 6 | "+ c #FFFFFF", 7 | "@ c #000000", 8 | "# c #C0C0C0", 9 | "$ c #E0E0E0", 10 | " ", 11 | " ............. ", 12 | " .++++++++++++@ ", 13 | " .+++@@@@@@@++@ ", 14 | " .+++@@@@@@@++@ ", 15 | " .+++++#@@@@++@ ", 16 | " .++++#@@@@@++@ ", 17 | " .+++#@@@#@@++@ ", 18 | " .++#@@@#+@@++@ ", 19 | " .+$@@@#++@@++@ ", 20 | " .+#@@#+++++++@ ", 21 | " .+#@@$+++++++@ ", 22 | " .++@@++++++++@ ", 23 | " .++++++++++++@ ", 24 | " @@@@@@@@@@@@@ ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /src/xmaps/mini-unknown.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_unknown_xpm[] = { 3 | "16 16 6 1", 4 | " c None", 5 | ". c #800000", 6 | "+ c #FFFFFF", 7 | "@ c #C0C0C0", 8 | "# c #FF0000", 9 | "$ c #000000", 10 | " ...... ", 11 | " ..++++@@. ", 12 | " .@######@.. ", 13 | " .@########.$ ", 14 | " .###.$.###.$ ", 15 | " .###.$$###.$ ", 16 | " .$$$$ .###.$ ", 17 | " .###.$ ", 18 | " .###.$ ", 19 | " .###.$ ", 20 | " .###.$ ", 21 | " $$$$$ ", 22 | " ...@$ ", 23 | " .###.$ ", 24 | " .###.$ ", 25 | " $$$$ "}; 26 | -------------------------------------------------------------------------------- /src/xmaps/mini-socket.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_socket_xpm[] = { 3 | "16 16 7 1", 4 | " c None", 5 | ". c #404040", 6 | "+ c #FF8000", 7 | "@ c #E07000", 8 | "# c #C06000", 9 | "$ c #000000", 10 | "% c #F07800", 11 | " ", 12 | " ", 13 | " ........ ", 14 | " .++++++++. ", 15 | " .++++++++++. ", 16 | " .@#$#%%#$#@. ", 17 | " .+##$#%%#$##+. ", 18 | " .+##$#%%#$##+. ", 19 | " .+@#$#%%#$#@+. ", 20 | " .++++++++++++. ", 21 | " .++++##++++. ", 22 | " .++++$$++++. ", 23 | " .+++$$+++. ", 24 | " ........ ", 25 | " ", 26 | " "}; 27 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | HTML_DOCS = \ 2 | about.html \ 3 | fsv.html \ 4 | menus.html \ 5 | mouse.html \ 6 | startup.html \ 7 | window.html \ 8 | t1.html 9 | 10 | PNG_IMAGES = \ 11 | back.png \ 12 | beyeview.png \ 13 | cd-root.png \ 14 | cd-up.png \ 15 | dirtree.png \ 16 | filelist.png \ 17 | mapv.png \ 18 | treev.png \ 19 | viewport.png \ 20 | window.png 21 | 22 | all: $(HTML_DOCS) 23 | 24 | $(HTML_DOCS): custom.dsl fsv.sgml 25 | -jade -d $(srcdir)/custom.dsl -t sgml -i html fsv.sgml 26 | cp -f t1.html fsv.html 27 | 28 | doc_DATA = $(HTML_DOCS) $(PNG_IMAGES) 29 | 30 | EXTRA_DIST = custom.dsl fsv.sgml $(HTML_DOCS) $(PNG_IMAGES) 31 | -------------------------------------------------------------------------------- /src/xmaps/mini-folder.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_folder_xpm[] = { 3 | "16 16 9 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #585858", 7 | "@ c #FFA858", 8 | "# c #FFDCA8", 9 | "$ c #FFFFFF", 10 | "% c #C0C0C0", 11 | "& c #A0A0A4", 12 | "* c #808080", 13 | " .+. ", 14 | " .+@#.. ", 15 | " .$++@#..... ", 16 | " .$$%++@###@. ", 17 | " .$%$%%+@###+ ", 18 | " .%$%%%%++++@. ", 19 | " .$%%%%%%%&%.@+ ", 20 | " .%%%%%%%&%&.@+ ", 21 | " .%%%%%%&%&&.@+ ", 22 | " .%%%%%&%&&&.@+ ", 23 | " ..*%%&%&&&&.@+ ", 24 | " ..*%&&&&&.@+ ", 25 | " ..&&&&&.@+ ", 26 | " ..&&&.@..", 27 | " ..&.@..", 28 | " .... "}; 29 | -------------------------------------------------------------------------------- /src/xmaps/mini-fifo.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_fifo_xpm[] = { 3 | "16 16 10 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #00A000", 7 | "@ c #00B000", 8 | "# c #00B800", 9 | "$ c #00C000", 10 | "% c #00D000", 11 | "& c #00E000", 12 | "* c #00FF00", 13 | "= c #FFFFFF", 14 | " ", 15 | " ............ ", 16 | " .+@#$%&*=*&. ", 17 | " .+@#$%&*=*&. ", 18 | " .+@#$%&*=*&. ", 19 | " .+@#$%&*=*&. ", 20 | " .++++@$@+. ", 21 | " .+@$&*=*&. ", 22 | " .+@$&*=*&. ", 23 | " .+@$&*=*&. ", 24 | " .+@$&*=*&. ", 25 | " .+@$&*=*&. ", 26 | " .+@$&*=*&. ", 27 | " .+@$&*=*&. ", 28 | " .......... ", 29 | " "}; 30 | -------------------------------------------------------------------------------- /src/xmaps/mini-folder-open.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_folder_open_xpm[] = { 3 | "16 16 11 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #FFA858", 7 | "@ c #808080", 8 | "# c #FFDCA8", 9 | "$ c #A0A0A4", 10 | "% c #303030", 11 | "& c #585858", 12 | "* c #C0C0C0", 13 | "= c #DCDCDC", 14 | "- c #FFFFFF", 15 | " ... ", 16 | " .+@.. ", 17 | " .+#+@.... ", 18 | "... .+######+. ", 19 | ".$$%&+++#####+. ", 20 | ".@$$$@++++###+@.", 21 | " %$$$$@@++++#+@.", 22 | " .@$$**$@@++++@.", 23 | " %$*$****@@++@.", 24 | " .@****=*=$++@.", 25 | " %@=***=-#&+@.", 26 | " .%$==---$+@.", 27 | " .%*---#&@.", 28 | " .%*--@@.", 29 | " .%*-@.", 30 | " .%%."}; 31 | -------------------------------------------------------------------------------- /gtkgl/AUTHORS: -------------------------------------------------------------------------------- 1 | Current authors and maintainers 2 | ------------------------------- 3 | Sam Hocevar 4 | C.J. Adams-Collier 5 | 6 | Previous authors and maintainers 7 | -------------------------------- 8 | Xavier Ordoquy 9 | Janne Löf 10 | 11 | Contributors 12 | ------------ 13 | Karl Nelson (original autoconf, gtkglarea--) 14 | Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz> (original autotools) 15 | Jussi Löf (LightWave objects) 16 | Andrew Marriott (original win32 port) 17 | Chris Abernethy (gtkglarea_demo.c) 18 | 19 | -------------------------------------------------------------------------------- /src/xmaps/mini-blockdev.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * mini_blockdev_xpm[] = { 3 | "16 16 14 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #C0FFC0", 7 | "@ c #00FF00", 8 | "# c #008000", 9 | "$ c #00C000", 10 | "% c #C0FFFF", 11 | "& c #00FFFF", 12 | "* c #008080", 13 | "= c #00C0C0", 14 | "- c #FFFFC0", 15 | "; c #FFFF00", 16 | "> c #808000", 17 | ", c #C0C000", 18 | " .. ", 19 | " .++.. ", 20 | " .+++@@. ", 21 | " .@@@@@#... ", 22 | " .$$@@##.%%.. ", 23 | " .$$$##.%%%&&. ", 24 | " .$$$#.&&&&&*. ", 25 | " ...#.==&&**. ", 26 | " .--..===***. ", 27 | " .---;;.==**. ", 28 | " .;;;;;>..=*. ", 29 | " .,,;;>>. .. ", 30 | " .,,,>>>. ", 31 | " .,,,>>. ", 32 | " ..,>. ", 33 | " .. "}; 34 | -------------------------------------------------------------------------------- /src/xmaps/button_cancel.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * button_cancel_xpm[] = { 3 | "20 20 8 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #C46D74", 7 | "@ c #9F3C44", 8 | "# c #B5444E", 9 | "$ c #BD5A62", 10 | "% c #7B2D34", 11 | "& c #8C343C", 12 | " ", 13 | " ", 14 | " ", 15 | " .. . ", 16 | " .+@. .#. ", 17 | " .##. .$#. ", 18 | " .#@. .$#%. ", 19 | " .##..$#&. ", 20 | " .####@. ", 21 | " .####. ", 22 | " .$###. ", 23 | " .$####. ", 24 | " .$#&..#&. ", 25 | " .+#&. .@#. ", 26 | " .#&. .#@. ", 27 | " .. .@#. ", 28 | " .. ", 29 | " ", 30 | " ", 31 | " "}; 32 | -------------------------------------------------------------------------------- /src/winutils.c: -------------------------------------------------------------------------------- 1 | /* winutils.c */ 2 | /* Windows specific utilities */ 3 | /* This part is Copyright (C)2019 Thiekus. Original license applies */ 4 | 5 | #include 6 | #include 7 | 8 | /* Convert unix slashes into windows backslashes, used in get_node_info() */ 9 | char 10 | *win_fix_path_slashes( char *path ) 11 | { 12 | int i; 13 | int len = strlen(path); 14 | for (i = 0; i < len; i++){ 15 | if (path[i] == '/') { 16 | path[i] = '\\'; 17 | } 18 | } 19 | return path; 20 | } 21 | 22 | /* WinAPI implementation of get_file_type_desc() function */ 23 | int 24 | win_get_file_type_name( const char *file_path, char *desc ) 25 | { 26 | SHFILEINFOA sfi = {0}; 27 | DWORD_PTR hr = SHGetFileInfoA(file_path, FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), 28 | SHGFI_USEFILEATTRIBUTES | SHGFI_TYPENAME); 29 | if (SUCCEEDED(hr)){ 30 | strcpy(desc, sfi.szTypeName); 31 | return 1; 32 | } 33 | return 0; 34 | } -------------------------------------------------------------------------------- /src/xmaps/back.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * back_xpm[] = { 3 | "24 24 5 1", 4 | " c None", 5 | ". c #808080", 6 | "+ c #FFFF00", 7 | "@ c #000000", 8 | "# c #E0E000", 9 | " ", 10 | " ", 11 | " ..... ... ", 12 | " .+++.@ .#+.@ ", 13 | " .+++.@ .#++.@ ", 14 | " .+++.@ .#+++.@ ", 15 | " .+++.@ .#++++.@ ", 16 | " .+++.@ .#+++++.@ ", 17 | " .+++.@ .#++++++.@ ", 18 | " .+++.@ .#+++++++.@ ", 19 | " .+++.@.#++++++++.@ ", 20 | " .+++..#+++++++++.@ ", 21 | " .+++..#+++++++++.@ ", 22 | " .+++.@.#++++++++.@ ", 23 | " .+++.@ .#+++++++.@ ", 24 | " .+++.@ .#++++++.@ ", 25 | " .+++.@ .#+++++.@ ", 26 | " .+++.@ .#++++.@ ", 27 | " .+++.@ .#+++.@ ", 28 | " .+++.@ .#++.@ ", 29 | " .+++.@ .#+.@ ", 30 | " .....@ ...@ ", 31 | " @@@@@ @@@ ", 32 | " "}; 33 | -------------------------------------------------------------------------------- /src/xmaps/cd-up.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * cd_up_xpm[] = { 3 | "24 24 5 1", 4 | " c None", 5 | ". c #808080", 6 | "+ c #E0E000", 7 | "@ c #FFFF00", 8 | "# c #000000", 9 | " ", 10 | " ... ... ", 11 | " .+@+. .+@+. ", 12 | " .+@@@+. .+@@@+. ", 13 | " .@@@@@.# .@@@@@.# ", 14 | " .+@@@+.# .+@@@+.# ", 15 | " .+@+.## .+@+.## ", 16 | " ...## ...## ", 17 | " ### .. ### ", 18 | " .++. ", 19 | " .+@@+. ", 20 | " .+@@@@+. ", 21 | " .+@@@@@@+. ", 22 | " .+@@@@@@@@+. ", 23 | " .+@@@@@@@@@@+. ", 24 | " .+@@@@@@@@@@@@+. ", 25 | " .+@@@@@@@@@@@@@@+. ", 26 | " .+@@@@@@@@@@@@@@@@+. ", 27 | " .@@@@@@@@@@@@@@@@@@.# ", 28 | " .....@@@@@@@@@@.....# ", 29 | " ###.@@@@@@@@@@.##### ", 30 | " .@@@@@@@@@@.# ", 31 | " ............# ", 32 | " ############ "}; 33 | -------------------------------------------------------------------------------- /src/xmaps/cd-root.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * cd_root_xpm[] = { 3 | "24 24 6 1", 4 | " c None", 5 | ". c #808080", 6 | "+ c #C0C000", 7 | "@ c #FFFF00", 8 | "# c #E0E000", 9 | "$ c #000000", 10 | " ", 11 | " ..... ", 12 | " .+@@@@. ", 13 | " .@@@@@. ", 14 | " .+@@@@#$ ", 15 | " .@@@@@.$ ", 16 | " .+@@@@#$$ ", 17 | " .@@@@@.$ ", 18 | " .+@@@@#$$ ", 19 | " .@@@@@.$ ", 20 | " .+@@@@#$$ ", 21 | " .@@@@@.$ ", 22 | " .+@@@@#$$ ", 23 | " .@@@@@.$ ", 24 | " .+@@@@#$$ ", 25 | " .@@@@@.$ ", 26 | " .+@@@@#$$ ... ", 27 | " .@@@@@.$ .#@#. ", 28 | " .+@@@@#$$.#@@@#. ", 29 | " .@@@@@.$ .@@@@@.$ ", 30 | " .+@@@@#$$ .#@@@#.$ ", 31 | " .@@@@@.$ .#@#.$$ ", 32 | " .....$$ ...$$ ", 33 | " $$$$$ $$$ "}; 34 | -------------------------------------------------------------------------------- /src/xmaps/button_ok.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * button_ok_xpm[] = { 3 | "20 20 18 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #B3C2A7", 7 | "@ c #708C58", 8 | "# c #859D71", 9 | "$ c #627B4D", 10 | "% c #97AB86", 11 | "& c #566C43", 12 | "* c #A2BD9E", 13 | "= c #789774", 14 | "- c #88AC84", 15 | "; c #5E764A", 16 | "> c #698566", 17 | ", c #6D8855", 18 | "' c #688251", 19 | ") c #668050", 20 | "! c #6D8956", 21 | "~ c #4F633E", 22 | " ", 23 | " ", 24 | " ", 25 | " .. ", 26 | " .+@. ", 27 | " .#$. ", 28 | " .%@. ", 29 | " .. .#&. ", 30 | " .*=. .#@. ", 31 | " .--.. .@&. ", 32 | " .-=..;@. ", 33 | " .-->.,&. ", 34 | " .--'). ", 35 | " .-!~. ", 36 | " .--. ", 37 | " .>. ", 38 | " . ", 39 | " ", 40 | " ", 41 | " "}; 42 | -------------------------------------------------------------------------------- /src/fsv.h: -------------------------------------------------------------------------------- 1 | /* fsv.h */ 2 | 3 | /* Program entry */ 4 | 5 | /* This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | 21 | #ifdef FSV_FSV_H 22 | #error 23 | #endif 24 | #define FSV_FSV_H 25 | 26 | 27 | void fsv_set_mode( FsvMode mode ); 28 | void fsv_load( const char *dir ); 29 | void fsv_write_config( void ); 30 | 31 | 32 | /* end fsv.h */ 33 | -------------------------------------------------------------------------------- /src/scanfs.h: -------------------------------------------------------------------------------- 1 | /* scanfs.h */ 2 | 3 | /* Filesystem scanner */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_SCANFS_H 25 | #error 26 | #endif 27 | #define FSV_SCANFS_H 28 | 29 | 30 | void scanfs( const char *dir ); 31 | 32 | 33 | /* end scanfs.h */ 34 | -------------------------------------------------------------------------------- /NOTES: -------------------------------------------------------------------------------- 1 | Implementation notes 2 | ==================== 3 | 4 | (current as of fsv 0.9) 5 | 6 | 7 | The main event loop (gtk_main( )) is entered the end of the main( ) 8 | procedure in fsv.c. 9 | 10 | Animation is triggered by the redraw( ) call, in animation.c. This 11 | hooks in animation_loop( ) as an idle loop, which in turn calls the 12 | top-level functions necessary to draw a single frame. These include: 13 | 14 | animation.c:morph_iteration( ) 15 | updates values of dynamically changing variables 16 | 17 | ogl_draw( ) 18 | resets GL state and calls geometry_draw( ), which 19 | dispatches to the appropriate set of drawing functions 20 | deep inside geometry.c 21 | 22 | animation.c:framerate_iteration( ) 23 | called every time a frame is rendered; keeps tabs on 24 | framerate 25 | 26 | animation.c:scheduled_event_iteration( ) 27 | executes callbacks which have been previous registered to 28 | fire after a given number of frames 29 | 30 | 31 | ----------------------------------------------------------------------- 32 | I'm not sure what else to add here, but if I receive questions, I'll 33 | incorporate the answers in this document. 34 | -------------------------------------------------------------------------------- /src/about.h: -------------------------------------------------------------------------------- 1 | /* about.h */ 2 | 3 | /* Help -> About... */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_ABOUT_H 25 | #error 26 | #endif 27 | #define FSV_ABOUT_H 28 | 29 | typedef enum { 30 | ABOUT_BEGIN, 31 | ABOUT_END, 32 | ABOUT_DRAW, 33 | ABOUT_CHECK 34 | } AboutMesg; 35 | 36 | 37 | gboolean about( AboutMesg mesg ); 38 | 39 | 40 | /* end about.h */ 41 | -------------------------------------------------------------------------------- /src/viewport.h: -------------------------------------------------------------------------------- 1 | /* viewport.h */ 2 | 3 | /* Viewport routines */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_VIEWPORT_H 25 | #error 26 | #endif 27 | #define FSV_VIEWPORT_H 28 | 29 | 30 | void viewport_pass_node_table( GNode **new_node_table ); 31 | #ifdef __GTK_H__ 32 | int viewport_cb( GtkWidget *gl_area_w, GdkEvent *event ); 33 | #endif 34 | 35 | 36 | /* end viewport.h */ 37 | -------------------------------------------------------------------------------- /src/colexp.h: -------------------------------------------------------------------------------- 1 | /* colexp.h */ 2 | 3 | /* Collapse/expansion engine */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_COLEXP_H 25 | #error 26 | #endif 27 | #define FSV_COLEXP_H 28 | 29 | 30 | typedef enum { 31 | COLEXP_COLLAPSE_RECURSIVE, 32 | COLEXP_EXPAND, 33 | COLEXP_EXPAND_ANY, 34 | COLEXP_EXPAND_RECURSIVE 35 | } ColExpMesg; 36 | 37 | 38 | void colexp( GNode *dnode, ColExpMesg mesg ); 39 | 40 | 41 | /* end colexp.h */ 42 | -------------------------------------------------------------------------------- /src/dialog.h: -------------------------------------------------------------------------------- 1 | /* dialog.h */ 2 | 3 | /* Dialog windows */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_DIALOGS_H 25 | #error 26 | #endif 27 | #define FSV_DIALOGS_H 28 | 29 | 30 | #ifdef __GTK_H__ 31 | void dialog_pass_main_window_widget( GtkWidget *window_w ); 32 | void context_menu( GNode *node, GdkEventButton *ev_button ); 33 | #endif 34 | void dialog_change_root( void ); 35 | void dialog_color_setup( void ); 36 | void dialog_help( void ); 37 | 38 | 39 | /* end dialog.h */ 40 | -------------------------------------------------------------------------------- /src/ogl.h: -------------------------------------------------------------------------------- 1 | /* ogl.h */ 2 | 3 | /* Primary OpenGL interface */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_OGL_H 25 | #error 26 | #endif 27 | #define FSV_OGL_H 28 | 29 | 30 | void ogl_resize( void ); 31 | void ogl_refresh( void ); 32 | double ogl_aspect_ratio( void ); 33 | void ogl_draw( void ); 34 | #ifdef GL_NO_ERROR 35 | int ogl_select( int x, int y, const GLuint **selectbuf_ptr ); 36 | #endif 37 | #ifdef __GTK_H__ 38 | GtkWidget *ogl_widget_new( void ); 39 | #endif 40 | 41 | 42 | /* end ogl.h */ 43 | -------------------------------------------------------------------------------- /src/xmaps/socket.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * socket_xpm[] = { 3 | "32 32 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #808080", 7 | "@ c #C06000", 8 | "# c #FF8000", 9 | "$ c #E07000", 10 | " ", 11 | " ", 12 | " ", 13 | " ", 14 | " ................ ", 15 | " .++++++++++++++++. ", 16 | " .+@##############@+. ", 17 | " .+@################@+. ", 18 | " .+@##################@+. ", 19 | " .+####################+. ", 20 | " .+@#$@@..@@$##$@@..@@$#@+. ", 21 | " .+#$@@@..@@$##$@@..@@@$#+. ", 22 | " .+@#$@@@..@@$##$@@..@@@$#@+. ", 23 | " .+$#$@@@..@@$##$@@..@@@$#$+. ", 24 | " .+##$@@@..@@$##$@@..@@@$##+. ", 25 | " .+##$@@@..@@$##$@@..@@@$##+. ", 26 | " .+##$@@@..@@$##$@@..@@@$##+. ", 27 | " .+###$@@..@@$##$@@..@@$###+. ", 28 | " .+$######################$+. ", 29 | " .+@######################@+. ", 30 | " .+######################+. ", 31 | " .+@########@..@########@+. ", 32 | " .+########....########+. ", 33 | " .+@#######....#######@+. ", 34 | " .+@######....######@+. ", 35 | " .+@#####....#####@+. ", 36 | " .++++++++++++++++. ", 37 | " ................ ", 38 | " ", 39 | " ", 40 | " ", 41 | " "}; 42 | -------------------------------------------------------------------------------- /src/xmaps/symlink.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * symlink_xpm[] = { 3 | "32 32 6 1", 4 | " c None", 5 | ". c #808080", 6 | "+ c #FFFFFF", 7 | "@ c #000000", 8 | "# c #E0E0E0", 9 | "$ c #C0C0C0", 10 | " ", 11 | " ", 12 | " ", 13 | " ", 14 | " ......................... ", 15 | " .++++++++++++++++++++++++@ ", 16 | " .++++++++++++++++++++++++@ ", 17 | " .++++++++#@@@@@@@@@@@@+++@ ", 18 | " .++++++++@@@@@@@@@@@@@+++@ ", 19 | " .++++++++@@@@@@@@@@@@@+++@ ", 20 | " .++++++++#@@@@@@@@@@@@+++@ ", 21 | " .++++++++++++$@@@@@@@@+++@ ", 22 | " .+++++++++++$@@@@@@@@@+++@ ", 23 | " .++++++++++$@@@@@@@@@@+++@ ", 24 | " .+++++++++$@@@@@@@@@@@+++@ ", 25 | " .++++++++$@@@@@@@$@@@@+++@ ", 26 | " .+++++++$@@@@@@@$+@@@@+++@ ", 27 | " .++++++$@@@@@@@$++@@@@+++@ ", 28 | " .+++++$@@@@@@@$+++@@@@+++@ ", 29 | " .++++$@@@@@@@$++++#@@#+++@ ", 30 | " .+++$@@@@@@@$++++++++++++@ ", 31 | " .++#@@@@@@@$+++++++++++++@ ", 32 | " .++$@@@@@@$++++++++++++++@ ", 33 | " .++#@@@@@$+++++++++++++++@ ", 34 | " .+++$@@@$++++++++++++++++@ ", 35 | " .++++#$#+++++++++++++++++@ ", 36 | " .++++++++++++++++++++++++@ ", 37 | " @@@@@@@@@@@@@@@@@@@@@@@@@ ", 38 | " ", 39 | " ", 40 | " ", 41 | " "}; 42 | -------------------------------------------------------------------------------- /src/tmaptext.h: -------------------------------------------------------------------------------- 1 | /* tmaptext.h */ 2 | 3 | /* Texture-mapped text */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_TMAPTEXT_H 25 | #error 26 | #endif 27 | #define FSV_TMAPTEXT_H 28 | 29 | 30 | void text_init( void ); 31 | void text_pre( void ); 32 | void text_post( void ); 33 | void text_draw_straight( const char *text, const XYZvec *text_pos, const XYvec *text_max_dims ); 34 | void text_draw_straight_rotated( const char *text, const RTZvec *text_pos, const XYvec *text_max_dims ); 35 | void text_draw_curved( const char *text, const RTZvec *text_pos, const RTvec *text_max_dims ); 36 | 37 | 38 | /* end tmaptext.h */ 39 | -------------------------------------------------------------------------------- /src/xmaps/unknown.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * unknown_xpm[] = { 3 | "32 32 7 1", 4 | " c None", 5 | ". c #800000", 6 | "+ c #CCCCCC", 7 | "@ c #FFFFFF", 8 | "# c #FF0000", 9 | "$ c #000000", 10 | "% c #666666", 11 | " ......... ", 12 | " ..+@+@@+@++.. ", 13 | " ..@+@+@+@@+@+++. ", 14 | " .@@@@@@@@@@@+++++. ", 15 | " .@###########@@++++. ", 16 | " .@##############++++.. ", 17 | " .@################+++.$ ", 18 | " .@#################+..$ ", 19 | " .@##################...$ ", 20 | " .@######..$$########...$ ", 21 | " .@#####...$ $#######...$ ", 22 | " .@#####..$ %#######...$ ", 23 | " .@#####.$ %#######..$ ", 24 | " .@#####$ %#######.$ ", 25 | " .$$$$$$ .@######.$ ", 26 | " .@######.$ ", 27 | " .@######.$ ", 28 | " .@######..$ ", 29 | " .#######..$ ", 30 | " .@######...$ ", 31 | " .@######...$ ", 32 | " .@######...$ ", 33 | " .@######..$ ", 34 | " .@######.$ ", 35 | " .$$$$$$$$$ ", 36 | " .....+..$ ", 37 | " %#####...$ ", 38 | " %#######..$ ", 39 | " %#######..$ ", 40 | " %#######.$ ", 41 | " %#####.$ ", 42 | " $$$$$$ "}; 43 | -------------------------------------------------------------------------------- /src/filelist.h: -------------------------------------------------------------------------------- 1 | /* filelist.h */ 2 | 3 | /* File list control */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_FILELIST_H 25 | #error 26 | #endif 27 | #define FSV_FILELIST_H 28 | 29 | 30 | #ifdef __GTK_H__ 31 | void filelist_pass_widget( GtkWidget *clist_w ); 32 | GtkWidget *dir_contents_list( GNode *dnode ); 33 | #endif 34 | void filelist_reset_access( void ); 35 | void filelist_populate( GNode *dnode ); 36 | void filelist_show_entry( GNode *node ); 37 | void filelist_init( void ); 38 | void filelist_scan_monitor_init( void ); 39 | void filelist_scan_monitor( int *node_counts, int64 *size_counts ); 40 | 41 | 42 | /* end filelist.h */ 43 | -------------------------------------------------------------------------------- /src/xmaps/fifo.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * fifo_xpm[] = { 3 | "32 32 10 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #00A000", 7 | "@ c #00B000", 8 | "# c #00B800", 9 | "$ c #00C000", 10 | "% c #00D000", 11 | "& c #00E000", 12 | "* c #00FF00", 13 | "= c #FFFFFF", 14 | " ", 15 | " ", 16 | " ........................ ", 17 | " .+@@###$$$%%%&&**==**&$. ", 18 | " .+@@###$$$%%%&&**==**&$. ", 19 | " .+@@###$$$%%%&&**==**&$. ", 20 | " .+@@###$$$%%%&&**==**&$. ", 21 | " .+@@###$$$%%%&&**==**&$. ", 22 | " .+@@###$$$%%%&&**==**&$. ", 23 | " .+@@###$$$%%%&&**==**&$. ", 24 | " .+@@###$$$%%%&&**==**&$. ", 25 | " .+@@###$$$%%%&&**==**&$. ", 26 | " ..++++++++++@@$$@@++.. ", 27 | " .+@@$$%%&&&**==**&$. ", 28 | " .+@@$$%%&&&**==**&$. ", 29 | " .+@@$$%%&&&**==**&$. ", 30 | " .+@@$$%%&&&**==**&$. ", 31 | " .+@@$$%%&&&**==**&$. ", 32 | " .+@@$$%%&&&**==**&$. ", 33 | " .+@@$$%%&&&**==**&$. ", 34 | " .+@@$$%%&&&**==**&$. ", 35 | " .+@@$$%%&&&**==**&$. ", 36 | " .+@@$$%%&&&**==**&$. ", 37 | " .+@@$$%%&&&**==**&$. ", 38 | " .+@@$$%%&&&**==**&$. ", 39 | " .+@@$$%%&&&**==**&$. ", 40 | " .+@@$$%%&&&**==**&$. ", 41 | " .+@@$$%%&&&**==**&$. ", 42 | " .+@@$$%%&&&**==**&$. ", 43 | " .................... ", 44 | " ", 45 | " "}; 46 | -------------------------------------------------------------------------------- /doc/custom.dsl: -------------------------------------------------------------------------------- 1 | 3 | ]> 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | ;; make funcsynopsis look pretty 21 | (define %funcsynopsis-decoration% 22 | ;; Decorate elements of a FuncSynopsis? 23 | #t) 24 | 25 | (define %html-ext% ".html") 26 | (define %body-attr% 27 | ;; What attributes should be hung off of BODY? 28 | '()) 29 | ;; (list 30 | ;; (list "BGCOLOR" "#FFFFFF") 31 | ;; (list "TEXT" "#000000"))) 32 | 33 | (define %generate-article-toc% 34 | ;; Should a Table of Contents be produced for Articles? 35 | ;; If true, a Table of Contents will be generated for each 'Article'. 36 | #t) 37 | 38 | (define %generate-part-toc% #t) 39 | 40 | (define %shade-verbatim% 41 | #t) 42 | 43 | (define %use-id-as-filename% 44 | ;; Use ID attributes as name for component HTML files? 45 | #t) 46 | 47 | (define %graphic-default-extension% "gif") 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /fsvwin.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fsvwin", "fsvwin.vcproj", "{0099CAB4-5AB4-4411-9688-9DC0F556F8B2}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {7EAF7486-10D2-4961-9462-E505805A7373} = {7EAF7486-10D2-4961-9462-E505805A7373} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtkgl", "gtkgl\gtkgl.vcproj", "{7EAF7486-10D2-4961-9462-E505805A7373}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Debug|Win32.Build.0 = Debug|Win32 19 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Release|Win32.ActiveCfg = Release|Win32 20 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Release|Win32.Build.0 = Release|Win32 21 | {7EAF7486-10D2-4961-9462-E505805A7373}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {7EAF7486-10D2-4961-9462-E505805A7373}.Debug|Win32.Build.0 = Debug|Win32 23 | {7EAF7486-10D2-4961-9462-E505805A7373}.Release|Win32.ActiveCfg = Release|Win32 24 | {7EAF7486-10D2-4961-9462-E505805A7373}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /src/dirtree.h: -------------------------------------------------------------------------------- 1 | /* dirtree.h */ 2 | 3 | /* Directory tree control */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_DIRTREE_H 25 | #error 26 | #endif 27 | #define FSV_DIRTREE_H 28 | 29 | 30 | #ifdef __GTK_H__ 31 | void dirtree_pass_widget( GtkWidget *ctree_w ); 32 | #endif 33 | void dirtree_clear( void ); 34 | void dirtree_entry_new( GNode *dnode ); 35 | void dirtree_no_more_entries( void ); 36 | void dirtree_entry_show( GNode *dnode ); 37 | boolean dirtree_entry_expanded( GNode *dnode ); 38 | void dirtree_entry_collapse_recursive( GNode *dnode ); 39 | void dirtree_entry_expand( GNode *dnode ); 40 | void dirtree_entry_expand_recursive( GNode *dnode ); 41 | 42 | 43 | /* end dirtree.h */ 44 | -------------------------------------------------------------------------------- /fsvwin_vc2005.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual C++ Express 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fsvwin", "fsvwin_vc2005.vcproj", "{0099CAB4-5AB4-4411-9688-9DC0F556F8B2}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {7EAF7486-10D2-4961-9462-E505805A7373} = {7EAF7486-10D2-4961-9462-E505805A7373} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtkgl", "gtkgl\gtkgl_vc2005.vcproj", "{7EAF7486-10D2-4961-9462-E505805A7373}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | Debug|Win32 = Debug|Win32 14 | Release|Win32 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Debug|Win32.ActiveCfg = Debug|Win32 18 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Debug|Win32.Build.0 = Debug|Win32 19 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Release|Win32.ActiveCfg = Release|Win32 20 | {0099CAB4-5AB4-4411-9688-9DC0F556F8B2}.Release|Win32.Build.0 = Release|Win32 21 | {7EAF7486-10D2-4961-9462-E505805A7373}.Debug|Win32.ActiveCfg = Debug|Win32 22 | {7EAF7486-10D2-4961-9462-E505805A7373}.Debug|Win32.Build.0 = Debug|Win32 23 | {7EAF7486-10D2-4961-9462-E505805A7373}.Release|Win32.ActiveCfg = Release|Win32 24 | {7EAF7486-10D2-4961-9462-E505805A7373}.Release|Win32.Build.0 = Release|Win32 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | EndGlobal 30 | -------------------------------------------------------------------------------- /gtkgl/config.h: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define to 1 if you have the header file. */ 4 | #undef HAVE_DLFCN_H 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_INTTYPES_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_MEMORY_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_STDINT_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDLIB_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STRINGS_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRING_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_SYS_STAT_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_TYPES_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_UNISTD_H 32 | 33 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 34 | */ 35 | #undef LT_OBJDIR 36 | 37 | /* Define to the address where bug reports for this package should be sent. */ 38 | #undef PACKAGE_BUGREPORT 39 | 40 | /* Define to the full name of this package. */ 41 | #undef PACKAGE_NAME 42 | 43 | /* Define to the full name and version of this package. */ 44 | #undef PACKAGE_STRING 45 | 46 | /* Define to the one symbol short name of this package. */ 47 | #undef PACKAGE_TARNAME 48 | 49 | /* Define to the version of this package. */ 50 | #undef PACKAGE_VERSION 51 | 52 | /* Define to 1 if you have the ANSI C header files. */ 53 | #undef STDC_HEADERS 54 | 55 | /* Define to empty if `const' does not conform to ANSI C. */ 56 | #undef const 57 | -------------------------------------------------------------------------------- /src/window.h: -------------------------------------------------------------------------------- 1 | /* window.h */ 2 | 3 | /* Main program window */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_WINDOW_H 25 | #error 26 | #endif 27 | #define FSV_WINDOW_H 28 | #include "common.h" 29 | enum { 30 | SB_LINEUP = 0, 31 | SB_LINELEFT = 0, 32 | SB_LINEDOWN = 1, 33 | SB_LINERIGHT = 1, 34 | SB_PAGEUP = 2, 35 | SB_PAGELEFT = 2, 36 | SB_PAGEDOWN = 3, 37 | SB_PAGERIGHT = 3, 38 | SB_THUMBPOSITION = 4, 39 | SB_THUMBTRACK = 5, 40 | SB_TOP = 6, 41 | SB_LEFT = 6, 42 | SB_BOTTOM = 7, 43 | SB_RIGHT = 7, 44 | SB_ENDSCROLL = 8 45 | } ScrollBarCommands; 46 | void window_init( FsvMode fsv_mode ); 47 | void window_set_access( boolean enabled ); 48 | #ifdef FSV_COLOR_H 49 | void window_set_color_mode( ColorMode mode ); 50 | #endif 51 | void window_birdseye_view_off( void); 52 | void window_statusbar( int sb_id, const char *message ); 53 | 54 | 55 | /* end window.h */ 56 | -------------------------------------------------------------------------------- /lib/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef _UNISTD_H 2 | #define _UNISTD_H 1 3 | 4 | /* This is intended as a drop-in replacement for unistd.h on Windows. 5 | * Please add functionality as neeeded. 6 | * https://stackoverflow.com/a/826027/1202830 7 | */ 8 | 9 | #include 10 | #include 11 | //#include /* getopt at: https://gist.github.com/ashelly/7776712 */ 12 | #include /* for getpid() and the exec..() family */ 13 | #include /* for _getcwd() and _chdir() */ 14 | 15 | #define srandom srand 16 | #define random rand 17 | 18 | /* Values for the second argument to access. 19 | These may be OR'd together. */ 20 | #define R_OK 4 /* Test for read permission. */ 21 | #define W_OK 2 /* Test for write permission. */ 22 | //#define X_OK 1 /* execute permission - unsupported in windows*/ 23 | #define F_OK 0 /* Test for existence. */ 24 | 25 | #define access _access 26 | #define dup2 _dup2 27 | #define execve _execve 28 | #define ftruncate _chsize 29 | #define unlink _unlink 30 | #define fileno _fileno 31 | #define getcwd _getcwd 32 | #define chdir _chdir 33 | #define isatty _isatty 34 | #define lseek _lseek 35 | /* read, write, and close are NOT being #defined here, because while there are file handle specific versions for Windows, they probably don't work for sockets. You need to look at your app and consider whether to call e.g. closesocket(). */ 36 | 37 | #ifdef _WIN64 38 | #define ssize_t __int64 39 | #else 40 | #define ssize_t long 41 | #endif 42 | 43 | #define STDIN_FILENO 0 44 | #define STDOUT_FILENO 1 45 | #define STDERR_FILENO 2 46 | /* should be in some equivalent to */ 47 | typedef __int8 int8_t; 48 | typedef __int16 int16_t; 49 | typedef __int32 int32_t; 50 | typedef __int64 int64_t; 51 | typedef unsigned __int8 uint8_t; 52 | typedef unsigned __int16 uint16_t; 53 | typedef unsigned __int32 uint32_t; 54 | typedef unsigned __int64 uint64_t; 55 | 56 | #endif /* unistd.h */ -------------------------------------------------------------------------------- /src/xmaps/birdseye_view.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * birdseye_view_xpm[] = { 3 | "24 24 64 1", 4 | " c None", 5 | ". c #110A05", 6 | "+ c #677E8C", 7 | "@ c #BFB7A7", 8 | "# c #A6823F", 9 | "$ c #414337", 10 | "% c #D7D3C9", 11 | "& c #889699", 12 | "* c #7A562C", 13 | "= c #897E70", 14 | "- c #A79C8D", 15 | "; c #708693", 16 | "> c #745E34", 17 | ", c #CA9C5A", 18 | "' c #30281E", 19 | ") c #F2BA74", 20 | "! c #F1E4D9", 21 | "~ c #B0B0AE", 22 | "{ c #777D75", 23 | "] c #5E523A", 24 | "^ c #C2C6CC", 25 | "/ c #E6D5CC", 26 | "( c #836B42", 27 | "_ c #1B1911", 28 | ": c #69828D", 29 | "< c #C7B8A7", 30 | "[ c #BBAE9F", 31 | "} c #150F0A", 32 | "| c #61716F", 33 | "1 c #AD722F", 34 | "2 c #99A19E", 35 | "3 c #B5A48E", 36 | "4 c #79888C", 37 | "5 c #BB924A", 38 | "6 c #C2B19F", 39 | "7 c #363B37", 40 | "8 c #DACCC0", 41 | "9 c #424E48", 42 | "0 c #826432", 43 | "a c #606660", 44 | "b c #8F7547", 45 | "c c #988A6C", 46 | "d c #AA967F", 47 | "e c #9A988A", 48 | "f c #BA7E34", 49 | "g c #7C755F", 50 | "h c #8F6221", 51 | "i c #313126", 52 | "j c #9E825C", 53 | "k c #463820", 54 | "l c #D89C58", 55 | "m c #727267", 56 | "n c #C1C0BC", 57 | "o c #4F5245", 58 | "p c #6E685C", 59 | "q c #A8A499", 60 | "r c #EBDCD3", 61 | "s c #CCC0B2", 62 | "t c #68532D", 63 | "u c #222119", 64 | "v c #768285", 65 | "w c #BA8A44", 66 | "x c #E1D5CC", 67 | "y c #D2CAC0", 68 | "++++++++++++++++++++++++", 69 | "+++++++++4&&&++::+++++++", 70 | "++++:+4~rrrr/%@&:::+++++", 71 | "+++++2xrrr!rxx8n~4::+++:", 72 | "+++vn!!r/r8<@y<3dg{:::::", 73 | "++4y!ry[3d(]'k$]b5,cv:::", 74 | "++^!rs[3-[tk]]t>(,1l,=v:", 75 | ":2rrx<[[[3d0ttbb#5,)l1g:", 76 | ";%//y[666[-(>(##5w,wf10v", 77 | "2x/xs6[@6[63jgtt000hhh*{", 78 | "~x88ss@@6[-=p]$i'oa]ott4", 79 | "nxrxxys<6 30 | #include 31 | 32 | 33 | /* FILETIME of Jan 1 1970 00:00:00. */ 34 | const unsigned __int64 epoch = ((unsigned __int64) 116444736000000000Ui64); 35 | 36 | /* 37 | * timezone information is stored outside the kernel so tzp isn't used anymore. 38 | * 39 | * Note: this function is not for Win32 high precision timing purpose. See 40 | * elapsed_time(). 41 | */ 42 | int 43 | gettimeofday(struct timeval * tp, struct timezone * tzp) 44 | { 45 | FILETIME file_time; 46 | SYSTEMTIME system_time; 47 | ULARGE_INTEGER ularge; 48 | 49 | GetSystemTime(&system_time); 50 | SystemTimeToFileTime(&system_time, &file_time); 51 | ularge.LowPart = file_time.dwLowDateTime; 52 | ularge.HighPart = file_time.dwHighDateTime; 53 | 54 | tp->tv_sec = (long) ((ularge.QuadPart - epoch) / 10000000L); 55 | tp->tv_usec = (long) (system_time.wMilliseconds * 1000); 56 | 57 | return 0; 58 | } -------------------------------------------------------------------------------- /lib/gtkdateedit.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __GTK_DATE_EDIT_H_ 3 | #define __GTK_DATE_EDIT_H_ 4 | 5 | #include 6 | #include 7 | 8 | 9 | G_BEGIN_DECLS 10 | 11 | 12 | typedef enum { 13 | GTK_DATE_EDIT_SHOW_TIME = 1 << 0, 14 | GTK_DATE_EDIT_24_HR = 1 << 1, 15 | GTK_DATE_EDIT_WEEK_STARTS_ON_MONDAY = 1 << 2, 16 | GTK_DATE_EDIT_DISPLAY_SECONDS = 1 << 3 17 | } GtkDateEditFlags; 18 | 19 | 20 | #define GTK_TYPE_DATE_EDIT (gtk_date_edit_get_type ()) 21 | #define GTK_DATE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DATE_EDIT, GtkDateEdit)) 22 | #define GTK_DATE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DATE_EDIT, GtkDateEditClass)) 23 | #define GTK_IS_DATE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATE_EDIT)) 24 | #define GTK_IS_DATE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATE_EDIT)) 25 | #define GTK_DATE_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DATE_EDIT, GtkDateEditClass)) 26 | 27 | 28 | typedef struct _GtkDateEdit GtkDateEdit; 29 | typedef struct _GtkDateEditPrivate GtkDateEditPrivate; 30 | typedef struct _GtkDateEditClass GtkDateEditClass; 31 | 32 | struct _GtkDateEdit { 33 | GtkHBox hbox; 34 | 35 | /*< private >*/ 36 | GtkDateEditPrivate *_priv; 37 | }; 38 | 39 | struct _GtkDateEditClass { 40 | GtkHBoxClass parent_class; 41 | 42 | void (*date_changed) (GtkDateEdit *gde); 43 | void (*time_changed) (GtkDateEdit *gde); 44 | 45 | /* Padding for possible expansion */ 46 | gpointer padding1; 47 | gpointer padding2; 48 | }; 49 | 50 | GType gtk_date_edit_get_type (void) G_GNUC_CONST; 51 | 52 | GtkWidget *gtk_date_edit_new (time_t the_time, 53 | gboolean show_time, 54 | gboolean use_24_format); 55 | 56 | void gtk_date_edit_set_time (GtkDateEdit *gde, time_t the_time); 57 | time_t gtk_date_edit_get_time (GtkDateEdit *gde); 58 | 59 | time_t gtk_date_edit_get_initial_time(GtkDateEdit *gde); 60 | 61 | #ifndef GTK_DISABLE_DEPRECATED 62 | time_t gtk_date_edit_get_date (GtkDateEdit *gde); 63 | #endif /* GTK_DISABLE_DEPRECATED */ 64 | 65 | G_END_DECLS 66 | 67 | #endif -------------------------------------------------------------------------------- /src/animation.h: -------------------------------------------------------------------------------- 1 | /* animation.h */ 2 | 3 | /* Animation control */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_ANIMATION_H 25 | #error 26 | #endif 27 | #define FSV_ANIMATION_H 28 | 29 | 30 | typedef enum { 31 | MORPH_LINEAR, 32 | MORPH_QUADRATIC, 33 | MORPH_INV_QUADRATIC, 34 | MORPH_SIGMOID, 35 | MORPH_SIGMOID_ACCEL 36 | } MorphType; 37 | 38 | typedef struct _ScheduledEvent ScheduledEvent; 39 | struct _ScheduledEvent { 40 | /* Wait for these many frames to elapse... */ 41 | int nframes; 42 | /* ...and then call this function... */ 43 | void (*event_cb)( void * ); 44 | /* ...with this arbitrary data pointer. */ 45 | void *data; 46 | }; 47 | 48 | typedef struct _Morph Morph; 49 | struct _Morph { 50 | MorphType type; /* Type of morph */ 51 | double *var; /* The variable */ 52 | double start_value; /* Initial value for variable */ 53 | double end_value; /* Target value for variable */ 54 | double t_start; /* Starting time */ 55 | double t_end; /* Ending time */ 56 | /* Step callback is called after every incremental update 57 | * except the last one */ 58 | void (*step_cb)( Morph * ); 59 | /* End callback is called after the last update */ 60 | void (*end_cb)( Morph * ); 61 | void *data; /* Arbitrary data pointer */ 62 | Morph *next; /* Next morph (for chaining) */ 63 | }; 64 | 65 | 66 | void schedule_event( void (*event_cb)( ), void *data, int nframes ); 67 | void morph_full( double *var, MorphType type, double target_value, double duration, void (*step_cb)( Morph * ), void (*end_cb)( Morph * ), void *data ); 68 | void morph( double *var, MorphType type, double target_value, double duration ); 69 | void morph_finish( double *var ); 70 | void morph_break( double *var ); 71 | void redraw( void ); 72 | 73 | 74 | /* end animation.h */ 75 | -------------------------------------------------------------------------------- /src/callbacks.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | void 5 | on_file_change_root_activate (GtkMenuItem *menuitem, 6 | gpointer user_data); 7 | 8 | void 9 | on_file_save_settings_activate (GtkMenuItem *menuitem, 10 | gpointer user_data); 11 | 12 | void 13 | on_file_save_settings_activate (GtkMenuItem *menuitem, 14 | gpointer user_data); 15 | 16 | void 17 | on_file_exit_activate (GtkMenuItem *menuitem, 18 | gpointer user_data); 19 | 20 | void 21 | on_vis_mapv_activate (GtkMenuItem *menuitem, 22 | gpointer user_data); 23 | 24 | void 25 | on_vis_treev_activate (GtkMenuItem *menuitem, 26 | gpointer user_data); 27 | 28 | void 29 | on_vis_discv_activate (GtkMenuItem *menuitem, 30 | gpointer user_data); 31 | 32 | void 33 | on_color_by_nodetype_activate (GtkMenuItem *menuitem, 34 | gpointer user_data); 35 | 36 | void 37 | on_color_by_timestamp_activate (GtkMenuItem *menuitem, 38 | gpointer user_data); 39 | 40 | void 41 | on_color_by_wildcards_activate (GtkMenuItem *menuitem, 42 | gpointer user_data); 43 | 44 | void 45 | on_color_setup_activate (GtkMenuItem *menuitem, 46 | gpointer user_data); 47 | 48 | void 49 | on_help_contents_activate (GtkMenuItem *menuitem, 50 | gpointer user_data); 51 | 52 | void 53 | on_help_about_fsv_activate (GtkMenuItem *menuitem, 54 | gpointer user_data); 55 | 56 | void 57 | on_back_button_clicked (GtkButton *button, 58 | gpointer user_data); 59 | 60 | void 61 | on_cd_root_button_clicked (GtkButton *button, 62 | gpointer user_data); 63 | 64 | void 65 | on_cd_up_button_clicked (GtkButton *button, 66 | gpointer user_data); 67 | 68 | void 69 | on_birdseye_view_togglebutton_toggled (GtkToggleButton *togglebutton, 70 | gpointer user_data); 71 | -------------------------------------------------------------------------------- /src/xmaps/regfile.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * regfile_xpm[] = { 3 | "32 32 69 1", 4 | " c None", 5 | ". c #020204", 6 | "+ c #D2C694", 7 | "@ c #FEFAD0", 8 | "# c #FEFED7", 9 | "$ c #D2CE8E", 10 | "% c #CDBF90", 11 | "& c #FEFEE6", 12 | "* c #FEFEDE", 13 | "= c #E4E09C", 14 | "- c #BCA278", 15 | "; c #FEFADE", 16 | "> c #FEFAB2", 17 | ", c #FEFEF4", 18 | "' c #FEFEED", 19 | ") c #FEFED0", 20 | "! c #FAF6B2", 21 | "~ c #F6F3E6", 22 | "{ c #FEFEC8", 23 | "] c #FEFEBA", 24 | "^ c #FAFABA", 25 | "/ c #FAFAF4", 26 | "( c #FEFEC1", 27 | "_ c #FEFEB2", 28 | ": c #FEFEAB", 29 | "< c #FAEFB2", 30 | "[ c #D9D25A", 31 | "} c #FEFEFC", 32 | "| c #FAF39C", 33 | "1 c #A59E3D", 34 | "2 c #FEFEAF", 35 | "3 c #777627", 36 | "4 c #CDBF8A", 37 | "5 c #F6F39C", 38 | "6 c #E0DD78", 39 | "7 c #FEF69C", 40 | "8 c #E8E89C", 41 | "9 c #FEFAA1", 42 | "0 c #EBE89C", 43 | "a c #FEFAC1", 44 | "b c #FAF3A4", 45 | "c c #E4E069", 46 | "d c #7A792A", 47 | "e c #BFBC53", 48 | "f c #D5C195", 49 | "g c #FEFEA4", 50 | "h c #FEFAA4", 51 | "i c #EBE886", 52 | "j c #84812E", 53 | "k c #EFE47F", 54 | "l c #FEFE9C", 55 | "m c #D5D269", 56 | "n c #BFB444", 57 | "o c #F6EB7F", 58 | "p c #FEFA95", 59 | "q c #C3B84C", 60 | "r c #E8E87F", 61 | "s c #F6F386", 62 | "t c #E0D278", 63 | "u c #FEFE95", 64 | "v c #E4D569", 65 | "w c #EFE895", 66 | "x c #DAD566", 67 | "y c #F6E886", 68 | "z c #FEFE8E", 69 | "A c #A2A236", 70 | "B c #FEEF95", 71 | "C c #1A1A04", 72 | "D c #161604", 73 | " .. ", 74 | " .+.. ", 75 | " .@#$... ", 76 | " .%&**=$-.... ", 77 | " .@&*;##&#>%-.... ", 78 | " .%,'&&&**##*)!=$-... ", 79 | " .~,'''&&*##)){]]^=$-..", 80 | " ./',''&&&*#){{(]__:<[.", 81 | " .%},,,,'&**#)){(]]_:|1.", 82 | " .;,}}},,'&*#){{(]__:23.", 83 | " .4,,}}},'&&*#)){((___5. ", 84 | " .&,',,,,'&**#){{(]_:>6. ", 85 | " .4,&',,,''&&*#))(((_]7[. ", 86 | " .*&&&''&&&**##{)(]]__81. ", 87 | " .@**&&&&&&**##)){((]__93. ", 88 | " .%###**&&&***#){{((]_:_0. ", 89 | " .)))######*#)){)((]]_:a[. ", 90 | " .4{{{))#####))){{(]]__:b1. ", 91 | " .4{(({{))){){)){(((]__:_cd. ", 92 | " .]](({({{{{{{{({(]]]_::>e. ", 93 | " .f]_]]]((({{{(((]]]]_::gh1.. ", 94 | " .%!::_]]](]]((((]]__::gggid....", 95 | ".jk:_:_____]]]_]_]__:::gllm.....", 96 | " ..noh::_________:_::ggglpe.... ", 97 | " ..qrg_:::::::::ggggllgs1... ", 98 | " ..nto>:::gggggllllulc3... ", 99 | " ...nvw7:gggllluuus1... ", 100 | " ...nxy:gluuzzp[3.. ", 101 | " ...nvrplupsA.. ", 102 | " ...nxrBx3. ", 103 | " CD.Ad. ", 104 | " .. "}; 105 | -------------------------------------------------------------------------------- /src/xmaps/chardev.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * chardev_xpm[] = { 3 | "32 32 70 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #C2C2C2", 7 | "@ c #FFFFFF", 8 | "# c #C1C1C1", 9 | "$ c #EDEDED", 10 | "% c #E9E9E9", 11 | "& c #E6E6E6", 12 | "* c #E3E3E3", 13 | "= c #E0E0E0", 14 | "- c #DDDDDD", 15 | "; c #DADADA", 16 | "> c #D7D7D7", 17 | ", c #D3D3D3", 18 | "' c #D0D0D0", 19 | ") c #CDCDCD", 20 | "! c #CACACA", 21 | "~ c #C7C7C7", 22 | "{ c #C4C4C4", 23 | "] c #BDBDBD", 24 | "^ c #BABABA", 25 | "/ c #B7B7B7", 26 | "( c #808080", 27 | "_ c #EAEAEA", 28 | ": c #666664", 29 | "< c #4A4A4C", 30 | "[ c #565656", 31 | "} c #B5B5B5", 32 | "| c #E8E8E8", 33 | "1 c #1F1F1F", 34 | "2 c #FDFDFA", 35 | "3 c #B3B3B3", 36 | "4 c #B0B0B0", 37 | "5 c #252525", 38 | "6 c #AEAEAE", 39 | "7 c #E1E1E1", 40 | "8 c #ACACAC", 41 | "9 c #DFDFDF", 42 | "0 c #AAAAAA", 43 | "a c #A7A7A7", 44 | "b c #A5A5A5", 45 | "c c #D8D8D8", 46 | "d c #A3A3A3", 47 | "e c #D6D6D6", 48 | "f c #A0A0A0", 49 | "g c #D4D4D4", 50 | "h c #9E9E9E", 51 | "i c #D1D1D1", 52 | "j c #CECECE", 53 | "k c #CBCBCB", 54 | "l c #C8C8C8", 55 | "m c #C5C5C5", 56 | "n c #BEBEBE", 57 | "o c #BBBBBB", 58 | "p c #B8B8B8", 59 | "q c #B2B2B2", 60 | "r c #AFAFAF", 61 | "s c #A8A8A8", 62 | "t c #A2A2A2", 63 | "u c #9F9F9F", 64 | "v c #9C9C9C", 65 | "w c #FF6161", 66 | "x c #A73634", 67 | "y c #AA9334", 68 | "z c #FFDF54", 69 | "A c #FF4949", 70 | "B c #8C1F18", 71 | "C c #E04725", 72 | "D c #FF3030", 73 | "E c #8C1513", 74 | " ", 75 | " ", 76 | " ", 77 | " .................... ", 78 | " .+@@@@@@@@@@@@@@@@@@#. ", 79 | " .@$%&*=-;>,')!~{#]^/(. ", 80 | " .@_:<<<<<<<<<<<<<<[}(. ", 81 | " .@|<.1............23(. ", 82 | " .@&<.@............24(. ", 83 | " .@*<..@.5.........26(. ", 84 | " .@7<.@..@@........28(. ", 85 | " .@9<..............20(. ", 86 | " .@-<..............2a(. ", 87 | " .@;<..............2b(. ", 88 | " .@c<..............2d(. ", 89 | " .@e<..............2f(. ", 90 | " .@g<222222222222222h(. ", 91 | " .@ijklm+nop}qr8sbtuv(. ", 92 | " .#(((((((((((((((((((. ", 93 | " .................... ", 94 | " .. ", 95 | " .. ", 96 | " ... ", 97 | " .. ", 98 | " .. ... ", 99 | " ....wxyz ", 100 | " ..AABC. ", 101 | " .DEyz ", 102 | " ... ", 103 | " ", 104 | " ", 105 | " "}; 106 | -------------------------------------------------------------------------------- /src/fnmatch.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1992, 1993 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by the University of 16 | * California, Berkeley and its contributors. 17 | * 4. Neither the name of the University nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software 19 | * without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93 34 | * 35 | * From FreeBSD fnmatch.h 1.7 36 | * $Id: fnmatch.h,v 1.4 2001/10/04 02:46:21 jdp Exp $ 37 | */ 38 | 39 | #ifndef _FNMATCH_H_ 40 | #define _FNMATCH_H_ 41 | 42 | #define FNM_NOMATCH 1 /* Match failed. */ 43 | 44 | #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ 45 | #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ 46 | #define FNM_PERIOD 0x04 /* Period must be matched by period. */ 47 | #define FNM_LEADING_DIR 0x08 /* Ignore / after Imatch. */ 48 | #define FNM_CASEFOLD 0x10 /* Case insensitive search. */ 49 | #define FNM_PREFIX_DIRS 0x20 /* Directory prefixes of pattern match too. */ 50 | 51 | /* Make this compile successfully with "gcc -traditional" */ 52 | #ifndef __STDC__ 53 | #define const /* empty */ 54 | #endif 55 | 56 | int fnmatch(const char *, const char *, int); 57 | 58 | #endif /* !_FNMATCH_H_ */ -------------------------------------------------------------------------------- /intl/po2tbl.sed.in: -------------------------------------------------------------------------------- 1 | # po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets 2 | # Copyright (C) 1995 Free Software Foundation, Inc. 3 | # Ulrich Drepper , 1995. 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2, or (at your option) 8 | # any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 | # 19 | 1 { 20 | i\ 21 | /* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ 22 | \ 23 | #if HAVE_CONFIG_H\ 24 | # include \ 25 | #endif\ 26 | \ 27 | #include "libgettext.h"\ 28 | \ 29 | const struct _msg_ent _msg_tbl[] = { 30 | h 31 | s/.*/0/ 32 | x 33 | } 34 | # 35 | # Write msgid entries in C array form. 36 | # 37 | /^msgid/ { 38 | s/msgid[ ]*\(".*"\)/ {\1/ 39 | tb 40 | # Append the next line 41 | :b 42 | N 43 | # Look whether second part is continuation line. 44 | s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ 45 | # Yes, then branch. 46 | ta 47 | # Because we assume that the input file correctly formed the line 48 | # just read cannot be again be a msgid line. So it's safe to ignore 49 | # it. 50 | s/\(.*\)\n.*/\1/ 51 | bc 52 | # We found a continuation line. But before printing insert '\'. 53 | :a 54 | s/\(.*\)\(\n.*\)/\1\\\2/ 55 | P 56 | # We cannot use D here. 57 | s/.*\n\(.*\)/\1/ 58 | # Some buggy seds do not clear the `successful substitution since last ``t''' 59 | # flag on `N', so we do a `t' here to clear it. 60 | tb 61 | # Not reached 62 | :c 63 | x 64 | # The following nice solution is by 65 | # Bruno 66 | td 67 | # Increment a decimal number in pattern space. 68 | # First hide trailing `9' digits. 69 | :d 70 | s/9\(_*\)$/_\1/ 71 | td 72 | # Assure at least one digit is available. 73 | s/^\(_*\)$/0\1/ 74 | # Increment the last digit. 75 | s/8\(_*\)$/9\1/ 76 | s/7\(_*\)$/8\1/ 77 | s/6\(_*\)$/7\1/ 78 | s/5\(_*\)$/6\1/ 79 | s/4\(_*\)$/5\1/ 80 | s/3\(_*\)$/4\1/ 81 | s/2\(_*\)$/3\1/ 82 | s/1\(_*\)$/2\1/ 83 | s/0\(_*\)$/1\1/ 84 | # Convert the hidden `9' digits to `0's. 85 | s/_/0/g 86 | x 87 | G 88 | s/\(.*\)\n\([0-9]*\)/\1, \2},/ 89 | s/\(.*\)"$/\1/ 90 | p 91 | } 92 | # 93 | # Last line. 94 | # 95 | $ { 96 | i\ 97 | };\ 98 | 99 | g 100 | s/0*\(.*\)/int _msg_tbl_length = \1;/p 101 | } 102 | d 103 | -------------------------------------------------------------------------------- /gtkgl/gtkgl/gtkglarea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1997-1998 Janne Löf 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free 16 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | 20 | #ifndef __GTK_GL_AREA_H__ 21 | #define __GTK_GL_AREA_H__ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define GTK_TYPE_GL_AREA (gtk_gl_area_get_type()) 31 | #define GTK_GL_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_GL_AREA, GtkGLArea)) 32 | #define GTK_GL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GTK_TYPE_GL_AREA, GtkGLAreaClass)) 33 | #define GTK_IS_GL_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_GL_AREA)) 34 | #define GTK_IS_GL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GL_AREA)) 35 | #define GTK_GL_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_GL_AREA, GtkGLArea)) 36 | 37 | 38 | typedef struct _GtkGLArea GtkGLArea; 39 | typedef struct _GtkGLAreaClass GtkGLAreaClass; 40 | 41 | 42 | struct _GtkGLArea 43 | { 44 | GtkDrawingArea darea; 45 | GdkGLContext *glcontext; 46 | }; 47 | 48 | struct _GtkGLAreaClass 49 | { 50 | GtkDrawingAreaClass parent_class; 51 | }; 52 | 53 | GType gtk_gl_area_get_type (void); 54 | GtkWidget* gtk_gl_area_new (int *attrList); 55 | GtkWidget* gtk_gl_area_share_new (int *attrList, 56 | GtkGLArea *share); 57 | GtkWidget* gtk_gl_area_new_vargs (GtkGLArea *share, 58 | ...); 59 | 60 | 61 | gint gtk_gl_area_make_current(GtkGLArea *glarea); 62 | 63 | void gtk_gl_area_endgl (GtkGLArea *glarea); /* deprecated */ 64 | 65 | void gtk_gl_area_swap_buffers(GtkGLArea *glarea); 66 | 67 | 68 | #ifndef GTKGL_DISABLE_DEPRECATED 69 | 70 | # define gtk_gl_area_begingl(glarea) \ 71 | gtk_gl_area_make_current(glarea) 72 | # define gtk_gl_area_endgl(glarea) \ 73 | glFlush() 74 | # define gtk_gl_area_swapbuffers(glarea) \ 75 | gtk_gl_area_swap_buffers(glarea) 76 | # define gtk_gl_area_size(glarea, width, height) \ 77 | gtk_widget_set_size_request(GTK_WIDGET(glarea), (width), (height)) 78 | 79 | #endif 80 | 81 | G_END_DECLS 82 | 83 | #endif /* __GTK_GL_AREA_H__ */ 84 | -------------------------------------------------------------------------------- /src/color.h: -------------------------------------------------------------------------------- 1 | /* color.h */ 2 | 3 | /* Node coloration */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_COLOR_H 25 | #error 26 | #endif 27 | #define FSV_COLOR_H 28 | 29 | 30 | /* The various coloring modes */ 31 | typedef enum { 32 | COLOR_BY_NODETYPE, 33 | COLOR_BY_TIMESTAMP, 34 | COLOR_BY_WPATTERN, 35 | COLOR_NONE 36 | } ColorMode; 37 | 38 | /* Every file has three timestamps */ 39 | typedef enum { 40 | TIMESTAMP_ACCESS, /* atime - time of last access */ 41 | TIMESTAMP_MODIFY, /* mtime - time of last modification */ 42 | TIMESTAMP_ATTRIB, /* ctime - time of last attribute change */ 43 | TIMESTAMP_NONE 44 | } TimeStampType; 45 | 46 | /* Various kinds of spectrums */ 47 | typedef enum { 48 | SPECTRUM_RAINBOW, 49 | SPECTRUM_HEAT, 50 | SPECTRUM_GRADIENT, 51 | SPECTRUM_NONE 52 | } SpectrumType; 53 | 54 | 55 | /* Used indirectly in struct ColorConfig (see below) */ 56 | struct WPatternGroup { 57 | RGBcolor color; 58 | GList *wp_list; /* elements: char * */ 59 | }; 60 | 61 | struct ColorConfig { 62 | /* Node type colors */ 63 | struct ColorByNodeType { 64 | RGBcolor colors[NUM_NODE_TYPES]; 65 | } by_nodetype; 66 | 67 | /* Temporal spectrum type and range */ 68 | struct ColorByTime { 69 | SpectrumType spectrum_type; 70 | TimeStampType timestamp_type; 71 | time_t new_time; 72 | time_t old_time; 73 | /* Following two are for gradient spectrums */ 74 | RGBcolor old_color; 75 | RGBcolor new_color; 76 | } by_timestamp; 77 | 78 | /* Wildcard patterns */ 79 | struct ColorByWPattern { 80 | GList *wpgroup_list; /* elements: struct WPatternGroup */ 81 | RGBcolor default_color; 82 | } by_wpattern; 83 | }; 84 | 85 | 86 | void color_config_destroy( struct ColorConfig *ccfg ); 87 | ColorMode color_get_mode( void ); 88 | void color_get_config( struct ColorConfig *ccfg ); 89 | void color_assign_recursive( GNode *dnode ); 90 | void color_set_mode( ColorMode mode ); 91 | RGBcolor color_spectrum_color( SpectrumType type, double x, void *data ); 92 | void color_set_config( struct ColorConfig *new_ccfg, ColorMode mode ); 93 | void color_write_config( void ); 94 | void color_init( void ); 95 | 96 | 97 | /* end color.h */ 98 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 1999 Jan 27 2 | 3 | * Put content in README and INSTALL. 4 | 5 | * Write NVStore/uXML backend (or find a suitable existing one) to store 6 | configuration parameters in ~/.fsvrc. 7 | 8 | (The rc file should use XML formatting, but I don't want fsv to link 9 | against libxml/expat to do this-- those libs are overkill. uXML is a tiny 10 | yacc/lex-based XML I/O library I started writing for just this purpose, 11 | but that will take some time to mature. Anyone know of a good, clean, <50K 12 | DOM-based XML parser/generator library for C?) 13 | 14 | * Rewrite the MapV layout algorithm. Currently, it works, but doesn't 15 | generate very optimal layouts-- some nodes are too wide, some too tall, 16 | and the ones in the frontmost row/rows invariably turn out paper-thin. 17 | 18 | I've discussed an alternate approach with a friend of mine (hi Louis!), 19 | one heuristically based that would run slightly slower but give much 20 | better (even if not provably optimal) solutions. I'm definitely open to 21 | ideas here. It's a rather tricky CS problem. 22 | 23 | * Implement a somewhat smarter node pointing/selection handler for faraway 24 | nodes (e.g. when in bird's-eye view mode). Right now, it gives you exactly 25 | the node that is under the cursor's hotspot-- even if it's so small you 26 | can barely see it. fsv should instead return an ancestor node, that is 27 | larger than a set pixel-based minimum. 28 | 29 | * Replace the bulk of GTK+ cruft (see dialog.c/gui.c/window.c) with 30 | Glade-generated code, to improve view abstraction. All of the main 31 | window's callbacks have already been moved into callbacks.[hc]. Still need 32 | to figure out 1) if/how Glade can handle compiled-in XPM's; 2) how to set 33 | up the GtkGLArea widget, which isn't directly supported; 3) how to specify 34 | the minimum window size as a proportion of screen width (as opposed to 35 | giving absolute pixel dimensions-- ick!) 36 | 37 | * Implement a better way of bringing up the online help. I'm almost 38 | embarrassed by the cheap /bin/sh hack currently employed :] (Not to 39 | mention it leaves zombie processes hanging around until the main program 40 | terminates-- bad bad bad!) 41 | 42 | * Perhaps add scan caching. This would store the complete state of a 43 | directory tree (say, /usr/lib as an example) in ~/.fsvcache/@usr@lib, and 44 | the next time fsv is invoked there, it loads the cache and skims through 45 | all the subdirectories, only scanning those with an updated timestamp. 46 | (Result: much faster loading of '/' and the like) 47 | 48 | ColorByTimestamp mode could take the time of the previous scan as the 49 | start point of the temporal spectrum, allowing something of a "graphical 50 | diff" on the state of the filesystem. 51 | 52 | * Add a way to have fsv not scan certain directories, such as top-level 53 | AFS mount points (stat'ing those can take *centuries*) 54 | 55 | * Oh, and did I mention I'm taking 6.170 this semester...? :-) Some of the 56 | core modules (camera.c/geometry.c) could probably stand some improvement, 57 | and by the time summer comes around, I should have a good idea how! 58 | -------------------------------------------------------------------------------- /doc/about.html: -------------------------------------------------------------------------------- 1 | About fsv

About fsv

fsv - 3D File System Visualizer

http://fox.mit.edu/skunk/soft/fsv/

Copyright ©1999 Daniel Richard G.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser 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

-------------------------------------------------------------------------------- /lib/nvstore.h: -------------------------------------------------------------------------------- 1 | /* nvstore.h */ 2 | 3 | /* Nonvolatile storage library */ 4 | 5 | /* Copyright (C)1999 Daniel Richard G. 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a 8 | * copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject to 13 | * the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included 16 | * in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | 27 | 28 | #ifdef __NVSTORE_H__ 29 | #error ** multiple inclusion ** 30 | #else 31 | #define __NVSTORE_H__ 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | 38 | /* Boolean type used by NVStore */ 39 | #define NVS_BOOL int 40 | 41 | 42 | /* NVStore instance (opaque type) */ 43 | typedef struct _NVStore NVStore; 44 | struct _NVStore; 45 | 46 | 47 | NVStore * nvs_open ( const char *filename ); 48 | NVS_BOOL nvs_close ( NVStore *nvs ); 49 | 50 | void nvs_change_path ( NVStore *nvs, const char *path ); 51 | void nvs_delete_recursive ( NVStore *nvs, const char *path ); 52 | void nvs_vector_begin ( NVStore *nvs ); 53 | void nvs_vector_end ( NVStore *nvs ); 54 | 55 | NVS_BOOL nvs_path_present ( NVStore *nvs, const char *path ); 56 | 57 | NVS_BOOL nvs_read_boolean ( NVStore *nvs, const char *path ); 58 | int nvs_read_int ( NVStore *nvs, const char *path ); 59 | int nvs_read_int_token ( NVStore *nvs, const char *path, const char **tokens ); 60 | double nvs_read_float ( NVStore *nvs, const char *path ); 61 | char * nvs_read_string ( NVStore *nvs, const char *path ); 62 | 63 | NVS_BOOL nvs_read_boolean_default ( NVStore *nvs, const char *path, NVS_BOOL default_val ); 64 | int nvs_read_int_default ( NVStore *nvs, const char *path, int default_val ); 65 | int nvs_read_int_token_default ( NVStore *nvs, const char *path, const char **tokens, int default_val ); 66 | double nvs_read_float_default ( NVStore *nvs, const char *path, double default_val ); 67 | char * nvs_read_string_default ( NVStore *nvs, const char *path, const char *default_string ); 68 | 69 | void nvs_write_boolean ( NVStore *nvs, const char *path, NVS_BOOL val ); 70 | void nvs_write_int ( NVStore *nvs, const char *path, int val ); 71 | void nvs_write_int_token ( NVStore *nvs, const char *path, int val, const char **tokens ); 72 | void nvs_write_float ( NVStore *nvs, const char *path, double val ); 73 | void nvs_write_string ( NVStore *nvs, const char *path, const char *string ); 74 | 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif /* not __NVSTORE_H__ */ 81 | 82 | 83 | /* end nvstore.h */ 84 | -------------------------------------------------------------------------------- /doc/fsv.html: -------------------------------------------------------------------------------- 1 | fsv - 3D File System Visualizer

fsv - 3D File System Visualizer

Daniel Richard G.


Introduction

fsv offers an intuitive, visual means of overviewing the layout and content of a file system. It translates a mass of information about files and directories (such as relative sizes) into geometry, constructing a 3D representation which can be easily viewed and manipulated. Each distinct file system entity, or node-- be it a file, directory, symbolic link, device interface, etc.-- is given a geometric counterpart with representational properties.

fsv's user interface consists of two main components: 92 | 93 |

115 | 116 | The functionality of these are closely linked together, for a simple yet flexible means of browsing the file system.

-------------------------------------------------------------------------------- /doc/t1.html: -------------------------------------------------------------------------------- 1 | fsv - 3D File System Visualizer

fsv - 3D File System Visualizer

Daniel Richard G.


Introduction

fsv offers an intuitive, visual means of overviewing the layout and content of a file system. It translates a mass of information about files and directories (such as relative sizes) into geometry, constructing a 3D representation which can be easily viewed and manipulated. Each distinct file system entity, or node-- be it a file, directory, symbolic link, device interface, etc.-- is given a geometric counterpart with representational properties.

fsv's user interface consists of two main components: 92 | 93 |

115 | 116 | The functionality of these are closely linked together, for a simple yet flexible means of browsing the file system.

-------------------------------------------------------------------------------- /lib/scandir.c: -------------------------------------------------------------------------------- 1 | /* This file is a slightly edited amalgamation of the files: 2 | * 3 | * dirent/scandir.c 4 | * dirent/alphasort.c 5 | * 6 | * from the glibc-2.1.2 distribution. */ 7 | 8 | /* Copyright (C) 1992, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. 9 | This file is part of the GNU C Library. 10 | 11 | The GNU C Library is free software; you can redistribute it and/or 12 | modify it under the terms of the GNU Library General Public License as 13 | published by the Free Software Foundation; either version 2 of the 14 | License, or (at your option) any later version. 15 | 16 | The GNU C Library is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 | Library General Public License for more details. 20 | 21 | You should have received a copy of the GNU Library General Public 22 | License along with the GNU C Library; see the file COPYING.LIB. If not, 23 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 | Boston, MA 02111-1307, USA. */ 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name)) 32 | #define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \ 33 | _D_EXACT_NAMLEN (d) + 1) 34 | 35 | #ifndef _MSC_VER 36 | int 37 | scandir (dir, namelist, select, cmp) 38 | const char *dir; 39 | struct dirent ***namelist; 40 | int (*select) (const struct dirent *); 41 | int (*cmp) (const void *, const void *); 42 | { 43 | DIR *dp = opendir (dir); 44 | struct dirent **v = NULL; 45 | size_t vsize = 0, i; 46 | struct dirent *d; 47 | int save; 48 | 49 | if (dp == NULL) 50 | return -1; 51 | 52 | save = errno; 53 | errno = 0; 54 | 55 | i = 0; 56 | while ((d = readdir (dp)) != NULL) 57 | if (select == NULL || (*select) (d)) 58 | { 59 | struct dirent *vnew; 60 | size_t dsize; 61 | 62 | /* Ignore errors from select or readdir */ 63 | errno = 0; 64 | 65 | if (i == vsize) 66 | { 67 | struct dirent **new; 68 | if (vsize == 0) 69 | vsize = 10; 70 | else 71 | vsize *= 2; 72 | new = (struct dirent **) realloc (v, vsize * sizeof (*v)); 73 | if (new == NULL) 74 | break; 75 | v = new; 76 | } 77 | 78 | dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d; 79 | vnew = (struct dirent *) malloc (dsize); 80 | if (vnew == NULL) 81 | break; 82 | 83 | v[i++] = (struct dirent *) memcpy (vnew, d, dsize); 84 | } 85 | 86 | if (errno != 0) 87 | { 88 | save = errno; 89 | (void) closedir (dp); 90 | while (i > 0) 91 | free (v[--i]); 92 | free (v); 93 | errno = save; 94 | return -1; 95 | } 96 | 97 | (void) closedir (dp); 98 | errno = save; 99 | 100 | /* Sort the list if we have a comparison function to sort with. */ 101 | if (cmp != NULL) 102 | qsort (v, i, sizeof (*v), cmp); 103 | *namelist = v; 104 | return i; 105 | } 106 | 107 | 108 | int 109 | alphasort (const void *a, const void *b) 110 | { 111 | return strcoll ((*(const struct dirent **) a)->d_name, 112 | (*(const struct dirent **) b)->d_name); 113 | } 114 | #endif /* _MSC_VER */ 115 | -------------------------------------------------------------------------------- /src/camera.h: -------------------------------------------------------------------------------- 1 | /* camera.h */ 2 | 3 | /* Camera control */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_CAMERA_H 25 | #error 26 | #endif 27 | #define FSV_CAMERA_H 28 | 29 | 30 | /* Standard near-clip-to-camera and far-to-near-clip distance ratios */ 31 | #define NEAR_TO_DISTANCE_RATIO 0.5 32 | #define FAR_TO_NEAR_RATIO 128.0 33 | 34 | 35 | /* Camera type casts */ 36 | #define CAMERA(cam) ((Camera *)(cam)) 37 | #define DISCV_CAMERA(cam) ((DiscVCamera *)(cam)) 38 | #define MAPV_CAMERA(cam) ((MapVCamera *)(cam)) 39 | #define TREEV_CAMERA(cam) ((TreeVCamera *)(cam)) 40 | 41 | 42 | /* Base camera definition */ 43 | typedef struct _Camera Camera; 44 | struct _Camera { 45 | double theta; /* Heading */ 46 | double phi; /* Elevation */ 47 | double distance; /* Distance between camera and target */ 48 | double fov; /* Field of view, in degrees */ 49 | double near_clip; /* Clipping plane distances */ 50 | double far_clip; 51 | double pan_part; /* Camera pan fraction (always in [0, 1]) */ 52 | boolean manual_control; /* TRUE when camera is under manual control */ 53 | }; 54 | 55 | /* DiscV mode camera */ 56 | typedef struct _DiscVCamera DiscVCamera; 57 | struct _DiscVCamera { 58 | Camera camera; 59 | XYvec target; 60 | }; 61 | 62 | /* MapV mode camera */ 63 | typedef struct _MapVCamera MapVCamera; 64 | struct _MapVCamera { 65 | Camera camera; 66 | XYZvec target; 67 | }; 68 | 69 | /* TreeV mode camera */ 70 | typedef struct _TreeVCamera TreeVCamera; 71 | struct _TreeVCamera { 72 | Camera camera; 73 | RTZvec target; 74 | }; 75 | 76 | /* Generalized camera type */ 77 | union AnyCamera { 78 | Camera camera; 79 | DiscVCamera discv_camera; 80 | MapVCamera mapv_camera; 81 | TreeVCamera treev_camera; 82 | }; 83 | 84 | 85 | /* The camera */ 86 | extern Camera *camera; 87 | 88 | 89 | boolean camera_moving( void ); 90 | void camera_init( FsvMode mode, boolean initial_view ); 91 | #ifdef __GTK_H__ 92 | void camera_pass_scrollbar_widgets( GtkWidget *x_scrollbar_w, GtkWidget *y_scrollbar_w ); 93 | #endif 94 | void camera_update_scrollbars( boolean hard_update ); 95 | void camera_pan_finish( void ); 96 | void camera_pan_break( void ); 97 | #ifdef FSV_ANIMATION_H 98 | void camera_look_at_full( GNode *node, MorphType mtype, double pan_time_override ); 99 | #endif 100 | void camera_look_at( GNode *node ); 101 | void camera_treev_lpan_look_at( GNode *node, double pan_time_override ); 102 | void camera_look_at_previous( void ); 103 | void camera_birdseye_view( boolean going_up ); 104 | void camera_dolly( double dk ); 105 | void camera_revolve( double dtheta, double dphi ); 106 | 107 | 108 | /* end camera.h */ 109 | -------------------------------------------------------------------------------- /doc/mouse.html: -------------------------------------------------------------------------------- 1 | Using the mouse

Using the mouse

fsv's user interface relies heavily on the mouse. Mouse functionality differs only slightly between the left and right panes of the main program window.

In the directory tree / file list area (left pane):

  • The left button selects a node entry.

  • The middle button doesn't do anything.

  • The right button brings up a context-sensitive menu for a node entry.

In the graphical viewport area (right pane):

  • The left button selects a node, and sends the camera toward it.

  • The middle button dollies the camera forward or backward. (click & drag)

  • The right button brings up a context-sensitive menu for a node.

-------------------------------------------------------------------------------- /po/cat-id-tbl.c: -------------------------------------------------------------------------------- 1 | /* Automatically generated by po2tbl.sed from fsv.pot. */ 2 | 3 | #if HAVE_CONFIG_H 4 | # include 5 | #endif 6 | 7 | #include "libgettext.h" 8 | 9 | const struct _msg_ent _msg_tbl[] = { 10 | {"", 1}, 11 | {"Directory", 2}, 12 | {"Regular file", 3}, 13 | {"Symbolic link", 4}, 14 | {"Named pipe (FIFO)", 5}, 15 | {"Network socket", 6}, 16 | {"Character device", 7}, 17 | {"Block device", 8}, 18 | {"Unknown", 9}, 19 | {"Directories", 10}, 20 | {"Regular files", 11}, 21 | {"Symlinks", 12}, 22 | {"Named pipes", 13}, 23 | {"Sockets", 14}, 24 | {"Char. devs.", 15}, 25 | {"Block devs.", 16}, 26 | {"Out of memory", 17}, 27 | {"B", 18}, 28 | {"kB", 19}, 29 | {"MB", 20}, 30 | {"GB", 21}, 31 | {"TB", 22}, 32 | {"PB", 23}, 33 | {"EB", 24}, 34 | {"Could not execute 'file' command", 25}, 35 | {"('file' command timed out)", 26}, 36 | {"/. (root)", 27}, 37 | {"Change Root Directory", 28}, 38 | {"(New pattern)", 29}, 39 | {"(Default color)", 30}, 40 | {"Group Color", 31}, 41 | {"Default Color", 32}, 42 | {"New Color Group", 33}, 43 | {"Edit Wildcard Pattern", 34}, 44 | {"New Wildcard Pattern", 35}, 45 | {"Color ", 36}, 46 | {"Wildcard pattern", 37}, 47 | {"Color Setup", 38}, 48 | {"By node type", 39}, 49 | {"Color: %s", 40}, 50 | {"By date/time", 41}, 51 | {"Oldest:", 42}, 52 | {"Newest:", 43}, 53 | {"Color by:", 44}, 54 | {"Time of last access", 45}, 55 | {"Time of last modification", 46}, 56 | {"Time of last attribute change", 47}, 57 | {"Older Color", 48}, 58 | {"Older", 49}, 59 | {"Rainbow", 50}, 60 | {"Heat", 51}, 61 | {"Gradient", 52}, 62 | {"Newer Color", 53}, 63 | {"Newer", 54}, 64 | {"By wildcards", 55}, 65 | {"New color", 56}, 66 | {"Edit pattern", 57}, 67 | {"Delete", 58}, 68 | {"OK", 59}, 69 | {"Cancel", 60}, 70 | {"Help", 61}, 71 | {"Launching help browser . . .", 62}, 72 | {"Properties", 63}, 73 | {"General", 64}, 74 | {"\ 75 | Type:\n\ 76 | \n", 65}, 77 | {"\ 78 | Location:\n\ 79 | \n", 66}, 80 | {"\ 81 | Total size:\n\ 82 | \n", 67}, 83 | {"Size:\n", 68}, 84 | {"\ 85 | Allocation:\n\ 86 | \n", 69}, 87 | {"Owner:\n", 70}, 88 | {"Group:", 71}, 89 | {"%s bytes", 72}, 90 | {"%s (uid %u)", 73}, 91 | {"%s (gid %u)", 74}, 92 | {"Modified:\n", 75}, 93 | {"AttribCh:\n", 76}, 94 | {"Accessed:", 77}, 95 | {"Contents", 78}, 96 | {"This directory contains:", 79}, 97 | {"File type", 80}, 98 | {"This file is recognized as:", 81}, 99 | {"Target", 82}, 100 | {"This symlink points to:", 83}, 101 | {"Absolute name of target:", 84}, 102 | {"(same as above)", 85}, 103 | {"Look at target node", 86}, 104 | {"Close", 87}, 105 | {"Collapse", 88}, 106 | {"Expand", 89}, 107 | {"Expand all", 90}, 108 | {"Look at", 91}, 109 | {"1 node", 92}, 110 | {"%d nodes", 93}, 111 | {"Type", 94}, 112 | {"Found", 95}, 113 | {"Bytes", 96}, 114 | {"TOTAL", 97}, 115 | {"Node type", 98}, 116 | {"Quantity", 99}, 117 | {"\ 118 | \n\ 119 | fsv - 3D File System Visualizer\n\ 120 | Version ", 100}, 121 | {"Junk in command line:", 101}, 122 | {"fsv requires OpenGL support.", 102}, 123 | {"Scanning: %s", 103}, 124 | {"%d stats/sec", 104}, 125 | {"File", 105}, 126 | {"Change root...", 106}, 127 | {"^N", 107}, 128 | {"Save settings", 108}, 129 | {"Exit", 109}, 130 | {"^Q", 110}, 131 | {"Vis", 111}, 132 | {"DiscV", 112}, 133 | {"MapV", 113}, 134 | {"TreeV", 114}, 135 | {"Colors", 115}, 136 | {"By timestamp", 116}, 137 | {"Setup...", 117}, 138 | {"Contents...", 118}, 139 | {"About fsv...", 119}, 140 | }; 141 | 142 | int _msg_tbl_length = 119; 143 | -------------------------------------------------------------------------------- /gtkgl/README: -------------------------------------------------------------------------------- 1 | GtkGLArea 2.0.1 2 | =============== 3 | 4 | GtkGLArea is an OpenGL widget for GTK+ GUI toolkit. 5 | 6 | Just as GTK+ is build on top of GDK, GtkGLArea is built on top of gdkgl which 7 | is basically wrapper around GLX functions. The widget itself is derived 8 | from GtkDrawinigArea widget and adds only few extra functions. 9 | 10 | Lower level gdkgl functions make it easy to render on any widget that has 11 | OpenGL capable visual, rendering to off-screen pixmaps is also supported. 12 | 13 | Related project which may iterest those who use GTK-- is GtkGLArea--. It is a 14 | C++ wrapper for gtkglarea written by Karl Nelson . 15 | 16 | 17 | Installation 18 | ------------ 19 | 20 | You need GTK+ and either OpenGL or Mesa, if you have both you can choose which 21 | one to use by giving --with-lib-GL or --with-lib-MesaGL option to configure. 22 | 23 | Run './configure --help' to see all options you may give at configuration stage. 24 | Run './configure' and 'make' to build. You may now test programs in examples 25 | directory. Run 'make install' to install. 26 | 27 | Include files go to PREFIX/include/gtkgl/ 28 | Library files go to PREFIX/lib/ 29 | 30 | 31 | Win32 32 | ----- 33 | 34 | There is now a working windows port. There are old hand-written 35 | makefiles (makefile.mingw) but those are out-of-date. Autoconfigurated 36 | build should work OK. If you cannot get it to work, the makefile.mingw files 37 | should be pretty straightforward to modify. 38 | 39 | Prebuilt Win32 packages of GLib 2.0 and GTK+ 2.0 can be downloaded 40 | from www.gimp.org/win32. Also a prebuilt GtkGLArea package might 41 | eventually be available from there. 42 | 43 | OpenlGL headers are also needed, either use those from the 44 | PlatformSDK (freely downloadable from Microsoft, even if you have to 45 | use a complex installer program, and it's hard to decide which of the 46 | zillion optional parts you actually want to get these headers), or 47 | grab 48 | 49 | Mingw32_OpenGL.zip 50 | 51 | from ftp://ftp.teleport.com/pub/users/pgarceau/ 52 | 53 | or alternatively you may use 54 | 55 | glut-cygwin.zip 56 | 57 | from http://www.cim.pe.u-tokyo.ac.jp/~kawachi/software/cygwin_glut-e.html 58 | 59 | Unzip these packages to some directory. 60 | 61 | The Inner workings of win32 gtkglarea is quite different form glx 62 | version, therefore you should only use GtkGLArea widget (gtk_gl_*) 63 | functions, no gdk_gl_* functions. 64 | 65 | 66 | You may also build gtkgl on MinGW. The trick(s) I ended up having to do 67 | were many: 68 | * run ./autogen.sh from cygwin - for some reason mingw's auto* don't work 69 | * copy the gtk dist to /target - for some reason, the .pc files refer to this 70 | * be sure to install the w32api mingw package 71 | * explicitly set LDFLAGS, PKG_CONFIG_PATH, and explicitly declare 72 | where opengl32 is located when running ./configure, thus: 73 | 74 | LDFLAGS=-L/c/GTK/2.8/lib \ 75 | PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/c/GTK/2.8/lib/pkgconfig/ \ 76 | ./configure --prefix=/mingw \ 77 | --with-GL-prefix=/mingw \ 78 | --with-lib-opengl32 79 | 80 | Documentation 81 | ------------- 82 | 83 | Documentation is slightly out of date, sorry. 84 | 85 | docs/gtkglarea.txt documents GtkGLArea widget (needs updating) 86 | docs/gtkgl.txt documents gtk_gl_* functions (needs updating) 87 | docs/HOWTO.txt good advice 88 | 89 | 90 | Links 91 | ----- 92 | 93 | GtkGLArea home page http://www.student.oulu.fi/~jlof/gtkglarea/ 94 | Gtk-- wrapper http://www.ece.ucdavis.edu/~kenelson/gtk-glarea/ 95 | 96 | 97 | Todo 98 | ---- 99 | 100 | - rewrite documentation in texinfo format 101 | - weed out bugs from autoconfigure scripts 102 | - overlays 103 | - add more functionality to windows port 104 | 105 | --- 106 | Trademarks are owned by trademark owners. 107 | -------------------------------------------------------------------------------- /lib/nvstore.c: -------------------------------------------------------------------------------- 1 | /* nvstore.c */ 2 | 3 | /* Nonvolatile storage library */ 4 | 5 | /* Copyright (C)1999 Daniel Richard G. 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a 8 | * copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject to 13 | * the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included 16 | * in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | 27 | 28 | #include "nvstore.h" 29 | /*#include "uxml.h"*/ 30 | 31 | #include 32 | #include 33 | 34 | 35 | #define xmalloc malloc 36 | #define xstrdup strdup 37 | #define xfree free 38 | 39 | 40 | /**** NOTE: ALL THIS HAS YET TO BE IMPLEMENTED! ****/ 41 | 42 | 43 | NVStore * 44 | nvs_open( const char *filename ) 45 | { 46 | return NULL; 47 | } 48 | 49 | 50 | NVS_BOOL 51 | nvs_close( NVStore *nvs ) 52 | { 53 | return 0; 54 | } 55 | 56 | 57 | void 58 | nvs_change_path( NVStore *nvs, const char *path ) 59 | { 60 | 61 | } 62 | 63 | 64 | void 65 | nvs_delete_recursive( NVStore *nvs, const char *path ) 66 | { 67 | 68 | } 69 | 70 | 71 | void 72 | nvs_vector_begin( NVStore *nvs ) 73 | { 74 | 75 | } 76 | 77 | 78 | void 79 | nvs_vector_end( NVStore *nvs ) 80 | { 81 | 82 | } 83 | 84 | 85 | NVS_BOOL 86 | nvs_path_present( NVStore *nvs, const char *path ) 87 | { 88 | return 0; 89 | } 90 | 91 | 92 | NVS_BOOL 93 | nvs_read_boolean( NVStore *nvs, const char *path ) 94 | { 95 | return 0; 96 | } 97 | 98 | 99 | int 100 | nvs_read_int( NVStore *nvs, const char *path ) 101 | { 102 | return 0; 103 | } 104 | 105 | 106 | int 107 | nvs_read_int_token( NVStore *nvs, const char *path, const char **tokens ) 108 | { 109 | return 0; 110 | } 111 | 112 | 113 | double 114 | nvs_read_float( NVStore *nvs, const char *path ) 115 | { 116 | return 0.0; 117 | } 118 | 119 | 120 | char * 121 | nvs_read_string( NVStore *nvs, const char *path ) 122 | { 123 | return xstrdup( "" ); 124 | } 125 | 126 | 127 | NVS_BOOL 128 | nvs_read_boolean_default( NVStore *nvs, const char *path, NVS_BOOL default_val ) 129 | { 130 | return default_val; 131 | } 132 | 133 | 134 | int 135 | nvs_read_int_default( NVStore *nvs, const char *path, int default_val ) 136 | { 137 | return default_val; 138 | } 139 | 140 | 141 | int 142 | nvs_read_int_token_default( NVStore *nvs, const char *path, const char **tokens, int default_val ) 143 | { 144 | return default_val; 145 | } 146 | 147 | 148 | double 149 | nvs_read_float_default( NVStore *nvs, const char *path, double default_val ) 150 | { 151 | return default_val; 152 | } 153 | 154 | 155 | char * 156 | nvs_read_string_default( NVStore *nvs, const char *path, const char *default_string ) 157 | { 158 | return xstrdup( default_string ); 159 | } 160 | 161 | 162 | void 163 | nvs_write_boolean( NVStore *nvs, const char *path, NVS_BOOL val ) 164 | { 165 | 166 | } 167 | 168 | 169 | void 170 | nvs_write_int( NVStore *nvs, const char *path, int val ) 171 | { 172 | 173 | } 174 | 175 | 176 | void 177 | nvs_write_int_token( NVStore *nvs, const char *path, int val, const char **tokens ) 178 | { 179 | 180 | } 181 | 182 | 183 | void 184 | nvs_write_float( NVStore *nvs, const char *path, double val ) 185 | { 186 | 187 | } 188 | 189 | 190 | void 191 | nvs_write_string( NVStore *nvs, const char *path, const char *string ) 192 | { 193 | 194 | } 195 | 196 | 197 | /* end nvstore.c */ 198 | -------------------------------------------------------------------------------- /dbg/debug.h: -------------------------------------------------------------------------------- 1 | /* debug.h */ 2 | 3 | /* Debugging library */ 4 | 5 | /* Copyright (C)1999 Daniel Richard G. 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a 8 | * copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject to 13 | * the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included 16 | * in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | 27 | 28 | #define xmalloc(size) debug_malloc( size, __FILE__, __LINE__ ) 29 | #define xrealloc(block, size) debug_realloc( block, size, __FILE__, __LINE__ ) 30 | #define xmemdup(mem, size) debug_memdup( mem, size, __FILE__, __LINE__ ) 31 | #define xstrdup(string) debug_strdup( string, __FILE__, __LINE__ ) 32 | #define xstrredup(old_str, str) debug_strredup( old_str, str, __FILE__, __LINE__ ) 33 | #define xfree(block) debug_free( block, __FILE__, __LINE__ ) 34 | #define _xfree debug_ufree 35 | 36 | #define g_list_alloc( ) debug_g_list_alloc( __FILE__, __LINE__ ) 37 | #define g_list_prepend(list, data) debug_g_list_prepend( list, data, __FILE__, __LINE__ ) 38 | #define g_list_append(list, data) debug_g_list_append( list, data, __FILE__, __LINE__ ) 39 | #define g_list_insert(list, data, pos) debug_g_list_insert( list, data, pos, __FILE__, __LINE__ ) 40 | #define g_list_insert_sorted(list, data, func) debug_g_list_insert_sorted( list, data, func, __FILE__, __LINE__ ) 41 | #define g_list_remove(list, data) debug_g_list_remove( list, data, __FILE__, __LINE__ ) 42 | #define g_list_copy(list) debug_g_list_copy( list, __FILE__, __LINE__ ) 43 | #define g_list_free_1(llink) debug_g_list_free_1( llink, __FILE__, __LINE__ ) 44 | #define g_list_free(list) debug_g_list_free( list, __FILE__, __LINE__ ) 45 | #define g_node_new(data) debug_g_node_new( data, __FILE__, __LINE__ ) 46 | #define g_node_destroy(node) debug_g_node_destroy( node, __FILE__, __LINE__ ) 47 | 48 | 49 | void debug_init( void ); 50 | void debug_show_mem_totals( void ); 51 | void debug_show_mem_summary( void ); 52 | void debug_show_mem_stats( void ); 53 | void *debug_malloc( size_t size, const char *source_file, int source_line ); 54 | void *debug_realloc( void *block, size_t size, const char *source_file, int source_line ); 55 | void *debug_memdup( void *mem, size_t size, const char *source_file, int source_line ); 56 | char *debug_strdup( const char *string, const char *source_file, int source_line ); 57 | char *debug_strredup( char *old_string, const char *string, const char *source_file, int source_line ); 58 | void debug_free( void *block, const char *source_file, int source_line ); 59 | void debug_ufree( void *block ); 60 | 61 | GList *debug_g_list_alloc( const char *src_file, int src_line ); 62 | GList *debug_g_list_prepend( GList *list, gpointer data, const char *src_file, int src_line ); 63 | GList *debug_g_list_append( GList *list, gpointer data, const char *src_file, int src_line ); 64 | GList *debug_g_list_insert( GList *list, gpointer data, gint position, const char *src_file, int src_line ); 65 | GList *debug_g_list_insert_sorted( GList *list, gpointer data, GCompareFunc func, const char *src_file, int src_line ); 66 | GList *debug_g_list_remove( GList *list, gpointer data, const char *src_file, int src_line ); 67 | GList *debug_g_list_copy( GList *list, const char *src_file, int src_line ); 68 | void debug_g_list_free_1( GList *llink, const char *src_file, int src_line ); 69 | void debug_g_list_free( GList *list, const char *src_file, int src_line ); 70 | GNode *debug_g_node_new( gpointer data, const char *src_file, int src_line ); 71 | void debug_g_node_destroy( GNode *node, const char *src_file, int src_line ); 72 | 73 | 74 | /* end debug.h */ 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## FSV (for Windows, MSVC Source Port) 2 | This is a Windows fork of the Linux FSV clone, compileable with Microsoft Visual C++. 3 | This repo is a fork of [mingw fork of FSV](https://github.com/genbtc/fsv/), which is fork [a fork of FSV](https://github.com/mcuelenaere/fsv) - [original fsv](http://fsv.sourceforge.net/). 4 | The original fork author is [Maurus Cuelenaere](https://github.com/mcuelenaere) 5 | The original author is [Daniel Richard G.](http://fox.mit.edu/skunk/), a former student of Computer Science at the MIT. 6 | 7 | **About FSV port** 8 | This source port is designed to compileable using Microsoft Visual C++ 2008 or later and will run for any Windows from Windows XP to latest Windows 10. 9 | 10 | If you lazy, just download [precompiled program here](https://github.com/thiekus/fsvwin/releases). 11 | 12 | >Note: You will be need OpenGL driver update installed on your OS at least version 1.1, or it will not work (or just crash). 13 | >Also, you need more adequate RAM, Processor and good graphic card if you want to index such as huge directories and files list. 14 | 15 | [![fsv.png](https://i.postimg.cc/nhDhhK2R/fsv.png)](https://postimg.cc/zyqrdg9K) 16 | 17 | **About FSV** 18 | 19 | > fsv (pronounced eff-ess-vee) is a file system visualizer in cyberspace. It lays out files and directories in three dimensions, geometrically representing the file system hierarchy to allow visual overview and analysis. fsv can visualize a modest home directory, a workstation's hard drive, or any arbitrarily large collection of files, limited only by the host computer's memory and graphics hardware. 20 | 21 | Its ancestor, SGI's `fsn` (pronounced "fusion") originated on IRIX and was prominently featured in Jurassic Park: ["It's a Unix system!"](https://www.youtube.com/watch?v=3HjOjvu6oKA). 22 | 23 | [Screenshots](http://fsv.sourceforge.net/screenshots/) of the original clone are still available. 24 | 25 | Useful info and screenshots of the original SGI IRIX implementation are available on [siliconbunny](http://www.siliconbunny.com/fsn-the-irix-3d-file-system-tool-from-jurassic-park/). 26 | This repo is a fork of [a fork of FSV](https://github.com/mcuelenaere/fsv) 27 | 28 | **Building** 29 | 30 | *Note: this is steps for building this repo sources from MSVC. If you would like to build using mingw in MSYS2, consider use this [mingw fork repo](https://github.com/genbtc/fsv/) and follow [this instructions](https://mrlithium.blogspot.com/2017/07/compiling-fsv-jurassic-park-program-on.html) instead.* 31 | 32 | Requirements: 33 | * Microsoft Visual C++ 2008 or later, although Visual C++ 2005 solutions provided but not frequently updated (Express edition needs Windows SDK headers and libraries) 34 | * GTK+ 2.24 for Windows, you can build for yourself [from this tutorial](https://wiki.gnome.org/Projects/GTK/Win32/MSVCCompilationOfGTKStack) or use this [GTK+ 2.24.10 all-in-one package](http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip) (this is the last official all-in-one prebuild for Windows). 35 | 36 | Steps: 37 | * Extract GTK all-in-one package into any directory, for example at ```C:\gtk2``` and assume this is your gtk root directory. 38 | * Add ```C:\gtk2\bin``` directory into your ```PATH``` environtment variable for your convenient while launching program. 39 | * Open ```fsvwin.sln``` from Visual Studio. 40 | * For first time you would to build, add these includes directory paths into your project include directory (or VCDIR in older Visual Studio): 41 | ``` 42 | C:\gtk2\include 43 | C:\gtk2\include\atk-1.0 44 | C:\gtk2\include\cairo 45 | C:\gtk2\include\fontconfig 46 | C:\gtk2\include\freetype2 47 | C:\gtk2\include\gail-1.0 48 | C:\gtk2\include\gdk-pixbuf-2.0 49 | C:\gtk2\include\gio-win32-2.0 50 | C:\gtk2\include\glib-2.0 51 | C:\gtk2\include\gtk-2.0 52 | C:\gtk2\include\libpng14 53 | C:\gtk2\include\pango-1.0 54 | C:\gtk2\include\pixman-1 55 | C:\gtk2\lib\glib-2.0\include 56 | C:\gtk2\lib\gtk-2.0\include 57 | ``` 58 | * Also, add ```C:\gtk2\lib``` directory for library path. 59 | * Build solution. 60 | 61 | **Known Issues** 62 | 63 | * Sometimes, program randomly crashes if you do input while program still busy or under heavy load. 64 | * Debug executable isn't working at this moment. Strangely, release mode build will be work. 65 | * Date time picker omitted in By date/time setup due unported custom gtk control. 66 | * Also panel in By date/time setup not properly drawn because it depends into gdk drawing instead cairo as more recent version of Gtk+2. 67 | -------------------------------------------------------------------------------- /src/xmaps/folder.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * folder_xpm[] = { 3 | "32 32 111 2", 4 | " c None", 5 | ". c #020204", 6 | "+ c #FECE84", 7 | "@ c #FEDEA4", 8 | "# c #323234", 9 | "$ c #A26E34", 10 | "% c #FEAE5C", 11 | "& c #D3D3D3", 12 | "* c #CBCBCB", 13 | "= c #B6763C", 14 | "- c #EDEDED", 15 | "; c #D5D5D5", 16 | "> c #A66E3C", 17 | ", c #1D1907", 18 | "' c #1B1808", 19 | ") c #EBEBEB", 20 | "! c #FDFDFD", 21 | "~ c #CDCDCD", 22 | "{ c #F5F5F5", 23 | "] c #000000", 24 | "^ c #E3E3E3", 25 | "/ c #C5C5C5", 26 | "( c #514721", 27 | "_ c #C27E3C", 28 | ": c #F6AA5C", 29 | "< c #FEC67C", 30 | "[ c #FED69C", 31 | "} c #FBFBFB", 32 | "| c #F3F3F3", 33 | "1 c #DBDBDB", 34 | "2 c #A26A34", 35 | "3 c #E6964C", 36 | "4 c #FEB25C", 37 | "5 c #FEBA6C", 38 | "6 c #FECA7C", 39 | "7 c #FECE8C", 40 | "8 c #F7F7F7", 41 | "9 c #2E2E1C", 42 | "0 c #CA8644", 43 | "a c #E5E5E5", 44 | "b c #EFEFEF", 45 | "c c #F2F2F2", 46 | "d c #ECECEC", 47 | "e c #EEEEEE", 48 | "f c #959595", 49 | "g c #CE8A44", 50 | "h c #E6E6E6", 51 | "i c #E2E2E2", 52 | "j c #D9D9D9", 53 | "k c #D7D7D7", 54 | "l c #818181", 55 | "m c #ADADAD", 56 | "n c #965E34", 57 | "o c #FEAA5C", 58 | "p c #E8E8E8", 59 | "q c #E0E0E0", 60 | "r c #DDDDDD", 61 | "s c #DADADA", 62 | "t c #CFCFCF", 63 | "u c #C3C3C3", 64 | "v c #B7B7B7", 65 | "w c #A5A5A5", 66 | "x c #939393", 67 | "y c #E4E4E4", 68 | "z c #DCDCDC", 69 | "A c #D4D4D4", 70 | "B c #D0D0D0", 71 | "C c #C7C7C7", 72 | "D c #BFBFBF", 73 | "E c #ABABAB", 74 | "F c #9B9B9B", 75 | "G c #BDBDBD", 76 | "H c #BBBBBB", 77 | "I c #9D9D9D", 78 | "J c #2E3234", 79 | "K c #DFDFDF", 80 | "L c #DEDEDE", 81 | "M c #CECECE", 82 | "N c #CACACA", 83 | "O c #C4C4C4", 84 | "P c #B5B5B5", 85 | "Q c #C9C9C9", 86 | "R c #AFAFAF", 87 | "S c #A3A3A3", 88 | "T c #D6D6D6", 89 | "U c #C1C1C1", 90 | "V c #BEBEBE", 91 | "W c #D2D2D2", 92 | "X c #C6C6C6", 93 | "Y c #C0C0C0", 94 | "Z c #B8B8B8", 95 | "` c #8D8D8D", 96 | " . c #CCCCCC", 97 | ".. c #BCBCBC", 98 | "+. c #B4B4B4", 99 | "@. c #B3B3B3", 100 | "#. c #A7A7A7", 101 | "$. c #B0B0B0", 102 | "%. c #9F9F9F", 103 | "&. c #8B8B8B", 104 | "*. c #B9B9B9", 105 | "=. c #858585", 106 | "-. c #A8A8A8", 107 | ";. c #010103", 108 | ">. c #7D7D7D", 109 | ",. c #979797", 110 | "'. c #010102", 111 | "). c #6B6B6B", 112 | "!. c #838383", 113 | "~. c #6D6D6D", 114 | "{. c #434343", 115 | " . . . ", 116 | " . + @ @ . . ", 117 | " # # $ % + @ @ . . ", 118 | " . & * # # = % + @ @ . . ", 119 | " . - - ; * # # > % + @ @ , ' . . . ", 120 | " . ) ! - - ; ~ # # > % + @ @ . . @ @ @ . . ", 121 | " . ) ! ! { - ) ; & ] ] > % + @ @ @ @ @ @ @ . . ", 122 | " . ) ! ! ! ! { ) ^ ~ / ] ( _ : < [ @ @ @ @ @ @ . ", 123 | " . ) ! ! ! ! ! } | ^ 1 ~ ] 2 3 4 5 < 6 7 @ @ @ . ", 124 | " . ) ! ! ! ! ! 8 { | ) 1 9 # _ _ % # # 0 % + @ @ . ", 125 | " . a ! ! ! 8 { b c d e a ; * # # _ # f # # g % + . ", 126 | " . ^ ! ! } { { ) ) h ^ i j k ; & . l m f f # n o . ", 127 | " . ^ ! } { | - b p h q r s ; t ~ * u v m w x # o . ", 128 | " . 1 8 b | - ) y ^ z r ; A B ~ C C / D v E F # o . ", 129 | " . 1 } b - ) a ^ i 1 j A B * C / / D G H E I J o . ", 130 | " . ; | - ) a K L L s ; M N O / D u G v P E F J o . ", 131 | " . ; | - a K r r ; & t Q / O D G G v P R S f J o . ", 132 | " . ~ ) a a r k T A ~ * / U V H P v P R m S x J o . ", 133 | " . ~ ) r r 1 ; W B * X Y Y Z v R P R m w I ` J o . ", 134 | " . / ~ ^ r ; t .O u O ..Z +.P R @.#.w w F ` # o . ", 135 | " . F P u * & ~ C O G G P P $.R #.#.#.w %.F &.J o . ", 136 | " . . F m H H D Y *.v @.$.m #.#.#.%.%.I f &.J o . ", 137 | " . . =.E @.@.*.+.@.-.#.w w w w I F x &.J o . ", 138 | " . . =.I E m E -.w %.I %.I F f ` &.J o . ", 139 | " . ;.>.F S S S I F I I ,.f ` &.J o . ", 140 | " . '.>.x F f ,.F f f f ` &.J o . ", 141 | " . . ).&.` f ,.f f ` &.J o . . ", 142 | " . . ).!.=.` f ` &.J o . . . . ", 143 | " . . ).>.=.` &.# o . . . . . ", 144 | " . . ~.>.` J o . . . . ", 145 | " . . {.. n . . ", 146 | " . . . "}; 147 | -------------------------------------------------------------------------------- /src/geometry.h: -------------------------------------------------------------------------------- 1 | /* geometry.h */ 2 | 3 | /* 3D geometry generation and rendering */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_GEOMETRY_H 25 | #error 26 | #endif 27 | #define FSV_GEOMETRY_H 28 | 29 | 30 | /* Exported geometry constants */ 31 | #define TREEV_LEAF_NODE_EDGE 256.0 32 | #define TREEV_PLATFORM_SPACING_DEPTH 2048.0 33 | 34 | #define DISCV_GEOM_PARAMS(node) ((DiscVGeomParams *)(NODE_DESC(node)->geomparams)) 35 | #define MAPV_GEOM_PARAMS(node) ((MapVGeomParams *)(NODE_DESC(node)->geomparams)) 36 | #define TREEV_GEOM_PARAMS(node) ((TreeVGeomParams *)(NODE_DESC(node)->geomparams)) 37 | 38 | #define MAPV_NODE_WIDTH(node) (MAPV_GEOM_PARAMS(node)->c1.x - MAPV_GEOM_PARAMS(node)->c0.x) 39 | #define MAPV_NODE_DEPTH(node) (MAPV_GEOM_PARAMS(node)->c1.y - MAPV_GEOM_PARAMS(node)->c0.y) 40 | #define MAPV_NODE_CENTER_X(node) (0.5 * (MAPV_GEOM_PARAMS(node)->c0.x + MAPV_GEOM_PARAMS(node)->c1.x)) 41 | #define MAPV_NODE_CENTER_Y(node) (0.5 * (MAPV_GEOM_PARAMS(node)->c0.y + MAPV_GEOM_PARAMS(node)->c1.y)) 42 | 43 | 44 | /* Geometry parameters for a node in DiscV mode */ 45 | typedef struct _DiscVGeomParams DiscVGeomParams; 46 | struct _DiscVGeomParams { 47 | /* WORK IN PROGRESS */ 48 | double radius; /* Radius of node disc */ 49 | double theta; /* Angle position on parent disc */ 50 | XYvec pos; /* Center of disc w.r.t. center of parent (derived) */ 51 | XYvec center; /* multipled by directory deployment of parent (derived) */ 52 | }; 53 | 54 | /* Geometry parameters for a node in MapV mode */ 55 | typedef struct _MapVGeomParams MapVGeomParams; 56 | struct _MapVGeomParams { 57 | XYvec c0; /* 2D left/front corner (x0,y0) */ 58 | XYvec c1; /* 2D right/rear corner (x1,y1) */ 59 | /* Note: x1 > x0 and y1 > y0 */ 60 | double height; /* Height of node (bottom to top) */ 61 | }; 62 | 63 | /* Geometry parameters for a node in TreeV mode */ 64 | typedef struct _TreeVGeomParams TreeVGeomParams; 65 | struct _TreeVGeomParams { 66 | struct { 67 | /* Distance from center of leaf to inner edge of parent */ 68 | double distance; 69 | /* Angular position, relative to parent's centerline */ 70 | double theta; 71 | /* Height of leaf (measured from bottom to top, not from z=0) */ 72 | double height; 73 | } leaf; 74 | 75 | /* This next set is for expanded directories (platforms) only */ 76 | struct { 77 | /* Angular position of centerline, relative to centerline 78 | * of the parent directory */ 79 | double theta; 80 | /* Distance from inner to outer edge */ 81 | double depth; 82 | /* Arc width in degrees. This includes the constant-width 83 | * spacer regions at either side of the platform */ 84 | double arc_width; 85 | /* Height of platform (measured from z=0 to top) */ 86 | double height; 87 | /* Overall arc width of subtree */ 88 | double subtree_arc_width; 89 | } platform; 90 | }; 91 | 92 | 93 | XYvec *geometry_discv_node_pos( GNode *node ); 94 | double geometry_mapv_node_z0( GNode *node ); 95 | double geometry_mapv_max_expanded_height( GNode *dnode ); 96 | boolean geometry_treev_is_leaf( GNode *node ); 97 | double geometry_treev_platform_r0( GNode *dnode ); 98 | double geometry_treev_platform_theta( GNode *dnode ); 99 | double geometry_treev_max_leaf_height( GNode *dnode ); 100 | void geometry_treev_get_extents( GNode *dnode, RTvec *ext_c0, RTvec *ext_c1 ); 101 | void geometry_queue_rebuild( GNode *dnode ); 102 | void geometry_init( FsvMode mode ); 103 | void geometry_gldraw_fsv( void ); 104 | void geometry_draw( boolean high_detail ); 105 | void geometry_camera_pan_finished( void ); 106 | void geometry_colexp_initiated( GNode *dnode ); 107 | void geometry_colexp_in_progress( GNode *dnode ); 108 | boolean geometry_should_highlight( GNode *node, unsigned int face_id ); 109 | void geometry_highlight_node( GNode *node, boolean strong ); 110 | void geometry_free_recursive( GNode *dnode ); 111 | 112 | 113 | /* end geometry.h */ 114 | -------------------------------------------------------------------------------- /doc/startup.html: -------------------------------------------------------------------------------- 1 | Startup

Startup

Command-line arguments

When fsv is invoked with the --help option, it prints out a usage summary:

bash$ fsv --help
100 | 
101 | fsv - 3D File System Visualizer
102 |       Version 0.9
103 | Copyright (C)1999 Daniel Richard G. <skunk@mit.edu>
104 | 
105 | Usage: fsv [rootdir] [options]
106 |   rootdir      Root directory for visualization
107 |                - (defaults to current directory)
108 |   --mapv       Start in MapV mode (default)
109 |   --treev      Start in TreeV mode
110 |   --help       Print this help and exit

Options and arguments

rootdir

Specifies the base of the directory tree for fsv to work in. Everything inside this directory will be scanned, and subsequently translated into geometry.

If no value is given, fsv works in the directory it is invoked from.

--mapv

Starts the program in MapV visualization mode. (This is the default)

--treev

Starts the program in TreeV visualization mode.

--help

Prints out the usage summary and exits.

Examples

To give the TreeV view of everything under /usr: 186 |
bash$ fsv /usr --treev &

-------------------------------------------------------------------------------- /doc/window.html: -------------------------------------------------------------------------------- 1 | Main window

Main window

Toolbar

First button

Sends the camera back to the node it was viewing previously.

Second button

Repositions the camera to view the root directory.

Third button

Points the camera at a node one level closer to the root directory.

Fourth button

Sends the camera soaring up for a bird's-eye view.

Directory tree

(upper-left panel of the main program window)

The directory tree displays all or part of the currently loaded directory structure, indicating which directories are collapsed and which are expanded. The selected entry (linux in this example) indicates the current directory, whose contents are listed in the file list.

File list

(lower-left panel of the main program window)

The file list displays the contents of the current directory. Each entry in the list corresponds to a file system node, and is paired with an icon indicating the node type.

Graphical viewport

(right panel of the main program window)

This is where the real action happens! The viewport displays the camera view. The camera automatically repositions itself as necessary to observe the current node of interest, which is indicated by white box-corners (as shown above).

The scrollbars may be used to move the camera around; the permitted range of motion depends on the camera's position and the current node.

-------------------------------------------------------------------------------- /src/callbacks.c: -------------------------------------------------------------------------------- 1 | /* callbacks.c */ 2 | 3 | /* GUI callbacks */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #include "window.h" 25 | #include "callbacks.h" 26 | 27 | #include 28 | 29 | #include "about.h" 30 | #include "camera.h" 31 | #include "color.h" 32 | #include "dialog.h" 33 | #include "fsv.h" 34 | 35 | 36 | /* Radio menu items fire a callback on deselection as well as selection, 37 | * which is not quite what we want */ 38 | #define IGNORE_MENU_ITEM_DESELECT(menuitem) \ 39 | if (!GTK_CHECK_MENU_ITEM(menuitem)->active) return 40 | 41 | 42 | /**** MAIN WINDOW **************************************/ 43 | 44 | 45 | /** Menus **/ 46 | 47 | 48 | /* File -> Change root... */ 49 | void 50 | on_file_change_root_activate( GtkMenuItem *menuitem, gpointer user_data ) 51 | { 52 | dialog_change_root( ); 53 | } 54 | 55 | 56 | /* File -> Save settings */ 57 | void 58 | on_file_save_settings_activate( GtkMenuItem *menuitem, gpointer user_data ) 59 | { 60 | g_message( "Configuration file not yet implemented" ); 61 | #if 0 62 | fsv_write_config( ); 63 | color_write_config( ); 64 | #endif 65 | } 66 | 67 | 68 | /* File -> Exit */ 69 | void 70 | on_file_exit_activate( GtkMenuItem *menuitem, gpointer user_data ) 71 | { 72 | exit( EXIT_SUCCESS ); 73 | } 74 | 75 | 76 | /* Vis -> DiscV */ 77 | void 78 | on_vis_discv_activate( GtkMenuItem *menuitem, gpointer user_data ) 79 | { 80 | IGNORE_MENU_ITEM_DESELECT(menuitem); 81 | if (globals.fsv_mode != FSV_DISCV) 82 | fsv_set_mode( FSV_DISCV ); 83 | } 84 | 85 | 86 | /* Vis -> MapV */ 87 | void 88 | on_vis_mapv_activate( GtkMenuItem *menuitem, gpointer user_data ) 89 | { 90 | IGNORE_MENU_ITEM_DESELECT(menuitem); 91 | if (globals.fsv_mode != FSV_MAPV) 92 | fsv_set_mode( FSV_MAPV ); 93 | } 94 | 95 | 96 | /* Vis -> TreeV */ 97 | void 98 | on_vis_treev_activate( GtkMenuItem *menuitem, gpointer user_data ) 99 | { 100 | IGNORE_MENU_ITEM_DESELECT(menuitem); 101 | if (globals.fsv_mode != FSV_TREEV) 102 | fsv_set_mode( FSV_TREEV ); 103 | } 104 | 105 | 106 | /* Colors -> By node type */ 107 | void 108 | on_color_by_nodetype_activate( GtkMenuItem *menuitem, gpointer user_data ) 109 | { 110 | IGNORE_MENU_ITEM_DESELECT(menuitem); 111 | color_set_mode( COLOR_BY_NODETYPE ); 112 | } 113 | 114 | 115 | /* Colors -> By timestamp */ 116 | void 117 | on_color_by_timestamp_activate( GtkMenuItem *menuitem, gpointer user_data ) 118 | { 119 | IGNORE_MENU_ITEM_DESELECT(menuitem); 120 | color_set_mode( COLOR_BY_TIMESTAMP ); 121 | } 122 | 123 | 124 | /* Colors -> By wildcards */ 125 | void 126 | on_color_by_wildcards_activate( GtkMenuItem *menuitem, gpointer user_data ) 127 | { 128 | IGNORE_MENU_ITEM_DESELECT(menuitem); 129 | color_set_mode( COLOR_BY_WPATTERN ); 130 | } 131 | 132 | 133 | /* Colors -> Setup... */ 134 | void 135 | on_color_setup_activate( GtkMenuItem *menuitem, gpointer user_data ) 136 | { 137 | dialog_color_setup( ); 138 | } 139 | 140 | 141 | /* Help -> Contents... */ 142 | void 143 | on_help_contents_activate( GtkMenuItem *menuitem, gpointer user_data ) 144 | { 145 | dialog_help( ); 146 | } 147 | 148 | 149 | /* Help -> About fsv... */ 150 | void 151 | on_help_about_fsv_activate( GtkMenuItem *menuitem, gpointer user_data ) 152 | { 153 | about( ABOUT_BEGIN ); 154 | } 155 | 156 | 157 | /** Toolbar **/ 158 | 159 | 160 | /* "Back" button */ 161 | void 162 | on_back_button_clicked( GtkButton *button, gpointer user_data ) 163 | { 164 | camera_look_at_previous( ); 165 | } 166 | 167 | 168 | /* "cd /" button */ 169 | void 170 | on_cd_root_button_clicked( GtkButton *button, gpointer user_data ) 171 | { 172 | camera_look_at( root_dnode ); 173 | } 174 | 175 | 176 | /* "cd .." button */ 177 | void 178 | on_cd_up_button_clicked( GtkButton *button, gpointer user_data ) 179 | { 180 | if (NODE_IS_DIR(globals.current_node->parent)) 181 | camera_look_at( globals.current_node->parent ); 182 | } 183 | 184 | 185 | /* "Bird's-eye view" toggle button */ 186 | void 187 | on_birdseye_view_togglebutton_toggled( GtkToggleButton *togglebutton, gpointer user_data ) 188 | { 189 | camera_birdseye_view( togglebutton->active ); 190 | } 191 | 192 | 193 | /**** DIALOG: ROOT DIRECTORY SELECTION ***********************************/ 194 | 195 | 196 | /* to be implemented */ 197 | 198 | 199 | 200 | 201 | /**** DIALOG: COLOR SETUP **************************************/ 202 | 203 | 204 | /* to be implemented */ 205 | 206 | 207 | 208 | 209 | /* end callbacks.c */ 210 | -------------------------------------------------------------------------------- /gtkgl/gtkgl/gdkgl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1998 Janne Löf 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free 16 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #ifndef __GDK_GL_H__ 20 | #define __GDK_GL_H__ 21 | 22 | #include 23 | 24 | #ifdef G_OS_WIN32 25 | /* The GL/gl.h on Windows requires you to include 26 | * anyway, so we might as well include it here. 27 | */ 28 | #include 29 | #endif 30 | 31 | #include 32 | 33 | G_BEGIN_DECLS 34 | 35 | /* 36 | * These definitions are duplicated from GL/glx.h that comes with Mesa. 37 | * I don't want every program to include GL/glx.h because GtkGLArea 38 | * supports lecacy systems like Windows. You can still use GLX_xxxx 39 | * attributes with these, but then you lose portability. 40 | */ 41 | enum _GDK_GL_CONFIGS { 42 | GDK_GL_NONE = 0, 43 | GDK_GL_USE_GL = 1, 44 | GDK_GL_BUFFER_SIZE = 2, 45 | GDK_GL_LEVEL = 3, 46 | GDK_GL_RGBA = 4, 47 | GDK_GL_DOUBLEBUFFER = 5, 48 | GDK_GL_STEREO = 6, 49 | GDK_GL_AUX_BUFFERS = 7, 50 | GDK_GL_RED_SIZE = 8, 51 | GDK_GL_GREEN_SIZE = 9, 52 | GDK_GL_BLUE_SIZE = 10, 53 | GDK_GL_ALPHA_SIZE = 11, 54 | GDK_GL_DEPTH_SIZE = 12, 55 | GDK_GL_STENCIL_SIZE = 13, 56 | GDK_GL_ACCUM_RED_SIZE = 14, 57 | GDK_GL_ACCUM_GREEN_SIZE = 15, 58 | GDK_GL_ACCUM_BLUE_SIZE = 16, 59 | GDK_GL_ACCUM_ALPHA_SIZE = 17, 60 | 61 | /* GLX_EXT_visual_info extension */ 62 | GDK_GL_X_VISUAL_TYPE_EXT = 0x22, 63 | GDK_GL_TRANSPARENT_TYPE_EXT = 0x23, 64 | GDK_GL_TRANSPARENT_INDEX_VALUE_EXT = 0x24, 65 | GDK_GL_TRANSPARENT_RED_VALUE_EXT = 0x25, 66 | GDK_GL_TRANSPARENT_GREEN_VALUE_EXT = 0x26, 67 | GDK_GL_TRANSPARENT_BLUE_VALUE_EXT = 0x27, 68 | GDK_GL_TRANSPARENT_ALPHA_VALUE_EXT = 0x28 69 | }; 70 | 71 | 72 | #define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type()) 73 | #define GDK_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_CONTEXT, GdkGLContext)) 74 | #define GDK_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDK_TYPE_GL_CONTEXT, GdkGLContextClass)) 75 | #define GDK_IS_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_CONTEXT)) 76 | #define GDK_IS_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GL_CONTEXT)) 77 | #define GDK_GL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GL_CONTEXT, GdkGLContext)) 78 | 79 | typedef struct _GdkGLContext GdkGLContext; 80 | 81 | 82 | gint gdk_gl_query(void); 83 | gchar *gdk_gl_get_info(void); 84 | 85 | GdkVisual *gdk_gl_choose_visual(int *attrlist); 86 | int gdk_gl_get_config(GdkVisual *visual, int attrib); 87 | 88 | GType gdk_gl_context_get_type(void); 89 | GdkGLContext *gdk_gl_context_new(GdkVisual *visual); 90 | GdkGLContext *gdk_gl_context_share_new(GdkVisual *visual, GdkGLContext *sharelist, gint direct); 91 | GdkGLContext *gdk_gl_context_attrlist_share_new(int *attrlist, GdkGLContext *sharelist, gint direct); 92 | 93 | gint gdk_gl_make_current(GdkDrawable *drawable, GdkGLContext *context); 94 | void gdk_gl_swap_buffers(GdkDrawable *drawable); 95 | 96 | 97 | void gdk_gl_wait_gdk(void); 98 | void gdk_gl_wait_gl(void); 99 | 100 | 101 | /* glpixmap stuff */ 102 | 103 | #define GDK_TYPE_GL_PIXMAP (gdk_gl_pixmap_get_type()) 104 | #define GDK_GL_PIXMAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_PIXMAP, GdkGLPixmap)) 105 | #define GDK_GL_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDK_TYPE_GL_PIXMAP, GdkGLPixmapClass)) 106 | #define GDK_IS_GL_PIXMAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_PIXMAP)) 107 | #define GDK_IS_GL_PIXMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GL_PIXMAP)) 108 | #define GDK_GL_PIXMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GL_PIXMAP, GdkGLPixmap)) 109 | 110 | typedef struct _GdkGLPixmap GdkGLPixmap; 111 | 112 | GType gdk_gl_pixmap_get_type(void); 113 | GdkGLPixmap *gdk_gl_pixmap_new(GdkVisual *visual, GdkPixmap *pixmap); 114 | 115 | gint gdk_gl_pixmap_make_current(GdkGLPixmap *glpixmap, GdkGLContext *context); 116 | 117 | 118 | /* fonts */ 119 | void gdk_gl_use_gdk_font(GdkFont *font, int first, int count, int list_base); 120 | 121 | 122 | #ifndef GTKGL_DISABLE_DEPRECATED 123 | # define gdk_gl_context_ref(context) g_object_ref(context) 124 | # define gdk_gl_context_unref(context) g_object_unref(context) 125 | # define gdk_gl_pixmap_ref(pixmap) g_object_ref(pixmap) 126 | # define gdk_gl_pixmap_unref(pixmap) g_object_unref(pixmap) 127 | #endif 128 | 129 | G_END_DECLS 130 | 131 | #endif /* __GDK_GL_H__ */ 132 | 133 | -------------------------------------------------------------------------------- /lib/getopt1.c: -------------------------------------------------------------------------------- 1 | /* getopt_long and getopt_long_only entry points for GNU getopt. 2 | Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 3 | Free Software Foundation, Inc. 4 | This file is part of the GNU C Library. 5 | 6 | The GNU C Library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Library General Public License as 8 | published by the Free Software Foundation; either version 2 of the 9 | License, or (at your option) any later version. 10 | 11 | The GNU C Library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Library General Public License for more details. 15 | 16 | You should have received a copy of the GNU Library General Public 17 | License along with the GNU C Library; see the file COPYING.LIB. If not, 18 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | Boston, MA 02111-1307, USA. */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include 23 | #endif 24 | 25 | #include "getopt.h" 26 | 27 | #if !defined __STDC__ || !__STDC__ 28 | /* This is a separate conditional since some stdc systems 29 | reject `defined (const)'. */ 30 | #ifndef const 31 | #define const 32 | #endif 33 | #endif 34 | 35 | #include 36 | 37 | /* Comment out all this code if we are using the GNU C Library, and are not 38 | actually compiling the library itself. This code is part of the GNU C 39 | Library, but also included in many other GNU distributions. Compiling 40 | and linking in this code is a waste when using the GNU C library 41 | (especially if it is a shared library). Rather than having every GNU 42 | program understand `configure --with-gnu-libc' and omit the object files, 43 | it is simpler to just do this in the source for each such file. */ 44 | 45 | #define GETOPT_INTERFACE_VERSION 2 46 | #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 47 | #include 48 | #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION 49 | #define ELIDE_CODE 50 | #endif 51 | #endif 52 | 53 | #ifndef ELIDE_CODE 54 | 55 | 56 | /* This needs to come after some library #include 57 | to get __GNU_LIBRARY__ defined. */ 58 | #ifdef __GNU_LIBRARY__ 59 | #include 60 | #endif 61 | 62 | #ifndef NULL 63 | #define NULL 0 64 | #endif 65 | 66 | int 67 | getopt_long (argc, argv, options, long_options, opt_index) 68 | int argc; 69 | char *const *argv; 70 | const char *options; 71 | const struct option *long_options; 72 | int *opt_index; 73 | { 74 | return _getopt_internal (argc, argv, options, long_options, opt_index, 0); 75 | } 76 | 77 | /* Like getopt_long, but '-' as well as '--' can indicate a long option. 78 | If an option that starts with '-' (not '--') doesn't match a long option, 79 | but does match a short option, it is parsed as a short option 80 | instead. */ 81 | 82 | int 83 | getopt_long_only (argc, argv, options, long_options, opt_index) 84 | int argc; 85 | char *const *argv; 86 | const char *options; 87 | const struct option *long_options; 88 | int *opt_index; 89 | { 90 | return _getopt_internal (argc, argv, options, long_options, opt_index, 1); 91 | } 92 | 93 | 94 | #endif /* Not ELIDE_CODE. */ 95 | 96 | #ifdef TEST 97 | 98 | #include 99 | 100 | int 101 | main (argc, argv) 102 | int argc; 103 | char **argv; 104 | { 105 | int c; 106 | int digit_optind = 0; 107 | 108 | while (1) 109 | { 110 | int this_option_optind = optind ? optind : 1; 111 | int option_index = 0; 112 | static struct option long_options[] = 113 | { 114 | {"add", 1, 0, 0}, 115 | {"append", 0, 0, 0}, 116 | {"delete", 1, 0, 0}, 117 | {"verbose", 0, 0, 0}, 118 | {"create", 0, 0, 0}, 119 | {"file", 1, 0, 0}, 120 | {0, 0, 0, 0} 121 | }; 122 | 123 | c = getopt_long (argc, argv, "abc:d:0123456789", 124 | long_options, &option_index); 125 | if (c == -1) 126 | break; 127 | 128 | switch (c) 129 | { 130 | case 0: 131 | printf ("option %s", long_options[option_index].name); 132 | if (optarg) 133 | printf (" with arg %s", optarg); 134 | printf ("\n"); 135 | break; 136 | 137 | case '0': 138 | case '1': 139 | case '2': 140 | case '3': 141 | case '4': 142 | case '5': 143 | case '6': 144 | case '7': 145 | case '8': 146 | case '9': 147 | if (digit_optind != 0 && digit_optind != this_option_optind) 148 | printf ("digits occur in two different argv-elements.\n"); 149 | digit_optind = this_option_optind; 150 | printf ("option %c\n", c); 151 | break; 152 | 153 | case 'a': 154 | printf ("option a\n"); 155 | break; 156 | 157 | case 'b': 158 | printf ("option b\n"); 159 | break; 160 | 161 | case 'c': 162 | printf ("option c with value `%s'\n", optarg); 163 | break; 164 | 165 | case 'd': 166 | printf ("option d with value `%s'\n", optarg); 167 | break; 168 | 169 | case '?': 170 | break; 171 | 172 | default: 173 | printf ("?? getopt returned character code 0%o ??\n", c); 174 | } 175 | } 176 | 177 | if (optind < argc) 178 | { 179 | printf ("non-option ARGV-elements: "); 180 | while (optind < argc) 181 | printf ("%s ", argv[optind++]); 182 | printf ("\n"); 183 | } 184 | 185 | exit (0); 186 | } 187 | 188 | #endif /* TEST */ 189 | -------------------------------------------------------------------------------- /gtkgl/gtkgl/gtkglarea.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1997-1998 Janne Löf 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free 16 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | */ 18 | 19 | #include "config.h" 20 | 21 | #include 22 | 23 | #include "gdkgl.h" 24 | #include "gtkglarea.h" 25 | 26 | static void gtk_gl_area_class_init (GtkGLAreaClass *klass); 27 | static void gtk_gl_area_init (GtkGLArea *glarea); 28 | static void gtk_gl_area_destroy (GtkObject *object); /* change to finalize? */ 29 | 30 | static GtkDrawingAreaClass *parent_class = NULL; 31 | 32 | 33 | GType 34 | gtk_gl_area_get_type (void) 35 | { 36 | static GType object_type = 0; 37 | 38 | if (!object_type) 39 | { 40 | static const GTypeInfo object_info = 41 | { 42 | sizeof (GtkGLAreaClass), 43 | (GBaseInitFunc) NULL, 44 | (GBaseFinalizeFunc) NULL, 45 | (GClassInitFunc) gtk_gl_area_class_init, 46 | NULL, /* class_finalize */ 47 | NULL, /* class_data */ 48 | sizeof (GtkGLArea), 49 | 0, /* n_preallocs */ 50 | (GInstanceInitFunc) gtk_gl_area_init, 51 | }; 52 | 53 | object_type = g_type_register_static (GTK_TYPE_DRAWING_AREA, 54 | "GtkGLArea", 55 | &object_info, 0); 56 | } 57 | return object_type; 58 | } 59 | 60 | static void 61 | gtk_gl_area_class_init (GtkGLAreaClass *klass) 62 | { 63 | GtkObjectClass *object_class; 64 | 65 | parent_class = g_type_class_peek_parent(klass); 66 | object_class = (GtkObjectClass*) klass; 67 | 68 | object_class->destroy = gtk_gl_area_destroy; 69 | } 70 | 71 | 72 | static void 73 | gtk_gl_area_init (GtkGLArea *gl_area) 74 | { 75 | gl_area->glcontext = NULL; 76 | gtk_widget_set_double_buffered(GTK_WIDGET(gl_area), FALSE); 77 | } 78 | 79 | 80 | 81 | GtkWidget* 82 | gtk_gl_area_new_vargs(GtkGLArea *share, ...) 83 | { 84 | GtkWidget *glarea; 85 | va_list ap; 86 | int i; 87 | gint *attrlist; 88 | 89 | va_start(ap, share); 90 | i=1; 91 | while (va_arg(ap, int) != GDK_GL_NONE) /* get number of arguments */ 92 | i++; 93 | va_end(ap); 94 | 95 | attrlist = g_new(int,i); 96 | 97 | va_start(ap,share); 98 | i=0; 99 | while ( (attrlist[i] = va_arg(ap, int)) != GDK_GL_NONE) /* copy args to list */ 100 | i++; 101 | va_end(ap); 102 | 103 | glarea = gtk_gl_area_share_new(attrlist, share); 104 | 105 | g_free(attrlist); 106 | 107 | return glarea; 108 | } 109 | 110 | GtkWidget* 111 | gtk_gl_area_new (int *attrlist) 112 | { 113 | return gtk_gl_area_share_new(attrlist, NULL); 114 | } 115 | 116 | GtkWidget* 117 | gtk_gl_area_share_new (int *attrlist, GtkGLArea *share) 118 | { 119 | GdkGLContext *glcontext; 120 | GtkGLArea *gl_area; 121 | #if defined GDK_WINDOWING_X11 122 | GdkVisual *visual; 123 | #endif 124 | 125 | g_return_val_if_fail(share == NULL || GTK_IS_GL_AREA(share), NULL); 126 | 127 | #if defined GDK_WINDOWING_X11 128 | visual = gdk_gl_choose_visual(attrlist); 129 | if (visual == NULL) 130 | return NULL; 131 | 132 | glcontext = gdk_gl_context_share_new(visual, share ? share->glcontext : NULL, TRUE); 133 | #else 134 | glcontext = gdk_gl_context_attrlist_share_new(attrlist, share ? share->glcontext : NULL, TRUE); 135 | #endif 136 | if (glcontext == NULL) 137 | return NULL; 138 | 139 | #if defined GDK_WINDOWING_X11 140 | /* use colormap and visual suitable for OpenGL rendering */ 141 | gtk_widget_push_colormap(gdk_colormap_new(visual,TRUE)); 142 | gtk_widget_push_visual(visual); 143 | #endif 144 | 145 | gl_area = g_object_new(GTK_TYPE_GL_AREA, NULL); 146 | gl_area->glcontext = glcontext; 147 | 148 | #if defined GDK_WINDOWING_X11 149 | /* pop back defaults */ 150 | gtk_widget_pop_visual(); 151 | gtk_widget_pop_colormap(); 152 | #endif 153 | 154 | return GTK_WIDGET(gl_area); 155 | } 156 | 157 | 158 | static void 159 | gtk_gl_area_destroy(GtkObject *object) 160 | { 161 | GtkGLArea *gl_area; 162 | 163 | g_return_if_fail (object != NULL); 164 | g_return_if_fail (GTK_IS_GL_AREA(object)); 165 | 166 | gl_area = GTK_GL_AREA(object); 167 | 168 | if (gl_area->glcontext) 169 | g_object_unref(gl_area->glcontext); 170 | gl_area->glcontext = NULL; 171 | 172 | if (GTK_OBJECT_CLASS (parent_class)->destroy) 173 | (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); 174 | } 175 | 176 | 177 | gint gtk_gl_area_make_current(GtkGLArea *gl_area) 178 | { 179 | g_return_val_if_fail(gl_area != NULL, FALSE); 180 | g_return_val_if_fail(GTK_IS_GL_AREA (gl_area), FALSE); 181 | g_return_val_if_fail(GTK_WIDGET_REALIZED(gl_area), FALSE); 182 | 183 | return gdk_gl_make_current(GTK_WIDGET(gl_area)->window, gl_area->glcontext); 184 | } 185 | 186 | void gtk_gl_area_swap_buffers(GtkGLArea *gl_area) 187 | { 188 | g_return_if_fail(gl_area != NULL); 189 | g_return_if_fail(GTK_IS_GL_AREA(gl_area)); 190 | g_return_if_fail(GTK_WIDGET_REALIZED(gl_area)); 191 | 192 | gdk_gl_swap_buffers(GTK_WIDGET(gl_area)->window); 193 | } 194 | -------------------------------------------------------------------------------- /src/xmaps/fsv-icon.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * fsv_icon_xpm[] = { 3 | "64 64 64 1", 4 | " c None", 5 | ". c #030207", 6 | "+ c #025604", 7 | "@ c #580204", 8 | "# c #022E04", 9 | "$ c #300204", 10 | "% c #021A04", 11 | "& c #020262", 12 | "* c #1C0204", 13 | "= c #028204", 14 | "- c #840204", 15 | "; c #020E04", 16 | "> c #02023D", 17 | ", c #100204", 18 | "' c #026E04", 19 | ") c #700204", 20 | "! c #020A04", 21 | "~ c #024204", 22 | "{ c #430204", 23 | "] c #02028C", 24 | "^ c #029804", 25 | "/ c #990204", 26 | "( c #020223", 27 | "_ c #0A0204", 28 | ": c #026404", 29 | "< c #640204", 30 | "[ c #020604", 31 | "} c #023C04", 32 | "| c #3B0204", 33 | "1 c #02027A", 34 | "2 c #280204", 35 | "3 c #029004", 36 | "4 c #900204", 37 | "5 c #022904", 38 | "6 c #027C04", 39 | "7 c #024F04", 40 | "8 c #02A604", 41 | "9 c #7A0204", 42 | "0 c #4F0204", 43 | "a c #A60204", 44 | "b c #025E04", 45 | "c c #023604", 46 | "d c #022204", 47 | "e c #028A04", 48 | "f c #027604", 49 | "g c #024A04", 50 | "h c #029E04", 51 | "i c #026A04", 52 | "j c #02024E", 53 | "k c #0202A3", 54 | "l c #5E0204", 55 | "m c #360204", 56 | "n c #220204", 57 | "o c #8A0204", 58 | "p c #760204", 59 | "q c #4A0204", 60 | "r c #9E0204", 61 | "s c #6A0204", 62 | "t c #025A04", 63 | "u c #023204", 64 | "v c #028604", 65 | "w c #021204", 66 | "x c #027204", 67 | "y c #024604", 68 | " ", 69 | " .;w[ ", 70 | " dt388883bd 57gy~}% ", 71 | " ;:8888888888x^88888~ ", 72 | " %^888888888888888888} ", 73 | " ;38888888888888888888c ", 74 | " b88888888888888888888u ", 75 | " ,{@<)@2. !88888888^=v^8888888885 ", 76 | " $9aaaaaaar0. 58888888}.w5}+e88888885 ", 77 | " _(.. ", 101 | " oaaaaaaa49p. (1&&&&&&j>(. ", 102 | " laaaaaaa/9p$2|2 j1&&&&&&&&&&j.(.. ", 103 | " $aaaaaaaa99l@l0 &]kk]]1&&&&&&j&&&>((. ", 104 | " _aaaaaaaa-)ll<). 1]kkkkkkk]1&&&&1&&&&&j>(. ", 105 | " 9aaaaaaa4sllsp* &]kkkkkkkkkkk]]11&&&&&&&&( ", 106 | " ,9aaaaaaar9o//9$ >kkkkkkkkkkkkkkk]1]1&&&&&&>. ", 107 | " .0)aaaaaaaaaaaa9$ >kkkkkkkkkkkkkkk11kkkk]11&&&( ", 108 | " .{lsaaaaaaaaaaaa-n .>&]kkkkkkkkkkk]1]kkkkkkkk]]1>. ", 109 | " |4raaaaaaaaaaaaa4, (]kkkkkkkkkk]1]kkkkkkkkkkkkj ", 110 | " $aaaaaaaaaaaaaaa/. (]kkkkkkk]kk11]kkkkkkkkkkkk( ", 111 | " _aaaaaaaaaaaaar90 .]kkkkkkk.1]11kkkkkkkkkkkkk. ", 112 | " 9aaaaaaaa/p02. 1kkkkkkk&11111]]kkkkkkkkk1 ", 113 | " 0aaaa/)qn. &kkkkkkk1111111kkkkkkkkkkj ", 114 | " n/)qn. >kkkkkkk]11111]kkkkkk>.(j( ", 115 | " .. >]kkkkkk]1111]kkkkkk& ", 116 | " (]kkkkkk]1111kkkkkk]. ", 117 | " .]kkkkkk]111]kkkkkk( ", 118 | " .1kkkkkk]11]kkkkkkj ", 119 | " &kkkkkk]11kkkkkk1. ", 120 | " jkkkkkk]1]kkkkk]. ", 121 | " >kkkkkk]]kkkkkk( ", 122 | " .]kkkkkkkkkkkk& ", 123 | " .]kkkkkkkkkkk]. ", 124 | " &kkkkkkkkkkk( ", 125 | " >kkkkkkkkkk> ", 126 | " (kkkkkkkkk& ", 127 | " .]kkkkkkk]. ", 128 | " &kkkkkkk( ", 129 | " .>j1kkj ", 130 | " .(. ", 131 | " "}; 132 | -------------------------------------------------------------------------------- /src/gui.h: -------------------------------------------------------------------------------- 1 | /* gui.h */ 2 | 3 | /* Higher-level GTK+ interface */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #ifdef FSV_GUI_H 25 | #error 26 | #endif 27 | #define FSV_GUI_H 28 | 29 | 30 | #ifdef __GTK_H__ 31 | 32 | /* For clearer gui_*_packing( ) syntax */ 33 | #define EXPAND TRUE 34 | #define NO_EXPAND FALSE 35 | #define FILL TRUE 36 | #define NO_FILL FALSE 37 | #define AT_START TRUE 38 | #define AT_END FALSE 39 | 40 | 41 | /* Icon container */ 42 | typedef struct _Icon Icon; 43 | struct _Icon { 44 | GdkPixmap *pixmap; 45 | GdkBitmap *mask; 46 | }; 47 | 48 | #endif /* __GTK_H__ */ 49 | 50 | 51 | void gui_update( void ); 52 | #ifdef __GTK_H__ 53 | boolean gui_adjustment_widget_busy( GtkAdjustment *adj ); 54 | GtkAdjustment *gui_int_adjustment( int value, int lower, int upper ); 55 | GtkWidget *gui_hbox_add( GtkWidget *parent_w, int spacing ); 56 | GtkWidget *gui_vbox_add( GtkWidget *parent_w, int spacing ); 57 | void gui_box_set_packing( GtkWidget *box_w, boolean expand, boolean fill, boolean start ); 58 | GtkWidget *gui_button_add( GtkWidget *parent_w, const char *label, void (*callback)( ), void *callback_data ); 59 | GtkWidget *gui_button_with_pixmap_xpm_add( GtkWidget *parent_w, char **xpm_data, const char *label, void (*callback)( ), void *callback_data ); 60 | GtkWidget *gui_toggle_button_add( GtkWidget *parent_w, const char *label, boolean active, void (*callback)( ), void *callback_data ); 61 | GtkWidget *gui_clist_add( GtkWidget *parent_w, int num_cols, char *col_titles[] ); 62 | void gui_clist_moveto_row( GtkWidget *clist_w, int row, double moveto_time ); 63 | GtkWidget *gui_colorpicker_add( GtkWidget *parent_w, RGBcolor *init_color, const char *title, void (*callback)( ), void *callback_data ); 64 | void gui_colorpicker_set_color( GtkWidget *colorpicker_w, RGBcolor *color ); 65 | GtkWidget *gui_ctree_add( GtkWidget *parent_w ); 66 | GtkCTreeNode *gui_ctree_node_add( GtkWidget *ctree_w, GtkCTreeNode *parent, Icon icon_pair[2], const char *text, boolean expanded, void *data ); 67 | void gui_cursor( GtkWidget *widget, int glyph ); 68 | GtkWidget *gui_dateedit_add( GtkWidget *parent_w, time_t the_time, void (*callback)( ), void *callback_data ); 69 | time_t gui_dateedit_get_time( GtkWidget *dateedit_w ); 70 | void gui_dateedit_set_time( GtkWidget *dateedit_w, time_t the_time ); 71 | GtkWidget *gui_entry_add( GtkWidget *parent_w, const char *init_text, void (*callback)( ), void *callback_data ); 72 | void gui_entry_set_text( GtkWidget *entry_w, const char *entry_text ); 73 | char *gui_entry_get_text( GtkWidget *entry_w ); 74 | void gui_entry_highlight( GtkWidget *entry_w ); 75 | GtkWidget *gui_frame_add( GtkWidget *parent_w, const char *title ); 76 | GtkWidget *gui_gl_area_add( GtkWidget *parent_w ); 77 | void gui_keybind( GtkWidget *widget, char *keystroke ); 78 | GtkWidget *gui_label_add( GtkWidget *parent_w, const char *label_text ); 79 | GtkWidget *gui_menu_add( GtkWidget *parent_menu_w, const char *label ); 80 | GtkWidget *gui_menu_item_add( GtkWidget *menu_w, const char *label, void (*callback)( ), void *callback_data ); 81 | void gui_radio_menu_begin( int init_selected ); 82 | GtkWidget *gui_radio_menu_item_add( GtkWidget *menu_w, const char *label, void (*callback)( ), void *callback_data ); 83 | GtkWidget *gui_option_menu_add( GtkWidget *parent_w, int init_selected ); 84 | GtkWidget *gui_option_menu_item( const char *label, void (*callback)( ), void *callback_data ); 85 | GtkWidget *gui_notebook_add( GtkWidget *parent_w ); 86 | void gui_notebook_page_add( GtkWidget *notebook_w, const char *tab_label, GtkWidget *content_w ); 87 | GtkWidget *gui_hpaned_add( GtkWidget *parent_w, int divider_x_pos ); 88 | GtkWidget *gui_vpaned_add( GtkWidget *parent_w, int divider_y_pos ); 89 | GtkWidget *gui_pixmap_xpm_add( GtkWidget *parent_w, char **xpm_data ); 90 | GtkWidget *gui_preview_add( GtkWidget *parent_w ); 91 | void gui_preview_spectrum( GtkWidget *preview_w, RGBcolor (*spectrum_func)( double x ) ); 92 | GtkWidget *gui_hscrollbar_add( GtkWidget *parent_w, GtkAdjustment *adjustment ); 93 | GtkWidget *gui_vscrollbar_add( GtkWidget *parent_w, GtkAdjustment *adjustment ); 94 | GtkWidget *gui_separator_add( GtkWidget *parent_w ); 95 | GtkWidget *gui_statusbar_add( GtkWidget *parent_w ); 96 | void gui_statusbar_message( GtkWidget *statusbar_w, const char *message ); 97 | GtkWidget *gui_table_add( GtkWidget *parent_w, int num_rows, int num_cols, boolean homog, int cell_padding ); 98 | void gui_table_attach( GtkWidget *table_w, GtkWidget *widget, int left, int right, int top, int bottom ); 99 | GtkWidget *gui_text_area_add( GtkWidget *parent_w, const char *init_text ); 100 | void gui_widget_packing( GtkWidget *widget, boolean expand, boolean fill, boolean start ); 101 | GtkWidget *gui_colorsel_window( const char *title, RGBcolor *init_color, void (*ok_callback)( ), void *ok_callback_data ); 102 | GtkWidget *gui_dialog_window( const char *title, void (*close_callback )( ) ); 103 | GtkWidget *gui_entry_window( const char *title, const char *init_text, void (*ok_callback)( ), void *ok_callback_data ); 104 | GtkWidget *gui_filesel_window( const char *title, const char *init_filename, void (*ok_callback)( ), void *ok_callback_data ); 105 | void gui_window_icon_xpm( GtkWidget *window_w, char **xpm_data ); 106 | void gui_window_modalize( GtkWidget *window_w, GtkWidget *parent_window_w ); 107 | #endif /* __GTK_H__ */ 108 | 109 | 110 | /* end gui.h */ 111 | -------------------------------------------------------------------------------- /intl/libgettext.h: -------------------------------------------------------------------------------- 1 | /* Message catalogs for internationalization. 2 | Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software Foundation, 16 | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 17 | 18 | /* Because on some systems (e.g. Solaris) we sometimes have to include 19 | the systems libintl.h as well as this file we have more complex 20 | include protection above. But the systems header might perhaps also 21 | define _LIBINTL_H and therefore we have to protect the definition here. */ 22 | 23 | #if !defined _LIBINTL_H || !defined _LIBGETTEXT_H 24 | #ifndef _LIBINTL_H 25 | # define _LIBINTL_H 1 26 | #endif 27 | #define _LIBGETTEXT_H 1 28 | 29 | /* We define an additional symbol to signal that we use the GNU 30 | implementation of gettext. */ 31 | #define __USE_GNU_GETTEXT 1 32 | 33 | #include 34 | 35 | #if HAVE_LOCALE_H 36 | # include 37 | #endif 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | /* @@ end of prolog @@ */ 45 | 46 | #ifndef PARAMS 47 | # if __STDC__ || defined __cplusplus 48 | # define PARAMS(args) args 49 | # else 50 | # define PARAMS(args) () 51 | # endif 52 | #endif 53 | 54 | #ifndef NULL 55 | # if !defined __cplusplus || defined __GNUC__ 56 | # define NULL ((void *) 0) 57 | # else 58 | # define NULL (0) 59 | # endif 60 | #endif 61 | 62 | #if !HAVE_LC_MESSAGES 63 | /* This value determines the behaviour of the gettext() and dgettext() 64 | function. But some system does not have this defined. Define it 65 | to a default value. */ 66 | # define LC_MESSAGES (-1) 67 | #endif 68 | 69 | 70 | /* Declarations for gettext-using-catgets interface. Derived from 71 | Jim Meyering's libintl.h. */ 72 | struct _msg_ent 73 | { 74 | const char *_msg; 75 | int _msg_number; 76 | }; 77 | 78 | 79 | #if HAVE_CATGETS 80 | /* These two variables are defined in the automatically by po-to-tbl.sed 81 | generated file `cat-id-tbl.c'. */ 82 | extern const struct _msg_ent _msg_tbl[]; 83 | extern int _msg_tbl_length; 84 | #endif 85 | 86 | 87 | /* For automatical extraction of messages sometimes no real 88 | translation is needed. Instead the string itself is the result. */ 89 | #define gettext_noop(Str) (Str) 90 | 91 | /* Look up MSGID in the current default message catalog for the current 92 | LC_MESSAGES locale. If not found, returns MSGID itself (the default 93 | text). */ 94 | extern char *gettext PARAMS ((const char *__msgid)); 95 | extern char *gettext__ PARAMS ((const char *__msgid)); 96 | 97 | /* Look up MSGID in the DOMAINNAME message catalog for the current 98 | LC_MESSAGES locale. */ 99 | extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); 100 | extern char *dgettext__ PARAMS ((const char *__domainname, 101 | const char *__msgid)); 102 | 103 | /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY 104 | locale. */ 105 | extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, 106 | int __category)); 107 | extern char *dcgettext__ PARAMS ((const char *__domainname, 108 | const char *__msgid, int __category)); 109 | 110 | 111 | /* Set the current default message catalog to DOMAINNAME. 112 | If DOMAINNAME is null, return the current default. 113 | If DOMAINNAME is "", reset to the default of "messages". */ 114 | extern char *textdomain PARAMS ((const char *__domainname)); 115 | extern char *textdomain__ PARAMS ((const char *__domainname)); 116 | 117 | /* Specify that the DOMAINNAME message catalog will be found 118 | in DIRNAME rather than in the system locale data base. */ 119 | extern char *bindtextdomain PARAMS ((const char *__domainname, 120 | const char *__dirname)); 121 | extern char *bindtextdomain__ PARAMS ((const char *__domainname, 122 | const char *__dirname)); 123 | 124 | #if ENABLE_NLS 125 | 126 | /* Solaris 2.3 has the gettext function but dcgettext is missing. 127 | So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 128 | has dcgettext. */ 129 | # if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) 130 | 131 | # define gettext(Msgid) \ 132 | dgettext (NULL, Msgid) 133 | 134 | # define dgettext(Domainname, Msgid) \ 135 | dcgettext (Domainname, Msgid, LC_MESSAGES) 136 | 137 | # if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 138 | /* This global variable is defined in loadmsgcat.c. We need a sign, 139 | whether a new catalog was loaded, which can be associated with all 140 | translations. */ 141 | extern int _nl_msg_cat_cntr; 142 | 143 | # define dcgettext(Domainname, Msgid, Category) \ 144 | (__extension__ \ 145 | ({ \ 146 | char *__result; \ 147 | if (__builtin_constant_p (Msgid)) \ 148 | { \ 149 | static char *__translation__; \ 150 | static int __catalog_counter__; \ 151 | if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ 152 | { \ 153 | __translation__ = \ 154 | dcgettext__ (Domainname, Msgid, Category); \ 155 | __catalog_counter__ = _nl_msg_cat_cntr; \ 156 | } \ 157 | __result = __translation__; \ 158 | } \ 159 | else \ 160 | __result = dcgettext__ (Domainname, Msgid, Category); \ 161 | __result; \ 162 | })) 163 | # endif 164 | # endif 165 | 166 | #else 167 | 168 | # define gettext(Msgid) (Msgid) 169 | # define dgettext(Domainname, Msgid) (Msgid) 170 | # define dcgettext(Domainname, Msgid, Category) (Msgid) 171 | # define textdomain(Domainname) ((char *) Domainname) 172 | # define bindtextdomain(Domainname, Dirname) ((char *) Dirname) 173 | 174 | #endif 175 | 176 | /* @@ begin of epilog @@ */ 177 | 178 | #ifdef __cplusplus 179 | } 180 | #endif 181 | 182 | #endif 183 | -------------------------------------------------------------------------------- /gtkgl/gtkgl_vc2005.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 26 | 29 | 32 | 35 | 38 | 47 | 63 | 66 | 71 | 74 | 77 | 80 | 83 | 88 | 91 | 94 | 95 | 105 | 108 | 111 | 114 | 117 | 126 | 142 | 145 | 150 | 153 | 156 | 159 | 162 | 167 | 170 | 173 | 174 | 175 | 176 | 177 | 178 | 182 | 185 | 188 | 193 | 194 | 197 | 202 | 203 | 204 | 207 | 208 | 211 | 214 | 219 | 220 | 223 | 228 | 229 | 230 | 231 | 235 | 238 | 239 | 242 | 243 | 244 | 248 | 249 | 250 | 251 | 252 | 253 | -------------------------------------------------------------------------------- /lib/getopt.h: -------------------------------------------------------------------------------- 1 | /* Declarations for getopt. 2 | Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. 3 | This file is part of the GNU C Library. 4 | 5 | The GNU C Library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Library General Public License as 7 | published by the Free Software Foundation; either version 2 of the 8 | License, or (at your option) any later version. 9 | 10 | The GNU C Library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Library General Public License for more details. 14 | 15 | You should have received a copy of the GNU Library General Public 16 | License along with the GNU C Library; see the file COPYING.LIB. If not, 17 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 | Boston, MA 02111-1307, USA. */ 19 | 20 | #ifndef _GETOPT_H 21 | 22 | #ifndef __need_getopt 23 | # define _GETOPT_H 1 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | /* For communication from `getopt' to the caller. 31 | When `getopt' finds an option that takes an argument, 32 | the argument value is returned here. 33 | Also, when `ordering' is RETURN_IN_ORDER, 34 | each non-option ARGV-element is returned here. */ 35 | 36 | extern char *optarg; 37 | 38 | /* Index in ARGV of the next element to be scanned. 39 | This is used for communication to and from the caller 40 | and for communication between successive calls to `getopt'. 41 | 42 | On entry to `getopt', zero means this is the first call; initialize. 43 | 44 | When `getopt' returns -1, this is the index of the first of the 45 | non-option elements that the caller should itself scan. 46 | 47 | Otherwise, `optind' communicates from one call to the next 48 | how much of ARGV has been scanned so far. */ 49 | 50 | extern int optind; 51 | 52 | /* Callers store zero here to inhibit the error message `getopt' prints 53 | for unrecognized options. */ 54 | 55 | extern int opterr; 56 | 57 | /* Set to an option character which was unrecognized. */ 58 | 59 | extern int optopt; 60 | 61 | #ifndef __need_getopt 62 | /* Describe the long-named options requested by the application. 63 | The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector 64 | of `struct option' terminated by an element containing a name which is 65 | zero. 66 | 67 | The field `has_arg' is: 68 | no_argument (or 0) if the option does not take an argument, 69 | required_argument (or 1) if the option requires an argument, 70 | optional_argument (or 2) if the option takes an optional argument. 71 | 72 | If the field `flag' is not NULL, it points to a variable that is set 73 | to the value given in the field `val' when the option is found, but 74 | left unchanged if the option is not found. 75 | 76 | To have a long-named option do something other than set an `int' to 77 | a compiled-in constant, such as set a value from `optarg', set the 78 | option's `flag' field to zero and its `val' field to a nonzero 79 | value (the equivalent single-letter option character, if there is 80 | one). For long options that have a zero `flag' field, `getopt' 81 | returns the contents of the `val' field. */ 82 | 83 | struct option 84 | { 85 | # if defined __STDC__ && __STDC__ 86 | const char *name; 87 | # else 88 | char *name; 89 | # endif 90 | /* has_arg can't be an enum because some compilers complain about 91 | type mismatches in all the code that assumes it is an int. */ 92 | int has_arg; 93 | int *flag; 94 | int val; 95 | }; 96 | 97 | /* Names for the values of the `has_arg' field of `struct option'. */ 98 | 99 | # define no_argument 0 100 | # define required_argument 1 101 | # define optional_argument 2 102 | #endif /* need getopt */ 103 | 104 | 105 | /* Get definitions and prototypes for functions to process the 106 | arguments in ARGV (ARGC of them, minus the program name) for 107 | options given in OPTS. 108 | 109 | Return the option character from OPTS just read. Return -1 when 110 | there are no more options. For unrecognized options, or options 111 | missing arguments, `optopt' is set to the option letter, and '?' is 112 | returned. 113 | 114 | The OPTS string is a list of characters which are recognized option 115 | letters, optionally followed by colons, specifying that that letter 116 | takes an argument, to be placed in `optarg'. 117 | 118 | If a letter in OPTS is followed by two colons, its argument is 119 | optional. This behavior is specific to the GNU `getopt'. 120 | 121 | The argument `--' causes premature termination of argument 122 | scanning, explicitly telling `getopt' that there are no more 123 | options. 124 | 125 | If OPTS begins with `--', then non-option arguments are treated as 126 | arguments to the option '\0'. This behavior is specific to the GNU 127 | `getopt'. */ 128 | 129 | #if defined __STDC__ && __STDC__ 130 | # ifdef __GNU_LIBRARY__ 131 | /* Many other libraries have conflicting prototypes for getopt, with 132 | differences in the consts, in stdlib.h. To avoid compilation 133 | errors, only prototype getopt for the GNU C library. */ 134 | extern int getopt (int __argc, char *const *__argv, const char *__shortopts); 135 | # else /* not __GNU_LIBRARY__ */ 136 | extern int getopt (); 137 | # endif /* __GNU_LIBRARY__ */ 138 | 139 | # ifndef __need_getopt 140 | extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, 141 | const struct option *__longopts, int *__longind); 142 | extern int getopt_long_only (int __argc, char *const *__argv, 143 | const char *__shortopts, 144 | const struct option *__longopts, int *__longind); 145 | 146 | /* Internal only. Users should not call this directly. */ 147 | extern int _getopt_internal (int __argc, char *const *__argv, 148 | const char *__shortopts, 149 | const struct option *__longopts, int *__longind, 150 | int __long_only); 151 | # endif 152 | #else /* not __STDC__ */ 153 | extern int getopt (); 154 | # ifndef __need_getopt 155 | extern int getopt_long (); 156 | extern int getopt_long_only (); 157 | 158 | extern int _getopt_internal (); 159 | # endif 160 | #endif /* __STDC__ */ 161 | 162 | #ifdef __cplusplus 163 | } 164 | #endif 165 | 166 | /* Make sure we later can get all the definitions and declarations. */ 167 | #undef __need_getopt 168 | 169 | #endif /* getopt.h */ 170 | -------------------------------------------------------------------------------- /gtkgl/gtkgl.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 28 | 31 | 34 | 37 | 40 | 49 | 66 | 69 | 74 | 77 | 80 | 83 | 86 | 91 | 94 | 97 | 98 | 108 | 111 | 114 | 117 | 120 | 129 | 146 | 149 | 154 | 157 | 160 | 163 | 166 | 171 | 174 | 177 | 178 | 179 | 180 | 181 | 182 | 186 | 189 | 192 | 197 | 198 | 201 | 206 | 207 | 208 | 211 | 212 | 215 | 218 | 223 | 224 | 227 | 232 | 233 | 234 | 235 | 239 | 242 | 243 | 246 | 247 | 248 | 252 | 253 | 254 | 255 | 256 | 257 | -------------------------------------------------------------------------------- /src/about.c: -------------------------------------------------------------------------------- 1 | /* about.c */ 2 | 3 | /* Help -> About... */ 4 | 5 | /* fsv - 3D File System Visualizer 6 | * Copyright (C)1999 Daniel Richard G. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2 of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | */ 22 | 23 | 24 | #include "window.h" 25 | #include "about.h" 26 | 27 | #ifdef _WIN32 28 | #include 29 | #endif 30 | #include 31 | 32 | #include "animation.h" 33 | #include "geometry.h" 34 | #include "ogl.h" 35 | #include "tmaptext.h" 36 | 37 | 38 | /* Interval normalization macro */ 39 | #define INTERVAL_PART(x,x0,x1) (((x) - (x0)) / ((x1) - (x0))) 40 | 41 | 42 | /* Normalized time variable (in range [0, 1]) */ 43 | static double about_part; 44 | 45 | /* Display list for "fsv" geometry */ 46 | static GLuint fsv_dlist = NULL_DLIST; 47 | 48 | /* TRUE while giving About presentation */ 49 | static boolean about_active = FALSE; 50 | 51 | 52 | /* Draws the "fsv" 3D letters */ 53 | static void 54 | draw_fsv( void ) 55 | { 56 | double dy, p, q; 57 | 58 | if (about_part < 0.5) { 59 | /* Set up a black, all-encompassing fog */ 60 | glEnable( GL_FOG ); 61 | glFogi( GL_FOG_MODE, GL_LINEAR ); 62 | glFogf( GL_FOG_START, 200.0 ); 63 | glFogf( GL_FOG_END, 1800.0 ); 64 | } 65 | 66 | /* Set up projection matrix */ 67 | glMatrixMode( GL_PROJECTION ); 68 | glPushMatrix( ); 69 | glLoadIdentity( ); 70 | dy = 80.0 / ogl_aspect_ratio( ); 71 | glFrustum( - 80.0, 80.0, - dy, dy, 80.0, 2000.0 ); 72 | 73 | /* Set up modelview matrix */ 74 | glMatrixMode( GL_MODELVIEW ); 75 | glPushMatrix( ); 76 | glLoadIdentity( ); 77 | if (about_part < 0.5) { 78 | /* Spinning and approaching fast */ 79 | p = INTERVAL_PART(about_part, 0.0, 0.5); 80 | q = pow( 1.0 - p, 1.5 ); 81 | glTranslated( 0.0, 0.0, -150.0 - 1800.0 * q ); 82 | glRotated( 900.0 * q, 0.0, 1.0, 0.0 ); 83 | } 84 | else if (about_part < 0.625) { 85 | /* Holding still for a moment */ 86 | glTranslated( 0.0, 0.0, -150.0 ); 87 | } 88 | else if (about_part < 0.75) { 89 | /* Flipping up and back */ 90 | p = INTERVAL_PART(about_part, 0.625, 0.75); 91 | q = 1.0 - SQR(1.0 - p); 92 | glTranslated( 0.0, 40.0 * q, -150.0 - 50.0 * q ); 93 | glRotated( 365.0 * q, 1.0, 0.0, 0.0 ); 94 | } 95 | else { 96 | /* Holding still again */ 97 | glTranslated( 0.0, 40.0, -200.0 ); 98 | glRotated( 5.0, 1.0, 0.0, 0.0 ); 99 | } 100 | 101 | /* Draw "fsv" geometry, using a display list if possible */ 102 | if (fsv_dlist == NULL_DLIST) { 103 | fsv_dlist = glGenLists( 1 ); 104 | glNewList( fsv_dlist, GL_COMPILE_AND_EXECUTE ); 105 | geometry_gldraw_fsv( ); 106 | glEndList( ); 107 | } 108 | else 109 | glCallList( fsv_dlist ); 110 | 111 | /* Restore previous matrices */ 112 | glMatrixMode( GL_PROJECTION ); 113 | glPopMatrix( ); 114 | glMatrixMode( GL_MODELVIEW ); 115 | glPopMatrix( ); 116 | 117 | glDisable( GL_FOG ); 118 | } 119 | 120 | 121 | /* Draws the lines of text */ 122 | static void 123 | draw_text( void ) 124 | { 125 | XYZvec tpos; 126 | XYvec tdims; 127 | double dy, p, q; 128 | 129 | if (about_part < 0.625) 130 | return; 131 | 132 | /* Set up projection matrix */ 133 | glMatrixMode( GL_PROJECTION ); 134 | glPushMatrix( ); 135 | glLoadIdentity( ); 136 | dy = 1.0 / ogl_aspect_ratio( ); 137 | glFrustum( - 1.0, 1.0, - dy, dy, 1.0, 205.0 ); 138 | 139 | /* Set up modelview matrix */ 140 | glMatrixMode( GL_MODELVIEW ); 141 | glPushMatrix( ); 142 | glLoadIdentity( ); 143 | 144 | if (about_part < 0.75) 145 | p = INTERVAL_PART(about_part, 0.625, 0.75); 146 | else 147 | p = 1.0; 148 | q = (1.0 - SQR(1.0 - p)); 149 | 150 | text_pre( ); 151 | 152 | tdims.x = 400.0; 153 | tdims.y = 18.0; 154 | tpos.x = 0.0; 155 | tpos.y = -35.0; /* -35 */ 156 | tpos.z = -200.0 * q; 157 | glColor3f( 1.0, 1.0, 1.0 ); 158 | text_draw_straight( "fsv - 3D File System Visualizer", &tpos, &tdims ); 159 | 160 | tdims.y = 15.0; 161 | tpos.y = 40.0 * q - 95.0; /* -55 */ 162 | text_draw_straight( "Version " VERSION, &tpos, &tdims ); 163 | 164 | tdims.y = 12.0; 165 | tpos.y = 100.0 * q - 180.0; /* -80 */ 166 | glColor3f( 0.5, 0.5, 0.5 ); 167 | text_draw_straight( "Copyright (C)1999 by Daniel Richard G.", &tpos, &tdims ); 168 | 169 | tpos.y = 140.0 * q - 235.0; /* -95 */ 170 | text_draw_straight( "", &tpos, &tdims ); 171 | 172 | /* Finally, fade in the home page URL */ 173 | if (about_part > 0.75) { 174 | tpos.y = -115.0; 175 | p = INTERVAL_PART(about_part, 0.75, 1.0); 176 | q = SQR(SQR(p)); 177 | glColor3f( q, q, 0.0 ); 178 | text_draw_straight( "http://fox.mit.edu/skunk/soft/fsv/", &tpos, &tdims ); 179 | text_draw_straight( "__________________________________", &tpos, &tdims ); 180 | } 181 | 182 | text_post( ); 183 | 184 | /* Restore previous matrices */ 185 | glMatrixMode( GL_PROJECTION ); 186 | glPopMatrix( ); 187 | glMatrixMode( GL_MODELVIEW ); 188 | glPopMatrix( ); 189 | } 190 | 191 | 192 | /* Progress callback; keeps viewport updated during presentation */ 193 | static void 194 | about_progress_cb( Morph *unused ) 195 | { 196 | globals.need_redraw = TRUE; 197 | } 198 | 199 | 200 | /* Control routine */ 201 | gboolean 202 | about( AboutMesg mesg ) 203 | { 204 | switch (mesg) { 205 | case ABOUT_BEGIN: 206 | /* Begin the presentation */ 207 | morph_break( &about_part ); 208 | about_part = 0.0; 209 | morph_full( &about_part, MORPH_LINEAR, 1.0, 8.0, about_progress_cb, about_progress_cb, NULL ); 210 | about_active = TRUE; 211 | break; 212 | 213 | case ABOUT_END: 214 | if (!about_active) 215 | return FALSE; 216 | /* We now return you to your regularly scheduled program */ 217 | morph_break( &about_part ); 218 | if (fsv_dlist != NULL_DLIST) { 219 | glDeleteLists( fsv_dlist, 1 ); 220 | fsv_dlist = NULL_DLIST; 221 | } 222 | redraw( ); 223 | about_active = FALSE; 224 | return TRUE; 225 | 226 | case ABOUT_DRAW: 227 | /* Draw all presentation elements */ 228 | draw_fsv( ); 229 | draw_text( ); 230 | break; 231 | 232 | case ABOUT_CHECK: 233 | /* Return current presentation status */ 234 | return about_active; 235 | 236 | SWITCH_FAIL 237 | } 238 | 239 | return FALSE; 240 | } 241 | 242 | 243 | /* end about.c */ 244 | -------------------------------------------------------------------------------- /src/fnmatch.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1989, 1993, 1994 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * This code is derived from software contributed to Berkeley by 6 | * Guido van Rossum. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. All advertising materials mentioning features or use of this software 17 | * must display the following acknowledgement: 18 | * This product includes software developed by the University of 19 | * California, Berkeley and its contributors. 20 | * 4. Neither the name of the University nor the names of its contributors 21 | * may be used to endorse or promote products derived from this software 22 | * without specific prior written permission. 23 | * 24 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 | * SUCH DAMAGE. 35 | * 36 | * From FreeBSD fnmatch.c 1.11 37 | * $Id: fnmatch.c,v 1.3 1997/08/19 02:34:30 jdp Exp $ 38 | */ 39 | 40 | #if defined(LIBC_SCCS) && !defined(lint) 41 | static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; 42 | #endif /* LIBC_SCCS and not lint */ 43 | 44 | /* 45 | * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6. 46 | * Compares a filename or pathname to a pattern. 47 | */ 48 | 49 | #include 50 | #include 51 | #include 52 | 53 | #include "fnmatch.h" 54 | 55 | #define EOS '\0' 56 | 57 | static const char *rangematch(const char *, char, int); 58 | 59 | int 60 | fnmatch(const char *pattern, const char *string, int flags) 61 | { 62 | const char *stringstart; 63 | char c, test; 64 | 65 | for (stringstart = string;;) 66 | switch (c = *pattern++) { 67 | case EOS: 68 | if ((flags & FNM_LEADING_DIR) && *string == '/') 69 | return (0); 70 | return (*string == EOS ? 0 : FNM_NOMATCH); 71 | case '?': 72 | if (*string == EOS) 73 | return (FNM_NOMATCH); 74 | if (*string == '/' && (flags & FNM_PATHNAME)) 75 | return (FNM_NOMATCH); 76 | if (*string == '.' && (flags & FNM_PERIOD) && 77 | (string == stringstart || 78 | ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) 79 | return (FNM_NOMATCH); 80 | ++string; 81 | break; 82 | case '*': 83 | c = *pattern; 84 | /* Collapse multiple stars. */ 85 | while (c == '*') 86 | c = *++pattern; 87 | 88 | if (*string == '.' && (flags & FNM_PERIOD) && 89 | (string == stringstart || 90 | ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) 91 | return (FNM_NOMATCH); 92 | 93 | /* Optimize for pattern with * at end or before /. */ 94 | if (c == EOS) 95 | if (flags & FNM_PATHNAME) 96 | return ((flags & FNM_LEADING_DIR) || 97 | strchr(string, '/') == NULL ? 98 | 0 : FNM_NOMATCH); 99 | else 100 | return (0); 101 | else if (c == '/' && flags & FNM_PATHNAME) { 102 | if ((string = strchr(string, '/')) == NULL) 103 | return (FNM_NOMATCH); 104 | break; 105 | } 106 | 107 | /* General case, use recursion. */ 108 | while ((test = *string) != EOS) { 109 | if (!fnmatch(pattern, string, flags & ~FNM_PERIOD)) 110 | return (0); 111 | if (test == '/' && flags & FNM_PATHNAME) 112 | break; 113 | ++string; 114 | } 115 | return (FNM_NOMATCH); 116 | case '[': 117 | if (*string == EOS) 118 | return (FNM_NOMATCH); 119 | if (*string == '/' && flags & FNM_PATHNAME) 120 | return (FNM_NOMATCH); 121 | if ((pattern = 122 | rangematch(pattern, *string, flags)) == NULL) 123 | return (FNM_NOMATCH); 124 | ++string; 125 | break; 126 | case '\\': 127 | if (!(flags & FNM_NOESCAPE)) { 128 | if ((c = *pattern++) == EOS) { 129 | c = '\\'; 130 | --pattern; 131 | } 132 | } 133 | /* FALLTHROUGH */ 134 | default: 135 | if (c == *string) 136 | ; 137 | else if ((flags & FNM_CASEFOLD) && 138 | (tolower((unsigned char)c) == 139 | tolower((unsigned char)*string))) 140 | ; 141 | else if ((flags & FNM_PREFIX_DIRS) && *string == EOS && 142 | ((c == '/' && string != stringstart) || 143 | (string == stringstart+1 && *stringstart == '/'))) 144 | return (0); 145 | else 146 | return (FNM_NOMATCH); 147 | string++; 148 | break; 149 | } 150 | /* NOTREACHED */ 151 | } 152 | 153 | static const char * 154 | rangematch(const char *pattern, char test, int flags) 155 | { 156 | int negate, ok; 157 | char c, c2; 158 | 159 | /* 160 | * A bracket expression starting with an unquoted circumflex 161 | * character produces unspecified results (IEEE 1003.2-1992, 162 | * 3.13.2). This implementation treats it like '!', for 163 | * consistency with the regular expression syntax. 164 | * J.T. Conklin (conklin@ngai.kaleida.com) 165 | */ 166 | if ( (negate = (*pattern == '!' || *pattern == '^')) ) 167 | ++pattern; 168 | 169 | if (flags & FNM_CASEFOLD) 170 | test = tolower((unsigned char)test); 171 | 172 | for (ok = 0; (c = *pattern++) != ']';) { 173 | if (c == '\\' && !(flags & FNM_NOESCAPE)) 174 | c = *pattern++; 175 | if (c == EOS) 176 | return (NULL); 177 | 178 | if (flags & FNM_CASEFOLD) 179 | c = tolower((unsigned char)c); 180 | 181 | if (*pattern == '-' 182 | && (c2 = *(pattern+1)) != EOS && c2 != ']') { 183 | pattern += 2; 184 | if (c2 == '\\' && !(flags & FNM_NOESCAPE)) 185 | c2 = *pattern++; 186 | if (c2 == EOS) 187 | return (NULL); 188 | 189 | if (flags & FNM_CASEFOLD) 190 | c2 = tolower((unsigned char)c2); 191 | 192 | if ((unsigned char)c <= (unsigned char)test && 193 | (unsigned char)test <= (unsigned char)c2) 194 | ok = 1; 195 | } else if (c == test) 196 | ok = 1; 197 | } 198 | return (ok == negate ? NULL : pattern); 199 | } --------------------------------------------------------------------------------