La función que pides no existe en la librería estandar de C, aunque con un poco de paciencia puedes hacértela tú mismo.
Te paso un ejemplo que te servirá.
/* $Id: main.c.M4, v 1.7 2005/11/07 19:39:53 luis Exp $
* Author: Luis Colorado <
[email protected]>
* Date: Thu Mar 9 11:27:54 CET 2006
*
* Disclaimer:
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#define IN_QUITAESPACIOS_C
/* Standard include files */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* constants */
/* types */
/* prototypes */
/* variables */
static char QUITAESPACIOS_C_RCSId[]="\n$Id: main.c.m4,v 1.7 2005/11/07 19:39:53
luis Exp $\n";
/* functions */
/* Esta es la función que te interesa, como verás, se manejan dos punteros, el primero va recorriendo la cadena original, saltando por encima de los espacios, mientras que el segundo va copiando los caracteres cuando no se trata de espacios */
void quitaespacios(char *s)
{
char *t;
for (t = s; *s; s++) {
if (isspace(*s))
continue;
*t++ = *s;
} /* for */
*t = '\0';
} /* quitaespacios */
/* main program */
int main (int argc, char **argv)
{
char buffer[1024];
while (fgets(buffer, sizeof buffer, stdin)) {
quitaespacios(buffer);
puts(buffer);
} /* while */
} /* main */
/* $Id: main.c.m4,v 1.7 2005/11/07 19:39:53 luis Exp $ */