spaces->tabs
parent
8354207c75
commit
e3eaeeec66
|
@ -29,8 +29,7 @@ fn exists(path: String) -> Result<(), String>
|
||||||
|
|
||||||
fn each_value<F>(opt: &clap::ArgMatches<'_>,
|
fn each_value<F>(opt: &clap::ArgMatches<'_>,
|
||||||
name: &str,
|
name: &str,
|
||||||
mut f: F)
|
mut f: F) -> ResultS<()>
|
||||||
-> ResultS<()>
|
|
||||||
where F: FnMut(&str) -> ResultS<()>
|
where F: FnMut(&str) -> ResultS<()>
|
||||||
{
|
{
|
||||||
if let Some(values) = opt.values_of(name) {
|
if let Some(values) = opt.values_of(name) {
|
||||||
|
@ -107,7 +106,6 @@ fn main() -> ResultS<()>
|
||||||
|
|
||||||
write!(&mut std::fs::File::create("dicks.txt").unwrap(), "{:#?}", ed);
|
write!(&mut std::fs::File::create("dicks.txt").unwrap(), "{:#?}", ed);
|
||||||
|
|
||||||
/*
|
|
||||||
use clap::clap_app;
|
use clap::clap_app;
|
||||||
|
|
||||||
let sub_data = clap_app! {
|
let sub_data = clap_app! {
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub fn read(mut im: Image8,
|
||||||
for _ in 0..im.w() {
|
for _ in 0..im.w() {
|
||||||
let idx = usize::from(b[p]);
|
let idx = usize::from(b[p]);
|
||||||
|
|
||||||
im.cr.push(ok!(clut.get(idx), "invalid index")?.clone());
|
im.cr.push(ok!(clut.get(idx), "bad index")?.clone());
|
||||||
|
|
||||||
p += 1;
|
p += 1;
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,7 @@ pub fn read(mut im: Image8,
|
||||||
p += pp;
|
p += pp;
|
||||||
|
|
||||||
for &idx in &d {
|
for &idx in &d {
|
||||||
im.cr
|
im.cr.push(ok!(clut.get(usize::from(idx)), "bad index")?.clone());
|
||||||
.push(ok!(clut.get(usize::from(idx)), "invalid index")?.clone());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ pub fn skip_apple_single<R>(fp: &mut R) -> bool
|
||||||
|
|
||||||
/// Skips over a Mac Binary II header. Returns true if one was found.
|
/// Skips over a Mac Binary II header. Returns true if one was found.
|
||||||
pub fn skip_macbin<R>(fp: &mut R) -> bool
|
pub fn skip_macbin<R>(fp: &mut R) -> bool
|
||||||
where R: Read + Seek
|
where R: Read + Seek
|
||||||
{
|
{
|
||||||
let mut fp = SeekBackToStart::new(fp);
|
let mut fp = SeekBackToStart::new(fp);
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ pub fn skip_macbin<R>(fp: &mut R) -> bool
|
||||||
/// from the start of the header to the resource fork (if one is found.) Returns
|
/// from the start of the header to the resource fork (if one is found.) Returns
|
||||||
/// true if either one was found.
|
/// true if either one was found.
|
||||||
pub fn skip_mac_header<R>(fp: &mut R) -> bool
|
pub fn skip_mac_header<R>(fp: &mut R) -> bool
|
||||||
where R: Read + Seek
|
where R: Read + Seek
|
||||||
{
|
{
|
||||||
if skip_macbin(fp) {
|
if skip_macbin(fp) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -393,6 +393,6 @@ const OLD_LIGHT_DEFINITIONS: [Light; 8] = [
|
||||||
val_nrm: Fixed::from_int(0),
|
val_nrm: Fixed::from_int(0),
|
||||||
val_dta: Fixed::from_int(0)},
|
val_dta: Fixed::from_int(0)},
|
||||||
tag: 0},
|
tag: 0},
|
||||||
];
|
];
|
||||||
|
|
||||||
// EOF
|
// EOF
|
||||||
|
|
Loading…
Reference in New Issue