mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 21:24:22 +02:00
newreg: mostly var name changes
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
use std::any::Any;
|
||||
use crate::{ProgramContext, formats::Format};
|
||||
use crate::{AppContext, formats::Format};
|
||||
pub fn format() -> Format {
|
||||
Format { name: "slp", detect_func: is_slp_file, run_func: extract_slp }
|
||||
Format { name: "slp", detector_func: is_slp_file, extractor_func: extract_slp }
|
||||
}
|
||||
|
||||
use std::path::{Path};
|
||||
@@ -52,7 +52,7 @@ struct EntryNew {
|
||||
#[br(count = 12)] _unk2: Vec<u8>,
|
||||
}
|
||||
|
||||
pub fn is_slp_file(app_ctx: &ProgramContext) -> Result<Option<Box<dyn Any>>, Box<dyn std::error::Error>> {
|
||||
pub fn is_slp_file(app_ctx: &AppContext) -> Result<Option<Box<dyn Any>>, Box<dyn std::error::Error>> {
|
||||
let header = common::read_file(app_ctx.file, 0, 4)?;
|
||||
if header == b"SLP\x00" {
|
||||
Ok(Some(Box::new(())))
|
||||
@@ -61,7 +61,7 @@ pub fn is_slp_file(app_ctx: &ProgramContext) -> Result<Option<Box<dyn Any>>, Box
|
||||
}
|
||||
}
|
||||
|
||||
pub fn extract_slp(app_ctx: &ProgramContext, _ctx: Option<Box<dyn Any>>) -> Result<(), Box<dyn std::error::Error>> {
|
||||
pub fn extract_slp(app_ctx: &AppContext, _ctx: Option<Box<dyn Any>>) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut file = app_ctx.file;
|
||||
let header: Header = file.read_le()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user