mirror of
				https://github.com/FDOS/kernel.git
				synced 2025-10-31 03:14:40 +01:00 
			
		
		
		
	Pointer-ise specificCountriesSupported accesses.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@959 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
		
							parent
							
								
									b3a2d6bfde
								
							
						
					
					
						commit
						0c00651565
					
				| @ -2418,6 +2418,7 @@ struct CountrySpecificInfo specificCountriesSupported[] = { | |||||||
| STATIC int LoadCountryInfoHardCoded(char *filename, COUNT ctryCode, COUNT codePage) | STATIC int LoadCountryInfoHardCoded(char *filename, COUNT ctryCode, COUNT codePage) | ||||||
| { | { | ||||||
|   int i; |   int i; | ||||||
|  |   struct CountrySpecificInfo *country; | ||||||
|   UNREFERENCED_PARAMETER(codePage); |   UNREFERENCED_PARAMETER(codePage); | ||||||
|   UNREFERENCED_PARAMETER(filename); |   UNREFERENCED_PARAMETER(filename); | ||||||
| 
 | 
 | ||||||
| @ -2425,30 +2426,34 @@ STATIC int LoadCountryInfoHardCoded(char *filename, COUNT ctryCode, COUNT codePa | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   for (i = 0; i < sizeof(specificCountriesSupported)/sizeof(specificCountriesSupported[0]); i++) |   for (country = specificCountriesSupported; | ||||||
|  |        country < specificCountriesSupported + LENGTH(specificCountriesSupported); | ||||||
|  |        country++) | ||||||
|   { |   { | ||||||
|     if (specificCountriesSupported[i].CountryID == ctryCode) |     if (country->CountryID == ctryCode) | ||||||
|     { |     { | ||||||
|       int codepagesaved = nlsCountryInfoHardcoded.C.CodePage; |       int codepagesaved = nlsCountryInfoHardcoded.C.CodePage; | ||||||
| 
 | 
 | ||||||
|       fmemcpy(&nlsCountryInfoHardcoded.C.CountryID,  |       fmemcpy(&nlsCountryInfoHardcoded.C.CountryID, | ||||||
|               &specificCountriesSupported[i], |               country, | ||||||
|               min(nlsCountryInfoHardcoded.TableSize, sizeof(struct CountrySpecificInfo))); |               min(nlsCountryInfoHardcoded.TableSize, sizeof *country)); | ||||||
| 
 | 
 | ||||||
|       nlsCountryInfoHardcoded.C.CodePage = codepagesaved; |       nlsCountryInfoHardcoded.C.CodePage = codepagesaved; | ||||||
| 
 | 
 | ||||||
|       return 0; |       return 0; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|    | 
 | ||||||
|   printf("could not find country info for country ID %u\n" |   printf("could not find country info for country ID %u\n" | ||||||
|          "current supported countries are ", ctryCode); |          "current supported countries are ", ctryCode); | ||||||
| 
 | 
 | ||||||
|   for (i = 0; i < sizeof(specificCountriesSupported)/sizeof(specificCountriesSupported[0]); i++) |   for (country = specificCountriesSupported; | ||||||
|  |        country < specificCountriesSupported + LENGTH(specificCountriesSupported); | ||||||
|  |        country++) | ||||||
|   { |   { | ||||||
|     printf("%u ",specificCountriesSupported[i].CountryID); |     printf("%u ", country->CountryID); | ||||||
|   } |   } | ||||||
|   printf("\n");        |   printf("\n"); | ||||||
| 
 | 
 | ||||||
|   return 1; |   return 1; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user