Skip to content

Commit

Permalink
test/misc/code: removed trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 13, 2023
1 parent 67f2098 commit b0948b5
Show file tree
Hide file tree
Showing 24 changed files with 82 additions and 82 deletions.
6 changes: 3 additions & 3 deletions test/misc/code/atomic_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
*
* simple atomic ops testing program
* (no parallel 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>
Expand Down
12 changes: 6 additions & 6 deletions test/misc/code/atomic_test2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions test/misc/code/auto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/bit_scan_test.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/misc/code/dns_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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
*/
/*
Expand Down
12 changes: 6 additions & 6 deletions test/misc/code/endian_test.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2008 iptelorg GmbH
*
* Permission to use, copy, modify, and distribute this software for any
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -43,14 +43,14 @@

#include <stdio.h>
#include "../endianness.h"
/*
/*
* Tested:
* linux: y
* freebsd: y
* openbsd:
* netbsd:
* solaris: y
* darwin:
* darwin:
* cygwin:
*
* Header files:
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/gethostbyaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/gethostbyname.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
12 changes: 6 additions & 6 deletions test/misc/code/ifls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
/*
Expand Down Expand Up @@ -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__
Expand All @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions test/misc/code/lock_test.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/locking/locking_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/mips_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
14 changes: 7 additions & 7 deletions test/misc/code/profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/re_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
/*
Expand Down
4 changes: 2 additions & 2 deletions test/misc/code/resolver_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
10 changes: 5 additions & 5 deletions test/misc/code/shoot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();*/
Expand All @@ -304,7 +304,7 @@ int main(int argc, char *argv[])
/*
shoot will exercise all the 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:
Expand Down

0 comments on commit b0948b5

Please sign in to comment.