[cairo-commit]
cairo-demo/cairo_snippets cairo_snippets_html.c, 1.2, 1.3
OEyvind Kolaas
commit at pdx.freedesktop.org
Thu May 20 08:06:40 PDT 2004
- Previous message: [cairo-commit] cairo-demo/cairo_snippets arc_negative.cairo, NONE,
1.1 curve_to.cairo, NONE, 1.1 footer.html_template, NONE,
1.1 header.html_template, NONE, 1.1 .cvsignore, 1.3,
1.4 ChangeLog, 1.12, 1.13 Makefile, 1.7, 1.8 arc.cairo, 1.1,
1.2 cairo_snippets_html.c, 1.1, 1.2 caps.cairo, 1.1,
1.2 joins.cairo, 1.1, 1.2 text.cairo, 1.1,
1.2 text_centering.cairo, 1.1, 1.2 bezier_spline.cairo, 1.1,
NONE caps_and_joins.cairo, 1.1, NONE footer.html, 1.1,
NONE header.html, 1.2, NONE
- Next message: [cairo-commit]
cairo-demo/cairo_snippets cairo_snippets_html.c, 1.3,
1.4 xxx_dash.cairo, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: pippin
Update of /cvs/cairo/cairo-demo/cairo_snippets
In directory pdx:/tmp/cvs-serv27857
Modified Files:
cairo_snippets_html.c
Log Message:
further changes for single page/snippet for web
Index: cairo_snippets_html.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/cairo_snippets/cairo_snippets_html.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** a/cairo_snippets_html.c 20 May 2004 14:33:23 -0000 1.2
--- b/cairo_snippets_html.c 20 May 2004 15:06:38 -0000 1.3
***************
*** 29,32 ****
--- 29,54 ----
}
+ static void
+ index(FILE *file, int active)
+ {
+ int i;
+ fprintf (file, "<p>\n");
+
+ if (active==-1)
+ fprintf (file, "all <---<br />\n");
+ else
+ fprintf (file, "<a href='snippets.html'>all</a><br />\n");
+
+ for (i=0;i<snippet_count;i++) {
+ if (i==active)
+ fprintf (file, "%s <---<br />\n", snippet_name[i]);
+ else
+ fprintf (file, "<a href='%s.html'>%s</a><br />\n",
+ snippet_name[i], snippet_name[i]);
+ }
+
+ fprintf (file, "</p>\n");
+ }
+
void
write_index(void)
***************
*** 36,54 ****
embed_file (file, "header.html_template");
! fprintf (file, "<ul>\n");
!
! fprintf (file, "<li><a href='snippets.html'>all</a></li>\n");
! for (i=0;i<snippet_count;i++)
! fprintf (file, "<li><a href='%s.html'>%s</a></li>\n",
! snippet_name[i], snippet_name[i]);
!
! fprintf (file, "</ul>\n");
!
embed_file (file, "footer.html_template");
fclose (file);
}
-
-
void
write_all(void)
--- 58,66 ----
embed_file (file, "header.html_template");
! index (file, -2);
embed_file (file, "footer.html_template");
fclose (file);
}
void
write_all(void)
***************
*** 58,68 ****
embed_file (file, "header.html_template");
! fprintf (file, "<ul>\n");
!
! for (i=0;i<snippet_count;i++)
! fprintf (file, "<li><a href='#%s'>%s</a></li>\n",
! snippet_name[i], snippet_name[i]);
!
! fprintf (file, "</ul>\n");
fprintf (file, "<table>\n");
--- 70,74 ----
embed_file (file, "header.html_template");
! index (file, -1);
fprintf (file, "<table>\n");
***************
*** 122,137 ****
embed_file (file, "header.html_template");
- fprintf (file, "<p><a href='index.html'>index</a>");
! if (snippet_no>0)
! fprintf (file, " <a href='%s.html'>prev(%s)</a>", snippet_name[snippet_no-1], snippet_name[snippet_no-1]);
! else
! fprintf (file, "");
! if (snippet_no<snippet_count-1)
! fprintf (file, " <a href='%s.html'>next(%s)</a>", snippet_name[snippet_no+1], snippet_name[snippet_no+1]);
! else
! fprintf (file, "");
! fprintf (file, "</p>\n");
fprintf (file, "<table>\n");
--- 128,136 ----
embed_file (file, "header.html_template");
! fprintf (file, "<table><tr><td rowspacing='3' valign='top'>\n");
! index (file, snippet_no);
! fprintf (file, "</td><td valign='top'><p>");
fprintf (file, "<table>\n");
***************
*** 174,178 ****
fprintf (file, " <tr><td> </td></tr>\n");
}
! fprintf (file, "</table>");
embed_file (file, "footer.html_template");
fclose (file);
--- 173,177 ----
fprintf (file, " <tr><td> </td></tr>\n");
}
! fprintf (file, "</table></td></table>");
embed_file (file, "footer.html_template");
fclose (file);
- Previous message: [cairo-commit] cairo-demo/cairo_snippets arc_negative.cairo, NONE,
1.1 curve_to.cairo, NONE, 1.1 footer.html_template, NONE,
1.1 header.html_template, NONE, 1.1 .cvsignore, 1.3,
1.4 ChangeLog, 1.12, 1.13 Makefile, 1.7, 1.8 arc.cairo, 1.1,
1.2 cairo_snippets_html.c, 1.1, 1.2 caps.cairo, 1.1,
1.2 joins.cairo, 1.1, 1.2 text.cairo, 1.1,
1.2 text_centering.cairo, 1.1, 1.2 bezier_spline.cairo, 1.1,
NONE caps_and_joins.cairo, 1.1, NONE footer.html, 1.1,
NONE header.html, 1.2, NONE
- Next message: [cairo-commit]
cairo-demo/cairo_snippets cairo_snippets_html.c, 1.3,
1.4 xxx_dash.cairo, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list