MCPcopy Create free account
hub / github.com/LAStools/LAStools / parse_extended_flags

Function parse_extended_flags

src/las2txt.cpp:433–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431enum extended_flags { HSV = -1, HSL = -2, HSV255 = -3, HSL255 = -4 };
432
433static void parse_extended_flags(char* parse_string) {
434 const char* extended_flags[] = {"(HSV)", "(HSL)", "(hsv)", "(hsl)"};
435 const signed char replacement_codes[] = {HSV255, HSL255, HSV, HSL};
436 I32 nflags = (I32)(sizeof(extended_flags) / sizeof(char*));
437
438 for (I32 i = 0; i < nflags; i++) {
439 char* found = strstr(parse_string, extended_flags[i]);
440
441 while (found) {
442 int len_flag = (int)strlen(extended_flags[i]);
443 int len_remaining = (int)strlen(found + len_flag);
444 *found = (char)replacement_codes[i];
445 memmove(found + 1, found + len_flag, len_remaining + 1);
446 found = strstr(parse_string, extended_flags[i]);
447 }
448 }
449}
450
451#ifdef COMPILE_WITH_GUI
452extern int las2txt_gui(int argc, char* argv[], LASreadOpener* lasreadopener);

Callers 2

mainFunction · 0.85
openMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected