[Pkg-wmaker-commits] [wmbiff] 02/07: indent run
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:05:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to tag wmbiff_0_4_24
in repository wmbiff.
commit b25c142475a7c3d53644991ca70d7e5af281bbb6
Author: bluehal <bluehal>
Date: Wed Apr 28 00:19:03 2004 +0000
indent run
---
wmbiff/Client.h | 6 ++--
wmbiff/charutil.c | 9 ++---
wmbiff/socket.c | 23 ++++++------
wmbiff/test_wmbiff.c | 99 +++++++++++++++++++++++++++-------------------------
wmbiff/wmbiff.c | 4 +--
5 files changed, 73 insertions(+), 68 deletions(-)
diff --git a/wmbiff/Client.h b/wmbiff/Client.h
index 8701e5f..77c9aa1 100644
--- a/wmbiff/Client.h
+++ b/wmbiff/Client.h
@@ -1,11 +1,11 @@
-/* $Id: Client.h,v 1.39 2004/03/28 00:28:58 bluehal Exp $ */
+/* $Id: Client.h,v 1.40 2004/04/28 00:19:03 bluehal Exp $ */
/* Author : Scott Holden ( scotth at thezone.net )
Modified : Yong-iL Joh ( tolkien at mizi.com )
Modified : Jorge Garc�a ( Jorge.Garcia at uv.es )
*
* Email Checker Pop3/Imap4/Licq/Gicu/mbox/maildir/finger
*
- * Last Updated : $Date: 2004/03/28 00:28:58 $
+ * Last Updated : $Date: 2004/04/28 00:19:03 $
*
*/
@@ -124,7 +124,7 @@ int fileHasChanged(const char *mbox_filename, time_t * atime,
time_t * mtime, off_t * size);
int grabCommandOutput(Pop3 pc, const char *command,
/*@out@ */ char **output,
- /*@out@ *//*@null@ */ char **details);
+/*@out@ *//*@null@ */ char **details);
int exists(const char *filename); /* test -f */
/* _NONE is for silent operation. _ERROR is for things that should
diff --git a/wmbiff/charutil.c b/wmbiff/charutil.c
index 896c81e..9b8108b 100644
--- a/wmbiff/charutil.c
+++ b/wmbiff/charutil.c
@@ -1,4 +1,4 @@
-/* $Id: charutil.c,v 1.18 2004/04/20 04:55:46 bluehal Exp $ */
+/* $Id: charutil.c,v 1.19 2004/04/28 00:19:03 bluehal Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -244,9 +244,10 @@ char *strdup_ordie(const char *c)
return (ret);
}
-void StripComment(char *buf) {
- char *p;
-
+void StripComment(char *buf)
+{
+ char *p;
+
/* Strip comments at beginning of line, or after whitespace.
a kludgy way of avoiding problems with #'s in passwords. */
if (buf[0] == '#')
diff --git a/wmbiff/socket.c b/wmbiff/socket.c
index b018e58..f2e7d36 100644
--- a/wmbiff/socket.c
+++ b/wmbiff/socket.c
@@ -1,4 +1,4 @@
-/* $Id: socket.c,v 1.11 2004/04/28 00:18:18 bluehal Exp $ */
+/* $Id: socket.c,v 1.12 2004/04/28 00:19:03 bluehal Exp $ */
/* Copyright (C) 1998 Trent Piepho <xyzzy at u.washington.edu>
* (C) 1999 Trent Piepho <xyzzy at speakeasy.org>
*
@@ -42,15 +42,16 @@
extern int Relax;
static int sanity_check_hostname(const char *hostname)
{
- struct in_addr dummy;
+ struct in_addr dummy;
return (Relax
|| regulo_match("^[A-Za-z][-_A-Za-z0-9.]+$", hostname, NULL)
- || inet_aton(hostname, &dummy));
+ || inet_aton(hostname, &dummy));
}
-static int ipv4_sock_connect(struct in_addr *address, short port) {
+static int ipv4_sock_connect(struct in_addr *address, short port)
+{
struct sockaddr_in addr;
- int fd, i;
+ int fd, i;
fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd == -1) {
perror("Error opening socket");
@@ -83,7 +84,7 @@ int sock_connect(const char *hostname, int port)
{
#ifdef HAVE_GETADDRINFO
struct addrinfo hints, *res, *res0;
- struct sockaddr_in addr;
+ struct sockaddr_in addr;
int fd;
char pbuf[NI_MAXSERV];
int error;
@@ -96,10 +97,10 @@ int sock_connect(const char *hostname, int port)
return -1;
}
- /* we were given an IP address, no need to try getaddrinfo on it */
- if(inet_aton(hostname, &addr.sin_addr)) {
- return ipv4_sock_connect(&addr.sin_addr, port);
- }
+ /* we were given an IP address, no need to try getaddrinfo on it */
+ if (inet_aton(hostname, &addr.sin_addr)) {
+ return ipv4_sock_connect(&addr.sin_addr, port);
+ }
memset(&hints, 0, sizeof(hints));
hints.ai_socktype = SOCK_STREAM;
@@ -155,7 +156,7 @@ int sock_connect(const char *hostname, int port)
return (-1);
};
- return ipv4_sock_connect(host->h_addr_list[0], port);
+ return ipv4_sock_connect(host->h_addr_list[0], port);
#endif
}
diff --git a/wmbiff/test_wmbiff.c b/wmbiff/test_wmbiff.c
index b84f532..2e23f57 100644
--- a/wmbiff/test_wmbiff.c
+++ b/wmbiff/test_wmbiff.c
@@ -190,7 +190,8 @@ int test_imap4creator(void)
CKINT(m.u.pop_imap.serverPort, 143);
if (imap4Create(&m, "imap:foo:@192.168.1.1/\"mybox\"")) {
- printf("FAILED: to create IMAP box with IP address for servername\n");
+ printf
+ ("FAILED: to create IMAP box with IP address for servername\n");
return 1;
}
CKSTRING(m.path, "\"mybox\"");
@@ -325,58 +326,60 @@ int test_getline_from_buffer(void)
return (0);
}
-int test_charutil(void) {
-
- char *v = strdup("abc#def");
-
- StripComment(v);
- if(strcmp(v, "abc#def") != 0) {
- printf("FAILURE: comment stripper stripped when it shouldn't\n");
- return 1;
- }
-
- v = strdup("abc #def");
-
- StripComment(v);
- if(strcmp(v, "abc ") != 0) {
- printf("FAILURE: comment stripper should've stripped\n");
- return 1;
- }
-
-
- return 0;
+int test_charutil(void)
+{
+
+ char *v = strdup("abc#def");
+
+ StripComment(v);
+ if (strcmp(v, "abc#def") != 0) {
+ printf("FAILURE: comment stripper stripped when it shouldn't\n");
+ return 1;
+ }
+
+ v = strdup("abc #def");
+
+ StripComment(v);
+ if (strcmp(v, "abc ") != 0) {
+ printf("FAILURE: comment stripper should've stripped\n");
+ return 1;
+ }
+
+
+ return 0;
}
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
-int test_sock_connect(void) {
- struct sockaddr_in addr;
- int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- int addrlen = sizeof(struct sockaddr_in);
- if( s < 0 ) {
- perror("socket");
- return 1;
- }
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = 0;
- addr.sin_port = 0;
- if( bind(s, &addr, sizeof(struct sockaddr_in)) < 0 ) {
- perror("bind");
- return 1;
- }
- getsockname(s, &addr, &addrlen);
- if( listen(s,5) < 0 ) {
- perror("listen");
- return 1;
- }
- if( sock_connect("127.0.0.1", htons(addr.sin_port)) < 0) {
- return 1;
- }
- if( sock_connect("localhost", htons(addr.sin_port)) < 0) {
- return 1;
- }
- return 0;
+int test_sock_connect(void)
+{
+ struct sockaddr_in addr;
+ int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ int addrlen = sizeof(struct sockaddr_in);
+ if (s < 0) {
+ perror("socket");
+ return 1;
+ }
+ addr.sin_family = AF_INET;
+ addr.sin_addr.s_addr = 0;
+ addr.sin_port = 0;
+ if (bind(s, &addr, sizeof(struct sockaddr_in)) < 0) {
+ perror("bind");
+ return 1;
+ }
+ getsockname(s, &addr, &addrlen);
+ if (listen(s, 5) < 0) {
+ perror("listen");
+ return 1;
+ }
+ if (sock_connect("127.0.0.1", htons(addr.sin_port)) < 0) {
+ return 1;
+ }
+ if (sock_connect("localhost", htons(addr.sin_port)) < 0) {
+ return 1;
+ }
+ return 0;
}
diff --git a/wmbiff/wmbiff.c b/wmbiff/wmbiff.c
index 4e4e7ce..ccf7b18 100644
--- a/wmbiff/wmbiff.c
+++ b/wmbiff/wmbiff.c
@@ -1,4 +1,4 @@
-/* $Id: wmbiff.c,v 1.62 2004/04/20 04:55:55 bluehal Exp $ */
+/* $Id: wmbiff.c,v 1.63 2004/04/28 00:19:03 bluehal Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -162,7 +162,7 @@ static int ReadLine(FILE * fp, /*@out@ */ char *setting,
buf[len - 1] = '\0'; /* strip linefeed */
}
- StripComment(buf);
+ StripComment(buf);
if (!(p = strtok(buf, "=")))
return -1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git
More information about the Pkg-wmaker-commits
mailing list