@@ -67,8 +67,8 @@ static struct jtm in_jtm;
67
67
68
68
extern char * tzname [2 ];
69
69
70
- void
71
- in_jasctime ( const struct jtm * jtm , char * buf ) {
70
+ void in_jasctime ( const struct jtm * jtm , char * buf )
71
+ {
72
72
if (!jtm )
73
73
return ;
74
74
@@ -96,8 +96,8 @@ in_jasctime(const struct jtm* jtm, char* buf) {
96
96
}
97
97
}
98
98
99
- void
100
- in_jlocaltime ( const time_t * timep , struct jtm * result ) {
99
+ void in_jlocaltime ( const time_t * timep , struct jtm * result )
100
+ {
101
101
if (!timep )
102
102
return ;
103
103
@@ -143,8 +143,8 @@ in_jlocaltime(const time_t* timep, struct jtm* result) {
143
143
memcpy (& in_jtm , & c_jtm , sizeof (struct jtm ));
144
144
}
145
145
146
- void
147
- in_jctime ( const time_t * timep , char * buf ) {
146
+ void in_jctime ( const time_t * timep , char * buf )
147
+ {
148
148
if (!timep )
149
149
return ;
150
150
@@ -159,8 +159,8 @@ in_jctime(const time_t* timep, char* buf) {
159
159
}
160
160
}
161
161
162
- void
163
- in_jgmtime ( const time_t * timep , struct jtm * result ) {
162
+ void in_jgmtime ( const time_t * timep , struct jtm * result )
163
+ {
164
164
if (!timep )
165
165
return ;
166
166
@@ -191,43 +191,43 @@ in_jgmtime(const time_t* timep, struct jtm* result) {
191
191
memcpy (& in_jtm , & c_jtm , sizeof (struct jtm ));
192
192
}
193
193
194
- char *
195
- jasctime ( const struct jtm * jtm ) {
194
+ char * jasctime ( const struct jtm * jtm )
195
+ {
196
196
if (!jtm )
197
197
return 0 ;
198
198
199
199
in_jasctime (jtm , 0 );
200
200
return in_buf ;
201
201
}
202
202
203
- char *
204
- jctime ( const time_t * timep ) {
203
+ char * jctime ( const time_t * timep )
204
+ {
205
205
if (!timep )
206
206
return 0 ;
207
207
208
208
in_jctime (timep , 0 );
209
209
return in_buf ;
210
210
}
211
211
212
- struct jtm *
213
- jgmtime ( const time_t * timep ) {
212
+ struct jtm * jgmtime ( const time_t * timep )
213
+ {
214
214
if (!timep )
215
215
return 0 ;
216
216
in_jgmtime (timep , 0 );
217
217
return & in_jtm ;
218
218
}
219
219
220
- struct jtm *
221
- jlocaltime ( const time_t * timep ) {
220
+ struct jtm * jlocaltime ( const time_t * timep )
221
+ {
222
222
if (!timep )
223
223
return 0 ;
224
224
225
225
in_jlocaltime (timep , 0 );
226
226
return & in_jtm ;
227
227
}
228
228
229
- time_t
230
- jmktime ( const struct jtm * jtm ) {
229
+ time_t jmktime ( const struct jtm * jtm )
230
+ {
231
231
if (!jtm )
232
232
return (time_t ) (-1 );
233
233
tzset ();
@@ -242,8 +242,8 @@ jmktime(const struct jtm* jtm) {
242
242
return t ;
243
243
}
244
244
245
- size_t
246
- jstrftime ( char * s , size_t max , const char * format , const struct jtm * jtm ) {
245
+ size_t jstrftime ( char * s , size_t max , const char * format , const struct jtm * jtm )
246
+ {
247
247
if (!s || max <= 0 || !format || !jtm )
248
248
return -1 ;
249
249
@@ -641,8 +641,8 @@ jstrftime(char* s, size_t max, const char* format, const struct jtm* jtm) {
641
641
return rb ;
642
642
}
643
643
644
- char *
645
- jstrptime ( const char * s , const char * format , struct jtm * jtm ) {
644
+ char * jstrptime ( const char * s , const char * format , struct jtm * jtm )
645
+ {
646
646
char buf [MAX_BUF_SIZE ];
647
647
char delim [MAX_BUF_SIZE ];
648
648
@@ -844,8 +844,8 @@ jstrptime(const char* s, const char* format, struct jtm* jtm) {
844
844
return (char * ) & s [s_s ];
845
845
}
846
846
847
- char *
848
- jasctime_r ( const struct jtm * jtm , char * buf ) {
847
+ char * jasctime_r ( const struct jtm * jtm , char * buf )
848
+ {
849
849
if (!jtm || !buf )
850
850
return 0 ;
851
851
@@ -854,8 +854,8 @@ jasctime_r(const struct jtm* jtm, char* buf) {
854
854
return in_buf ;
855
855
}
856
856
857
- struct jtm *
858
- jlocaltime_r ( const time_t * timep , struct jtm * result ) {
857
+ struct jtm * jlocaltime_r ( const time_t * timep , struct jtm * result )
858
+ {
859
859
if (!timep || !result )
860
860
return 0 ;
861
861
@@ -864,8 +864,8 @@ jlocaltime_r(const time_t* timep, struct jtm* result) {
864
864
return & in_jtm ;
865
865
}
866
866
867
- struct jtm *
868
- jgmtime_r ( const time_t * timep , struct jtm * result ) {
867
+ struct jtm * jgmtime_r ( const time_t * timep , struct jtm * result )
868
+ {
869
869
if (!timep || !result )
870
870
return 0 ;
871
871
@@ -874,8 +874,8 @@ jgmtime_r(const time_t* timep, struct jtm* result) {
874
874
return & in_jtm ;
875
875
}
876
876
877
- char *
878
- jctime_r ( const time_t * timep , char * buf ) {
877
+ char * jctime_r ( const time_t * timep , char * buf )
878
+ {
879
879
if (!timep || !buf )
880
880
return 0 ;
881
881
@@ -890,8 +890,12 @@ jctime_r(const time_t* timep, char* buf) {
890
890
* jalali_to_farsi() converts an integer's digits to Arabic-Indic
891
891
* padding works just like printf() field width.
892
892
*/
893
- int jalali_to_farsi (char * buf , size_t n , int padding , char * pad ,
894
- int d ) {
893
+ int jalali_to_farsi (char * buf ,
894
+ size_t n ,
895
+ int padding ,
896
+ char * pad ,
897
+ int d )
898
+ {
895
899
char _buf [100 ] = {0 };
896
900
int i = 0 , j = 0 ;
897
901
int p = 0 ;
0 commit comments