tizen 2.3.1 release
[framework/uifw/embryo.git] / src / bin / embryo_cc_sc6.c
index 2fe23d9..3525d27 100644 (file)
@@ -134,7 +134,7 @@ align32(long *v)
 static char        *
 skipwhitespace(char *str)
 {
-   while (isspace(*str))
+   while (sc_isspace(*str))
       str++;
    return str;
 }
@@ -156,7 +156,7 @@ static void
 write_encoded(FILE * fbin, ucell * c, int num)
 {
    assert(sizeof(cell) <= 4);  /* code must be adjusted for larger cells */
-   assert(!!fbin);
+   assert(fbin != NULL);
    while (num-- > 0)
      {
        if (sc_compress)
@@ -272,7 +272,7 @@ do_dump(FILE * fbin, char *params, cell opcode __UNUSED__)
        if (fbin)
           write_encoded(fbin, &p, 1);
        num++;
-       while (isspace(*params))
+       while (sc_isspace(*params))
           params++;
      }                         /* while */
    return num * sizeof(cell);
@@ -286,7 +286,7 @@ do_call(FILE * fbin, char *params, cell opcode)
    symbol             *sym;
    ucell               p;
 
-   for (i = 0; !isspace(*params); i++, params++)
+   for (i = 0; !sc_isspace(*params); i++, params++)
      {
        assert(*params != '\0');
        assert(i < sNAMEMAX);
@@ -298,7 +298,7 @@ do_call(FILE * fbin, char *params, cell opcode)
     * already have been set (in order for static globals to be found).
     */
    sym = findglb(name);
-   assert(!!sym);
+   assert(sym != NULL);
    assert(sym->ident == iFUNCTN || sym->ident == iREFFUNC);
    assert(sym->vclass == sGLOBAL);
 
@@ -322,7 +322,7 @@ do_jump(FILE * fbin, char *params, cell opcode)
 
    if (fbin)
      {
-       assert(!!lbltab);
+       assert(lbltab != NULL);
        p = lbltab[i];
        write_encoded(fbin, (ucell *) & opcode, 1);
        write_encoded(fbin, &p, 1);
@@ -339,10 +339,10 @@ do_file(FILE * fbin, char *params, cell opcode)
    p = hex2long(params, &params);
 
    /* remove leading and trailing white space from the filename */
-   while (isspace(*params))
+   while (sc_isspace(*params))
       params++;
    len = strlen(params);
-   while (len > 0 && isspace(params[len - 1]))
+   while (len > 0 && sc_isspace(params[len - 1]))
       len--;
    params[len++] = '\0';       /* zero-terminate */
    while (len % sizeof(cell) != 0)
@@ -368,7 +368,7 @@ do_symbol(FILE * fbin, char *params, cell opcode)
    int                 len;
    unsigned char       mclass, type;
 
-   for (endptr = params; !isspace(*endptr) && endptr != '\0'; endptr++)
+   for (endptr = params; !sc_isspace(*endptr) && endptr != '\0'; endptr++)
       /* nothing */ ;
    assert(*endptr == ' ');
 
@@ -414,7 +414,7 @@ do_switch(FILE * fbin, char *params, cell opcode)
 
    if (fbin)
      {
-       assert(!!lbltab);
+       assert(lbltab != NULL);
        p = lbltab[i];
        write_encoded(fbin, (ucell *) & opcode, 1);
        write_encoded(fbin, &p, 1);
@@ -438,7 +438,7 @@ do_case(FILE * fbin, char *params, cell opcode __UNUSED__)
 
    if (fbin)
      {
-       assert(!!lbltab);
+       assert(lbltab != NULL);
        p = lbltab[i];
        write_encoded(fbin, &v, 1);
        write_encoded(fbin, &p, 1);
@@ -625,7 +625,7 @@ findopcode(char *instr, int maxlen)
    while (low < high)
      {
        mid = (low + high) / 2;
-       assert(!!opcodelist[mid].name);
+       assert(opcodelist[mid].name != NULL);
        cmp = strcasecmp(str, opcodelist[mid].name);
        if (cmp > 0)
           low = mid + 1;
@@ -662,12 +662,12 @@ assemble(FILE * fout, FILE * fin)
 
 #if !defined NDEBUG
    /* verify that the opcode list is sorted (skip entry 1; it is reserved
-    * for a non-existant opcode)
+    * for a non-existent opcode)
     */
-   assert(!!opcodelist[1].name);
-   for (i = 2; i < (sizeof opcodelist / sizeof opcodelist[0]); i++)
+   assert(opcodelist[1].name != NULL);
+   for (i = 2; i < (int)(sizeof(opcodelist) / sizeof(opcodelist[0])); i++)
      {
-       assert(!!opcodelist[i].name);
+       assert(opcodelist[i].name != NULL);
        assert(strcasecmp(opcodelist[i].name, opcodelist[i - 1].name) > 0);
      }                         /* for */
 #endif
@@ -867,7 +867,7 @@ assemble(FILE * fout, FILE * fin)
             char                alias[sNAMEMAX + 1];
 
             sym = nativelist[i];
-            assert(!!sym);
+            assert(sym != NULL);
             if (!lookup_alias(alias, sym->name))
               {
                  assert(strlen(sym->name) <= sNAMEMAX);
@@ -1003,7 +1003,7 @@ assemble(FILE * fout, FILE * fin)
                  /* get to the end of the instruction (make use of the '\n' that fgets()
                   * added at the end of the line; this way we will *always* drop on a
                   * whitespace character) */
-                 for (params = instr; *params != '\0' && !isspace(*params);
+                 for (params = instr; *params != '\0' && !sc_isspace(*params);
                       params++)
                     /* nothing */ ;
                  assert(params > instr);
@@ -1039,12 +1039,12 @@ assemble(FILE * fout, FILE * fin)
             /* get to the end of the instruction (make use of the '\n' that fgets()
              * added at the end of the line; this way we will *always* drop on a
              * whitespace character) */
-            for (params = instr; *params != '\0' && !isspace(*params);
+            for (params = instr; *params != '\0' && !sc_isspace(*params);
                  params++)
                /* nothing */ ;
             assert(params > instr);
             i = findopcode(instr, (int)(params - instr));
-            assert(!!opcodelist[i].name);
+            assert(opcodelist[i].name != NULL);
             if (opcodelist[i].segment == pass)
                opcodelist[i].func(fout, skipwhitespace(params),
                                   opcodelist[i].opcode);