]> git.saurik.com Git - cycript.git/blobdiff - Console.cpp
Force Fink's PATH (but only when required).
[cycript.git] / Console.cpp
index 6ecc251a7cc53c152c369426c624c5a77c488e09..c6809479319d05620de0c848ec7b0bf48ce5b331 100644 (file)
@@ -313,7 +313,7 @@ static char **Complete(const char *word, int start, int end) {
     std::string common;
     bool rest(false);
 
-    for (CYElement *element(array->elements_); element != NULL; element = element->next_) {
+    CYForEach (element, array->elements_) {
         CYString *string(dynamic_cast<CYString *>(element->value_));
         _assert(string != NULL);
 
@@ -482,7 +482,7 @@ static void Console(CYOptions &options) {
             if (parser.parse() != 0 || !driver.errors_.empty()) {
                 for (CYDriver::Errors::const_iterator error(driver.errors_.begin()); error != driver.errors_.end(); ++error) {
                     cy::position begin(error->location_.begin);
-                    if (begin.line != lines.size() || begin.column - 1 != lines.back().size() || error->warning_) {
+                    if (begin.line != lines.size() || begin.column < lines.back().size() || error->warning_) {
                         cy::position end(error->location_.end);
 
                         if (begin.line != lines.size()) {
@@ -573,7 +573,7 @@ int Main(int argc, char const * const argv[], char const * const envp[]) {
     bool compile(false);
     CYOptions options;
 
-    append_history$ = reinterpret_cast<int (*)(int, const char *)>(dlsym(RTLD_DEFAULT, "append_history"));
+    append_history$ = (int (*)(int, const char *)) (dlsym(RTLD_DEFAULT, "append_history"));
 
 #ifdef CY_ATTACH
     pid_t pid(_not(pid_t));