removed // comments and decls not at start of block

This commit is contained in:
Dennis Heimbigner 2011-04-08 17:47:16 +00:00
parent 132359d2cb
commit 658fea000f
5 changed files with 17 additions and 15 deletions

View File

@ -323,9 +323,10 @@ nc_urlparamfree(NClist* params)
int i,j; int i,j;
if(params == NULL) return; if(params == NULL) return;
for(i=0;i<nclistlength(params);i+=2) { for(i=0;i<nclistlength(params);i+=2) {
NClist* values;
char* s = (char*)nclistget(params,i); char* s = (char*)nclistget(params,i);
if(s != NULL) free((void*)s); if(s != NULL) free((void*)s);
NClist* values = (NClist*)nclistget(params,i+1); values = (NClist*)nclistget(params,i+1);
for(j=0;j<nclistlength(values);j++) { for(j=0;j<nclistlength(values);j++) {
s = (char*)nclistget(values,j); s = (char*)nclistget(values,j);
if(s != NULL) free((void*)s); if(s != NULL) free((void*)s);

View File

@ -43,7 +43,7 @@ selections:
; ;
/* %type NClist<NCprojection*> */ /* %type NClist<NCprojection*> */
projectionlist: //==expr.projection projectionlist: /*==expr.projection*/
projection projection
{$$=projectionlist(parsestate,(Object)null,$1);} {$$=projectionlist(parsestate,(Object)null,$1);}
| projectionlist ',' projection | projectionlist ',' projection
@ -51,7 +51,7 @@ projectionlist: //==expr.projection
; ;
/* %type NCprojection* */ /* %type NCprojection* */
projection: //==expr.proj_clause projection: /*==expr.proj_clause*/
segmentlist segmentlist
{$$=projection(parsestate,$1);} {$$=projection(parsestate,$1);}
| function | function
@ -66,7 +66,7 @@ function:
; ;
/* %type NClist<OCsegment> */ /* %type NClist<OCsegment> */
segmentlist: //==expr.proj_variable segmentlist: /*==expr.proj_variable*/
segment segment
{$$=segmentlist(parsestate,null,$1);} {$$=segmentlist(parsestate,null,$1);}
| segmentlist '.' segment | segmentlist '.' segment
@ -74,7 +74,7 @@ segmentlist: //==expr.proj_variable
; ;
/* %type OCsegment */ /* %type OCsegment */
segment: //==expr.component segment: /*==expr.component*/
word word
{$$=segment(parsestate,$1,null);} {$$=segment(parsestate,$1,null);}
| word rangelist | word rangelist
@ -105,7 +105,7 @@ range1: '[' number ']'
/* %type NClist<NCselection*> */ /* %type NClist<NCselection*> */
clauselist: //==expr.selection clauselist: /*==expr.selection*/
sel_clause sel_clause
{$$=clauselist(parsestate,null,$1);} {$$=clauselist(parsestate,null,$1);}
| clauselist sel_clause | clauselist sel_clause
@ -113,7 +113,7 @@ clauselist: //==expr.selection
; ;
/* %type NCselection* */ /* %type NCselection* */
sel_clause: //==expr.clause sel_clause: /*==expr.clause*/
'&' value rel_op '{' value_list '}' '&' value rel_op '{' value_list '}'
{$$=sel_clause(parsestate,1,$2,$3,$5);} /*1,2 distinguish cases*/ {$$=sel_clause(parsestate,1,$2,$3,$5);} /*1,2 distinguish cases*/
| '&' value rel_op value | '&' value rel_op value
@ -183,7 +183,7 @@ boolfunction:
{$$=function(parsestate,$1,$3);} {$$=function(parsestate,$1,$3);}
; ;
arg_list: //==expr.arg_list arg_list: /*==expr.arg_list*/
value value
{$$=arg_list(parsestate,null,$1);} {$$=arg_list(parsestate,null,$1);}
| value_list ',' value | value_list ',' value

View File

@ -67,7 +67,7 @@ fprintf(stderr," ce.projection: %s\n",
Object Object
segmentlist(CEparsestate* state, Object var0, Object decl) segmentlist(CEparsestate* state, Object var0, Object decl)
{ {
// watch out: this is non-standard /* watch out: this is non-standard */
NClist* list; NClist* list;
NCvar* v = (NCvar*)var0; NCvar* v = (NCvar*)var0;
if(v==NULL) v = createncvar(); if(v==NULL) v = createncvar();
@ -168,7 +168,7 @@ sel_clause(CEparsestate* state, int selcase,
NCselection* sel = createncselection(); NCselection* sel = createncselection();
sel->operator = (NCsort)relop0; sel->operator = (NCsort)relop0;
sel->lhs = (NCvalue*)lhs; sel->lhs = (NCvalue*)lhs;
if(selcase == 2) {//singleton value if(selcase == 2) {/*singleton value*/
sel->rhs = nclistnew(); sel->rhs = nclistnew();
nclistpush(sel->rhs,(ncelem)values); nclistpush(sel->rhs,(ncelem)values);
} else } else
@ -185,6 +185,7 @@ indexpath(CEparsestate* state, Object list0, Object index)
Object Object
array_indices(CEparsestate* state, Object list0, Object indexno) array_indices(CEparsestate* state, Object list0, Object indexno)
{ {
NCslice* slice;
long long start = -1; long long start = -1;
NClist* list = (NClist*)list0; NClist* list = (NClist*)list0;
if(list == NULL) list = nclistnew(); if(list == NULL) list = nclistnew();
@ -193,7 +194,7 @@ array_indices(CEparsestate* state, Object list0, Object indexno)
ceerror(state,"Illegal array index"); ceerror(state,"Illegal array index");
start = 1; start = 1;
} }
NCslice* slice = createncslice(); slice = createncslice();
slice->first = start; slice->first = start;
slice->stride = 1; slice->stride = 1;
slice->count = 1; slice->count = 1;

View File

@ -1200,12 +1200,12 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
if(vsym != NULL) special = &vsym->var.special; if(vsym != NULL) special = &vsym->var.special;
if(tag == _FORMAT_FLAG) { if(tag == _FORMAT_FLAG) {
if(kflag_flag == 0) goto done;
/* Only use this tag if kflag is not set */
/* Use the table in main.c */
struct Kvalues* kvalue; struct Kvalues* kvalue;
int found = 0; int found = 0;
int modifier = 0; int modifier = 0;
if(kflag_flag == 0) goto done;
/* Only use this tag if kflag is not set */
/* Use the table in main.c */
for(kvalue=legalkinds;kvalue->name;kvalue++) { for(kvalue=legalkinds;kvalue->name;kvalue++) {
if(strcmp(sdata,kvalue->name) == 0) { if(strcmp(sdata,kvalue->name) == 0) {
modifier = kvalue->mode; modifier = kvalue->mode;

View File

@ -118,7 +118,7 @@ ocset_ssl(CURL* curl, OCstate* state)
DEBUG1(1,"CURLOPT_SSLKEY=%s",ssl->key); DEBUG1(1,"CURLOPT_SSLKEY=%s",ssl->key);
} }
if(ssl->keypasswd) { if(ssl->keypasswd) {
// libcurl prior to 7.16.4 used 'CURLOPT_SSLKEYPASSWD' /* libcurl prior to 7.16.4 used 'CURLOPT_SSLKEYPASSWD' */
cstat = curl_easy_setopt(curl, CURLOPT_KEYPASSWD, ssl->keypasswd); cstat = curl_easy_setopt(curl, CURLOPT_KEYPASSWD, ssl->keypasswd);
if(cstat != CURLE_OK) goto fail; if(cstat != CURLE_OK) goto fail;
DEBUG1(1,"CURLOPT_SSLKEY=%s",ssl->key); DEBUG1(1,"CURLOPT_SSLKEY=%s",ssl->key);