[Nagiosplug-checkins] CVS: nagiosplug/plugins snprintf.c,1.1.1.1,1.2

Karl DeBisschop kdebisschop at users.sourceforge.net
Tue Oct 15 21:53:10 CEST 2002


Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory usw-pr-cvs1:/tmp/cvs-serv29727/plugins

Modified Files:
	snprintf.c 
Log Message:
newer snprintf from samba.org

Index: snprintf.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/snprintf.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** snprintf.c	28 Feb 2002 06:42:59 -0000	1.1.1.1
--- snprintf.c	16 Oct 2002 04:52:02 -0000	1.2
***************
*** 1,377 ****
  /*
!  * Copyright (c) 1983, 1995, 1996 Eric P. Allman
!  * Copyright (c) 1988, 1993
!  *	The Regents of the University of California.  All rights reserved.
!  *
!  * Redistribution and use in source and binary forms, with or without
!  * modification, are permitted provided that the following conditions
!  * are met:
!  * 1. Redistributions of source code must retain the above copyright
!  *    notice, this list of conditions and the following disclaimer.
[...1328 lines suppressed...]
! 	printf ("%d tests failed out of %d.\n", fail, num);
! 
! 	printf("seeing how many digits we support\n");
! 	{
! 		double v0 = 0.12345678901234567890123456789012345678901;
! 		for (x=0; x<100; x++) {
! 			double p = pow(10, x); 
! 			double r = v0*p;
! 			snprintf(buf1, sizeof(buf1), "%1.1f", r);
! 			sprintf(buf2,                "%1.1f", r);
! 			if (strcmp(buf1, buf2)) {
! 				printf("we seem to support %d digits\n", x-1);
! 				break;
! 			}
! 		}
! 	}
! 
! 	return 0;
! }
! #endif /* SNPRINTF_TEST */





More information about the Commits mailing list