Diff
Not logged in

Differences From Artifact [3294da0883]:

To Artifact [115b80f165]:


1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
20












-
+







/*
 * tclBinary.c --
 *
 *	This file contains the implementation of the "binary" Tcl built-in
 *	command and the Tcl binary data object.
 *
 * Copyright (c) 1997 by Sun Microsystems, Inc.
 * Copyright (c) 1998-1999 by Scriptics Corporation.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclBinary.c,v 1.35.2.2 2007/11/12 19:18:14 dgp Exp $
 * RCS: @(#) $Id: tclBinary.c,v 1.35.2.3 2008/03/26 20:08:56 dgp Exp $
 */

#include "tclInt.h"
#include "tommath.h"

#include <math.h>

782
783
784
785
786
787
788

789


790
791
792
793
794
795
796
782
783
784
785
786
787
788
789

790
791
792
793
794
795
796
797
798







+
-
+
+







	maxPos = cursor;
	while (*format != 0) {
	    flags = 0;
	    if (!GetFormatSpec(&format, &cmd, &count, &flags)) {
		break;
	    }
	    if ((count == 0) && (cmd != '@')) {
		if (cmd != 'x') {
		arg++;
		    arg++;
		}
		continue;
	    }
	    switch (cmd) {
	    case 'a':
	    case 'A': {
		char pad = (char) (cmd == 'a' ? '\0' : ' ');
		unsigned char *bytes;