More indentation, spacing, and style fixes in sc1.c.
This commit is contained in:
		
							parent
							
								
									16177e9ecc
								
							
						
					
					
						commit
						8aa28e2c8d
					
				@ -2922,9 +2922,7 @@ static void declstruct(void)
 | 
			
		||||
  /* get the explicit tag (required!) */
 | 
			
		||||
  tok = lex(&val,&str);
 | 
			
		||||
  if (tok != tSYMBOL)
 | 
			
		||||
	{
 | 
			
		||||
    error(93);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
  check_struct_name(str);
 | 
			
		||||
 | 
			
		||||
@ -2936,52 +2934,41 @@ static void declstruct(void)
 | 
			
		||||
  pc_addtag_flags(pstruct->name, flags);
 | 
			
		||||
 | 
			
		||||
  needtoken('{');
 | 
			
		||||
	do
 | 
			
		||||
	{
 | 
			
		||||
  do {
 | 
			
		||||
    structarg_t arg;
 | 
			
		||||
		if (matchtoken('}'))
 | 
			
		||||
		{
 | 
			
		||||
    if (matchtoken('}')) {
 | 
			
		||||
      /* Quick exit */
 | 
			
		||||
      lexpush();
 | 
			
		||||
      break;
 | 
			
		||||
    }
 | 
			
		||||
    memset(&arg, 0, sizeof(structarg_t));
 | 
			
		||||
    tok = lex(&val,&str);
 | 
			
		||||
		if (tok == tCONST)
 | 
			
		||||
		{
 | 
			
		||||
    if (tok == tCONST) {
 | 
			
		||||
      arg.fconst = 1;
 | 
			
		||||
      tok = lex(&val,&str);
 | 
			
		||||
    }
 | 
			
		||||
    arg.ident = 0;
 | 
			
		||||
		if (tok == '&')
 | 
			
		||||
		{
 | 
			
		||||
    if (tok == '&') {
 | 
			
		||||
      arg.ident = iREFERENCE;
 | 
			
		||||
      tok = lex(&val,&str);
 | 
			
		||||
    }
 | 
			
		||||
		if (tok == tLABEL)
 | 
			
		||||
		{
 | 
			
		||||
    if (tok == tLABEL) {
 | 
			
		||||
      arg.tag = pc_addtag(str);
 | 
			
		||||
      tok = lex(&val,&str);
 | 
			
		||||
    }
 | 
			
		||||
		if (tok != tSYMBOL)
 | 
			
		||||
		{
 | 
			
		||||
    if (tok != tSYMBOL) {
 | 
			
		||||
      error(1, "-identifier-", str);
 | 
			
		||||
      continue;
 | 
			
		||||
    }
 | 
			
		||||
    strcpy(arg.name, str);
 | 
			
		||||
		if (matchtoken('['))
 | 
			
		||||
		{
 | 
			
		||||
    if (matchtoken('[')) {
 | 
			
		||||
      if (arg.ident == iREFERENCE)
 | 
			
		||||
			{
 | 
			
		||||
        error(67, arg.name);
 | 
			
		||||
			}
 | 
			
		||||
      arg.ident = iARRAY;
 | 
			
		||||
			do 
 | 
			
		||||
			{
 | 
			
		||||
      do  {
 | 
			
		||||
        constvalue *enumroot;
 | 
			
		||||
        int ignore_tag;
 | 
			
		||||
				if (arg.dimcount == sDIMEN_MAX)
 | 
			
		||||
				{
 | 
			
		||||
        if (arg.dimcount == sDIMEN_MAX) {
 | 
			
		||||
          error(53);
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
@ -2990,20 +2977,14 @@ static void declstruct(void)
 | 
			
		||||
      } while (matchtoken('['));
 | 
			
		||||
      /* Handle strings */
 | 
			
		||||
      if (arg.tag == pc_tag_string && arg.dims[arg.dimcount-1])
 | 
			
		||||
			{
 | 
			
		||||
        arg.dims[arg.dimcount-1] = (size + sizeof(cell)-1) / sizeof(cell);
 | 
			
		||||
			}
 | 
			
		||||
      if (arg.dimcount == 1 && !arg.dims[arg.dimcount-1])
 | 
			
		||||
			{
 | 
			
		||||
        arg.ident = iREFARRAY;
 | 
			
		||||
			}
 | 
			
		||||
    } else if (!arg.ident) {
 | 
			
		||||
      arg.ident = iVARIABLE;
 | 
			
		||||
    }
 | 
			
		||||
    if (pstructs_addarg(pstruct, &arg) == NULL)
 | 
			
		||||
		{
 | 
			
		||||
      error(103, arg.name, layout_spec_name(Layout_PawnStruct));
 | 
			
		||||
		}
 | 
			
		||||
  } while (matchtoken(','));
 | 
			
		||||
  needtoken('}');
 | 
			
		||||
  matchtoken(';');  /* eat up optional semicolon */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user