Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
wrapprint.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "SysDefs.h"
#include "general.h"

Go to the source code of this file.

Functions

BOOL blWrapString (char *in, char *out, int maxlen)
 
BOOL blWrapPrint (FILE *out, char *string)
 

Detailed Description

Version
V1.2
Date
07.07.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Usage:

Revision History:

Definition in file wrapprint.c.

Function Documentation

BOOL blWrapPrint ( FILE *  out,
char *  string 
)
Parameters
[in]*outOutput file pointer
[in]*stringString to be printed
Returns
OK?

Wraps a string with double inverted commas if it contains spaces and escapes any contained double inverted commas with a backslash. Allocates memory for temporary storage of the wrapped string. Returns FALSE if this memory allocation failed.

  • 30.05.02 Original By: ACRM
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 204 of file wrapprint.c.

BOOL blWrapString ( char *  in,
char *  out,
int  maxlen 
)
Parameters
[in]*inInput string
[in]maxlenMax length of output string
[out]*outOutput wrapped string
Returns
Output string was long enough

Wraps a string with double inverted commas if it contains spaces and escapes any contained double inverted commas with a backslash. If the output string wasn't big enough, then the routine just returns FALSE without copying anything into the output string.

  • 30.05.02 Original By: ACRM
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 104 of file wrapprint.c.