From: hno <> Date: Sun, 7 Jan 2001 17:57:13 +0000 (+0000) Subject: Various indent cleanups where indent got a bit confused.. X-Git-Tag: SQUID_3_0_PRE1~1680 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a695e7ee359c327e7abed87189df55283b87d126;p=thirdparty%2Fsquid.git Various indent cleanups where indent got a bit confused.. --- diff --git a/contrib/rredir.c b/contrib/rredir.c index 5b2183b613..6e6374002a 100644 --- a/contrib/rredir.c +++ b/contrib/rredir.c @@ -1,4 +1,4 @@ -/* $Id: rredir.c,v 1.3 1996/09/14 16:54:47 wessels Exp $ */ +/* $Id: rredir.c,v 1.4 2001/01/07 10:57:13 hno Exp $ */ /* * From: richard@hekkihek.hacom.nl (Richard Huveneers) @@ -80,7 +80,7 @@ main() s++; /* security: do not redirect to hidden files, the current - * ** directory or the parent directory */ + * directory or the parent directory */ if (*s == '.' || *s == '\0') goto dont_redirect; diff --git a/include/snmp_pdu.h b/include/snmp_pdu.h index edee35c3fa..16b0b11a2c 100644 --- a/include/snmp_pdu.h +++ b/include/snmp_pdu.h @@ -1,5 +1,3 @@ - -/* -*- c++ -*- */ #ifndef _SNMP_PDU_H_ #define _SNMP_PDU_H_ @@ -27,7 +25,7 @@ * * Author: Ryan Troll * - * $Id: snmp_pdu.h,v 1.3 2001/01/07 09:55:22 hno Exp $ + * $Id: snmp_pdu.h,v 1.4 2001/01/07 10:57:14 hno Exp $ * **********************************************************************/ @@ -57,34 +55,26 @@ struct snmp_pdu { u_int time; /* Uptime */ }; -#ifdef __cplusplus -extern "C" { -#endif - - struct snmp_pdu *snmp_pdu_create(int); - struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *); - struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int); - struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int); - void snmp_free_pdu(struct snmp_pdu *); - void snmp_pdu_free(struct snmp_pdu *); +struct snmp_pdu *snmp_pdu_create(int); +struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *); +struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int); +struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int); +void snmp_free_pdu(struct snmp_pdu *); +void snmp_pdu_free(struct snmp_pdu *); - u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *); - u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *); - char *snmp_pdu_type(struct snmp_pdu *); +u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *); +u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *); +char *snmp_pdu_type(struct snmp_pdu *); /* Add a NULL Variable to a PDU */ - void snmp_add_null_var(struct snmp_pdu *, oid *, int); +void snmp_add_null_var(struct snmp_pdu *, oid *, int); -#ifdef __cplusplus -} - -#endif /* - * * * RFC 1905: Protocol Operations for SNMPv2 - * * * - * * * RFC 1157: A Simple Network Management Protocol (SNMP) - * * * - * * * PDU Types - */ +/* RFC 1905: Protocol Operations for SNMPv2 + * + * RFC 1157: A Simple Network Management Protocol (SNMP) + * + * PDU Types + */ #define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0) #define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1) #define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2) @@ -98,13 +88,14 @@ extern "C" { #define SNMP_DEFAULT_ERRSTAT -1 #define SNMP_DEFAULT_ERRINDEX -1 #define SNMP_DEFAULT_ADDRESS 0 -#define SNMP_DEFAULT_REQID 0 /* - * * * RFC 1907: Management Information Base for SNMPv2 - * * * - * * * RFC 1157: A Simple Network Management Protocol (SNMP) - * * * - * * * Trap Types - */ +#define SNMP_DEFAULT_REQID 0 + +/* RFC 1907: Management Information Base for SNMPv2 + * + * RFC 1157: A Simple Network Management Protocol (SNMP) + * + * Trap Types + */ #define SNMP_TRAP_COLDSTART (0x0) #define SNMP_TRAP_WARMSTART (0x1) #define SNMP_TRAP_LINKDOWN (0x2) @@ -112,4 +103,4 @@ extern "C" { #define SNMP_TRAP_AUTHENTICATIONFAILURE (0x4) #define SNMP_TRAP_EGPNEIGHBORLOSS (0x5) #define SNMP_TRAP_ENTERPRISESPECIFIC (0x6) -#endif /* _SNMP_PDU_H_ */ +#endif /* _SNMP_PDU_H_ */ diff --git a/include/snmp_util.h b/include/snmp_util.h index 28b9bd9309..ba26dc9c41 100644 --- a/include/snmp_util.h +++ b/include/snmp_util.h @@ -1,19 +1,15 @@ /* - * $Id: snmp_util.h,v 1.6 1998/09/23 17:20:04 wessels Exp $ + * $Id: snmp_util.h,v 1.7 2001/01/07 10:57:14 hno Exp $ */ #ifndef SNMP_UTIL_H #define SNMP_UTIL_H -/* - * call a function at regular intervals (in seconds): - */ +/* call a function at regular intervals (in seconds): */ extern void snmp_alarm(int ival, void (*handler) (void)); -/* - * service for filedescriptors: - */ +/* service for filedescriptors: */ extern void fd_add(int fd, void (*func) (int fd)); extern void fd_service(void); @@ -22,55 +18,32 @@ extern void fd_service(void); /* ---------------------------------------------------------------------- */ /* - * ** SNMP Agent extension for Spacer-Controler Management - * ** - * ** Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy - * ** - */ -/* - * ** Function to safely copy a string, and ensure the last - * ** character is always '\0'. + * SNMP Agent extension for Spacer-Controler Management + * + * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy */ -void - strcpy_safe(char *str, int str_len, char *val); -/* - * ** Function to get IP address of this agent - * ** WARNING: this scans all interfaces (slow) - */ -u_long -Util_local_ip_address(void); +/* Function to safely copy a string, and ensure the last + * character is always '\0'. */ +void strcpy_safe(char *str, int str_len, char *val); -/* - * ** Function to get the current time in seconds - */ -long - Util_time_now(void); +/* Function to get IP address of this agent + * WARNING: this scans all interfaces (slow) */ +u_long Util_local_ip_address(void); -/* - * ** Function to determine how long the agent has been running - * * (WARNING: this seems rather slow) - */ -long - Util_time_running(); +/* Function to get the current time in seconds */ +long Util_time_now(void); -/* - * ** Read data from file - */ -int - Util_file_read(char *file, int offset, char *data, int dataSz); +/* Function to determine how long the agent has been running + * (WARNING: this seems rather slow) */ +long Util_time_running(); -/* - * ** Write data into file - */ -int - Util_file_write(char *file, int offset, char *data, int dataSz); +/* Read data from file */ +int Util_file_read(char *file, int offset, char *data, int dataSz); +/* Write data into file */ +int Util_file_write(char *file, int offset, char *data, int dataSz); /* ---------------------------------------------------------------------- */ - - - - #endif diff --git a/include/snmp_vars.h b/include/snmp_vars.h index fc2897e656..3532ae250d 100644 --- a/include/snmp_vars.h +++ b/include/snmp_vars.h @@ -1,4 +1,3 @@ -/* -*- c++ -*- */ #ifndef _SNMP_VARS_H_ #define _SNMP_VARS_H_ @@ -26,7 +25,7 @@ * * Author: Ryan Troll * - * $Id: snmp_vars.h,v 1.9 2001/01/07 09:55:22 hno Exp $ + * $Id: snmp_vars.h,v 1.10 2001/01/07 10:57:14 hno Exp $ * **********************************************************************/ @@ -43,25 +42,20 @@ struct variable_list { int val_len; }; -#ifdef __cplusplus -extern "C" { -#endif +struct variable_list *snmp_var_new(oid *, int); +struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char); +struct variable_list *snmp_var_clone(struct variable_list *); +void snmp_var_free(struct variable_list *); - struct variable_list *snmp_var_new(oid *, int); - struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char); - struct variable_list *snmp_var_clone(struct variable_list *); - void snmp_var_free(struct variable_list *); +u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int); +u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int); - u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int); - u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int); +#define MAX_NAME_LEN 64 /* number of subid's in a objid */ -#ifdef __cplusplus -} - -#endif -#define MAX_NAME_LEN 64 /* number of subid's in a objid *//* *RFC 1902:Structure of Management Information for SNMPv2 * *Defined Types -* - */ +/* RFC 1902: Structure of Management Information for SNMPv2 + * + * Defined Types + */ #define SMI_INTEGER ASN_INTEGER #define SMI_STRING ASN_OCTET_STR #define SMI_OBJID ASN_OBJECT_ID diff --git a/lib/snprintf.c b/lib/snprintf.c index fd9c202e5e..a44f342821 100644 --- a/lib/snprintf.c +++ b/lib/snprintf.c @@ -1,5 +1,5 @@ /* - * $Id: snprintf.c,v 1.17 1999/04/15 06:15:38 wessels Exp $ + * $Id: snprintf.c,v 1.18 2001/01/07 10:57:14 hno Exp $ */ /* ==================================================================== @@ -762,9 +762,7 @@ format_converter(register buffy * odp, const char *fmt, precision = FLOAT_DIGITS; else if (precision == 0) precision = 1; - /* - * * We use &num_buf[ 1 ], so that we have room for the sign - */ + /* We use &num_buf[ 1 ], so that we have room for the sign */ s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1]); if (*s == '-') prefix_char = *s++; diff --git a/src/comm.cc b/src/comm.cc index af5456cd6d..a5cd7e9832 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.313 2001/01/05 09:51:37 adrian Exp $ + * $Id: comm.cc,v 1.314 2001/01/07 10:57:14 hno Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -856,7 +856,7 @@ commHandleWrite(int fd, void *data) /* Select for Writing on FD, until SIZE bytes are sent. Call - * * HANDLER when complete. */ + * *HANDLER when complete. */ void comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func) { diff --git a/src/ftp.cc b/src/ftp.cc index 6b9674693e..917ce5b805 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.303 2001/01/06 11:46:43 hno Exp $ + * $Id: ftp.cc,v 1.304 2001/01/07 10:57:15 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1784,8 +1784,8 @@ ftpOpenListenSocket(FtpStateData * ftpState, int fallback) int on = 1; u_short port = 0; /* - * * Tear down any old data connection if any. We are about to - * * establish a new one. + * Tear down any old data connection if any. We are about to + * establish a new one. */ if (ftpState->data.fd > 0) { comm_close(ftpState->data.fd);