From a609f73aaa42aa0011bc1322fe761b45e3451145 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 27 Dec 2002 16:09:18 +0000 Subject: fix indent --- etc.c | 7 ++++--- file.c | 20 ++++++++++---------- news.c | 44 ++++++++++++++++++++++++-------------------- 3 files changed, 38 insertions(+), 33 deletions(-) diff --git a/etc.c b/etc.c index 717c1ba..93d4cd4 100644 --- a/etc.c +++ b/etc.c @@ -1,4 +1,4 @@ -/* $Id: etc.c,v 1.45 2002/12/27 15:53:04 ukai Exp $ */ +/* $Id: etc.c,v 1.46 2002/12/27 16:09:18 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -1745,8 +1745,9 @@ mymktime(char *timestr) return -1; } #ifdef DEBUG - fprintf(stderr, "year=%d month=%d day=%d hour:min:sec=%d:%d:%d zone=%d:%d\n", - year, mon, day, hour, min, sec, z_hour, z_min); + fprintf(stderr, + "year=%d month=%d day=%d hour:min:sec=%d:%d:%d zone=%d:%d\n", year, + mon, day, hour, min, sec, z_hour, z_min); #endif /* DEBUG */ mon -= 3; diff --git a/file.c b/file.c index dfeba9b..337634b 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.172 2002/12/27 16:07:44 ukai Exp $ */ +/* $Id: file.c,v 1.173 2002/12/27 16:09:18 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -2034,7 +2034,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, b = loadSomething(&f, pu.real_file ? pu.real_file : pu.file, proc, t_buf); frame_source = 0; if (f.scheme != SCM_NNTP && f.scheme != SCM_NEWS) - UFclose(&f); + UFclose(&f); if (b) { b->real_scheme = f.scheme; b->real_type = real_type; @@ -6458,10 +6458,10 @@ loadHTMLstream(URLFile *f, Buffer *newBuf, FILE * src, int internal) if (f->scheme == SCM_NEWS && lineBuf2->ptr[0] == '.') { Strshrinkfirst(lineBuf2, 1); if (lineBuf2->ptr[0] == '\n' || lineBuf2->ptr[0] == '\r' || - lineBuf2->ptr[0] == '\0') { -/* - iseos(f->stream) = TRUE; -*/ + lineBuf2->ptr[0] == '\0') { + /* + * iseos(f->stream) = TRUE; + */ break; } } @@ -6763,10 +6763,10 @@ loadBuffer(URLFile *uf, Buffer *volatile newBuf) if (uf->scheme == SCM_NEWS && lineBuf2->ptr[0] == '.') { Strshrinkfirst(lineBuf2, 1); if (lineBuf2->ptr[0] == '\n' || lineBuf2->ptr[0] == '\r' || - lineBuf2->ptr[0] == '\0') { -/* - iseos(uf->stream) = TRUE; -*/ + lineBuf2->ptr[0] == '\0') { + /* + * iseos(uf->stream) = TRUE; + */ break; } } diff --git a/news.c b/news.c index 0b312e8..84c61d6 100644 --- a/news.c +++ b/news.c @@ -1,4 +1,4 @@ -/* $Id: news.c,v 1.1 2002/12/27 16:07:44 ukai Exp $ */ +/* $Id: news.c,v 1.2 2002/12/27 16:09:18 ukai Exp $ */ #include "fm.h" #include "myctype.h" #include @@ -33,7 +33,7 @@ KeyAbort(SIGNAL_ARG) } static Str -news_command(News *news, char *command, int *status) +news_command(News * news, char *command, int *status) { Str tmp; char c; @@ -54,7 +54,7 @@ news_command(News *news, char *command, int *status) } static void -news_close(News *news) +news_close(News * news) { if (!news->host) return; @@ -70,7 +70,7 @@ news_close(News *news) } static int -news_open(News *news) +news_open(News * news) { Str tmp; int sock, status; @@ -97,7 +97,7 @@ news_open(News *news) } static void -news_quit(News *news) +news_quit(News * news) { news_command(news, "QUIT", NULL); news_close(news); @@ -114,9 +114,9 @@ name_from_address(char *str, int n) if (*s == '<' && (p = strchr(s, '>'))) { *p++ = '\0'; SKIP_BLANKS(p); - if (*p == '\0') /*
*/ + if (*p == '\0') /*
*/ s++; - else /*
name ? */ + else /*
name ? */ s = p; } else if ((p = strchr(s, '<'))) /* name
*/ @@ -192,9 +192,10 @@ add_news_message(Str str, int index, char *date, char *name, char *subject, t = mymktime(date); tm = localtime(&t); Strcat(str, - Sprintf("%d(%02d/%02d)%s%s\n", - index, tm->tm_mon + 1, tm->tm_mday, html_quote_s(name), - html_quote(file_quote(mid)), html_quote(subject))); + Sprintf + ("%d(%02d/%02d)%s%s\n", + index, tm->tm_mon + 1, tm->tm_mday, html_quote_s(name), + html_quote(file_quote(mid)), html_quote(subject))); } InputStream @@ -223,8 +224,7 @@ openNewsStream(ParsedURL *pu) else mode = NULL; if (current_news.host) { - if (!strcmp(current_news.host, host) && - current_news.port == port) { + if (!strcmp(current_news.host, host) && current_news.port == port) { tmp = Sprintf("MODE %s", mode ? mode : "READER"); tmp = news_command(¤t_news, tmp->ptr, &status); if (status != 200 && status != 201) @@ -296,11 +296,14 @@ readNewsgroup(ParsedURL *pu) if (fmInitialized) term_cbreak(); - page = Sprintf("Newsgroup: %s\n

Newsgroup: %s

\n
\n", - qgroup, qgroup); + page = + Sprintf + ("Newsgroup: %s\n

Newsgroup: %s

\n
\n", + qgroup, qgroup); qgroup = html_quote(file_quote(group)); /* URL */ - tmp = news_command(¤t_news, Sprintf("GROUP %s", group)->ptr, &status); + tmp = + news_command(¤t_news, Sprintf("GROUP %s", group)->ptr, &status); if (status != 211) goto news_list; if (sscanf(tmp->ptr, "%d %d %d %d", &status, &i, &first, &last) != 4) @@ -329,7 +332,7 @@ readNewsgroup(ParsedURL *pu) Strcat_charp(page, "\n"); news_command(¤t_news, Sprintf("XOVER %d-%d", start, end - 1)->ptr, - &status); + &status); if (status == 224) { f.scheme = SCM_NEWS; while (1) { @@ -361,7 +364,7 @@ readNewsgroup(ParsedURL *pu) } } else { - init_stream(&f, SCM_NEWS, current_news.rf); + init_stream(&f, SCM_NEWS, current_news.rf); buf = newBuffer(INIT_BUFFER_WIDTH); for (i = start; i < end && i <= last; i++) { news_command(¤t_news, Sprintf("HEAD %d", i)->ptr, &status); @@ -416,8 +419,9 @@ readNewsgroup(ParsedURL *pu) if (sscanf(q, "%d %d", &last, &first) == 2 && last >= first) i = last - first + 1; Strcat(page, - Sprintf("
%d%s\n", - i, html_quote(file_quote(p)), html_quote(p))); + Sprintf + ("
%d%s\n", i, + html_quote(file_quote(p)), html_quote(p))); } if (flag == 2) Strcat_charp(page, "
\n"); @@ -435,4 +439,4 @@ disconnectNews(void) news_quit(¤t_news); } -#endif /* USE_NNTP */ +#endif /* USE_NNTP */ -- cgit v1.2.3