Changeset 5184 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Sep 15, 2005, 10:09:02 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion.cc
r5183 r5184 63 63 bool ShellCompletion::autoComplete(ShellInput* input) 64 64 { 65 c har* completionLine;65 const char* completionLine; 66 66 67 67 long classID; //< the classID retrieved from the Class. … … 75 75 if (input != NULL) 76 76 this->input = input; 77 78 SubString(input->getText(), true).debug(); 77 if (this->input == NULL) 78 return false; 79 if (this->input->getText() == NULL) 80 return this->classComplete(""); 81 82 completionLine = this->input->getText() + strspn(this->input->getText(), " \t\n"); 83 84 SubString inputSplits(completionLine, true); 85 86 if (inputSplits.getCount() == 0) 87 { 88 // this->classComplete(""); 89 return false; 90 } 91 else if (inputSplits.getCount() == 1 && strlen(inputSplits.getString(0)) == strlen(completionLine)) 92 { 93 // this->classComplete(inputSplits.getString(0)); 94 95 } 96 97 if (inputSplits.getCount() > 1) 98 { 99 100 } 79 101 80 102 /* completionLine = new char[strlen(this->input->getText())+1]; -
trunk/src/lib/shell/shell_completion.h
r5183 r5184 22 22 virtual ~ShellCompletion(); 23 23 24 bool autoComplete(ShellInput* input );24 bool autoComplete(ShellInput* input = NULL); 25 25 bool classComplete(const char* classBegin); 26 26 long classMatch(const char* input, unsigned int* length); -
trunk/src/lib/shell/shell_input.cc
r5182 r5184 53 53 evh->subscribe(this, ES_SHELL, i); 54 54 55 this->completion = new ShellCompletion ;55 this->completion = new ShellCompletion(this); 56 56 } 57 57 … … 210 210 this->debug(); 211 211 else if (event.type == SDLK_TAB) 212 this->completion->autoComplete( this);212 this->completion->autoComplete(); 213 213 else if (event.type == SDLK_BACKSPACE) 214 214 { -
trunk/src/lib/util/substring.cc
r5183 r5184 110 110 lastWasWhiteSpace = false; 111 111 } 112 113 112 this->splittersCount += 1; 114 113 115 printf("splitterCount = %d\n", this->splittersCount); 116 114 // allocate memory 117 115 this->strings = new char*[this->splittersCount]; 118 116 assert (strings != NULL); 119 117 118 // split the String into substrings 120 119 int l = 0; 121 120 unsigned int i = 0; … … 134 133 end += strspn(end, " \t\n"); 135 134 offset = end; 136 printf("'%s'\n", end);137 135 end = offset + strcspn(offset, " \t\n"); 138 136 }
Note: See TracChangeset
for help on using the changeset viewer.