Main Page   File List   File Members  

tex_utils.h File Reference

A collection of utilities for creating TeX files out of problem reports. More...

#include <glib.h>
#include <libpq-fe.h>

Go to the source code of this file.

Defines

#define __BEGIN_DECLS
#define __END_DECLS
#define __P(protos)   protos

Functions

void fix_tex_string (GString *str)
 Fix the string for use with TeX. More...

GString * create_main_sql_str (GList *list)
 Create a SQL string to fetch problem reports to print. More...

gboolean write_tex_audit_trail (FILE *fp, PGconn *conn, gint pk_num)
 Write the audit trail for the current problem report. More...

gboolean write_tex_file (FILE *fp, PGconn *conn, PGresult *res)
 Take the results of a problem report query, and create a TeX file. More...


Detailed Description

A collection of utilities for creating TeX files out of problem reports.

The functions contained here facilitate the creation of TeX files from collections of problem reports. The actual mechanics of feeding the TeX files to whatever filters will be used to process them is best left to the specific UI implementations.

Author:
Kenneth W. Sodemann (stuffle@charter.net)
Revision:
1.4
Date:
2002/01/30 00:40:02


Function Documentation

create_main_sql_str GList *    list
 

Create a SQL string to fetch problem reports to print.

Create a SQL string that will fetch the problem report information for the problem report numbers in the list. The resulting query will work with write_tex_file().

Parameters:
list  A linked list of problem report numbers for the problem reports to be printed.
Returns:
The SQL string that will fetch the neccessary information for the requested problem reports.
Return values:
NULL  The list is empty.
non-NULL  SQL string successfully created.

fix_tex_string GString *    str
 

Fix the string for use with TeX.

Take the string, and fix it so it will be acceptable to TeX. Escape any characters that need to be escaped in order to print. Double up any '
' characters. Make sure the string will print out.

Parameters:
str  The string that needs to be prepared for output to a TeX file.

write_tex_audit_trail FILE *    fp,
PGconn *    conn,
gint    pk_num
 

Write the audit trail for the current problem report.

Fetch the audit trail information for the requested problem report. Format the information for output to a TeX file. Output the information to the requested file.

Parameters:
fp  Pointer to the TeX file to output the formatted audit trail to.
conn  Pointer to the database connection.
pk_num  The problem report number to fetch the audit trail for.
Return values:
TRUE  It worked.
FALSE  Internal error. Check the syslog for messages, and contact the library maintainer.

write_tex_file FILE *    fp,
PGconn *    conn,
PGresult *    res
 

Take the results of a problem report query, and create a TeX file.

The function works well with the SQL query created by create_main_sql_str(). However, the caller can use any query as long as the data in the 'select' clause is in the following order:

  1. Problem Report Number
  2. Problem Report Title
  3. Problem Report Description
  4. Problem Report Fix Description
  5. Project Name
  6. Submitter Name
  7. Assignee Name (Responsible)
  8. Problem Type Name
  9. Severity Name
 10. Status Name
 
Parameters:
fp  Pointer to the TeX file to output the formatted audit trail to.
conn  Pointer to the database connection.
res  Query results to output. Make sure the items in the 'select' clause are as documented in the description.
Return values:
TRUE  It worked.
FALSE  Internal error. Check the syslog for messages, and contact the library maintainer.


Generated on Sun Oct 20 18:15:10 2002 for libPRepS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002