aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/calendar/paskha.c
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2008-08-05 08:11:54 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2008-08-05 08:11:54 +0000
commit35304a1641c82d5bf294317683451576fced313e (patch)
tree207ef0ba038d902b3008c892f508249448bae268 /usr.bin/calendar/paskha.c
parent7f05f04afd5f70d7d980c03caaf0f5d78afa4593 (diff)
downloadsrc-35304a1641c82d5bf294317683451576fced313e.tar.gz
src-35304a1641c82d5bf294317683451576fced313e.zip
style(9)ify usr.bin/calendar
PR: bin/118644 Approved by: bde@ (mentor) MFC after: 1 week
Notes
Notes: svn path=/head/; revision=181322
Diffstat (limited to 'usr.bin/calendar/paskha.c')
-rw-r--r--usr.bin/calendar/paskha.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/usr.bin/calendar/paskha.c b/usr.bin/calendar/paskha.c
index 769d09152d99..d96ffc2546e0 100644
--- a/usr.bin/calendar/paskha.c
+++ b/usr.bin/calendar/paskha.c
@@ -34,10 +34,10 @@ __FBSDID("$FreeBSD$");
#include "calendar.h"
-#define PASKHA "paskha"
-#define PASKHALEN (sizeof(PASKHA) - 1)
+#define PASKHA "paskha"
+#define PASKHALEN (sizeof(PASKHA) - 1)
-static int paskha (int);
+static int paskha(int);
/* return year day for Orthodox Easter using Gauss formula */
/* (old style result) */
@@ -52,8 +52,8 @@ paskha(int R) /*year*/
a = R % 19;
b = R % 4;
c = R % 7;
- d = (19*a + x) % 30;
- e = (2*b + 4*c + 6*d + y) % 7;
+ d = (19 * a + x) % 30;
+ e = (2 * b + 4 * c + 6 * d + y) % 7;
return (((cumdays[3] + 1) + 22) + (d + e));
}
@@ -65,29 +65,27 @@ getpaskha(char *s, int year)
int offset;
if (strncasecmp(s, PASKHA, PASKHALEN) == 0)
- s += PASKHALEN;
- else if ( npaskha.name != NULL
- && strncasecmp(s, npaskha.name, npaskha.len) == 0
- )
- s += npaskha.len;
+ s += PASKHALEN;
+ else if (npaskha.name != NULL
+ && strncasecmp(s, npaskha.name, npaskha.len) == 0)
+ s += npaskha.len;
else
- return 0;
-
+ return 0;
/* Paskha+1 or Paskha-2
* ^ ^ */
- switch(*s) {
+ switch (*s) {
case '-':
case '+':
- offset = atoi(s);
- break;
+ offset = atoi(s);
+ break;
default:
- offset = 0;
- break;
+ offset = 0;
+ break;
}
-
- return (paskha(year) + offset + 13/* new style */);
+
+ return (paskha(year) + offset + 13 /* new style */);
}