You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(25) |
Aug
(17) |
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(8) |
Sep
(8) |
Oct
|
Nov
|
Dec
(1) |
2003 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael M. <mar...@us...> - 2004-08-29 23:12:20
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28049 Modified Files: README Log Message: update the readme Index: README =================================================================== RCS file: /cvsroot/fcgp/lgp/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** README 11 Jul 2004 21:44:17 -0000 1.6 --- README 29 Aug 2004 23:12:11 -0000 1.7 *************** *** 1,7 **** This is a set of scripts to create a poster of the Linux kernel ! (v2.4.x at the moment). This process takes ~9 hours on my 400MHz ! Mobile Pentium II laptop. ! Update by creinig: The current code is much faster, taking only barely 30 minutes on a 400MHz Celeron machine or ~13 minutes on my 1.2 GHz Athlon --- 1,7 ---- This is a set of scripts to create a poster of the Linux kernel ! (v1.2 to 2.6 at the moment). For a 2.6 kernel this will take about ! 20 min on a 2.2GHz or a simple 5 min for a 2.0 :-) ! The current code is much faster than it once was, taking only barely 30 minutes on a 400MHz Celeron machine or ~13 minutes on my 1.2 GHz Athlon *************** *** 9,14 **** Thanks to Linuxcare for providing sustenance during coding. ! This entire archive is (c) Paul `Rusty' Russell, and placed under the ! GPL. To make the poster: --- 9,14 ---- Thanks to Linuxcare for providing sustenance during coding. ! This archive was originally (c) Paul `Rusty' Russell, and placed under the ! GPL. Also (c) Christian Reiniger, Michael Marineau, and other contributors. To make the poster: *************** *** 49,52 **** --- 49,55 ---- For example, to print the poster in two long halves use: ./posterize 3ft 2 + NOTE: This requires that your plotter be able to print non standard + paper sizes. The one I use cannot, so let me know if this actually + works with a plotter out there :-) 3) You will now have all the files called poster.1.1.ps.gz to *************** *** 78,84 **** http://www.everythinglinux.com.au Enjoy your poster! - Rusty. --- 81,87 ---- http://www.everythinglinux.com.au + (well, not any more...) Enjoy your poster! |
From: Michael M. <mar...@us...> - 2004-08-29 23:04:03
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26564 Modified Files: Changelog Log Message: update changelog Index: Changelog =================================================================== RCS file: /cvsroot/fcgp/lgp/Changelog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Changelog 1 Sep 2001 11:28:44 -0000 1.2 --- Changelog 29 Aug 2004 23:03:54 -0000 1.3 *************** *** 1,2 **** --- 1,31 ---- + 2.6.0a + ----- + + * Oops: Forgot to update this changelog. + + 2.6.0 + ----- + + * Divisions in ring 4 (useful for 2.6 so sound, security, and cypto directories + can have their own sections, or possibly even divide up drivers) + * Resizing the title based on the size of the diagram so title doesn't fall off + the page when graphing smaller projects. (like linux 1.2.0) I think I will + add this feature to the key and authors sometime in the future. + * Corrected a problem where if a division in a ring is small and it containes + a file that was a bit large the radious will be increased leaving a bunch of + blank rows untill the function fits inside the small angle. It now forces it + to not add any blank rows. This seems to work ok, but maybe a better solution + will be found sometime. + * Included the fixes that were posted to the patches section on the sf site. + * Make output sizes more flexable, create a long ps image based only on the + width. This is useful for plotters so the image can be split in only one + direction. ie `posterize 3ft 2` will produce two 3' wide images, splitting + the poster into two pieces. + BIG NOTE: I have not yet found a plotter that this works on (not that I've + tried more than one). Please let me know if this actually works. + * Increased the font size to make a 2.6 kernel nearly readable (need a high + dpi) when printed in a 6ft wide format. + + 2.5.2 ----- |
From: Michael M. <mar...@us...> - 2004-08-29 22:35:40
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21488 Modified Files: conglomerate_functions.pl posterize Log Message: Up font size and add a paper size Index: conglomerate_functions.pl =================================================================== RCS file: /cvsroot/fcgp/lgp/conglomerate_functions.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** conglomerate_functions.pl 13 Jul 2004 03:29:51 -0000 1.11 --- conglomerate_functions.pl 29 Aug 2004 22:35:28 -0000 1.12 *************** *** 42,46 **** # Draw box with file name #@Arranged = Box ('normal', 'Helvetica-Bold', 32, $CFile, $LastLine); ! @Arranged = Box ('normal', 'Helvetica-Bold', 38, $CFile, $LastLine); splice(@Arranged, $#Arranged, 0, "grestore\n"); print @Arranged; --- 42,47 ---- # Draw box with file name #@Arranged = Box ('normal', 'Helvetica-Bold', 32, $CFile, $LastLine); ! #@Arranged = Box ('normal', 'Helvetica-Bold', 38, $CFile, $LastLine); ! @Arranged = Box ('normal', 'Helvetica-Bold', 42, $CFile, $LastLine); splice(@Arranged, $#Arranged, 0, "grestore\n"); print @Arranged; *************** *** 121,125 **** #push (@Output, Box ('dashed', 'Helvetica', 24, $FuncName, $LastLine)); ! push (@Output, Box ('dashed', 'Helvetica', 28, $FuncName, $LastLine)); # Slap over the top. --- 122,127 ---- #push (@Output, Box ('dashed', 'Helvetica', 24, $FuncName, $LastLine)); ! #push (@Output, Box ('dashed', 'Helvetica', 28, $FuncName, $LastLine)); ! push (@Output, Box ('dashed', 'Helvetica', 32, $FuncName, $LastLine)); # Slap over the top. Index: posterize =================================================================== RCS file: /cvsroot/fcgp/lgp/posterize,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** posterize 13 Jul 2004 03:29:51 -0000 1.16 --- posterize 29 Aug 2004 22:35:28 -0000 1.17 *************** *** 8,12 **** { [ -n "$1" ] && echo "$1" >&2 ! echo 'Usage: posterize [letter|a4|a3|a2|a1|a0|11x17|3ft] num-pages' >&2 echo ' eg. To produce a 6x6 poster of A4 pages: posterize a4 6' >&2 echo ' It is possible to set only the width' >&2 --- 8,12 ---- { [ -n "$1" ] && echo "$1" >&2 ! echo 'Usage: posterize [letter|a4|a3|a2|a1|a0|11x17|archE] num-pages' >&2 echo ' eg. To produce a 6x6 poster of A4 pages: posterize a4 6' >&2 echo ' It is possible to set only the width' >&2 *************** *** 28,34 **** 11x17) PAPER_WIDTH=792; PAPER_HEIGHT=1224;; poster) PAPER_WIDTH=3024; PAPER_HEIGHT=4000; DISTORT=1;; ! 3ft) PAPER_WIDTH=2692; PAPER_HEIGHT=0;; ! 4ft) PAPER_WIDTH=3456; PAPER_HEIGHT=0;; ! 11in) PAPER_WIDTH=612; PAPER_HEIGHT=0;; # Add your paper here... *) printusage "Unknown papersize $1. Change, or edit script.";; --- 28,37 ---- 11x17) PAPER_WIDTH=792; PAPER_HEIGHT=1224;; poster) PAPER_WIDTH=3024; PAPER_HEIGHT=4000; DISTORT=1;; ! archE) PAPER_WIDTH=2592; PAPER_HEIGHT=3456;; ! 3ft) PAPER_WIDTH=2692; PAPER_HEIGHT=0;; # 3ft, 4ft, and 11in produce ! 4ft) PAPER_WIDTH=3456; PAPER_HEIGHT=0;; # long strips. This could be useful ! 11in) PAPER_WIDTH=612; PAPER_HEIGHT=0;; # on plotters that print from a roll ! # of paper, but it didn't work with ! # the plotter I tried :-( # Add your paper here... *) printusage "Unknown papersize $1. Change, or edit script.";; |
From: Michael M. <mar...@us...> - 2004-07-13 03:30:03
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15503 Modified Files: conglomerate_functions.pl posterize title-template.ps Log Message: Tweek the font size up a little to make it a bit more readable Index: conglomerate_functions.pl =================================================================== RCS file: /cvsroot/fcgp/lgp/conglomerate_functions.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** conglomerate_functions.pl 12 Jul 2004 03:20:29 -0000 1.10 --- conglomerate_functions.pl 13 Jul 2004 03:29:51 -0000 1.11 *************** *** 41,45 **** # Draw box with file name ! @Arranged = Box ('normal', 'Helvetica-Bold', 32, $CFile, $LastLine); splice(@Arranged, $#Arranged, 0, "grestore\n"); print @Arranged; --- 41,46 ---- # Draw box with file name ! #@Arranged = Box ('normal', 'Helvetica-Bold', 32, $CFile, $LastLine); ! @Arranged = Box ('normal', 'Helvetica-Bold', 38, $CFile, $LastLine); splice(@Arranged, $#Arranged, 0, "grestore\n"); print @Arranged; *************** *** 119,123 **** $FuncName =~ s/^[^.]+\.c\.(.+?)\..*$/$1/; ! push (@Output, Box ('dashed', 'Helvetica', 24, $FuncName, $LastLine)); # Slap over the top. --- 120,125 ---- $FuncName =~ s/^[^.]+\.c\.(.+?)\..*$/$1/; ! #push (@Output, Box ('dashed', 'Helvetica', 24, $FuncName, $LastLine)); ! push (@Output, Box ('dashed', 'Helvetica', 28, $FuncName, $LastLine)); # Slap over the top. Index: posterize =================================================================== RCS file: /cvsroot/fcgp/lgp/posterize,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** posterize 11 Jul 2004 21:44:17 -0000 1.15 --- posterize 13 Jul 2004 03:29:51 -0000 1.16 *************** *** 29,32 **** --- 29,33 ---- poster) PAPER_WIDTH=3024; PAPER_HEIGHT=4000; DISTORT=1;; 3ft) PAPER_WIDTH=2692; PAPER_HEIGHT=0;; + 4ft) PAPER_WIDTH=3456; PAPER_HEIGHT=0;; 11in) PAPER_WIDTH=612; PAPER_HEIGHT=0;; # Add your paper here... Index: title-template.ps =================================================================== RCS file: /cvsroot/fcgp/lgp/title-template.ps,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** title-template.ps 11 Jul 2004 21:44:17 -0000 1.4 --- title-template.ps 13 Jul 2004 03:29:51 -0000 1.5 *************** *** 4,6 **** /Helvetica-Oblique findfont dup 1 scalefont setfont __SIZE_2__ 3 -1 roll stringwidth pop div scalefont setfont show ! % bound -__SIZE_4__ -__SIZE_8__ __SIZE_4__ 0 --- 4,6 ---- /Helvetica-Oblique findfont dup 1 scalefont setfont __SIZE_2__ 3 -1 roll stringwidth pop div scalefont setfont show ! % bound -__SIZE_4__ -__SIZE_8__ __SIZE_4__ __SIZE_16__ |
From: Michael M. <mar...@us...> - 2004-07-12 03:20:55
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22397 Modified Files: Makefile conglomerate_functions.pl draw_arrangement.c gen_makefile.sh Log Message: Add small row scrunch to squish a small row in where it would otherwise waste a lot of space Index: Makefile =================================================================== RCS file: /cvsroot/fcgp/lgp/Makefile,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** Makefile 11 Jul 2004 21:44:17 -0000 1.18 --- Makefile 12 Jul 2004 03:20:29 -0000 1.19 *************** *** 6,9 **** --- 6,13 ---- #FILE_SCRUNCH=0.8 FILE_SCRUNCH=1 + # How much to overlap files to pack them into a small row + SMALL_ROW_SCRUNCH=0.9 + # Max row size SMALL_ROW_SCRUNCH should try to create + SMALL_ROW_MAX=2 # How much to overlap functions. #FUNCTION_SCRUNCH=0.9 *************** *** 100,104 **** image/Makefile: gen_makefile.sh @echo STAGE 2: Creating PostScript... ! FILE_SCRUNCH="$(FILE_SCRUNCH)" RING1="$(RING1)" RING2="$(RING2)" RING3="$(RING3)" RING4="$(RING4)" FUNCTION_SCRUNCH="$(FUNCTION_SCRUNCH)" BOX_SCRUNCH="$(BOX_SCRUNCH)" INNER_RADIUS=$(INNER_RADIUS) DIR_SPACING=$(DIR_SPACING) RING_SPACING=$(RING_SPACING) ./gen_makefile.sh > $@ define COPY_FUNCS --- 104,108 ---- image/Makefile: gen_makefile.sh @echo STAGE 2: Creating PostScript... ! FILE_SCRUNCH="$(FILE_SCRUNCH)" SMALL_ROW_SCRUNCH="$(SMALL_ROW_SCRUNCH)" SMALL_ROW_MAX="$(SMALL_ROW_MAX)" RING1="$(RING1)" RING2="$(RING2)" RING3="$(RING3)" RING4="$(RING4)" FUNCTION_SCRUNCH="$(FUNCTION_SCRUNCH)" BOX_SCRUNCH="$(BOX_SCRUNCH)" INNER_RADIUS=$(INNER_RADIUS) DIR_SPACING=$(DIR_SPACING) RING_SPACING=$(RING_SPACING) ./gen_makefile.sh > $@ define COPY_FUNCS Index: conglomerate_functions.pl =================================================================== RCS file: /cvsroot/fcgp/lgp/conglomerate_functions.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** conglomerate_functions.pl 18 Aug 2001 17:01:15 -0000 1.9 --- conglomerate_functions.pl 12 Jul 2004 03:20:29 -0000 1.10 *************** *** 28,32 **** } ! my @Arranged = `../draw_arrangement $SCRUNCH 0 360 0 $ArgList`; my $CFile = $ARGV [0]; --- 28,32 ---- } ! my @Arranged = `../draw_arrangement $SCRUNCH 0 360 0 1 1 $ArgList`; my $CFile = $ARGV [0]; Index: draw_arrangement.c =================================================================== RCS file: /cvsroot/fcgp/lgp/draw_arrangement.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** draw_arrangement.c 11 Jul 2004 21:44:17 -0000 1.5 --- draw_arrangement.c 12 Jul 2004 03:20:29 -0000 1.6 *************** *** 87,91 **** #define MAX_IMAGES 5000 ! /* scrunchfactor minangle angle minradius */ int main(int argc, const char *argv[]) { --- 87,91 ---- #define MAX_IMAGES 5000 ! /* scrunchfactor minangle angle minradius small_row_scrunch small_row_max*/ int main(int argc, const char *argv[]) { *************** *** 94,100 **** --- 94,105 ---- double total_angle = atof(argv[3]); double minradius, init_minradius = atof(argv[4]); + double small_row_scrunch = atof(argv[5]); + int small_row_max = atoi(argv[6]); struct bounding_box bound[MAX_IMAGES]; float dist[MAX_IMAGES], ang[MAX_IMAGES]; float angle, largest_radius; + /*for testing if a small row can be scrunched (if it comes to that)*/ + float angle_scrunch, angscrunch[MAX_IMAGES]; + int didscrunch; unsigned int order[MAX_IMAGES]; unsigned int i, j, first_in_this_ring; *************** *** 102,107 **** /* Eliminate progname and args */ ! argv += 5; ! argc -= 5; if (argc > MAX_IMAGES) { --- 107,112 ---- /* Eliminate progname and args */ ! argv += 7; ! argc -= 7; if (argc > MAX_IMAGES) { *************** *** 159,165 **** --- 164,175 ---- /* Put each one in its place */ angle = 0; + angle_scrunch = 0; + didscrunch = 0; first_in_this_ring = 0; for (i = 0; i < argc;) { float radius, degrees; + /*for testing if a small row can be scrunched (if it comes to that)*/ + float degrees_scrunch; + int doscrunch = 0; /* Radius for our center */ radius = minradius + DIAMETER(order[i])/2; *************** *** 173,202 **** degrees = DIAMETER(order[i]) / (radius * 2 * M_PI) * 360 * scrunch_factor; /* Can't fit? Enlarge radius and try again. */ ! /* FIXME: don't enlarge radious if i is already the only member ! of the ring. This could cause some problems if the function ! is way to large, but works better than having blank rows */ if (angle + degrees > total_angle && i > first_in_this_ring) { ! /* Cool, lets stretch out this ring to use whole angle ! */ ! /* FIXME: make this random, to avoid lines */ ! for (j = first_in_this_ring; j < i; j++) ! ang[order[j]] *= total_angle/angle; ! ! /* And go to next ring */ ! first_in_this_ring = i; ! angle = 0; ! minradius += largest_radius*2*radius_scrunch; ! largest_radius = 0; ! continue; } ! ! /* This is the position of the center */ ! ang[order[i]] = angle + degrees/2; ! dist[order[i]] = radius; ! angle += degrees; ! ! i++; } /* Stretch out last ring to use whole angle */ --- 183,232 ---- degrees = DIAMETER(order[i]) / (radius * 2 * M_PI) * 360 * scrunch_factor; + degrees_scrunch = DIAMETER(order[i]) / (radius * 2 * M_PI) * 360 + * small_row_scrunch; /* Can't fit? Enlarge radius and try again. */ ! /* NOTE: don't enlarge radious if i is already the only member ! of the ring. Also, don't enlage if row is small and can ! be scrunched to fit*/ if (angle + degrees > total_angle && i > first_in_this_ring) { ! if (angle_scrunch + degrees_scrunch <= total_angle && ! i - first_in_this_ring < small_row_max) { ! doscrunch = 1; ! didscrunch = 1; ! } ! else { ! /* Cool, lets stretch out this ring to use whole angle */ ! /* FIXME: make this random, to avoid lines */ ! for (j = first_in_this_ring; j < i; j++) ! ang[order[j]] *= total_angle/angle; ! ! /* And go to next ring */ ! first_in_this_ring = i; ! angle = 0; ! angle_scrunch = 0; ! minradius += largest_radius*2*radius_scrunch; ! largest_radius = 0; ! continue; ! } } ! ! /* This is the position of the center */ ! ang[order[i]] = angle + degrees/2; ! angscrunch[order[i]] = angle_scrunch + degrees_scrunch/2; ! dist[order[i]] = radius; ! angle += degrees; ! angle_scrunch += degrees_scrunch; ! ! /* set angles to scrunch if we got out of jumping a row above ! * by using the small row scrunch */ ! if (doscrunch) { ! for (j = first_in_this_ring; j <= i; j++) { ! ang[order[j]] = angscrunch[order[j]]; ! angle = angle_scrunch; ! } ! doscrunch = 0; ! } ! i++; } /* Stretch out last ring to use whole angle */ *************** *** 205,209 **** /* Start again with more stretch if too spaced out at end */ ! if (first_in_this_ring && total_angle/angle > 1.2 * scrunch_factor) { scrunch_factor *= 1.02; goto again; --- 235,240 ---- /* Start again with more stretch if too spaced out at end */ ! if (first_in_this_ring && total_angle/angle > 1.2 * scrunch_factor && ! !didscrunch) { scrunch_factor *= 1.02; goto again; Index: gen_makefile.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/gen_makefile.sh,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** gen_makefile.sh 11 Jul 2004 21:44:17 -0000 1.16 --- gen_makefile.sh 12 Jul 2004 03:20:29 -0000 1.17 *************** *** 78,90 **** echo "%-ring2.ps: %-ring2.angle ring1.radius" echo " @echo Rendering \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring1.radius\` \`find \$* -name '*-all.ps'\` > \$@" echo "%-ring3.ps: %-ring3.angle ring2.radius" echo " @echo Rendering \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring2.radius\` \`find \$* -name '*-all.ps'\` > \$@" echo "%-ring4.ps: %-ring4.angle ring3.radius" echo " @echo Rendering \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring3.radius\` \`find \$* -name '*-all.ps'\` > \$@" # How to extract radii --- 78,90 ---- echo "%-ring2.ps: %-ring2.angle ring1.radius" echo " @echo Rendering \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring1.radius\` $SMALL_ROW_SCRUNCH $SMALL_ROW_MAX \`find \$* -name '*-all.ps'\` > \$@" echo "%-ring3.ps: %-ring3.angle ring2.radius" echo " @echo Rendering \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring2.radius\` $SMALL_ROW_SCRUNCH $SMALL_ROW_MAX \`find \$* -name '*-all.ps'\` > \$@" echo "%-ring4.ps: %-ring4.angle ring3.radius" echo " @echo Rendering \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring3.radius\` $SMALL_ROW_SCRUNCH $SMALL_ROW_MAX \`find \$* -name '*-all.ps'\` > \$@" # How to extract radii |
From: Michael M. <mar...@us...> - 2004-07-11 21:44:32
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3572 Modified Files: Makefile README draw_arrangement.c gen_makefile.sh make-outline.sh place.sh posterize rotary_arrange.sh title-template.ps total_area.pl Log Message: many changes: fix depriciated tail option, more flexable poster output (allow long 3ft pages), and fix overlapping files in small angles Index: Makefile =================================================================== RCS file: /cvsroot/fcgp/lgp/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** Makefile 6 Jun 2004 08:10:54 -0000 1.17 --- Makefile 11 Jul 2004 21:44:17 -0000 1.18 *************** *** 28,35 **** RING1:=init lib mm kernel ipc ! RING2:=$(sort net fs) ! RING3:=$(sort $(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/arch/*))) ! RING4:=drivers #crypto sound security #RING4:=$(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/drivers/*)) CFLAGS:=-Wall -O2 --- 28,36 ---- RING1:=init lib mm kernel ipc ! RING2:=net fs ! RING3:=$(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/arch/*)) ! RING4:=drivers crypto sound security #RING4:=$(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/drivers/*)) + #add mkdir image/drivers to use the split out drivers in ring 4 CFLAGS:=-Wall -O2 *************** *** 110,114 **** # Copy functions over a certain size from kernel sources. image: ! @mkdir image && mkdir image/arch image/ring1: --- 111,115 ---- # Copy functions over a certain size from kernel sources. image: ! @mkdir image && mkdir image/arch #&& mkdir image/drivers image/ring1: Index: README =================================================================== RCS file: /cvsroot/fcgp/lgp/README,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** README 25 Nov 2001 14:52:09 -0000 1.5 --- README 11 Jul 2004 21:44:17 -0000 1.6 *************** *** 45,48 **** --- 45,53 ---- 6x6 A4 sheets. + If you are using a 3' plotter that can run any length of page, + use the paper size 3ft which will set the length of the image. + For example, to print the poster in two long halves use: + ./posterize 3ft 2 + 3) You will now have all the files called poster.1.1.ps.gz to poster.6.6.ps.gz. You will need to print them, something like so: Index: draw_arrangement.c =================================================================== RCS file: /cvsroot/fcgp/lgp/draw_arrangement.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** draw_arrangement.c 6 Jun 2004 08:10:54 -0000 1.4 --- draw_arrangement.c 11 Jul 2004 21:44:17 -0000 1.5 *************** *** 114,118 **** char command[1024]; ! sprintf(command, "tail -1 %s", argv[i]); fp = popen(command, "r"); if (fscanf(fp, "%% bound %f %f %f %f", --- 114,118 ---- char command[1024]; ! sprintf(command, "tail -n 1 %s", argv[i]); fp = popen(command, "r"); if (fscanf(fp, "%% bound %f %f %f %f", *************** *** 186,190 **** /* And go to next ring */ ! first_in_this_ring = i+1; angle = 0; minradius += largest_radius*2*radius_scrunch; --- 186,190 ---- /* And go to next ring */ ! first_in_this_ring = i; angle = 0; minradius += largest_radius*2*radius_scrunch; Index: gen_makefile.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/gen_makefile.sh,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** gen_makefile.sh 6 Jun 2004 08:10:54 -0000 1.15 --- gen_makefile.sh 11 Jul 2004 21:44:17 -0000 1.16 *************** *** 12,16 **** echo ' grep -v "^% bound" < $< > $@' # Need last comment (bounding box) ! echo ' tail -1 $< >> $@' echo ' ls -l image.ps image-unop.ps' --- 12,16 ---- echo ' grep -v "^% bound" < $< > $@' # Need last comment (bounding box) ! echo ' tail -n 1 $< >> $@' echo ' ls -l image.ps image-unop.ps' *************** *** 21,25 **** echo ' ../place.sh above ../title.ps $@ >> $@' # Bounding box is at bottom now. Next two won't change it. ! echo ' tail -1 $@ > bounding-box' echo ' cat outline.ps >> $@' echo ' cat ../tux.ps >> $@' --- 21,25 ---- echo ' ../place.sh above ../title.ps $@ >> $@' # Bounding box is at bottom now. Next two won't change it. ! echo ' tail -n 1 $@ > bounding-box' echo ' cat outline.ps >> $@' echo ' cat ../tux.ps >> $@' *************** *** 90,94 **** # How to extract radii echo "%.radius: %.ps" ! echo ' @echo scale=2\; `tail -1 $< | sed "s/^.* //"` + '$RING_SPACING' | bc > $@' echo --- 90,94 ---- # How to extract radii echo "%.radius: %.ps" ! echo ' @echo scale=2\; `tail -n 1 $< | sed "s/^.* //"` + '$RING_SPACING' | bc > $@' echo Index: make-outline.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/make-outline.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** make-outline.sh 6 Jun 2004 08:10:54 -0000 1.6 --- make-outline.sh 11 Jul 2004 21:44:17 -0000 1.7 *************** *** 10,17 **** OUTLINE_SPACING=`echo "scale=2; $3 * 3" | bc` ! RING1_BOUND=`tail -1 ring1.ps | awk '{print $5}'` ! RING2_BOUND=`tail -1 ring2.ps | awk '{print $5}'` ! RING3_BOUND=`tail -1 ring3.ps | awk '{print $5}'` ! RING4_BOUND=`tail -1 ring4.ps | awk '{print $5}'` # Add in some spacing (multiple of ring spacing). --- 10,17 ---- OUTLINE_SPACING=`echo "scale=2; $3 * 3" | bc` ! RING1_BOUND=`tail -n 1 ring1.ps | awk '{print $5}'` ! RING2_BOUND=`tail -n 1 ring2.ps | awk '{print $5}'` ! RING3_BOUND=`tail -n 1 ring3.ps | awk '{print $5}'` ! RING4_BOUND=`tail -n 1 ring4.ps | awk '{print $5}'` # Add in some spacing (multiple of ring spacing). Index: place.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/place.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** place.sh 6 Jun 2004 08:10:54 -0000 1.2 --- place.sh 11 Jul 2004 21:44:17 -0000 1.3 *************** *** 6,18 **** # Get bounds of the image we're relative to. # eg. % bound -1538.51 -1552.25 1499.18 1645.42 ! LEFT_BOUND=`tail -1 $3 | awk '{ print $3 }'` ! LOWER_BOUND=`tail -1 $3 | awk '{ print $4 }'` ! RIGHT_BOUND=`tail -1 $3 | awk '{ print $5 }'` ! UPPER_BOUND=`tail -1 $3 | awk '{ print $6 }'` SIZE_2=`echo "($RIGHT_BOUND - $LEFT_BOUND)/2" | bc` SIZE_4=`echo "($RIGHT_BOUND - $LEFT_BOUND)/4" | bc` SIZE_8=`echo "($RIGHT_BOUND - $LEFT_BOUND)/8" | bc` ! sed -e "s/__SIZE_2__/$SIZE_2/" -e "s/__SIZE_4__/$SIZE_4/" -e "s/__SIZE_8__/$SIZE_8/" \ < $2 > temp --- 6,20 ---- # Get bounds of the image we're relative to. # eg. % bound -1538.51 -1552.25 1499.18 1645.42 ! LEFT_BOUND=`tail -n 1 $3 | awk '{ print $3 }'` ! LOWER_BOUND=`tail -n 1 $3 | awk '{ print $4 }'` ! RIGHT_BOUND=`tail -n 1 $3 | awk '{ print $5 }'` ! UPPER_BOUND=`tail -n 1 $3 | awk '{ print $6 }'` SIZE_2=`echo "($RIGHT_BOUND - $LEFT_BOUND)/2" | bc` SIZE_4=`echo "($RIGHT_BOUND - $LEFT_BOUND)/4" | bc` SIZE_8=`echo "($RIGHT_BOUND - $LEFT_BOUND)/8" | bc` + SIZE_16=`echo "($RIGHT_BOUND - $LEFT_BOUND)/16" | bc` ! sed -e "s/__SIZE_2__/$SIZE_2/" -e "s/__SIZE_4__/$SIZE_4/" \ ! -e "s/__SIZE_8__/$SIZE_8/" -e "s/__SIZE_16__/$SIZE_16/" \ < $2 > temp *************** *** 20,25 **** in bottom-right) ! MY_RIGHT_BOUND=`tail -1 temp | awk '{ print $5 }'` ! MY_LOWER_BOUND=`tail -1 temp | awk '{ print $4 }'` echo "% Place at bottom right" echo gsave --- 22,27 ---- in bottom-right) ! MY_RIGHT_BOUND=`tail -n 1 temp | awk '{ print $5 }'` ! MY_LOWER_BOUND=`tail -n 1 temp | awk '{ print $4 }'` echo "% Place at bottom right" echo gsave *************** *** 27,32 **** ;; bottom-left) ! MY_LEFT_BOUND=`tail -1 temp | awk '{ print $3 }'` ! MY_LOWER_BOUND=`tail -1 temp | awk '{ print $4 }'` echo "% Place at bottom left" echo gsave --- 29,34 ---- ;; bottom-left) ! MY_LEFT_BOUND=`tail -n 1 temp | awk '{ print $3 }'` ! MY_LOWER_BOUND=`tail -n 1 temp | awk '{ print $4 }'` echo "% Place at bottom left" echo gsave *************** *** 34,49 **** ;; below) ! MY_UPPER_BOUND=`tail -1 temp | awk '{ print $6 }'` echo "% Place below" echo gsave echo 0 `echo "scale=2; $LOWER_BOUND - $MY_UPPER_BOUND" | bc` translate ! LOWER_BOUND=`echo "scale=2; $LOWER_BOUND - $MY_UPPER_BOUND * 2" | bc` ;; above) ! MY_LOWER_BOUND=`tail -1 temp | awk '{ print $4 }'` echo "% Place above" echo gsave echo 0 `echo "scale=2; $UPPER_BOUND - $MY_LOWER_BOUND" | bc` translate ! UPPER_BOUND=`echo "scale=2; $UPPER_BOUND - $MY_LOWER_BOUND * 2" | bc` ;; *) --- 36,53 ---- ;; below) ! MY_UPPER_BOUND=`tail -n 1 temp | awk '{ print $6 }'` ! MY_LOWER_BOUND=`tail -n 1 temp | awk '{ print $4 }'` echo "% Place below" echo gsave echo 0 `echo "scale=2; $LOWER_BOUND - $MY_UPPER_BOUND" | bc` translate ! LOWER_BOUND=`echo "scale=2; $LOWER_BOUND - $MY_UPPER_BOUND + $MY_LOWER_BOUND" | bc` ;; above) ! MY_UPPER_BOUND=`tail -n 1 temp | awk '{ print $6 }'` ! MY_LOWER_BOUND=`tail -n 1 temp | awk '{ print $4 }'` echo "% Place above" echo gsave echo 0 `echo "scale=2; $UPPER_BOUND - $MY_LOWER_BOUND" | bc` translate ! UPPER_BOUND=`echo "scale=2; $UPPER_BOUND - $MY_LOWER_BOUND + $MY_UPPER_BOUND" | bc` ;; *) Index: posterize =================================================================== RCS file: /cvsroot/fcgp/lgp/posterize,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** posterize 9 Jun 2004 07:28:52 -0000 1.14 --- posterize 11 Jul 2004 21:44:17 -0000 1.15 *************** *** 8,16 **** { [ -n "$1" ] && echo "$1" >&2 ! echo 'Usage: posterize [letter|a4|a3|a0|11x17] num-pages' >&2 echo ' eg. To produce a 6x6 poster of A4 pages: posterize a4 6' >&2 exit 1 } [ $# = 2 ] || printusage --- 8,19 ---- { [ -n "$1" ] && echo "$1" >&2 ! echo 'Usage: posterize [letter|a4|a3|a2|a1|a0|11x17|3ft] num-pages' >&2 echo ' eg. To produce a 6x6 poster of A4 pages: posterize a4 6' >&2 + echo ' It is possible to set only the width' >&2 + echo ' eg. For a 3ft plotter, making two halves: posterize 3ft 2' >&2 exit 1 } + #comment out to allow a third option (for splitting x and y) [ $# = 2 ] || printusage *************** *** 25,32 **** --- 28,45 ---- 11x17) PAPER_WIDTH=792; PAPER_HEIGHT=1224;; poster) PAPER_WIDTH=3024; PAPER_HEIGHT=4000; DISTORT=1;; + 3ft) PAPER_WIDTH=2692; PAPER_HEIGHT=0;; + 11in) PAPER_WIDTH=612; PAPER_HEIGHT=0;; # Add your paper here... *) printusage "Unknown papersize $1. Change, or edit script.";; esac + #if a third argument is allowed, set it to the the width + if [ ! -z $3 ]; then + YPAGES=$3 + else + YPAGES=$2 + fi + XPAGES=$2 + if [ ! -f image.ps ]; then echo 'You need to run "make" first.' >&2 *************** *** 38,54 **** # Filesystem 1k-blocks Used Available Use% Mounted on # /dev/hdb1 29561392 27655164 404556 99% /images ! SPACE=`df -k . | tail +2 | awk '{print $4}'` ! SPACE=`expr $SPACE / 1000` ! if [ `expr $SPACE` -lt `expr $2 \* $2 \* 10` ]; then ! echo "Need `expr $2 \* $2 \* 10` MB free for ${2}x$2 poster; seem to have $SPACE MB." >&2 ! echo "Aborting" >&2 ! exit 1 ! fi # Image bounding box is at bottom, eg: % bound -344.30 -344.30 344.30 344.30 ! LEFT_BOUND=`tail -1 image.ps | awk '{ print $3 }'` ! LOWER_BOUND=`tail -1 image.ps | awk '{ print $4 }'` ! RIGHT_BOUND=`tail -1 image.ps | awk '{ print $5 }'` ! UPPER_BOUND=`tail -1 image.ps | awk '{ print $6 }'` WIDTH=`echo scale=5\; $RIGHT_BOUND - $LEFT_BOUND | bc` --- 51,67 ---- # Filesystem 1k-blocks Used Available Use% Mounted on # /dev/hdb1 29561392 27655164 404556 99% /images ! #SPACE=`df -k . | tail +2 | awk '{print $4}'` ! #SPACE=`expr $SPACE / 1000` ! #if [ `expr $SPACE` -lt `expr $2 \* $2 \* 10` ]; then ! # echo "Need `expr $2 \* $2 \* 10` MB free for ${2}x$2 poster; seem to have $SPACE MB." >&2 ! # echo "Aborting" >&2 ! # exit 1 ! #fi # Image bounding box is at bottom, eg: % bound -344.30 -344.30 344.30 344.30 ! LEFT_BOUND=`tail -n 1 image.ps | awk '{ print $3 }'` ! LOWER_BOUND=`tail -n 1 image.ps | awk '{ print $4 }'` ! RIGHT_BOUND=`tail -n 1 image.ps | awk '{ print $5 }'` ! UPPER_BOUND=`tail -n 1 image.ps | awk '{ print $6 }'` WIDTH=`echo scale=5\; $RIGHT_BOUND - $LEFT_BOUND | bc` *************** *** 56,72 **** # Use 5% margins unless we're 1x1, in which case, 2% margins (no cut marks) ! if [ $2 -eq 1 ]; then ! MARGIN=0.02 else ! MARGIN=0.05 fi ! TOTAL_WIDTH=`echo scale=5\; $2 \* $PAPER_WIDTH \* \(1.0000 - $MARGIN \* 2 \) | bc` ! TOTAL_HEIGHT=`echo scale=5\; $2 \* $PAPER_HEIGHT \* \(1.0000 - $MARGIN \* 2 \) | bc` ! LEFT_MARGIN=`echo $PAPER_WIDTH \* $MARGIN | bc` ! BOTTOM_MARGIN=`echo $PAPER_HEIGHT \* $MARGIN | bc` HEIGHT_SCALE=`echo scale=5\; $TOTAL_HEIGHT / $HEIGHT | bc` WIDTH_SCALE=`echo scale=5\; $TOTAL_WIDTH / $WIDTH | bc` # We choose the minimum of the two scales, unless DISTORT is set. if [ -z "$DISTORT" ]; then --- 69,105 ---- # Use 5% margins unless we're 1x1, in which case, 2% margins (no cut marks) ! if [ $YPAGES -eq 1 ]; then ! YMARGIN=0.02 ! else ! YMARGIN=0.05 ! fi ! if [ $XPAGES -eq 1 ]; then ! XMARGIN=0.02 else ! XMARGIN=0.05 fi ! TOTAL_WIDTH=`echo scale=5\; $XPAGES \* $PAPER_WIDTH \* \(1.0000 - $XMARGIN \* 2 \) | bc` ! TOTAL_HEIGHT=`echo scale=5\; $YPAGES \* $PAPER_HEIGHT \* \(1.0000 - $YMARGIN \* 2 \) | bc` ! BOTTOM_MARGIN=`echo $PAPER_HEIGHT \* $YMARGIN | bc` ! LEFT_MARGIN=`echo $PAPER_WIDTH \* $XMARGIN | bc` HEIGHT_SCALE=`echo scale=5\; $TOTAL_HEIGHT / $HEIGHT | bc` WIDTH_SCALE=`echo scale=5\; $TOTAL_WIDTH / $WIDTH | bc` + if [ $PAPER_HEIGHT -eq 0 ]; then + BOTTOM_MARGIN=$LEFT_MARGIN + TOTAL_HEIGHT=`echo scale=5\; \( $HEIGHT / $WIDTH \* $TOTAL_WIDTH \) | bc` + PAPER_HEIGHT=`echo scale=0\; \($TOTAL_HEIGHT + $BOTTOM_MARGIN \* 2 \) / 1 | bc` + YPAGES=1 + HEIGHT_SCALE=`echo scale=5\; $TOTAL_HEIGHT / $HEIGHT | bc` + else + if [ $PAPER_WIDTH -eq 0 ]; then + LEFT_MARGIN=$BOTTOM_MARGIN + TOTAL_WIDTH=`echo scale=5\; \( $WIDTH / $HEIGHT \* $TOTAL_HEIGHT \) | bc` + PAPER_WIDTH=`echo scale=0\; \($TOTAL_WIDTH + $LEFT_MARGIN \* 2 \) / 1 | bc` + XPAGES=1 + WIDTH_SCALE=`echo scale=5\; $TOTAL_WIDTH / $WIDTH | bc` + fi + fi # We choose the minimum of the two scales, unless DISTORT is set. if [ -z "$DISTORT" ]; then *************** *** 79,89 **** x=1 ! while [ $x -le $2 ]; do y=1 ! while [ $y -le $2 ]; do echo Generating poster.$x.$y.ps... (echo "%!PS-Adobe-1.0" echo "%%DocumentFonts: Helvetica Helvetica-Bold" ! echo "%%Title: Linux 2.4.0 Kernel Poster ($x x $y of $2 x $2)" echo "%%Creator: Rusty's scripts and postersize (GPL)" echo "%%CreationDate: `date`" --- 112,122 ---- x=1 ! while [ $x -le $XPAGES ]; do y=1 ! while [ $y -le $YPAGES ]; do echo Generating poster.$x.$y.ps... (echo "%!PS-Adobe-1.0" echo "%%DocumentFonts: Helvetica Helvetica-Bold" ! echo "%%Title: Linux Kernel Poster ($x x $y of $XPAGES x $YPAGES)" echo "%%Creator: Rusty's scripts and postersize (GPL)" echo "%%CreationDate: `date`" *************** *** 134,139 **** % Tile contents - $x $y /colcount exch def --- 167,172 ---- % Tile contents $y + $x /colcount exch def *************** *** 143,159 **** gsave leftmargin botmargin translate ! pagewidth pageheight translate cutmark 90 rotate cutmark ! 0 pagewidth translate cutmark 90 rotate cutmark ! 0 pageheight translate cutmark 90 rotate cutmark ! 0 pagewidth translate cutmark 90 rotate cutmark ! % print the page label ! 0 setgray ! leftmargin clipmargin 3 mul add clipmargin labelsize add neg botmargin add moveto ! /Helvetica findfont labelsize scalefont setfont ! (Grid \( ) show ! rowcount strg cvs show ! ( , ) show ! colcount strg cvs show ! ( \)) show grestore --- 176,207 ---- gsave leftmargin botmargin translate ! EOF ! #print only the needed cut marks ! echo "pagewidth pageheight translate" ! [ $y -lt $YPAGES ] && echo cutmark ! echo "90 rotate" ! [ $x -lt $XPAGES ] && echo cutmark ! echo "0 pagewidth translate" ! [ $x -gt 1 ] && echo cutmark ! echo "90 rotate" ! [ $y -lt $YPAGES ] && echo cutmark ! echo "0 pageheight translate" ! [ $y -gt 1 ] && echo cutmark ! echo "90 rotate" ! [ $x -gt 1 ] && echo cutmark ! echo "0 pagewidth translate" ! [ $x -lt $XPAGES ] && echo cutmark ! echo "90 rotate" ! [ $y -gt 1 ] && echo cutmark ! cat <<EOF ! % print the page label - commented out for now ! %0 setgray ! %leftmargin clipmargin 3 mul add clipmargin labelsize add neg botmargin add moveto ! %/Helvetica findfont labelsize scalefont setfont ! %(Grid \( ) show ! %rowcount strg cvs show ! %( , ) show ! %colcount strg cvs show ! %( \)) show grestore Index: rotary_arrange.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/rotary_arrange.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** rotary_arrange.sh 6 Jun 2004 08:10:54 -0000 1.3 --- rotary_arrange.sh 11 Jul 2004 21:44:17 -0000 1.4 *************** *** 18,22 **** echo -e "-$ANGLE rotate" echo "/angle angle $ANGLE add def" ! THIS_BOUND=`tail -1 $FILE | awk '{print $5}' | cut -d. -f1` if [ $THIS_BOUND -gt $BOUND ]; then BOUND=$THIS_BOUND; fi done --- 18,22 ---- echo -e "-$ANGLE rotate" echo "/angle angle $ANGLE add def" ! THIS_BOUND=`tail -n 1 $FILE | awk '{print $5}' | cut -d. -f1` if [ $THIS_BOUND -gt $BOUND ]; then BOUND=$THIS_BOUND; fi done Index: title-template.ps =================================================================== RCS file: /cvsroot/fcgp/lgp/title-template.ps,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** title-template.ps 6 Jun 2004 08:10:54 -0000 1.3 --- title-template.ps 11 Jul 2004 21:44:17 -0000 1.4 *************** *** 4,6 **** /Helvetica-Oblique findfont dup 1 scalefont setfont __SIZE_2__ 3 -1 roll stringwidth pop div scalefont setfont show ! % bound -__SIZE_4__ -__SIZE_8__ __SIZE_4__ __SIZE_8__ --- 4,6 ---- /Helvetica-Oblique findfont dup 1 scalefont setfont __SIZE_2__ 3 -1 roll stringwidth pop div scalefont setfont show ! % bound -__SIZE_4__ -__SIZE_8__ __SIZE_4__ 0 Index: total_area.pl =================================================================== RCS file: /cvsroot/fcgp/lgp/total_area.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** total_area.pl 14 Apr 2001 23:36:48 -0000 1.3 --- total_area.pl 11 Jul 2004 21:44:17 -0000 1.4 *************** *** 11,15 **** foreach $FName (@ARGV) { ! $BBox = `tail -1 $FName`; $BBox =~ /(-?[.\d]+)\s+(-?[.\d]+)\s+(-?[.\d]+)\s+(-?[.\d]+)/; my ($xmin, $ymin, $xmax, $ymax) = ($1, $2, $3, $4); --- 11,15 ---- foreach $FName (@ARGV) { ! $BBox = `tail -n 1 $FName`; $BBox =~ /(-?[.\d]+)\s+(-?[.\d]+)\s+(-?[.\d]+)\s+(-?[.\d]+)/; my ($xmin, $ymin, $xmax, $ymax) = ($1, $2, $3, $4); |
From: Christian R. <cr...@us...> - 2004-06-09 07:29:08
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30608 Modified Files: posterize Log Message: * Bugfix: Fixed centering of the image on single sheet (marineam) * Added: 2 new paper sizes (marineam) Index: posterize =================================================================== RCS file: /cvsroot/fcgp/lgp/posterize,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** posterize 5 Jan 2003 14:02:55 -0000 1.13 --- posterize 9 Jun 2004 07:28:52 -0000 1.14 *************** *** 20,23 **** --- 20,25 ---- a4) PAPER_WIDTH=595; PAPER_HEIGHT=842;; a3) PAPER_WIDTH=842; PAPER_HEIGHT=1190;; + a2) PAPER_WIDTH=1190; PAPER_HEIGHT=1684;; + a1) PAPER_WIDTH=1684; PAPER_HEIGHT=2380;; a0) PAPER_WIDTH=2384; PAPER_HEIGHT=3370;; 11x17) PAPER_WIDTH=792; PAPER_HEIGHT=1224;; *************** *** 100,104 **** echo "/ColorManagement {pop} def" echo "" ! echo "0 0 translate 0 rotate 1.2 1 mul 1.2 1 mul scale" echo "" # Draw the clipping stuff (unless 1x1). --- 102,106 ---- echo "/ColorManagement {pop} def" echo "" ! echo "0 0 translate 0 rotate 1 1 mul 1 1 mul scale" echo "" # Draw the clipping stuff (unless 1x1). |
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6187 Modified Files: Makefile authors.ps draw_arrangement.c function2ps.c gen_makefile.sh make-outline.sh place.sh rotary_arrange.sh title-template.ps Log Message: Incorporated big load of fixes by Michael Marineau <mar...@us...> Index: Makefile =================================================================== RCS file: /cvsroot/fcgp/lgp/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** Makefile 17 Dec 2002 12:48:02 -0000 1.16 --- Makefile 6 Jun 2004 08:10:54 -0000 1.17 *************** *** 30,34 **** RING2:=$(sort net fs) RING3:=$(sort $(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/arch/*))) ! RING4:=drivers CFLAGS:=-Wall -O2 --- 30,35 ---- RING2:=$(sort net fs) RING3:=$(sort $(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/arch/*))) ! RING4:=drivers #crypto sound security ! #RING4:=$(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/drivers/*)) CFLAGS:=-Wall -O2 Index: authors.ps =================================================================== RCS file: /cvsroot/fcgp/lgp/authors.ps,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** authors.ps 23 Jul 2001 11:41:00 -0000 1.1 --- authors.ps 6 Jun 2004 08:10:54 -0000 1.2 *************** *** 1,6 **** %% rusty.ps ! -1800 -50 moveto /Helvetica-Oblique findfont 200 scalefont setfont ! (by Rusty Russell, Christian Reiniger) show ! % bound -1800 -50 1800 50 --- 1,6 ---- %% rusty.ps ! -2700 -50 moveto /Helvetica-Oblique findfont 200 scalefont setfont ! (by Rusty Russell, Christian Reiniger, and Michael Marineau) show ! % bound -2700 -50 2700 50 Index: draw_arrangement.c =================================================================== RCS file: /cvsroot/fcgp/lgp/draw_arrangement.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** draw_arrangement.c 14 Aug 2001 14:29:43 -0000 1.3 --- draw_arrangement.c 6 Jun 2004 08:10:54 -0000 1.4 *************** *** 122,126 **** exit(1); } ! fclose(fp); } --- 122,126 ---- exit(1); } ! pclose(fp); } *************** *** 175,179 **** /* Can't fit? Enlarge radius and try again. */ ! if (angle + degrees > total_angle) { /* Cool, lets stretch out this ring to use whole angle */ --- 175,182 ---- /* Can't fit? Enlarge radius and try again. */ ! /* FIXME: don't enlarge radious if i is already the only member ! of the ring. This could cause some problems if the function ! is way to large, but works better than having blank rows */ ! if (angle + degrees > total_angle && i > first_in_this_ring) { /* Cool, lets stretch out this ring to use whole angle */ Index: function2ps.c =================================================================== RCS file: /cvsroot/fcgp/lgp/function2ps.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** function2ps.c 17 Jul 2002 18:05:34 -0000 1.3 --- function2ps.c 6 Jun 2004 08:10:54 -0000 1.4 *************** *** 177,185 **** if (! GetLine (&CFileName)) { ! return 0; } if (! GetLine (&CFuncName)) { ! return 0; } --- 177,185 ---- if (! GetLine (&CFileName)) { ! continue; } if (! GetLine (&CFuncName)) { ! continue; } Index: gen_makefile.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/gen_makefile.sh,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** gen_makefile.sh 14 Aug 2001 10:30:35 -0000 1.14 --- gen_makefile.sh 6 Jun 2004 08:10:54 -0000 1.15 *************** *** 31,41 **** # Rings 1 and 4 are all thrown together. echo RING1_DEPS:=`find $RING1 -name '*.c.*' | sed 's/\.c.*/-all.ps/' | sort | uniq` ! echo RING4_DEPS:=`find $RING4 -name '*.c.*' | sed 's/\.c.*/-all.ps/' | sort | uniq` # Other rings are divided into dirs. echo RING2_DEPS:=`for d in $RING2; do echo $d-ring2.ps; done` echo RING3_DEPS:=`for d in $RING3; do echo $d-ring3.ps; done` echo # First ring starts at inner radius. echo 'ring1.ps: $(RING1_DEPS)' --- 31,44 ---- # Rings 1 and 4 are all thrown together. echo RING1_DEPS:=`find $RING1 -name '*.c.*' | sed 's/\.c.*/-all.ps/' | sort | uniq` ! #echo RING4_DEPS:=`find $RING4 -name '*.c.*' | sed 's/\.c.*/-all.ps/' | sort | uniq` # Other rings are divided into dirs. echo RING2_DEPS:=`for d in $RING2; do echo $d-ring2.ps; done` echo RING3_DEPS:=`for d in $RING3; do echo $d-ring3.ps; done` + echo RING4_DEPS:=`for d in $RING4; do echo $d-ring4.ps; done` + echo + # First ring starts at inner radius. echo 'ring1.ps: $(RING1_DEPS)' *************** *** 50,54 **** echo " @echo Making Ring 2" echo " @echo /angle 0 def > \$@" ! echo " @../rotary_arrange.sh $DIR_SPACING" `for f in $RING2; do echo $f-ring2.ps $f-ring2.angle; done` '>> $@' echo " @echo Done Ring 2" --- 53,57 ---- echo " @echo Making Ring 2" echo " @echo /angle 0 def > \$@" ! echo " @../rotary_arrange.sh $DIR_SPACING" `for f in $RING2; do echo $f-ring2.ps $f-ring2.angle; done | sort` '>> $@' echo " @echo Done Ring 2" *************** *** 57,69 **** echo " @echo Making Ring 3" echo " @echo /angle 0 def > \$@" ! echo " @../rotary_arrange.sh $DIR_SPACING" `for f in $RING3; do echo $f-ring3.ps $f-ring3.angle; done` '>> $@' echo " @echo Done Ring 3" # Outer ring starts at end of fourth ring. # And it's just a big ring of drivers. ! echo 'ring4.ps: $(RING4_DEPS) ring3.radius' echo " @echo Making Ring 4" echo " @echo /angle 0 def > \$@" ! echo " @../draw_arrangement $FILE_SCRUNCH 0 360 \`cat ring3.radius\` \$(RING4_DEPS) >> \$@" echo " @echo Done Ring 4" echo --- 60,73 ---- echo " @echo Making Ring 3" echo " @echo /angle 0 def > \$@" ! echo " @../rotary_arrange.sh $DIR_SPACING" `for f in $RING3; do echo $f-ring3.ps $f-ring3.angle; done | sort` '>> $@' echo " @echo Done Ring 3" # Outer ring starts at end of fourth ring. # And it's just a big ring of drivers. ! echo 'ring4.ps: ring3.ps $(RING4_DEPS)' echo " @echo Making Ring 4" echo " @echo /angle 0 def > \$@" ! #echo " @../draw_arrangement $FILE_SCRUNCH 0 360 \`cat ring3.radius\` \$(RING4_DEPS) >> \$@" ! echo " @../rotary_arrange.sh $DIR_SPACING" `for f in $RING4; do echo $f-ring4.ps $f-ring4.angle; done | sort` '>> $@' echo " @echo Done Ring 4" echo *************** *** 80,83 **** --- 84,91 ---- echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring2.radius\` \`find \$* -name '*-all.ps'\` > \$@" + echo "%-ring4.ps: %-ring4.angle ring3.radius" + echo " @echo Rendering \$@" + echo " @../draw_arrangement $FILE_SCRUNCH 0 \`cat \$<\` \`cat ring3.radius\` \`find \$* -name '*-all.ps'\` > \$@" + # How to extract radii echo "%.radius: %.ps" *************** *** 92,95 **** --- 100,106 ---- echo ' @echo "scale=2; ( 360 - ' `echo $RING3 | wc -w` ' * ' $DIR_SPACING ') * `cat $<` / `cat ring3.weight`" | bc > $@' + echo "%-ring4.angle: %-ring4.weight ring4.weight" + echo ' @echo "scale=2; ( 360 - ' `echo $RING4 | wc -w` ' * ' $DIR_SPACING ') * `cat $<` / `cat ring4.weight`" | bc > $@' + # How to make ring weights (sum directory totals). echo "ring2.weight:" `for d in $RING2; do echo $d-ring2.weight; done` *************** *** 97,100 **** --- 108,113 ---- echo "ring3.weight:" `for d in $RING3; do echo $d-ring3.weight; done` echo ' @cat $^ | ../tally > $@' + echo "ring4.weight:" `for d in $RING4; do echo $d-ring4.weight; done` + echo ' @cat $^ | ../tally > $@' # How to make a wieght. *************** *** 103,106 **** --- 116,121 ---- echo "%-ring3.weight:" `find $RING3 -name '*.c.*' | sed 's/\.c.*/-all.ps/' | sort | uniq` echo ' @../total_area.pl `find $* -name \*-all.ps` > $@' + echo "%-ring4.weight:" `find $RING4 -name '*.c.*' | sed 's/\.c.*/-all.ps/' | sort | uniq` + echo ' @../total_area.pl `find $* -name \*-all.ps` > $@' echo *************** *** 121,125 **** # Generating outline, requires all the angles. ! echo outline.ps: ../make-outline.sh ring1.ps ring2.ps ring3.ps ring4.ps `for f in $RING2; do echo $f-ring2.angle; done` `for f in $RING3; do echo $f-ring3.angle; done` echo " ../make-outline.sh $INNER_RADIUS $DIR_SPACING $RING_SPACING \"$RING1\" > \$@" echo --- 136,140 ---- # Generating outline, requires all the angles. ! echo outline.ps: ../make-outline.sh ring1.ps ring2.ps ring3.ps ring4.ps `for f in $RING2; do echo $f-ring2.angle; done` `for f in $RING3; do echo $f-ring3.angle; done` `for f in $RING4; do echo $f-ring4.angle; done` echo " ../make-outline.sh $INNER_RADIUS $DIR_SPACING $RING_SPACING \"$RING1\" > \$@" echo Index: make-outline.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/make-outline.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** make-outline.sh 5 Jan 2003 14:02:55 -0000 1.5 --- make-outline.sh 6 Jun 2004 08:10:54 -0000 1.6 *************** *** 34,38 **** # Label for inner ring. ! echo "-$RING1_BOUND -$RING1_BOUND moveto" echo "/Helvetica findfont" echo "100 scalefont setfont" --- 34,39 ---- # Label for inner ring. ! #echo "-$RING1_BOUND -$RING1_BOUND moveto" ! echo "`echo $1 + 100 | bc` -50 moveto" echo "/Helvetica findfont" echo "100 scalefont setfont" *************** *** 68,72 **** echo `echo \( $RING3_BOUND + $RING2_BOUND \) / 2 | bc` -200 moveto echo "gsave angle rotate" ! echo "(`echo $f | sed 's/-ring3.angle//'`) show" echo "grestore /angle angle `cat $f` $2 add add def" echo "-`cat $f` rotate" --- 69,73 ---- echo `echo \( $RING3_BOUND + $RING2_BOUND \) / 2 | bc` -200 moveto echo "gsave angle rotate" ! echo "(`echo $f | sed -e 's/-ring3.angle//' -e 's:^./::'`) show" echo "grestore /angle angle `cat $f` $2 add add def" echo "-`cat $f` rotate" *************** *** 76,83 **** # Draw ring4 label ! for f in `find . -name '*-ring4.ps'`; do echo `echo \( $RING4_BOUND + $RING3_BOUND \) / 2 | bc` -200 moveto ! echo "(`echo $f | sed 's/-ring4.ps//'`) show" done echo "stroke" --- 77,103 ---- # Draw ring4 label ! #for f in `find . -name '*-ring4.ps'`; do ! # echo `echo \( $RING4_BOUND + $RING3_BOUND \) / 2 | bc` -200 moveto ! # echo "(`echo $f | sed 's/-ring4.ps//'`) show" ! #done ! ! # Draw ring4 dividers ! remainder=0 ! echo gsave ! # Rotate half back ! echo "$half rotate" ! echo "/angle $half neg def" ! for f in `find . -name '*-ring4.angle' | sort`; do ! if [ `find . -name '*-ring4.angle' | wc -w` -gt 1 ]; then ! echo "$RING3_BOUND 0 moveto $RING4_BOUND 0 lineto stroke" ! fi echo `echo \( $RING4_BOUND + $RING3_BOUND \) / 2 | bc` -200 moveto ! echo "gsave angle rotate" ! echo "(`echo $f | sed -e 's/-ring4.angle//' -e 's:^./::'`) show" ! echo "grestore /angle angle `cat $f` $2 add add def" ! echo "-`cat $f` rotate" ! echo "-$2 rotate" done + echo grestore echo "stroke" Index: place.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/place.sh,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** place.sh 25 Feb 2001 12:47:48 -0000 1.1.1.1 --- place.sh 6 Jun 2004 08:10:54 -0000 1.2 *************** *** 10,19 **** RIGHT_BOUND=`tail -1 $3 | awk '{ print $5 }'` UPPER_BOUND=`tail -1 $3 | awk '{ print $6 }'` case "$1" in bottom-right) ! MY_RIGHT_BOUND=`tail -1 $2 | awk '{ print $5 }'` ! MY_LOWER_BOUND=`tail -1 $2 | awk '{ print $4 }'` echo "% Place at bottom right" echo gsave --- 10,25 ---- RIGHT_BOUND=`tail -1 $3 | awk '{ print $5 }'` UPPER_BOUND=`tail -1 $3 | awk '{ print $6 }'` + SIZE_2=`echo "($RIGHT_BOUND - $LEFT_BOUND)/2" | bc` + SIZE_4=`echo "($RIGHT_BOUND - $LEFT_BOUND)/4" | bc` + SIZE_8=`echo "($RIGHT_BOUND - $LEFT_BOUND)/8" | bc` + + sed -e "s/__SIZE_2__/$SIZE_2/" -e "s/__SIZE_4__/$SIZE_4/" -e "s/__SIZE_8__/$SIZE_8/" \ + < $2 > temp case "$1" in bottom-right) ! MY_RIGHT_BOUND=`tail -1 temp | awk '{ print $5 }'` ! MY_LOWER_BOUND=`tail -1 temp | awk '{ print $4 }'` echo "% Place at bottom right" echo gsave *************** *** 21,26 **** ;; bottom-left) ! MY_LEFT_BOUND=`tail -1 $2 | awk '{ print $3 }'` ! MY_LOWER_BOUND=`tail -1 $2 | awk '{ print $4 }'` echo "% Place at bottom left" echo gsave --- 27,32 ---- ;; bottom-left) ! MY_LEFT_BOUND=`tail -1 temp | awk '{ print $3 }'` ! MY_LOWER_BOUND=`tail -1 temp | awk '{ print $4 }'` echo "% Place at bottom left" echo gsave *************** *** 28,32 **** ;; below) ! MY_UPPER_BOUND=`tail -1 $2 | awk '{ print $6 }'` echo "% Place below" echo gsave --- 34,38 ---- ;; below) ! MY_UPPER_BOUND=`tail -1 temp | awk '{ print $6 }'` echo "% Place below" echo gsave *************** *** 35,39 **** ;; above) ! MY_LOWER_BOUND=`tail -1 $2 | awk '{ print $4 }'` echo "% Place above" echo gsave --- 41,45 ---- ;; above) ! MY_LOWER_BOUND=`tail -1 temp | awk '{ print $4 }'` echo "% Place above" echo gsave *************** *** 47,51 **** esac ! cat $2 echo grestore echo "% bound $LEFT_BOUND $LOWER_BOUND $RIGHT_BOUND $UPPER_BOUND" --- 53,58 ---- esac ! cat temp ! rm temp echo grestore echo "% bound $LEFT_BOUND $LOWER_BOUND $RIGHT_BOUND $UPPER_BOUND" Index: rotary_arrange.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/rotary_arrange.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** rotary_arrange.sh 9 Aug 2001 16:01:15 -0000 1.2 --- rotary_arrange.sh 6 Jun 2004 08:10:54 -0000 1.3 *************** *** 24,26 **** # We assume it's circular. ! echo "% bound $BOUND $BOUND $BOUND $BOUND" --- 24,26 ---- # We assume it's circular. ! echo "% bound -$BOUND -$BOUND $BOUND $BOUND" Index: title-template.ps =================================================================== RCS file: /cvsroot/fcgp/lgp/title-template.ps,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** title-template.ps 9 Aug 2001 16:01:15 -0000 1.2 --- title-template.ps 6 Jun 2004 08:10:54 -0000 1.3 *************** *** 1,6 **** %% title.ps ! -11000 -1000 moveto (Linux Kernel v__VERSION__) dup /Helvetica-Oblique findfont dup 1 scalefont setfont ! 22000 3 -1 roll stringwidth pop div scalefont setfont show ! % bound -11000 -4000 11000 4000 --- 1,6 ---- %% title.ps ! -__SIZE_4__ -1000 moveto (Linux Kernel v__VERSION__) dup /Helvetica-Oblique findfont dup 1 scalefont setfont ! __SIZE_2__ 3 -1 roll stringwidth pop div scalefont setfont show ! % bound -__SIZE_4__ -__SIZE_8__ __SIZE_4__ __SIZE_8__ |
From: Christian R. <cr...@us...> - 2003-01-05 14:02:58
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1:/tmp/cvs-serv30941 Modified Files: make-outline.sh posterize Log Message: * Bugfix: Environment was not cleanly initialized, leading to a spurious line once additional PS code was added (printer's footer etc) Index: make-outline.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/make-outline.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** make-outline.sh 17 Dec 2002 12:48:02 -0000 1.4 --- make-outline.sh 5 Jan 2003 14:02:55 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- # Draw circles. + echo "newpath" echo "0 0 $1 0 360 arc" echo "$RING1_BOUND 0 moveto" *************** *** 46,50 **** echo "$half rotate" echo "/angle $half neg def" ! for f in `find . -name '*-ring2.angle' | sort`; do echo "$RING1_BOUND 0 moveto $RING2_BOUND 0 lineto stroke" echo `echo \( $RING2_BOUND + $RING1_BOUND \) / 2 | bc` -200 moveto --- 47,51 ---- echo "$half rotate" echo "/angle $half neg def" ! for f in `find . -name '*-ring2.angle' -print | sort`; do echo "$RING1_BOUND 0 moveto $RING2_BOUND 0 lineto stroke" echo `echo \( $RING2_BOUND + $RING1_BOUND \) / 2 | bc` -200 moveto Index: posterize =================================================================== RCS file: /cvsroot/fcgp/lgp/posterize,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** posterize 18 Aug 2001 17:01:15 -0000 1.12 --- posterize 5 Jan 2003 14:02:55 -0000 1.13 *************** *** 80,84 **** y=1 while [ $y -le $2 ]; do ! echo Generating poster.$x.$y.ps.gz... (echo "%!PS-Adobe-1.0" echo "%%DocumentFonts: Helvetica Helvetica-Bold" --- 80,84 ---- y=1 while [ $y -le $2 ]; do ! echo Generating poster.$x.$y.ps... (echo "%!PS-Adobe-1.0" echo "%%DocumentFonts: Helvetica Helvetica-Bold" *************** *** 89,92 **** --- 89,105 ---- echo "%%BoundingBox: 0 0 `expr $PAPER_WIDTH - 1` `expr $PAPER_HEIGHT - 1`" echo "%%EndComments" + echo "%!" + echo "/PRorig_showpage_x178313 /showpage load def /showpage{" + echo " errordict /handleerror {} put" + echo " }def" + echo "/initgraphics{}def/setpagedevice{pop}def" + echo "statusdict begin /a4tray{}def /lettertray{}def end" + echo "/a4{}def/a3{}def/a0{}def/letter{}def/legal{}def" + echo "/a4small{}def /lettersmall{}def /a4tray{}def /lettertray{}def" + echo "/setscreen{pop pop pop}def" + echo "/ColorManagement {pop} def" + echo "" + echo "0 0 translate 0 rotate 1.2 1 mul 1.2 1 mul scale" + echo "" # Draw the clipping stuff (unless 1x1). if [ $2 -ne 1 ]; then *************** *** 197,201 **** echo "%%Trailer" echo "grestore" ! echo "showpage") | gzip > poster.$x.$y.ps.gz y=`expr $y + 1` done --- 210,217 ---- echo "%%Trailer" echo "grestore" ! echo "showpage" ! echo "PRorig_showpage_x178313" ! echo "/showpage /PRorig_showpage_x178313 load def" ! ) > poster.$x.$y.ps y=`expr $y + 1` done |
From: Christian R. <cr...@us...> - 2002-12-17 12:48:06
|
Update of /cvsroot/fcgp/lgp In directory sc8-pr-cvs1:/tmp/cvs-serv31683 Modified Files: Makefile make-outline.sh Log Message: * Bugfix: ordering of sections and section outlines was uncoordinated and thus often different (ring2, ring3) Index: Makefile =================================================================== RCS file: /cvsroot/fcgp/lgp/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** Makefile 14 Aug 2001 10:27:46 -0000 1.15 --- Makefile 17 Dec 2002 12:48:02 -0000 1.16 *************** *** 28,33 **** RING1:=init lib mm kernel ipc ! RING2:=net fs ! RING3:=$(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/arch/*)) RING4:=drivers --- 28,33 ---- RING1:=init lib mm kernel ipc ! RING2:=$(sort net fs) ! RING3:=$(sort $(subst $(KERNEL_DIR)/,,$(wildcard $(KERNEL_DIR)/arch/*))) RING4:=drivers Index: make-outline.sh =================================================================== RCS file: /cvsroot/fcgp/lgp/make-outline.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** make-outline.sh 9 Aug 2001 16:01:15 -0000 1.3 --- make-outline.sh 17 Dec 2002 12:48:02 -0000 1.4 *************** *** 46,50 **** echo "$half rotate" echo "/angle $half neg def" ! for f in `find . -name '*-ring2.angle'`; do echo "$RING1_BOUND 0 moveto $RING2_BOUND 0 lineto stroke" echo `echo \( $RING2_BOUND + $RING1_BOUND \) / 2 | bc` -200 moveto --- 46,50 ---- echo "$half rotate" echo "/angle $half neg def" ! for f in `find . -name '*-ring2.angle' | sort`; do echo "$RING1_BOUND 0 moveto $RING2_BOUND 0 lineto stroke" echo `echo \( $RING2_BOUND + $RING1_BOUND \) / 2 | bc` -200 moveto *************** *** 63,67 **** echo "$half rotate" echo "/angle $half neg def" ! for f in `find . -name '*-ring3.angle'`; do echo "$RING2_BOUND 0 moveto $RING3_BOUND 0 lineto stroke" echo `echo \( $RING3_BOUND + $RING2_BOUND \) / 2 | bc` -200 moveto --- 63,67 ---- echo "$half rotate" echo "/angle $half neg def" ! for f in `find . -name '*-ring3.angle' -print | sort`; do echo "$RING2_BOUND 0 moveto $RING3_BOUND 0 lineto stroke" echo `echo \( $RING3_BOUND + $RING2_BOUND \) / 2 | bc` -200 moveto |
From: Martin P. <mb...@us...> - 2002-09-01 13:44:42
|
Update of /cvsroot/fcgp/web In directory usw-pr-cvs1:/tmp/cvs-serv16881 Modified Files: README Log Message: Add brief message Index: README =================================================================== RCS file: /cvsroot/fcgp/web/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 1 Sep 2002 13:41:19 -0000 1.1 --- README 1 Sep 2002 13:44:38 -0000 1.2 *************** *** 1,2 **** --- 1,7 ---- README for the revised Free Code Graphing Project -*- text -*- + + The directory /web/ in the FCGP repository contains the code necessary to generate tiles + for display on the web, and the PHP scripts that will allow you to interactively + view them. + |
From: Martin P. <mb...@us...> - 2002-09-01 13:41:24
|
Update of /cvsroot/fcgp/web/bin In directory usw-pr-cvs1:/tmp/cvs-serv16081/bin Added Files: dupes maketiles rendertile split-image.c Log Message: Check in current web viewer from BK. --- NEW FILE: dupes --- #! /usr/bin/python # TODO: Cache md5sums into a dotfile in the current directory, or # perhaps the root directory of the relevant disk, or perhaps /tmp/. # Make sure the mode is 0600. # TODO: Cache dev/ino and make sure we don't try to count the same # file twice. # FIXME: Symlinks will break if any of them are relative. We'd need # to compute the difference between two relative paths, which is # possible. # FIXME: If the link command fails, then one of the files will be # lost. I suppose we ought to move it to a temporary name until the # link is complete. import md5 from sys import argv, stderr, stdout, exit import os import os.path from stat import * from string import join, split from binascii import hexlify from getopt import getopt def filter_singles(sum_hash): for hash, files in sum_hash.items(): if len(files) == 1: del sum_hash[hash] return sum_hash def list_file(f, prime): print f def keep_file(f, prime): print "KEEP %s" % f def delete_file(f, prime): print "DELETE %s" % f os.remove(f) def hardlink_file(f, prime): print "LINK %s -> %s" % (prime, f) os.remove(f) os.link(prime, f) def symlink_file(f, prime): print "SYMLINK %s -> %s" % (prime, f) os.remove(f) os.symlink(prime, f) opt_symlink = opt_hardlink = opt_delete = 0 opts, dirs = getopt(argv[1:], 'dls') print 'opts = %s' % `opts` handle_prime = handle_rest = list_file for opt, optarg in opts: if opt == '-d': handle_prime = keep_file handle_rest = delete_file opt_delete = 1 elif opt == '-l': opt_hardlink = 1 handle_prime = keep_file handle_rest = hardlink_file elif opt == '-s': handle_prime = keep_file handle_rest = symlink_file opt_symlink = 1 if opt_hardlink + opt_delete + opt_symlink > 1: fail("dupes: Must specify at most one of -d, -l, -s") def eliminate_singles(h): """h is a hash whose values are sequences. This procedure modifies h in place to eliminate any entries whose value has a length of one.""" for k, v in h.items(): if len(v) <= 1: del h[k] def calc_sum(path): """Return as a string the MD5 sum of a specified file.""" # print "\t\tcalc sum of %s" % path m = md5.new() f = open(path) m.update(f.read()) return m.digest() def process_dir(arg, dirname, filenames): filenames.sort() for file in filenames: fullpath = os.path.join(dirname, file) stat = os.stat(fullpath) if not S_ISREG(stat[ST_MODE]): continue size = stat[ST_SIZE] if by_size.has_key(size): by_size[size].append(fullpath) else: by_size[size] = [fullpath] def make_multimap(fn, filenames): result = {} for val in filenames: key = fn(val) if result.has_key(key): result[key].append(val) else: result[key] = [val] return result def val_and_result(fn): """Return a lambda based on fn that returns a tuple of the value, and the result of evaluation. Good for building hashes from repeated function calls.""" return lambda x, fn=fn: (x, fn(x)) def note(str): # stderr.write(str) pass def fail(str): stderr.write(str) exit(1) by_size = {} for dir in dirs: os.path.walk(dir, process_dir, None) eliminate_singles(by_size) all_keys = by_size.keys() all_keys.sort() for size in all_keys: these_files = by_size[size] if len(these_files) == 1: del by_size[size] note("\t\tchecking files of size %d\n" % size) sum_hash = make_multimap(calc_sum, these_files) eliminate_singles(sum_hash) for hash, dupl_files in sum_hash.items(): note("size %d, hash %s:\n" % (size, hexlify(hash))) # dupl files should be sorted so that earlier directories from # the command line come first, and within directories files # are sorted. prime = dupl_files[0] handle_prime(prime, prime) for f in dupl_files[1:]: handle_rest(f, prime) print # $Log: dupes,v $ # Revision 1.1 2002/09/01 13:41:19 mbp # Check in current web viewer from BK. # # Revision 1.9 2002/04/14 07:13:33 mbp # Doc. # # Fix messages from link commands. # # Revision 1.8 2002/04/14 07:10:22 mbp # Add symlink option. # # Revision 1.7 2002/04/14 05:41:24 mbp # Reenable file deletion. # # Revision 1.6 2002/04/14 05:25:55 mbp # Add -l option to make hardlinks between duplicate files. # # Revision 1.5 2002/04/14 05:12:11 mbp # Add vc log # --- NEW FILE: maketiles --- #! /usr/bin/python # Generate top-level tiles; before subdivision. import sys, os from os import system base_w = 600 base_h = 600 sub_w = 200 sub_h = 200 max_multiple = 8 if len(sys.argv) != 3: print "usage: maketoplevel PSFILE OUTDIR" sys.exit(1) psfile, outdir = sys.argv[1:] def runcmd(s): print s if system(s): sys.exit(1) def file_exists(f): try: os.stat(f) return 1 except OSError: return 0 for zoom in [1, 2, 4, 8, 16, 32, 64]: if zoom > max_multiple: coarse_split = zoom / max_multiple this_w = base_w * max_multiple this_h = base_h * max_multiple else: coarse_split = 1 this_w = base_w * zoom this_h = base_h * zoom print "%7d %7d %7d %7d" % (zoom, coarse_split**2, this_w, this_h) for xs in range(coarse_split): for ys in range(coarse_split): x = xs * base_w * zoom / coarse_split y = ys * base_h * zoom / coarse_split print "\t%07d %07d" % (x, y) this_dir = "%s/zoom%03d/x%06d_y%06d" % (outdir, zoom, x, y) system("mkdir -p %s" % this_dir) this_file = "top.png" if file_exists("%s/%s" % (this_dir, this_file)): print "already exists; skipped" continue runcmd("rendertile %s %d %d %d %d %d %s/%s" % (psfile, zoom, x, y, this_w, this_h, this_dir, this_file)) # now, split up into smaller tiles subsplit_w = this_w / sub_w subsplit_h = this_h / sub_h runcmd("cd %s && split-image %s %d %d" % (this_dir, this_file, subsplit_w, subsplit_h)) --- NEW FILE: rendertile --- #! /bin/sh -e # Copyright (C) 2001, 2002 by Martin Pool <mb...@sa...> # Part of the Linux Graphing Project # Produce one tile for a Postscript rendering. Takes four parameters: # the .ps filename, zoom, x, and y positions. (x,y) ties the bottom # left corner of the produced tile, and is in PS points. $zoom is # relative to standard script. # Note that X and Y are in *zoomed* coordinates: if you double the # zoom, you must also double X and Y to stay in the same place. if [ $# != 7 ] then echo "usage: rendertile PSFILE ZOOM X Y W H OUTFILE" exit 1 fi psfile=$1 zoom=$2 x=$3 y=$4 w=$5 h=$6 outfile=$7 cat >&2 <<EOF psfile=$1 outfile=$outfile zoom=$2 x=$3 y=$4 w=$w h=$h EOF size="-dDEVICEHEIGHTPOINTS=$h -dDEVICEWIDTHPOINTS=$w" ( cat <<EOF $x neg $y neg translate $zoom dup scale EOF cat $psfile ) | gs-aladdin -r72 $size -dQUIET -sDEVICE=png256 -dBATCH -dNOPAUSE \ -sOutputFile="$outfile" - # pngfile=${psfile%.ps}_${zoom}_${x}_${y}.png # look at putdeviceprops GraphicsAlphaBits for antialiasing? --- NEW FILE: split-image.c --- /* Takes a png, creates pngs XxY.png up to given arguments */ #include <limits.h> #include <stdlib.h> #include <png.h> /* C trick to stringize a constant (expand to the number first) */ #define _STRINGIZE(x) #x #define STRINGIZE(x) _STRINGIZE(x) /* Useful macro which defines max size of a string containing an int. UINT has a U at the end, but int may have - at the front, so the size is correct. */ #define INT_CHARS (sizeof(STRINGIZE(UINT_MAX))) static png_structp create_output(unsigned int x, unsigned int y, unsigned int width, unsigned int height, png_colorp palette, png_uint_16 num_palette) { png_structp png_ptr; png_infop info_ptr; char filename[INT_CHARS * 2 + sizeof("%ux%u.big.png")]; FILE *f; sprintf(filename, "%06ux%06u.big.png", x, y); f = fopen(filename, "w"); if (!f) return NULL; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL); if (!png_ptr) return NULL; info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_write_struct(&png_ptr, (png_infopp)NULL); return NULL; } if (setjmp(png_ptr->jmpbuf)) { png_destroy_write_struct(&png_ptr, &info_ptr); return NULL; } png_init_io(png_ptr, f); png_set_IHDR(png_ptr, info_ptr, width, height, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_set_PLTE(png_ptr, info_ptr, palette, num_palette); png_write_info(png_ptr, info_ptr); return png_ptr; } static void break_up(png_structp input, png_infop info, unsigned int num_cols, unsigned int num_rows) { unsigned int x, y, i; png_structp output[num_cols][num_rows]; png_bytep rowdata; png_colorp palette; int num_palette; unsigned int width, height; png_get_PLTE(input, info, &palette, &num_palette); /* Round down if neccessary */ width = png_get_image_width(input, info)/num_cols; height = png_get_image_height(input, info)/num_rows; /* Open output files */ for (x = 0; x < num_cols; x++) { for (y = 0; y < num_rows; y++) { output[x][y] = create_output(x, y, width, height, palette, num_palette); } } rowdata = malloc(png_get_image_width(input, info)); for (i = 0; i < num_rows * height; i++) { png_read_row(input, rowdata, NULL); /* Which image does this belong to? */ y = i / height; for (x = 0; x < num_cols; x++) { /* Write one line out to this image */ png_write_row(output[x][y], rowdata + x * width); } } for (x = 0; x < num_cols; x++) { for (y = 0; y < num_rows; y++) { png_write_end(output[x][y], NULL); } } } /* input.png num-columns num-rows */ int main(int argc, char *argv[]) { FILE *fp; png_uint_32 width, height; int bit_depth, color_type; png_structp png_ptr; png_infop info_ptr; if (argc != 4) { fprintf(stderr, "Usage: split-image input.png num-columns num-rows\n"); exit(1); } fp = fopen(argv[1], "r"); if (!fp) { fprintf(stderr, "Can't open `%s'\n", argv[1]); exit(1); } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL); info_ptr = png_create_info_struct(png_ptr); png_init_io(png_ptr, fp); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); png_set_packing(png_ptr); break_up(png_ptr, info_ptr, atoi(argv[2]), atoi(argv[3])); return 0; } |
From: Martin P. <mb...@us...> - 2002-09-01 13:41:24
|
Update of /cvsroot/fcgp/web/python In directory usw-pr-cvs1:/tmp/cvs-serv16081/python Added Files: Codemap.py ps.py Log Message: Check in current web viewer from BK. --- NEW FILE: Codemap.py --- #! /usr/bin/python2 # Copyright (C) 2001-2002 by Martin Pool <mb...@sa...> """ A reimplementation of Rusty's Linux Graphing Project code. We always work in the standard Postscript coordinate system, to more easily allow later mapping from mouse clicks into items on the graph. There are 72 basis points per inch, and we work in a 10x10 inch space. """ from sys import stdout, stderr from ps import * def draw_coords(): """Draw Postscript coordinates bounding our space""" setlinewidth(1.0/4) setoff = DPI/8/4 moveto(setoff, setoff) lineto(setoff, PAGE_H-setoff) lineto(PAGE_W-setoff, PAGE_H-setoff) lineto(PAGE_W-setoff, setoff) lineto(setoff, setoff) stroke() for i in range(1, PAGE_W/DPI): p = i*DPI eighth = DPI/8 teenth = DPI/16 moveto(setoff, p) lineto(eighth, p) moveto(PAGE_W, p) lineto(PAGE_W - eighth, p) moveto(p, setoff) lineto(p, eighth) moveto(p, PAGE_H) lineto(p, PAGE_W - eighth) # small marks along horizontal center axis moveto(p, CENTER-teenth) lineto(p, CENTER+teenth) # small marks along vertical center axis moveto(CENTER-teenth, p) lineto(CENTER+teenth, p) stroke() def draw_sector(a1, a2, r1, r2, text, rgb): """Draw a sector on the pie, from radius 1 to radius 2 and angle1 to angle2, with text somewhere near the center. The inner arc is not drawn.""" setblack() arc(CENTER, CENTER, r1, a1, a2) arc(CENTER, CENTER, r2, -a2, -a1) # arc(CENTER, CENTER, r1, a1, a1) # TODO: Draw text # gsave() setrgbcolor(rgb) fill() # grestore() #stroke() def draw_toplevel(): """Draw a toplevel graph of the Linux kernel. Image is sent stdout as PostScript.""" setlinewidth(2.0) arc(PAGE_W/2, PAGE_H/2, 1*DPI, 0, 360) stroke() setfontbyname("Helvetica-Oblique", 20) showtext(PAGE_W/2, PAGE_H/2, "linux") stroke() # a1 = 0 # for a2 in (45, 130, 150, 220, 260, 330, 360): # draw_sector(a1, a2, 1*DPI, 2*DPI, "foo", (1.0, .2, .2)) # a1 = a2 draw_sector(0, 45, 1*DPI, 2*DPI, "foo", (.7, .2, .2)) adsc_header() draw_coords() draw_toplevel() showpage() adsc_trailer() --- NEW FILE: ps.py --- #! /usr/bin/python2 # Copyright (C) 2001-2002 by Martin Pool <mb...@sa...> DPI = 72.0 PAGE_W = 10 * DPI PAGE_H = 10 * DPI CENTER = PAGE_W/2 def setlinewidth(w): """Set line width to W points""" print "%f setlinewidth" % (w) def arc(x, y, rad, start, end): print "%f %f %f %f %f arc" % (x, y, rad, start, end) def setfontbyname(fname, scale): print "/%s findfont %f scalefont setfont" % (fname, scale) def showtext(x, y, text): print "(%s) dup stringwidth" % (text) # -- string tw th print "exch 2 div %f exch sub" % (x) # -- string th xx print "exch 2 div %f exch sub" % (y) # -- string xx yy print "moveto show" def moveto(x, y): print "%f %f moveto" % (x, y) def lineto(x, y): print "%f %f lineto" % (x, y) def showpage(): print "showpage" def stroke(): print "stroke" def fill(): print "fill" def strokepath(): print "strokepath" def setrgbcolor(rgb): print "%f %f %f setrgbcolor" % rgb def setblack(): setrgbcolor((0, 0, 0)) def gsave(): print "gsave" def grestore(): print "grestore" def adsc_header(): print """%!PS-Adobe-2.0 %%Creator: Codemap %%Title: codemap %%BoundingBox: 0 0 720 720 %%EndComments """ def adsc_trailer(): print "%%Trailer" |
Update of /cvsroot/fcgp/web/web In directory usw-pr-cvs1:/tmp/cvs-serv16081/web Added Files: about.php arrow_down.png arrow_left.png arrow_right.png arrow_up.png arrow_up.xcf circle.png circle.xcf circle_small.png circle_small.xcf circle_small_dark.png circle_small_dark.xcf footer.html header.html how.php index.php libfcgp.php map.php phpinfo.php quicklinks.php robots.txt samplelink.html samplelink2.html zoom_out.png zoom_out.xcf Log Message: Check in current web viewer from BK. --- NEW FILE: about.php --- <? require('libfcgp.php'); $title = 'About the KernelMapper'; print_header($title); include('header.html'); ?> <h1>About the KernelMapper</h1> <h2>What it means</h2> <p>A mystic mandala, or strange computer-generated art, or a map to guide your explorations? The kernel map has elements of all of these. <p>The map is a figurative rather than exact representation of the kernel. We don't expect people to refer to it while they're working on the kernel. If it helps people to understand the different subsystems, or to see the knottiness of different bits of code, or perhaps to fondly discover the little corner they've touched we will be pleased. <p>Broadly, the division of the map into segments represents the highest level division of the kernel code into subdirectories. The innermost circle, around Tux, is appropriately enough the <tt>kernel/</tt> and <tt>mm/</tt> directories, which manage memory and processes, the most fundamental objects. In the next ring out are the filesystem and networking layers. The third ring contains architecture-specific code for various systems, with one segment for each. It's clear here that some systems require much more platform-specific code than others. <p>The bulk of the code is device drivers, shown in the outermost ring. <p>Black squares represent source files, with the size of the square proportional to the number of lines in the file. Files are sorted by size within each segment. <p>Within each file there are rectangles for each function above a minimum size. These are coded red, green, and blue according to whether the function is exported, indirect or static, or other. Arcs within the function represent its control flow: functions with a single arc are probably straight-line code, while functions that look knotty probably are. <h2>How it works</h2> <p>The kernel map is a fair attempt at setting a record for the number of different tools and languages for a project of this size. You can see this either as validation of the power of using open standards to enable a toolbox approach, or as evidence of the mental instability of the authors. :-) <p>The kernel map software performs static analysis of a Linux kernel source tree. The results of the analysis are eventually digested in to a single 28MB Postscript file, containing the whole poster in vector form. This is done by a combination of two lex scanners, Perl scripts, Bourne shell scripts, and a Makefile to guide the whole thing. Postscript is produced directly by print statements. <p>For display on the web, the postscript file must be rendered into bitmaps. Because of the complexity of the vector file, rasterizing it on demand would be completely infeasible: running it through Postscript takes a couple of minutes on a fast machine. On the other hand, rendering it into a single large bitmap would be problematic anyhow because at a reasonable level of detail that bitmap would be hundreds of megabytes. <p>This system rasterizes the map into bitmap "tiles" at various levels of detail, which are then split into 200x200 "subtiles", stored as PNGs. All of this processing was performed ahead of time, so that the images can be served straight from disk to the browser. Rasterization is done by <a href="http://www.ghostscript.com/">Ghostscript</a>, controlled by a set of <a href="http://www.python.org/">Python</a> and shell scripts. Splitting of tiles into subtiles is done by a small C program using <a href="http://www.libpng.org/pub/png/libpng.html">libpng</a>. This takes a bit over an hour on a dual 1GHz machine, and produces 235MB of images. <p>As a small optimization, a Python program looks for identical subtile files, which are typically white space. These are replaced by hard links to a single file to save disk space, and more importantly cache memory. This shrinks the image directory to just 141MB. <p>The tiles are composed by a set of PHP scripts which produce HTML that stitches together the appropriate images, and manages scrolling, zooming, and so on. <p>All of the source will shortly be available from the <a href="http://fcgp.sourceforge.net/">Free Code Graphing Project</a> on <a href="http://www.sourceforge.net/">SourceForge.net</a>. <h2>Future projects</h2> <p>Understanding and representing large software projects is very much an open research project. Gaining a good understanding of how the whole kernel works can take months or years; probably nobody understands every part of it in detail. <p>Open source projects introduce additional levels of complexity: authors come and go, and specialize in different areas that can be hard to pin down. Open source projects can release new versions very rapidly, so the changes from one version to another are in themselves interesting. <p>Graphical displays can allow people to get an overview of a complex situation quickly and then zoom closer for detail. A great challenge in representing a code base this way is discovering the important relationships, so that the map is not swamped with irrelevant detail. <p>Different maps are probably needed for different purposes: somebody starting to learn their way around the kernel might want a sanitized and abstracted view that shows clean layers even when they are not quite so in practice. Somebody debugging a problem might be crucially interested in where the exceptions to general patterns lie. <p>Static analysis is not the only possible input to mapping. Showing the way locks are held, or where time is spent in execution, or how the kernel has changed in recent releases might also be useful, or at least entertaining. <p>And this is not even to mention the possibilities for interactive exploration, perhaps using something like <a href="http://touchgraph.sourceforge.net/">TouchGraph</a>. <p>The problem can perhaps be divided into two parts: firstly, mining interesting information from a codebase, and secondly converting it into an easily-understandable form. Both of them are important, and both are difficult. <p>People have made good progress in recent years by using things such as a the excellent <a href="http://www.graphviz.org/">GraphViz</a> toolkit, which provides a very quick path through the second stage. But GraphViz's approach seems to run out of conceptual steam for very large numbers of nodes. <p>We hope that the online availability of the map might encourage people to further research and hackery in this area. <p>Some more detailed notes on improving the functionality and performance of the map are on the <a href="http://fcgp.sourceforge.net/">FCGP homepage</a>. <h2>Sponsors</h2> <p><a href="http://www.linuxcare.com/">Linuxcare</a> supported Rusty in his initial work on the code map. <p>The <a href="http://www.bcg.com/">Boston Consulting Group</a> and <a href="http://www.osdn.com/">OSDN</a> supported conversion to a web map and hosting. <p>You can buy full-size printed posters from <a href="http://thinkgeek.com/stuff/fun-stuff/3884.shtml">ThinkGeek</a>. (This is much easier than printing it yourself, believe me!) <h2>Developers</h2> <p> <a href="http://www.rustcorp.com.au/~rusty/">Paul "Rusty" Russell</a> wrote the initial version of the mapping code; <a href="http://sourcefrog.net/~mbp/">Martin Pool</a> finished the web conversion; Karim Lakhani organized and initiated the project. <p>None of this would have been possible without the efforts of the many free software developers whose work it builds upon. <p><a href="map.php">Back to the map</a></center> <p><A href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=20623&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></A></p> <? include ('footer.html'); ?> --- NEW FILE: arrow_down.png --- PNG --- NEW FILE: arrow_left.png --- PNG --- NEW FILE: arrow_right.png --- PNG --- NEW FILE: arrow_up.png --- PNG bÞ<^û }¾WÉ]r x ñRJ t·YÒÌiwöûcv¥´)f_òR¦Yµ?Ôù7 ò --- NEW FILE: arrow_up.xcf --- gimp xcf file ïþýÿÿþùïïþùÿÿþùïïþùÿÿ÷ýöòïïòöýÿÿ --- NEW FILE: circle.png --- PNG 4céªfÊ^ÊõDÈRÿr>ýU3ÝýFÛU9ÄMòb}7H%õøßd)QÖ£ÚçlÀ --- NEW FILE: circle.xcf --- gimp xcf file ûÈÿÿª ûªÿÿ ûÿÿ ûÿÿª ûªÿÿÈ úÈÿÿóýóÿÿþ×þ×ÿÿý×ý×ÿÿ÷óȪªÈóÿÿÿ÷öÓº®®ºÓöÿÿýÞ®¬¬ý®ÞÿÿþÞ¬¬þÞÿÿýö®¬¬ú®öÿÿÓ¬ ¬ûÓÿÿº¬ ¬ûºÿÿ®¬ ¬û®ÿÿ®¬ ¬û®ÿÿº¬ ¬ûºÿÿÓ¬ ¬úÓÿÿö®¬¬ý®öÿÿþÞ¬¬þÞÿÿýÞ®¬¬ý®Þÿÿ÷öÓº®®ºÓöÿÿÿ÷ýöòïïòöýÿÿþùïïþùÿÿþùïïþùÿÿþýï ïûýÿÿöï ïûöÿÿòï ïüòÿÿïïÿ ïÿþòï ïûòÿÿöï ïûöÿÿýï ïþýÿÿþùïïþùÿÿþùïïþùÿÿ÷ýöòïïòöýÿÿ --- NEW FILE: circle_small.png --- PNG À áãUÍd[µûþÁn]3c0¹c ýñ#@m½ì --- NEW FILE: circle_small.xcf --- gimp xcf file --- NEW FILE: circle_small_dark.png --- PNG --- NEW FILE: circle_small_dark.xcf --- gimp xcf file --- NEW FILE: footer.html --- </td> <td valign="top"> <p><!-- AD SPACE 2 Side Banner Position --> <iframe border=0 marginWidth=0 marginHeight=0 src="http://osnads.osdn.com/2.html?topic=kernelmap&position=2" frameBorder=no width=127 scrolling=no height=602><a href="http://osnads.osdn.com/cgi-bin/ad_default.pl?click"><img src="http://osnads.osdn.com/cgi-bin/ad_default.pl?display&position=2" border=0></a></iframe></p> </td> </tr> </table> <p> <!-- begin OSDN footer --> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff"> <tr bgcolor="#999999"> <td><img src="http://images.osdn.com/pix.gif" width="1" height="1" alt=""></td> </tr> <tr align="center" valign="middle"> <td height="50" class="osdn-foottext"><font face="verdana,arial,sans-serif" size="-2">© Copyright 2002 - <a href="http://www.osdn.com/">OSDN</a> Open Source Development Network, All Rights Reserved<br>About <a href="http://www.osdn.com/about/">OSDN</a> • <a href="http://www.osdn.com/privacy.shtml">Privacy Statement</a> • <a href="http://www.osdn.com/terms.shtml">Terms of Use</a> • <a href="http://www.osdn.com/advertise">Advertise</a> • <a href="http://selfserve.osdn.com/introduction.html">Self Serve Ad System</a> • <a href="mailto:in...@os...">Contact Us</a></font> </td> </tr> <tr bgcolor="#999999"> <td><img src="http://images.osdn.com/pix.gif" width="1" height="1" alt=""></td> </tr> </table> <p> </body> </html> --- NEW FILE: header.html --- <html> <head> <title>OSDN Kernel Mapper</title> <meta name="description" content="OSDN.com: The Open Source Development Network"> <meta name="keywords" content="Kernel, Linux Kernel, Kernel Mapper, Kernelmapper, Open, Open Source, Slashdot, freshmeat, newsforge, themes.org, open source jobs, Linux Jobs, Linux employment, davecentral, slashcode, Linux, Linux.com, open source, Andover.net, sourceforge, sourceforge.net, operating system, VA, VA Linux, valinux, VA Software, vasoftware, software"><link rel="top" href="//www.osdn.com/" title="The Open Source Development Network"> <link rel="search" href="http://www.osdn.com/search.pl" title="Search OSDN.com"> <style type="text/css"><!-- .search { font-size: 11px; font-family: verdana, arial, sans-serif; } .search_button { font-size: 11px; font-family: verdana, arial, sans-serif; background: #eeeeee; } --></STYLE><link rel="STYLESHEET" type="text/css" href="http://www.pricegrabber.com/style/style_indexie_2.css"> <script language="JavaScript"> <!-- function setfocus() { document.f.form_keyword.focus(); } //--> </script> </head> <body bgcolor="#FFFFFF" text="#333333" link="#003399" vlink="#003399" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#003399"> <td valign="bottom"><a href="http://www.osdn.com"><img src="http://images.osdn.com/OSDN_bluew_rev.gif" width="190" height="35" alt="BCG/OSDN - Open Source Development Network" border="0"></a> </td> <td valign="middle" width="100%" nowrap> </td> <td valign="middle"><img src="http://images.osdn.com/header_sites.gif" width="318" height="33" alt=""> </td> <td align="right"> <table> <tr> <form action="http://www.osdn.com/osdnsearch.pl" method="GET"> <td valign="middle" nowrap><font face="verdana,arial,sans-serif" size="-2"> <input type="TEXT" size="10" name="query" value="" class="search"><!-- <SELECT name="site" class="search"> <OPTION value="all">All OSDN Sites</OPTION> <OPTION value="" disabled></OPTION> <OPTION value="Freshmeat">Freshmeat</OPTION> <OPTION value="Linux Software">Linux Software</OPTION> <OPTION value="Linux.com">Linux.com</OPTION> <OPTION value="LinuxGram">LinuxGram</OPTION> <OPTION value="NewsForge">NewsForge</OPTION> <OPTION value="OSDN" selected>OSDN</OPTION> <OPTION value="Slashcode">Slashcode</OPTION> <OPTION value="Slashdot">Slashdot</OPTION> <OPTION value="SourceForge.net">SourceForge.net</OPTION> </SELECT> --> <input type="submit" name="Submit" value="Search" class="search_button"></font> </td> <input type=hidden name=ut value="d1c0d9023ccdbbfc"></form> </tr> </table> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="http://images.osdn.com/header_st_bg.gif" height="30" valign="bottom" nowrap> </td> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#003399" background="http://images.osdn.com/header_st_bg.gif"> </td> <td bgcolor="#003399" background="http://images.osdn.com/top_menu_left.gif"><img src="http://images.osdn.com/pix.gif" width="22" height="21" alt=""></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><font size="-2" face="verdana,arial,sans-serif"> <a href="http://www.osdn.com/about" style="text-decoration:none"><b>ABOUT OSDN</b></a> </font></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><img src="http://images.osdn.com/images/top_div.gif" width="1" height="18" alt="|"></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><font size="-2" face="verdana,arial,sans-serif"> <a href="http://www.osdn.com/myosdn" style="text-decoration:none"><b>MY OSDN</b></a> </font></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><img src="http://images.osdn.com/images/top_div.gif" width="1" height="18" alt="|"></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><font size="-2" face="verdana,arial,sans-serif"> <a href="http://www.osdn.com/newsletters" style="text-decoration:none"><b>NEWSLETTERS</b></a> </font></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><img src="http://images.osdn.com/images/top_div.gif" width="1" height="18" alt="|"></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><font size="-2" face="verdana,arial,sans-serif"> <a href="http://www.osdn.com/pr" style="text-decoration:none"><b>PRESS & EVENTS</b></a> </font></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><img src="http://images.osdn.com/images/top_div.gif" width="1" height="18" alt="|"></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><font size="-2" face="verdana,arial,sans-serif"> <a href="/index.php/ut=d1c0d9023ccdbbfc/" style="text-decoration:none"><b>SHOP</b></a> </font></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><img src="http://images.osdn.com/images/top_div.gif" width="1" height="18" alt="|"></td> <td valign="middle" nowrap background="http://images.osdn.com/top_menu_bg.gif" align="center"><font size="-2" face="verdana,arial,sans-serif"> <a href="http://www.osdn.com/advertise" style="text-decoration:none"><b>ADVERTISE</b></a> </font></td> <td bgcolor="#003399" background="http://images.osdn.com/top_menu_right.gif"><img src="http://images.osdn.com/pix.gif" width="33" height="21" alt=""></td> </tr> </table> </td> </tr> </table> <table cellSpacing=0 cellPadding=0 width="98%" align=center border=0> <tbody> <tr> <td align=middle><img height=12 alt=advertisement src="http://images.osdn.com/ad_dec.gif" width=125 NOSEND="1"><br><!-- AD SPACE 1 Top Banner Position --> <iframe border=0 marginWidth=0 marginHeight=0 src="http://osnads.osdn.com/1.html?topic=kernelmap" frameBorder=no width=729 scrolling=no height=90> <a href="http://osnads.osdn.com/cgi-bin/ad_default.pl?click"><img src="http://osnads.osdn.com/cgi-bin/ad_default.pl?display&position=1" border=0></a></iframe></td></tr></tbody></table> <table width="98%" align="CENTER" cellpadding="0" cellspacing="15" border="0"> <tr> <td valign="TOP" width="100%"> <table width="100%" border="0" cellspacing="0" cellpadding="8"> <tr> <td bgcolor="#003399" background="//images.osdn.com/mk1.gif" valign="bottom" nowrap> <b><font face="verdana,arial,sans-serif" size="-1" color="#FFFFFF">O S D N K E R N E L M A P P E R</font></b></td> </tr> </table> <p> <table width="100%" border="0" cellspacing="0" cellpadding="4"> <tr> <td width="100%"> <p><font face="verdana,arial,sans-serif" size="-1"><a href="http://kernelmapper.osdn.com/">Home</a> | <a href="/map.php">Map</a> | <a href="/map.php?x=0&y=4840&zoom=8">Key</a> | <a href="http://kernelmapper.osdn.com/quicklinks.php">Quick Links</a> | <a href="http://kernelmapper.osdn.com/how.php">How to read</a> | <a href="http://kernelmapper.osdn.com/about.php">About</a></font></p> </td> </tr> </table> <p> --- NEW FILE: how.php --- <? require('libfcgp.php'); $title = 'About the KernelMapper'; print_header($title); include('header.html'); ?> <h1>How to read the KernelMapper</h1> <p>Each solid-line box contains a file in the kernel sources (their names are in pink inside the bottom left of the box).<br> </p> <p>Each dashed-line box contains one routine inside the file: a set of steps for some particular task.</p> <p>The curls and loops are the actual routine:</p> <ul> <li>light green means that the routine is local to that file</li> <li>blue is for standard, non-local routines </li> <li>red is for (rare) non-local routines which can also be used by kernel modules</li> <li>dark green means that the routine is called indirectly</li> </ul> <p>Each statement in the routine becomes a small extension of the line.</p> <p>The branches in the routine drawing represent different "paths" in the routine, for example:</p> <blockquote> <p>if (something_happened)<br> then do something </p> </blockquote> <p>Would look like a fork in the line, with the "then do something" out on the branch.</p> <p>The circles contain parts of the routine which are repeated, for example:</p> <blockquote> <p>while (something_happened)<br> do something </p> </blockquote> <p>Will draw the lines representing "do something" inside a circle, to show that it may be done many times. So if "do something" is quite complicated, the circle will be quite big, but if it's tiny, you will end up with a tiny circle.</p> <p> It's not uncommon to have forks inside circles, and circles inside circles, or even a routine which is almost entirely inside a circle, meaning that the routine is basically one big loop.<br> </p> <p><a href="map.php">Back to the map</a></center> <p><A href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=20623&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></A></p> <? include ('footer.html'); ?> --- NEW FILE: index.php --- <? require('libfcgp.php'); $title = 'The BCG/OSDN KernelMapper'; print_header($title); include ('header.html'); ?> <center><br> <br> <br> <br> <br><font face="arial, helvetica"><h1><? print $title; ?></h1></font> <table width="400" border="0" cellspacing="0" cellpadding="15" align="center"> <tr> <td><font face="Arial, Helvetica, sans-serif" size="-1">The Boston Consulting Group and OSDN are pleased to present the interactive Linux Kernel Map. Through the ingenious efforts of Paul "Rusty" Russell and Martin Pool, the free software and open source communities can now get a detailed view of the structure of the the Linux kernel. We hope that the community will take the code for this project and expand the functionality of this map and also apply it to other projects.</font></td> <td nowrap><font face="Arial, Helvetica, sans-serif"><b><a href="map.php">Enter the map</a><b><font></td> </tr> </table> </center> <? include ('footer.html'); ?> --- NEW FILE: libfcgp.php --- <? // Copyright (C) 2001, 2002 by Martin Pool <mb...@sa...> function print_header($title) { print "<html>"; print "<head><title>$title</title></head>\n"; print '<body bgcolor="#ffffff" text="#000000" link="#9999cc" vlink="#9999cc">'; } ?> --- NEW FILE: map.php --- <? # Copyright (C) 2001, 2002 by Martin Pool <mb...@sa...> require('libfcgp.php'); include('header.html'); function link_to($x, $y, $zoom, $label) { global $SCRIPT_NAME; print "<a href=\"$SCRIPT_NAME?x=$x&y=$y&zoom=$zoom\">$label</a>"; } function link_perhaps($x, $y, $zoom, $label, $cond) { if ($cond) link_to($x, $y, $zoom, $label); else print $label; } function icon_perhaps($x, $y, $zoom, $cond, $true_src, $false_src) { if ($cond) link_to($x, $y, $zoom, "<img border=0 src=\"$true_src\">"); else print "<img border=0 src=\"$false_src\">"; } function tile_name($zoom, $x, $y, $ox, $oy) { return sprintf("../../tiles/zoom%03d/x%06d_y%06d/%06dx%06d.big.png", $zoom, $x, $y, $ox, $oy); } function clip_zoom($zoom) { if ($zoom <= 1) return 1; else if ($zoom <= 2) return 2; else if ($zoom <= 4) return 4; else if ($zoom <= 8) return 8; else if ($zoom <= 16) return 16; else if ($zoom <= 32) return 32; else return 64; } function print_zoom_scale($x, $y, $zoom) { print "<nobr><b>Zoom: </b>"; foreach (array(1, 2, 4, 8, 16, 32, 64) as $z) { if ($zoom == $z) { print "<img src=\"circle_small_dark.png\" border=\"0\" alt=\"$z\">"; } else { $f = $z/$zoom; link_to($x*$f, $y*$f, $z, "<img src=\"circle_small.png\" border=\"0\" alt=\"$z\">"); } } print "</nobr>\n"; } print "<center>"; if (!isset($zoom)) $zoom = 1; if (!isset($x)) $x = 0; if (!isset($y)) $y = 0; // The image tiles are a constant size, but by changing the number // displayed on the screen you can effectively change the size of the // scrolling window. $wt_x = 4; $wt_y = 3; $base_w = 600; $base_h = 600; $sub_w = 200; $sub_h = 200; $max_multiple = 8; function tile_img($zoom, $rx, $ry, $ox, $oy) { global $sub_w, $sub_h; return ("<img height=\"$sub_h\" width=\"$sub_w\" border=\"0\" src=\"" . tile_name($zoom, $rx, $ry, $ox, $oy) . "\">"); } $zoom = clip_zoom($zoom); // Overall size of the map $map_w = $base_w * $zoom; $map_h = $base_h * $zoom; // This has to match up with the maketiles code: // $max_multiple is the largest zoom at which we're willing to generate // only one coarse tile. $max_multiple = 8; if ($zoom > $max_multiple) { $n_split = $zoom / $max_multiple; $coarse_w = $base_w * $max_multiple; $coarse_h = $base_h * $max_multiple; // In this region, as we zoom in we get more and more fine tiles and // so they each actually cover less pixels. $fine_w = $sub_w; $fine_h = $sub_h; } else { $n_split = 1; $coarse_w = $base_w * $zoom; $coarse_h = $base_h * $zoom; $fine_w = $sub_w; $fine_h = $sub_h; } // At this level of zoom, coarse tiles are coarse_w x coarse_h, and // subdivided in each direction into $n_split fine tiles, each of // which covers $fine_w x $fine_h units. // At one point, the code tried to make the arrows scroll by just less // than a whole page, with one tile of overlap. This is practical for // quick navigation, but it ends up feeling quite clumsy. So instead // we move by the smallest possible step at each stage. $xstep = $fine_w; // * max(1, ($wt_x - 1)); $ystep = $fine_h; // * max(1, ($wt_y - 1)); $window_w = $wt_x * $fine_w; $window_h = $wt_y * $fine_h; // Push the view back within the boundaries; save as $ox $ox = $x; $oy = $y; if ($x < 0) { $x = 0; } else if ($x + $window_w > $map_w) { $x = $map_w - $window_w; } if ($y < 0) { $y = 0; } else if ($y + $window_h > $map_h) { $y = $map_h - $window_h; } // TODO: Only show links that point somewhere valid and different to // the current view // The URL parameters for x and y point to the middle of the window. // Adjust them to point to the bottom left. It's OK if this puts us // off the edge, because we'll adjust later. $bx = $x; // - $window_w / 2; $by = $y;// - $window_h / 2; // Our end goal is to show the map with x,y in the bottom corner. We // need to map from these coordinates and the oom level to a set of // coarse and fine-grained coordinates. Note that we may lie over the // edge of a coase-grained tile. // Both are measured from the top left, but the fine-grained tiles are // not measured in points but rather by index within their coarse // tile. // TODO: Make sure we don't try to link to tiles that don't exist! print "<table border=0>\n"; print "<td valign=top align=left>\n"; // print "<!-- Little left column with navigation stuff -->\n"; // link_to(0, 0, 1, "Home"); // print "<br>"; // link_to(0, 4840, 8, "Key"); // print "<br>"; // print "<a href=\"quicklinks.php\">Quick links</a>"; // print "<br>"; // print "<a href=\"how.php\">How to read</a>"; // print "<br>"; // print "<a href=\"about.php\">About</a>"; // print "<p>\n"; print_zoom_scale($x, $y, $zoom); print "<p>\n"; ?> <p><A href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=20623&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></A></p> <? print "<td>\n"; print "<!-- table containing tiles being displayed -->"; // must be no extra whitespace in here print "<table cellpadding=0 cellspacing=0 border=0>"; print "<!-- top row -->"; print "<tr>"; // colspan is 2 because we need to include the two extra // columns for the left/right arrows print "<td align=\"center\" colspan=\"" . (2+$wt_x) . "\">"; icon_perhaps($x, $y-$ystep, $zoom, $oy > 0, "arrow_up.png", "circle.png"); print "</tr>"; for ($dy = 0; $dy < $wt_y; $dy++) { $ty = $by + $dy * $fine_h; if ($ty < 0 || $ty >= $map_h) continue; print "<tr>"; if ($dy == 0) { print "<!-- left-navigation arrow -->"; print "<td rowspan=\"$wt_y\">"; /* We allow scrolling if we're not already on the far edge. */ icon_perhaps($x-$xstep, $y, $zoom, $ox > 0, "arrow_left.png", "circle.png"); print "</td>"; } for ($dx = 0; $dx < $wt_x; $dx++) { // Absolute position of this tile $tx = $bx + $dx * $fine_w; if ($tx < 0 || $tx >= $map_w) continue; print "<td>"; // Now, work out which coarse tile it lies in. Just as a final // complication, the y axis for the coarse tiles is inverted. $cx = ((int) ($tx / $coarse_w)) * $coarse_w; $cy = ($n_split - ((int) ($ty / $coarse_h)) - 1) * $coarse_h; // And which fine tile within that $fx = (int) (($tx % $coarse_w) / $fine_w); $fy = (int) (($ty % $coarse_h) / $fine_h); // Work out where this tile is so that we can zoom onto it $tile_str = tile_img($zoom, $cx, $cy, $fx, $fy); if ($zoom < 64) { link_to($tx*2, $ty*2, $zoom*2, $tile_str); } else { print $tile_str; } printf("<!-- tx=%d ty=%d cx=%d cy=%d fx=%d fy=%d -->", $tx, $ty, $cx, $cy, $fx, $fy); print "</td>"; } if ($dy == 0) { print "<!-- right-navigation arrow -->"; print "<td rowspan=\"$wt_y\">"; icon_perhaps($x+$xstep, $y, $zoom, ($ox+$window_w) < $map_w, "arrow_right.png", "circle.png"); print "</td>"; } print "</tr>"; } print "<tr><td align=\"center\" colspan=\"" . (2+$wt_x) . "\">"; icon_perhaps($x, $y+$ystep, $zoom, ($oy+$window_h) < $map_h, "arrow_down.png", "circle.png"); print "</td></tr>"; print "</table><!-- end map table -->\n"; print "</tr></table><!-- end overall table -->\n"; ?> </center> <? include ('footer.html'); ?> --- NEW FILE: phpinfo.php --- <? phpinfo(); ?> --- NEW FILE: quicklinks.php --- <? require('libfcgp.php'); $title = 'The Linux Kernel Map - Quick Links'; print_header($title); include('header.html'); ?> <center><h1><? print $title; ?></h1> <br> </center> <ul> <li><b><a href="map.php?x=2000&y=2640&zoom=8">kernel</a></b> <li><b><a href="map.php?x=850&y=1210&zoom=4">fs</a></b> <li><b><a href="map.php?x=850&y=1430&zoom=4">net</a></b> <li> <b>arch/</b> <ul> <li><a href="map.php?x=1300&y=1430&zoom=4">alpha</a> <li><a href="map.php?x=2600&y=3300&zoom=8">arm</a> <li><a href="map.php?x=2800&y=3300&zoom=8">cris</a> <li><a href="map.php?x=1800&y=3720&zoom=8">ia64</a> <li><a href="map.php?x=2400&y=3520&zoom=8">i386</a> <li><a href="map.php?x=1200&y=3500&zoom=8">m68k</a> <li><a href="map.php?x=1000&y=3060&zoom=8">mips</a> <li><a href="map.php?x=1000&y=2840&zoom=8">mips64</a> <li><a href="map.php?x=1000&y=2200&zoom=8">parisc</a> <li><a href="map.php?x=800&y=800&zoom=4">ppc</a> <li><a href="map.php?x=2200&y=1760&zoom=8">s390x</a> <li><a href="map.php?x=2800&y=1760&zoom=8">s390x</a> <li><a href="map.php?x=2800&y=1980&zoom=8">sh</a> <li><a href="map.php?x=2800&y=1980&zoom=8">sparc</a> <li><a href="map.php?x=2800&y=2420&zoom=8">sparc64</a> <ul> </ul> <? include ('footer.html'); ?> --- NEW FILE: robots.txt --- # robots.txt for kernelmapper.osdn.com # Please don't traverse the whole thing; it's pretty large User-agent: * Disallow: /map.php Disallow: /tiles Disallow: /ps --- NEW FILE: samplelink.html --- <html> <body> <table cellspacing="0" cellpadding="0"><tr><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000000x000000.big.png"><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000001x000000.big.png"></tr><tr><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000000x000001.big.png"><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000001x000001.big.png"><tr></table> </body> </html> --- NEW FILE: samplelink2.html --- <html> <body> <table cellspacing="0" cellpadding="0"><tr><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000000x000000.big.png"><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000001x000000.big.png"></tr><tr><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000000x000001.big.png"><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000001x000001.big.png"><tr></table> </body> </html> --- NEW FILE: zoom_out.png --- PNG -Ã}H ÌD2èÆ6E¦ïµP¤¦°<»çwïyï&ÀÉ_yÉ£¸J³æ=o,Lɶd×QM6¬6u$ïgKå°ÚÔ÷ÅH«¡.I¹a¼¢¸úä@#«þÒiÖ Áqu --- NEW FILE: zoom_out.xcf --- gimp xcf file New Layer ûÈÿÿª ûªÿÿ ûÿÿ ûÿÿª ûªÿÿÈ úÈÿÿóýóÿÿþ×þ×ÿÿý×ý×ÿÿ÷óȪªÈóÿÿÿ÷öÓº®®ºÓöÿÿýÞ®¬¬ý®ÞÿÿþÞ¬¬þÞÿÿýö®¬¬ú®öÿÿÓ¬ ¬ûÓÿÿº¬ ¬ûºÿÿ®¬ ¬û®ÿÿ®¬ ¬û®ÿÿº¬ ¬ûºÿÿÓ¬ ¬úÓÿÿö®¬¬ý®öÿÿþÞ¬¬þÞÿÿýÞ®¬¬ý®Þÿÿ÷öÓº®®ºÓöÿÿÿ÷ýöòïïòöýÿÿþùïïþùÿÿþùïïþùÿÿþýï ïûýÿÿöï ïûöÿÿòï ïüòÿÿïïÿ ïÿþòï ïûòÿÿöï ïûöÿÿýï ïþýÿÿþùïïþùÿÿþùïïþùÿÿ÷ýöòïïòöýÿÿ |
From: Martin P. <mb...@us...> - 2002-09-01 13:41:23
|
Update of /cvsroot/fcgp/web In directory usw-pr-cvs1:/tmp/cvs-serv16081 Added Files: HACKING Makefile README Log Message: Check in current web viewer from BK. --- NEW FILE: HACKING --- HACKING notes for FCGP -*- text -*- STRUCTURE ============================================================ It looks like this program is trying to set a record for the maximum number of programming languages in the smallest lines of code. It's a shame to use quite so many. SPEED ================================================================ We could try making the postscript faster to render, perhaps by stripping out unnecessary rotate and gsave operations. This could be done either by changing the generation code, or It might be nice to avoid the posterization step and make the rest of the program directly produce well-formed PS. It's probably not worth the effort at this stage. Since processing the Postscript takes a long time, it might be better to produce larger tiles and them cut them. I think this was my original suggestion to Rusty. The originally generated tiles should I think be as large as possible without causing swapping. Assume one word per pixel; if we can dedicate 100MB to the image that will be about 5000x5000. Showing the whole map, the output file is quite modest; only about 922kB. We ought to then load it into memory just once and spit out all the tiles. Interestingly, using gs-aladdin, even with very large output images the RSS is reasonable. Perhaps it uses banding or some kind of compressed format internally? The Gimp on wistful handles images up to about 8000x8000 with reasonable aplomb when "conservative memory usage" is set, although it does a bit of IO. Without that, it can still handle large images but it uses a lot of VM -- apparently it just doesn't bound memory usage. Perhaps we can use its scripting system to cut the images. However there seems to be no straightforward way to save the selection -- perhaps it needs to be cut into a new image and saved; this might be expensive. 16000x16000 seems a little large for it to comfortably deal with on this machine, though it's quite well-behaved as it tries. I suppose that would be about 244megs at one byte/pixel. Rusty's split-image.c seems to work pretty well. It reads everything into memory, so we might need do several top-level renders to keep everything small enough. To get a good view and sufficient details we seem to need to zoom to a level of about 128. At a zoom of 1.0 we need about 600 x 650 to cover the whole thing. Therefore at a zoom of 128, we will need about 76800 x 83200, which is about 6GB in memory. Not very realistic; therefore must split up during preliminary render. Although the numbers are not round, it seems best to make all tiles a multiple of this size; they can eventually split into four for fine-grained display on the screen. We'll start at zoom 1.0, dim 600 x 650 and allow the top-level tiles to increase in size up to zoom 8.0, dim 4800 x 5200. Beyond that point we need to do multiple toplevel tiles at increasing zoom levels. zoom # width height sub total 1 1 600 650 4 4 2 1 1200 1300 16 16 4 1 2400 2600 64 64 8 1 4800 5200 256 256 16 4 4800 5200 256 1024 32 16 4800 5200 256 4096 64 64 4800 5200 256 16384 Beyond this point it becomes rather ridiculously large, so it's just as well that the text is more or less legible and we can stop. I modified dupes.py to make it create hardlinks between identical files; we can use this to get a bit of compression on blank areas of the output. The eventual tiles ought to be about 200x200 pixels. ==== Coordinates We need a system of global coordinates for the map, independent of the current zoom level. The plan is then to first work out what position we want to display, then to use that along with the current zoom level to work out which tile to choose. When the user makes a navigation selection, we need to do just the opposite: use the current zoom level, the offset for the tile on which they clicked, and the coordinates of the click to work out where to move. Note that the offset of a tile is not necessarily the position we were aiming for when we got there, because there is some rounding in choosing a tile. So to calculate it when serving a page, we need to go from the index of the current tile. The best thing is probably to work in Postscript points for lack of anything better. This means we might need to use floating-point coordinates in the future. We consider points to be tied to the page at its bottom left corner, though when finding the best fit we look at the center of the page. This means that the PHP scripts need to know about the tiling of images: both the spacing, and the absolute boundary. Also, the spacing has to vary in a systematic way depending on the zoom factor. Tile coordinates are measured from the bottom right because that's how Postscript does it. Web browsers are the opposite. We should combine the images for blank tiles. Ideally the PHP page would turn them all into <img src=blank.png> so that the browser can use its cached version. ==== HTTP issues The ISMAP imagemap system is a little bit of a mess, since it doesn't mix nicely with other variables. It seems to always just append "?123,133" to the URL, regardless of what is already there. http://ksi.cpsc.ucalgary.ca/archives/HTML-WG/html-wg-95q2.messages/0150.html There is some suggestion that all query parameters may be stripped from the URL, so we should not count on them remaining. 0,0 is in the top left. So I think we have to use the QUERY_PATH stuff instead. TODO ================================================================= - finish speedups - test under MSIE, Netscape, Mozilla, perhaps others - mapquest interface to find functions or files --- NEW FILE: Makefile --- GSOPTS = -sDEVICE=png16m -sPAPERSIZE=a4 -dBATCH -dNOPAUSE radarmaker-75dpi.png: RadarMaker.ps gs -r75 $(GSOPTS) -sOutputFile=$@ $< radarmaker-75-int.png: RadarMaker.ps gs -r75 -dDOINTERPOLATE $(GSOPTS) -sOutputFile=$@ $< radarmaker-300.png: RadarMaker.ps gs -r300 $(GSOPTS) -sOutputFile=$@ $< radarmaker-600-bw.png: RadarMaker.ps gs -r600 $(GSOPTS) -sDEVICE=pnggray -sOutputFile=$@ $< radarmaker-1440.png: RadarMaker.ps gs -r1440 $(GSOPTS) -sOutputFile=$@ $< --- NEW FILE: README --- README for the revised Free Code Graphing Project -*- text -*- |
From: Martin P. <mb...@us...> - 2002-09-01 13:38:42
|
Update of /cvsroot/fcgp/web/python In directory usw-pr-cvs1:/tmp/cvs-serv15206/python Log Message: Directory /cvsroot/fcgp/web/python added to the repository |
From: Martin P. <mb...@us...> - 2002-09-01 13:38:42
|
Update of /cvsroot/fcgp/web/web In directory usw-pr-cvs1:/tmp/cvs-serv15206/web Log Message: Directory /cvsroot/fcgp/web/web added to the repository |
From: Martin P. <mb...@us...> - 2002-09-01 13:38:42
|
Update of /cvsroot/fcgp/web/bin In directory usw-pr-cvs1:/tmp/cvs-serv15206/bin Log Message: Directory /cvsroot/fcgp/web/bin added to the repository |
Update of /cvsroot/fcgp/lgp/codemap/web In directory usw-pr-cvs1:/tmp/cvs-serv1020/web Added Files: about.php arrow_down.png arrow_left.png arrow_right.png arrow_up.png arrow_up.xcf circle.png circle.xcf circle_small.png circle_small.xcf circle_small_dark.png circle_small_dark.xcf index.php libfcgp.php map.php phpinfo.php quicklinks.php robots.txt samplelink.html samplelink2.html zoom_out.png zoom_out.xcf Log Message: Check in from BK --- NEW FILE: about.php --- <? require('libfcgp.php'); $title = 'About the KernelMapper'; print_header($title); ?> <h1>About the KernelMapper</h1> <h2>What it means</h2> <p>A mystic mandala, or strange computer-generated art, or a map to guide your explorations? The kernel map has elements of all of these. <p>The map is a figurative rather than exact representation of the kernel. We don't expect people to refer to it while they're working on the kernel. If it helps people to understand the different subsystems, or to see the knottiness of different bits of code, or perhaps to fondly discover the little corner they've touched we will be pleased. <p>Broadly, the division of the map into segments represents the highest level division of the kernel code into subdirectories. The innermost circle, around Tux, is appropriately enough the <tt>kernel/</tt> and <tt>mm/</tt> directories, which manage memory and processes, the most fundamental objects. In the next ring out are the filesystem and networking layers. The third ring contains architecture-specific code for various systems, with one segment for each. It's clear here that some systems require much more platform-specific code than others. <p>The bulk of the code is device drivers, shown in the outermost ring. <p>Black squares represent source files, with the size of the square proportional to the number of lines in the file. Files are sorted by size within each segment. <p>Within each file there are rectangles for each function above a minimum size. These are coded red, green, and blue according to whether the function is exported, indirect or static, or other. Arcs within the function represent its control flow: functions with a single arc are probably straight-line code, while functions that look knotty probably are. <h2>How it works</h2> <p>The kernel map is a fair attempt at setting a record for the number of different tools and languages for a project of this size. You can see this either as validation of the power of using open standards to enable a toolbox approach, or as evidence of the mental instability of the authors. :-) <p>The kernel map software performs static analysis of a Linux kernel source tree. The results of the analysis are eventually digested in to a single 28MB Postscript file, containing the whole poster in vector form. This is done by a combination of two lex scanners, Perl scripts, Bourne shell scripts, and a Makefile to guide the whole thing. Postscript is produced directly by print statements. <p>For display on the web, the postscript file must be rendered into bitmaps. Because of the complexity of the vector file, rasterizing it on demand would be completely infeasible: running it through Postscript takes a couple of minutes on a fast machine. On the other hand, rendering it into a single large bitmap would be problematic anyhow because at a reasonable level of detail that bitmap would be hundreds of megabytes. <p>This system rasterizes the map into bitmap "tiles" at various levels of detail, which are then split into 200x200 "subtiles", stored as PNGs. All of this processing was performed ahead of time, so that the images can be served straight from disk to the browser. Rasterization is done by <a href="http://www.ghostscript.com/">Ghostscript</a>, controlled by a set of <a href="http://www.python.org/">Python</a> and shell scripts. Splitting of tiles into subtiles is done by a small C program using <a href="http://www.libpng.org/pub/png/libpng.html">libpng</a>. <p>As a small optimization, a Python program looks for identical subtile files, which are typically white space. These are replaced by hard links to a single file to save disk space, and, more importantly, memory. <p>The tiles are composed by a set of PHP scripts which produce HTML that stitches together the appropriate images, and manages scrolling, zooming, and so on. <p>All of the source will shortly be available from the <a href="http://fcgp.sourceforge.net/">Free Code Graphing Project</a> on <a href="http://www.sourceforge.net/">SourceForge.net</a>. <h2>Future projects</h2> <p>Understanding and representing large software projects is very much an open research project. Gaining a good understanding of how the whole kernel works can take months or years; probably nobody understands every part of it in detail. <p>Open source projects introduce additional levels of complexity: authors come and go, and specialize in different areas that can be hard to pin down. Open source projects can release new versions very rapidly, so the changes from one version to another are in themselves interesting. <p>Graphical displays can allow people to get an overview of a complex situation quickly and then zoom closer for detail. A great challenge in representing a code base this way is discovering the important relationships, so that the map is not swamped with irrelevant detail. <p>Different maps are probably needed for different purposes: somebody starting to learn their way around the kernel might want a sanitized and abstracted view that shows clean layers even when they are not quite so in practice. Somebody debugging a problem might be crucially interested in where the exceptions to general patterns lie. <p>Static analysis is not the only possible input to mapping. Showing the way locks are held, or where time is spent in execution, or how the kernel has changed in recent releases might also be useful, or at least entertaining. <p>And this is not even to mention the possibilities for interactive exploration, perhaps using something like <a href="http://touchgraph.sourceforge.net/">TouchGraph</a>. <p>The problem can perhaps be divided into two parts: firstly, mining interesting information from a codebase, and secondly converting it into an easily-understandable form. Both of them are important, and both are difficult. <p>People have made good progress in recent years by using things such as a the excellent <a href="http://www.graphviz.org/">GraphViz</a> toolkit, which provides a very quick path through the second stage. But GraphViz's approach seems to run out of conceptual steam for very large numbers of nodes. <p>We hope that the online availability of the map might encourage people to further research and hackery in this area. <p>Some more detailed notes on improving the functionality and performance of the map are on the <a href="http://fcgp.sourceforge.net/">FCGP homepage</a>. <h2>Sponsors</h2> <p><a href="http://www.linuxcare.com/">Linuxcare</a> supported Rusty in his initial work on the code map. <p>The <a href="http://www.bcg.com/">Boston Consulting Group</a> and <a href="http://www.osdn.com/">OSDN</a> supported conversion to a web map and hosting. <p>You can buy full-size printed posters from <a href="http://thinkgeek.com/stuff/fun-stuff/3884.shtml">ThinkGeek</a>. (This is much easier than printing it yourself, believe me!) <h2>Developers</h2> <p> <a href="http://www.rustcorp.com.au/~rusty/">Paul "Rusty" Russell</a> wrote the initial version of the mapping code; <a href="http://sourcefrog.net/~mbp/">Martin Pool</a> finished the web conversion; Karim Lakhani organized and initiated the project. <p>None of this would have been possible without the efforts of the many free software developers whose work it builds upon. <p><a href="map.php">Back to the map</a></center> <p><A href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=20623&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></A></p> </body> </html> --- NEW FILE: arrow_down.png --- PNG --- NEW FILE: arrow_left.png --- PNG --- NEW FILE: arrow_right.png --- PNG --- NEW FILE: arrow_up.png --- PNG bÞ<^û }¾WÉ]r x ñRJ t·YÒÌiwöûcv¥´)f_òR¦Yµ?Ôù7 ò --- NEW FILE: arrow_up.xcf --- gimp xcf file ïþýÿÿþùïïþùÿÿþùïïþùÿÿ÷ýöòïïòöýÿÿ --- NEW FILE: circle.png --- PNG 4céªfÊ^ÊõDÈRÿr>ýU3ÝýFÛU9ÄMòb}7H%õøßd)QÖ£ÚçlÀ --- NEW FILE: circle.xcf --- gimp xcf file ûÈÿÿª ûªÿÿ ûÿÿ ûÿÿª ûªÿÿÈ úÈÿÿóýóÿÿþ×þ×ÿÿý×ý×ÿÿ÷óȪªÈóÿÿÿ÷öÓº®®ºÓöÿÿýÞ®¬¬ý®ÞÿÿþÞ¬¬þÞÿÿýö®¬¬ú®öÿÿÓ¬ ¬ûÓÿÿº¬ ¬ûºÿÿ®¬ ¬û®ÿÿ®¬ ¬û®ÿÿº¬ ¬ûºÿÿÓ¬ ¬úÓÿÿö®¬¬ý®öÿÿþÞ¬¬þÞÿÿýÞ®¬¬ý®Þÿÿ÷öÓº®®ºÓöÿÿÿ÷ýöòïïòöýÿÿþùïïþùÿÿþùïïþùÿÿþýï ïûýÿÿöï ïûöÿÿòï ïüòÿÿïïÿ ïÿþòï ïûòÿÿöï ïûöÿÿýï ïþýÿÿþùïïþùÿÿþùïïþùÿÿ÷ýöòïïòöýÿÿ --- NEW FILE: circle_small.png --- PNG À áãUÍd[µûþÁn]3c0¹c ýñ#@m½ì --- NEW FILE: circle_small.xcf --- gimp xcf file --- NEW FILE: circle_small_dark.png --- PNG --- NEW FILE: circle_small_dark.xcf --- gimp xcf file --- NEW FILE: index.php --- <? require('libfcgp.php'); $title = 'The BCG/OSDN KernelMapper'; print_header($title); ?> <center><br> <br> <br> <br> <br><h1><? print $title; ?></h1> <br> <br> <br> <br> <p><a href="map.php">Enter the core</a></center> </body> </html> --- NEW FILE: libfcgp.php --- <? // Copyright (C) 2001, 2002 by Martin Pool <mb...@sa...> function print_header($title) { print "<html>"; print "<head><title>$title</title></head>\n"; print '<body bgcolor="#ffffff" text="#000000" link="#9999cc" vlink="#9999cc">'; } ?> --- NEW FILE: map.php --- <? # Copyright (C) 2001, 2002 by Martin Pool <mb...@sa...> require('libfcgp.php'); function link_to($x, $y, $zoom, $label) { global $SCRIPT_NAME; print "<a href=\"$SCRIPT_NAME?x=$x&y=$y&zoom=$zoom\">$label</a>"; } function link_perhaps($x, $y, $zoom, $label, $cond) { if ($cond) link_to($x, $y, $zoom, $label); else print $label; } function icon_perhaps($x, $y, $zoom, $cond, $true_src, $false_src) { if ($cond) link_to($x, $y, $zoom, "<img border=0 src=\"$true_src\">"); else print "<img border=0 src=\"$false_src\">"; } function tile_name($zoom, $x, $y, $ox, $oy) { return sprintf("../../tiles/zoom%03d/x%06d_y%06d/%06dx%06d.big.png", $zoom, $x, $y, $ox, $oy); } function clip_zoom($zoom) { if ($zoom <= 1) return 1; else if ($zoom <= 2) return 2; else if ($zoom <= 4) return 4; else if ($zoom <= 8) return 8; else if ($zoom <= 16) return 16; else if ($zoom <= 32) return 32; else return 64; } function print_zoom_scale($x, $y, $zoom) { print "<nobr><b>Zoom: </b>"; foreach (array(1, 2, 4, 8, 16, 32, 64) as $z) { if ($zoom == $z) { print "<img src=\"circle_small_dark.png\" border=\"0\" alt=\"$z\">"; } else { $f = $z/$zoom; link_to($x*$f, $y*$f, $z, "<img src=\"circle_small.png\" border=\"0\" alt=\"$z\">"); } } print "</nobr>\n"; } print_header("The Linux Kernel Map"); print "<center>"; if (!isset($zoom)) $zoom = 1; if (!isset($x)) $x = 0; if (!isset($y)) $y = 0; // The image tiles are a constant size, but by changing the number // displayed on the screen you can effectively change the size of the // scrolling window. $wt_x = 4; $wt_y = 3; $base_w = 600; $base_h = 600; $sub_w = 200; $sub_h = 200; $max_multiple = 8; function tile_img($zoom, $rx, $ry, $ox, $oy) { global $sub_w, $sub_h; return ("<img height=\"$sub_h\" width=\"$sub_w\" border=\"0\" src=\"" . tile_name($zoom, $rx, $ry, $ox, $oy) . "\">"); } $zoom = clip_zoom($zoom); // Overall size of the map $map_w = $base_w * $zoom; $map_h = $base_h * $zoom; // This has to match up with the maketiles code: // $max_multiple is the largest zoom at which we're willing to generate // only one coarse tile. $max_multiple = 8; if ($zoom > $max_multiple) { $n_split = $zoom / $max_multiple; $coarse_w = $base_w * $max_multiple; $coarse_h = $base_h * $max_multiple; // In this region, as we zoom in we get more and more fine tiles and // so they each actually cover less pixels. $fine_w = $sub_w; $fine_h = $sub_h; } else { $n_split = 1; $coarse_w = $base_w * $zoom; $coarse_h = $base_h * $zoom; $fine_w = $sub_w; $fine_h = $sub_h; } // At this level of zoom, coarse tiles are coarse_w x coarse_h, and // subdivided in each direction into $n_split fine tiles, each of // which covers $fine_w x $fine_h units. // At one point, the code tried to make the arrows scroll by just less // than a whole page, with one tile of overlap. This is practical for // quick navigation, but it ends up feeling quite clumsy. So instead // we move by the smallest possible step at each stage. $xstep = $fine_w; // * max(1, ($wt_x - 1)); $ystep = $fine_h; // * max(1, ($wt_y - 1)); $window_w = $wt_x * $fine_w; $window_h = $wt_y * $fine_h; // Push the view back within the boundaries; save as $ox $ox = $x; $oy = $y; if ($x < 0) { $x = 0; } else if ($x + $window_w > $map_w) { $x = $map_w - $window_w; } if ($y < 0) { $y = 0; } else if ($y + $window_h > $map_h) { $y = $map_h - $window_h; } // TODO: Only show links that point somewhere valid and different to // the current view // The URL parameters for x and y point to the middle of the window. // Adjust them to point to the bottom left. It's OK if this puts us // off the edge, because we'll adjust later. $bx = $x; // - $window_w / 2; $by = $y;// - $window_h / 2; // Our end goal is to show the map with x,y in the bottom corner. We // need to map from these coordinates and the oom level to a set of // coarse and fine-grained coordinates. Note that we may lie over the // edge of a coase-grained tile. // Both are measured from the top left, but the fine-grained tiles are // not measured in points but rather by index within their coarse // tile. // TODO: Make sure we don't try to link to tiles that don't exist! print "<!-- overall table --><tr>\n"; print "<table border=0>\n"; print "<td valign=top align=left>\n"; print "<!-- Little left column with navigation stuff -->\n"; link_to(0, 0, 1, "Home"); print "<br>"; link_to(0, 4840, 8, "Key"); print "<br>"; print "<a href=\"quicklinks.php\">Quick links</a>"; print "<br>"; print "<a href=\"about.php\">About</a>"; print "<p>\n"; print_zoom_scale($x, $y, $zoom); print "<p>\n"; ?> <p><A href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=20623&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></A></p> <? print "<td>\n"; print "<!-- table containing tiles being displayed -->"; // must be no extra whitespace in here print "<table cellpadding=0 cellspacing=0 border=0>"; print "<!-- top row -->"; print "<tr>"; // colspan is 2 because we need to include the two extra // columns for the left/right arrows print "<td align=\"center\" colspan=\"" . (2+$wt_x) . "\">"; icon_perhaps($x, $y-$ystep, $zoom, $oy > 0, "arrow_up.png", "circle.png"); print "</tr>"; for ($dy = 0; $dy < $wt_y; $dy++) { $ty = $by + $dy * $fine_h; if ($ty < 0 || $ty >= $map_h) continue; print "<tr>"; if ($dy == 0) { print "<!-- left-navigation arrow -->"; print "<td rowspan=\"$wt_y\">"; /* We allow scrolling if we're not already on the far edge. */ icon_perhaps($x-$xstep, $y, $zoom, $ox > 0, "arrow_left.png", "circle.png"); print "</td>"; } for ($dx = 0; $dx < $wt_x; $dx++) { // Absolute position of this tile $tx = $bx + $dx * $fine_w; if ($tx < 0 || $tx >= $map_w) continue; print "<td>"; // Now, work out which coarse tile it lies in. Just as a final // complication, the y axis for the coarse tiles is inverted. $cx = ((int) ($tx / $coarse_w)) * $coarse_w; $cy = ($n_split - ((int) ($ty / $coarse_h)) - 1) * $coarse_h; // And which fine tile within that $fx = (int) (($tx % $coarse_w) / $fine_w); $fy = (int) (($ty % $coarse_h) / $fine_h); // Work out where this tile is so that we can zoom onto it $tile_str = tile_img($zoom, $cx, $cy, $fx, $fy); if ($zoom < 64) { link_to($tx*2, $ty*2, $zoom*2, $tile_str); } else { print $tile_str; } printf("<!-- tx=%d ty=%d cx=%d cy=%d fx=%d fy=%d -->", $tx, $ty, $cx, $cy, $fx, $fy); print "</td>"; } if ($dy == 0) { print "<!-- right-navigation arrow -->"; print "<td rowspan=\"$wt_y\">"; icon_perhaps($x+$xstep, $y, $zoom, ($ox+$window_w) < $map_w, "arrow_right.png", "circle.png"); print "</td>"; } print "</tr>"; } print "<tr><td align=\"center\" colspan=\"" . (2+$wt_x) . "\">"; icon_perhaps($x, $y+$ystep, $zoom, ($oy+$window_h) < $map_h, "arrow_down.png", "circle.png"); print "</td></tr>"; print "</table><!-- end map table -->\n"; print "</tr></table><!-- end overall table -->\n"; ?> </center> </body> </html> --- NEW FILE: phpinfo.php --- <? phpinfo(); ?> --- NEW FILE: quicklinks.php --- <? require('libfcgp.php'); $title = 'The Linux Kernel Map - Quick Links'; print_header($title); ?> <center><h1><? print $title; ?></h1> <br> </center> <ul> <li><b><a href="map.php?x=2000&y=2640&zoom=8">kernel</a></b> <li><b><a href="map.php?x=850&y=1210&zoom=4">fs</a></b> <li><b><a href="map.php?x=850&y=1430&zoom=4">net</a></b> <li> <b>arch/</b> <ul> <li><a href="map.php?x=1300&y=1430&zoom=4">alpha</a> <li><a href="map.php?x=2600&y=3300&zoom=8">arm</a> <li><a href="map.php?x=2800&y=3300&zoom=8">cris</a> <li><a href="map.php?x=1800&y=3720&zoom=8">ia64</a> <li><a href="map.php?x=2400&y=3520&zoom=8">i386</a> <li><a href="map.php?x=1200&y=3500&zoom=8">m68k</a> <li><a href="map.php?x=1000&y=3060&zoom=8">mips</a> <li><a href="map.php?x=1000&y=2840&zoom=8">mips64</a> <li><a href="map.php?x=1000&y=2200&zoom=8">parisc</a> <li><a href="map.php?x=800&y=800&zoom=4">ppc</a> <li><a href="map.php?x=2200&y=1760&zoom=8">s390x</a> <li><a href="map.php?x=2800&y=1760&zoom=8">s390x</a> <li><a href="map.php?x=2800&y=1980&zoom=8">sh</a> <li><a href="map.php?x=2800&y=1980&zoom=8">sparc</a> <li><a href="map.php?x=2800&y=2420&zoom=8">sparc64</a> <ul> </ul> </body> </html> --- NEW FILE: robots.txt --- # robots.txt for kernelmapper.osdn.com # Please don't traverse the whole thing; it's pretty large User-agent: * Disallow: /map.php Disallow: /tiles Disallow: /ps --- NEW FILE: samplelink.html --- <html> <body> <table cellspacing="0" cellpadding="0"><tr><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000000x000000.big.png"><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000001x000000.big.png"></tr><tr><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000000x000001.big.png"><td><img border=0 src="../../tiles/zoom001/x000000_y000000/000001x000001.big.png"><tr></table> </body> </html> --- NEW FILE: samplelink2.html --- <html> <body> <table cellspacing="0" cellpadding="0"><tr><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000000x000000.big.png"><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000001x000000.big.png"></tr><tr><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000000x000001.big.png"><td><img border=0 src="../../tiles/zoom002/x000000_y000000/000001x000001.big.png"><tr></table> </body> </html> --- NEW FILE: zoom_out.png --- PNG -Ã}H ÌD2èÆ6E¦ïµP¤¦°<»çwïyï&ÀÉ_yÉ£¸J³æ=o,Lɶd×QM6¬6u$ïgKå°ÚÔ÷ÅH«¡.I¹a¼¢¸úä@#«þÒiÖ Áqu --- NEW FILE: zoom_out.xcf --- gimp xcf file New Layer ûÈÿÿª ûªÿÿ ûÿÿ ûÿÿª ûªÿÿÈ úÈÿÿóýóÿÿþ×þ×ÿÿý×ý×ÿÿ÷óȪªÈóÿÿÿ÷öÓº®®ºÓöÿÿýÞ®¬¬ý®ÞÿÿþÞ¬¬þÞÿÿýö®¬¬ú®öÿÿÓ¬ ¬ûÓÿÿº¬ ¬ûºÿÿ®¬ ¬û®ÿÿ®¬ ¬û®ÿÿº¬ ¬ûºÿÿÓ¬ ¬úÓÿÿö®¬¬ý®öÿÿþÞ¬¬þÞÿÿýÞ®¬¬ý®Þÿÿ÷öÓº®®ºÓöÿÿÿ÷ýöòïïòöýÿÿþùïïþùÿÿþùïïþùÿÿþýï ïûýÿÿöï ïûöÿÿòï ïüòÿÿïïÿ ïÿþòï ïûòÿÿöï ïûöÿÿýï ïþýÿÿþùïïþùÿÿþùïïþùÿÿ÷ýöòïïòöýÿÿ |
From: Martin P. <mb...@us...> - 2002-08-16 01:35:20
|
Update of /cvsroot/fcgp/lgp/codemap/bin In directory usw-pr-cvs1:/tmp/cvs-serv1020/bin Added Files: maketiles rendertile split-image.c Log Message: Check in from BK --- NEW FILE: maketiles --- #! /usr/bin/python # Generate top-level tiles; before subdivision. import sys, os from os import system base_w = 600 base_h = 600 sub_w = 200 sub_h = 200 max_multiple = 8 if len(sys.argv) != 3: print "usage: maketoplevel PSFILE OUTDIR" sys.exit(1) psfile, outdir = sys.argv[1:] def runcmd(s): print s if system(s): sys.exit(1) def file_exists(f): try: os.stat(f) return 1 except OSError: return 0 for zoom in [1, 2, 4, 8, 16, 32, 64]: if zoom > max_multiple: coarse_split = zoom / max_multiple this_w = base_w * max_multiple this_h = base_h * max_multiple else: coarse_split = 1 this_w = base_w * zoom this_h = base_h * zoom print "%7d %7d %7d %7d" % (zoom, coarse_split**2, this_w, this_h) for xs in range(coarse_split): for ys in range(coarse_split): x = xs * base_w * zoom / coarse_split y = ys * base_h * zoom / coarse_split print "\t%07d %07d" % (x, y) this_dir = "%s/zoom%03d/x%06d_y%06d" % (outdir, zoom, x, y) system("mkdir -p %s" % this_dir) this_file = "top.png" if file_exists("%s/%s" % (this_dir, this_file)): print "already exists; skipped" continue runcmd("rendertile %s %d %d %d %d %d %s/%s" % (psfile, zoom, x, y, this_w, this_h, this_dir, this_file)) # now, split up into smaller tiles subsplit_w = this_w / sub_w subsplit_h = this_h / sub_h runcmd("cd %s && split-image %s %d %d" % (this_dir, this_file, subsplit_w, subsplit_h)) --- NEW FILE: rendertile --- #! /bin/sh -e # Copyright (C) 2001, 2002 by Martin Pool <mb...@sa...> # Part of the Linux Graphing Project # Produce one tile for a Postscript rendering. Takes four parameters: # the .ps filename, zoom, x, and y positions. (x,y) ties the bottom # left corner of the produced tile, and is in PS points. $zoom is # relative to standard script. # Note that X and Y are in *zoomed* coordinates: if you double the # zoom, you must also double X and Y to stay in the same place. if [ $# != 7 ] then echo "usage: rendertile PSFILE ZOOM X Y W H OUTFILE" exit 1 fi psfile=$1 zoom=$2 x=$3 y=$4 w=$5 h=$6 outfile=$7 cat >&2 <<EOF psfile=$1 outfile=$outfile zoom=$2 x=$3 y=$4 w=$w h=$h EOF size="-dDEVICEHEIGHTPOINTS=$h -dDEVICEWIDTHPOINTS=$w" ( cat <<EOF $x neg $y neg translate $zoom dup scale EOF cat $psfile ) | gs-aladdin -r72 $size -dQUIET -sDEVICE=png256 -dBATCH -dNOPAUSE \ -sOutputFile="$outfile" - # pngfile=${psfile%.ps}_${zoom}_${x}_${y}.png # look at putdeviceprops GraphicsAlphaBits for antialiasing? --- NEW FILE: split-image.c --- /* Takes a png, creates pngs XxY.png up to given arguments */ #include <limits.h> #include <stdlib.h> #include <png.h> /* C trick to stringize a constant (expand to the number first) */ #define _STRINGIZE(x) #x #define STRINGIZE(x) _STRINGIZE(x) /* Useful macro which defines max size of a string containing an int. UINT has a U at the end, but int may have - at the front, so the size is correct. */ #define INT_CHARS (sizeof(STRINGIZE(UINT_MAX))) static png_structp create_output(unsigned int x, unsigned int y, unsigned int width, unsigned int height, png_colorp palette, png_uint_16 num_palette) { png_structp png_ptr; png_infop info_ptr; char filename[INT_CHARS * 2 + sizeof("%ux%u.big.png")]; FILE *f; sprintf(filename, "%06ux%06u.big.png", x, y); f = fopen(filename, "w"); if (!f) return NULL; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL); if (!png_ptr) return NULL; info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_write_struct(&png_ptr, (png_infopp)NULL); return NULL; } if (setjmp(png_ptr->jmpbuf)) { png_destroy_write_struct(&png_ptr, &info_ptr); return NULL; } png_init_io(png_ptr, f); png_set_IHDR(png_ptr, info_ptr, width, height, 8, PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_set_PLTE(png_ptr, info_ptr, palette, num_palette); png_write_info(png_ptr, info_ptr); return png_ptr; } static void break_up(png_structp input, png_infop info, unsigned int num_cols, unsigned int num_rows) { unsigned int x, y, i; png_structp output[num_cols][num_rows]; png_bytep rowdata; png_colorp palette; int num_palette; unsigned int width, height; png_get_PLTE(input, info, &palette, &num_palette); /* Round down if neccessary */ width = png_get_image_width(input, info)/num_cols; height = png_get_image_height(input, info)/num_rows; /* Open output files */ for (x = 0; x < num_cols; x++) { for (y = 0; y < num_rows; y++) { output[x][y] = create_output(x, y, width, height, palette, num_palette); } } rowdata = malloc(png_get_image_width(input, info)); for (i = 0; i < num_rows * height; i++) { png_read_row(input, rowdata, NULL); /* Which image does this belong to? */ y = i / height; for (x = 0; x < num_cols; x++) { /* Write one line out to this image */ png_write_row(output[x][y], rowdata + x * width); } } for (x = 0; x < num_cols; x++) { for (y = 0; y < num_rows; y++) { png_write_end(output[x][y], NULL); } } } /* input.png num-columns num-rows */ int main(int argc, char *argv[]) { FILE *fp; png_uint_32 width, height; int bit_depth, color_type; png_structp png_ptr; png_infop info_ptr; if (argc != 4) { fprintf(stderr, "Usage: split-image input.png num-columns num-rows\n"); exit(1); } fp = fopen(argv[1], "r"); if (!fp) { fprintf(stderr, "Can't open `%s'\n", argv[1]); exit(1); } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL); info_ptr = png_create_info_struct(png_ptr); png_init_io(png_ptr, fp); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); png_set_packing(png_ptr); break_up(png_ptr, info_ptr, atoi(argv[2]), atoi(argv[3])); return 0; } |
From: Martin P. <mb...@us...> - 2002-08-16 01:35:20
|
Update of /cvsroot/fcgp/lgp/codemap/python In directory usw-pr-cvs1:/tmp/cvs-serv1020/python Added Files: Codemap.py ps.py Log Message: Check in from BK --- NEW FILE: Codemap.py --- #! /usr/bin/python2 # Copyright (C) 2001-2002 by Martin Pool <mb...@sa...> """ A reimplementation of Rusty's Linux Graphing Project code. We always work in the standard Postscript coordinate system, to more easily allow later mapping from mouse clicks into items on the graph. There are 72 basis points per inch, and we work in a 10x10 inch space. """ from sys import stdout, stderr from ps import * def draw_coords(): """Draw Postscript coordinates bounding our space""" setlinewidth(1.0/4) setoff = DPI/8/4 moveto(setoff, setoff) lineto(setoff, PAGE_H-setoff) lineto(PAGE_W-setoff, PAGE_H-setoff) lineto(PAGE_W-setoff, setoff) lineto(setoff, setoff) stroke() for i in range(1, PAGE_W/DPI): p = i*DPI eighth = DPI/8 teenth = DPI/16 moveto(setoff, p) lineto(eighth, p) moveto(PAGE_W, p) lineto(PAGE_W - eighth, p) moveto(p, setoff) lineto(p, eighth) moveto(p, PAGE_H) lineto(p, PAGE_W - eighth) # small marks along horizontal center axis moveto(p, CENTER-teenth) lineto(p, CENTER+teenth) # small marks along vertical center axis moveto(CENTER-teenth, p) lineto(CENTER+teenth, p) stroke() def draw_sector(a1, a2, r1, r2, text, rgb): """Draw a sector on the pie, from radius 1 to radius 2 and angle1 to angle2, with text somewhere near the center. The inner arc is not drawn.""" setblack() arc(CENTER, CENTER, r1, a1, a2) arc(CENTER, CENTER, r2, -a2, -a1) # arc(CENTER, CENTER, r1, a1, a1) # TODO: Draw text # gsave() setrgbcolor(rgb) fill() # grestore() #stroke() def draw_toplevel(): """Draw a toplevel graph of the Linux kernel. Image is sent stdout as PostScript.""" setlinewidth(2.0) arc(PAGE_W/2, PAGE_H/2, 1*DPI, 0, 360) stroke() setfontbyname("Helvetica-Oblique", 20) showtext(PAGE_W/2, PAGE_H/2, "linux") stroke() # a1 = 0 # for a2 in (45, 130, 150, 220, 260, 330, 360): # draw_sector(a1, a2, 1*DPI, 2*DPI, "foo", (1.0, .2, .2)) # a1 = a2 draw_sector(0, 45, 1*DPI, 2*DPI, "foo", (.7, .2, .2)) adsc_header() draw_coords() draw_toplevel() showpage() adsc_trailer() --- NEW FILE: ps.py --- #! /usr/bin/python2 # Copyright (C) 2001-2002 by Martin Pool <mb...@sa...> DPI = 72.0 PAGE_W = 10 * DPI PAGE_H = 10 * DPI CENTER = PAGE_W/2 def setlinewidth(w): """Set line width to W points""" print "%f setlinewidth" % (w) def arc(x, y, rad, start, end): print "%f %f %f %f %f arc" % (x, y, rad, start, end) def setfontbyname(fname, scale): print "/%s findfont %f scalefont setfont" % (fname, scale) def showtext(x, y, text): print "(%s) dup stringwidth" % (text) # -- string tw th print "exch 2 div %f exch sub" % (x) # -- string th xx print "exch 2 div %f exch sub" % (y) # -- string xx yy print "moveto show" def moveto(x, y): print "%f %f moveto" % (x, y) def lineto(x, y): print "%f %f lineto" % (x, y) def showpage(): print "showpage" def stroke(): print "stroke" def fill(): print "fill" def strokepath(): print "strokepath" def setrgbcolor(rgb): print "%f %f %f setrgbcolor" % rgb def setblack(): setrgbcolor((0, 0, 0)) def gsave(): print "gsave" def grestore(): print "grestore" def adsc_header(): print """%!PS-Adobe-2.0 %%Creator: Codemap %%Title: codemap %%BoundingBox: 0 0 720 720 %%EndComments """ def adsc_trailer(): print "%%Trailer" |
From: Martin P. <mb...@us...> - 2002-08-16 01:35:20
|
Update of /cvsroot/fcgp/lgp/codemap In directory usw-pr-cvs1:/tmp/cvs-serv1020 Added Files: HACKING Makefile README Log Message: Check in from BK --- NEW FILE: HACKING --- HACKING notes for FCGP -*- text -*- STRUCTURE ============================================================ It looks like this program is trying to set a record for the maximum number of programming languages in the smallest lines of code. It's a shame to use quite so many. SPEED ================================================================ We could try making the postscript faster to render, perhaps by stripping out unnecessary rotate and gsave operations. This could be done either by changing the generation code, or It might be nice to avoid the posterization step and make the rest of the program directly produce well-formed PS. It's probably not worth the effort at this stage. Since processing the Postscript takes a long time, it might be better to produce larger tiles and them cut them. I think this was my original suggestion to Rusty. The originally generated tiles should I think be as large as possible without causing swapping. Assume one word per pixel; if we can dedicate 100MB to the image that will be about 5000x5000. Showing the whole map, the output file is quite modest; only about 922kB. We ought to then load it into memory just once and spit out all the tiles. Interestingly, using gs-aladdin, even with very large output images the RSS is reasonable. Perhaps it uses banding or some kind of compressed format internally? The Gimp on wistful handles images up to about 8000x8000 with reasonable aplomb when "conservative memory usage" is set, although it does a bit of IO. Without that, it can still handle large images but it uses a lot of VM -- apparently it just doesn't bound memory usage. Perhaps we can use its scripting system to cut the images. However there seems to be no straightforward way to save the selection -- perhaps it needs to be cut into a new image and saved; this might be expensive. 16000x16000 seems a little large for it to comfortably deal with on this machine, though it's quite well-behaved as it tries. I suppose that would be about 244megs at one byte/pixel. Rusty's split-image.c seems to work pretty well. It reads everything into memory, so we might need do several top-level renders to keep everything small enough. To get a good view and sufficient details we seem to need to zoom to a level of about 128. At a zoom of 1.0 we need about 600 x 650 to cover the whole thing. Therefore at a zoom of 128, we will need about 76800 x 83200, which is about 6GB in memory. Not very realistic; therefore must split up during preliminary render. Although the numbers are not round, it seems best to make all tiles a multiple of this size; they can eventually split into four for fine-grained display on the screen. We'll start at zoom 1.0, dim 600 x 650 and allow the top-level tiles to increase in size up to zoom 8.0, dim 4800 x 5200. Beyond that point we need to do multiple toplevel tiles at increasing zoom levels. zoom # width height sub total 1 1 600 650 4 4 2 1 1200 1300 16 16 4 1 2400 2600 64 64 8 1 4800 5200 256 256 16 4 4800 5200 256 1024 32 16 4800 5200 256 4096 64 64 4800 5200 256 16384 Beyond this point it becomes rather ridiculously large, so it's just as well that the text is more or less legible and we can stop. I modified dupes.py to make it create hardlinks between identical files; we can use this to get a bit of compression on blank areas of the output. The eventual tiles ought to be about 200x200 pixels. ==== Coordinates We need a system of global coordinates for the map, independent of the current zoom level. The plan is then to first work out what position we want to display, then to use that along with the current zoom level to work out which tile to choose. When the user makes a navigation selection, we need to do just the opposite: use the current zoom level, the offset for the tile on which they clicked, and the coordinates of the click to work out where to move. Note that the offset of a tile is not necessarily the position we were aiming for when we got there, because there is some rounding in choosing a tile. So to calculate it when serving a page, we need to go from the index of the current tile. The best thing is probably to work in Postscript points for lack of anything better. This means we might need to use floating-point coordinates in the future. We consider points to be tied to the page at its bottom left corner, though when finding the best fit we look at the center of the page. This means that the PHP scripts need to know about the tiling of images: both the spacing, and the absolute boundary. Also, the spacing has to vary in a systematic way depending on the zoom factor. Tile coordinates are measured from the bottom right because that's how Postscript does it. Web browsers are the opposite. We should combine the images for blank tiles. Ideally the PHP page would turn them all into <img src=blank.png> so that the browser can use its cached version. ==== HTTP issues The ISMAP imagemap system is a little bit of a mess, since it doesn't mix nicely with other variables. It seems to always just append "?123,133" to the URL, regardless of what is already there. http://ksi.cpsc.ucalgary.ca/archives/HTML-WG/html-wg-95q2.messages/0150.html There is some suggestion that all query parameters may be stripped from the URL, so we should not count on them remaining. 0,0 is in the top left. So I think we have to use the QUERY_PATH stuff instead. TODO ================================================================= - finish speedups - test under MSIE, Netscape, Mozilla, perhaps others - mapquest interface to find functions or files --- NEW FILE: Makefile --- GSOPTS = -sDEVICE=png16m -sPAPERSIZE=a4 -dBATCH -dNOPAUSE radarmaker-75dpi.png: RadarMaker.ps gs -r75 $(GSOPTS) -sOutputFile=$@ $< radarmaker-75-int.png: RadarMaker.ps gs -r75 -dDOINTERPOLATE $(GSOPTS) -sOutputFile=$@ $< radarmaker-300.png: RadarMaker.ps gs -r300 $(GSOPTS) -sOutputFile=$@ $< radarmaker-600-bw.png: RadarMaker.ps gs -r600 $(GSOPTS) -sDEVICE=pnggray -sOutputFile=$@ $< radarmaker-1440.png: RadarMaker.ps gs -r1440 $(GSOPTS) -sOutputFile=$@ $< --- NEW FILE: README --- README for the revised Free Code Graphing Project -*- text -*- |
From: Martin P. <mb...@us...> - 2002-08-16 01:29:39
|
Update of /cvsroot/fcgp/lgp/codemap/bin In directory usw-pr-cvs1:/tmp/cvs-serv31953/codemap/bin Log Message: Directory /cvsroot/fcgp/lgp/codemap/bin added to the repository |
From: Martin P. <mb...@us...> - 2002-08-16 01:29:39
|
Update of /cvsroot/fcgp/lgp/codemap/web In directory usw-pr-cvs1:/tmp/cvs-serv31953/codemap/web Log Message: Directory /cvsroot/fcgp/lgp/codemap/web added to the repository |
From: Martin P. <mb...@us...> - 2002-08-16 01:29:39
|
Update of /cvsroot/fcgp/lgp/codemap In directory usw-pr-cvs1:/tmp/cvs-serv31953/codemap Log Message: Directory /cvsroot/fcgp/lgp/codemap added to the repository |