| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include <cstdio> // NOLINT | 29 #include <cstdio> // NOLINT |
| 30 #include <readline/readline.h> | 30 #include <readline/readline.h> |
| 31 #include <readline/history.h> | 31 #include <readline/history.h> |
| 32 | 32 |
| 33 | 33 |
| 34 #include "d8.h" | 34 #include "d8.h" |
| 35 | 35 |
| 36 | 36 |
| 37 // There are incompatibilities between different versions and different | 37 // There are incompatibilities between different versions and different |
| 38 // implementations of readline. This smoothes out one known incompatibility. | 38 // implementations of readline. This smooths out one known incompatibility. |
| 39 #if RL_READLINE_VERSION >= 0x0500 | 39 #if RL_READLINE_VERSION >= 0x0500 |
| 40 #define completion_matches rl_completion_matches | 40 #define completion_matches rl_completion_matches |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 | 43 |
| 44 namespace v8 { | 44 namespace v8 { |
| 45 | 45 |
| 46 | 46 |
| 47 class ReadLineEditor: public LineEditor { | 47 class ReadLineEditor: public LineEditor { |
| 48 public: | 48 public: |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return strdup(*str); | 119 return strdup(*str); |
| 120 } else { | 120 } else { |
| 121 current_completions.Dispose(); | 121 current_completions.Dispose(); |
| 122 current_completions.Clear(); | 122 current_completions.Clear(); |
| 123 return NULL; | 123 return NULL; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 } // namespace v8 | 128 } // namespace v8 |
| OLD | NEW |