Main Page | Class List | Directories | File List | Class Members | File Members

texoutput.h File Reference

LaTeX output. More...

#include "semaphore.h"
#include "preview.h"
#include "fitsoutput.h"

Go to the source code of this file.

Defines

#define _texoutput_h   1

Enumerations

enum  texoutput_ops {
  texoutput_op_del, texoutput_op_edit, texoutput_op_nop, texoutput_op_imstat,
  texoutput_op_comment, texoutput_op_dap, texoutput_op_print, texoutput_op_time,
  texoutput_op_edit_vigilance
}

Functions

void texoutput_add_imstat (struct image_statistics_struct)
 executes the "add image statistics" operation
void texoutput_init ()
 (constructor) intializes the texoutput system
void texoutput_delete ()
 deletes the tex file
void texoutput_view ()
 displays the compiled version of the tex file
void texoutput_compile ()
 compiles the tex file
void texoutput_background_handler ()
 called by a timer.
void texoutput_add_comment (char *comment)
 adds a comment
void texoutput_queue_comment (char *comment)
 queues the "add comment" operation
void texoutput_queue_dap (struct dap_struct dap)
 queues the "add data associated parameters" operation
void texoutput_queue_print (int n)
 queues the "print file" operation
void texoutput_queue_delete ()
 queues the "delete file" operation
void texoutput_view_backup ()
 displays the compiled version of the backup tex file
void texoutput_add_dap (struct dap_struct dap)
 adds the data associated parameters to the logfile
void texoutput_print (int n)
 prints the tex file
void texoutput_push_item (struct texoutput_struct input)
 queues a new request into the texoutput queue.
int texoutput_pop_item (struct texoutput_struct *dummy)
 pops an texoutput request from the texoutput queue.
void texoutput_add_time ()
 adds a timestamp to the logfile
void ui_texoutput_ready_for_edit (char *dummy)
 called by texout.c whenever the texfile is ready to be edited.
void ui_texoutput_appended (char *dummy)
 called by texout.c whenever something has been appended to the texfile.

Variables

sem_t texoutput_sem
char texoutput_path [1000]
char texoutput_compile_command [1000]
char texoutput_compile_backup_command [1000]
char texoutput_viewer_command [1000]
char texoutput_editor_command [1000]
char texoutput_print_command [1000]


Detailed Description

LaTeX output.

Copyright (C) 2001-2003 Dirk Huenniger (dhun@astro.uni-bonn.de)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.


Function Documentation

void texoutput_add_comment char *  comment  ) 
 

adds a comment

Parameters:
comment the comment to be added
Returns:
void This function adds a comment

void texoutput_add_dap struct dap_struct  dap  ) 
 

adds the data associated parameters to the logfile

Parameters:
dap a struct containing the data associated parameters
Returns:
void
This function adds the "add data associated parameters (DAP)" operation. DAP means the name of the observer the instrument and the telescope. It was invented at the Effelsberg 100m Radio Telescope and this is why it is important.

void texoutput_add_imstat struct image_statistics_struct  in  ) 
 

executes the "add image statistics" operation

Parameters:
in an image_statistics_struct containing the information to be added
Returns:
void
This function exectues the queues the "add image statistics" operation

void texoutput_add_time  ) 
 

adds a timestamp to the logfile

Returns:
void
This function adds a timestamp to the logfile

void texoutput_background_handler  ) 
 

called by a timer.

Returns:
void
This function is called by a timer. It checks the work queue for new commands and calles the corresponding functions

void texoutput_compile  ) 
 

compiles the tex file

Returns:
void This function compiles the tex file

void texoutput_delete  ) 
 

deletes the tex file

Returns:
void This function deletes the tex file

void texoutput_init  ) 
 

(constructor) intializes the texoutput system

Returns:
void This function intializes the texoutput system

int texoutput_pop_item struct texoutput_struct *  dummy  ) 
 

pops an texoutput request from the texoutput queue.

Parameters:
dummy a pointer to an texoutput_struct in which the poped item will be writen
Returns:
integer 0 on success, -1 on failure
This function pops an texoutput request from the texoutput queue.

void texoutput_print int  n  ) 
 

prints the tex file

Parameters:
n the number of copies
Returns:
void This function prints the tex file

void texoutput_push_item struct texoutput_struct  input  ) 
 

queues a new request into the texoutput queue.

Parameters:
input the request to be queued
Returns:
void
This function queues a new request into the texoutput queue

void texoutput_queue_comment char *  comment  ) 
 

queues the "add comment" operation

Parameters:
comment the comment to be added
Returns:
void
This function queues the "add comment" operation

void texoutput_queue_dap struct dap_struct  dap  ) 
 

queues the "add data associated parameters" operation

Parameters:
dap a struct containing the data associated parameters
Returns:
void
This function queues the "add data associated parameters (DAP)" operation. DAP means the name of the opserver the instrument and the telescope. It was invented at the Effelsberg 100m Radio Telescope and this is why it is important.

void texoutput_queue_delete  ) 
 

queues the "delete file" operation

Returns:
void
This function queues the "delete file" operation

void texoutput_queue_print int  n  ) 
 

queues the "print file" operation

Returns:
void
This function queues the "print file" operation

void texoutput_view  ) 
 

displays the compiled version of the tex file

Returns:
void This function displays the compiled version of the tex file. This is a dvi file

void texoutput_view_backup  ) 
 

displays the compiled version of the backup tex file

Returns:
void This function displays the compiled version of the backup tex file. This is a dvi file

void ui_texoutput_appended char *  data  ) 
 

called by texout.c whenever something has been appended to the texfile.

Parameters:
the sting appended
Returns:
void This function is called by texout.c whenever something has been appended to the texfile. This way a userinterface can send only the appended lines to the client and does not have to transfer the whole file each time something changes.

void ui_texoutput_ready_for_edit char *  filename  ) 
 

called by texout.c whenever the texfile is ready to be edited.

Parameters:
the filename of the texfile
Returns:
void
This function is called by texout.c whenever the texfile is ready to be edited. It is declared as an abstract function in texoutput.h and implemented here. In order to let the user edit the textfile you have to call texoutput_queue_edit_vigilance(). After a while ui_texoutput_ready_for_edit will be called. Now you are allowed to read the texfile, but not to change it. You have to make a copy of it and do your changes there. Than you have to pass this copy this copy to texoutout via texoutput_editing_done(char* filename). This texoutput_editing_done will only acceopt your changes if less then 10 seconds passed since ui_texoutput_ready_for_edit. Or you called texoutput_reset_vigilance_device in intervalls of less that 10 seconds. This rather complex procedure is necessary to allow a client to crash without crashing the whole texoutput facility.


Variable Documentation

char texoutput_compile_backup_command[1000]
 

the command to compile the backup tex file

char texoutput_compile_command[1000]
 

the command to compile the tex file

char texoutput_editor_command[1000]
 

the command to start an editor (for .tex files)

char texoutput_path[1000]
 

the path containg the texfile related files

char texoutput_print_command[1000]
 

a command to print a .ps file

sem_t texoutput_sem
 

semaphore protecting body.tex main.tex main.dvi and main.ps

char texoutput_viewer_command[1000]
 

the command to start the .dvi (compile version of .tex) viewer


Generated on Fri Dec 16 22:23:40 2005 for gboccia by  doxygen 1.4.2