antirez / antirez/kilo

Question: Why kilo allocating 9 bytes memory for a non-printable character?

Abierto
#39 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
9.1k
Forks
995
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am reading kilo code for learning C language.
In line551, allocating 9 bytes memory for one non-printable character.
Why 9 bytes memory need for a non-printable character?

And `nonprint` variable is only initialized to 0 at line 543, and it is not assigned to other value.
So I think `nonprint` is not useful at line 551.
What's the meaning of this?



row->render = malloc(row->size + tabs*8 + nonprint*9 + 1);

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.