X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fcalendar.c;h=e07e7d63aca2e9043f7edf692c351147183137e4;hb=f20d313de2b85419c3e2e22a78cdcdce499af43d;hp=ef6aa6755e4a922171fa863020091cf8094e5405;hpb=a258e53c63a08b0ec48aea8f03808eb651729424;p=pspp
diff --git a/src/data/calendar.c b/src/data/calendar.c
index ef6aa6755e..e07e7d63ac 100644
--- a/src/data/calendar.c
+++ b/src/data/calendar.c
@@ -1,9 +1,28 @@
+/* PSPP - a program for statistical analysis.
+ Copyright (C) 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
+
#include
-#include "calendar.h"
+
+#include "data/calendar.h"
+
#include
#include
-#include
-#include
+
+#include "data/settings.h"
+#include "data/val-type.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@ -52,12 +71,14 @@ raw_gregorian_to_offset (int y, int m, int d)
Gregorian calendar. Returns SYSMIS for dates before 14 Oct
1582. */
double
-calendar_gregorian_to_offset (int y, int m, int d, char **errorp)
+calendar_gregorian_to_offset (int y, int m, int d,
+ const struct fmt_settings *settings,
+ char **errorp)
{
/* Normalize year. */
if (y >= 0 && y < 100)
{
- int epoch = settings_get_epoch ();
+ int epoch = fmt_settings_get_epoch (settings);
int century = epoch / 100 + (y < epoch % 100);
y += century * 100;
}