libisofs  1.5.4
About: libisofs is a library to create an ISO 9660 filesystem, supports extensions like RockRidge or Joliet, makes bootable ISO 9660, and records file attributes which are of interest for data backups.
  Fossies Dox: libisofs-1.5.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

hfsplus_decompose.c File Reference
#include <string.h>
#include "hfsplus.h"
Include dependency graph for hfsplus_decompose.c:

Go to the source code of this file.

Macros

#define HFSPLUS_DECOMPOSE_PAGE_SIZE   (256 * (HFSPLUS_MAX_DECOMPOSE_LEN + 1))
 

Functions

void make_hfsplus_decompose_pages ()
 

Variables

static const uint16_t decompose_page_data []
 
static uint16_t decompose_pages [16 *256][4+1]
 
uint16_t(*[256] hfsplus_decompose_pages )[4+1]
 

Macro Definition Documentation

◆ HFSPLUS_DECOMPOSE_PAGE_SIZE

#define HFSPLUS_DECOMPOSE_PAGE_SIZE   (256 * (HFSPLUS_MAX_DECOMPOSE_LEN + 1))

Definition at line 1047 of file hfsplus_decompose.c.

Function Documentation

◆ make_hfsplus_decompose_pages()

void make_hfsplus_decompose_pages ( )

Definition at line 1054 of file hfsplus_decompose.c.

1055 {
1056  int page_idx = -1, char_idx, i;
1057  uint16_t *rpt, *page_pt, *value_pt;
1058  int page_count = 0;
1059 
1061  for (i = 0; i < 256; i++)
1062  hfsplus_decompose_pages[i] = NULL;
1063 
1064  rpt = (uint16_t *) decompose_page_data;
1065  page_pt = (uint16_t *) decompose_pages;
1066  while (1) {
1067  if (*rpt <= page_idx)
1068  break;
1069  page_count++;
1070  page_idx = *(rpt++);
1071  char_idx = -1;
1072  while (1) {
1073  if(*rpt <= char_idx)
1074  break;
1075  char_idx = *(rpt++);
1076  value_pt = page_pt + char_idx * (HFSPLUS_MAX_DECOMPOSE_LEN + 1);
1077  while (1) {
1078  if(*rpt == 0)
1079  break;
1080  *(value_pt++) = *(rpt++);
1081  }
1082  rpt++;
1083  }
1084  rpt++;
1085  hfsplus_decompose_pages[page_idx] =
1086  decompose_pages + (page_count - 1) * 256;
1087  page_pt += HFSPLUS_DECOMPOSE_PAGE_SIZE;
1088  }
1089 }
#define HFSPLUS_MAX_DECOMPOSE_LEN
Definition: hfsplus.h:187
static const uint16_t decompose_page_data[]
#define HFSPLUS_DECOMPOSE_PAGE_SIZE
uint16_t(*[256] hfsplus_decompose_pages)[4+1]
static uint16_t decompose_pages[16 *256][4+1]

References decompose_page_data, decompose_pages, HFSPLUS_DECOMPOSE_PAGE_SIZE, hfsplus_decompose_pages, and HFSPLUS_MAX_DECOMPOSE_LEN.

Referenced by hfsplus_writer_create().

Variable Documentation

◆ decompose_page_data

const uint16_t decompose_page_data[]
static

Definition at line 35 of file hfsplus_decompose.c.

Referenced by make_hfsplus_decompose_pages().

◆ decompose_pages

uint16_t decompose_pages[16 *256][4+1]
static

Definition at line 1049 of file hfsplus_decompose.c.

Referenced by make_hfsplus_decompose_pages().

◆ hfsplus_decompose_pages

uint16_t(*[256] hfsplus_decompose_pages)[4+1]

Definition at line 1051 of file hfsplus_decompose.c.

Referenced by iso_get_hfsplus_name(), and make_hfsplus_decompose_pages().