summaryrefslogtreecommitdiff
path: root/apps/interpreters/bas/global.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-01 18:06:28 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-01 18:06:28 -0600
commitea4aa854075d0622d4ffba54ed432da8b7346921 (patch)
tree4b5b4203e3520712450fd412125367f4c3141dfd /apps/interpreters/bas/global.c
parent9694c7f17c7d741c997e2641a4a52d0bb83a02d0 (diff)
downloadnuttx-ea4aa854075d0622d4ffba54ed432da8b7346921.tar.gz
nuttx-ea4aa854075d0622d4ffba54ed432da8b7346921.tar.bz2
nuttx-ea4aa854075d0622d4ffba54ed432da8b7346921.zip
A few baby steps toward getting closer to the coding standard
Diffstat (limited to 'apps/interpreters/bas/global.c')
-rw-r--r--apps/interpreters/bas/global.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/interpreters/bas/global.c b/apps/interpreters/bas/global.c
index 0b78f999b..ef8cc0c64 100644
--- a/apps/interpreters/bas/global.c
+++ b/apps/interpreters/bas/global.c
@@ -100,7 +100,7 @@ static struct Value *bin(struct Value *v, unsigned long int value, long int digi
{
char buf[sizeof(long int)*8+1];
char *s;
-
+
Value_new_STRING(v);
s=buf+sizeof(buf);
*--s='\0';
@@ -133,7 +133,7 @@ static struct Value *find(struct Value *v, struct String *pattern, long int occu
struct dirent *ent;
int currentdir;
int found=0;
-
+
Value_new_STRING(v);
String_new(&dirname);
String_new(&basename);
@@ -418,7 +418,7 @@ static struct Value *fn_cvi(struct Value *v, struct Auto *stack) /*{{{*/
struct String *s=stringValue(stack,0);
long int n=(s->length && s->character[s->length-1]<0) ? -1 : 0;
int i;
-
+
for (i=s->length-1; i>=0; --i) n=(n<<8)|(s->character[i]&0xff);
return Value_new_INTEGER(v,n);
}
@@ -508,7 +508,7 @@ static struct Value *fn_edit(struct Value *v, struct Auto *stack) /*{{{*/
if ((code&16) && ((*rd==' ') || (*rd=='\t')))
{
*wr++=' ';
- while (rd<end && (*rd==' ' || *rd=='\t')) ++rd;
+ while (rd<end && (*rd==' ' || *rd=='\t')) ++rd;
continue;
}
@@ -1377,7 +1377,7 @@ static struct Value *fn_timer(struct Value *v, struct Auto *stack) /*{{{*/
static struct Value *fn_tl(struct Value *v, struct Auto *stack) /*{{{*/
{
struct String *s=stringValue(stack,0);
-
+
Value_new_STRING(v);
if (s->length)
{
@@ -1408,7 +1408,7 @@ static struct Value *fn_val(struct Value *v, struct Auto *stack) /*{{{*/
char *end;
long int i;
int overflow;
-
+
if (s->character==(char*)0) return Value_new_REAL(v,0.0);
i=Value_vali(s->character,&end,&overflow);
if (*end=='\0') return Value_new_INTEGER(v,i);