Deleted Added
full compact
snprintf.c (102644) snprintf.c (120945)
1/*
1/*
2 * Copyright (c) 1995-2002 Kungliga Tekniska H�gskolan
2 * Copyright (c) 1995-2003 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#ifdef HAVE_CONFIG_H
35#include <config.h>
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#ifdef HAVE_CONFIG_H
35#include <config.h>
36RCSID("$Id: snprintf.c,v 1.34 2002/04/18 08:50:57 joda Exp $");
36RCSID("$Id: snprintf.c,v 1.35 2003/03/26 10:05:48 joda Exp $");
37#endif
38#include <stdio.h>
39#include <stdarg.h>
40#include <stdlib.h>
41#include <string.h>
42#include <ctype.h>
43#include <roken.h>
44

--- 288 unchanged lines hidden (view full) ---

333 else if(c == '+')
334 flags |= plus_flag;
335 else if(c == ' ')
336 flags |= space_flag;
337 else if(c == '#')
338 flags |= alternate_flag;
339 else if(c == '0')
340 flags |= zero_flag;
37#endif
38#include <stdio.h>
39#include <stdarg.h>
40#include <stdlib.h>
41#include <string.h>
42#include <ctype.h>
43#include <roken.h>
44

--- 288 unchanged lines hidden (view full) ---

333 else if(c == '+')
334 flags |= plus_flag;
335 else if(c == ' ')
336 flags |= space_flag;
337 else if(c == '#')
338 flags |= alternate_flag;
339 else if(c == '0')
340 flags |= zero_flag;
341 else if(c == '\'')
342 ; /* just ignore */
341 else
342 break;
343 }
344
345 if((flags & space_flag) && (flags & plus_flag))
346 flags ^= space_flag;
347
348 if((flags & minus_flag) && (flags & zero_flag))

--- 305 unchanged lines hidden ---
343 else
344 break;
345 }
346
347 if((flags & space_flag) && (flags & plus_flag))
348 flags ^= space_flag;
349
350 if((flags & minus_flag) && (flags & zero_flag))

--- 305 unchanged lines hidden ---