X11 로케일 파일에 있는 47개의 빈 줄의 목적은 무엇입니까?

X11 로케일 파일에 있는 47개의 빈 줄의 목적은 무엇입니까?

로케일 파일 상단에 47개의 빈 줄이 있는 것을 확인했습니다.

xb@dnxb:/usr/share/X11/locale$ hexdump -Cv locale.alias | head
00000000  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000010  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000020  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 23  |...............#|
00000030  0a 23 09 54 68 69 73 20  66 69 6c 65 20 63 6f 6e  |.#.This file con|
00000040  74 61 69 6e 73 20 61 6c  69 61 73 20 6e 61 6d 65  |tains alias name|
00000050  20 6f 66 20 6c 6f 63 61  6c 65 2e 0a 23 09 45 61  | of locale..#.Ea|
00000060  63 68 20 61 6c 69 61 73  20 6e 61 6d 65 20 69 73  |ch alias name is|
00000070  20 64 65 73 63 72 69 62  65 64 20 77 69 74 68 69  | described withi|
00000080  6e 20 6f 6e 65 20 6c 69  6e 65 2e 0a 23 09 54 68  |n one line..#.Th|
00000090  65 20 66 69 72 73 74 20  77 6f 72 64 20 69 73 20  |e first word is |
xb@dnxb:/usr/share/X11/locale$ hexdump -Cv locale.dir | head
00000000  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000010  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000020  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 23  |...............#|
00000030  0a 23 09 54 68 69 73 20  66 69 6c 65 20 63 6f 6e  |.#.This file con|
00000040  74 61 69 6e 73 20 6c 6f  63 61 6c 65 20 64 61 74  |tains locale dat|
00000050  61 62 61 73 65 20 66 69  6c 65 20 6e 61 6d 65 73  |abase file names|
00000060  0a 23 09 54 68 65 20 66  69 72 73 74 20 77 6f 72  |.#.The first wor|
00000070  64 20 69 73 20 74 68 65  20 6c 6f 63 61 6c 65 20  |d is the locale |
00000080  64 61 74 61 62 61 73 65  20 66 69 6c 65 20 6e 61  |database file na|
00000090  6d 65 20 61 6e 64 0a 23  09 74 68 65 20 73 65 63  |me and.#.the sec|
xb@dnxb:/usr/share/X11/locale$ hexdump -Cv compose.dir | head                                   
00000000  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000010  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000020  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 23  |...............#|
00000030  0a 23 09 54 68 69 73 20  66 69 6c 65 20 63 6f 6e  |.#.This file con|
00000040  74 61 69 6e 73 20 63 6f  6d 70 6f 73 65 20 74 61  |tains compose ta|
00000050  62 6c 65 20 66 69 6c 65  20 6e 61 6d 65 73 2e 0a  |ble file names..|
00000060  23 09 54 68 65 20 66 69  72 73 74 20 77 6f 72 64  |#.The first word|
00000070  20 69 73 20 74 68 65 20  63 6f 6d 70 6f 73 65 20  | is the compose |
00000080  74 61 62 6c 65 20 66 69  6c 65 20 6e 61 6d 65 0a  |table file name.|
00000090  23 09 61 6e 64 20 74 68  65 20 73 65 63 6f 6e 64  |#.and the second|
xb@dnxb:/usr/share/X11/locale$ hexdump -Cv C/XLC_LOCALE | head
00000000  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000010  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 0a  |................|
00000020  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a 23  |...............#|
00000030  20 20 58 4c 6f 63 61 6c  65 20 44 61 74 61 62 61  |  XLocale Databa|
00000040  73 65 20 53 61 6d 70 6c  65 20 66 6f 72 20 43 2e  |se Sample for C.|
00000050  0a 23 20 0a 0a 23 20 0a  23 20 09 58 4c 43 5f 46  |.# ..# .# .XLC_F|
00000060  4f 4e 54 53 45 54 20 63  61 74 65 67 6f 72 79 0a  |ONTSET category.|
00000070  23 20 0a 58 4c 43 5f 46  4f 4e 54 53 45 54 0a 23  |# .XLC_FONTSET.#|
00000080  20 09 66 73 30 20 63 6c  61 73 73 20 28 37 20 62  | .fs0 class (7 b|
00000090  69 74 20 41 53 43 49 49  29 0a 66 73 30 09 7b 0a  |it ASCII).fs0.{.|
xb@dnxb:/usr/share/X11/locale$ 

vi파일만 보고 빈 페이지가 보이면 아마도 아래로 스크롤하지 않고 cat볼 때만 알 수 있을 것입니다. 나는 확인한다이 사양그러나 47개의 빈 줄에 대한 언급은 없는 것 같습니다. 로케일 파일 시작 부분에 있는 47개의 빈 줄의 목적은 무엇입니까?

답변1

나는 그것이 어떤 이유로 실제로 존재하지 않는다고 확신합니다. 이는 이러한 파일이 구축되는 방식의 부작용입니다. 당신이 보면locale.alias 소스, 누락된 것을 확인할 수 있습니다(왼쪽의 숫자는 추가된 줄 번호이며 실제로 파일에 존재하지 않습니다).

1  XCOMM
2  XCOMM   This file contains alias name of locale.
3  XCOMM   Each alias name is described within one line.
4  XCOMM   The first word is the alias name (simplified locale name)
5  XCOMM   the second word is full locale name.
6  XCOMM
7  XCOMM

8  POSIX:                                          C
9  POSIX-UTF2:                                     C

당신이 보면file.am 생성파일을 생성하기 위해 꽤 많은 C 전처리기와 sed를 거칩니다.

locale.alias: locale.alias.pre
    $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/locale.alias.pre | $(CPP_SED_MAGIC) > locale.alias.l1
    $(SED) -e '/^[^#][^  ]*:/s/://' -e '/^[^#].*[    ].*:/d' \
        < locale.alias.l1 > locale.alias.l2
    cat locale.alias.l2 locale.alias.l1 > locale.alias

당신이 보면file.in 생성, CPP_SED_MAGIC예:

CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
                       -e '/^\#line  *[0-9][0-9]*  *.*$$/d' \
                       -e '/^[   ]*XCOMM$$/s/XCOMM/\#/' \
                       -e '/^[   ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
                       -e '/^[   ]*XHASH/s/XHASH/\#/' \
                       -e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \
                       -e '/\@\@$$/s/\@\@$$/\\/'

무엇보다도 C 전처리기가 내뱉은 모든 줄 번호 주석을 빈 줄로 바꿉니다. 이것이 그들이 온 곳입니다.

관련 정보