pub fn process(
        &mut self,
        io: &mut IoStack,
        events: &mut dyn IoEventBackend,
        status: &mut dyn StatusBackend,
        format_file_name: &str,
        input_file_name: &str,
        unstables: &UnstableOptions,
    ) -> Result<TexResult> {
        let _guard = super::ENGINE_LOCK.lock().unwrap(); // until we're thread-safe ...

        let /*mut*/ state = ExecutionState::new(io, events, status);
        let bridge = TectonicBridgeApi::new(&state);

        // initialize globals

        let v = if unstables.shell_escape { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("shell_escape_enabled", v);
        }

        let mut halt_on_error = self.halt_on_error;
        if unstables.continue_on_errors {
            halt_on_error = false; // command-line override
        }
        let v = if halt_on_error { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("halt_on_error_p", v);
        }

        let v = if self.initex_mode { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("in_initex_mode", v);
        }
        let v = if self.synctex_enabled { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("synctex_enabled", v);
        }
        let v = if self.semantic_pagination_enabled {
            1
        } else {
            0
        };
        unsafe {
            super::tt_xetex_set_int_variable("semantic_pagination_enabled", v);
        }

        unsafe {
            match super::tex_simple_main(&*bridge, format_file_name, input_file_name) {
                0 => Ok(TexResult::Spotless),
                1 => Ok(TexResult::Warnings),
                2 => Ok(TexResult::Errors),
                3 => {
                    let msg = super::tt_get_error_message().to_string();
                    Err(ErrorKind::Msg(msg).into())
                }
                x => Err(ErrorKind::Msg(format!(
                    "internal error: unexpected 'history' value {}",
                    x
                ))
                .into()),
            }
        }
    }
// This function can't be generic across the IoProvider trait, for now,
// since the global pointer that stashes the ExecutionState must have a
// complete type.
This function can't be generic across the IoProvider trait, for now,
since the global pointer that stashes the ExecutionState must have a
complete type.
This function can ' t be generic across the IoProvider trait for now since the global pointer that stashes the ExecutionState must have a complete type .
pub fn process(
        &mut self,
        io: &mut IoStack,
        events: &mut dyn IoEventBackend,
        status: &mut dyn StatusBackend,
        format_file_name: &str,
        input_file_name: &str,
        unstables: &UnstableOptions,
    ) -> Result<TexResult> {
        let _guard = super::ENGINE_LOCK.lock().unwrap(); // until we're thread-safe ...
        let /*mut*/ state = ExecutionState::new(io, events, status);
        let bridge = TectonicBridgeApi::new(&state);
        // initialize globals
        let v = if unstables.shell_escape { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("shell_escape_enabled", v);
        }
        let mut halt_on_error = self.halt_on_error;
        if unstables.continue_on_errors {
            halt_on_error = false; // command-line override
        }
        let v = if halt_on_error { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("halt_on_error_p", v);
        }
        let v = if self.initex_mode { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("in_initex_mode", v);
        }
        let v = if self.synctex_enabled { 1 } else { 0 };
        unsafe {
            super::tt_xetex_set_int_variable("synctex_enabled", v);
        }
        let v = if self.semantic_pagination_enabled {
            1
        } else {
            0
        };
        unsafe {
            super::tt_xetex_set_int_variable("semantic_pagination_enabled", v);
        }
        unsafe {
            match super::tex_simple_main(&*bridge, format_file_name, input_file_name) {
                0 => Ok(TexResult::Spotless),
                1 => Ok(TexResult::Warnings),
                2 => Ok(TexResult::Errors),
                3 => {
                    let msg = super::tt_get_error_message().to_string();
                    Err(ErrorKind::Msg(msg).into())
                }
                x => Err(ErrorKind::Msg(format!(
                    "internal error: unexpected 'history' value {}",
                    x
                ))
                .into()),
            }
        }
    }
pub fn process ( & mut self , io : & mut IoStack , events : & mut dyn IoEventBackend , status : & mut dyn StatusBackend , format_file_name : & str , input_file_name : & str , unstables : & UnstableOptions , ) -> Result < TexResult > { let _guard = super :: ENGINE_LOCK . lock ( ) . unwrap ( ) ; // until we're thread-safe ... let /*mut*/ state = ExecutionState :: new ( io , events , status ) ; let bridge = TectonicBridgeApi :: new ( & state ) ; // initialize globals let v = if unstables . shell_escape { 1 } else { 0 } ; unsafe { super :: tt_xetex_set_int_variable ( " " , v ) ; } let mut halt_on_error = self . halt_on_error ; if unstables . continue_on_errors { halt_on_error = false ; // command-line override } let v = if halt_on_error { 1 } else { 0 } ; unsafe { super :: tt_xetex_set_int_variable ( " " , v ) ; } let v = if self . initex_mode { 1 } else { 0 } ; unsafe { super :: tt_xetex_set_int_variable ( " " , v ) ; } let v = if self . synctex_enabled { 1 } else { 0 } ; unsafe { super :: tt_xetex_set_int_variable ( " " , v ) ; } let v = if self . semantic_pagination_enabled { 1 } else { 0 } ; unsafe { super :: tt_xetex_set_int_variable ( " " , v ) ; } unsafe { match super :: tex_simple_main ( & * bridge , format_file_name , input_file_name ) { 0 => Ok ( TexResult :: Spotless ) , 1 => Ok ( TexResult :: Warnings ) , 2 => Ok ( TexResult :: Errors ) , 3 => { let msg = super :: tt_get_error_message ( ) . to_string ( ) ; Err ( ErrorKind :: Msg ( msg ) . into ( ) ) } x => Err ( ErrorKind :: Msg ( format ! ( " " x ) ) . into ( ) ) , } } }
This function can't be generic across the IoProvider trait, for now,
since the global pointer that stashes the ExecutionState must have a
complete type.
This function can ' t be generic across the IoProvider trait for now since the global pointer that stashes the ExecutionState must have a complete type .
&mut self
io
&mut IoStack
events
&mut dyn IoEventBackend
status
&mut dyn StatusBackend
format_file_name
&str
input_file_name
&str
unstables
&UnstableOptions