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

Side by Side Diff: fusl/src/regex/regcomp.c

Issue 1706293003: [fusl] Remove some more tabs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months 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 | « fusl/src/network/lookup_name.c ('k') | no next file » | 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 regcomp.c - TRE POSIX compatible regex compilation functions. 2 regcomp.c - TRE POSIX compatible regex compilation functions.
3 3
4 Copyright (c) 2001-2009 Ville Laurikari <vl@iki.fi> 4 Copyright (c) 2001-2009 Ville Laurikari <vl@iki.fi>
5 All rights reserved. 5 All rights reserved.
6 6
7 Redistribution and use in source and binary forms, with or without 7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions 8 modification, are permitted provided that the following conditions
9 are met: 9 are met:
10 10
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after
2305 if (p2->position == prev_p2_pos) { 2305 if (p2->position == prev_p2_pos) {
2306 p2++; 2306 p2++;
2307 continue; 2307 continue;
2308 } 2308 }
2309 prev_p2_pos = p2->position; 2309 prev_p2_pos = p2->position;
2310 /* Set `trans' to point to the next unused transition from 2310 /* Set `trans' to point to the next unused transition from
2311 position `p1->position'. */ 2311 position `p1->position'. */
2312 trans = transitions + offs[p1->position]; 2312 trans = transitions + offs[p1->position];
2313 while (trans->state != NULL) { 2313 while (trans->state != NULL) {
2314 #if 0 2314 #if 0
2315 » » /* If we find a previous transition from `p1->position' to 2315 /* If we find a previous transition from `p1->position' to
2316 » » `p2->position', it is overwritten. This can happen only 2316 `p2->position', it is overwritten. This can happen only
2317 » » if there are nested loops in the regexp, like in "((a)*)*". 2317 if there are nested loops in the regexp, like in "((a)*)*".
2318 » » In POSIX.2 repetition using the outer loop is always 2318 In POSIX.2 repetition using the outer loop is always
2319 » » preferred over using the inner loop.» Therefore the 2319 preferred over using the inner loop.» Therefore the
viettrungluu 2016/02/19 17:21:53 You still have a tab!
kulakowski 2016/02/19 18:03:22 Yeah. I said in the message that I didn't get ones
2320 » » transition for the inner loop is useless and can be thrown 2320 transition for the inner loop is useless and can be thrown
2321 » » away. */ 2321 away. */
2322 » » /* XXX - The same position is used for all nodes in a bracket 2322 /* XXX - The same position is used for all nodes in a bracket
2323 » » expression, so this optimization cannot be used (it will 2323 expression, so this optimization cannot be used (it will
2324 » » break bracket expressions) unless I figure out a way to 2324 break bracket expressions) unless I figure out a way to
2325 » » detect it here. */ 2325 detect it here. */
2326 » » if (trans->state_id == p2->position) 2326 if (trans->state_id == p2->position) {
2327 » » { 2327 break;
2328 » » break; 2328 }
2329 » » }
2330 #endif 2329 #endif
2331 trans++; 2330 trans++;
2332 } 2331 }
2333 2332
2334 if (trans->state == NULL) 2333 if (trans->state == NULL)
2335 (trans + 1)->state = NULL; 2334 (trans + 1)->state = NULL;
2336 /* Use the character ranges, assertions, etc. from `p1' for 2335 /* Use the character ranges, assertions, etc. from `p1' for
2337 the transition from `p1' to `p2'. */ 2336 the transition from `p1' to `p2'. */
2338 trans->code_min = p1->code_min; 2337 trans->code_min = p1->code_min;
2339 trans->code_max = p1->code_max; 2338 trans->code_max = p1->code_max;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2726 } 2725 }
2727 2726
2728 if (tnfa->tag_directions) 2727 if (tnfa->tag_directions)
2729 xfree(tnfa->tag_directions); 2728 xfree(tnfa->tag_directions);
2730 if (tnfa->firstpos_chars) 2729 if (tnfa->firstpos_chars)
2731 xfree(tnfa->firstpos_chars); 2730 xfree(tnfa->firstpos_chars);
2732 if (tnfa->minimal_tags) 2731 if (tnfa->minimal_tags)
2733 xfree(tnfa->minimal_tags); 2732 xfree(tnfa->minimal_tags);
2734 xfree(tnfa); 2733 xfree(tnfa);
2735 } 2734 }
OLDNEW
« no previous file with comments | « fusl/src/network/lookup_name.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698