Skip to content

confused about init_mime_table() function #10

@tolerious

Description

@tolerious

today I reviewed your code again,when I read the init_mime_table() function,I am a little confused.just my opinion,I drew a picture to describe my thoughts.
Alt text
all the square represent a mime structure,what I am puzzled are these code:
struct mime *first_level = &(root->next_level[ext[0]-'a']);

struct mime *second_level = &(first_level->next_level[ext[1]-'a']);

struct mime *start = (strlen(ext)==1) ? first_level : second_level;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions