Ver código fonte

Use packed structures

master
Arun Prakash Jana 5 anos atrás
pai
commit
eb9faf0832
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: A75979F35C080412
2 arquivos alterados com 3 adições e 3 exclusões
  1. +2
    -2
      src/nnn.c
  2. +1
    -1
      src/nnn.h

+ 2
- 2
src/nnn.c Ver arquivo

@@ -269,7 +269,7 @@ typedef struct entry {
typedef struct { typedef struct {
int key; int key;
char *loc; char *loc;
} bm;
} __attribute__ ((packed)) bm;


/* Settings */ /* Settings */
typedef struct { typedef struct {
@@ -307,7 +307,7 @@ typedef struct {
char c_name[NAME_MAX + 1]; /* Current file name */ char c_name[NAME_MAX + 1]; /* Current file name */
settings c_cfg; /* Current configuration */ settings c_cfg; /* Current configuration */
uint color; /* Color code for directories */ uint color; /* Color code for directories */
} context;
} __attribute__ ((packed)) context;


/* GLOBALS */ /* GLOBALS */




+ 1
- 1
src/nnn.h Ver arquivo

@@ -103,7 +103,7 @@ enum action {
struct key { struct key {
int sym; /* Key pressed */ int sym; /* Key pressed */
enum action act; /* Action */ enum action act; /* Action */
};
} __attribute__ ((packed));


static struct key bindings[] = { static struct key bindings[] = {
/* Back */ /* Back */


Carregando…
Cancelar
Salvar