Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
serial_close.c File Reference

Implements OP_SERIAL_CLOSE to close an open serial port. More...

Go to the source code of this file.

Functions

 free_value (fdv)
 push_value (vm, make_int(ok))

Variables

case OP_SERIAL_CLOSE
int ok = 0
 break

Detailed Description

Implements OP_SERIAL_CLOSE to close an open serial port.

Behavior:

  • Pops fd (int); attempts to close it; pushes 1 on success, 0 on failure.
  • Only supported on UNIX-like systems.

Errors:

  • If argument type is wrong, prints an error and returns 0.

Definition in file serial_close.c.

Function Documentation

◆ free_value()

free_value(fdv)

◆ push_value()

push_value(vm,
make_int(ok) )

Variable Documentation

◆ break

break

Definition at line 40 of file serial_close.c.

◆ ok

int ok = 0

Definition at line 29 of file serial_close.c.

◆ OP_SERIAL_CLOSE

case OP_SERIAL_CLOSE

Definition at line 26 of file serial_close.c.