- db.execSQL(line);
- }
-
- db.setTransactionSuccessful();
- }
- catch (IOException e) {
- Log.e("db", String.format("Error opening raw resource for revision %d", rev_no));
- e.printStackTrace();
- }
- finally {
- db.endTransaction();
- }
- }
- public int get_option_value(String name, int default_value) {
- String s = get_option_value(name, String.valueOf(default_value));
- try {
- return Integer.parseInt(s);
- }
- catch (Exception e) {
- return default_value;
- }
- }
-
- public long get_option_value(String name, long default_value) {
- String s = get_option_value(name, String.valueOf(default_value));
- try {
- return Long.parseLong(s);
- }
- catch (Exception e) {
- Log.d("db", "returning default long value of "+name, e);
- return default_value;
- }
- }
+ lineNo++;
+ if (line.startsWith("--"))
+ continue;
+ if (line.isEmpty())
+ continue;
+
+ Matcher m = continuation.matcher(line);
+ eolPending = false;
+ if (m.find()) {
+ line = m.replaceFirst("");
+ eolPending = true;
+ }