func_def_t *func_def_struct_del(func_def_t *def) { if(def!=NULL){ def->name=char_del(def->name); free(def); } return NULL; }
static void char_out(GR_CHAR ch) { switch(ch) { case '\r': case '\n': xpos = 0; ypos += height; if(ypos >= TEXTWIN_HEIGHT - height) { ypos -= height; /* FIXME: changing FALSE to TRUE crashes nano-X*/ /* clear screen, no scroll*/ ypos = 0; GrClearWindow(wt, GR_FALSE); } return; case '\007': /* bel*/ return; case '\t': xpos += width; while((xpos/width) & 7) char_out(' '); return; case '\b': /* assumes fixed width font!!*/ if (xpos <= 0) return; char_del(xpos, ypos); char_out(' '); char_del(xpos, ypos); return; } GrText(wt, gct, xpos+1, ypos, &ch, 1, GR_TFTOP); xpos += width; if (xpos >= TEXTWIN_WIDTH-width) char_out('\n'); }
void char_out(GR_CHAR ch) { switch(ch) { case '\r': xpos = 0; return; case '\n': ypos += height; if(ypos > si.rows - 60 - height) { ypos -= height; #if HAVEBLIT bogl_cfb8_blit(50, 30, si.cols-120, si.rows-60-height, 50, 30+height); GrFillRect(w1, gc3, 50, ypos, si.cols-120, height); #else /* FIXME: changing FALSE to TRUE crashes nano-X*/ /* clear screen, no scroll*/ ypos = 0; GrClearWindow(w1, GR_FALSE); #endif } return; case '\007': /* bel*/ return; case '\t': xpos += width; while((xpos/width) & 7) char_out(' '); return; case '\b': /* assumes fixed width font!!*/ if (xpos <= 0) return; char_del(xpos, ypos); return; } GrText(w1, gc1, xpos+1, ypos, &ch, 1, GR_TFTOP); xpos += width; }
int one_match(char **send, char *str, glob_t *globuf, t_comp *count) { int size; char *dup; dup = NULL; size = my_strlen(str); str = my_strdup(globuf->gl_pathv[0]); (*send)[my_strlen(*send) - size] = 0; *send = my_strcat((*send), str); dup = my_strdup(*send); while (count->compt > 0) { if (char_del(send, 48, count, NULL) == -1) return (my_glob_return(globuf, dup, -1)); } *send = my_strdup(dup); my_putstr(*send); count->compt = my_strlen(*send); count->save = my_strlen(*send); return (my_glob_return(globuf, dup, -1)); }