Register snapshots

This commit is contained in:
Brian Anderson 2013-05-19 19:46:54 -07:00
parent 3a481c0f88
commit 66319b0278
74 changed files with 23 additions and 9843 deletions

View file

@ -254,17 +254,6 @@ impl FileInput {
(line numbers and file names, see documentation for
`FileInputState`). Otherwise identical to `lines_each`.
*/
#[cfg(stage0)]
pub fn each_line_state(&self,
f: &fn(&str, FileInputState) -> bool) {
self.each_line(|line| f(line, copy self.fi.state));
}
/**
Apply `f` to each line successively, along with some state
(line numbers and file names, see documentation for
`FileInputState`). Otherwise identical to `lines_each`.
*/
#[cfg(not(stage0))]
pub fn each_line_state(&self,
f: &fn(&str, FileInputState) -> bool) -> bool {
self.each_line(|line| f(line, copy self.fi.state))
@ -377,17 +366,6 @@ reading from `stdin`).
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(stage0)]
pub fn input(f: &fn(&str) -> bool) {
FileInput::from_args().each_line(f);
}
/**
Iterate directly over the command line arguments (no arguments implies
reading from `stdin`).
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(not(stage0))]
pub fn input(f: &fn(&str) -> bool) -> bool {
let i = FileInput::from_args();
i.each_line(f)
@ -400,18 +378,6 @@ provided at each call.
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(stage0)]
pub fn input_state(f: &fn(&str, FileInputState) -> bool) {
FileInput::from_args().each_line_state(f);
}
/**
Iterate directly over the command line arguments (no arguments
implies reading from `stdin`) with the current state of the iteration
provided at each call.
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(not(stage0))]
pub fn input_state(f: &fn(&str, FileInputState) -> bool) -> bool {
let i = FileInput::from_args();
i.each_line_state(f)
@ -422,16 +388,6 @@ Iterate over a vector of files (an empty vector implies just `stdin`).
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(stage0)]
pub fn input_vec(files: ~[Option<Path>], f: &fn(&str) -> bool) {
FileInput::from_vec(files).each_line(f);
}
/**
Iterate over a vector of files (an empty vector implies just `stdin`).
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(not(stage0))]
pub fn input_vec(files: ~[Option<Path>], f: &fn(&str) -> bool) -> bool {
let i = FileInput::from_vec(files);
i.each_line(f)
@ -443,18 +399,6 @@ with the current state of the iteration provided at each call.
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(stage0)]
pub fn input_vec_state(files: ~[Option<Path>],
f: &fn(&str, FileInputState) -> bool) {
FileInput::from_vec(files).each_line_state(f);
}
/**
Iterate over a vector of files (an empty vector implies just `stdin`)
with the current state of the iteration provided at each call.
Fails when attempting to read from a file that can't be opened.
*/
#[cfg(not(stage0))]
pub fn input_vec_state(files: ~[Option<Path>],
f: &fn(&str, FileInputState) -> bool) -> bool {
let i = FileInput::from_vec(files);