Selaa lähdekoodia

test/misc/code: removed trailing spaces

Daniel-Constantin Mierla 1 vuosi sitten
vanhempi
commit
386bf69889

+ 3 - 3
test/misc/code/atomic_test.c

@@ -2,18 +2,18 @@
  *
  *  simple atomic ops testing program
  *  (no paralel stuff, just see if the opcodes are "legal")
- * 
+ *
  *  Compile with: gcc -Wall -O3 -D__CPU_i386  on x86 machines
  *                gcc -Wall -O3 -D__CPU_x86_64 on amd64 machines
  *                gcc -mips2 -Wall -O2 -D__CPU_mips2  on mips machines
  *                gcc -m64 -Wall -O2 -D__CPU_mips64 on mips64 machines
  *                gcc -O3 -Wall -D__CPU_ppc on powerpc machines
  *                gcc -m64 -O3 -Wall -D__CPU_ppc64 on powerpc machines
- *                gcc -m64 -O3 -Wall -D__CPU_sparc64 -DSPARC64_MODE on 
+ *                gcc -m64 -O3 -Wall -D__CPU_sparc64 -DSPARC64_MODE on
  *                                                   ultrasparc machines
  *  -- andrei
  *
- *  
+ *
  */
 
 #include <stdio.h>

+ 6 - 6
test/misc/code/atomic_test2.c

@@ -13,24 +13,24 @@
  *           __CPU_xxx - use __CPU_xxx code
  *           SPARC64_MODE - compile for a sparc 64 in 64 bit mode (gcc -m64
  *                          must be used on solaris in this case)
- *  Example:  
+ *  Example:
  *    gcc -Wall -O3 -D__CPU_i386 -DNOSMP -DMEMBAR -DTYPE=long atomic_test2.c
- * 
+ *
  *  Compile with: gcc -Wall -O3 -D__CPU_i386  ... on x86 machines
  *                gcc -Wall -O3 -D__CPU_x86_64 ... on amd64 machines
  *                gcc -mips2 -Wall -O2 -D__CPU_mips2  ... on mips machines
  *                gcc -m64 -Wall -O2 -D__CPU_mips64 ... on mips64 machines
  *                gcc -O3 -Wall -D__CPU_ppc ... on powerpc machines
  *                gcc -m64 -O3 -Wall -D__CPU_ppc64 ... on powerpc machines
- *                gcc -m64 -O3 -Wall -D__CPU_sparc64 -DSPARC64_MODE ... on 
+ *                gcc -m64 -O3 -Wall -D__CPU_sparc64 -DSPARC64_MODE ... on
  *                                                   ultrasparc machines
- *                gcc -mcpu=v9 -O3 -Wall -D__CPU_sparc64  ... for 32 bit code 
- *                                                   (sparc32plus) on 
+ *                gcc -mcpu=v9 -O3 -Wall -D__CPU_sparc64  ... for 32 bit code
+ *                                                   (sparc32plus) on
  *                                                   ultrasparc machines
  *                gcc -O3 -Wall -D__CPU_sparc ... on sparc v8 machines
  *  -- andrei
  *
- *  
+ *
  */
 
 #include <stdio.h>

+ 3 - 3
test/misc/code/auto.c

@@ -16,8 +16,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
@@ -466,7 +466,7 @@ int main(int argc, char **argv)
 							break;
 						case UNKNOWN_HEADER:
 						default:
-							/*printf("found unknown header, state=%d\n", 
+							/*printf("found unknown header, state=%d\n",
 											state);*/
 							err = 1;
 							state = INITIAL;

+ 2 - 2
test/misc/code/bit_scan_test.c

@@ -1,7 +1,7 @@
 /*
  * test bit_scan operations from bit_scan.h
  *  (both for correctness  and speed)
- * 
+ *
  * Copyright (C) 2007 iptelorg GmbH
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -16,7 +16,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
-/* 
+/*
  * Example gcc command line:
  *  gcc -O9 -Wall -DCC_GCC_LIKE_ASM  -D__CPU_x86 bit_scan_test.c ../bit_scan.c
  *      -o bit_scan_test

+ 3 - 3
test/misc/code/dns_query.c

@@ -5,7 +5,7 @@
  * Compile with:
  *  gcc -o dns_query2 dns_query.c ../resolve.o ../dprint.o ../mem/ *.o -lresolv
  *  (and first compile Kamailio with qm_malloc)
- * 
+ *
  *
  * Copyright (C) 2001-2003 FhG Fokus
  *
@@ -21,8 +21,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 /*

+ 6 - 6
test/misc/code/endian_test.c

@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2008 iptelorg GmbH
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -18,7 +18,7 @@
  *  compile/run with:
  *  gcc  -Wall endian_test.c ../endianness.c  -o endian_test; ./endian_test
  */
-/* 
+/*
  * History:
  * --------
  *  2008-06-13  created by andrei
@@ -33,7 +33,7 @@
  *           BYTE_ORDER == LITTLE_ENDIAN | BIG_ENDIAN
  * solaris: _LITTLE_ENDIAN | _BIG_ENDIAN
  *
- * Note: BIG_ENDIAN, LITTLE_ENDIAN, _BIG_ENDIAN, _LITTLE_ENDIAN cannot be 
+ * Note: BIG_ENDIAN, LITTLE_ENDIAN, _BIG_ENDIAN, _LITTLE_ENDIAN cannot be
  *       used always,  some OSes define both of them for BYTE_ORDER use
  *       (e.g. linux defines both BIG_ENDIAN & LITTLE_ENDIAN, bsds define
  *          _BIG_ENDIAN, _LITTLE_ENDIAN, BIG_ENDIAN, LITTLE_ENDIAN)
@@ -43,14 +43,14 @@
 
 #include <stdio.h>
 #include "../endianness.h"
-/* 
+/*
  * Tested:
  * linux:   y
  * freebsd: y
  * openbsd:
  * netbsd:
  * solaris: y
- * darwin: 
+ * darwin:
  * cygwin:
  *
  * Header files:
@@ -72,7 +72,7 @@
  *           BYTE_ORDER == LITTLE_ENDIAN | BIG_ENDIAN
  * solaris: _LITTLE_ENDIAN | _BIG_ENDIAN
  *
- * Note: BIG_ENDIAN, LITTLE_ENDIAN, _BIG_ENDIAN, _LITTLE_ENDIAN cannot be 
+ * Note: BIG_ENDIAN, LITTLE_ENDIAN, _BIG_ENDIAN, _LITTLE_ENDIAN cannot be
  *       used always,  some OSes define both of them for BYTE_ORDER use
  *       (e.g. linux defines both BIG_ENDIAN & LITTLE_ENDIAN, bsds define
  *          _BIG_ENDIAN, _LITTLE_ENDIAN, BIG_ENDIAN, LITTLE_ENDIAN)

+ 2 - 2
test/misc/code/gethostbyaddr.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 2 - 2
test/misc/code/gethostbyname.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 6 - 6
test/misc/code/ifls.c

@@ -15,8 +15,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 /*
@@ -102,14 +102,14 @@ int ls_ifflags(char *name, int family, int options)
 	memset(&ifr, 0, sizeof(ifr)); /* init to 0 (check if filled)*/
 	s = socket(family, SOCK_DGRAM, 0);
 	strncpy(ifr.ifr_name, name, IFNAMSIZ);
-#if 0	
+#if 0
 	if (ioctl(s, SIOCGIFADDR, &ifr)==-1){
 		if(errno==EBADF) return 0; /* invalid descriptor => no address*/
-		fprintf(stderr, "ls_if: ioctl for %s failed: %s\n", name, 
+		fprintf(stderr, "ls_if: ioctl for %s failed: %s\n", name,
 					strerror(errno));
 		goto error;
 	};
-	
+
 	printf("%s:\n", ifr.ifr_name);
 	printf("        dbg: family=%d", ifr.ifr_addr.sa_family);
 #ifdef __FreeBSD__
@@ -121,7 +121,7 @@ int ls_ifflags(char *name, int family, int options)
 		printf("ls_if: OS BUG: SIOCGIFADDR doesn't work!\n");
 		goto error;
 	}
-	
+
 	printf("        ");
 	print_sockaddr(&ifr.ifr_addr);
 

+ 3 - 3
test/misc/code/lock_test.c

@@ -1,13 +1,13 @@
 /*
- * 
+ *
  *  simple locking test program
  *  (no paralles stuff)
- * 
+ *
  *  Compile with: gcc -D__CPU_i386 -O3 on x86 machines and
  *                gcc -mips2 -O2 -D__CPU_mips2  on mips machines.
  *  -- andrei
  *
- *  
+ *
  */
 
 #include <stdio.h>

+ 2 - 2
test/misc/code/locking/locking_test.c

@@ -20,8 +20,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 2 - 2
test/misc/code/mips_lock.c

@@ -2,12 +2,12 @@
  *
  *  simple locking test program
  *  (no paralles stuff)
- * 
+ *
  *  Compile with: gcc -D__CPU_i386 -O3 on x86 machines and
  *                gcc -mips2 -O2 -D__CPU_mips  on mips machines.
  *  -- andrei
  *
- *  
+ *
  */
 
 #include <stdio.h>

+ 7 - 7
test/misc/code/profile.h

@@ -21,27 +21,27 @@
  *
  * cycles_t get_cpu_cycles() - returns the current cpu cycles counter
  *
- * void     get_cpu_cycles_uint(unsigned* u1, unsigned* u2) 
- *                            - sets u1 and u2 to the least significant, 
+ * void     get_cpu_cycles_uint(unsigned* u1, unsigned* u2)
+ *                            - sets u1 and u2 to the least significant,
  *                              respective most significant 32 bit word of
  *                              the cpu cycles counter
  * struct profile_data;            - holds all the profile results
  *                               (last call cycles, max cycles, total cycles,
- *                                no. of profile_start calls, no. of 
+ *                                no. of profile_start calls, no. of
  *                                profile_end calls, name use in profile_init)
  * void     profile_init(pd, name) - initialize a profile structure
  * void     profile_start(pd)      - starts profiling (call before calling
  *                               the target function)
  * void     profile_end(pd)        - stops profiling (call after the target
  *                               function returns)
- * 
+ *
  */
 /*
  * Config defines:   CC_GCC_LIKE_ASM  - the compiler support gcc style
  *                     inline asm,
  *                  __CPU_x86, __CPU_x86_64, __CPU_sparc64
  */
-/* 
+/*
  * History:
  * --------
  *  2007-06-23  created by andrei
@@ -58,8 +58,8 @@
  *            (unsigned long long for now)
  *
  * cycles_t get_cpu_cycles() - returns the current cpu cycles counter
- * void     get_cpu_cycles_uint(unsigned* u1, unsigned* u2) 
- *                            - sets u1 and u2 to the least significant, 
+ * void     get_cpu_cycles_uint(unsigned* u1, unsigned* u2)
+ *                            - sets u1 and u2 to the least significant,
  *                              respective most significant 32 bit word of
  *                              the cpu cycles counter
  */

+ 2 - 2
test/misc/code/re_test.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 /*

+ 2 - 2
test/misc/code/resolver_test.c

@@ -14,8 +14,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 5 - 5
test/misc/code/shoot.c

@@ -29,7 +29,7 @@ regex_t *regexp;
 
 #define RESIZE 1024
 
-/* take either a dot.decimal string of ip address or a 
+/* take either a dot.decimal string of ip address or a
 domain name and returns a NETWORK ordered long int containing
 the address. i chose to internally represent the address as long for speedier
 comparisons.
@@ -93,7 +93,7 @@ long getaddress(char *host)
 /*
 shoot:
 takes:
-	1. the text message of buff to 
+	1. the text message of buff to
 	2. the address (network ordered byte order)
 	3. and port (not network byte ordered).
 
@@ -186,7 +186,7 @@ void shoot(char *buff, long address, int lport, int rport)
 		FD_SET(ssock, &fd);
 
 		/* TO-DO: there does appear to be a problem with this select returning a zero
-		even when there is data pending in the recv queue. 
+		even when there is data pending in the recv queue.
 		please help, someone! */
 
 		ret = select(6, &fd, NULL, NULL, &tv);
@@ -291,7 +291,7 @@ int main(int argc, char *argv[])
 
 	shoot(buff, address, lport, rport);
 
-	/* visual studio closes the debug console as soon as the 
+	/* visual studio closes the debug console as soon as the
 	program terminates. this is to hold the window from collapsing
 	Uncomment it if needed.
 	getchar();*/
@@ -304,7 +304,7 @@ int main(int argc, char *argv[])
 /*
 shoot will exercise the all types of sip servers.
 it is not to be used to measure round-trips and general connectivity.
-use ping for that. 
+use ping for that.
 written by farhan on 10th august, 2000.
 
 TO-DO:

+ 5 - 5
test/misc/code/shoot2.c

@@ -34,7 +34,7 @@ regex_t *regexp;
 #define VIA_BEGIN_STR "Via: SIP/2.0/UDP "
 #define VIA_BEGIN_STR_LEN 17
 
-/* take either a dot.decimal string of ip address or a 
+/* take either a dot.decimal string of ip address or a
 domain name and returns a NETWORK ordered long int containing
 the address. i chose to internally represent the address as long for speedier
 comparisons.
@@ -140,7 +140,7 @@ add_via(char *mes)
 /*
 shoot:
 takes:
-	1. the text message of buff to 
+	1. the text message of buff to
 	2. the address (network ordered byte order)
 	3. and port (not network byte ordered).
 
@@ -235,7 +235,7 @@ void shoot(char *buff, long address, int lport, int rport)
 		FD_SET(ssock, &fd);
 
 		/* TO-DO: there does appear to be a problem with this select returning a zero
-		even when there is data pending in the recv queue. 
+		even when there is data pending in the recv queue.
 		please help, someone! */
 
 		ret = select(6, &fd, NULL, NULL, &tv);
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
 
 	shoot(buff, address, lport, rport);
 
-	/* visual studio closes the debug console as soon as the 
+	/* visual studio closes the debug console as soon as the
 	program terminates. this is to hold the window from collapsing
 	Uncomment it if needed.
 	getchar();*/
@@ -391,7 +391,7 @@ int main(int argc, char *argv[])
 /*
 shoot will exercise the all types of sip servers.
 it is not to be used to measure round-trips and general connectivity.
-use ping for that. 
+use ping for that.
 written by farhan on 10th august, 2000.
 
 TO-DO:

+ 2 - 2
test/misc/code/sock_conn.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 2 - 2
test/misc/code/sock_disc.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 3 - 3
test/misc/code/test.c

@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2001-2003 FhG Fokus
  *
  * This file is part of Kamailio, a free SIP server.
@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 4 - 4
test/misc/code/udp.c

@@ -27,8 +27,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
@@ -127,7 +127,7 @@ void shoot()
 #endif
 
 
-	/* destination socket init here because it could be changed in a 
+	/* destination socket init here because it could be changed in a
 	   case of a redirect */
 	addr.sin_addr.s_addr = inet_addr("192.168.99.100");
 	addr.sin_port = htons((short)888);
@@ -152,7 +152,7 @@ void shoot()
 	}
 	printf("BSD compat: %d\n", bsd_compat);
 
-	/* here we go for the number of nretries which heavily depends on the 
+	/* here we go for the number of nretries which heavily depends on the
 	   mode */
 	for(i = 0; i <= nretries; i++) {
 		/* lets fire the request to the server and store when we did */

+ 2 - 2
test/misc/code/udp_flood_disc.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 3 - 3
test/misc/code/udp_test_proxy.c

@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2001-2003 FhG Fokus
  *
  * This file is part of Kamailio, a free SIP server.
@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 5 - 5
test/misc/code/via_parse.c

@@ -15,8 +15,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
@@ -24,7 +24,7 @@
 /* parsing:           compact form:
  */
 
-/* 
+/*
  * still TODO/test:
  *  - parse next via
  *  - return a list of header structs
@@ -118,9 +118,9 @@ enum
 #define LOG(lev, fmt, args...) fprintf(stderr, fmt, ##args)
 
 
-/* entry state must be F_PARAM, or saved_state=F_PARAM and 
+/* entry state must be F_PARAM, or saved_state=F_PARAM and
  * state=F_{LF,CR,CRLF}!
- * output state = L_PARAM or F_PARAM or END_OF_HEADER 
+ * output state = L_PARAM or F_PARAM or END_OF_HEADER
  * (and saved_state= last state); everything else => error */
 __inline char *parse_via_param(char *p, int *pstate, int *psaved_state)
 {