Пример #1
0
Файл: dbg.c Проект: iplusu/sarp
void dbg_add_modes(const char *modes) {
  char env[256];
  char *name;
  
  strncpy(env, modes, sizeof(env));
  for (name = strtok(env,","); name; name = strtok(NULL, ","))
    dbg_add_mode(name);
}
Пример #2
0
/**
 * Cycles through each comma-delimited debugging option and
 * adds it to the debugging modes by calling dbg_add_mode
 */
void dbg_add_modes(const char *modes)
{
        char env[256];
        char *name;

        strncpy(env, modes, sizeof(env));
        /* Maybe it would be good if we did this without strtok, but I'm too lazy */
        for (name = strtok(env, ","); name; name = strtok(NULL, ","))
                dbg_add_mode(name);
}