]> git.llucax.com Git - personal/website.git/blob - source/blog/posts/2010/10/10-trying-cdgc-howto/0001-Fixes-to-be-able-to-parse-the-code-with-Dil.patch
Import personal website to git
[personal/website.git] / source / blog / posts / 2010 / 10 / 10-trying-cdgc-howto / 0001-Fixes-to-be-able-to-parse-the-code-with-Dil.patch
1 From e55f355e63ed57005e126e39a9a0338596edfcab Mon Sep 17 00:00:00 2001
2 From: Leandro Lucarella <llucax@gmail.com>
3 Date: Wed, 26 May 2010 20:29:06 -0300
4 Subject: [PATCH 1/4] Fixes to be able to parse the code with Dil
5
6 ---
7  tango/core/tools/LinuxStackTrace.d |    2 +-
8  tango/io/stream/Map.d              |    2 --
9  tango/net/Uri.d                    |    2 --
10  tango/text/convert/DateTime.d      |    8 --------
11  tango/text/locale/Convert.d        |    2 +-
12  tango/text/xml/DocEntity.d         |    4 ----
13  6 files changed, 2 insertions(+), 18 deletions(-)
14
15 diff --git a/tango/core/tools/LinuxStackTrace.d b/tango/core/tools/LinuxStackTrace.d
16 index e69557d..751b572 100644
17 --- a/tango/core/tools/LinuxStackTrace.d
18 +++ b/tango/core/tools/LinuxStackTrace.d
19 @@ -422,7 +422,7 @@ version(linux){
20                  }
21              }
22              
23 -            if (string_table && symbs) {
24 +            if (string_table.length && symbs.length) {
25                  StaticSectionInfo.addGSection(header,string_table,symbs,file[0..strlen(file)]);
26                  string_table=null;
27                  symbs=null;
28 diff --git a/tango/io/stream/Map.d b/tango/io/stream/Map.d
29 index 2a36027..d07082d 100644
30 --- a/tango/io/stream/Map.d
31 +++ b/tango/io/stream/Map.d
32 @@ -49,13 +49,11 @@ class MapInput(T) : Lines!(T)
33                  and rValue pairs from each one, The expected file format is
34                  as follows:
35  
36 -                ---
37                  x = y
38                  abc = 123
39                  x.y.z = this is a single property
40  
41                  # this is a comment line
42 -                ---
43  
44                  Note that the provided name and value are actually slices
45                  and should be copied if you intend to retain them (using
46 diff --git a/tango/net/Uri.d b/tango/net/Uri.d
47 index 60958e9..28fbf51 100644
48 --- a/tango/net/Uri.d
49 +++ b/tango/net/Uri.d
50 @@ -600,7 +600,6 @@ class Uri : UriView
51          
52                  Parsing is performed according to RFC 2396
53                  
54 -                ---
55                    ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
56                     12            3  4          5       6  7        8 9
57                      
58 @@ -609,7 +608,6 @@ class Uri : UriView
59                  5 isolates path
60                  7 isolates query
61                  9 isolates fragment
62 -                ---
63  
64                  This was originally a state-machine; it turned out to be a 
65                  lot faster (~40%) when unwound like this instead.
66 diff --git a/tango/text/convert/DateTime.d b/tango/text/convert/DateTime.d
67 index 76d6dde..f774acb 100644
68 --- a/tango/text/convert/DateTime.d
69 +++ b/tango/text/convert/DateTime.d
70 @@ -15,10 +15,8 @@
71          formatting is performed (below).
72  
73          Reference links:
74 -        ---
75          http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
76          http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo(VS.71).aspx
77 -        ---
78  
79  ******************************************************************************/
80  
81 @@ -112,7 +110,6 @@ struct DateTimeLocale
82                  using the specified layout. The layout can be a generic
83                  variant or a custom one, where generics are indicated
84                  via a single character:
85 -                ---
86                  "t" = 7:04
87                  "T" = 7:04:02 PM 
88                  "d" = 3/30/2009
89 @@ -127,11 +124,9 @@ struct DateTimeLocale
90                  "R" = Mon, 30 Mar 2009 19:04:02 GMT
91                  "s" = 2009-03-30T19:04:02
92                  "u" = 2009-03-30 19:04:02Z
93 -                ---
94          
95                  For the US locale, these generic layouts are expanded in the 
96                  following manner:
97 -                ---
98                  "t" = "h:mm" 
99                  "T" = "h:mm:ss tt"
100                  "d" = "M/d/yyyy"  
101 @@ -146,15 +141,12 @@ struct DateTimeLocale
102                  "R" = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'"
103                  "s" = "yyyy'-'MM'-'dd'T'HH':'mm':'ss"      
104                  "u" = "yyyy'-'MM'-'dd' 'HH':'mm':'ss'Z'"   
105 -                ---
106  
107                  Custom layouts are constructed using a combination of the 
108                  character codes indicated on the right, above. For example, 
109                  a layout of "dddd, dd MMM yyyy HH':'mm':'ss zzzz" will emit 
110                  something like this:
111 -                ---
112                  Monday, 30 Mar 2009 19:04:02 -08:00
113 -                ---
114  
115                  Using these format indicators with Layout (Stdout etc) is
116                  straightforward. Formatting integers, for example, is done
117 diff --git a/tango/text/locale/Convert.d b/tango/text/locale/Convert.d
118 index 440416f..96925c0 100644
119 --- a/tango/text/locale/Convert.d
120 +++ b/tango/text/locale/Convert.d
121 @@ -487,7 +487,7 @@ else
122  
123  *******************************************************************************/
124  
125 -private extern (C) private char* ecvt(double d, int digits, out int decpt, out bool sign);
126 +private extern (C) char* ecvt(double d, int digits, out int decpt, out bool sign);
127  
128  /*******************************************************************************
129  
130 diff --git a/tango/text/xml/DocEntity.d b/tango/text/xml/DocEntity.d
131 index 8803b70..f8c1caf 100644
132 --- a/tango/text/xml/DocEntity.d
133 +++ b/tango/text/xml/DocEntity.d
134 @@ -17,11 +17,9 @@ private import Util = tango.text.Util;
135  /******************************************************************************
136  
137          Convert XML entity patterns to normal characters
138 -        ---
139          &amp; => ;
140          &quot => "
141          etc
142 -        ---
143          
144  ******************************************************************************/
145  
146 @@ -95,11 +93,9 @@ T[] fromEntity (T) (T[] src, T[] dst = null)
147  /******************************************************************************
148  
149          Convert XML entity patterns to normal characters
150 -        ---
151          &amp; => ;
152          &quot => "
153          etc
154 -        ---
155          
156          This variant does not require an interim workspace, and instead
157          emits directly via the provided delegate
158 -- 
159 1.7.1
160