Bug 1392057 - Follow-up (take 2): Fix whitespace issues in nsVCard.cpp. rs=whitespace-only DONTBUILD
authorJorg K <jorgk@jorgk.com>
Mon, 21 Aug 2017 10:05:58 +0200
changeset 29589 19bea9a55bfbafa2ef03d5052927631150eebf76
parent 29588 fdd630e5671ed0d0ab407c3c989b1a03864dab61
child 29590 81273b0a4b6150577545276d8e831d027c5c25ab
push id378
push userclokep@gmail.com
push dateMon, 13 Nov 2017 18:45:35 +0000
reviewerswhitespace-only
bugs1392057
Bug 1392057 - Follow-up (take 2): Fix whitespace issues in nsVCard.cpp. rs=whitespace-only DONTBUILD
mailnews/addrbook/src/nsVCard.cpp
--- a/mailnews/addrbook/src/nsVCard.cpp
+++ b/mailnews/addrbook/src/nsVCard.cpp
@@ -337,63 +337,63 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"EQ","COLON","DOT","SEMICOLON",
 "SPACE","HTAB","LINESEP","NEWLINE","BEGIN_VCARD","END_VCARD","BEGIN_VCAL",
 "END_VCAL","BEGIN_VEVENT","END_VEVENT","BEGIN_VTODO","END_VTODO","ID","STRING",
 };
 char *yyrule[] = {
-"$accept : mime",
-"mime : vobjects",
-"$$1 :",
-"vobjects : vobject $$1 vobjects",
-"vobjects : vobject",
-"vobject : vcard",
-"vobject : vcal",
-"$$2 :",
-"vcard : BEGIN_VCARD $$2 items END_VCARD",
-"$$3 :",
-"vcard : BEGIN_VCARD $$3 END_VCARD",
-"items : item items",
-"items : item",
-"$$4 :",
-"item : prop COLON $$4 values LINESEP",
-"item : error",
-"$$5 :",
-"prop : name $$5 attr_params",
-"prop : name",
-"attr_params : attr_param attr_params",
-"attr_params : attr_param",
-"attr_param : SEMICOLON attr",
-"attr : name",
-"attr : name EQ name",
-"name : ID",
-"$$6 :",
-"values : value SEMICOLON $$6 values",
-"values : value",
-"value : STRING",
-"value :",
-"$$7 :",
-"vcal : BEGIN_VCAL $$7 calitems END_VCAL",
-"$$8 :",
-"vcal : BEGIN_VCAL $$8 END_VCAL",
-"calitems : calitem calitems",
-"calitems : calitem",
-"calitem : eventitem",
-"calitem : todoitem",
-"calitem : items",
-"$$9 :",
-"eventitem : BEGIN_VEVENT $$9 items END_VEVENT",
-"$$10 :",
-"eventitem : BEGIN_VEVENT $$10 END_VEVENT",
-"$$11 :",
-"todoitem : BEGIN_VTODO $$11 items END_VTODO",
-"$$12 :",
-"todoitem : BEGIN_VTODO $$12 END_VTODO",
+  "$accept : mime",
+  "mime : vobjects",
+  "$$1 :",
+  "vobjects : vobject $$1 vobjects",
+  "vobjects : vobject",
+  "vobject : vcard",
+  "vobject : vcal",
+  "$$2 :",
+  "vcard : BEGIN_VCARD $$2 items END_VCARD",
+  "$$3 :",
+  "vcard : BEGIN_VCARD $$3 END_VCARD",
+  "items : item items",
+  "items : item",
+  "$$4 :",
+  "item : prop COLON $$4 values LINESEP",
+  "item : error",
+  "$$5 :",
+  "prop : name $$5 attr_params",
+  "prop : name",
+  "attr_params : attr_param attr_params",
+  "attr_params : attr_param",
+  "attr_param : SEMICOLON attr",
+  "attr : name",
+  "attr : name EQ name",
+  "name : ID",
+  "$$6 :",
+  "values : value SEMICOLON $$6 values",
+  "values : value",
+  "value : STRING",
+  "value :",
+  "$$7 :",
+  "vcal : BEGIN_VCAL $$7 calitems END_VCAL",
+  "$$8 :",
+  "vcal : BEGIN_VCAL $$8 END_VCAL",
+  "calitems : calitem calitems",
+  "calitems : calitem",
+  "calitem : eventitem",
+  "calitem : todoitem",
+  "calitem : items",
+  "$$9 :",
+  "eventitem : BEGIN_VEVENT $$9 items END_VEVENT",
+  "$$10 :",
+  "eventitem : BEGIN_VEVENT $$10 END_VEVENT",
+  "$$11 :",
+  "todoitem : BEGIN_VTODO $$11 items END_VTODO",
+  "$$12 :",
+  "todoitem : BEGIN_VTODO $$12 END_VTODO",
 };
 #endif
 #define yyclearin (yychar=(-1))
 #define yyerrok (yyerrflag=0)
 #ifndef YYSTACKSIZE
 #ifdef YYPR_MAXDEPTH
 #define YYSTACKSIZE YYPR_MAXDEPTH
 #else
@@ -534,17 +534,17 @@ static void lexPopMode(int top)
     lexBuf.lexModeStackTop = 0;
   else
     if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
 }
 
 static int lexWithinMode(enum LexMode mode) {
   unsigned long i;
   for (i=0;i<lexBuf.lexModeStackTop;i++)
-  if (mode == lexBuf.lexModeStack[i]) return 1;
+    if (mode == lexBuf.lexModeStack[i]) return 1;
   return 0;
 }
 
 static int lexGetc_()
 {
   /* get next char from input, no buffering. */
   if (lexBuf.curPos == lexBuf.inputLen)
     return EOF;
@@ -850,17 +850,16 @@ void initLex(const char *inputstring, un
   lexBuf.strs = (char*)PR_CALLOC(PR_MAXTOKEN);
   lexBuf.strsLen = 0;
 }
 
 static void finiLex() {
   PR_FREEIF(lexBuf.strs);
 }
 
-
 /******************************************************************************/
 /* This parses and converts the base64 format for binary encoding into
  * a decoded buffer (allocated with new).  See RFC 1521.
  */
 static char * lexGetDataFromBase64()
 {
   unsigned long bytesLen = 0, bytesMax = 0;
   int quadIx = 0, pad = 0;
@@ -980,81 +979,81 @@ static int match_begin_end_name(int end)
     deleteString(yylval.str);
     DBG_(("db: begin/end %d\n", token));
     return token;
   }
   return 0;
 }
 
 static char* lexGetQuotedPrintable()
-  {
+{
   char cur;
-  /*  unsigned long len = 0; */
+  /* unsigned long len = 0; */
 
   lexClearToken();
   do {
-  cur = lexGetc();
-  switch (cur) {
-  case '=': {
-    int c = 0;
-    int next[2];
-    int tab [1];
-    int i;
-    for (i = 0; i < 2; i++) {
-      next[i] = lexGetc();
-      if (next[i] >= '0' && next[i] <= '9')
-        c = c * 16 + next[i] - '0';
-      else if (next[i] >= 'A' && next[i] <= 'F')
-        c = c * 16 + next[i] - 'A' + 10;
-      else
-        break;
-    }
-    if (i == 0) {
-      /* single '=' follow by LINESEP is continuation sign? */
-      if (next[0] == '\n') {
-        tab[0] = lexGetc();
-        if (tab[0] == '\t')
-          lexSkipWhite();
-        ++mime_lineNum;
+    cur = lexGetc();
+    switch (cur) {
+    case '=': {
+      int c = 0;
+      int next[2];
+      int tab [1];
+      int i;
+      for (i = 0; i < 2; i++) {
+        next[i] = lexGetc();
+        if (next[i] >= '0' && next[i] <= '9')
+          c = c * 16 + next[i] - '0';
+        else if (next[i] >= 'A' && next[i] <= 'F')
+          c = c * 16 + next[i] - 'A' + 10;
+        else
+          break;
       }
-       else {
-        lexAppendc(cur);
-        /* lexPushLookaheadc('=');
-        goto EndString; */
+      if (i == 0) {
+        /* single '=' follow by LINESEP is continuation sign? */
+        if (next[0] == '\n') {
+          tab[0] = lexGetc();
+          if (tab[0] == '\t')
+            lexSkipWhite();
+          ++mime_lineNum;
+        }
+         else {
+          lexAppendc(cur);
+          /* lexPushLookaheadc('=');
+          goto EndString; */
+        }
       }
-    }
-    else if (i == 1) {
-      lexPushLookaheadc(next[1]);
-      lexPushLookaheadc(next[0]);
-      lexAppendc('=');
-    } else {
-      lexAppendc(c);
+      else if (i == 1) {
+        lexPushLookaheadc(next[1]);
+        lexPushLookaheadc(next[0]);
+        lexAppendc('=');
+      } else {
+        lexAppendc(c);
+      }
+      break;
+    } /* '=' */
+    case '\n': {
+      lexPushLookaheadc('\n');
+      goto EndString;
     }
-    break;
-  } /* '=' */
-  case '\n': {
-    lexPushLookaheadc('\n');
-    goto EndString;
-  }
-  case ';': {
-    lexPushLookaheadc(';');
-    goto EndString;
-  }
-  case (char)EOF:
-    break;
-  default:
-    lexAppendc(cur);
-    break;
-  } /* switch */
-} while (cur != (char)EOF);
+    case ';': {
+      lexPushLookaheadc(';');
+      goto EndString;
+    }
+    case (char)EOF:
+      break;
+    default:
+      lexAppendc(cur);
+      break;
+    } /* switch */
+  } while (cur != (char)EOF);
 
 EndString:
   lexAppendc(0);
   return lexStr();
-  } /* LexQuotedPrintable */
+} /* LexQuotedPrintable */
 
 static int yylex() {
   /* int token = 0; */
   int lexmode = LEXMODE();
   if (lexmode == L_VALUES) {
     int c = lexGetc();
     if (c == ';') {
       DBG_(("db: SEMICOLON\n"));