Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: third_party/fips181/convert.cc

Issue 2571113002: Remove unnecessary typedefs in third_party/fips181. (Closed)
Patch Set: Solve for MSVC warning C4805. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/fips181/README.chromium ('k') | third_party/fips181/fips181.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** Copyright (c) 1999, 2000, 2001, 2002, 2003 2 ** Copyright (c) 1999, 2000, 2001, 2002, 2003
3 ** Adel I. Mirzazhanov. All rights reserved 3 ** Adel I. Mirzazhanov. All rights reserved
4 ** 4 **
5 ** Redistribution and use in source and binary forms, with or without 5 ** Redistribution and use in source and binary forms, with or without
6 ** modification, are permitted provided that the following conditions 6 ** modification, are permitted provided that the following conditions
7 ** are met: 7 ** are met:
8 ** 8 **
9 ** 1.Redistributions of source code must retain the above copyright notice, 9 ** 1.Redistributions of source code must retain the above copyright notice,
10 ** this list of conditions and the following disclaimer. 10 ** this list of conditions and the following disclaimer.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void 101 void
102 capitalize (char *syllable) 102 capitalize (char *syllable)
103 { 103 {
104 char tmp = 0x00; 104 char tmp = 0x00;
105 int i = 0; 105 int i = 0;
106 if (base::RandInt(0, 1) == 1) 106 if (base::RandInt(0, 1) == 1)
107 { 107 {
108 (void)memcpy((void *)&tmp, (void *)syllable, sizeof(tmp)); 108 (void)memcpy((void *)&tmp, (void *)syllable, sizeof(tmp));
109 for(i=0; i < 26; i++) 109 for(i=0; i < 26; i++)
110 if ( let[i] == tmp ) 110 if ( let[i] == tmp )
111 if (is_restricted_symbol(clet[i]) != TRUE) 111 if (!is_restricted_symbol(clet[i]))
112 (void)memcpy ((void *)syllable, (void *)&clet[i], 1); 112 (void)memcpy ((void *)syllable, (void *)&clet[i], 1);
113 } 113 }
114 } 114 }
115 115
116 /* 116 /*
117 ** numerize() - This routine designed to modify single-letter 117 ** numerize() - This routine designed to modify single-letter
118 ** syllable like this: 118 ** syllable like this:
119 ** a ----> 1 or 2 or 3 etc. 119 ** a ----> 1 or 2 or 3 etc.
120 ** u ----> 1 or 2 or 3 etc. 120 ** u ----> 1 or 2 or 3 etc.
121 ** etc. 121 ** etc.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 {93, "RIGHT_BRACKET"}, 218 {93, "RIGHT_BRACKET"},
219 {94, "CIRCUMFLEX"}, 219 {94, "CIRCUMFLEX"},
220 {95, "UNDERSCORE"}, 220 {95, "UNDERSCORE"},
221 {96, "GRAVE"}, 221 {96, "GRAVE"},
222 {123, "LEFT_BRACE"}, 222 {123, "LEFT_BRACE"},
223 {124, "VERTICAL_BAR"}, 223 {124, "VERTICAL_BAR"},
224 {125, "RIGHT_BRACE"}, 224 {125, "RIGHT_BRACE"},
225 {126, "TILDE"} 225 {126, "TILDE"}
226 }; 226 };
227 int i = 0; 227 int i = 0;
228 int flag = FALSE; 228 bool flag = false;
229 229
230 if (strlen(syllable) == 1) 230 if (strlen(syllable) == 1)
231 { 231 {
232 for (i = 0; i < 42; i++) 232 for (i = 0; i < 42; i++)
233 { 233 {
234 if(*syllable == ssn[i].symbol) 234 if(*syllable == ssn[i].symbol)
235 { 235 {
236 (void)memcpy((void*)h_syllable, (void*)ssn[i].name, strlen(ssn[i].name) ); 236 (void)memcpy((void*)h_syllable, (void*)ssn[i].name, strlen(ssn[i].name) );
237 » flag = TRUE; 237 » flag = true;
238 } 238 }
239 } 239 }
240 if (flag != TRUE) 240 if (flag != true)
241 (void)memcpy((void*)h_syllable, (void*)syllable, strlen(syllable)); 241 (void)memcpy((void*)h_syllable, (void*)syllable, strlen(syllable));
242 } 242 }
243 } 243 }
244 244
245 /* 245 /*
246 ** spell_word - spell the word 246 ** spell_word - spell the word
247 ** INPUT: 247 ** INPUT:
248 ** char * - pointer to the word 248 ** char * - pointer to the word
249 ** char * - pointer to the spelled word 249 ** char * - pointer to the spelled word
250 ** OUTPUT: 250 ** OUTPUT:
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 /* Remove hyphen at the end of the word */ 397 /* Remove hyphen at the end of the word */
398 tmp_ptr = tmp_ptr - 1; 398 tmp_ptr = tmp_ptr - 1;
399 (void) memcpy((void *)(tmp_ptr), (void *)&zero, 1); 399 (void) memcpy((void *)(tmp_ptr), (void *)&zero, 1);
400 400
401 return (spelled_word); 401 return (spelled_word);
402 } 402 }
403 403
404 #endif /* APGBFM */ 404 #endif /* APGBFM */
OLDNEW
« no previous file with comments | « third_party/fips181/README.chromium ('k') | third_party/fips181/fips181.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698