Skip to content

Commit 86efd97

Browse files
committed
add gitattributes and fix whitespace issues
1 parent bfd3cd8 commit 86efd97

File tree

433 files changed

+196
-597
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

433 files changed

+196
-597
lines changed

Diff for: .gitattributes

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
2+
3+
* text=auto
4+
*.cpp rust
5+
*.h rust
6+
*.rs rust
7+
src/rt/msvc/* -whitespace
8+
src/rt/vg/* -whitespace
9+
src/rt/linenoise/* -whitespace

Diff for: COPYRIGHT

-1
Original file line numberDiff line numberDiff line change
@@ -367,4 +367,3 @@ their own copyright notices and license terms:
367367
has chosen for the collective work, enumerated at the top
368368
of this file. The only difference is the retention of
369369
copyright itself, held by the contributor.
370-

Diff for: RELEASES.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Version 0.3 (July 2012)
250250
* Slices and fixed-size, interior-allocated vectors
251251
* #!-comments for lang versioning, shell execution
252252
* Destructors and iface implementation for classes;
253-
type-parameterized classes and class methods
253+
type-parameterized classes and class methods
254254
* 'const' type kind for types that can be used to implement
255255
shared-memory concurrency patterns
256256

@@ -261,7 +261,7 @@ Version 0.3 (July 2012)
261261
'crust', 'native' (now 'extern'), 'cont' (now 'again')
262262

263263
* Constructs: do-while loops ('do' repurposed), fn binding,
264-
resources (replaced by destructors)
264+
resources (replaced by destructors)
265265

266266
* Compiler reorganization
267267
* Syntax-layer of compiler split into separate crate
@@ -276,7 +276,7 @@ Version 0.3 (July 2012)
276276
* Extensive work on libuv interface
277277
* Much vector code moved to libraries
278278
* Syntax extensions: #line, #col, #file, #mod, #stringify,
279-
#include, #include_str, #include_bin
279+
#include, #include_str, #include_bin
280280

281281
* Tool improvements
282282
* Cargo automatically resolves dependencies

Diff for: doc/README

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The markdown docs are only generated by make when node is installed (use
2-
`make doc`). If you don't have node installed you can generate them yourself.
3-
Unfortunately there's no real standard for markdown and all the tools work
2+
`make doc`). If you don't have node installed you can generate them yourself.
3+
Unfortunately there's no real standard for markdown and all the tools work
44
differently. pandoc is one that seems to work well.
55

66
To generate an html version of a doc do something like:
@@ -10,4 +10,4 @@ The syntax for pandoc flavored markdown can be found at:
1010
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
1111

1212
A nice quick reference (for non-pandoc markdown) is at:
13-
http://kramdown.rubyforge.org/quickref.html
13+
http://kramdown.rubyforge.org/quickref.html

Diff for: doc/rust.md

-1

Diff for: doc/tutorial-macros.md

-1

Diff for: doc/tutorial-tasks.md

-1

Diff for: doc/tutorial.md

+4-4

Diff for: doc/version_info.html.template

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
</center>
88

99
</div>
10-

Diff for: mk/platform.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Create variables HOST_<triple> containing the host part
1313
# of each target triple. For example, the triple i686-darwin-macos
14-
# would create a variable HOST_i686-darwin-macos with the value
14+
# would create a variable HOST_i686-darwin-macos with the value
1515
# i386.
1616
define DEF_HOST_VAR
1717
HOST_$(1) = $(subst i686,i386,$(word 1,$(subst -, ,$(1))))
@@ -276,8 +276,8 @@ CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -march=i686
276276
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
277277
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g
278278
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
279-
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
280-
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
279+
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
280+
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
281281
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
282282
CFG_INSTALL_NAME_i686-pc-mingw32 =
283283
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi

Diff for: mk/rt.mk

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# This is a procedure to define the targets for building
2-
# the runtime.
2+
# the runtime.
33
#
44
# Argument 1 is the target triple.
55
#
66
# This is not really the right place to explain this, but
77
# for those of you who are not Makefile gurus, let me briefly
8-
# cover the $ expansion system in use here, because it
8+
# cover the $ expansion system in use here, because it
99
# confused me for a while! The variable DEF_RUNTIME_TARGETS
1010
# will be defined once and then expanded with different
1111
# values substituted for $(1) each time it is called.
12-
# That resulting text is then eval'd.
12+
# That resulting text is then eval'd.
1313
#
1414
# For most variables, you could use a single $ sign. The result
1515
# is that the substitution would occur when the CALL occurs,
1616
# I believe. The problem is that the automatic variables $< and $@
1717
# need to be expanded-per-rule. Therefore, for those variables at
18-
# least, you need $$< and $$@ in the variable text. This way, after
18+
# least, you need $$< and $$@ in the variable text. This way, after
1919
# the CALL substitution occurs, you will have $< and $@. This text
2020
# will then be evaluated, and all will work as you like.
2121
#
2222
# Reader beware, this explanantion could be wrong, but it seems to
23-
# fit the experimental data (i.e., I was able to get the system
24-
# working under these assumptions).
23+
# fit the experimental data (i.e., I was able to get the system
24+
# working under these assumptions).
2525

2626
# Hack for passing flags into LIBUV, see below.
2727
LIBUV_FLAGS_i386 = -m32 -fPIC

Diff for: mk/stage0.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)): \
77
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS)
88
@$(call E, fetch: $@)
99
# Note: the variable "SNAPSHOT_FILE" is generally not set, and so
10-
# we generally only pass one argument to this script.
10+
# we generally only pass one argument to this script.
1111
ifdef CFG_ENABLE_LOCAL_RUST
1212
$(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD_TRIPLE) $(CFG_LOCAL_RUST_ROOT)
13-
else
13+
else
1414
$(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD_TRIPLE) $(SNAPSHOT_FILE)
1515
ifdef CFG_ENABLE_PAX_FLAGS
1616
@$(call E, apply PaX flags: $@)
1717
@"$(CFG_PAXCTL)" -cm "$@"
1818
endif
19-
endif
19+
endif
2020
$(Q)touch $@
2121

2222
# Host libs will be extracted by the above rule

Diff for: mk/tests.mk

+2-3
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ tidy:
179179
$(Q)find $(S)src/etc -name '*.py' \
180180
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
181181
$(Q)echo $(ALL_CS) \
182-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
182+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
183183
$(Q)echo $(ALL_HS) \
184-
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
184+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
185185

186186
endif
187187

@@ -709,4 +709,3 @@ endef
709709

710710
$(foreach host,$(CFG_HOST_TRIPLES), \
711711
$(eval $(call DEF_CHECK_FAST_FOR_H,$(host))))
712-

Diff for: src/etc/check-links.pl

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@
99
my $i = 0;
1010
foreach $line (@lines) {
1111
$i++;
12-
if ($line =~ m/id="([^"]+)"/) {
12+
if ($line =~ m/id="([^"]+)"/) {
1313
$anchors->{$1} = $i;
1414
}
1515
}
1616

1717
$i = 0;
1818
foreach $line (@lines) {
1919
$i++;
20-
while ($line =~ m/href="#([^"]+)"/g) {
20+
while ($line =~ m/href="#([^"]+)"/g) {
2121
if (! exists($anchors->{$1})) {
2222
print "$file:$i: $1 referenced\n";
2323
}
2424
}
2525
}
26-

Diff for: src/etc/gedit/readme.txt

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ Instructions for Ubuntu Linux 12.04+
88
2) Copy the included "share" folder into "~/.local/"
99

1010
3) Open a shell in "~/.local/share/" and run "update-mime-database mime"
11-

Diff for: src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

+2-3
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@
123123
<keyword>mode_t</keyword>
124124
<keyword>ssize_t</keyword>
125125
</context>
126-
126+
127127
<context id="self" style-ref="identifier">
128128
<keyword>self</keyword>
129129
</context>
130-
130+
131131
<context id="constants" style-ref="constant">
132132
<keyword>true</keyword>
133133
<keyword>false</keyword>
@@ -261,4 +261,3 @@
261261
</definitions>
262262

263263
</language>
264-

Diff for: src/etc/gedit/share/mime/packages/rust.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<mime-type type="text/x-rust">
33
<comment>Rust Source</comment>
44
<glob pattern="*.rs"/>
5-
<glob pattern="*.rc"/>
5+
<glob pattern="*.rc"/>
66
</mime-type>
77
</mime-info>

Diff for: src/etc/indenter

-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ while (<>) {
1414
$indent -= 1;
1515
}
1616
}
17-

Diff for: src/etc/latest-unix-snaps.py

-2
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,3 @@ def download_new_file (date, rev, platform, hsh):
5252
for ff in newestSet["files"]:
5353
download_new_file (newestSet["date"], newestSet["rev"],
5454
ff["platform"], ff["hash"])
55-
56-

Diff for: src/etc/libc.c

-1
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,3 @@ int main() {
243243
extra_consts();
244244
printf("}\n");
245245
}
246-

Diff for: src/etc/licenseck.py

-1
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,3 @@ def check_license(name, contents):
9696
return True
9797

9898
return False
99-

Diff for: src/etc/local_stage0.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/sh
22

3-
TARG_DIR=$1
3+
TARG_DIR=$1
44
PREFIX=$2
55

66
BINDIR=bin
77
LIBDIR=lib
88

99
OS=`uname -s`
10-
case $OS in
10+
case $OS in
1111
("Linux"|"FreeBSD")
1212
BIN_SUF=
1313
LIB_SUF=.so

Diff for: src/etc/mirror-all-snapshots.py

-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,3 @@
3333
print("got download with ok hash")
3434
else:
3535
raise Exception("bad hash on download")
36-
37-
38-

Diff for: src/etc/monodebug.pl

-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@
7777
}
7878
print "\n";
7979
}
80-

Diff for: src/etc/sugarise-doc-comments.py

-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ def sugarise_file(path):
8080
for (dirpath, dirnames, filenames) in os.walk('.'):
8181
for name in fnmatch.filter(filenames, '*.r[sc]'):
8282
sugarise_file(os.path.join(dirpath, name))
83-

Diff for: src/etc/tidy.py

-1
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@ def do_license_check(name, contents):
8181

8282

8383
sys.exit(err)
84-

Diff for: src/etc/x86.supp

+2-2
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
...
367367
}
368368

369-
{
369+
{
370370
llvm-user-new-leak
371371
Memcheck:Leak
372372
fun:_Znwj
@@ -401,7 +401,7 @@
401401
Helgrind:Race
402402
fun:_ZN15lock_and_signal27lock_held_by_current_threadEv
403403
...
404-
}
404+
}
405405

406406
{
407407
lock_and_signal-probably-threadsafe-access-outside-of-lock2

Diff for: src/libcore/cleanup.rs

-1
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,3 @@ pub mod rustrt {
226226
pub unsafe fn rust_get_task() -> *c_void;
227227
}
228228
}
229-

Diff for: src/libcore/logging.rs

-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,3 @@ pub fn log_type<T>(level: u32, object: &T) {
5959
rustrt::rust_log_str(level, transmute(vec::raw::to_ptr(bytes)), len);
6060
}
6161
}
62-

Diff for: src/libcore/owned.rs

-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,3 @@ impl<T:Ord> Ord for ~T {
3131
#[inline(always)]
3232
fn gt(&self, other: &~T) -> bool { *(*self) > *(*other) }
3333
}
34-

Diff for: src/libcore/rt/context.rs

-1
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,3 @@ pub fn mut_offset<T>(ptr: *mut T, count: int) -> *mut T {
207207
use core::sys::size_of;
208208
(ptr as int + count * (size_of::<T>() as int)) as *mut T
209209
}
210-

Diff for: src/libcore/rt/io/comm_adapters.rs

-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ impl<W: Writer> WriterChan<W> {
5656
impl<W: Writer> GenericChan<~[u8]> for WriterChan<W> {
5757
fn send(&self, _x: ~[u8]) { fail!() }
5858
}
59-

Diff for: src/libcore/rt/io/net/ip.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ pub enum IpAddr {
1212
Ipv4(u8, u8, u8, u8, u16),
1313
Ipv6
1414
}
15-

Diff for: src/libcore/rt/io/net/udp.rs

-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ impl UdpListener {
4747
impl Listener<UdpStream> for UdpListener {
4848
fn accept(&mut self) -> Option<UdpStream> { fail!() }
4949
}
50-

Diff for: src/libcore/rt/io/net/unix.rs

-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ impl UnixListener {
4747
impl Listener<UnixStream> for UnixListener {
4848
fn accept(&mut self) -> Option<UnixStream> { fail!() }
4949
}
50-

Diff for: src/libcore/rt/local_heap.rs

-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,3 @@ extern {
7878
size: size_t) -> *OpaqueBox;
7979
fn rust_boxed_region_free(region: *BoxedRegion, box: *OpaqueBox);
8080
}
81-

Diff for: src/libcore/rt/sched/local_sched.rs

-1
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,3 @@ fn borrow_smoke_test() {
143143
}
144144
let _scheduler = take();
145145
}
146-

Diff for: src/libcore/stackwalk.rs

-1
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,3 @@ pub mod rusti {
9999
pub fn frame_address(+f: &once fn(x: *u8));
100100
}
101101
}
102-

Diff for: src/libcore/unicode.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2642,4 +2642,3 @@ pub mod derived_property {
26422642
bsearch_range_table(c, XID_Start_table)
26432643
}
26442644
}
2645-

Diff for: src/libcore/unstable/exchange_alloc.rs

-1
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@ extern {
8181
#[rust_stack]
8282
fn rust_get_exchange_count_ptr() -> *mut int;
8383
}
84-

Diff for: src/libcore/unstable/weak_task.rs

-1
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,3 @@ fn test_select_stream_and_oneshot() {
205205
chan.send(());
206206
waitport.recv();
207207
}
208-

Diff for: src/librustc/metadata/common.rs

-1
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,3 @@ pub struct LinkMeta {
169169
vers: @str,
170170
extras_hash: @str
171171
}
172-

0 commit comments

Comments
 (0)