<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -48,17 +48,14 @@ void (*send_error)(const char*);
 
 char to_ascii(char bits, unsigned char value)
 {
-	if (5 == bits)
-	{
+	if (5 == bits) {
 		/* the BCD encoding is the subset of ASCII beginning at
 		 * character 48 ('0'), ending at character 63; see
 		 *	http://www.cyberd.co.uk/support/technotes/isocards.htm
 		 *	http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
 		 */
 		return '0' + value;
-	}
-	else if (7 == bits)
-	{
+	} else if (7 == bits) {
 		/* the ALPHA encoding is the subset of ASCII beginning at
 		 * character 32 (' '), ending at character 95; see
 		 *	http://www.cyberd.co.uk/support/technotes/isocards.htm
@@ -96,36 +93,29 @@ int bc_decode_format(char* bits, char** result, unsigned char format_bits)
 	*result = malloc( ((bits_len - start_idx) / format_bits) + 1 );
 
 	result_idx = 0;
-	for (i = start_idx; (i + format_bits) &lt;= bits_len; i += format_bits)
-	{
+	for (i = start_idx; (i + format_bits) &lt;= bits_len; i += format_bits) {
 		current_value = 0;
 		parity = 1;
 
-		for (j = 0; j &lt; (format_bits - 1); j++)
-		{
-			if ('1' == bits[i + j])
-			{
+		for (j = 0; j &lt; (format_bits - 1); j++) {
+			if ('1' == bits[i + j]) {
 				/* push a 1 onto the front of our accumulator */
 				current_value |= (1 &lt;&lt; j);
 
 				parity ^= 1; /* flip parity bit */
-			}
-			/* assimilating a 0 is a no-op */
-			else if ('0' != bits[i + j])
-			{
+			} else if ('0' != bits[i + j]) {
 				retval = BCERR_INVALID_INPUT;
 				break;
 			}
+			/* assimilating a 0 is a no-op */
 		}
 
 		/* since C doesn't have multi-level breaks */
-		if (0 != retval)
-		{
+		if (0 != retval) {
 			break;
 		}
 
-		if (&quot;01&quot;[parity] != bits[i + j])
-		{
+		if (&quot;01&quot;[parity] != bits[i + j]) {
 			retval = BCERR_PARITY_MISMATCH;
 			break;
 		}
@@ -133,8 +123,7 @@ int bc_decode_format(char* bits, char** result, unsigned char format_bits)
 		(*result)[result_idx] = to_ascii(format_bits, current_value);
 		result_idx++;
 
-		if ('?' == (*result)[result_idx - 1])
-		{
+		if ('?' == (*result)[result_idx - 1]) {
 			/* found end sentinel; we're done */
 			break;
 		}
@@ -666,8 +655,7 @@ int bc_combine(struct bc_input* forward, struct bc_input* backward,
 
 const char* bc_strerror(int err)
 {
-	switch (err)
-	{
+	switch (err) {
 	case 0:					return &quot;Success&quot;;
 	case BCERR_INVALID_INPUT:		return &quot;Invalid input&quot;;
 	case BCERR_PARITY_MISMATCH:		return &quot;Parity mismatch&quot;;</diff>
      <filename>bitconvert.c</filename>
    </modified>
    <modified>
      <diff>@@ -28,15 +28,13 @@ char* get_track(FILE* input, char* bits, int bits_len)
 {
 	int bits_end;
 
-	if (NULL == fgets(bits, bits_len, input))
-	{
+	if (NULL == fgets(bits, bits_len, input)) {
 		return NULL;
 	}
 	bits_end = strlen(bits);
 
 	/* strip trailing newline */
-	if ('\n' == bits[bits_end - 1])
-	{
+	if ('\n' == bits[bits_end - 1]) {
 		bits[bits_end - 1] = '\0';
 	}
 
@@ -65,21 +63,26 @@ int main(void)
 	input = stdin;
 	bc_init(print_error);
 
-	while (1)
-	{
-		if (NULL == get_track(input, ft1, sizeof(ft1)))
+	while (1) {
+		if (NULL == get_track(input, ft1, sizeof(ft1))) {
 			break;
-		if (NULL == get_track(input, ft2, sizeof(ft2)))
+		}
+		if (NULL == get_track(input, ft2, sizeof(ft2))) {
 			break;
-		if (NULL == get_track(input, ft3, sizeof(ft3)))
+		}
+		if (NULL == get_track(input, ft3, sizeof(ft3))) {
 			break;
+		}
 
-		if (NULL == get_track(input, bt1, sizeof(bt1)))
+		if (NULL == get_track(input, bt1, sizeof(bt1))) {
 			break;
-		if (NULL == get_track(input, bt2, sizeof(bt2)))
+		}
+		if (NULL == get_track(input, bt2, sizeof(bt2))) {
 			break;
-		if (NULL == get_track(input, bt3, sizeof(bt3)))
+		}
+		if (NULL == get_track(input, bt3, sizeof(bt3))) {
 			break;
+		}
 
 		forward.t1 = ft1;
 		forward.t2 = ft2;</diff>
      <filename>combine.c</filename>
    </modified>
    <modified>
      <diff>@@ -28,15 +28,13 @@ char* get_track(FILE* input, char* bits, int bits_len)
 {
 	int bits_end;
 
-	if (NULL == fgets(bits, bits_len, input))
-	{
+	if (NULL == fgets(bits, bits_len, input)) {
 		return NULL;
 	}
 	bits_end = strlen(bits);
 
 	/* strip trailing newline */
-	if ('\n' == bits[bits_end - 1])
-	{
+	if ('\n' == bits[bits_end - 1]) {
 		bits[bits_end - 1] = '\0';
 	}
 
@@ -74,14 +72,16 @@ int main(void)
 	input = stdin;
 	bc_init(print_error);
 
-	while (1)
-	{
-		if (NULL == get_track(input, t1, sizeof(t1)))
+	while (1) {
+		if (NULL == get_track(input, t1, sizeof(t1))) {
 			break;
-		if (NULL == get_track(input, t2, sizeof(t2)))
+		}
+		if (NULL == get_track(input, t2, sizeof(t2))) {
 			break;
-		if (NULL == get_track(input, t3, sizeof(t3)))
+		}
+		if (NULL == get_track(input, t3, sizeof(t3))) {
 			break;
+		}
 
 		in.t1 = t1;
 		in.t2 = t2;
@@ -111,13 +111,13 @@ int main(void)
 				encoding_to_str(result.t3_encoding), result.t3);
 		}
 
-		if (0 != rv)
+		if (0 != rv) {
 			/* if there was an error, bc_find_fields isn't useful */
 			continue;
+		}
 
 		rv = bc_find_fields(&amp;result);
-		if (0 != rv)
-		{
+		if (0 != rv) {
 			printf(&quot;Error %d (%s); no fields found for this card\n&quot;,
 				rv, bc_strerror(rv));
 			continue;
@@ -125,8 +125,7 @@ int main(void)
 
 		printf(&quot;\n=== Fields ===\n&quot;);
 		printf(&quot;Card name: %s\n&quot;, result.name);
-		for (i = 0; result.field_names[i] != NULL; i++)
-		{
+		for (i = 0; result.field_names[i] != NULL; i++) {
 			/* NOTE: you should verify that the BC_TRACK_* constants
 			 * in the version of libbitconvert that you are using
 			 * map cleanly onto integers if you wish to print the</diff>
      <filename>driver.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f2079628c92ca0018f4640a1be842cb195e3006a</id>
    </parent>
  </parents>
  <author>
    <name>Denver Gingerich</name>
    <email>denver@ossguy.com</email>
  </author>
  <url>http://github.com/ossguy/libbitconvert/commit/82fbd62156ac5afdb700109e1609098d935b690f</url>
  <id>82fbd62156ac5afdb700109e1609098d935b690f</id>
  <committed-date>2009-03-02T15:41:34-08:00</committed-date>
  <authored-date>2009-03-02T15:41:34-08:00</authored-date>
  <message>update code to use consistent bracing conventions

This is purely a coding style update.  Most of it is moving braces to be
consistent with the other code.  Some braces were also added for
clarity.</message>
  <tree>42cec881bb3438f832069022c925bc6f9d9fa75b</tree>
  <committer>
    <name>Denver Gingerich</name>
    <email>denver@ossguy.com</email>
  </committer>
</commit>
