Ignore:
Timestamp:
Sep 25, 2006, 1:07:16 PM (18 years ago)
Author:
andree
Message:

Add new header mr_string.h for mr_string.c. Use mr_strtok() from
mr_string.c and delete from libmondo-string.c. Add mr_string.c and
mr_string.h to Makefile.am. (Follow-up to r828.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/mr_string.c

    r828 r831  
    1 // New generation of string handling functions
     1/*
     2 * mr_string.c - New generation of string handling functions
     3 */
    24
    3 
    4 // Safe alternative to standard function strok()
     5#include <stdio.h>
     6#include <string.h>
     7 
     8/**
     9 * Safe alternative to standard function strok()
     10 * @param instr
     11 * @param delims
     12 * @param lastpos
     13 * @return @p
     14 * @note this function allocates memory that needs to be freed by caller
     15 **/
    516char *mr_strtok(char *instr, const char *delims, int *lastpos)
    617{
     
    2940
    3041
    31 // Returns the string fed to it 'inptr' with all characters to escape given
    32 // in 'toesc' prepended by escaping character 'escchr'.
    33 // (Prepare strings for use in system() or popen() with this function.)
     42/**
     43 * Returns the string fed to it 'inptr' with all characters to escape given
     44 * in 'toesc' prepended by escaping character 'escchr'.
     45 * (Prepare strings for use in system() or popen() with this function.)
     46 * @param instr
     47 * @param toesc
     48 * @param escchr
     49 * @note this function allocates memory that needs to be freed by caller
     50 **/
    3451char *mr_stresc(char *instr, char *toesc, const char escchr)
    3552{
Note: See TracChangeset for help on using the changeset viewer.