/* * Creates an HTML rendering for this month * Copyright (C) 1999 the Free Software Foundation * * Authors: * Miguel de Icaza (miguel@kernel.org) */ #include #include #include #include #include #include #include #include "calendar.h" #include "alarm.h" #include "eventedit.h" #include "gnome-cal.h" #include "main.h" #include "timeutil.h" static void make_html_header (GnomeCalendar *gcal, GString *s) { g_string_sprintf (s, "\n" " \n" " %s\n" " \n" " \n", gcal->cal->title); } static void make_html_footer (GString *s) { g_string_sprintf (s, ""); } static void make_days_headers (GString *s) { g_string_append (s, "

\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"); } static void make_days (GnomeCalendar *gcal, GString *s) { struct tm tm, month; time_t month_start; int day; time_t now = time (NULL); make_days_headers (s); tm = *localtime (&now); tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_mday = 1; month_start = mktime (&tm); month = *localtime (&month_start); for (day = 0; day < month.tm_mday; day++){ } #if 0 day = 0; for (y = 0; y < 5; y++){ for (x = 0; x < 7; x++){ if (month.tm_mday < day } } #endif } void make_month_html (GnomeCalendar *gcal, char *output) { FILE *f; GString *s; g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); f = fopen (output, "w"); if (!f){ g_warning ("Add nice error message here"); return; } s = g_string_new (""); make_html_header (gcal, s); make_days (gcal, s); make_html_footer (s); fwrite (s->str, strlen (s->str), 1, f); g_string_free (s, TRUE); fclose (f); }
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAY
aboutsummaryrefslogtreecommitdiffstats

Commit message (Collapse)AuthorAgeFilesLines
* - Update devel/automake to 1.15tijl2015-01-241-2/+2
| | | | | | | | | | | | | | | | | | | - Update devel/gettext to 0.19.4 - Update devel/libtool and devel/libltdl to 2.4.5 - This version of libtool has been fixed to pass -fstack-protector to the compiler during linking. Add the same fix to USES=libtool. This should improve SSP support on FreeBSD/i386 8 and 9. - databases/libmemcached, security/sssd: patch configure.ac so AC_CONFIG_AUX_DIR appears earlier. For databases/libmemcached changing configure.ac causes manpages to be regenerated which requires extra dependencies so patch a makefile to prevent that. - devel/xfce4-dev-tools: only depend on recent versions of autoconf and automake PR: 196938 Exp-run by: antoine Approved by: portmgr (antoine)
* Remove unused configure-autotools target from Mk/bsd.autotools.mk andtijl2014-10-071-23/+0
| | | | | | Mk/bsd.port.mk Approved by: portmgr (bapt)
* Remove support for old autoconf and automake versions from USE_AUTOTOOLS:tijl2014-10-011-66/+2
| | | | | | autoconf213, autoheader213, aclocal14 and automake14 Approved by: portmgr (bapt)
* - Remove last uses of USE_AUTOTOOLS=libtool from bsd.gnome.mktijl2014-09-171-51/+9
| | | | | | | | (lthack, ltasneededhack and ltverhack) [1] - Remove support for USE_AUTOTOOLS=libtool and USE_AUTOTOOLS=libltdl PR: 188978 [1] Approved by: portmgr (bapt)
* tabspace: 8bapt2014-06-181-70/+65
|
* - Run autotools in the same order as autoreconf, i.e. libtoolize, aclocal,tijl2014-05-061-9/+9
| | | | | | | | | | | | | | | | | | | | | autoconf, autoheader, automake. [1] This should allow replacing custom pre-configure and run-autotools targets that some ports have with USE_AUTOTOOLS. - Set default LIBTOOLIZE_ARGS: -i: install missing build scripts. -c: copy files instead of linking them. This is needed for USES=libtool to be able to patch them. -f: force replacement of existing files. This ensures all files belong to the same version. database/vsqlite: - Fix with new LIBTOOLIZE_ARGS. - INSTALL_TARGET=install-strip. - Drop :keepla. Reported by: Nikola Kolev <koue@chaosophia.net> [1] Exp-run: antoine Approved by: portmgr (antoine)
* Convert all :U to :tu and :L to :tlbapt2014-05-051-1/+1
| | | | | | | | | | | | | | Since FreeBSD 8.4 and FreeBSD 9.1 make(1) do support :tu and :tl as a replacement for :U and :L (which has been marked as deprecated) bmake which is the default on FreeBSD 10+ only support by default :tu/:tl a hack has been added at the time to support :U and :L to ease migration. This hack is now not necessary anymore Note that this makes the ports tree incompatible with make(1) from FreeBSD 8.3 or earlier With hat: portmgr
* Convert LIB_DEPENDSbapt2013-12-131-1/+1
|
* Fix spelling mistakekoobs2013-09-011-1/+1
| | | | Reported by: danfe (with hat: aspell)
* Document the LIBTOOLIZE_ARGS variablekoobs2013-08-311-0/+3
| | | | Approved by: bdrewery (portmgr)
* - Update devel/automake to 1.14ade2013-07-161-3/+6
| | | | | | | | | | | - Update devel/gettext to 0.18.3 - Fix known-broken (from exp-runs) ports - Clean up a lot of cruft in the devel/gettext port itself, based on work from tijl@ PR: 178883 Submitted by: ade Sponsored by: Wadsworth 6X
* Update to 1.12.6ade2012-12-201-1/+1
|
* Update to 1.12.5ade2012-12-131-1/+1
|
* Update to 1.12.4ade2012-09-211-1/+1
|
* Update to 1.12.3ade2012-08-181-1/+1
| | | | Feature safe: yes
* Update to 1.12.2 (feature safe from 1.12.1, no -exp required)ade2012-07-111-1/+1
|
* Update to 1.12.1 (essentially a no-op with some bugfixes)ade2012-06-281-1/+1
|
* - Remove emacs mode, -*- mode: ...; -*- [1]miwi2012-05-231-1/+1
| | | | | | | | | | | | | | | | - Comments for BUILD_ and RUN_DEPENDS fail to mention alternate means to specify dependencie [2] - Fix make reinstall [3] - Trivial comment change for PORTDATA [4] PR: 151954 [1] 161314 [2] 167085 [3] 167465 [4] Submitted by: Anonymous <swell.k@gmail.com> [1] dougb@ and Chris Rees <utisoft@gmail.com> [2] Garrett Cooper <yanegomi@gmail.com> [3] "Bryan Drewery" <bryan@shatow.net> [4] Tested via: phw
* Update autoconf to 2.69 and automake to 1.12ade2012-05-121-3/+3
| | | | | PR: 166836 Tested by: Multiple -exp runs (pav)