Skip to content

Commit

Permalink
add gitattributes and fix whitespace issues
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed May 4, 2013
1 parent bfd3cd8 commit 86efd97
Show file tree
Hide file tree
Showing 433 changed files with 196 additions and 597 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4

* text=auto
*.cpp rust
*.h rust
*.rs rust
src/rt/msvc/* -whitespace
src/rt/vg/* -whitespace
src/rt/linenoise/* -whitespace
1 change: 0 additions & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,3 @@ their own copyright notices and license terms:
has chosen for the collective work, enumerated at the top
of this file. The only difference is the retention of
copyright itself, held by the contributor.

6 changes: 3 additions & 3 deletions RELEASES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Version 0.3 (July 2012)
* Slices and fixed-size, interior-allocated vectors
* #!-comments for lang versioning, shell execution
* Destructors and iface implementation for classes;
type-parameterized classes and class methods
type-parameterized classes and class methods
* 'const' type kind for types that can be used to implement
shared-memory concurrency patterns

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

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

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

* Tool improvements
* Cargo automatically resolves dependencies
Expand Down
6 changes: 3 additions & 3 deletions doc/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The markdown docs are only generated by make when node is installed (use
`make doc`). If you don't have node installed you can generate them yourself.
Unfortunately there's no real standard for markdown and all the tools work
`make doc`). If you don't have node installed you can generate them yourself.
Unfortunately there's no real standard for markdown and all the tools work
differently. pandoc is one that seems to work well.

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

A nice quick reference (for non-pandoc markdown) is at:
http://kramdown.rubyforge.org/quickref.html
http://kramdown.rubyforge.org/quickref.html
1 change: 0 additions & 1 deletion doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -3351,4 +3351,3 @@ Additional specific influences can be seen from the following languages:
* The typeclass system of Haskell.
* The lexical identifier rule of Python.
* The block syntax of Ruby.

1 change: 0 additions & 1 deletion doc/tutorial-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,4 +402,3 @@ tricky. Invoking the `log_syntax!` macro can help elucidate intermediate
states, invoking `trace_macros!(true)` will automatically print those
intermediate states out, and passing the flag `--pretty expanded` as a
command-line argument to the compiler will show the result of expansion.

1 change: 0 additions & 1 deletion doc/tutorial-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,4 +511,3 @@ The parent task first calls `DuplexStream` to create a pair of bidirectional
endpoints. It then uses `task::spawn` to create the child task, which captures
one end of the communication channel. As a result, both parent and child can
send and receive data to and from the other.

8 changes: 4 additions & 4 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1006,9 +1006,9 @@ let mut d = @mut 5; // mutable variable, mutable box
d = @mut 15;
~~~~

A mutable variable and an immutable variable can refer to the same box, given
that their types are compatible. Mutability of a box is a property of its type,
however, so for example a mutable handle to an immutable box cannot be
A mutable variable and an immutable variable can refer to the same box, given
that their types are compatible. Mutability of a box is a property of its type,
however, so for example a mutable handle to an immutable box cannot be
assigned a reference to a mutable box.

~~~~
Expand Down Expand Up @@ -1041,7 +1041,7 @@ let y = x.clone(); // y is a newly allocated box
let z = x; // no new memory allocated, x can no longer be used
~~~~

Since in owned boxes mutability is a property of the owner, not the
Since in owned boxes mutability is a property of the owner, not the
box, mutable boxes may become immutable when they are moved, and vice-versa.

~~~~
Expand Down
1 change: 0 additions & 1 deletion doc/version_info.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
</center>

</div>

6 changes: 3 additions & 3 deletions mk/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Create variables HOST_<triple> containing the host part
# of each target triple. For example, the triple i686-darwin-macos
# would create a variable HOST_i686-darwin-macos with the value
# would create a variable HOST_i686-darwin-macos with the value
# i386.
define DEF_HOST_VAR
HOST_$(1) = $(subst i686,i386,$(word 1,$(subst -, ,$(1))))
Expand Down Expand Up @@ -276,8 +276,8 @@ CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -march=i686
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
CFG_DEF_SUFFIX_i686-pc-mingw32 := .mingw32.def
CFG_INSTALL_NAME_i686-pc-mingw32 =
CFG_LIBUV_LINK_FLAGS_i686-pc-mingw32 := -lWs2_32 -lpsapi -liphlpapi
Expand Down
12 changes: 6 additions & 6 deletions mk/rt.mk
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# This is a procedure to define the targets for building
# the runtime.
# the runtime.
#
# Argument 1 is the target triple.
#
# This is not really the right place to explain this, but
# for those of you who are not Makefile gurus, let me briefly
# cover the $ expansion system in use here, because it
# cover the $ expansion system in use here, because it
# confused me for a while! The variable DEF_RUNTIME_TARGETS
# will be defined once and then expanded with different
# values substituted for $(1) each time it is called.
# That resulting text is then eval'd.
# That resulting text is then eval'd.
#
# For most variables, you could use a single $ sign. The result
# is that the substitution would occur when the CALL occurs,
# I believe. The problem is that the automatic variables $< and $@
# need to be expanded-per-rule. Therefore, for those variables at
# least, you need $$< and $$@ in the variable text. This way, after
# least, you need $$< and $$@ in the variable text. This way, after
# the CALL substitution occurs, you will have $< and $@. This text
# will then be evaluated, and all will work as you like.
#
# Reader beware, this explanantion could be wrong, but it seems to
# fit the experimental data (i.e., I was able to get the system
# working under these assumptions).
# fit the experimental data (i.e., I was able to get the system
# working under these assumptions).

# Hack for passing flags into LIBUV, see below.
LIBUV_FLAGS_i386 = -m32 -fPIC
Expand Down
6 changes: 3 additions & 3 deletions mk/stage0.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE)): \
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS)
@$(call E, fetch: $@)
# Note: the variable "SNAPSHOT_FILE" is generally not set, and so
# we generally only pass one argument to this script.
# we generally only pass one argument to this script.
ifdef CFG_ENABLE_LOCAL_RUST
$(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD_TRIPLE) $(CFG_LOCAL_RUST_ROOT)
else
else
$(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD_TRIPLE) $(SNAPSHOT_FILE)
ifdef CFG_ENABLE_PAX_FLAGS
@$(call E, apply PaX flags: $@)
@"$(CFG_PAXCTL)" -cm "$@"
endif
endif
endif
$(Q)touch $@

# Host libs will be extracted by the above rule
Expand Down
5 changes: 2 additions & 3 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ tidy:
$(Q)find $(S)src/etc -name '*.py' \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)echo $(ALL_CS) \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)echo $(ALL_HS) \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py

endif

Expand Down Expand Up @@ -709,4 +709,3 @@ endef

$(foreach host,$(CFG_HOST_TRIPLES), \
$(eval $(call DEF_CHECK_FAST_FOR_H,$(host))))

5 changes: 2 additions & 3 deletions src/etc/check-links.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@
my $i = 0;
foreach $line (@lines) {
$i++;
if ($line =~ m/id="([^"]+)"/) {
if ($line =~ m/id="([^"]+)"/) {
$anchors->{$1} = $i;
}
}

$i = 0;
foreach $line (@lines) {
$i++;
while ($line =~ m/href="#([^"]+)"/g) {
while ($line =~ m/href="#([^"]+)"/g) {
if (! exists($anchors->{$1})) {
print "$file:$i: $1 referenced\n";
}
}
}

1 change: 0 additions & 1 deletion src/etc/gedit/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ Instructions for Ubuntu Linux 12.04+
2) Copy the included "share" folder into "~/.local/"

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

Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@
<keyword>mode_t</keyword>
<keyword>ssize_t</keyword>
</context>

<context id="self" style-ref="identifier">
<keyword>self</keyword>
</context>

<context id="constants" style-ref="constant">
<keyword>true</keyword>
<keyword>false</keyword>
Expand Down Expand Up @@ -261,4 +261,3 @@
</definitions>

</language>

2 changes: 1 addition & 1 deletion src/etc/gedit/share/mime/packages/rust.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<mime-type type="text/x-rust">
<comment>Rust Source</comment>
<glob pattern="*.rs"/>
<glob pattern="*.rc"/>
<glob pattern="*.rc"/>
</mime-type>
</mime-info>
1 change: 0 additions & 1 deletion src/etc/indenter
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ while (<>) {
$indent -= 1;
}
}

2 changes: 0 additions & 2 deletions src/etc/latest-unix-snaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ def download_new_file (date, rev, platform, hsh):
for ff in newestSet["files"]:
download_new_file (newestSet["date"], newestSet["rev"],
ff["platform"], ff["hash"])


1 change: 0 additions & 1 deletion src/etc/libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,3 @@ int main() {
extra_consts();
printf("}\n");
}

1 change: 0 additions & 1 deletion src/etc/licenseck.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,3 @@ def check_license(name, contents):
return True

return False

4 changes: 2 additions & 2 deletions src/etc/local_stage0.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh

TARG_DIR=$1
TARG_DIR=$1
PREFIX=$2

BINDIR=bin
LIBDIR=lib

OS=`uname -s`
case $OS in
case $OS in
("Linux"|"FreeBSD")
BIN_SUF=
LIB_SUF=.so
Expand Down
3 changes: 0 additions & 3 deletions src/etc/mirror-all-snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@
print("got download with ok hash")
else:
raise Exception("bad hash on download")



1 change: 0 additions & 1 deletion src/etc/monodebug.pl
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,3 @@
}
print "\n";
}

1 change: 0 additions & 1 deletion src/etc/sugarise-doc-comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ def sugarise_file(path):
for (dirpath, dirnames, filenames) in os.walk('.'):
for name in fnmatch.filter(filenames, '*.r[sc]'):
sugarise_file(os.path.join(dirpath, name))

1 change: 0 additions & 1 deletion src/etc/tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ def do_license_check(name, contents):


sys.exit(err)

4 changes: 2 additions & 2 deletions src/etc/x86.supp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
...
}

{
{
llvm-user-new-leak
Memcheck:Leak
fun:_Znwj
Expand Down Expand Up @@ -401,7 +401,7 @@
Helgrind:Race
fun:_ZN15lock_and_signal27lock_held_by_current_threadEv
...
}
}

{
lock_and_signal-probably-threadsafe-access-outside-of-lock2
Expand Down
1 change: 0 additions & 1 deletion src/libcore/cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,3 @@ pub mod rustrt {
pub unsafe fn rust_get_task() -> *c_void;
}
}

1 change: 0 additions & 1 deletion src/libcore/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ pub fn log_type<T>(level: u32, object: &T) {
rustrt::rust_log_str(level, transmute(vec::raw::to_ptr(bytes)), len);
}
}

1 change: 0 additions & 1 deletion src/libcore/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ impl<T:Ord> Ord for ~T {
#[inline(always)]
fn gt(&self, other: &~T) -> bool { *(*self) > *(*other) }
}

1 change: 0 additions & 1 deletion src/libcore/rt/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,3 @@ pub fn mut_offset<T>(ptr: *mut T, count: int) -> *mut T {
use core::sys::size_of;
(ptr as int + count * (size_of::<T>() as int)) as *mut T
}

1 change: 0 additions & 1 deletion src/libcore/rt/io/comm_adapters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ impl<W: Writer> WriterChan<W> {
impl<W: Writer> GenericChan<~[u8]> for WriterChan<W> {
fn send(&self, _x: ~[u8]) { fail!() }
}

1 change: 0 additions & 1 deletion src/libcore/rt/io/net/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ pub enum IpAddr {
Ipv4(u8, u8, u8, u8, u16),
Ipv6
}

1 change: 0 additions & 1 deletion src/libcore/rt/io/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ impl UdpListener {
impl Listener<UdpStream> for UdpListener {
fn accept(&mut self) -> Option<UdpStream> { fail!() }
}

1 change: 0 additions & 1 deletion src/libcore/rt/io/net/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ impl UnixListener {
impl Listener<UnixStream> for UnixListener {
fn accept(&mut self) -> Option<UnixStream> { fail!() }
}

1 change: 0 additions & 1 deletion src/libcore/rt/local_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ extern {
size: size_t) -> *OpaqueBox;
fn rust_boxed_region_free(region: *BoxedRegion, box: *OpaqueBox);
}

1 change: 0 additions & 1 deletion src/libcore/rt/sched/local_sched.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,3 @@ fn borrow_smoke_test() {
}
let _scheduler = take();
}

1 change: 0 additions & 1 deletion src/libcore/stackwalk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@ pub mod rusti {
pub fn frame_address(+f: &once fn(x: *u8));
}
}

1 change: 0 additions & 1 deletion src/libcore/unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2642,4 +2642,3 @@ pub mod derived_property {
bsearch_range_table(c, XID_Start_table)
}
}

1 change: 0 additions & 1 deletion src/libcore/unstable/exchange_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ extern {
#[rust_stack]
fn rust_get_exchange_count_ptr() -> *mut int;
}

1 change: 0 additions & 1 deletion src/libcore/unstable/weak_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,3 @@ fn test_select_stream_and_oneshot() {
chan.send(());
waitport.recv();
}

1 change: 0 additions & 1 deletion src/librustc/metadata/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,3 @@ pub struct LinkMeta {
vers: @str,
extras_hash: @str
}

Loading

0 comments on commit 86efd97

Please sign in to comment.