nobu
58e8c9c895
date_strftime.c: check precision
...
* ext/date/date_strftime.c (date_strftime_with_tmx): reject too
large precision to get rid of buffer overflow.
reported by Guido Vranken <guido AT guidovranken.nl>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-14 13:07:27 +00:00
kosaki
798ff850e4
* configure.in: check struct timeval exist or not.
...
* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
properly. and don't include sys/time.h if struct timeval exist.
* file.c: include sys/time.h explicitly.
* random.c: ditto.
* thread_pthread.c: ditto.
* time.c: ditto.
* ext/date/date_strftime.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 05:06:47 +00:00
ryan
ed720d5505
Fixed warning for implicit conversion from size_t to int
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-20 23:59:35 +00:00
tadf
ab67ba64ca
* ext/date/date_{core,strftime}.c: [ruby-core:46990].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-04 21:57:48 +00:00
tadf
f5b033cd4e
* ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
...
* ext/date/date_strftime.c: ditto.
* ext/date/date_core.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 09:49:17 +00:00
tadf
83d8d057c2
* ext/date/date_strftime.c: allows %Ok and %Ol.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-27 01:04:41 +00:00
tadf
2199c85dd6
* ext/date/date_strftime.c: reduced the code.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-26 09:16:26 +00:00
tadf
00fd38644d
* ext/date/date_strftime.c: should also be aware of flags on
...
complex specifier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15 22:03:37 +00:00
tadf
b6de661b54
trivial changes
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-14 21:39:25 +00:00
tadf
c80308119b
trivial changes
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 22:39:13 +00:00
tadf
b1984f9d52
* ext/date/date_strftime.c: removed unused code and changed the style.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 09:14:46 +00:00
tadf
2168ae602f
* ext/date/date_strftime.c: refactored.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13 08:39:18 +00:00
tadf
6cb7ac7e15
* ext/date/date_strftime.c: gets the value with range() consistetly.
...
* ext/date/date_strftime.c (range): now just replaces the given item.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08 23:12:30 +00:00
tadf
e3b989c768
* ext/date/date_strftime.c: reassigned some variables.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-03 03:21:53 +00:00
tadf
f99bed9330
* ext/date/date_core.c: an issue that is same as [ruby-dev:44071].
...
* ext/date/date_strftime.c: identical to [ruby-dev:44112].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 11:17:00 +00:00
tadf
23658b355c
* ext/date/date_core.c: avoided using timev.
...
* ext/date/date_strftime.c: ditto.
* ext/date/date_tmx.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-29 14:47:04 +00:00
tadf
64097bd733
* ext/date/date_core.c (m_real_cwyear): new. derived from m_cwyear.
...
* ext/date/date_strftime.c: trivial changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-05 08:53:56 +00:00
tadf
a975bf245f
* ext/date/date_tmx.h: now does not place decoded data. allows to
...
access indirectly via functions on demand.
* ext/date/date_strftime.c: ditto.
* ext/date/date_core.c: ditto.
* ext/date/date_core.c ({d|dt}_lite_to_s): use strftime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-05 01:13:19 +00:00
tadf
1f35d2485c
* ext/date/date_strftime(date_strftime_with_tmx): "%v" means "%e-%b-%Y".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-21 13:47:18 +00:00
tadf
559c025a22
* ext/date/date_{core,parse}.c: moved nearly all core code from ext/date/lib.
...
* ext/date/lib/{date,date/format}.rb: removed nearly all code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-21 12:25:03 +00:00
naruse
c34db58913
* ext/date/date_core.c (leap_p): surpress warning: parentheses.
...
* ext/date/date_core.c (date_s__parse_internal): remove unused
variable "str".
* ext/date/date_parse.c (parse_ddd_cb): use RSTRING_LENINT.
* ext/date/date_strftime.c (date_strftime_with_tmx): remove unused
variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 17:34:55 +00:00
tadf
2b6ab9bf1e
* ext/date/date_{core,strftime}.c: use struct tmx instead of vtm.
...
* ext/date/date_tmx.h: new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 15:22:47 +00:00
tadf
10ce57ea8d
* ext/date/date_strftime.c (date_strftime_wo_timespec): changed
...
the way of validation of locale modifiers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-16 13:26:15 +00:00
naruse
700b778cbb
time(3)'s argument and return value is time_t.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 20:29:53 +00:00
tadf
e358888d5e
* ext/date/date_core.c: should not force cast with macros.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 13:01:06 +00:00
naruse
f9819d0374
* ext/date/date_strftime.c (date_strftime_wo_timespec):
...
surpress warning: shorten-64-to-32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-21 21:49:00 +00:00
tadf
d9dd52acbf
* ext/date/date_strftime.c: checks duplicated modifiers.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 14:11:16 +00:00
tadf
e48047fe0c
* ext/date/date_strftime.c: removed unused code and arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 13:34:44 +00:00
tadf
434157444f
* ext/date/date_core.c: replacement of implementation of
...
strftime. It has some limitations that is same as Time's
one. [experimental]
* ext/date/date_strftime.c: new.
* ext/date/lib/date/format.c: removed ruby version of strftime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-20 12:44:47 +00:00