xot 0.1.40 → 0.1.42

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8a7546d3950d5f6bc2e300f3def88e6e2c271e69bb777bb62fc0983a6a3960f
4
- data.tar.gz: 60edc53409168b473879cae63532e807c7ea170aa673f96843305928f74e9dac
3
+ metadata.gz: b661b7dceb26ab9ff2da740eee209953572ada82033e4be60554e8c9325b3068
4
+ data.tar.gz: '08c8cad2a61cc0dd6d143f0cdecedc0667e9623fa725c576d00a998b0451012f'
5
5
  SHA512:
6
- metadata.gz: 59c9183fe7ab8c3b6acc01de08ce98e462fdb62bef3c12537f23fc6ffe27b2175d73848f35b6a3ef5658c8fff8bd1c3cb2b3e197163412c7d81a03e1f04ad89d
7
- data.tar.gz: e638a86a7aba092ceeb1e9daad1b66a4d84f184825c37e704769314a0040c10597d6fed5e95820469e15edfb3c56745cd5e40e29566b9ddbe0da3befc4ecb9e8
6
+ metadata.gz: 1c83a2695955207e0624a196d41df892f38837748ced52ff64086a47fcd10ba0a434a1575b139eda927a4d628cd845dce10226e9853b468ca86fc7c5c00fc6dc
7
+ data.tar.gz: 7a9761a6d883abe8c6272c9ecfb7b5279708de6b477fb12fca6464046de2039ebc591ddf6c1b058ab228ba507719a1a9e6c3509239bae9ba726c30809de99d67
@@ -4,7 +4,6 @@ on:
4
4
  push:
5
5
  branches: [master]
6
6
  pull_request:
7
- branches: [master]
8
7
 
9
8
  jobs:
10
9
  test:
data/ChangeLog.md CHANGED
@@ -1,6 +1,19 @@
1
1
  # xot ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.42] - 2024-02-07
5
+
6
+ - Add Xot::split()
7
+ - Fix compile error
8
+
9
+
10
+ ## [v0.1.41] - 2023-12-09
11
+
12
+ - Add ci?()
13
+ - Trigger github actions on all pull_request
14
+ - Fix breaking depend.mf
15
+
16
+
4
17
  ## [v0.1.40] - 2023-11-09
5
18
 
6
19
  - Use Gemfile to install gems for development instead of add_development_dependency in gemspec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.40
1
+ 0.1.42
data/include/xot/debug.h CHANGED
@@ -21,9 +21,9 @@ namespace Xot
21
21
 
22
22
  #else
23
23
 
24
- inline void dout(...) {}
24
+ inline void dout (...) {}
25
25
 
26
- inline void doutln(...) {}
26
+ inline void doutln (...) {}
27
27
 
28
28
  #endif
29
29
 
data/include/xot/string.h CHANGED
@@ -6,6 +6,7 @@
6
6
 
7
7
  #include <stdarg.h>
8
8
  #include <string>
9
+ #include <vector>
9
10
 
10
11
 
11
12
  #define XOT_STRINGF(format, result) \
@@ -58,10 +59,15 @@ namespace Xot
58
59
  };// String
59
60
 
60
61
 
62
+ typedef std::vector<String> StringList;
63
+
64
+
61
65
  String stringf (const char* format, ...);
62
66
 
63
67
  String stringf (const char* format, va_list args);
64
68
 
69
+ void split(StringList* result, const char* string, char separator = '\n');
70
+
65
71
  template <typename T> String to_s (const T& val);
66
72
 
67
73
 
data/lib/xot/rake/util.rb CHANGED
@@ -224,7 +224,11 @@ module Xot
224
224
  env :DEBUG, false
225
225
  end
226
226
 
227
- def actions?()
227
+ def ci?()
228
+ github_actions?
229
+ end
230
+
231
+ def github_actions?()
228
232
  env :GITHUB_ACTIONS, false
229
233
  end
230
234
 
data/lib/xot/rake.rb CHANGED
@@ -100,7 +100,7 @@ module Xot
100
100
  sh %( #{cxx} -M #{cppflags} #{srcs.keys.join ' '} > #{depend} )
101
101
  input = open(depend) {|f| f.read}
102
102
  open(depend, 'w') do |output|
103
- output << input.gsub(/\w+\.o/, src_dir + '/\0')
103
+ output << input.gsub(/\w+\.o\W/, src_dir + '/\0')
104
104
  end
105
105
  end
106
106
 
data/src/string.cpp CHANGED
@@ -4,6 +4,7 @@
4
4
  #include <stdio.h>
5
5
  #include <algorithm>
6
6
  #include <memory>
7
+ #include "xot/exception.h"
7
8
 
8
9
 
9
10
  namespace Xot
@@ -110,6 +111,29 @@ namespace Xot
110
111
  return NULL;
111
112
  }
112
113
 
114
+ void
115
+ split (StringList* result, const char* string, char separator)
116
+ {
117
+ if (separator == '\0')
118
+ argument_error(__FILE__, __LINE__);
119
+
120
+ result->clear();
121
+ for (const char* p = string;;)
122
+ {
123
+ const char* psep = strchr(p, separator);
124
+ if (psep)
125
+ {
126
+ result->emplace_back(p, psep);
127
+ p = psep + 1;
128
+ }
129
+ else
130
+ {
131
+ result->emplace_back(p);
132
+ break;
133
+ }
134
+ }
135
+ }
136
+
113
137
  template <> String
114
138
  to_s<int> (const int& val)
115
139
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-08 00:00:00.000000000 Z
11
+ date: 2024-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This library include some useful utility classes and functions for development
14
14
  with C++.
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.4.10
100
+ rubygems_version: 3.4.19
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: A Utility library for C++ developemt.