Subject: strformat() ?
To: None <>
From: Manuel Bouyer <>
List: tech-kern
Date: 09/09/1999 18:06:04
Before adding other formats to the corename stuff I wonder if it's worth
implemeting a generic function for this. Something like:
strformat(char *dst, size_t dstlen, const char *template, const char *format,
A sample call would be here:
strformat(name, MAXPATHLEN, curproc->p_limit->pl_corename, "nup",
    "%s", curproc->p_comm,
    "%s", curproc->p_pgrp->pg_session->s_login,    
    "%d", curproc->p_pid);
That is, for each format we provide the snprintf format to convert the value,
and the value.
Would this be of general interest ?

Manuel Bouyer, LIP6, Universite Paris VI.