_mcrvalid.c (7ce20373) | _mcrvalid.c (509a48ff) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 21 unchanged lines hidden (view full) --- 30 Token * pTokenWhereMacroBecomesValid; 31 struct macroValidator * 32 pNext; 33*/ 34 35void 36mvl_init(MacroValidatorList * out_pValidators) 37{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 21 unchanged lines hidden (view full) --- 30 Token * pTokenWhereMacroBecomesValid; 31 struct macroValidator * 32 pNext; 33*/ 34 35void 36mvl_init(MacroValidatorList * out_pValidators) 37{ |
38 out_pValidators->pFirst = 0; | 38 out_pValidators->pFirst = NULL; |
39 out_pValidators->nextFreeIdentifier = 1; 40} 41 42void 43mvl_destruct(MacroValidatorList * out_pValidators) 44{ 45 MacroValidator * pV = out_pValidators->pFirst; 46 MacroValidator * pDel; 47 for ( pDel = out_pValidators->pFirst; | 39 out_pValidators->nextFreeIdentifier = 1; 40} 41 42void 43mvl_destruct(MacroValidatorList * out_pValidators) 44{ 45 MacroValidator * pV = out_pValidators->pFirst; 46 MacroValidator * pDel; 47 for ( pDel = out_pValidators->pFirst; |
48 pDel != 0; | 48 pDel != NULL; |
49 pDel = pV ) 50 { 51 pV = pV->pNext; 52 53 pDel->pMacro->flag &= (~ISACTIVE); 54 dofree(pDel); 55 } 56} --- 9 unchanged lines hidden (view full) --- 66mvl_add( MacroValidatorList * inout_pValidators, 67 Nlist * in_pMacro, 68 Token * in_pTokenWhereMacroBecomesValid ) 69{ 70 71 MacroValidator * pNew = new(MacroValidator); 72 pNew->pMacro = in_pMacro; 73 | 49 pDel = pV ) 50 { 51 pV = pV->pNext; 52 53 pDel->pMacro->flag &= (~ISACTIVE); 54 dofree(pDel); 55 } 56} --- 9 unchanged lines hidden (view full) --- 66mvl_add( MacroValidatorList * inout_pValidators, 67 Nlist * in_pMacro, 68 Token * in_pTokenWhereMacroBecomesValid ) 69{ 70 71 MacroValidator * pNew = new(MacroValidator); 72 pNew->pMacro = in_pMacro; 73 |
74 if (in_pTokenWhereMacroBecomesValid == 0) | 74 if (in_pTokenWhereMacroBecomesValid == NULL) |
75 { 76 pNew->nTokenWhereMacroBecomesValid = INVALID_TILL_ENDOFROW; 77 } 78 else if (in_pTokenWhereMacroBecomesValid->identifier > 0) 79 { 80 pNew->nTokenWhereMacroBecomesValid = in_pTokenWhereMacroBecomesValid->identifier; 81 } 82 else --- 23 unchanged lines hidden (view full) --- 106*/ 107 108void 109mvl_check( MacroValidatorList * inout_pValidators, 110 Token * inout_pTokenToCheck) 111{ 112 MacroValidator * pV; /* Running pointer */ 113 MacroValidator * pCheckedOnes; /* Here new list is built. */ | 75 { 76 pNew->nTokenWhereMacroBecomesValid = INVALID_TILL_ENDOFROW; 77 } 78 else if (in_pTokenWhereMacroBecomesValid->identifier > 0) 79 { 80 pNew->nTokenWhereMacroBecomesValid = in_pTokenWhereMacroBecomesValid->identifier; 81 } 82 else --- 23 unchanged lines hidden (view full) --- 106*/ 107 108void 109mvl_check( MacroValidatorList * inout_pValidators, 110 Token * inout_pTokenToCheck) 111{ 112 MacroValidator * pV; /* Running pointer */ 113 MacroValidator * pCheckedOnes; /* Here new list is built. */ |
114 pCheckedOnes = 0; | 114 pCheckedOnes = NULL; |
115 116 for ( pV = inout_pValidators->pFirst; | 115 116 for ( pV = inout_pValidators->pFirst; |
117 pV != 0; | 117 pV != NULL; |
118 pV = inout_pValidators->pFirst ) 119 { 120 inout_pValidators->pFirst = pV->pNext; 121 122 if (pV->nTokenWhereMacroBecomesValid == inout_pTokenToCheck->identifier) 123 { 124 pV->pMacro->flag &= (~ISACTIVE); 125 dofree(pV); --- 25 unchanged lines hidden --- | 118 pV = inout_pValidators->pFirst ) 119 { 120 inout_pValidators->pFirst = pV->pNext; 121 122 if (pV->nTokenWhereMacroBecomesValid == inout_pTokenToCheck->identifier) 123 { 124 pV->pMacro->flag &= (~ISACTIVE); 125 dofree(pV); --- 25 unchanged lines hidden --- |