{
    "pdf_info": [
        {
            "para_blocks": [
                {
                    "bbox": [
                        154,
                        173,
                        443,
                        203
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                150,
                                173,
                                445,
                                206
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        150,
                                        173,
                                        445,
                                        206
                                    ],
                                    "type": "text",
                                    "content": "操作系统课程设计指导书",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        236,
                        280,
                        366,
                        298
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                234,
                                280,
                                368,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        234,
                                        280,
                                        368,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "赵伟华 刘真 张梅",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        231,
                        592,
                        320,
                        609
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                230,
                                590,
                                322,
                                612
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        230,
                                        590,
                                        322,
                                        612
                                    ],
                                    "type": "text",
                                    "content": "2017 年 08 月",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        239,
                        624,
                        315,
                        640
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                238,
                                623,
                                317,
                                642
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        238,
                                        623,
                                        317,
                                        642
                                    ],
                                    "type": "text",
                                    "content": "计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 0
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        184,
                        77,
                        418,
                        97
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                184,
                                74,
                                418,
                                100
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        184,
                                        74,
                                        246,
                                        100
                                    ],
                                    "type": "text",
                                    "content": "第六章",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        255,
                                        75,
                                        418,
                                        99
                                    ],
                                    "type": "text",
                                    "content": "linux 常用工具介绍",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        124,
                        301,
                        140
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                123,
                                302,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        123,
                                        302,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "6.1 查看 linux 源码内容工具",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        166,
                        505,
                        197
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                168,
                                505,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        168,
                                        505,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "学习linux的实现原理时，经常需要查看某些数据结构的定义格式、某些内核函数的具",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                185,
                                437,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        185,
                                        437,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "体实现过程等，相关工具比较多，这里介绍 ctags 和 source insight 两种。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        206,
                        254,
                        221
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                206,
                                253,
                                221
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        206,
                                        253,
                                        221
                                    ],
                                    "type": "text",
                                    "content": "6.1 .1 通过相关网站查询",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        238,
                        320,
                        282
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 7,
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                238,
                                268,
                                250
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        235,
                                        268,
                                        253
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                235,
                                                268,
                                                253
                                            ],
                                            "type": "text",
                                            "content": "1.网址 1：http://lxr.linux.no/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                269,
                                320,
                                282
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        267,
                                        321,
                                        285
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                267,
                                                321,
                                                285
                                            ],
                                            "type": "text",
                                            "content": "2.网址 2：http://lxr.free-electrons.com/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        301,
                        220,
                        313
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                297,
                                221,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        297,
                                        174,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "6.1.2 vim",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        174,
                                        301,
                                        186,
                                        312
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathbf { + }",
                                    "score": 0.62
                                },
                                {
                                    "bbox": [
                                        186,
                                        297,
                                        221,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "ctags",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        327,
                        499,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                326,
                                499,
                                341
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        326,
                                        499,
                                        341
                                    ],
                                    "type": "text",
                                    "content": "在 vim 中安装插件 ctags 后，就可以在终端方便地使用 vi 命令查看 linux 源码内容了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        349,
                        201,
                        364
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                349,
                                202,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        349,
                                        202,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "1. 安装 ctags 插件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        376,
                        505,
                        424
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                376,
                                506,
                                389
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        376,
                                        506,
                                        389
                                    ],
                                    "type": "text",
                                    "content": "Ctags 插件的功能是遍历 linux 源码文件，为源码的变量/对象、结构体/类、函数/接口、宏",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                395,
                                506,
                                407
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        395,
                                        506,
                                        407
                                    ],
                                    "type": "text",
                                    "content": "等产生索引文件：tags 文件，以便快速定位这些内容。tags 文件也是 Taglist 和 OmniCppComplete",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                412,
                                149,
                                426
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        412,
                                        149,
                                        426
                                    ],
                                    "type": "text",
                                    "content": "工作的基础。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        429,
                        499,
                        443
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                428,
                                500,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        428,
                                        500,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "有两种方法安装ctags 插件，一种是源码安装，一种是在ubuntu中使用apt-get安装。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        448,
                        270,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                447,
                                271,
                                463
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        447,
                                        271,
                                        463
                                    ],
                                    "type": "text",
                                    "content": "（1）ubuntu 中使用 apt-get 安装：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        135,
                        466,
                        273,
                        479
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                465,
                                276,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        465,
                                        276,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "sudo apt-get install ctags",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        484,
                        204,
                        497
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                484,
                                205,
                                497
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        484,
                                        205,
                                        497
                                    ],
                                    "type": "text",
                                    "content": "（2）下载源码安装：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        502,
                        504,
                        586
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 20,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                502,
                                504,
                                532
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        119,
                                        500,
                                        506,
                                        516
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                119,
                                                500,
                                                506,
                                                516
                                            ],
                                            "type": "text",
                                            "content": "1）从 http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz 下载 ctags",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        518,
                                        213,
                                        534
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                518,
                                                213,
                                                534
                                            ],
                                            "type": "text",
                                            "content": "源码包 ctags-5.8.tar.gz；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                128,
                                537,
                                413,
                                550
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        535,
                                        414,
                                        552
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                535,
                                                414,
                                                552
                                            ],
                                            "type": "text",
                                            "content": "或者从 http://ctags.sourceforge.net/下载 ctags 源代码包",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                117,
                                555,
                                247,
                                567
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        120,
                                        555,
                                        246,
                                        568
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                120,
                                                555,
                                                246,
                                                568
                                            ],
                                            "type": "text",
                                            "content": "2）解压缩生成源代码目录；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                117,
                                573,
                                359,
                                586
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        119,
                                        571,
                                        360,
                                        587
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                119,
                                                571,
                                                360,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "3）进入源代码目录，依次执行如下命令安装ctags：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "code",
                    "bbox": [
                        149,
                        591,
                        252,
                        640
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                149,
                                591,
                                252,
                                640
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        149,
                                        591,
                                        252,
                                        640
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                149,
                                                591,
                                                252,
                                                640
                                            ],
                                            "type": "text",
                                            "content": "$ ./configure $ make $ sudo make install"
                                        }
                                    ]
                                }
                            ],
                            "index": 21,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 21,
                    "sub_type": "code",
                    "guess_lang": "shell"
                },
                {
                    "bbox": [
                        108,
                        650,
                        217,
                        663
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                647,
                                217,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        647,
                                        217,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "1. 生成索引文件 tags",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        676,
                        273,
                        689
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                677,
                                273,
                                689
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        677,
                                        273,
                                        689
                                    ],
                                    "type": "text",
                                    "content": "从终端进入linux 源码目录，执行：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        694,
                        227,
                        707
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                694,
                                229,
                                708
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        694,
                                        138,
                                        707
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\$ 8",
                                    "score": 0.64
                                },
                                {
                                    "bbox": [
                                        138,
                                        694,
                                        229,
                                        708
                                    ],
                                    "type": "text",
                                    "content": "sudo ctags –R *",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        712,
                        500,
                        743
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                710,
                                503,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        710,
                                        503,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "“-R”标识递归创建，即包括 linux源代码根目录（当前目录）下的所有子目录；“*”",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                109,
                                730,
                                483,
                                743
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        730,
                                        483,
                                        743
                                    ],
                                    "type": "text",
                                    "content": "表示所有文件。执行该命令后会在当前目录下生成一个“tags”文件，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 1
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        110,
                        75,
                        485,
                        160
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                75,
                                485,
                                160
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        75,
                                        485,
                                        160
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                75,
                                                485,
                                                160
                                            ],
                                            "type": "text",
                                            "content": "zwh@ubuntu:/usr/src/linux-4.4.19$ sudo ctags -R *\n[sudo] password for zwh:\nzwh@ubuntu:/usr/src/linux-4.4.19$ ls\narch crypto include kernel net security virt\nblock Documentation init lib README sound\ncerts drivers ipc MAINTAINERS REPORTING-BUGS tags\nCOPYING firmware Kbuild Makefile samples tools\nCREDITS fs Kconfig mm scripts usr\nzwh@ubuntu:/usr/src/linux-4.4.19$"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "shell"
                },
                {
                    "bbox": [
                        86,
                        169,
                        505,
                        216
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                170,
                                505,
                                181
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        170,
                                        505,
                                        181
                                    ],
                                    "type": "text",
                                    "content": "如果只是在linux 源代码目录下查询源码信息，则不需要修改vim的配置文件；否则如",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                188,
                                505,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        188,
                                        505,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "果希望在其他路径下也能查看，则必须使用sudo vim /etc/vim/vimrc 编辑这个文件，方法是",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                206,
                                231,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        206,
                                        231,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "在vimrc文件中添加如下内容：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        223,
                        271,
                        235
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                221,
                                272,
                                238
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        221,
                                        272,
                                        238
                                    ],
                                    "type": "text",
                                    "content": "set tags=/usr/src/linux-4.4.19/tags;",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        241,
                        171,
                        251
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                241,
                                173,
                                253
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        241,
                                        173,
                                        253
                                    ],
                                    "type": "text",
                                    "content": "set autochdir",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        262,
                        303,
                        275
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                261,
                                304,
                                277
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        261,
                                        304,
                                        277
                                    ],
                                    "type": "text",
                                    "content": "2. 利用 ctags 文件查看 linux 源 码信息",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        288,
                        230,
                        301
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                289,
                                230,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        289,
                                        230,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "最常用的命令有下面几个：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        306,
                        204,
                        318
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                305,
                                205,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        305,
                                        135,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "（1）",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        135,
                                        306,
                                        143,
                                        319
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\$ 8",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        143,
                                        305,
                                        205,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "vi –t tag：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        323,
                        434,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                324,
                                436,
                                338
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        324,
                                        436,
                                        338
                                    ],
                                    "type": "text",
                                    "content": "命令中的“tag”是要查看的变量名、数据结构名、函数名等，如执行：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        342,
                        252,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                340,
                                254,
                                356
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        342,
                                        138,
                                        354
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\$ 8",
                                    "score": 0.66
                                },
                                {
                                    "bbox": [
                                        138,
                                        340,
                                        254,
                                        356
                                    ],
                                    "type": "text",
                                    "content": "vi –t effective_prio",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        359,
                        295,
                        371
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                359,
                                296,
                                373
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        359,
                                        296,
                                        373
                                    ],
                                    "type": "text",
                                    "content": "则会显示 effective_prio()的实现源码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        110,
                        377,
                        463,
                        491
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                377,
                                463,
                                491
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        377,
                                        463,
                                        491
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                377,
                                                463,
                                                491
                                            ],
                                            "type": "text",
                                            "content": "static int effective_prio(struct task_struct *p) { p->normal_prio = normal_prio(p); /* If we are RT tasks or we were boosted to RT priority, * keep the priority unchanged. Otherwise, update priority * to the normal priority: */ if (!rt_prio(p->prio)) return p->normal_prio; return p->prio; }"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        502,
                        189,
                        513
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                501,
                                190,
                                516
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        501,
                                        135,
                                        516
                                    ],
                                    "type": "text",
                                    "content": "（2）",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        135,
                                        502,
                                        167,
                                        514
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\operatorname { C t r l } + ]",
                                    "score": 0.59
                                },
                                {
                                    "bbox": [
                                        168,
                                        501,
                                        190,
                                        516
                                    ],
                                    "type": "text",
                                    "content": "命令",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        518,
                        499,
                        549
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                519,
                                501,
                                531
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        519,
                                        501,
                                        531
                                    ],
                                    "type": "text",
                                    "content": "在vim中，将光标移动到要查看的变量名、数据结构名、函数名处，同时按下“Ctrl+]”",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                537,
                                399,
                                549
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        537,
                                        399,
                                        549
                                    ],
                                    "type": "text",
                                    "content": "键，则立即跳转到光标所在变量名、数据结构名、函数名的定义处。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        555,
                        192,
                        565
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                554,
                                193,
                                568
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        554,
                                        193,
                                        568
                                    ],
                                    "type": "text",
                                    "content": "（3）Ctrl+T 命令",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        571,
                        430,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                571,
                                431,
                                586
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        571,
                                        431,
                                        586
                                    ],
                                    "type": "text",
                                    "content": "在vim中同时按下“Ctrl+T”键，则返回查找或跳转到前一次界面处。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        590,
                        171,
                        602
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                589,
                                172,
                                603
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        589,
                                        172,
                                        603
                                    ],
                                    "type": "text",
                                    "content": "（4）ta命令",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        607,
                        498,
                        619
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                607,
                                499,
                                621
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        607,
                                        499,
                                        621
                                    ],
                                    "type": "text",
                                    "content": "在vim中命令行下使用 ta命令，也能显示变量名、数据结构名、函数名的定义，如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        626,
                        190,
                        638
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                624,
                                191,
                                638
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        624,
                                        191,
                                        638
                                    ],
                                    "type": "text",
                                    "content": ":ta normal_prio",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        643,
                        248,
                        655
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                642,
                                249,
                                656
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        642,
                                        249,
                                        656
                                    ],
                                    "type": "text",
                                    "content": "则显示 normal_prio()的定义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 2
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        110,
                        74,
                        388,
                        193
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                74,
                                388,
                                193
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        74,
                                        388,
                                        193
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                74,
                                                388,
                                                193
                                            ],
                                            "type": "text",
                                            "content": "static inline int normal_prio(struct task_struct *p) {\n    int prio;\n    if (task_has_DL_policy(p))\n        prio = MAX_DL_PRIO-1;\n    else if (task_has_rt_policy(p))\n        prio = MAX_RT_PRIO-1 - p->rt_priority;\n    else\n        prio = __normal_prio(p);\n    return prio;\n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        116,
                        201,
                        422,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                117,
                                200,
                                423,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        117,
                                        200,
                                        423,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "更多功能可通过命令 man ctags 或在 Vim 命令行下运行 help ctags 查询。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        240,
                        247,
                        253
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                238,
                                248,
                                256
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        238,
                                        248,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "6.1.3 安装使用 Taglist",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        268,
                        502,
                        298
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                268,
                                501,
                                280
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        268,
                                        501,
                                        280
                                    ],
                                    "type": "text",
                                    "content": "Taglist 是 vim的一个插件，提供源码的结构化浏览功能，可将源码中定义的函数、变量、结",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                286,
                                352,
                                297
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        286,
                                        352,
                                        297
                                    ],
                                    "type": "text",
                                    "content": "构体等以树结构显示，层次关系一目了然，便于快速定位查看。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        306,
                        211,
                        320
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                306,
                                212,
                                321
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        306,
                                        212,
                                        321
                                    ],
                                    "type": "text",
                                    "content": "1.安装 Taglist 插件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        334,
                        503,
                        398
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                334,
                                458,
                                364
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        333,
                                        458,
                                        348
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                333,
                                                458,
                                                348
                                            ],
                                            "type": "text",
                                            "content": "1）从 http://www.vim.org/scripts/script.php?script_id=273 下载安装包，也可以从",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        351,
                                        298,
                                        365
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                351,
                                                298,
                                                365
                                            ],
                                            "type": "text",
                                            "content": "http://vim-taglist.sourceforge.net/index.html 下载。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                370,
                                503,
                                398
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        371,
                                        504,
                                        380
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                371,
                                                504,
                                                380
                                            ],
                                            "type": "text",
                                            "content": "2）以 root 用户进入/etc/vim 目录,将 Taglist 安装包复制到该目录下并解压，解压后会在当前目",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        388,
                                        291,
                                        399
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                388,
                                                291,
                                                399
                                            ],
                                            "type": "text",
                                            "content": "录下生成两个子目录：plugin 和 doc，如图所示：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "code",
                    "bbox": [
                        133,
                        401,
                        376,
                        460
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                133,
                                401,
                                376,
                                460
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        133,
                                        401,
                                        376,
                                        460
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                133,
                                                401,
                                                376,
                                                460
                                            ],
                                            "type": "text",
                                            "content": "root@ubuntu:/etc/vim# unzip taglist_46.zip  \nArchive: taglist_46.zip  \ninflating: plugin/taglist.vim  \ninflating: doc/taglist.txt  \nroot@ubuntu:/etc/vim# ls  \ndoc plugin taglist_46.zip vimrc vimrc.tiny"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        86,
                        467,
                        504,
                        514
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                467,
                                504,
                                497
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        118,
                                        467,
                                        504,
                                        478
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                118,
                                                467,
                                                504,
                                                478
                                            ],
                                            "type": "text",
                                            "content": "3）进入/etc/vim/doc 目录，运行 vim，执行\"helptags\"命令。该命令是将 doc 下的帮助文档加",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        485,
                                        478,
                                        497
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                485,
                                                478,
                                                497
                                            ],
                                            "type": "text",
                                            "content": "入到 Vim 的帮助主题中，这样我们就可以通过在 Vim 中运行“help taglist.txt”查看 taglist 帮助。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                115,
                                502,
                                462,
                                514
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        502,
                                        463,
                                        514
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                502,
                                                463,
                                                514
                                            ],
                                            "type": "text",
                                            "content": "4）打开 vim的配置文件/etc/vim/vimrc，加入以下两行内容，则安装工作就完成了：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        148,
                        519,
                        477,
                        532
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                149,
                                518,
                                478,
                                534
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        149,
                                        518,
                                        257,
                                        534
                                    ],
                                    "type": "text",
                                    "content": "let Tlist_Show_One_File",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        257,
                                        520,
                                        270,
                                        531
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\mathop { : = } } 1",
                                    "score": 0.54
                                },
                                {
                                    "bbox": [
                                        270,
                                        518,
                                        478,
                                        534
                                    ],
                                    "type": "text",
                                    "content": "//不同时显示多个文件的 tag，只显示一个",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        537,
                        461,
                        550
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                150,
                                536,
                                462,
                                551
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        150,
                                        536,
                                        268,
                                        551
                                    ],
                                    "type": "text",
                                    "content": "let Tlist_Exit_OnlyWindow",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        269,
                                        538,
                                        282,
                                        549
                                    ],
                                    "type": "inline_equation",
                                    "content": "^ { - 1 }",
                                    "score": 0.66
                                },
                                {
                                    "bbox": [
                                        282,
                                        536,
                                        462,
                                        551
                                    ],
                                    "type": "text",
                                    "content": "//taglist 为最后一个窗口时，退出 vim",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        556,
                        398,
                        568
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                555,
                                399,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        555,
                                        215,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "Tlist_Sort_Type",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        215,
                                        559,
                                        222,
                                        566
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        223,
                                        555,
                                        246,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "name",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        279,
                                        557,
                                        399,
                                        569
                                    ],
                                    "type": "text",
                                    "content": "//使 taglist 以 tag 名字进行排序",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        572,
                        416,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                571,
                                417,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        571,
                                        417,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "还有许多其他的设置选项，请参考帮助文档:help taglist.txt。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        594,
                        206,
                        608
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                594,
                                207,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        594,
                                        207,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "2.使用 Taglist 插件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        619,
                        286,
                        632
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                618,
                                287,
                                634
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        618,
                                        287,
                                        634
                                    ],
                                    "type": "text",
                                    "content": "（1）在 vim 中打开 taglist 窗口：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        636,
                        472,
                        650
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                636,
                                473,
                                650
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        636,
                                        473,
                                        650
                                    ],
                                    "type": "text",
                                    "content": "在vim命令方式下运行以下三个命令之一都可以打开 taglist窗口，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        129,
                        653,
                        196,
                        698
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                129,
                                653,
                                196,
                                698
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        129,
                                        653,
                                        196,
                                        698
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                129,
                                                653,
                                                196,
                                                698
                                            ],
                                            "type": "text",
                                            "content": ":Tlist :Tlist0pen :TlistToggle"
                                        }
                                    ]
                                }
                            ],
                            "index": 20,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 20,
                    "sub_type": "code",
                    "guess_lang": "autohotkey"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 3
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        91,
                        75,
                        505,
                        176
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                75,
                                505,
                                176
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        75,
                                        505,
                                        176
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                75,
                                                505,
                                                176
                                            ],
                                            "type": "image",
                                            "image_path": "55f641d6940a3ce061008766baa1ba4c546250f525a465e8df10f9bd6ced8979.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        86,
                        183,
                        505,
                        227
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                183,
                                505,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        183,
                                        505,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "图中右边窗口是文件编辑窗口，左边是 taglist 窗口。在taglist窗口中分类显示右边",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                198,
                                506,
                                213
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        198,
                                        506,
                                        213
                                    ],
                                    "type": "text",
                                    "content": "文件中所有的 tag（分类依次为宏定义、数据结构、变量、函数），并且每类 tag 都按各 tag",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                215,
                                283,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        215,
                                        283,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "在文件中出现的先后顺序排序，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        91,
                        232,
                        506,
                        301
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                232,
                                506,
                                301
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        232,
                                        506,
                                        301
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                232,
                                                506,
                                                301
                                            ],
                                            "type": "image",
                                            "image_path": "dce8c4e53bc714f4f55eec82fded2a9e3896d366bcaab3d959e04c36d99c3fba.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 3
                },
                {
                    "type": "image",
                    "bbox": [
                        91,
                        309,
                        506,
                        349
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                309,
                                506,
                                349
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        309,
                                        506,
                                        349
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                309,
                                                506,
                                                349
                                            ],
                                            "type": "image",
                                            "image_path": "6469cb9dfa4d70014ba7dda7cff09ad369d02f55d440934a939a1305983a020b.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 4
                },
                {
                    "type": "image",
                    "bbox": [
                        91,
                        358,
                        506,
                        456
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                358,
                                506,
                                456
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        358,
                                        506,
                                        456
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                358,
                                                506,
                                                456
                                            ],
                                            "type": "image",
                                            "image_path": "9f6aa32b5761b70f4ec343fdba29ff0f71876766038e13836425ac5dd421decd.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 5
                },
                {
                    "bbox": [
                        91,
                        481,
                        204,
                        492
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                94,
                                480,
                                205,
                                494
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        480,
                                        205,
                                        494
                                    ],
                                    "type": "text",
                                    "content": "（2）关闭 taglist 窗口：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        496,
                        445,
                        508
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                495,
                                446,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        495,
                                        446,
                                        510
                                    ],
                                    "type": "text",
                                    "content": "在vim命令方式下再次运行上述（1）中三个命令之一，则关闭taglist窗口。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        512,
                        272,
                        524
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                512,
                                274,
                                525
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        512,
                                        274,
                                        525
                                    ],
                                    "type": "text",
                                    "content": "（3） 在taglist窗口中常用的快捷键：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        528,
                        467,
                        698
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 20,
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                528,
                                384,
                                539
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        528,
                                        385,
                                        540
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                528,
                                                385,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "1）Ctrl+ww 在taglist窗口和文件编辑窗口之间切换焦点",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                544,
                                467,
                                556
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        544,
                                        469,
                                        558
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                544,
                                                124,
                                                558
                                            ],
                                            "type": "text",
                                            "content": "2）",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                124,
                                                544,
                                                167,
                                                556
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\langle \\mathrm { C t r } 1 \\rangle + ]",
                                            "score": 0.69
                                        },
                                        {
                                            "bbox": [
                                                168,
                                                544,
                                                469,
                                                558
                                            ],
                                            "type": "text",
                                            "content": "跳转到光标所在 tag 的定义位置；用鼠标双击此 tag 功能相同",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                560,
                                387,
                                572
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        558,
                                        389,
                                        575
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                558,
                                                135,
                                                575
                                            ],
                                            "type": "text",
                                            "content": "3）o",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                560,
                                                389,
                                                574
                                            ],
                                            "type": "text",
                                            "content": "在一个新窗口中显示光标所在 tag 的定义位置；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                576,
                                304,
                                588
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        575,
                                        305,
                                        590
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                575,
                                                305,
                                                590
                                            ],
                                            "type": "text",
                                            "content": "4）<Space> 显示光标下 tag 的原型定义；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                592,
                                298,
                                603
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        589,
                                        299,
                                        608
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                589,
                                                136,
                                                608
                                            ],
                                            "type": "text",
                                            "content": "5）u",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                590,
                                                299,
                                                607
                                            ],
                                            "type": "text",
                                            "content": "更新 taglist 窗口中的 tag",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                607,
                                415,
                                619
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        607,
                                        416,
                                        622
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                607,
                                                135,
                                                622
                                            ],
                                            "type": "text",
                                            "content": "6）s",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                173,
                                                608,
                                                416,
                                                620
                                            ],
                                            "type": "text",
                                            "content": "更改排序方式，在按名字排序和按出现顺序排序间切",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                624,
                                389,
                                636
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        621,
                                        391,
                                        640
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                621,
                                                136,
                                                640
                                            ],
                                            "type": "text",
                                            "content": "7）x",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                623,
                                                391,
                                                639
                                            ],
                                            "type": "text",
                                            "content": "taglist 窗口放大和缩小，方便查看较长的 tag",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                639,
                                247,
                                651
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        637,
                                        248,
                                        655
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                637,
                                                139,
                                                655
                                            ],
                                            "type": "text",
                                            "content": "8）[[",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                640,
                                                248,
                                                652
                                            ],
                                            "type": "text",
                                            "content": "跳到前一个文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                655,
                                247,
                                667
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        653,
                                        248,
                                        671
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                653,
                                                139,
                                                671
                                            ],
                                            "type": "text",
                                            "content": "9）]]",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                171,
                                                655,
                                                248,
                                                668
                                            ],
                                            "type": "text",
                                            "content": "跳到后一个文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                671,
                                257,
                                683
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        668,
                                        259,
                                        687
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                668,
                                                136,
                                                687
                                            ],
                                            "type": "text",
                                            "content": "9）q",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                670,
                                                259,
                                                686
                                            ],
                                            "type": "text",
                                            "content": "关闭 taglist 窗口",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                687,
                                216,
                                698
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        686,
                                        217,
                                        701
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                686,
                                                155,
                                                701
                                            ],
                                            "type": "text",
                                            "content": "10）<F1>",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                686,
                                                217,
                                                701
                                            ],
                                            "type": "text",
                                            "content": "显示帮助",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        709,
                        241,
                        723
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                707,
                                242,
                                725
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        707,
                                        242,
                                        725
                                    ],
                                    "type": "text",
                                    "content": "6.1.4 安装使用 Cscope",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 4
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        74,
                        489,
                        120
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                74,
                                489,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        74,
                                        489,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "通过Cscope可以很方便地找到某个函数或变量的定义位置、被调用的位置等信息。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                90,
                                366,
                                102
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        90,
                                        366,
                                        102
                                    ],
                                    "type": "text",
                                    "content": "Cscope已经是Vim的标准特性，默认都有支持，官方网址为",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                105,
                                254,
                                120
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        105,
                                        254,
                                        120
                                    ],
                                    "type": "text",
                                    "content": "http://cscope.sourceforge.net/。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        134,
                        210,
                        148
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                133,
                                210,
                                149
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        133,
                                        210,
                                        149
                                    ],
                                    "type": "text",
                                    "content": "1． 安装 Cscope 插件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        165,
                        228,
                        178
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                163,
                                229,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        163,
                                        229,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "在 ubuntu 下安装 Cscope：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        181,
                        301,
                        194
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                179,
                                301,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        179,
                                        301,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "直接运行命令：apt-get install cscope",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        197,
                        180,
                        209
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                197,
                                179,
                                210
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        197,
                                        179,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "使用源码安装：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        213,
                        505,
                        243
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                212,
                                506,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        212,
                                        506,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "从 http://cscope.sourceforge.net/下载 Cscope 源代码包编译安装，步骤同 Ctags 安",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                226,
                                129,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        226,
                                        129,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "装过程。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        257,
                        268,
                        271
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                256,
                                267,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        256,
                                        267,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "2． 以 root 身份配置 Cscope 插件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        288,
                        500,
                        333
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 10,
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                288,
                                500,
                                317
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        286,
                                        500,
                                        303
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                286,
                                                500,
                                                303
                                            ],
                                            "type": "text",
                                            "content": "1）下载 http://cscope.sourceforge.net/cscope_maps.vim 文件到/etc/vim/plugin",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        301,
                                        127,
                                        318
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                301,
                                                127,
                                                318
                                            ],
                                            "type": "text",
                                            "content": "目录中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                320,
                                242,
                                333
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        320,
                                        242,
                                        334
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                320,
                                                242,
                                                334
                                            ],
                                            "type": "text",
                                            "content": "2）生成 cscope 数据库文件：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        336,
                        294,
                        349
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                336,
                                294,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        336,
                                        294,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "进入linux源码根目录，执行下面命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        353,
                        186,
                        364
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                351,
                                186,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        351,
                                        186,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "#cscope -Rbqk",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        367,
                        493,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                365,
                                495,
                                383
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        365,
                                        495,
                                        383
                                    ],
                                    "type": "text",
                                    "content": "该命令将生成三个文件：cscope.out, cscope.in.out, cscope.po.out，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        88,
                        396,
                        508,
                        454
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                396,
                                508,
                                454
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        396,
                                        508,
                                        454
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                396,
                                                508,
                                                454
                                            ],
                                            "type": "text",
                                            "content": "root@ubuntu:/home/zwh/linux-2.6.24#sccope-Rbkq root@ubuntu:/home/zwh/linux-2.6.24# ls arch cscope.in.out fs kernel net security block cscope.out include lib README sound COPYING cscope.po.out init MAINTAINERS REPORTING-BUGS tags"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "batch"
                },
                {
                    "bbox": [
                        86,
                        474,
                        495,
                        502
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                473,
                                495,
                                487
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        473,
                                        495,
                                        487
                                    ],
                                    "type": "text",
                                    "content": "其中cscope.out 是基本的符号索引，后两个文件是使用\"-q\"选项生成的，可以加快",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                490,
                                321,
                                503
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        490,
                                        321,
                                        503
                                    ],
                                    "type": "text",
                                    "content": "cscope的索引速度。cscope 命令的参数含义如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        506,
                        505,
                        613
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 22,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                506,
                                337,
                                518
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        506,
                                        337,
                                        518
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                506,
                                                337,
                                                518
                                            ],
                                            "type": "text",
                                            "content": "-R: 在生成索引文件时，搜索子目录树中的代码",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                521,
                                322,
                                534
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        521,
                                        321,
                                        535
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                521,
                                                321,
                                                535
                                            ],
                                            "type": "text",
                                            "content": "-b: 只生成索引文件，不进入 cscope的界面",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                538,
                                345,
                                550
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        536,
                                        346,
                                        552
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                536,
                                                346,
                                                552
                                            ],
                                            "type": "text",
                                            "content": "-d: 只调出 cscope gui 界面，不跟新 cscope.out",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                553,
                                351,
                                565
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        553,
                                        350,
                                        566
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                553,
                                                350,
                                                566
                                            ],
                                            "type": "text",
                                            "content": "-k: 在生成索引文件时，不搜索/usr/include 目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                569,
                                458,
                                582
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        568,
                                        459,
                                        584
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                568,
                                                459,
                                                584
                                            ],
                                            "type": "text",
                                            "content": "-q: 生成 cscope.in.out 和 cscope.po.out 文件，加快 cscope 的索引速度",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                585,
                                505,
                                613
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        585,
                                        505,
                                        598
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                585,
                                                505,
                                                598
                                            ],
                                            "type": "text",
                                            "content": "-i: 如果保存文件列表的文件名不是 cscope.files时，需要加此选项告诉 cscope到",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        601,
                                        405,
                                        613
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                601,
                                                405,
                                                613
                                            ],
                                            "type": "text",
                                            "content": "哪儿去找源文件列表。可以使用\"-\"，表示由标准输入获得文件列表。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        617,
                        502,
                        693
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 27,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                617,
                                318,
                                629
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        617,
                                        318,
                                        629
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                617,
                                                318,
                                                629
                                            ],
                                            "type": "text",
                                            "content": "-I dir: 在-I选项指出的目录中查找头文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                633,
                                316,
                                645
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        633,
                                        315,
                                        645
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                633,
                                                315,
                                                645
                                            ],
                                            "type": "text",
                                            "content": "-u: 扫描所有文件，重新生成交叉索引文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                649,
                                232,
                                661
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        649,
                                        232,
                                        661
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                649,
                                                232,
                                                661
                                            ],
                                            "type": "text",
                                            "content": "-C: 在搜索时忽略大小写",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                664,
                                502,
                                693
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        665,
                                        502,
                                        677
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                665,
                                                502,
                                                677
                                            ],
                                            "type": "text",
                                            "content": "-P path: 在以相对路径表示的文件前加上 path，这样，你不用切换到你数据库文件",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        681,
                                        221,
                                        693
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                681,
                                                221,
                                                693
                                            ],
                                            "type": "text",
                                            "content": "所在的目录也可以使用它了。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        696,
                        238,
                        709
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                696,
                                238,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        696,
                                        238,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "3）载入cscope数据库文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        712,
                        494,
                        741
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                712,
                                495,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        712,
                                        495,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "使用cscope之前，需将前面生成的数据库文件载入到 vim中。如果之前已经下载过",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                729,
                                395,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        729,
                                        395,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "cscope_maps.vim 文件到/etc/vim/plugin 目录下，可忽略这一步。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 5
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        74,
                        505,
                        102
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                74,
                                506,
                                88
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        74,
                                        506,
                                        88
                                    ],
                                    "type": "text",
                                    "content": "注意：生成的 cscope.out 和 tags 文件要在打开 vim 所在的文件夹，否则 vim 无法找到",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                89,
                                158,
                                103
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        89,
                                        158,
                                        103
                                    ],
                                    "type": "text",
                                    "content": "相关符号信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        105,
                        358,
                        118
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                106,
                                357,
                                119
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        106,
                                        357,
                                        119
                                    ],
                                    "type": "text",
                                    "content": "进入 linux 源码根目录，在 vim 中运行以下命令即可：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        145,
                        122,
                        269,
                        134
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                145,
                                121,
                                269,
                                136
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        145,
                                        121,
                                        269,
                                        136
                                    ],
                                    "type": "text",
                                    "content": ": cscope add cscope.out",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        137,
                        284,
                        150
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                136,
                                284,
                                152
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        136,
                                        284,
                                        152
                                    ],
                                    "type": "text",
                                    "content": "到这里，就可以开始使用 Cscope 了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        165,
                        210,
                        179
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                165,
                                210,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        165,
                                        210,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "3． 使用 Cscope 插件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        197,
                        348,
                        209
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                196,
                                350,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        196,
                                        350,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "Cscope 的查看命令都是在 vim 的命令方式下运行的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        213,
                        196,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                212,
                                198,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        212,
                                        198,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "cscope find 命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        228,
                        503,
                        257
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                228,
                                504,
                                242
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        228,
                                        504,
                                        242
                                    ],
                                    "type": "text",
                                    "content": "在vim中添加cscope数据库文件后，就可以调用\"cscope find\"命令查找源码相关内容，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                243,
                                500,
                                258
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        243,
                                        500,
                                        258
                                    ],
                                    "type": "text",
                                    "content": "如函数、变量、数据结构的定义及调用情况。vim支持 8种 cscope的查询功能，描述如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        260,
                        401,
                        274
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                260,
                                399,
                                274
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        260,
                                        399,
                                        274
                                    ],
                                    "type": "text",
                                    "content": "s: 查找C语言符号，即查找函数名、宏、枚举值等出现的地方",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        276,
                        426,
                        290
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                275,
                                427,
                                291
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        275,
                                        427,
                                        291
                                    ],
                                    "type": "text",
                                    "content": "g: 查找函数、宏、枚举等定义的位置，类似 ctags 所提供的功能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        292,
                        232,
                        305
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                292,
                                232,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        292,
                                        232,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "d: 查找本函数调用的函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        308,
                        232,
                        321
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                308,
                                232,
                                321
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        308,
                                        232,
                                        321
                                    ],
                                    "type": "text",
                                    "content": "c: 查找调用本函数的函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        324,
                        210,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                324,
                                210,
                                337
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        324,
                                        210,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "t: 查找指定的字符串",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        339,
                        388,
                        353
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                339,
                                389,
                                354
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        339,
                                        389,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "e: 查找 egrep 模式，相当于 egrep 功能，但查找速度快多了",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        355,
                        311,
                        368
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                356,
                                310,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        356,
                                        310,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "f: 查找并打开文件，类似 vim 的 find 功能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        371,
                        232,
                        384
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                372,
                                232,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        372,
                                        232,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "i: 查找包含本文件的文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        403,
                        179,
                        416
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                403,
                                179,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        403,
                                        179,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "命令运用举例：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        419,
                        272,
                        432
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                419,
                                273,
                                432
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        419,
                                        273,
                                        432
                                    ],
                                    "type": "text",
                                    "content": "查看函数、宏、枚举等的定义位置：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        435,
                        284,
                        448
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                435,
                                285,
                                448
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        435,
                                        285,
                                        448
                                    ],
                                    "type": "text",
                                    "content": ":cscope find g 函数（宏、枚举）名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        452,
                        284,
                        464
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                451,
                                285,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        451,
                                        285,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "或：:cs find g 函数（宏、枚举）名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        467,
                        430,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                467,
                                431,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        467,
                                        431,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "如执行：cscope find g effective_prio，将显示该函数的实现源码。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        483,
                        272,
                        495
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                483,
                                273,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        483,
                                        273,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "查看函数、宏、枚举等的调用位置：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        499,
                        284,
                        511
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                499,
                                285,
                                512
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        499,
                                        285,
                                        512
                                    ],
                                    "type": "text",
                                    "content": ":cscope find c 函数（宏、枚举）名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        514,
                        284,
                        527
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                513,
                                285,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        513,
                                        285,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "或：:cs find c 函数（宏、枚举）名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        530,
                        498,
                        559
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                528,
                                500,
                                544
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        528,
                                        500,
                                        544
                                    ],
                                    "type": "text",
                                    "content": "如执行：cscope find c effective_prio，将显示所有调用该函数（宏、枚举）的位置，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                545,
                                138,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        545,
                                        138,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        171,
                        576,
                        423,
                        650
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                171,
                                576,
                                423,
                                650
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        171,
                                        576,
                                        423,
                                        650
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                171,
                                                576,
                                                423,
                                                650
                                            ],
                                            "type": "text",
                                            "content": "Cscope tag: effective_priorio\n# line filename / context / line\n1 1761 kernel/sched.c <<wake_up_new_task\np->prio = effective_prio(p);\n2 4098 kernel/sched.c <<set_user_nice>> p->prio = effective_prio(p);\nType number and <Enter> (empty Cancelcs):"
                                        }
                                    ]
                                }
                            ],
                            "index": 26,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 26,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        108,
                        668,
                        284,
                        681
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                669,
                                284,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        669,
                                        284,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "其他命令选项的功能请读者自行实践。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        684,
                        224,
                        697
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                684,
                                224,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        684,
                                        224,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "3）Cscope 中常用快捷键",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        700,
                        503,
                        728
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                700,
                                505,
                                713
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        700,
                                        505,
                                        713
                                    ],
                                    "type": "text",
                                    "content": "在cscope_maps.vim文件中定义了一组快捷键执行前面的命令，具体使用方法请读者自",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                716,
                                149,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        716,
                                        149,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "行上机实践。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        732,
                        204,
                        744
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                731,
                                205,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        731,
                                        205,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "4）返回上一次界面：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        747,
                        273,
                        760
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                748,
                                274,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        748,
                                        274,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "快捷键“ctrl+t”返回上一次界面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 6
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        108,
                        74,
                        456,
                        88
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                73,
                                458,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        73,
                                        458,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "更多功能可通过命令 man cscope 或在 Vim 命令行下运行 help cscope 查询。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        106,
                        196,
                        118
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                105,
                                196,
                                120
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        105,
                                        196,
                                        120
                                    ],
                                    "type": "text",
                                    "content": "6.1.5 source insight",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        136,
                        502,
                        164
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                137,
                                502,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        137,
                                        502,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "Source insight是一款 Windows下的面向项目开发的代码编辑浏览器，它可以自动同",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                151,
                                369,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        151,
                                        369,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "步分析相关源码，为我们的开发及源码分析提供了很大便利。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        179,
                        223,
                        193
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                179,
                                223,
                                194
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        179,
                                        223,
                                        194
                                    ],
                                    "type": "text",
                                    "content": "1.安装 source insight 软件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        211,
                        404,
                        224
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                211,
                                404,
                                224
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        211,
                                        404,
                                        224
                                    ],
                                    "type": "text",
                                    "content": "到网上搜索该软件，可以安装一个 30天免费的版本，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        243,
                        298,
                        255
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                243,
                                297,
                                255
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        243,
                                        297,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "Source Insight 软件下载 一键安装 360软件宝库",
                                    "score": 0.971
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        92,
                        257,
                        413,
                        346
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                92,
                                257,
                                413,
                                346
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        92,
                                        257,
                                        413,
                                        346
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                92,
                                                257,
                                                413,
                                                346
                                            ],
                                            "type": "image",
                                            "image_path": "b966210afb24171ff27802ac0d7dcccb8dfacae1774a68c30c774d44891a0078.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 7
                },
                {
                    "bbox": [
                        111,
                        362,
                        495,
                        391
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                361,
                                495,
                                376
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        361,
                                        495,
                                        376
                                    ],
                                    "type": "text",
                                    "content": "当然，也可以在 linux下通过wine 安装 source insight，安装过程可以参考如下资源：",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                144,
                                379,
                                387,
                                391
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        144,
                                        379,
                                        387,
                                        391
                                    ],
                                    "type": "text",
                                    "content": "http://blog.csdn.net/gaojinshan/article/details/9272123",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        94,
                        393,
                        505,
                        439
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                394,
                                505,
                                407
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        394,
                                        505,
                                        407
                                    ],
                                    "type": "text",
                                    "content": "注意：wine 安装在当前用户目录下，且是隐藏的，用ls -a可见，也可通过图形界面直",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                96,
                                408,
                                506,
                                423
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        408,
                                        506,
                                        423
                                    ],
                                    "type": "text",
                                    "content": "接看。安装好的 sourceinsight 程序放在 wine/driver_c/Program Files(x86)/下。可直接通过点",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                96,
                                424,
                                136,
                                439
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        96,
                                        424,
                                        136,
                                        439
                                    ],
                                    "type": "text",
                                    "content": "击启动。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        486,
                        149,
                        498
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                485,
                                149,
                                499
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        485,
                                        149,
                                        499
                                    ],
                                    "type": "text",
                                    "content": "2. 新建工程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        517,
                        377,
                        545
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 13,
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                517,
                                224,
                                528
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        515,
                                        225,
                                        531
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                515,
                                                225,
                                                531
                                            ],
                                            "type": "text",
                                            "content": "1）运行 source insight",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                532,
                                377,
                                545
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        532,
                                        379,
                                        546
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                532,
                                                379,
                                                546
                                            ],
                                            "type": "text",
                                            "content": "2）选择 project->New project 新建一个工程，如图所示：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "image",
                    "bbox": [
                        91,
                        558,
                        445,
                        654
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                558,
                                445,
                                654
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        558,
                                        445,
                                        654
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                558,
                                                445,
                                                654
                                            ],
                                            "type": "image",
                                            "image_path": "4fd6a303cac45caa797714b44e86cae16f19946ef87fc8968666f3d8f52db573.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 14
                },
                {
                    "bbox": [
                        86,
                        670,
                        506,
                        699
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                671,
                                505,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        671,
                                        505,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "输入新建工程的名字及工程文件的保存路径，单击“OK”关闭该窗口，将同时打开新建",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                687,
                                230,
                                698
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        687,
                                        230,
                                        698
                                    ],
                                    "type": "text",
                                    "content": "工程的设置对话框，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 7
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        91,
                        75,
                        508,
                        426
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                75,
                                508,
                                426
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        75,
                                        508,
                                        426
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                75,
                                                508,
                                                426
                                            ],
                                            "type": "image",
                                            "image_path": "76fec6db73191d2cb4ff810c24067cf91a461e94816244d23d52715c95a68c81.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        86,
                        446,
                        505,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                446,
                                505,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        446,
                                        505,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "3）在上面的设置对话框中，首先设置配置文件，可采用默认设置，也可以选择“Project",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                464,
                                506,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        464,
                                        506,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "has its own configuration file”；然后选择要添加代码的目录，如本示例设置为 linux",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                478,
                                158,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        478,
                                        158,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "源码所在目录：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        94,
                        510,
                        519,
                        549
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                94,
                                510,
                                519,
                                549
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        94,
                                        510,
                                        519,
                                        549
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                94,
                                                510,
                                                519,
                                                549
                                            ],
                                            "type": "image",
                                            "image_path": "70169cfda03b9cc821a7d21997c442a2997def5df6ac33c7be44da8ac9e6c2f0.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 3
                },
                {
                    "bbox": [
                        108,
                        568,
                        440,
                        581
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                569,
                                441,
                                582
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        569,
                                        441,
                                        582
                                    ],
                                    "type": "text",
                                    "content": "最后单击“OK”关闭该对话框，将打开工程文件加载对话框，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 8
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        91,
                        78,
                        507,
                        300
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                91,
                                78,
                                507,
                                300
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        91,
                                        78,
                                        507,
                                        300
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                91,
                                                78,
                                                507,
                                                300
                                            ],
                                            "type": "image",
                                            "image_path": "c393fc5f81f73ab21b845c4e4e345edd9e2f13053e4ed783f4867dbd07e55776.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        86,
                        307,
                        505,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                308,
                                505,
                                321
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        308,
                                        505,
                                        321
                                    ],
                                    "type": "text",
                                    "content": "可直接选择刚才的 linux源码目录，单击“Add Tree”按钮，将递归加入指定目录中所",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                324,
                                243,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        324,
                                        243,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "有文件到工程中。关闭该对话框。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        339,
                        285,
                        351
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                339,
                                285,
                                352
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        339,
                                        285,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "4）“同步”文件或者“重编译”工程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        354,
                        505,
                        400
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                355,
                                502,
                                368
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        355,
                                        502,
                                        368
                                    ],
                                    "type": "text",
                                    "content": "这是很重要的一步，将对代码间调用关系等进行内部初始化。推荐大家进行“重新编译”",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                372,
                                505,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        372,
                                        505,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "工程，这样可以建立一个与路径无关的工程，也就是这个工程拿到哪都可以使用，而同步不",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                388,
                                179,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        388,
                                        179,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "可以。操作方法是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        403,
                        506,
                        448
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                402,
                                506,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        402,
                                        506,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "同步文件：选择 project->synchronize file…，在显示的对话框中你可以选择：Remove",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                419,
                                506,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        419,
                                        506,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "missing files from projcet 和 Suppress warning messages,或者再加上 Force all files",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                434,
                                437,
                                448
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        434,
                                        437,
                                        448
                                    ],
                                    "type": "text",
                                    "content": "to be re-parsed，然后单击“OK”，之后工程中的源码就可以进行关联了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        450,
                        500,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                450,
                                499,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        450,
                                        499,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "重编译工程：选择 project->rebuild project… ，在显示的对话框中，只选择第三项：",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                467,
                                426,
                                480
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        467,
                                        426,
                                        480
                                    ],
                                    "type": "text",
                                    "content": "Re-Create the whole project from scratch,然后单击“OK”就可以了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        495,
                        243,
                        508
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                495,
                                244,
                                509
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        495,
                                        244,
                                        509
                                    ],
                                    "type": "text",
                                    "content": "3.使用 sought insight 查看源码",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 9
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        496,
                        105
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                74,
                                498,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        74,
                                        498,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "启动 soughtinsight，选择 project->Open Project…打开工程，如前面建立的 test",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                94,
                                273,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        94,
                                        273,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "工程，默认是打开三个窗口，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        89,
                        110,
                        508,
                        321
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                110,
                                508,
                                321
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        110,
                                        508,
                                        321
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                110,
                                                508,
                                                321
                                            ],
                                            "type": "image",
                                            "image_path": "42513e383a540bb5e6386f3178deb44d628f914b827c28b5f933adcf355969f2.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 2
                },
                {
                    "bbox": [
                        113,
                        341,
                        214,
                        354
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                342,
                                215,
                                354
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        342,
                                        215,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "（1）查看函数及变量：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        357,
                        505,
                        417
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                357,
                                505,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        357,
                                        505,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "在“工程窗口”中选择并双击一个要查看的文件，将在“文件窗口”显示该文件的所有",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                374,
                                500,
                                386
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        374,
                                        500,
                                        386
                                    ],
                                    "type": "text",
                                    "content": "内容：包含的头文件、定义的变量、函数（包括函数中的变量定义、所调用的其他函数等），",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                389,
                                506,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        389,
                                        506,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "在其中选择一个函数（或变量）并单击，将在“内容窗口”中显示该函数（或变量）的详细",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                405,
                                168,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        405,
                                        168,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "定义，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        89,
                        437,
                        508,
                        613
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                437,
                                508,
                                613
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        437,
                                        508,
                                        613
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                437,
                                                508,
                                                613
                                            ],
                                            "type": "image",
                                            "image_path": "fb4b40848430dc9246725c30e9d9e4a5c647bc258b41a1faf38ec74a3418c551.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 5
                },
                {
                    "bbox": [
                        86,
                        636,
                        504,
                        665
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                636,
                                505,
                                649
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        636,
                                        505,
                                        649
                                    ],
                                    "type": "text",
                                    "content": "此时如果再单击工具栏上的“relation window”，将显示所有调用该函数的位置，如",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                652,
                                189,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        652,
                                        189,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "图中右下角窗口所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 10
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        89,
                        74,
                        509,
                        303
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                74,
                                509,
                                303
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        74,
                                        509,
                                        303
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                74,
                                                509,
                                                303
                                            ],
                                            "type": "image",
                                            "image_path": "521fa64fb51d96ca6e8768cc65be06fae4fb3793b285609fbe993befd385f756.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        113,
                        322,
                        190,
                        334
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                322,
                                190,
                                335
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        322,
                                        190,
                                        335
                                    ],
                                    "type": "text",
                                    "content": "（2）搜索字符串",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        337,
                        505,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                337,
                                505,
                                351
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        337,
                                        505,
                                        351
                                    ],
                                    "type": "text",
                                    "content": "单击工具栏上的“R”按钮，将显示字符串查找窗口“Lookup References”，其中查找",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                354,
                                298,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        354,
                                        298,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "选项“Options”按如图设置即可，如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        370,
                        223,
                        382
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                370,
                                221,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        370,
                                        221,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "（3）使用鼠标右键功能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        385,
                        505,
                        414
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                386,
                                505,
                                398
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        386,
                                        505,
                                        398
                                    ],
                                    "type": "text",
                                    "content": "在source insight中，对任何文件、函数或者变量点击鼠标右键，会显示一个快捷菜",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                401,
                                389,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        401,
                                        389,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "单，能更加方便的实现跳转功能，请大家参考其他相关资料学习。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        88,
                        418,
                        459,
                        645
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                418,
                                459,
                                645
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        418,
                                        459,
                                        645
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                418,
                                                459,
                                                645
                                            ],
                                            "type": "image",
                                            "image_path": "944d196d99288cc023949a198d0b741ab2b900b3642b9ea4fab3e55e37f8da63.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 6
                },
                {
                    "bbox": [
                        108,
                        650,
                        415,
                        664
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                650,
                                415,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        650,
                                        415,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "如查找“effective_prio”,单击“Search”后显示结果如图所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 11
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        88,
                        73,
                        508,
                        180
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                73,
                                508,
                                180
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        73,
                                        508,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                73,
                                                508,
                                                180
                                            ],
                                            "type": "image",
                                            "image_path": "bc6e2c47242f2e9fca0219e263bef1d2411166f22d5e435e0f14c52b3a5e8680.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        86,
                        196,
                        505,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                197,
                                505,
                                210
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        197,
                                        505,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "点击左边或工具栏中的红色小按钮就可以展开内容，其中工具栏中的按钮下面还有一个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                213,
                                484,
                                226
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        213,
                                        484,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "红色的“向左箭头”和“向右箭头”，标明一个向前，一个向后依次打开，非常方便。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        248,
                        269,
                        264
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                247,
                                269,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        247,
                                        269,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "6.2 linux 中的汇编语言",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        287,
                        505,
                        333
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                288,
                                505,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        288,
                                        505,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "虽然Linux内核的绝大部分代码是用 C 语言编写的，但仍然不可避免地在某些关键地",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                303,
                                505,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        303,
                                        505,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "方使用了汇编代码，其中主要是在 Linux 的启动部分。Linux主要使用AT&T汇编语言，它",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                320,
                                499,
                                333
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        320,
                                        499,
                                        333
                                    ],
                                    "type": "text",
                                    "content": "与intel汇编大同小异，为方便大家阅读源码，下面简单介绍 AT&T汇编的一些基本知识。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        351,
                        283,
                        364
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                352,
                                283,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        352,
                                        283,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "6.2.1 AT&T 与 intel 汇编的语法格式比较",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        382,
                        232,
                        395
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                383,
                                232,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        383,
                                        232,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "1. 寄存器及立即数的前缀",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        412,
                        505,
                        441
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                412,
                                506,
                                426
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        412,
                                        506,
                                        426
                                    ],
                                    "type": "text",
                                    "content": "在 AT&T 汇编格式中，寄存器名前要冠以 “%”，立即数前要冠以“$”；而在 Intel 汇",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                428,
                                336,
                                441
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        428,
                                        336,
                                        441
                                    ],
                                    "type": "text",
                                    "content": "编格式中，寄存器名及立即数都不需要加前缀。例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        122,
                        442,
                        424,
                        510
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                122,
                                442,
                                424,
                                510
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        442,
                                        424,
                                        510
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                442,
                                                424,
                                                510
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>AT&amp;T 格式</td><td>Intel 格式</td></tr><tr><td>pushl %eax</td><td>push eax</td></tr><tr><td>pushl $1</td><td>push 1</td></tr></table>",
                                            "image_path": "dea4555304cbce1723f54c3c6fb58b97f6419d4640b30a694c9dd9edd2a82838.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 8
                },
                {
                    "bbox": [
                        105,
                        528,
                        189,
                        541
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                528,
                                190,
                                541
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        528,
                                        190,
                                        541
                                    ],
                                    "type": "text",
                                    "content": "2. 操作数的方向",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        558,
                        505,
                        601
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                559,
                                505,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        559,
                                        505,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "AT&T 和 Intel 格式中的源操作数和目标操作数的位置正好相反。在 Intel 汇编格式",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                575,
                                500,
                                586
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        575,
                                        500,
                                        586
                                    ],
                                    "type": "text",
                                    "content": "中，目标操作数在源操作数的左边；而在 AT&T 汇编格式中，目标操作数在源操作数的右边。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                588,
                                117,
                                604
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        588,
                                        117,
                                        604
                                    ],
                                    "type": "text",
                                    "content": "例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        121,
                        603,
                        424,
                        649
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                121,
                                603,
                                424,
                                649
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        603,
                                        424,
                                        649
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                603,
                                                424,
                                                649
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>AT&amp;T 格式</td><td>Intel 格式</td></tr><tr><td>add1 $1, %eax</td><td>add eax, 1</td></tr></table>",
                                            "image_path": "d34f4a1407f7e75fadb3952c3810975428d129585c23c4d7a291b48c57124364.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 11
                },
                {
                    "bbox": [
                        105,
                        666,
                        190,
                        680
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                667,
                                189,
                                680
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        667,
                                        189,
                                        680
                                    ],
                                    "type": "text",
                                    "content": "3. 操作数的字长",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        697,
                        502,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                697,
                                503,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        697,
                                        503,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "在 AT&T 汇编格式中，操作数的字长由操作符的最后一个字母决定，后缀'b'、'w'、'l",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                714,
                                500,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        714,
                                        500,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "分别表示操作数为字节（byte，8 比特）、字（word，16 比特）和长字（long，32 比特）；",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                729,
                                500,
                                741
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        729,
                                        500,
                                        741
                                    ],
                                    "type": "text",
                                    "content": "而在 Intel 汇编格式中，操作数的字长是用 \"byte ptr\" 和 \"word ptr\" 等前缀来表示的。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                743,
                                117,
                                759
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        743,
                                        117,
                                        759
                                    ],
                                    "type": "text",
                                    "content": "例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 12
        },
        {
            "para_blocks": [
                {
                    "type": "table",
                    "bbox": [
                        121,
                        71,
                        424,
                        118
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                121,
                                71,
                                424,
                                118
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        71,
                                        424,
                                        118
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                71,
                                                424,
                                                118
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>AT&amp;T 格式</td><td>Intel 格式</td></tr><tr><td>movb val, %a1</td><td>mov al, byte ptr val</td></tr></table>",
                                            "image_path": "1f4bb0efe3b9d9fc24f6bdb32f596e5d6c8697dfa185231ee792620a94782180.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        105,
                        135,
                        240,
                        149
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                134,
                                240,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        134,
                                        240,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "4. Jump 和 call 指令的前缀",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        164,
                        504,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                165,
                                505,
                                178
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        165,
                                        505,
                                        178
                                    ],
                                    "type": "text",
                                    "content": "在 AT&T 汇编格式中，绝对转移和调用指令（jump/call）的操作数前要加上'*'作为前",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                182,
                                248,
                                193
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        182,
                                        248,
                                        193
                                    ],
                                    "type": "text",
                                    "content": "缀，而在 Intel 格式中则不需要。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        212,
                        201,
                        227
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                212,
                                200,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        212,
                                        200,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "5. 内存单元操作数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        243,
                        505,
                        270
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                243,
                                505,
                                255
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        243,
                                        505,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "内存单元操作数的寻址方式是间接寻址。在 AT&T 汇编格式中，基址寄存器用（）括起",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                259,
                                252,
                                271
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        259,
                                        252,
                                        271
                                    ],
                                    "type": "text",
                                    "content": "来，而Intel中用[]括起来。例如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        121,
                        272,
                        424,
                        341
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                121,
                                272,
                                424,
                                341
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        272,
                                        424,
                                        341
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                272,
                                                424,
                                                341
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>AT&amp;T 格式</td><td>Intel 格式</td></tr><tr><td>movl -4(%ebp), %eax</td><td>mov eax, [ebp - 4]</td></tr><tr><td>movl 5(%ebx),%eax</td><td>mov eax, [ebx+5]</td></tr></table>",
                                            "image_path": "9bbd2ad3da6ffe9a463e5a1b789c89043941b21c83e8976dfc904f8e0fceb0e1.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 6
                },
                {
                    "bbox": [
                        86,
                        358,
                        193,
                        371
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                357,
                                193,
                                372
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        357,
                                        193,
                                        372
                                    ],
                                    "type": "text",
                                    "content": "6.2.2 Gcc 嵌入式汇编",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        387,
                        505,
                        433
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                389,
                                505,
                                400
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        389,
                                        505,
                                        400
                                    ],
                                    "type": "text",
                                    "content": "Linux 下用汇编语言编写的代码具有两种不同的形式。第一种是整个程序全部用汇编语",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                404,
                                505,
                                417
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        404,
                                        505,
                                        417
                                    ],
                                    "type": "text",
                                    "content": "言编写；第二种是内嵌的汇编代码，指嵌入到C 语言程序中的汇编代码片段。下面介绍gcc",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                420,
                                200,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        420,
                                        200,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "嵌入式汇编的相关知识。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        451,
                        235,
                        464
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                451,
                                235,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        451,
                                        235,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "1. 嵌入式汇编的一般形式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        481,
                        368,
                        494
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                480,
                                370,
                                495
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        483,
                                        139,
                                        494
                                    ],
                                    "type": "text",
                                    "content": "asm",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        148,
                                        481,
                                        308,
                                        495
                                    ],
                                    "type": "text",
                                    "content": "__volatile__(\"asm statements\"",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        324,
                                        480,
                                        370,
                                        495
                                    ],
                                    "type": "text",
                                    "content": "//指令部",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        497,
                        279,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                497,
                                280,
                                512
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        497,
                                        280,
                                        512
                                    ],
                                    "type": "text",
                                    "content": ": outputs （optional） //输出部",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        513,
                        274,
                        526
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                512,
                                276,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        512,
                                        276,
                                        528
                                    ],
                                    "type": "text",
                                    "content": ": inputs （optional） //输入部",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        529,
                        279,
                        541
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                528,
                                280,
                                543
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        528,
                                        280,
                                        543
                                    ],
                                    "type": "text",
                                    "content": ": modified （optional） //修改部",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        109,
                        545,
                        120,
                        556
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": []
                },
                {
                    "bbox": [
                        108,
                        560,
                        293,
                        573
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                561,
                                294,
                                574
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        561,
                                        294,
                                        574
                                    ],
                                    "type": "text",
                                    "content": "下面对语句格式的各部分分别进行说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        577,
                        174,
                        589
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                575,
                                169,
                                592
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        575,
                                        169,
                                        592
                                    ],
                                    "type": "text",
                                    "content": "（1）__asm_",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        592,
                        383,
                        605
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                592,
                                384,
                                606
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        592,
                                        384,
                                        606
                                    ],
                                    "type": "text",
                                    "content": "表示汇编代码的开始，也可以写成“asm”，两者完全相同。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        608,
                        201,
                        621
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                605,
                                200,
                                624
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        605,
                                        200,
                                        624
                                    ],
                                    "type": "text",
                                    "content": "（2）__volatile__",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        624,
                        483,
                        636
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                624,
                                484,
                                637
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        624,
                                        484,
                                        637
                                    ],
                                    "type": "text",
                                    "content": "这是一个可选项，它告诉编译器不要优化该汇编语句，主要用于硬件级程序设计。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        640,
                        263,
                        652
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                639,
                                263,
                                654
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        639,
                                        263,
                                        654
                                    ],
                                    "type": "text",
                                    "content": "（3）指令部：\"asm statements\"",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        655,
                        500,
                        684
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                656,
                                501,
                                669
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        656,
                                        501,
                                        669
                                    ],
                                    "type": "text",
                                    "content": "是汇编指令部分，可以是一条或多条指令。如果是多条指令，则指令间需要使用“\\n\\t”",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                671,
                                138,
                                685
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        671,
                                        138,
                                        685
                                    ],
                                    "type": "text",
                                    "content": "进行分隔。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        687,
                        296,
                        701
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                687,
                                296,
                                702
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        687,
                                        296,
                                        702
                                    ],
                                    "type": "text",
                                    "content": "如读 CR0 寄存器的 read_cr0()的定义为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        703,
                        330,
                        716
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                703,
                                330,
                                718
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        703,
                                        330,
                                        718
                                    ],
                                    "type": "text",
                                    "content": "static inline unsigned long read_cr0(void)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        719,
                        119,
                        731
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                720,
                                119,
                                733
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        720,
                                        119,
                                        733
                                    ],
                                    "type": "text",
                                    "content": "{",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        139,
                        735,
                        374,
                        748
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                140,
                                735,
                                375,
                                749
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        140,
                                        735,
                                        375,
                                        749
                                    ],
                                    "type": "text",
                                    "content": "unsigned long cr0; //汇编内部定义的局部变量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        139,
                        751,
                        468,
                        765
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                139,
                                750,
                                470,
                                766
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        139,
                                        750,
                                        271,
                                        766
                                    ],
                                    "type": "text",
                                    "content": "asm volatile(\"movq %%cr0,",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        271,
                                        751,
                                        289,
                                        764
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 0 ^ { \\prime \\prime }",
                                    "score": 0.5
                                },
                                {
                                    "bbox": [
                                        290,
                                        750,
                                        302,
                                        766
                                    ],
                                    "type": "text",
                                    "content": ":",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        302,
                                        751,
                                        327,
                                        764
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\prime \\prime = \\mathrm { r } ^ { \\prime \\prime }",
                                    "score": 0.74
                                },
                                {
                                    "bbox": [
                                        327,
                                        750,
                                        470,
                                        766
                                    ],
                                    "type": "text",
                                    "content": "(cr0)); // 嵌入式汇编语句",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 13
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        108,
                        74,
                        199,
                        102
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                74,
                                199,
                                102
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        74,
                                        199,
                                        102
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                74,
                                                199,
                                                102
                                            ],
                                            "type": "text",
                                            "content": "return cr0;"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "lua"
                },
                {
                    "bbox": [
                        86,
                        105,
                        511,
                        184
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                106,
                                509,
                                117
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        106,
                                        509,
                                        117
                                    ],
                                    "type": "text",
                                    "content": "使用嵌入式汇编时，汇编语句中的操作数如何与 C 代码中的变量相结合是个很大的问题。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                122,
                                502,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        122,
                                        502,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "GCC的解决方法是：需要使用指定寄存器的值时，寄存器名前面应该加上两个'%'，如示例",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                137,
                                506,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        137,
                                        199,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "中的“%%cr0”表示使用",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        199,
                                        137,
                                        217,
                                        150
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrm { c r 0 }",
                                    "score": 0.73
                                },
                                {
                                    "bbox": [
                                        218,
                                        137,
                                        506,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "寄存器；需要使用C代码中的变量时，采用加上前缀“%”的数",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                154,
                                505,
                                165
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        154,
                                        505,
                                        165
                                    ],
                                    "type": "text",
                                    "content": "字(如%0，%1)来表示，其中数字是从输出部的第一个约束开始从 0依次编号。如示例汇编语",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                169,
                                310,
                                182
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        169,
                                        310,
                                        182
                                    ],
                                    "type": "text",
                                    "content": "句中的操作数“%0”对应输出部的“cr0”变量。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        200,
                        290,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                200,
                                290,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        200,
                                        290,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "（4）输出部：: outputs （optional）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        216,
                        506,
                        262
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                218,
                                505,
                                229
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        218,
                                        505,
                                        229
                                    ],
                                    "type": "text",
                                    "content": "输出部分用于规定输出变量（目标操作数）如何与汇编语句中的操作数相结合的约束条",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                232,
                                504,
                                244
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        232,
                                        318,
                                        244
                                    ],
                                    "type": "text",
                                    "content": "件，可以有多个约束，以逗号分开。每个约束以“",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        319,
                                        232,
                                        333,
                                        243
                                    ],
                                    "type": "inline_equation",
                                    "content": "= ^ { \\mathfrak { p } }",
                                    "score": 0.52
                                },
                                {
                                    "bbox": [
                                        333,
                                        232,
                                        504,
                                        244
                                    ],
                                    "type": "text",
                                    "content": "开头（表示只用输出），接着用一个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                248,
                                348,
                                261
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        248,
                                        348,
                                        261
                                    ],
                                    "type": "text",
                                    "content": "字母来表示操作数的类型，最后用“（）”说明变量名。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        264,
                        168,
                        277
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                264,
                                168,
                                278
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        264,
                                        168,
                                        278
                                    ],
                                    "type": "text",
                                    "content": "如上例中的：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        130,
                        280,
                        193,
                        293
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                130,
                                280,
                                193,
                                293
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        280,
                                        193,
                                        293
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                280,
                                                193,
                                                293
                                            ],
                                            "type": "text",
                                            "content": "： "
                                        },
                                        {
                                            "bbox": [
                                                130,
                                                280,
                                                193,
                                                293
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathbf{\\Pi}^{\\prime \\prime} = \\mathbf{r}^{\\prime \\prime}"
                                        },
                                        {
                                            "bbox": [
                                                130,
                                                280,
                                                193,
                                                293
                                            ],
                                            "type": "text",
                                            "content": " (cr0)"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        86,
                        296,
                        500,
                        325
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                134,
                                295,
                                499,
                                310
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        134,
                                        295,
                                        139,
                                        310
                                    ],
                                    "type": "text",
                                    "content": "“",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        139,
                                        296,
                                        159,
                                        308
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathit { \\Omega } ^ { \\prime } = \\mathrm { { r } } ^ { \\prime \\prime }",
                                    "score": 0.72
                                },
                                {
                                    "bbox": [
                                        159,
                                        295,
                                        499,
                                        310
                                    ],
                                    "type": "text",
                                    "content": "表示相应的目标操作数（指令部分的“%0”）可以使用任何一个通用寄存器；",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                312,
                                253,
                                325
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        312,
                                        132,
                                        325
                                    ],
                                    "type": "text",
                                    "content": "并且变量",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        133,
                                        312,
                                        151,
                                        324
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrm { c r 0 }",
                                    "score": 0.6
                                },
                                {
                                    "bbox": [
                                        151,
                                        312,
                                        253,
                                        325
                                    ],
                                    "type": "text",
                                    "content": "存放在这个寄存器中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        327,
                        351,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                327,
                                352,
                                342
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        327,
                                        352,
                                        342
                                    ],
                                    "type": "text",
                                    "content": "实际上，除“=”外，还有其他保留字，相关含义是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        137,
                        341,
                        467,
                        409
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                137,
                                341,
                                467,
                                409
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        137,
                                        341,
                                        467,
                                        409
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                137,
                                                341,
                                                467,
                                                409
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>保留字</td><td>含义</td></tr><tr><td>=</td><td>只写/输出变量</td></tr><tr><td>+</td><td>可读可写变量</td></tr><tr><td>&amp;</td><td>该输出操作数不能使用输入操作数相同的寄存器</td></tr></table>",
                                            "image_path": "e33a4d7802d2fb176ad08d6c1657f7ab7a09e0d6d4f2bab3d0be4fad18ef3d14.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 9
                },
                {
                    "bbox": [
                        108,
                        426,
                        324,
                        439
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                426,
                                325,
                                439
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        426,
                                        325,
                                        439
                                    ],
                                    "type": "text",
                                    "content": "下表中列举了x86 中最常用的约束字母及含义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        109,
                        439,
                        467,
                        572
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                109,
                                439,
                                467,
                                572
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        439,
                                        467,
                                        572
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                439,
                                                467,
                                                572
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>约束字母</td><td>含义</td></tr><tr><td>m, v, o</td><td>表示内存单元</td></tr><tr><td>r</td><td>任意通用寄存器</td></tr><tr><td>q</td><td>寄存器EAX/EBX/ECX/EDX之一</td></tr><tr><td>a, b, c, d</td><td>表示寄存器EAX/EBX/ECX/EDX</td></tr><tr><td>S, D</td><td>寄存器ESI或EDI</td></tr><tr><td>A</td><td>与a+b相同，使用EAX与EBX联合，形成一个64位寄存器</td></tr><tr><td>I</td><td>常数0-31</td></tr></table>",
                                            "image_path": "4fe52aecfae56fa250b6cccc25919b7ee34765984b0626b6a0612cf285479a5a.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 11
                },
                {
                    "bbox": [
                        113,
                        589,
                        284,
                        602
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                588,
                                286,
                                604
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        588,
                                        286,
                                        604
                                    ],
                                    "type": "text",
                                    "content": "（5）输入部：: inputs （optional）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        605,
                        505,
                        697
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                605,
                                499,
                                618
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        605,
                                        499,
                                        618
                                    ],
                                    "type": "text",
                                    "content": "输入约束格式与输出约束相似，但是没有“=”号。如果一个输入约束要求使用寄存器，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                622,
                                505,
                                633
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        622,
                                        505,
                                        633
                                    ],
                                    "type": "text",
                                    "content": "则GCC在预处理时就会为之分配一个寄存器，并插入必要的指令将操作数装入该寄存器。如",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                639,
                                499,
                                650
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        639,
                                        499,
                                        650
                                    ],
                                    "type": "text",
                                    "content": "果输入部某个操作数所要求使用的寄存器与前面输出部某个操作数所要求的是同一个寄存",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                653,
                                505,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        653,
                                        505,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "器，就把输出部对应操作数的编号（如“0”、“1”等）放在输入部中相应位置，但在输入",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                669,
                                505,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        669,
                                        505,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "部中的参数编号需要另外从新编号。程序样例见后面“linux源码中嵌入式汇编举例”中的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                686,
                                174,
                                697
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        686,
                                        174,
                                        697
                                    ],
                                    "type": "text",
                                    "content": "switch_to()函数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        700,
                        348,
                        714
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                699,
                                348,
                                715
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        699,
                                        348,
                                        715
                                    ],
                                    "type": "text",
                                    "content": "（6）修改部：: registers_modified （optional）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        714,
                        506,
                        743
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                716,
                                504,
                                727
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        716,
                                        504,
                                        727
                                    ],
                                    "type": "text",
                                    "content": "汇编语句在执行过程中可能会修改某些寄存器或者内存单元的值，在这里进行列出。一",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                730,
                                298,
                                743
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        730,
                                        298,
                                        743
                                    ],
                                    "type": "text",
                                    "content": "般是\"memory\",表示内存发现变化：:\"memory\"",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 14
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        502,
                        100
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                72,
                                502,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        72,
                                        502,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "此外还有 cc,表示改变条件代码寄存器(condition code register),或者某个寄存",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                88,
                                139,
                                102
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        88,
                                        139,
                                        102
                                    ],
                                    "type": "text",
                                    "content": "器名字等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        105,
                        505,
                        149
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                105,
                                505,
                                117
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        105,
                                        505,
                                        117
                                    ],
                                    "type": "text",
                                    "content": "需要说明的是，上述各部分中，指令部是必须的，输入部、输出部及修改部是可选的，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                121,
                                505,
                                134
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        121,
                                        505,
                                        134
                                    ],
                                    "type": "text",
                                    "content": "当输入部存在，而输出部不存在时，冒号“:”要保留；当修改部存在时，三个冒号都要保",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                137,
                                195,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        137,
                                        195,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "留。如宏定义__cli()：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        153,
                        429,
                        166
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                153,
                                429,
                                166
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        153,
                                        429,
                                        166
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                153,
                                                429,
                                                166
                                            ],
                                            "type": "text",
                                            "content": "define __cli() __asm__ __volatile__( \"cli\": : : \"memory\")"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "yaml"
                },
                {
                    "bbox": [
                        86,
                        168,
                        505,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                169,
                                505,
                                182
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        169,
                                        505,
                                        182
                                    ],
                                    "type": "text",
                                    "content": "下面是一个简单的嵌入式汇编程序，其功能是将变量 a 的值赋予变量 b，请大家自行分",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                182,
                                107,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        182,
                                        107,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "析：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        200,
                        380,
                        372
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                200,
                                380,
                                372
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        200,
                                        380,
                                        372
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "text",
                                            "content": "/\\*Embedded.c\\*/   \nint main()   \n{ int "
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm{a} = 10"
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "text",
                                            "content": " ， "
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm{b} = 0"
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "text",
                                            "content": " ： _asm_ volatile_(\"movl %1,%%eax;\\\\n\\\\r\" \"movl%%eax， "
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\% 0"
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "text",
                                            "content": " ： "
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "inline_equation",
                                            "content": "^{\\prime \\prime} = \\mathrm{r}^{\\prime \\prime}(\\mathrm{b})"
                                        },
                                        {
                                            "bbox": [
                                                107,
                                                200,
                                                380,
                                                372
                                            ],
                                            "type": "text",
                                            "content": " /\\*输出部\\*/ :\"\\r\"(a) /\\*输入部\\*/ :\"\\%eax\"); /\\*修改部\\*/ printf(\"Result:%d,%d\\\\n\",a,b);   \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        108,
                        390,
                        263,
                        403
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                391,
                                264,
                                405
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        391,
                                        264,
                                        405
                                    ],
                                    "type": "text",
                                    "content": "2. Linux 源码中嵌入式汇编举例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        420,
                        183,
                        433
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                420,
                                185,
                                433
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        420,
                                        185,
                                        433
                                    ],
                                    "type": "text",
                                    "content": "（1）简单应用：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        436,
                        473,
                        497
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                436,
                                473,
                                497
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        436,
                                        473,
                                        497
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                436,
                                                473,
                                                497
                                            ],
                                            "type": "text",
                                            "content": "define __save_flags(x) \\  \nasm volatile (\"stc ccr, %w0\": \"=r\" (x)) //将 flags 值压栈  \n#define __restore_flags(x) \\  \nasm volatile (\"ldc %w0, ccr\": \"r\" (x)) //恢复 flags 值到 cpu 中"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        113,
                        500,
                        183,
                        513
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                500,
                                185,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        500,
                                        185,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "（2）复杂应用：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        515,
                        500,
                        752
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                515,
                                500,
                                752
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        515,
                                        500,
                                        752
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                515,
                                                500,
                                                752
                                            ],
                                            "type": "text",
                                            "content": "static inline int strcmp(const char *cs, const char *ct)  \n{  \n    char res;  \n    asm(\"\\n\")  \n    \"1: move.b (%0)+,%2\\n\" /* get *cs */  \n    \" cmp.b (%1)+,%2\\n\" /* compare a byte */  \n    \" jne 2f\\n\" /* not equal, break out */  \n    \" tst.b %2\\n\" /* at end of cs? */  \n    \" jne 1b\\n\" /* no, keep going */  \n    \" jra 3f\\n\" /* strings are equal */  \n    \"2: sub.b -(%1),%2\\n\" /* *cs - *ct */  \n    \"3:\"  \n        : \"+\" (cs), \"+\" (ct), \"=\" (res));  \n    return res;"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "c"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 15
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        74,
                        505,
                        102
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                73,
                                506,
                                88
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        73,
                                        506,
                                        88
                                    ],
                                    "type": "text",
                                    "content": "第二个例子是函数 switch_to()（include/asm-x86/system_32.h 文件中），它是 linux",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                90,
                                200,
                                103
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        90,
                                        200,
                                        103
                                    ],
                                    "type": "text",
                                    "content": "上下文切换的核心部分：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        105,
                        505,
                        404
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                105,
                                505,
                                404
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        105,
                                        505,
                                        404
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                105,
                                                505,
                                                404
                                            ],
                                            "type": "text",
                                            "content": "1 extern struct task_struct *FASTCALL(_switch_to(struct task_struct *prev, struct task_struct *next));  \n2 #define switch_to(prev, next, last) do {  \n3 unsigned long esi,EDI;  \n4 asm volatile(\"pushfl\\n\\t\" /* Save flags */  \n5 \"pushl%%ebp\\n\\t\"  \n6 \"mov1%%esp,%0\\n\\t\" /* save ESP */  \n7 \"mov1%5,%%esp\\n\\t\" /* restore ESP */  \n8 \"mov1$1f,%1\\n\\t\" /* save EIP */  \n9 \"push1%6\\n\\t\" /* restore EIP */  \n10 \"jmp __switch_to\\n\"  \n11 \"1:\\t\"  \n12 \"pop1%%ebp\\n\\t\"  \n13 \"popfl\"  \n14 :=\"m\" (prev->thread.asp), \"=\"m\" (prev->thread.eip),  \n15 :=a\" (last),\"=S\" (esi), \"=\"D\" (edi)  \n16 : \"m\" (next->thread.asp), \"m\" (next->thread.eip),  \n17 \"2\" (prev), \"d\" (next));  \n18 } while (0)"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 2,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        108,
                        407,
                        240,
                        420
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                408,
                                241,
                                419
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        408,
                                        241,
                                        419
                                    ],
                                    "type": "text",
                                    "content": "下面对上述代码做简单介绍：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        423,
                        505,
                        451
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                423,
                                505,
                                437
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        423,
                                        505,
                                        437
                                    ],
                                    "type": "text",
                                    "content": "第 1 行：FASTCALL 告诉编译程序使用 register 传递参数，而“asmlinkage”标记则要",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                439,
                                200,
                                452
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        439,
                                        200,
                                        452
                                    ],
                                    "type": "text",
                                    "content": "求采用stack传递参数；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        455,
                        267,
                        467
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                456,
                                267,
                                468
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        456,
                                        267,
                                        468
                                    ],
                                    "type": "text",
                                    "content": "第11行：参数1 被用作返回地址；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        471,
                        496,
                        499
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                470,
                                498,
                                485
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        470,
                                        498,
                                        485
                                    ],
                                    "type": "text",
                                    "content": "第 14-15 行：输出参数部分，各参数 prev->thread.esp、prev->thread.eip、last、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                486,
                                329,
                                501
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        486,
                                        226,
                                        501
                                    ],
                                    "type": "text",
                                    "content": "esi、edi 对应的编号分别是：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        226,
                                        487,
                                        239,
                                        499
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 0",
                                    "score": 0.57
                                },
                                {
                                    "bbox": [
                                        240,
                                        486,
                                        268,
                                        501
                                    ],
                                    "type": "text",
                                    "content": "、%1、",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        269,
                                        487,
                                        282,
                                        498
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 2",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        282,
                                        486,
                                        329,
                                        501
                                    ],
                                    "type": "text",
                                    "content": "、%3、%4；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        502,
                        501,
                        547
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                502,
                                497,
                                516
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        502,
                                        497,
                                        516
                                    ],
                                    "type": "text",
                                    "content": "第 16-17 行：输入参数部分，各参数 next->thread.esp、next->thread.eip、prev、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                519,
                                502,
                                532
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        519,
                                        205,
                                        532
                                    ],
                                    "type": "text",
                                    "content": "next对应的编号分别是：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        205,
                                        519,
                                        218,
                                        531
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 5",
                                    "score": 0.72
                                },
                                {
                                    "bbox": [
                                        218,
                                        519,
                                        268,
                                        532
                                    ],
                                    "type": "text",
                                    "content": "、%6、%7、",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        268,
                                        519,
                                        282,
                                        531
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\% 8",
                                    "score": 0.53
                                },
                                {
                                    "bbox": [
                                        282,
                                        519,
                                        502,
                                        532
                                    ],
                                    "type": "text",
                                    "content": "，其中 34行上的参数prev与输出部中的 2号参",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                534,
                                327,
                                547
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        534,
                                        327,
                                        547
                                    ],
                                    "type": "text",
                                    "content": "数使用同一寄存器eax，所以在约束位置填写“2”。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        581,
                        196,
                        595
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                582,
                                196,
                                595
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        582,
                                        196,
                                        595
                                    ],
                                    "type": "text",
                                    "content": "6.3 特殊的C 语言用法",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        613,
                        212,
                        626
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                613,
                                213,
                                628
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        613,
                                        213,
                                        628
                                    ],
                                    "type": "text",
                                    "content": "1.asmlinkage 及 FASTCALL",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        643,
                        505,
                        672
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                645,
                                505,
                                656
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        645,
                                        505,
                                        656
                                    ],
                                    "type": "text",
                                    "content": "asmlinkage告诉编译程序使用堆栈传递参数，而FASTCALL通知编译程序使用通用寄存",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                659,
                                149,
                                672
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        659,
                                        149,
                                        672
                                    ],
                                    "type": "text",
                                    "content": "器传递参数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        676,
                        209,
                        687
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                676,
                                210,
                                688
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        676,
                                        210,
                                        688
                                    ],
                                    "type": "text",
                                    "content": "如获取系统时间函数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        692,
                        445,
                        719
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                692,
                                445,
                                719
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        692,
                                        445,
                                        719
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                692,
                                                445,
                                                719
                                            ],
                                            "type": "text",
                                            "content": "asmlinkage long sys_gettimeofday(struct timeval __user *tv, structtimezone __user *tz)"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        108,
                        724,
                        210,
                        735
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                724,
                                210,
                                736
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        724,
                                        210,
                                        736
                                    ],
                                    "type": "text",
                                    "content": "实现上下文切换函数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        740,
                        502,
                        768
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                740,
                                502,
                                768
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        740,
                                        502,
                                        768
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                740,
                                                502,
                                                768
                                            ],
                                            "type": "text",
                                            "content": "struct task_struct FASTCALL * __switch_to(struct task_struct *prev_p, struct task_struct *next_p)"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 16
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        117,
                        88
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                75,
                                119,
                                90
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        75,
                                        119,
                                        90
                                    ],
                                    "type": "text",
                                    "content": "2. UL",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        105,
                        504,
                        134
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                106,
                                505,
                                119
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        106,
                                        505,
                                        119
                                    ],
                                    "type": "text",
                                    "content": "UL 常被用在数值常数后，标明该常数是“unsigned long”类型，以保证特定体系结构",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                121,
                                315,
                                134
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        121,
                                        315,
                                        134
                                    ],
                                    "type": "text",
                                    "content": "内的数据不会溢出其数据类型所规定的范围。如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        137,
                        504,
                        150
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                137,
                                505,
                                151
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        138,
                                        260,
                                        149
                                    ],
                                    "type": "text",
                                    "content": "#define SLAB_RECLAIM_ACCOUNT",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        276,
                                        137,
                                        505,
                                        151
                                    ],
                                    "type": "text",
                                    "content": "0x00020000UL /* Objects are reclaimable */",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        169,
                        175,
                        181
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                168,
                                176,
                                183
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        168,
                                        176,
                                        183
                                    ],
                                    "type": "text",
                                    "content": "3. static inline",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        199,
                        504,
                        243
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                199,
                                505,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        199,
                                        505,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "被关键字static inline修饰的函数建议gcc在编译时将其代码插入到所有调用它的程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                215,
                                505,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        215,
                                        505,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "序中，从而节省了函数调用的开销。但使用inline会增加二进制映像的大学，可能会降低",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                231,
                                212,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        231,
                                        212,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "访问CPU高速缓存的速度。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        263,
                        185,
                        275
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                261,
                                186,
                                277
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        261,
                                        186,
                                        277
                                    ],
                                    "type": "text",
                                    "content": "4.const 和 volatile",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        292,
                        504,
                        337
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                292,
                                505,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        292,
                                        505,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "const不一定只代表常数，有时也表示“只读”的意思。如“const int *x”中，x是",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                306,
                                503,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        306,
                                        503,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "一个指向 const 整数的指针，可以修改该指针，但不能修改这个整数；而在“int const *x”",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                324,
                                436,
                                337
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        324,
                                        436,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "中，x是一个指向整数的const指针，可以修改该整数，但不能修改指针x。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        339,
                        504,
                        368
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                339,
                                505,
                                352
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        339,
                                        505,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "关键字volatile 通知编译程序每次使用被它修饰的变量时都要重新加载其值，而不是",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                355,
                                190,
                                368
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        355,
                                        190,
                                        368
                                    ],
                                    "type": "text",
                                    "content": "存储并访问一个副本。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        387,
                        142,
                        400
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                87,
                                386,
                                145,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        386,
                                        145,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "5.宏__init",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        417,
                        504,
                        461
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                417,
                                504,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        417,
                                        504,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "宏__init告诉编译程序相关的函数和变量仅用于初始化。编译程序将标有__init的所",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                433,
                                505,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        433,
                                        505,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "有代码存储到特殊的内存段中，初始化结束后就释放这段内存。如编写模块代码的初始化函",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                449,
                                189,
                                461
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        449,
                                        189,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "数时，可以这样定义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        467,
                        304,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                466,
                                305,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        466,
                                        305,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "static int __init mymodule_init(void)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        482,
                        504,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                482,
                                505,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        482,
                                        505,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "与之类似，如果某些数据也只在初始化时才用到，则可将其标记为__initdata。如ESP",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                498,
                                168,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        498,
                                        168,
                                        510
                                    ],
                                    "type": "text",
                                    "content": "设备驱动程序中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        515,
                        211,
                        527
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                514,
                                211,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        514,
                                        211,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "drivers/char/esp.c",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        530,
                        451,
                        543
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                528,
                                453,
                                544
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        528,
                                        333,
                                        544
                                    ],
                                    "type": "text",
                                    "content": "109 static char serial_name[] __initdata",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        333,
                                        531,
                                        344,
                                        541
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.65
                                },
                                {
                                    "bbox": [
                                        344,
                                        528,
                                        453,
                                        544
                                    ],
                                    "type": "text",
                                    "content": "\"ESP serial driver\";",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        546,
                        393,
                        558
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                544,
                                389,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        544,
                                        349,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "110 static char serial_version[] __initdata",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        349,
                                        545,
                                        389,
                                        558
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\it { \\Delta } = \\it { \\Delta } ^ { \\prime \\prime } 2 . \\it { \\Delta } 2 ^ { \\prime \\prime }",
                                    "score": 0.86
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        561,
                        504,
                        591
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                562,
                                505,
                                575
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        562,
                                        505,
                                        575
                                    ],
                                    "type": "text",
                                    "content": "同样，宏__exit和__exitdata仅用于退出和关闭例程，一般在注销设备驱动程序或模",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                576,
                                149,
                                592
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        576,
                                        149,
                                        592
                                    ],
                                    "type": "text",
                                    "content": "块时才使用。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        609,
                        238,
                        622
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                608,
                                239,
                                624
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        608,
                                        239,
                                        624
                                    ],
                                    "type": "text",
                                    "content": "6.宏 likely（）和 unlikely（）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        641,
                        504,
                        689
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                641,
                                505,
                                654
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        641,
                                        505,
                                        654
                                    ],
                                    "type": "text",
                                    "content": "现代CPU具有精确的启发式分之预测法，她尝试预测下一条到来的命令，以便达到最高",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                660,
                                500,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        660,
                                        500,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "的速度。宏likely 和unlikely允许开发者通过编译程序告诉CPU：某段代码很可能被执行，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                677,
                                463,
                                689
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        677,
                                        463,
                                        689
                                    ],
                                    "type": "text",
                                    "content": "因而应该预测到；某段代码很可能不被执行，因此不必预测。两个宏的定义如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        694,
                        237,
                        707
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                694,
                                238,
                                708
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        694,
                                        238,
                                        708
                                    ],
                                    "type": "text",
                                    "content": "include/linux/compiler.h",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        712,
                        351,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                710,
                                352,
                                727
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        710,
                                        352,
                                        727
                                    ],
                                    "type": "text",
                                    "content": "# define likely(x) __builtin_expect(!!(x), 1)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        729,
                        371,
                        742
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                727,
                                373,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        727,
                                        215,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "# define unlikely(x)",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        234,
                                        729,
                                        373,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "__builtin_expect(!!(x), 0)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 17
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        75,
                        221,
                        89
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                74,
                                222,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        74,
                                        222,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "7．宏 IS_ERR()和 PTR_ERR()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        105,
                        505,
                        135
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                105,
                                505,
                                119
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        105,
                                        505,
                                        119
                                    ],
                                    "type": "text",
                                    "content": "这两个宏定义在 include/linux/err.h 中。宏 IS_ ERR 用于判断内核函数的返回值是否",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                122,
                                505,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        122,
                                        505,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "是一个有效指针，即可用来判断内核代码执行是否有错误；而宏PTR_ERR则返回该错误代码。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        153,
                        137,
                        166
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                153,
                                138,
                                166
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        153,
                                        138,
                                        166
                                    ],
                                    "type": "text",
                                    "content": "参考文献：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        185,
                        503,
                        232
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 6,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                185,
                                465,
                                198
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        185,
                                        466,
                                        198
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                185,
                                                466,
                                                198
                                            ],
                                            "type": "text",
                                            "content": "1. 陈莉君，康华.linux操作系统原理与应用.北京：清华大学出版社，2012.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                202,
                                503,
                                232
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        202,
                                        505,
                                        216
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                202,
                                                505,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "2. [美]Claudia Salzberg Rodriguzez,Gordon Fischer,Steven Smolski.linux 内核",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        127,
                                        220,
                                        296,
                                        232
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                127,
                                                220,
                                                296,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "编程.北京：机械工业出版社，2006.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        139,
                        298,
                        462,
                        319
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                138,
                                295,
                                464,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        138,
                                        295,
                                        464,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "实验一 linux 内核编译及添加系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        345,
                        280,
                        361
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                344,
                                280,
                                363
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        344,
                                        280,
                                        363
                                    ],
                                    "type": "text",
                                    "content": "1．1 设计目的和内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        391,
                        184,
                        404
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                391,
                                184,
                                406
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        391,
                                        184,
                                        406
                                    ],
                                    "type": "text",
                                    "content": "1．设计目的",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        418,
                        504,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                419,
                                504,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        419,
                                        504,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "Linux是开源操作系统，用户可以根据自身系统需要裁剪、修改内核，定制出功能更加",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                438,
                                468,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        438,
                                        468,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "合适、运行效率更高的系统，因此，编译linux内核是进行内核开发的必要基本功。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        454,
                        500,
                        485
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                455,
                                500,
                                467
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        455,
                                        500,
                                        467
                                    ],
                                    "type": "text",
                                    "content": "在系统中根据需要添加新的系统调用是修改内核的一种常用手段，通过本次实验，读",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                473,
                                393,
                                485
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        473,
                                        393,
                                        485
                                    ],
                                    "type": "text",
                                    "content": "者应理解linux系统处理系统调用的流程以及增加系统调用的方法。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        495,
                        184,
                        507
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                494,
                                184,
                                509
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        494,
                                        184,
                                        509
                                    ],
                                    "type": "text",
                                    "content": "2．内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        522,
                        504,
                        552
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                522,
                                504,
                                534
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        522,
                                        504,
                                        534
                                    ],
                                    "type": "text",
                                    "content": "（1）添加一个系统调用，实现对指定进程的 nice 值的修改或读取功能，并返回进程最",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                539,
                                294,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        539,
                                        294,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "新的nice 值及优先级 prio。建议调用原型为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        559,
                        473,
                        571
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                558,
                                474,
                                572
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        558,
                                        474,
                                        572
                                    ],
                                    "type": "text",
                                    "content": "int mysetnice(pid_t pid, int flag, int nicevalue, void __user * prio, void __user * nice);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        576,
                        157,
                        588
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                574,
                                159,
                                590
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        574,
                                        159,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "参数含义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        594,
                        193,
                        607
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                593,
                                195,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        593,
                                        195,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "pid：进程 ID。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        612,
                        423,
                        624
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                610,
                                426,
                                627
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        610,
                                        426,
                                        627
                                    ],
                                    "type": "text",
                                    "content": "flag：若值为 0，表示读取 nice 值；若值为 1，表示修改 nice 值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        630,
                        309,
                        642
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                629,
                                311,
                                644
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        629,
                                        311,
                                        644
                                    ],
                                    "type": "text",
                                    "content": "Prio、nice：进程当前优先级及 nice 值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        647,
                        389,
                        660
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                646,
                                390,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        646,
                                        390,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "返回值：系统调用成功时返回 0，失败时返回错误码 EFAULT。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        666,
                        430,
                        696
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 22,
                    "blocks": [
                        {
                            "bbox": [
                                112,
                                666,
                                379,
                                678
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        666,
                                        379,
                                        678
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                666,
                                                379,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "（2）写一个简单的应用程序测试（1）中添加的系统调用。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                683,
                                430,
                                696
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        684,
                                        430,
                                        697
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                684,
                                                430,
                                                697
                                            ],
                                            "type": "text",
                                            "content": "（3）若程序中调用了 linux的内核函数，要求深入阅读相关函数源码。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        705,
                        250,
                        719
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                704,
                                250,
                                720
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        704,
                                        250,
                                        720
                                    ],
                                    "type": "text",
                                    "content": "3. 学时安排（共 4学时）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        736,
                        189,
                        750
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                735,
                                190,
                                752
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        735,
                                        190,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "4． 开发平台",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 18
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        138,
                        76,
                        320,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                139,
                                75,
                                321,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        139,
                                        75,
                                        321,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "Linux 环境，gcc，gdb，vim 或 gedit 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        111,
                        298,
                        126
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                110,
                                299,
                                128
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        110,
                                        299,
                                        128
                                    ],
                                    "type": "text",
                                    "content": "1．2 Linux 系统调用基本概念",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        153,
                        505,
                        221
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                153,
                                499,
                                166
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        153,
                                        499,
                                        166
                                    ],
                                    "type": "text",
                                    "content": "系统调用的实质是调用内核函数，于内核态中运行。Linux系统中用户（或封装例程）",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                171,
                                504,
                                185
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        171,
                                        216,
                                        185
                                    ],
                                    "type": "text",
                                    "content": "通过执行一条访管指令“int",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        217,
                                        171,
                                        250,
                                        184
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\$ 0 x80",
                                    "score": 0.76
                                },
                                {
                                    "bbox": [
                                        250,
                                        171,
                                        504,
                                        185
                                    ],
                                    "type": "text",
                                    "content": "来调用系统调用，该指令会产生一个访管中断，从而让",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                190,
                                499,
                                201
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        190,
                                        499,
                                        201
                                    ],
                                    "type": "text",
                                    "content": "系统暂停当前进程的执行，而转去执行系统调用处理程序，通过用户态传入的系统调用号",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                208,
                                498,
                                220
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        208,
                                        498,
                                        220
                                    ],
                                    "type": "text",
                                    "content": "从系统调用表中找到相应服务例程的入口并执行，完成后返回。下面介绍相关的基本概念。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        229,
                        262,
                        243
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                229,
                                261,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        229,
                                        261,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "1.系统调用号与系统调用表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        256,
                        505,
                        343
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                257,
                                503,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        257,
                                        503,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "Linux系统提供了多达几百种的系统调用，为了唯一的标识每一个系统调用，linux为每",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                275,
                                500,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        500,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "个系统调用都设置了一个唯一的编号，称为系统调用号；同时每个系统调用需要一个服务",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                293,
                                503,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        293,
                                        503,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "例程完成其具体功能。Linux内核中设置了一张系统调用表，用于关联系统调用号及其相对",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                309,
                                503,
                                324
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        309,
                                        503,
                                        324
                                    ],
                                    "type": "text",
                                    "content": "应的服务例程入口地址，定义在./arch/x86/entry/syscalls/syscall_64.tbl 文件中（32 位系统是",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                327,
                                503,
                                343
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        327,
                                        503,
                                        343
                                    ],
                                    "type": "text",
                                    "content": "syscall_32.tbl），每个系统调用占一表项，比如大家比较熟悉的几个系统调用的调用号是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        102,
                        359,
                        418,
                        537
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                105,
                                348,
                                199,
                                359
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        348,
                                        199,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                348,
                                                199,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "表 7-5 系统调用号举例",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "table_caption"
                        },
                        {
                            "bbox": [
                                102,
                                359,
                                418,
                                537
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        102,
                                        359,
                                        418,
                                        537
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                102,
                                                359,
                                                418,
                                                537
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>系统调用号</td><td>32 位/64 位/common</td><td>系统调用名称</td><td>服务例程入口</td></tr><tr><td>0</td><td>common</td><td>read</td><td>sys_read</td></tr><tr><td>1</td><td>common</td><td>write</td><td>sys_write</td></tr><tr><td>2</td><td>common</td><td>open</td><td>sys_open</td></tr><tr><td>3</td><td>common</td><td>close</td><td>sys_close</td></tr><tr><td>57</td><td>common</td><td>fork</td><td>stub_fork</td></tr></table>",
                                            "image_path": "af49f661a62dff2aa564d40553e70dd37b423f3c57754d97bb72faccea67a007.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 7
                },
                {
                    "bbox": [
                        86,
                        541,
                        504,
                        591
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                542,
                                499,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        542,
                                        499,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "系统调用号非常关键，一旦分配就不能再有任何变更，否则之前编译好的应用程序就",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                560,
                                503,
                                572
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        560,
                                        503,
                                        572
                                    ],
                                    "type": "text",
                                    "content": "会崩溃。在x86中，系统调用号是通过eax寄存器传递给内核的。在陷人内核之前，先将系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                578,
                                481,
                                590
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        578,
                                        481,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "统调用号存入eax中，这样系统调用处理程序一旦运行，就可以从 eax中得到调用号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        599,
                        232,
                        613
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                600,
                                231,
                                613
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        600,
                                        231,
                                        613
                                    ],
                                    "type": "text",
                                    "content": "2. 系统调用服务例程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        626,
                        504,
                        677
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                627,
                                499,
                                639
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        627,
                                        499,
                                        639
                                    ],
                                    "type": "text",
                                    "content": "每个系统调用都对应一个内核服务例程来实现该系统调用的具体功能，其命名格式都",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                644,
                                504,
                                658
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        644,
                                        504,
                                        658
                                    ],
                                    "type": "text",
                                    "content": "是以“sys_”开头，如 sys_read 等，其代码实现通常存放在./kernel/sys.c文件中。服务例程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                662,
                                498,
                                677
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        662,
                                        498,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "的原型声明则是在/include/linux/syscalls.h 中，通常都有固定的格式，如 sys_open 的原型为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        682,
                        431,
                        695
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                681,
                                432,
                                695
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        681,
                                        432,
                                        695
                                    ],
                                    "type": "text",
                                    "content": "asmlinkage long sys_open(const char __user *filename,int flags, int mode);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        698,
                        505,
                        766
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                698,
                                505,
                                712
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        698,
                                        505,
                                        712
                                    ],
                                    "type": "text",
                                    "content": "其中“asmlinkage”是一个必须的限定词，用于通知编译器仅从堆栈中提取该函数的参",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                718,
                                499,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        718,
                                        499,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "数，而不是从寄存器中，因为在执行服务例程之前系统已经将通过寄存器传递过来的参数",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                734,
                                504,
                                748
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        734,
                                        504,
                                        748
                                    ],
                                    "type": "text",
                                    "content": "值压入内核堆栈了。在新版本的内核中，引入了宏“SYSCALL_DEFINEN(sname)”对服务例程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                752,
                                488,
                                766
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        752,
                                        488,
                                        766
                                    ],
                                    "type": "text",
                                    "content": "原型进行了封装，其中的“N”是该系统调用所需要参数的个数，如上述sys_open 调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 19
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        261,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                76,
                                260,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        76,
                                        260,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "在./kernel/sys.c 文件中的实现格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        95,
                        434,
                        108
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                94,
                                435,
                                110
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        94,
                                        435,
                                        110
                                    ],
                                    "type": "text",
                                    "content": "SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        111,
                        379,
                        126
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                112,
                                377,
                                126
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        112,
                                        377,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "如后面添加系统调用示例程序中，服务例程的实现格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        131,
                        240,
                        144
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                129,
                                239,
                                146
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        129,
                                        239,
                                        146
                                    ],
                                    "type": "text",
                                    "content": "SYSCALL_DEFINE0(zwhsyscall)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        148,
                        294,
                        161
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                148,
                                294,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        148,
                                        294,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "本知识点的详细介绍大家可以参考网页：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        166,
                        358,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                166,
                                359,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        166,
                                        359,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "http://blog.csdn.net/adc0809608/article/details/7417180",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        188,
                        233,
                        201
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                188,
                                232,
                                201
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        188,
                                        232,
                                        201
                                    ],
                                    "type": "text",
                                    "content": "3. 系统调用参数传递",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        215,
                        504,
                        300
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                216,
                                503,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        216,
                                        503,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "与普通函数一样，系统调用通常也需要输入/输出参数。在 x86上，linux通过6 个寄存",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                232,
                                499,
                                246
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        232,
                                        499,
                                        246
                                    ],
                                    "type": "text",
                                    "content": "器来传入参数值，其中eax传递系统调用号，后面5个寄存器ebx, ecx, edx, esi和 edi按照",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                252,
                                499,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        252,
                                        499,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "顺序存放前五个参数，需要六个或六个以上参数的情况不多见，此时，应该用一个单独的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                270,
                                499,
                                282
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        270,
                                        499,
                                        282
                                    ],
                                    "type": "text",
                                    "content": "寄存器存放指向所有这些参数在用户空间地址的指针。服务例程的返回值通过 eax寄存器",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                288,
                                348,
                                300
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        288,
                                        348,
                                        300
                                    ],
                                    "type": "text",
                                    "content": "传递，这是在执行rutern指令时由C 编译器自动完成的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        305,
                        505,
                        372
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                306,
                                503,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        306,
                                        503,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "当系统调用执行成功时，将返回服务例程的返回值，通常是0。但如果执行失败，为防",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                322,
                                504,
                                337
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        322,
                                        504,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "止和正常的返回值混淆，系统调用并不直接返回错误码，而是将错误码放入一个名为 errno",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                342,
                                502,
                                354
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        342,
                                        502,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "的全局变量中，通常是一个负值，通过调用perror()库函数，可以把errno翻译成用户可以",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                360,
                                191,
                                371
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        360,
                                        191,
                                        371
                                    ],
                                    "type": "text",
                                    "content": "理解的错误信息描述。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        380,
                        232,
                        395
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                381,
                                232,
                                395
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        381,
                                        232,
                                        395
                                    ],
                                    "type": "text",
                                    "content": "4. 系统调用参数验证",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        407,
                        501,
                        439
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                407,
                                500,
                                421
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        407,
                                        500,
                                        421
                                    ],
                                    "type": "text",
                                    "content": "系统调用必须仔细检查用户传入的参数是否合法有效。比如与进程相关的调用必须检",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                427,
                                230,
                                439
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        427,
                                        230,
                                        439
                                    ],
                                    "type": "text",
                                    "content": "查用户提供的PID等是否有效。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        444,
                        501,
                        474
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                445,
                                499,
                                456
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        445,
                                        499,
                                        456
                                    ],
                                    "type": "text",
                                    "content": "最重要的是要检查用户提供的指针是否有效，以防止用户进程非法访问数据。内核提",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                462,
                                451,
                                475
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        462,
                                        451,
                                        475
                                    ],
                                    "type": "text",
                                    "content": "供了两个函数来完成必须的检查以及内核空间与用户空间之间数据的来回拷贝：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        480,
                        504,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                478,
                                505,
                                496
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        478,
                                        505,
                                        496
                                    ],
                                    "type": "text",
                                    "content": "copy_to_user()和 copy_from_user()，在较低内核版本中，定义在./arch/x86/lib/usercopy_32.c",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                497,
                                383,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        497,
                                        383,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "文件中；对于内核 4.12，定义在./include/linux/uaccess.h 文件中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        513,
                        216,
                        527
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                511,
                                217,
                                530
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        511,
                                        217,
                                        530
                                    ],
                                    "type": "text",
                                    "content": "（1） copy_to_user()：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        118,
                        533,
                        342,
                        545
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                532,
                                342,
                                547
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        532,
                                        342,
                                        547
                                    ],
                                    "type": "text",
                                    "content": "static __always_inline unsigned long __must_check",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        550,
                        405,
                        564
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                549,
                                406,
                                566
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        549,
                                        406,
                                        566
                                    ],
                                    "type": "text",
                                    "content": "copy_to_user(void __user *to, const void *from, unsigned long n);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        567,
                        321,
                        580
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                568,
                                321,
                                581
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        568,
                                        321,
                                        581
                                    ],
                                    "type": "text",
                                    "content": "功能：将数据块从内核空间复制到用户空间",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        586,
                        167,
                        598
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                584,
                                169,
                                600
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        584,
                                        169,
                                        600
                                    ],
                                    "type": "text",
                                    "content": "参数含义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        603,
                        282,
                        616
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                604,
                                282,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        604,
                                        282,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "to：用户进程空间中的目的地址；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        622,
                        247,
                        634
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                622,
                                247,
                                635
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        622,
                                        247,
                                        635
                                    ],
                                    "type": "text",
                                    "content": "from：内核空间的源地址",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        640,
                        285,
                        652
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                640,
                                286,
                                653
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        640,
                                        286,
                                        653
                                    ],
                                    "type": "text",
                                    "content": "n：需要拷贝的数据长度(字节数)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        117,
                        657,
                        459,
                        670
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                658,
                                461,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        658,
                                        461,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "返回值：函数执行成功返回 0；如果失败，则返回没有拷贝成功的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        673,
                        224,
                        687
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                669,
                                225,
                                691
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        669,
                                        225,
                                        691
                                    ],
                                    "type": "text",
                                    "content": "（2） copy_from_user()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        118,
                        692,
                        342,
                        705
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                692,
                                342,
                                707
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        692,
                                        342,
                                        707
                                    ],
                                    "type": "text",
                                    "content": "static __always_inline unsigned long __must_check",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        710,
                        417,
                        723
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                708,
                                418,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        708,
                                        418,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "copy_from_user(void *to, const void __user *from, unsigned long n);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        727,
                        321,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                727,
                                321,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        727,
                                        321,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "功能：将数据块从用户空间复制到内核空间",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        745,
                        167,
                        757
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                744,
                                168,
                                759
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        744,
                                        168,
                                        759
                                    ],
                                    "type": "text",
                                    "content": "参数含义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 20
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        127,
                        76,
                        250,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                76,
                                250,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        76,
                                        250,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "to：内核空间的目的地址；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        95,
                        247,
                        106
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                94,
                                247,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        94,
                                        247,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "from：用户空间的源地址",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        112,
                        284,
                        125
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                128,
                                112,
                                285,
                                126
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        128,
                                        112,
                                        285,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "n：需要拷贝的数据长度(字节数)。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        117,
                        130,
                        459,
                        143
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                130,
                                460,
                                143
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        130,
                                        460,
                                        143
                                    ],
                                    "type": "text",
                                    "content": "返回值：函数执行成功返回 0；如果失败，则返回没有拷贝成功的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        164,
                        315,
                        180
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                164,
                                317,
                                182
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        164,
                                        317,
                                        182
                                    ],
                                    "type": "text",
                                    "content": "1．3 Linux 添加系统调用的步骤：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        206,
                        504,
                        255
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                207,
                                504,
                                220
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        207,
                                        504,
                                        220
                                    ],
                                    "type": "text",
                                    "content": "这里以一个很简单的例子说明 linux中添加一个新的系统调用的步骤，该调用没有输入",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                225,
                                502,
                                238
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        225,
                                        502,
                                        238
                                    ],
                                    "type": "text",
                                    "content": "参数，名字叫“zwhsyscall”。采用的内核版本是最新的4.12，x86 平台、64位。注意必须",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                243,
                                235,
                                255
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        243,
                                        235,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "以root身份才能完成下述操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        264,
                        315,
                        279
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                264,
                                315,
                                280
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        264,
                                        315,
                                        280
                                    ],
                                    "type": "text",
                                    "content": "1. 分配系统调用号，修改系统调用表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        292,
                        455,
                        306
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                291,
                                455,
                                307
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        291,
                                        455,
                                        307
                                    ],
                                    "type": "text",
                                    "content": "查看系统调用表（./arch/x86/entyr/syscalls/syscall_64.tbl），如图 7-16 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        110,
                        306,
                        528,
                        413
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                306,
                                528,
                                413
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        306,
                                        528,
                                        413
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                306,
                                                528,
                                                413
                                            ],
                                            "type": "image",
                                            "image_path": "a59459d3c0923ce9087c6dd048f4d7e6e1b53bc6ebd4b8ab1daef9f8c4406e39.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                108,
                                419,
                                244,
                                431
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        419,
                                        243,
                                        433
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                419,
                                                243,
                                                433
                                            ],
                                            "type": "text",
                                            "content": "图7-16 系统调用表部分内容",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 9
                },
                {
                    "bbox": [
                        108,
                        437,
                        304,
                        450
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                437,
                                304,
                                451
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        437,
                                        304,
                                        451
                                    ],
                                    "type": "text",
                                    "content": "每个系统调用在表中占一表项，其格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        455,
                        424,
                        468
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                455,
                                424,
                                470
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        455,
                                        319,
                                        470
                                    ],
                                    "type": "text",
                                    "content": "<系统调用号> <commom/64/x32> <系统调用名",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        320,
                                        456,
                                        334,
                                        467
                                    ],
                                    "type": "inline_equation",
                                    "content": "> <",
                                    "score": 0.75
                                },
                                {
                                    "bbox": [
                                        334,
                                        455,
                                        424,
                                        470
                                    ],
                                    "type": "text",
                                    "content": "<服务例程入口地址>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        473,
                        501,
                        523
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                474,
                                499,
                                485
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        474,
                                        499,
                                        485
                                    ],
                                    "type": "text",
                                    "content": "选择一个未使用的系统调用号进行分配，比如当前系统使用到 332 号，则新添加的系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                492,
                                499,
                                503
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        492,
                                        499,
                                        503
                                    ],
                                    "type": "text",
                                    "content": "统调用可使用333号。确定调用号后，应在系统调用表中关联新调用的调用号与服务例程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                509,
                                465,
                                522
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        509,
                                        465,
                                        522
                                    ],
                                    "type": "text",
                                    "content": "入口，即在syscall_64.tbl文件中为新调用添加一条记录，修改结果如图7-17所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        90,
                        528,
                        496,
                        611
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                90,
                                528,
                                496,
                                611
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        90,
                                        528,
                                        496,
                                        611
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                90,
                                                528,
                                                496,
                                                611
                                            ],
                                            "type": "image",
                                            "image_path": "efd0422062519c1226de617798fa474fd3a1b02219447cdd3caaf03884ed5d62.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                198,
                                622,
                                302,
                                634
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        201,
                                        623,
                                        302,
                                        634
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                201,
                                                623,
                                                302,
                                                634
                                            ],
                                            "type": "text",
                                            "content": "图 7-17 修改系统调用表",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 14
                },
                {
                    "bbox": [
                        113,
                        642,
                        280,
                        656
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                642,
                                280,
                                657
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        642,
                                        280,
                                        657
                                    ],
                                    "type": "text",
                                    "content": "2. 申明系统调用服务例程原型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        670,
                        504,
                        700
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                669,
                                504,
                                684
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        669,
                                        504,
                                        684
                                    ],
                                    "type": "text",
                                    "content": "Linux 系统调用服务例程的原型声明在文件 linux-4.12/include/linux/syscalls.h 中，可在文",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                688,
                                235,
                                700
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        688,
                                        235,
                                        700
                                    ],
                                    "type": "text",
                                    "content": "件末尾添加如图7-18 所示内容：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        110,
                        707,
                        141,
                        727
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                707,
                                141,
                                727
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        707,
                                        141,
                                        727
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                707,
                                                141,
                                                727
                                            ],
                                            "type": "image",
                                            "image_path": "9e858592f4080a0633cfc441808778dbc28597710536a8c77d13c01e9a8ad6e2.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                105,
                                738,
                                250,
                                750
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        739,
                                        249,
                                        750
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                739,
                                                249,
                                                750
                                            ],
                                            "type": "text",
                                            "content": "图 7-18 声明系统调用服务例程原型",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 20,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 18
                },
                {
                    "bbox": [
                        145,
                        710,
                        349,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                143,
                                709,
                                349,
                                725
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        143,
                                        709,
                                        349,
                                        725
                                    ],
                                    "type": "text",
                                    "content": "asmlinkage long sys_zwhsyscall(void);",
                                    "score": 0.996
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 21
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        79,
                        249,
                        93
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                80,
                                249,
                                94
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        80,
                                        249,
                                        94
                                    ],
                                    "type": "text",
                                    "content": "3.实现系统调用服务例程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        106,
                        503,
                        137
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                106,
                                503,
                                121
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        106,
                                        503,
                                        121
                                    ],
                                    "type": "text",
                                    "content": "下面为新调用 zwhsyscall 编写服务例程 sys_zwhsyscall，通常添加在 sys.c 文件中，其完",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                124,
                                321,
                                139
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        124,
                                        321,
                                        139
                                    ],
                                    "type": "text",
                                    "content": "整路径为：linux-4.12/kernel/sys.c，如图 7-19 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        110,
                        142,
                        413,
                        212
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                142,
                                413,
                                212
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        142,
                                        413,
                                        212
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                142,
                                                413,
                                                212
                                            ],
                                            "type": "image",
                                            "image_path": "afdc250564f749d75b4dad48af714b9f7481ac457d05a22252977b108081e5ee.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                167,
                                222,
                                293,
                                233
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        170,
                                        222,
                                        293,
                                        234
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                170,
                                                222,
                                                293,
                                                234
                                            ],
                                            "type": "text",
                                            "content": "图 7-19 编写系统调用服务例程",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 3
                },
                {
                    "bbox": [
                        113,
                        243,
                        208,
                        257
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                243,
                                208,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        243,
                                        208,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "4. 重新编译内核",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        270,
                        499,
                        301
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                271,
                                499,
                                282
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        271,
                                        499,
                                        282
                                    ],
                                    "type": "text",
                                    "content": "上面三个步骤已经完成添加一个新系统调用的所有工作，但是要让这个系统调用真正",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                288,
                                478,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        288,
                                        478,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "在内核中运行起来，还需要重新编译内核。有关内核编译的知识，见7.2.4 节的介绍。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        310,
                        303,
                        323
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                310,
                                303,
                                324
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        310,
                                        303,
                                        324
                                    ],
                                    "type": "text",
                                    "content": "5. 编写用户态程序测试新系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        338,
                        357,
                        350
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                338,
                                358,
                                350
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        338,
                                        358,
                                        350
                                    ],
                                    "type": "text",
                                    "content": "可编写一个用户态程序来调用上面新添加的系统调用：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        356,
                        446,
                        476
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 16,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                356,
                                233,
                                369
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        354,
                                        234,
                                        371
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                354,
                                                234,
                                                371
                                            ],
                                            "type": "text",
                                            "content": "1 #define _GNU_SOURCE",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                375,
                                241,
                                386
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        374,
                                        241,
                                        388
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                374,
                                                241,
                                                388
                                            ],
                                            "type": "text",
                                            "content": "2 #include <linux/unistd.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                392,
                                234,
                                404
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        391,
                                        235,
                                        407
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                391,
                                                235,
                                                407
                                            ],
                                            "type": "text",
                                            "content": "3 #include <sys/syscall.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                409,
                                446,
                                423
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        409,
                                        447,
                                        424
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                409,
                                                447,
                                                424
                                            ],
                                            "type": "text",
                                            "content": "4 #define __NR_mysyscall 333 /*系统调用号根据实验具体数字而定*/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                428,
                                183,
                                440
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        426,
                                        184,
                                        444
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                426,
                                                184,
                                                444
                                            ],
                                            "type": "text",
                                            "content": "5 int main() {",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                445,
                                355,
                                459
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        445,
                                        355,
                                        461
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                446,
                                                117,
                                                459
                                            ],
                                            "type": "text",
                                            "content": "6",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                152,
                                                445,
                                                355,
                                                461
                                            ],
                                            "type": "text",
                                            "content": "syscall(__NR_mysyscall); /*或 syscall(333) */",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                464,
                                136,
                                476
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        462,
                                        139,
                                        480
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                462,
                                                139,
                                                480
                                            ],
                                            "type": "text",
                                            "content": "7 }",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        481,
                        157,
                        493
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                481,
                                158,
                                495
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        481,
                                        158,
                                        495
                                    ],
                                    "type": "text",
                                    "content": "程序说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        499,
                        498,
                        530
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                500,
                                499,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        500,
                                        499,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "程序第 6 行使用了 syscall()宏调用新添加的系统调用，它是 linux 提供给用户态程序直",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                518,
                                271,
                                529
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        518,
                                        271,
                                        529
                                    ],
                                    "type": "text",
                                    "content": "接调用系统调用的一种方法，其格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        536,
                        222,
                        549
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                534,
                                223,
                                552
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        534,
                                        223,
                                        552
                                    ],
                                    "type": "text",
                                    "content": "int syscall(int number, ...);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        553,
                        464,
                        566
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                553,
                                466,
                                567
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        553,
                                        466,
                                        567
                                    ],
                                    "type": "text",
                                    "content": "其中number是系统调用号，number后面应顺序接上该系统调用的所有参数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        571,
                        436,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                571,
                                436,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        571,
                                        436,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "编译该程序并运行后，使用 dmesg命令查看输出内容，如图7-20所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        106,
                        586,
                        431,
                        630
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                106,
                                586,
                                431,
                                630
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        106,
                                        586,
                                        431,
                                        630
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                106,
                                                586,
                                                431,
                                                630
                                            ],
                                            "type": "image",
                                            "image_path": "9683c7f5a64052a891b7bcf0584365b3f319d43213c32d52f38e9e96807f6ed4.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 22,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                190,
                                637,
                                298,
                                649
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        192,
                                        638,
                                        298,
                                        650
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                192,
                                                638,
                                                298,
                                                650
                                            ],
                                            "type": "text",
                                            "content": "图 7-20 系统调用测试结果",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 23,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 22
                },
                {
                    "bbox": [
                        114,
                        671,
                        270,
                        686
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                671,
                                270,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        671,
                                        270,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "1．4 Linux 内核编译步骤",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        713,
                        499,
                        761
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                713,
                                499,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        713,
                                        499,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "作为自由软件，linux 内核版本不断更新，新内核会修订旧内核的bug，并增加若干新",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                731,
                                499,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        731,
                                        499,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "特性，如支持更多的硬件、具备更好的系统管理能力、运行速度更快、更稳定等。用户若",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                749,
                                500,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        749,
                                        500,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "想使用这些新特性，或希望根据自身系统需求定制一个更高效、更稳定的内核，就需要重",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 22
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        472,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                76,
                                473,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        76,
                                        473,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "新编译内核。下面以linux初学者喜欢使用的ubuntu系统为例，介绍内核编译步骤。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        98,
                        178,
                        111
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                98,
                                178,
                                113
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        98,
                                        178,
                                        113
                                    ],
                                    "type": "text",
                                    "content": "1.实验环境",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        125,
                        494,
                        138
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                123,
                                494,
                                140
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        123,
                                        494,
                                        140
                                    ],
                                    "type": "text",
                                    "content": "Ubuntu 64 位：ubuntu-16.04-desktop-amd64.iso，待编译的新内核是 linux-4.12.tar.xz。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        143,
                        312,
                        156
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                142,
                                311,
                                158
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        142,
                                        311,
                                        158
                                    ],
                                    "type": "text",
                                    "content": "虚拟机：WMware-player-12.1.1-3770994.exe",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        161,
                        501,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                161,
                                499,
                                174
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        162,
                                        269,
                                        173
                                    ],
                                    "type": "text",
                                    "content": "虚拟机的建议配置参数：磁盘空间",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        269,
                                        161,
                                        328,
                                        174
                                    ],
                                    "type": "inline_equation",
                                    "content": "3 0 6 8 { \\sim } 4 0 6 8",
                                    "score": 0.78
                                },
                                {
                                    "bbox": [
                                        329,
                                        162,
                                        499,
                                        173
                                    ],
                                    "type": "text",
                                    "content": "以上，内存2GB以上。由于在内核编",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                180,
                                499,
                                190
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        180,
                                        499,
                                        190
                                    ],
                                    "type": "text",
                                    "content": "译过程中会生成较多的临时文件，如果磁盘空间预留太小，会出现磁盘空间不足的错误而",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                197,
                                454,
                                210
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        197,
                                        405,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "导致内核编译失败；内存太小会影响编译速度，一般内核编译时间是",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        406,
                                        197,
                                        448,
                                        210
                                    ],
                                    "type": "inline_equation",
                                    "content": "1 . 5 \\mathsf { h } { \\sim } 3 \\mathsf { h }",
                                    "score": 0.79
                                },
                                {
                                    "bbox": [
                                        448,
                                        197,
                                        454,
                                        210
                                    ],
                                    "type": "text",
                                    "content": "。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        219,
                        202,
                        232
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                219,
                                202,
                                233
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        219,
                                        202,
                                        233
                                    ],
                                    "type": "text",
                                    "content": "2.下载内核源码",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        246,
                        504,
                        277
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                248,
                                503,
                                259
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        248,
                                        503,
                                        259
                                    ],
                                    "type": "text",
                                    "content": "Linux的内核源代码是完全公开的，有很多网站都提供源码下载，推荐使用 linux的官方",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                264,
                                458,
                                279
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        264,
                                        458,
                                        279
                                    ],
                                    "type": "text",
                                    "content": "网站：http://www.kernel.org，在这里可以找到所有的内核版本，如图 7-21 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        110,
                        280,
                        530,
                        464
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                280,
                                530,
                                464
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        280,
                                        530,
                                        464
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                280,
                                                530,
                                                464
                                            ],
                                            "type": "image",
                                            "image_path": "c94095dac0782a7653400af87d218cb03e86cf4444184127fe8d1268e397de54.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                163,
                                470,
                                253,
                                482
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        165,
                                        470,
                                        252,
                                        483
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                165,
                                                470,
                                                252,
                                                483
                                            ],
                                            "type": "text",
                                            "content": "图 7-21 linux 官方网站",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 8
                },
                {
                    "bbox": [
                        113,
                        491,
                        238,
                        505
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                491,
                                238,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        491,
                                        238,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "3.解压缩内核源码文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        515,
                        505,
                        544
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                516,
                                506,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        516,
                                        506,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "首先切换到 root 用户，将下载的新内核压缩文件复制到/home 或其他比较空闲的目录",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                532,
                                325,
                                543
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        532,
                                        325,
                                        543
                                    ],
                                    "type": "text",
                                    "content": "中，然后进入压缩文件所在子目录，分两步解压缩：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        546,
                        481,
                        574
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 14,
                    "blocks": [
                        {
                            "bbox": [
                                119,
                                546,
                                481,
                                559
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        546,
                                        482,
                                        560
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                546,
                                                482,
                                                560
                                            ],
                                            "type": "text",
                                            "content": "（1） # xz -d linux-4.4.19.tar.xz 大概执行 1 分钟左右，中间没有任何信息显示。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                120,
                                562,
                                262,
                                574
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        120,
                                        560,
                                        264,
                                        577
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                120,
                                                560,
                                                264,
                                                577
                                            ],
                                            "type": "text",
                                            "content": "（2） # tar -xvf linux-4.4.19.tar",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        577,
                        505,
                        606
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                578,
                                505,
                                589
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        578,
                                        505,
                                        589
                                    ],
                                    "type": "text",
                                    "content": "注意：由于编译过程中会生成很多临时文件，所以要确保压缩文件所在子目录有足够的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                594,
                                436,
                                605
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        594,
                                        436,
                                        605
                                    ],
                                    "type": "text",
                                    "content": "空闲空间，最好能有15-20GB。笔者在建立虚拟机时预留了40GB磁盘空间。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        616,
                        293,
                        630
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                615,
                                293,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        615,
                                        293,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "4. 清除残留的.config 和.o 文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        640,
                        505,
                        668
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                640,
                                505,
                                653
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        640,
                                        505,
                                        653
                                    ],
                                    "type": "text",
                                    "content": "当编译出错需要重新编译或不是第一次编译，都需要清除残留的.config 和.o 文件，方",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                656,
                                304,
                                667
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        656,
                                        304,
                                        667
                                    ],
                                    "type": "text",
                                    "content": "法是进入linux-4.12子目录，执行以下命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        671,
                        236,
                        684
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                149,
                                670,
                                236,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        149,
                                        670,
                                        236,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "# make mrproper",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        687,
                        505,
                        714
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                685,
                                506,
                                702
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        685,
                                        506,
                                        702
                                    ],
                                    "type": "text",
                                    "content": "这里可能会提醒安装 ncurses 包，在 ubuntu 中 ncurses 库的名字是 libncurses5-dev，所",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                703,
                                158,
                                715
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        703,
                                        158,
                                        715
                                    ],
                                    "type": "text",
                                    "content": "以安装命令是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        719,
                        286,
                        731
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                719,
                                287,
                                732
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        719,
                                        287,
                                        732
                                    ],
                                    "type": "text",
                                    "content": "#apt-get install libncurses5-dev",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        737,
                        291,
                        750
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                735,
                                292,
                                753
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        735,
                                        292,
                                        753
                                    ],
                                    "type": "text",
                                    "content": "安装完成后再次执行：# make mrproper",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 23
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        79,
                        184,
                        93
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                79,
                                185,
                                95
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        79,
                                        185,
                                        95
                                    ],
                                    "type": "text",
                                    "content": "5. 配置内核",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        104,
                        248,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                101,
                                248,
                                120
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        101,
                                        248,
                                        120
                                    ],
                                    "type": "text",
                                    "content": "运行命令：# make menuconfig",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        119,
                        370,
                        131
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                120,
                                371,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        120,
                                        371,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "运行该命令过程中，可能会出现如图 7-22 所示错误信息：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        110,
                        135,
                        503,
                        242
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                135,
                                503,
                                242
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        135,
                                        503,
                                        242
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                135,
                                                503,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "root@ubuntu:/usr/src/linux-source-4.4.0# make menuconfig  \nHOSTCC scripts/basic/fixdep  \nHOSTCC scripts/kconfig/mconf.o  \nIn file included from scripts/kconfig/mconf.c:23:0:  \nscripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory  \ncompilation terminated.  \nscripts/Makefile.host:108: recipe for target 'scripts/kconfig/mconf.o' failed  \nmake[1]: *** [scripts/kconfig/mconf.o] Error 1  \nMakefile:541: recipe for target 'menuconfig' failed  \nmake: *** [menuconfig] Error 2"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        108,
                        244,
                        278,
                        256
                    ],
                    "lines": [
                        {
                            "bbox": [
                                110,
                                244,
                                279,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        244,
                                        279,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "图 7-22 缺少套件 ncurses devel 的错误信息",
                                    "score": 1.0
                                }
                            ]
                        }
                    ],
                    "index": 5,
                    "angle": 0,
                    "type": "text"
                },
                {
                    "bbox": [
                        107,
                        259,
                        474,
                        273
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                259,
                                476,
                                274
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        259,
                                        476,
                                        274
                                    ],
                                    "type": "text",
                                    "content": "这是因为 Ubuntu 系统中可能缺少一个套件 ncurses devel，安装方法是执行命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        276,
                        246,
                        288
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                276,
                                246,
                                288
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        276,
                                        246,
                                        288
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                276,
                                                246,
                                                288
                                            ],
                                            "type": "text",
                                            "content": "apt-get install libncurses5-dev"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        86,
                        290,
                        504,
                        365
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                290,
                                506,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        290,
                                        506,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "之后再执行“make menuconfig”命令将打开如图 7-23 所示配置对话框，对于每一个配",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                307,
                                505,
                                320
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        307,
                                        505,
                                        320
                                    ],
                                    "type": "text",
                                    "content": "置选项，用户可以回答\"y\"、\"m\"或\"n\"：其中\"y\"表示将相应特性的支持或设备驱动程序编译",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                322,
                                505,
                                334
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        322,
                                        505,
                                        334
                                    ],
                                    "type": "text",
                                    "content": "进内核；\"m\"表示将相应特性的支持或设备驱动程序编译成可加载模块，在需要时，可由系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                338,
                                505,
                                350
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        338,
                                        505,
                                        350
                                    ],
                                    "type": "text",
                                    "content": "统或用户自行加入到内核中去；\"n\"表示内核不提供相应特性或驱动程序的支持。一般采用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                354,
                                403,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        354,
                                        403,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "默认值即可：选择<save>保存配置信息，然后选择<exit>退出对话框。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        110,
                        369,
                        457,
                        552
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                369,
                                457,
                                552
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        369,
                                        457,
                                        552
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                369,
                                                457,
                                                552
                                            ],
                                            "type": "image",
                                            "image_path": "f3f60ad7499943aa7850542d05627738e94d1d47df174b2a3141aa476ffa809e.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                187,
                                712,
                                264,
                                724
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        190,
                                        713,
                                        264,
                                        724
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                190,
                                                713,
                                                264,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "图 7-24 编译错误",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 9
                },
                {
                    "bbox": [
                        261,
                        555,
                        351,
                        567
                    ],
                    "lines": [
                        {
                            "bbox": [
                                264,
                                557,
                                351,
                                568
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        264,
                                        557,
                                        351,
                                        568
                                    ],
                                    "type": "text",
                                    "content": "图 7-23 配置内核界面",
                                    "score": 1.0
                                }
                            ]
                        }
                    ],
                    "index": 10,
                    "angle": 0,
                    "type": "text"
                },
                {
                    "bbox": [
                        113,
                        578,
                        292,
                        592
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                578,
                                292,
                                593
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        578,
                                        292,
                                        593
                                    ],
                                    "type": "text",
                                    "content": "6. 编译内核，生成启动映像文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        602,
                        505,
                        631
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                602,
                                506,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        602,
                                        506,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "内 核 配 置 完 成 后 ， 编 译 内 核 ， 并 生 成 启 动 映 像 文 件 bzImage （ 位",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                618,
                                234,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        618,
                                        234,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "于./arch/x86_64/boot/bzImage）：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        634,
                        194,
                        645
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                633,
                                195,
                                649
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        633,
                                        195,
                                        649
                                    ],
                                    "type": "text",
                                    "content": "执行命令：# make",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        649,
                        483,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                650,
                                483,
                                663
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        650,
                                        483,
                                        663
                                    ],
                                    "type": "text",
                                    "content": "如果是多核cpu可使用 make -j来加快编译速度。可能会出现图7-24 所示的错误：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        667,
                        520,
                        704
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                667,
                                520,
                                704
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        667,
                                        520,
                                        704
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                667,
                                                520,
                                                704
                                            ],
                                            "type": "text",
                                            "content": "CALE scripts/checksyscalts.sh   \nHOSTCC scripts/sign-file   \nscripts/sign-file.c:23:30: fatal error:openssl/opensslv.h: No such file or direc tory"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        107,
                        727,
                        348,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                726,
                                349,
                                742
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        726,
                                        349,
                                        742
                                    ],
                                    "type": "text",
                                    "content": "这是因为没有安装 openssl， openssl 的安装方法是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        743,
                        271,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                741,
                                273,
                                758
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        741,
                                        273,
                                        758
                                    ],
                                    "type": "text",
                                    "content": "执行命令：# apt-get install libssl-dev",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 24
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        502,
                        107
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                76,
                                503,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        76,
                                        503,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "openssl安装完成后，再执行 make 命令即可，需要较长时间，笔者4核处理器，用了",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                93,
                                143,
                                108
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        93,
                                        143,
                                        108
                                    ],
                                    "type": "text",
                                    "content": "约 20 分钟。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        116,
                        184,
                        130
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                116,
                                185,
                                131
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        116,
                                        185,
                                        131
                                    ],
                                    "type": "text",
                                    "content": "7. 编译模块",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        140,
                        235,
                        152
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                139,
                                235,
                                154
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        139,
                                        235,
                                        154
                                    ],
                                    "type": "text",
                                    "content": "执行命令：# make modules",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        155,
                        378,
                        168
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                156,
                                379,
                                169
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        156,
                                        379,
                                        169
                                    ],
                                    "type": "text",
                                    "content": "第一次编译模块需要很长时间，笔者大概用了两个半小时。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        178,
                        184,
                        191
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                178,
                                184,
                                193
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        178,
                                        184,
                                        193
                                    ],
                                    "type": "text",
                                    "content": "8. 安装内核",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        202,
                        290,
                        230
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                202,
                                290,
                                215
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        201,
                                        291,
                                        216
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                201,
                                                291,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "（1）安装模块：# make modules_install",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                218,
                                246,
                                230
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        216,
                                        246,
                                        232
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                216,
                                                246,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "（2）安装内核：#make install",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        241,
                        231,
                        254
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                240,
                                232,
                                256
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        240,
                                        232,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "9.配置 grub 引导程序",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        264,
                        381,
                        278
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                264,
                                383,
                                280
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        264,
                                        383,
                                        280
                                    ],
                                    "type": "text",
                                    "content": "只需要执行命令：# update-grub2，该命令会自动修改 grub。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        287,
                        185,
                        301
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                287,
                                185,
                                302
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        287,
                                        185,
                                        302
                                    ],
                                    "type": "text",
                                    "content": "10.重启系统",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        312,
                        201,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                311,
                                202,
                                325
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        311,
                                        202,
                                        325
                                    ],
                                    "type": "text",
                                    "content": "执行命令：# reboot",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        327,
                        467,
                        339
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                327,
                                468,
                                340
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        327,
                                        468,
                                        340
                                    ],
                                    "type": "text",
                                    "content": "将使用新内核启动 linux。启动完成后进入终端查看内核版本，如图7-25 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        89,
                        343,
                        506,
                        386
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                89,
                                343,
                                506,
                                386
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        89,
                                        343,
                                        506,
                                        386
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                343,
                                                506,
                                                386
                                            ],
                                            "type": "text",
                                            "content": "zwh@ubuntu:~$ uname -a Linuxubuntu 4.12.0 #1 SMP Sat Jul 8 20:23:38 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux zwh@ubuntu:~$"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        205,
                        390,
                        299,
                        401
                    ],
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                207,
                                390,
                                299,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        207,
                                        390,
                                        299,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "图 7-25 查看内核版本",
                                    "score": 1.0
                                }
                            ]
                        }
                    ],
                    "type": "text"
                },
                {
                    "bbox": [
                        184,
                        468,
                        418,
                        488
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                184,
                                465,
                                420,
                                492
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        184,
                                        465,
                                        246,
                                        492
                                    ],
                                    "type": "text",
                                    "content": "实验二",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        255,
                                        466,
                                        420,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "linux 内核模块编程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        515,
                        280,
                        531
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                514,
                                281,
                                533
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        514,
                                        281,
                                        533
                                    ],
                                    "type": "text",
                                    "content": "2.1 设计目的和内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        562,
                        170,
                        574
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                562,
                                170,
                                575
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        562,
                                        170,
                                        575
                                    ],
                                    "type": "text",
                                    "content": "1．设计目的",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        585,
                        503,
                        645
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                587,
                                504,
                                597
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        587,
                                        504,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "Linux提供的模块机制能动态扩充linux功能而无需重新编译内核，已经广泛应用在linux",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                602,
                                503,
                                613
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        602,
                                        503,
                                        613
                                    ],
                                    "type": "text",
                                    "content": "内核的许多功能的实现中。在本实验中将学习模块的基本概念、原理及实现技术，然后利",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                617,
                                503,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        617,
                                        503,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "用内核模块编程访问进程的基本信息，从而加深对进程概念的理解、对模块编程技术的掌",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                632,
                                108,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        632,
                                        108,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "握。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        655,
                        170,
                        668
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                655,
                                170,
                                669
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        655,
                                        170,
                                        669
                                    ],
                                    "type": "text",
                                    "content": "2．内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        679,
                        503,
                        754
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 24,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                679,
                                503,
                                707
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        113,
                                        678,
                                        503,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                113,
                                                678,
                                                135,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "（1）",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                151,
                                                679,
                                                503,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "设计一个模块，要求列出系统中所有内核线程的程序名、PID号、进程状态及",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        695,
                                        148,
                                        708
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                695,
                                                148,
                                                708
                                            ],
                                            "type": "text",
                                            "content": "进程优先级。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                710,
                                503,
                                737
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        113,
                                        709,
                                        505,
                                        724
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                113,
                                                709,
                                                505,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "（2） 设计一个带参数的模块，其参数为某个进程的 PID号，该模块的功能是列出该",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        726,
                                        406,
                                        737
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                726,
                                                406,
                                                737
                                            ],
                                            "type": "text",
                                            "content": "进程的家族信息，包括父进程、兄弟进程和子进程的程序名、PID号。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                112,
                                741,
                                483,
                                754
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        741,
                                        484,
                                        754
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                741,
                                                484,
                                                754
                                            ],
                                            "type": "text",
                                            "content": "（3） 请根据自身情况，进一步阅读分析程序中用到的相关内核函数的源码实现。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 25
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        107,
                        80,
                        227,
                        93
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                80,
                                226,
                                94
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        80,
                                        226,
                                        94
                                    ],
                                    "type": "text",
                                    "content": "3. 学时安排（共 4 学时）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        111,
                        175,
                        125
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                111,
                                175,
                                126
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        111,
                                        175,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "4． 开发平台",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        135,
                        309,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                134,
                                311,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        134,
                                        311,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "Linux 环境，gcc，gdb，vim 或 gedit 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        170,
                        277,
                        187
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                169,
                                278,
                                189
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        169,
                                        278,
                                        189
                                    ],
                                    "type": "text",
                                    "content": "2.2 linux 内核模块简介",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        216,
                        223,
                        231
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                216,
                                223,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        216,
                                        223,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "2.2.1 线程基本概念",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        241,
                        507,
                        393
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                242,
                                505,
                                253
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        242,
                                        505,
                                        253
                                    ],
                                    "type": "text",
                                    "content": "Linux 内核是单体式结构，相对于微内核结构而言，其运行效率高，但系统的可维护性",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                258,
                                505,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        258,
                                        505,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "及可扩展性较差。为此，linux 提供了内核模块（module）机制，它不仅可以弥补单体式内",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                273,
                                505,
                                284
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        273,
                                        505,
                                        284
                                    ],
                                    "type": "text",
                                    "content": "核相对于微内核的一些不足，而且对系统性能没有影响。内核模块的全称是动态可加载内核",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                287,
                                506,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        287,
                                        506,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "模块（Loadable Kernel Module,KLM），简称为模块。模块是一个目标文件，能完成某种独立",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                305,
                                505,
                                315
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        305,
                                        505,
                                        315
                                    ],
                                    "type": "text",
                                    "content": "的功能，但其自身不是一个独立的进程，不能单独运行，可以动态载入内核，使其成为内核",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                319,
                                505,
                                332
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        319,
                                        505,
                                        332
                                    ],
                                    "type": "text",
                                    "content": "代码的一部分，与其他内核代码的地位完全相同。当不需要某模块功能时，可以动态卸载。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                335,
                                501,
                                347
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        335,
                                        501,
                                        347
                                    ],
                                    "type": "text",
                                    "content": "实际上，linux 中大多数设备驱动程序或文件系统都以模块方式实现，因为它们数目繁多，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                350,
                                505,
                                363
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        350,
                                        505,
                                        363
                                    ],
                                    "type": "text",
                                    "content": "体积庞大，不适合直接编译在内核中，而是通过模块机制，需要时临时加载。使用模块机制",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                367,
                                504,
                                377
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        367,
                                        504,
                                        377
                                    ],
                                    "type": "text",
                                    "content": "的另一个好处是，修改模块代码后只需重新编译和加载模块，不必重新编译内核和引导系统，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                382,
                                221,
                                393
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        382,
                                        221,
                                        393
                                    ],
                                    "type": "text",
                                    "content": "降低了系统功能的更新难度。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        396,
                        506,
                        441
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                396,
                                506,
                                411
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        396,
                                        506,
                                        411
                                    ],
                                    "type": "text",
                                    "content": "一个模块通常由一组函数和数据结构组成，用来实现某种功能，如实现一种文件系统、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                412,
                                505,
                                425
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        412,
                                        505,
                                        425
                                    ],
                                    "type": "text",
                                    "content": "一个驱动程序或其他内核上层的功能。模块自身不是一个独立的进程，当前进程运行是调用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                429,
                                389,
                                440
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        429,
                                        389,
                                        440
                                    ],
                                    "type": "text",
                                    "content": "到模块代码时，可以认为该段代码就代表当前进程在核心态运行。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        450,
                        214,
                        465
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                450,
                                213,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        450,
                                        213,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "2.2.2 内核符号表",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        474,
                        506,
                        518
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                476,
                                505,
                                486
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        476,
                                        505,
                                        486
                                    ],
                                    "type": "text",
                                    "content": "模块编程可以使用内核的一些全局变量和函数，内核符号表就是用来存放所有模块都可",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                490,
                                506,
                                503
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        490,
                                        506,
                                        503
                                    ],
                                    "type": "text",
                                    "content": "以访问的符号及相应地址的表，其存放位置在/proc/kallsyms 文件中，我们可以使用“cat",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                507,
                                336,
                                518
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        507,
                                        336,
                                        518
                                    ],
                                    "type": "text",
                                    "content": "/proc/kallsyms”命令查看当前环境下导出的内核符号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        521,
                        505,
                        581
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                523,
                                505,
                                534
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        523,
                                        505,
                                        534
                                    ],
                                    "type": "text",
                                    "content": "通常情况下，一个模块只需实现自己的功能，而无需导出任何符号；但如果其他模块需",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                538,
                                505,
                                550
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        538,
                                        505,
                                        550
                                    ],
                                    "type": "text",
                                    "content": "要调用这个模块的函数或数据结构时，该模块也可以导出符号。这样，其他模块可以使用由",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                554,
                                504,
                                565
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        554,
                                        504,
                                        565
                                    ],
                                    "type": "text",
                                    "content": "该模块导出的符号，利用现成的代码实现更加复杂的功能，这种技术也称作模块层叠技术，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                569,
                                284,
                                580
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        569,
                                        284,
                                        580
                                    ],
                                    "type": "text",
                                    "content": "当前已经使用在很多主流的内核源代码中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        583,
                        379,
                        597
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                584,
                                379,
                                597
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        584,
                                        379,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "如果一个模块需要向其他模块导出符号，可使用下面的宏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        600,
                        256,
                        613
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                597,
                                257,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        597,
                                        257,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "EXPORT_SYMBOL(symbol_name)；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        616,
                        278,
                        629
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                614,
                                278,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        614,
                                        278,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "EXPORT_SYMOBL_GPL(symbol_name)；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        630,
                        506,
                        675
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                630,
                                506,
                                644
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        630,
                                        506,
                                        644
                                    ],
                                    "type": "text",
                                    "content": "这两个宏均用于将给定的符号导出到模块外部。_GPL版本使得要导出的符号只能被GPL",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                647,
                                505,
                                658
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        647,
                                        505,
                                        658
                                    ],
                                    "type": "text",
                                    "content": "许可证下的模块使用。符号必须在模块文件的全局部分导出，不能在模块中的某个函数中导",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                661,
                                107,
                                677
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        661,
                                        107,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "出。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        698,
                        259,
                        714
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                697,
                                260,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        697,
                                        260,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "2.3 内核模块编程基础",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        736,
                        506,
                        765
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                736,
                                506,
                                749
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        736,
                                        506,
                                        749
                                    ],
                                    "type": "text",
                                    "content": "我们以一个简单的“hello world”模块的实现为例，来说明内核模块的编写结构、编译",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                753,
                                148,
                                764
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        753,
                                        148,
                                        764
                                    ],
                                    "type": "text",
                                    "content": "及加载过程。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 26
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        79,
                        226,
                        93
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                79,
                                226,
                                95
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        79,
                                        226,
                                        95
                                    ],
                                    "type": "text",
                                    "content": "2.3.1 模块代码结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        104,
                        258,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                104,
                                258,
                                118
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        104,
                                        258,
                                        118
                                    ],
                                    "type": "text",
                                    "content": "“hello world”的示例代码如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        120,
                        309,
                        382
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                120,
                                309,
                                382
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        120,
                                        309,
                                        382
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                120,
                                                309,
                                                382
                                            ],
                                            "type": "text",
                                            "content": "1 #include <linux/init.h>   \n2 #include <linux/module.h>   \n3 #include <linux/kernel.h>   \n4   \n5 static int hello_init(void)   \n6 {   \n7 "
                                        },
                                        {
                                            "bbox": [
                                                108,
                                                120,
                                                309,
                                                382
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm{printk}(\\mathrm{KERN\\_ALERT}\"hello,\\mathrm{world}\\backslash \\mathrm{n\"});"
                                        },
                                        {
                                            "bbox": [
                                                108,
                                                120,
                                                309,
                                                382
                                            ],
                                            "type": "text",
                                            "content": "   \n8 return 0;   \n9 }   \n10 static void hello_exit(void)   \n11 {   \n12 "
                                        },
                                        {
                                            "bbox": [
                                                108,
                                                120,
                                                309,
                                                382
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm{printk}(\\mathrm{KERN\\_ALERT}\"goodbye\\backslash n\")"
                                        },
                                        {
                                            "bbox": [
                                                108,
                                                120,
                                                309,
                                                382
                                            ],
                                            "type": "text",
                                            "content": "   \n13 }   \n14   \n15 module_init(hello_init);   \n16 module_exit(hello_exit);   \n17 MODULE licenses(\"GPL\");"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        86,
                        400,
                        505,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                401,
                                505,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        401,
                                        505,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "上面的代码是一个内核模块的典型结构。该模块被载入内核时会向系统日志文件中写入",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                92,
                                414,
                                506,
                                429
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        92,
                                        414,
                                        506,
                                        429
                                    ],
                                    "type": "text",
                                    "content": "“hello，world”；当被卸载时，也会向系统日志中写入“goodbye”。下面说明该模块代码的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                430,
                                138,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        430,
                                        138,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "结构组成：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        447,
                        204,
                        459
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                446,
                                205,
                                461
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        446,
                                        205,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "（1） 头文件声明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        462,
                        505,
                        507
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                462,
                                505,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        462,
                                        505,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "第1、2 行是模块编程的必需头文件。module.h包含了大量加载模块所需要的函数和符",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                478,
                                505,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        478,
                                        505,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "号的定义；init.h 包含了模块初始化和清理函数的定义。如果模块在加载时允许用户传递参",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                493,
                                295,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        493,
                                        295,
                                        507
                                    ],
                                    "type": "text",
                                    "content": "数，模块还应该包含 moduleparam.h 头文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        509,
                        214,
                        521
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                508,
                                215,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        508,
                                        215,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "（2） 模块许可申明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        524,
                        508,
                        631
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                525,
                                506,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        525,
                                        506,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "第 17 行是模块许可声明。Linux 内核从 2.4.10 版本内核开始，模块必须通过",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                540,
                                506,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        540,
                                        506,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "MODULE_LICENSE 宏声明此模块的许可证，否则在加载此模块时，会收到内核被污染 “kernel",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                557,
                                509,
                                568
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        557,
                                        509,
                                        568
                                    ],
                                    "type": "text",
                                    "content": "tainted” 的警告。从 linux/module.h 文件中可以看到，被内核接受的有意义的许可证有 “GPL”，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                572,
                                506,
                                584
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        572,
                                        506,
                                        584
                                    ],
                                    "type": "text",
                                    "content": "“GPL v2”，“GPL and additional rights”，“Dual BSD/GPL”，“Dual MPL/GPL”，“Proprietary”，其中",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                587,
                                506,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        587,
                                        506,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "“GPL” 是指明这是 GNU General Public License 的任意版本，其他许可证大家可以查阅资料",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                603,
                                505,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        603,
                                        505,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "进一步了解。MODULE_LICENSE 宏声明可以写在模块的任何地方（但必须在函数外面），不",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                618,
                                200,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        618,
                                        200,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "过惯例是写在模块最后。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        634,
                        267,
                        646
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                634,
                                267,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        634,
                                        267,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "（3） 初始化与清理函数的注册：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        649,
                        506,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                650,
                                505,
                                661
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        650,
                                        505,
                                        661
                                    ],
                                    "type": "text",
                                    "content": "内核模块程序中没有 main函数，每个模块必须定义两个函数：一个函数用来初始化（示",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                665,
                                506,
                                677
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        665,
                                        506,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "例第 5 行），主要完成模块注册和申请资源，该函数返回 0，表示初始化成功，其他值表示",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                682,
                                506,
                                693
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        682,
                                        506,
                                        693
                                    ],
                                    "type": "text",
                                    "content": "失败；另一个函数用来退出（示例第 10 行），主要完成注销和释放资源。Linux 调用宏",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                698,
                                506,
                                708
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        698,
                                        506,
                                        708
                                    ],
                                    "type": "text",
                                    "content": "module_init 和 module_exit 来注册这两个函数，如示例中第 15、16 两行代码，module_init",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                712,
                                506,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        712,
                                        506,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "宏标记的函数在加载模块时调用，module_exit 宏标记的函数在卸载模块时调用。需要注意",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                726,
                                506,
                                741
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        726,
                                        506,
                                        741
                                    ],
                                    "type": "text",
                                    "content": "的是，初始化与清理函数必须在宏 module_init和 module_exit使用前定义，否则会出现编译",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                742,
                                118,
                                757
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        742,
                                        118,
                                        757
                                    ],
                                    "type": "text",
                                    "content": "错误。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 27
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        108,
                        72,
                        220,
                        164
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                72,
                                220,
                                164
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        72,
                                        220,
                                        164
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                72,
                                                220,
                                                164
                                            ],
                                            "type": "text",
                                            "content": "初始化函数通常定义为：  \nstatic int __init init_func(v{ //初始化代码} module_init(init_func);"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        166,
                        505,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                166,
                                505,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        166,
                                        505,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "一般情况下，初始化函数应当申明为 static，以便它们不会在特定文件之外可见。如果",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                182,
                                505,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        182,
                                        505,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "该函数只是在初始化使用一次，可在声明语句中加__init标识，则模块在加载后会丢弃这个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                198,
                                232,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        198,
                                        232,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "初始化函数，释放其内存空间。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        212,
                        214,
                        304
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                212,
                                214,
                                304
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        212,
                                        214,
                                        304
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                212,
                                                214,
                                                304
                                            ],
                                            "type": "text",
                                            "content": "清理函数通常定义为：  \nstatic void __exit exit_fu{//清理代码}  \nmodule_exitexit_func);"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        306,
                        504,
                        335
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                306,
                                505,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        306,
                                        505,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "清理函数没有返回值，因此被声明为 void。声明语句中的__exit的含义与初始化函数中",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                322,
                                207,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        322,
                                        207,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "的__init 类似，不再重述。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        338,
                        399,
                        350
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                337,
                                399,
                                351
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        337,
                                        399,
                                        351
                                    ],
                                    "type": "text",
                                    "content": "一个基本的内核模块只要包含上述三个部分就可以正常工作了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        354,
                        224,
                        366
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                352,
                                227,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        352,
                                        227,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "（4） printk()函数说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        369,
                        505,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                370,
                                505,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        370,
                                        505,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "大家可能已经发现在代码第 3行还有一个头文件“<linux/kernel.h”，这不是模块编程必",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                384,
                                506,
                                398
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        384,
                                        506,
                                        398
                                    ],
                                    "type": "text",
                                    "content": "须的，而是因为我们在代码中使用了printk()函数（第7、12 行），在该头文件中包含了 printk()",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                399,
                                128,
                                414
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        399,
                                        128,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "的定义。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        416,
                        451,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                416,
                                451,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        416,
                                        451,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "Printk()会依据日志级别将指定信息输出到控制台或日志文件中，其格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        431,
                        244,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                431,
                                245,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        431,
                                        245,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "printk(日志级别 \"消息文本\")；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        448,
                        280,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                447,
                                280,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        447,
                                        280,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "如 printk(KERN_ALERT\"hello,world\\n\");",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        462,
                        505,
                        506
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                462,
                                505,
                                475
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        462,
                                        505,
                                        475
                                    ],
                                    "type": "text",
                                    "content": "一般情况下，优先级高于控制台日志级别的消息将被打印到控制台，优先级低于控制台",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                478,
                                506,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        478,
                                        506,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "日志级别的消息将被打印到 messages 日志文件中，而在伪终端下不打印任何的信息。有关",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                495,
                                305,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        495,
                                        305,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "其更详细的使用说明请大家自行查阅资料学习。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        509,
                        505,
                        538
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                507,
                                506,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        507,
                                        506,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "加载模块后，用户可使用 dmesg命令查看模块初始化函数中的输出信息，如使用“dmesg",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                525,
                                320,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        525,
                                        320,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "| tail -20”来输出“dmesg”命令的最后 20 行日志。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        540,
                        293,
                        553
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                540,
                                294,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        540,
                                        294,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "最后总结一下内核模块程序源码的组成：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        116,
                        554,
                        466,
                        684
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                116,
                                554,
                                466,
                                684
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        554,
                                        466,
                                        684
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                554,
                                                466,
                                                684
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>头文件:</td><td>#include&lt;linux/init.h&gt;#include&lt;linux/module.h</td><td>必选</td></tr><tr><td>许可声明</td><td>MODULE_LICENSE(&quot;Dual BSD/GPL&quot;)</td><td>必选</td></tr><tr><td>加载函数</td><td>static int __init hello_init(void)</td><td>必选</td></tr><tr><td>卸载函数</td><td>static void __exit hello_exit(void)</td><td>必选</td></tr><tr><td>模块参数</td><td>moduleparam(name,type,perm)</td><td>可选</td></tr><tr><td>模块导出符号</td><td>EXPORT_SYMBOL(符号名)</td><td>可选</td></tr><tr><td>模块作者等信息</td><td>MODULE_AUTHOR(&quot;作者名&quot;)</td><td>可选</td></tr></table>",
                                            "image_path": "8c5696582781d2d9cd88646275c972203e093f0e15447f6f98aec1b46b5fa5ad.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 14
                },
                {
                    "bbox": [
                        113,
                        707,
                        238,
                        721
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                707,
                                238,
                                722
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        707,
                                        238,
                                        722
                                    ],
                                    "type": "text",
                                    "content": "2.3.2 模块编译和加载",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        739,
                        250,
                        751
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                739,
                                251,
                                752
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        739,
                                        251,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "1. 模块编译的 Makefile 文件：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 28
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        505,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                73,
                                506,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        73,
                                        506,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "在linux2.6 及之后的内核中，模块的编译需要配置过的内核源代码，否则无法进行模块",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                89,
                                505,
                                100
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        89,
                                        505,
                                        100
                                    ],
                                    "type": "text",
                                    "content": "的编译工作；编译、链接后生成的内核模块后缀为.ko；编译过程首先会都内核源目录下读",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                104,
                                505,
                                117
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        104,
                                        505,
                                        117
                                    ],
                                    "type": "text",
                                    "content": "取顶层的 Makefile 文件（注意第一个字母“M”需要大写），然后返回模块源代码所在的目",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                120,
                                148,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        120,
                                        148,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "录继续编译。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        135,
                        505,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                136,
                                505,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        136,
                                        505,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "在使用make命令编译模块代码时，应先书写 Makefile 文件，且应放在模块源代码文件",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                151,
                                424,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        151,
                                        424,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "所在目录中。针对上面的“hello world”模块，编写的一个简单 Makefile：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        166,
                        503,
                        272
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 10,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                166,
                                377,
                                180
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        165,
                                        376,
                                        182
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                165,
                                                177,
                                                182
                                            ],
                                            "type": "text",
                                            "content": "1 obj-m :=hello.o",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                236,
                                                165,
                                                376,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "//生成的模块名称是：hello.ko",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                182,
                                299,
                                195
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        181,
                                        300,
                                        197
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                181,
                                                300,
                                                197
                                            ],
                                            "type": "text",
                                            "content": "2 KDIR :=/lib/modules/$(shell uname -r)/build",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                197,
                                313,
                                211
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        85,
                                        195,
                                        314,
                                        213
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                85,
                                                195,
                                                196,
                                                213
                                            ],
                                            "type": "text",
                                            "content": "3 PWD :=$(shell pwd)",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                223,
                                                196,
                                                314,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "// PWD 是当前目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                214,
                                144,
                                226
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        212,
                                        145,
                                        227
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                212,
                                                145,
                                                227
                                            ],
                                            "type": "text",
                                            "content": "4 default:",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                228,
                                503,
                                242
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        228,
                                        505,
                                        243
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                230,
                                                96,
                                                243
                                            ],
                                            "type": "text",
                                            "content": "5",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                130,
                                                228,
                                                201,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "make -C $(KDIR)",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                201,
                                                230,
                                                222,
                                                241
                                            ],
                                            "type": "inline_equation",
                                            "content": "M = S",
                                            "score": 0.52
                                        },
                                        {
                                            "bbox": [
                                                223,
                                                228,
                                                505,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "(PWD) modules // -C 指定内核源码目录，M 指定模块源码目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                245,
                                136,
                                256
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        244,
                                        139,
                                        258
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                245,
                                                103,
                                                256
                                            ],
                                            "type": "text",
                                            "content": "6",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                105,
                                                244,
                                                139,
                                                258
                                            ],
                                            "type": "text",
                                            "content": "clean:",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                260,
                                275,
                                272
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        259,
                                        276,
                                        275
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                261,
                                                96,
                                                273
                                            ],
                                            "type": "text",
                                            "content": "7",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                130,
                                                259,
                                                276,
                                                275
                                            ],
                                            "type": "text",
                                            "content": "make -C $(KDIR) M=$(PWD) clean",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        275,
                        505,
                        304
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                276,
                                505,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        276,
                                        505,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "其中：KDIR 是内核源码目录，该目录通过当前运行内核使用的模块目录中的build符号",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                290,
                                506,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        290,
                                        325,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "链接指定。或者直接给出源码目录也可以，如：KDIR :",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        325,
                                        293,
                                        333,
                                        302
                                    ],
                                    "type": "inline_equation",
                                    "content": ": =",
                                    "score": 0.6
                                },
                                {
                                    "bbox": [
                                        333,
                                        290,
                                        506,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "/usr/src/linux-headers-4.4.0-36-generic.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        306,
                        488,
                        319
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                307,
                                489,
                                320
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        307,
                                        489,
                                        320
                                    ],
                                    "type": "text",
                                    "content": "需要注意的是，在第 5 行和第 7 行的“make”之前应该是“tab”键，而不是空格。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        330,
                        334,
                        343
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                329,
                                336,
                                344
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        329,
                                        336,
                                        344
                                    ],
                                    "type": "text",
                                    "content": "2. 由多个文件构成的内核模块的 Makefile 文件：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        353,
                        504,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                354,
                                504,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        354,
                                        504,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "当模块的功能较多时，把模块的源代码分成几个文件是一个明智的选择，如下面的示例：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        370,
                        389,
                        461
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                370,
                                389,
                                461
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        370,
                                        389,
                                        461
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                370,
                                                389,
                                                461
                                            ],
                                            "type": "text",
                                            "content": "hello1print.c:  \n#include <linux/init.h>  \n#include <linux/module.h>  \n#include <linux/kernel.h>  \nMODULE_LICENSE(\"GPL\");  \nvoid hello2print(void); //来源于第二个.c文件：hello2print.c"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 15,
                    "sub_type": "code",
                    "guess_lang": "cpp"
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        477,
                        289,
                        757
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                477,
                                289,
                                757
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        477,
                                        289,
                                        757
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                477,
                                                289,
                                                757
                                            ],
                                            "type": "text",
                                            "content": "static int __init hello_init(void)   \n{ printf(KERN_ALERT\"hello,world\\n\"); hello2print(); return 0;   \n}   \nstatic void _exit hello_exit(void)   \n{ printf(KERN_ALERT\"goodbye\\n\");   \n}   \nmodule_init(hello_init); module_exit(hello_exit);   \nhello2print.c   \n#include \"linux/kernel.h\"   \nvoid hello2print(void)"
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 16,
                    "sub_type": "code",
                    "guess_lang": "c"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 29
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        107,
                        73,
                        315,
                        117
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                73,
                                315,
                                117
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        73,
                                        315,
                                        117
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                73,
                                                315,
                                                117
                                            ],
                                            "type": "text",
                                            "content": "{ printk(KERN_ALERT\"this is hello2 print\\n\"); }"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        108,
                        135,
                        413,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                135,
                                314,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        135,
                                        233,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "则 Makefile 相应的行改为：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        245,
                                        136,
                                        314,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "obj-m :=hello.o",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                246,
                                151,
                                413,
                                164
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        246,
                                        151,
                                        413,
                                        164
                                    ],
                                    "type": "text",
                                    "content": "hello-objs :=hello1print.o hello2print.o",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        166,
                        503,
                        194
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                164,
                                506,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        164,
                                        506,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "其中含有 module_init(hello_init);module_exit(hello_exit);这两个宏的.o 模块应放在开始。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                182,
                                221,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        182,
                                        221,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "完整的Makefile 文件内容为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        197,
                        503,
                        319
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                197,
                                386,
                                211
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        196,
                                        387,
                                        213
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                197,
                                                183,
                                                213
                                            ],
                                            "type": "text",
                                            "content": "1 obj-m :=hello2.o",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                241,
                                                196,
                                                387,
                                                212
                                            ],
                                            "type": "text",
                                            "content": "//生成的模块名称是：hello2.ko",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                213,
                                282,
                                226
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        213,
                                        283,
                                        228
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                213,
                                                283,
                                                228
                                            ],
                                            "type": "text",
                                            "content": "2 hello2-objs :=hello1print.o hello2print.o",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                229,
                                299,
                                242
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        227,
                                        300,
                                        243
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                227,
                                                300,
                                                243
                                            ],
                                            "type": "text",
                                            "content": "3 KDIR :=/lib/modules/$(shell uname -r)/build",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                244,
                                312,
                                257
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        242,
                                        314,
                                        260
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                242,
                                                136,
                                                260
                                            ],
                                            "type": "text",
                                            "content": "4 PWD :",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                136,
                                                245,
                                                148,
                                                256
                                            ],
                                            "type": "inline_equation",
                                            "content": ": = \\$ 5",
                                            "score": 0.53
                                        },
                                        {
                                            "bbox": [
                                                148,
                                                242,
                                                196,
                                                260
                                            ],
                                            "type": "text",
                                            "content": "(shell pwd)",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                223,
                                                243,
                                                314,
                                                258
                                            ],
                                            "type": "text",
                                            "content": "// PWD 是当前目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                260,
                                143,
                                271
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        259,
                                        145,
                                        274
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                259,
                                                145,
                                                274
                                            ],
                                            "type": "text",
                                            "content": "5 default:",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                275,
                                503,
                                288
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        275,
                                        504,
                                        289
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                276,
                                                97,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "6",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                130,
                                                275,
                                                201,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "make -C $(KDIR)",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                201,
                                                276,
                                                223,
                                                288
                                            ],
                                            "type": "inline_equation",
                                            "content": "M = S",
                                            "score": 0.59
                                        },
                                        {
                                            "bbox": [
                                                223,
                                                275,
                                                504,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "(PWD) modules // -C 指定内核源码目录，M 指定模块源码目录",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                292,
                                136,
                                302
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        290,
                                        139,
                                        306
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                290,
                                                139,
                                                306
                                            ],
                                            "type": "text",
                                            "content": "7 clean:",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                306,
                                275,
                                319
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        306,
                                        276,
                                        321
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                307,
                                                97,
                                                320
                                            ],
                                            "type": "text",
                                            "content": "8",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                130,
                                                306,
                                                276,
                                                321
                                            ],
                                            "type": "text",
                                            "content": "make -C $(KDIR) M=$(PWD) clean",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        322,
                        504,
                        365
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                322,
                                505,
                                334
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        322,
                                        505,
                                        334
                                    ],
                                    "type": "text",
                                    "content": "注意：1）第 1 行和第 2 行中的“hello2”必须名字相同，表示模块 hello2 的目标文件",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                337,
                                502,
                                351
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        337,
                                        502,
                                        351
                                    ],
                                    "type": "text",
                                    "content": "来源于 hello1print.o 和 hello2print.o。2）在第 6 行和第 8 行的“make”之前应该是“tab”",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                354,
                                169,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        354,
                                        169,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "键，而不是空格。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        376,
                        193,
                        389
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                376,
                                194,
                                390
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        376,
                                        194,
                                        390
                                    ],
                                    "type": "text",
                                    "content": "3. 相关操作命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        400,
                        356,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                401,
                                357,
                                414
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        401,
                                        357,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "以下命令除 make 命令外，其他都应以 root 用户执行：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        416,
                        239,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                414,
                                240,
                                430
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        414,
                                        240,
                                        430
                                    ],
                                    "type": "text",
                                    "content": "（1） 模块编译命令 make：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        431,
                        192,
                        443
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                430,
                                193,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        430,
                                        193,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "命令格式：$make",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        447,
                        504,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                446,
                                506,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        446,
                                        506,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "不带参数的make命令将默认当前目录下名为makefile或者名为Makefile的文件为描述",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                460,
                                119,
                                478
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        460,
                                        119,
                                        478
                                    ],
                                    "type": "text",
                                    "content": "文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        478,
                        308,
                        490
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                476,
                                309,
                                493
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        476,
                                        309,
                                        493
                                    ],
                                    "type": "text",
                                    "content": "（2） 加载模块命令 insmod 或 modprobe：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        493,
                        504,
                        522
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                494,
                                505,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        494,
                                        505,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "insmod 命令把需要载入的模块以目标代码的形式加载到内核中，将自动调用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                510,
                                211,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        510,
                                        211,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "init_module 宏。其格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        525,
                        280,
                        538
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                524,
                                281,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        524,
                                        281,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "# insmod [filename] [module options...]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        540,
                        504,
                        568
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                540,
                                506,
                                554
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        540,
                                        506,
                                        554
                                    ],
                                    "type": "text",
                                    "content": "Modprobe 命令的功能与 insmod 一样，区别在于 modprobe 能够处理 module 载入的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                555,
                                189,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        555,
                                        189,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "相依问题，其格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        572,
                        421,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                571,
                                423,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        571,
                                        423,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "# modprobe [module options...] [modulename] [module parameters...]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        587,
                        333,
                        599
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                586,
                                334,
                                602
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        586,
                                        334,
                                        602
                                    ],
                                    "type": "text",
                                    "content": "如本示例中加载模块的命令为：# insmod hello.ko",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        602,
                        238,
                        614
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                602,
                                239,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        602,
                                        239,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "（3） 查看模块命令 lsmod：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        120,
                        618,
                        504,
                        645
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                618,
                                505,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        618,
                                        505,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "列出当前所有已载入系统的模块信息，包括模块名、大小、其他模块的引用计数等",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                123,
                                634,
                                242,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        634,
                                        242,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "信息。命令格式：# lsmod",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        649,
                        433,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                649,
                                434,
                                664
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        649,
                                        434,
                                        664
                                    ],
                                    "type": "text",
                                    "content": "通常会配合 grep 来查看指定模块是否已经加载：# lsmod | grep 模块名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        666,
                        248,
                        677
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                665,
                                249,
                                679
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        665,
                                        249,
                                        679
                                    ],
                                    "type": "text",
                                    "content": "（5） 卸载模块命令 rmmod：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        681,
                        293,
                        692
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                681,
                                294,
                                693
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        681,
                                        294,
                                        693
                                    ],
                                    "type": "text",
                                    "content": "卸载已经载入内核的指定模块，格式为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        696,
                        186,
                        708
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                696,
                                188,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        696,
                                        188,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "# rmmod 模块名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        719,
                        210,
                        731
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                720,
                                210,
                                732
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        720,
                                        210,
                                        732
                                    ],
                                    "type": "text",
                                    "content": "4. 带参数的模块编程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        742,
                        504,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                743,
                                505,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        743,
                                        505,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "有时候用户需要向模块传递一些参数，如使用模块机制实现设备驱动程序时，用户可能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 30
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        294,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                73,
                                295,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        73,
                                        295,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "希望在不同条件下让设备在不同状态下工作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        89,
                        183,
                        100
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                87,
                                185,
                                103
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        87,
                                        185,
                                        103
                                    ],
                                    "type": "text",
                                    "content": "（1） 头文件：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        104,
                        424,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                102,
                                427,
                                120
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        102,
                                        427,
                                        120
                                    ],
                                    "type": "text",
                                    "content": "模块要带参数，则头文件必须包括：#include <linux/moduleparam.h>。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        120,
                        232,
                        133
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                116,
                                233,
                                137
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        116,
                                        233,
                                        137
                                    ],
                                    "type": "text",
                                    "content": "（2） module_param ()宏",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        135,
                        509,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                135,
                                510,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        135,
                                        510,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "module_param ()宏的功能是在加载模块时或者模块加载以后传递参数给模块，其格式为：",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                152,
                                236,
                                164
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        152,
                                        236,
                                        164
                                    ],
                                    "type": "text",
                                    "content": "module_param(name,type,perm);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        166,
                        243,
                        178
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                166,
                                243,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        166,
                                        243,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "其中：name:模块参数的名称",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        139,
                        182,
                        264,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                140,
                                182,
                                265,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        140,
                                        182,
                                        265,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "type: 模块参数的数据类型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        139,
                        197,
                        268,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                140,
                                198,
                                268,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        140,
                                        198,
                                        268,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "perm: 模块参数的访问权限",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        212,
                        304,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                213,
                                305,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        213,
                                        305,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "更加详细的内容请大家参考其他资料自学。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        228,
                        509,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                227,
                                509,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        227,
                                        509,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "程序中首先将所有需要获取参数值的变量声明为全局变量；然后使用宏 module_param ()",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                244,
                                505,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        244,
                                        505,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "对所有参数进行说明，这个宏定义应当放在任何函数之外，典型地是出现在源文件的前面，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                261,
                                248,
                                272
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        261,
                                        248,
                                        272
                                    ],
                                    "type": "text",
                                    "content": "如下面示例程序中的第8、9两行。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        275,
                        505,
                        304
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                276,
                                505,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        276,
                                        505,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "然后在加载模块的命令行后面跟上参数值即可。注意，必须明确指出哪一个变量的值是",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                291,
                                440,
                                302
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        291,
                                        440,
                                        302
                                    ],
                                    "type": "text",
                                    "content": "多少，否则系统不能判断。如对本示例，可用如下命令加载模块并传递参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        126,
                        307,
                        318,
                        320
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                126,
                                307,
                                318,
                                320
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        126,
                                        307,
                                        318,
                                        320
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                126,
                                                307,
                                                318,
                                                320
                                            ],
                                            "type": "text",
                                            "content": "insmod module_parako who "
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                307,
                                                318,
                                                320
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\equiv"
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                307,
                                                318,
                                                320
                                            ],
                                            "type": "text",
                                            "content": " zwh times "
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                307,
                                                318,
                                                320
                                            ],
                                            "type": "inline_equation",
                                            "content": "= 4"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        121,
                        338,
                        170,
                        350
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                337,
                                171,
                                352
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        337,
                                        171,
                                        352
                                    ],
                                    "type": "text",
                                    "content": "示例程序：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        122,
                        354,
                        334,
                        693
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 36,
                    "blocks": [
                        {
                            "bbox": [
                                122,
                                354,
                                224,
                                365
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        354,
                                        226,
                                        367
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                354,
                                                226,
                                                367
                                            ],
                                            "type": "text",
                                            "content": "1 #include<linux/init.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                370,
                                243,
                                380
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        370,
                                        243,
                                        382
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                370,
                                                243,
                                                382
                                            ],
                                            "type": "text",
                                            "content": "2 #include<linux/module.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                386,
                                238,
                                396
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        385,
                                        238,
                                        398
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                385,
                                                238,
                                                398
                                            ],
                                            "type": "text",
                                            "content": "3 #include<linux/kernel.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                401,
                                273,
                                412
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        399,
                                        274,
                                        414
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                399,
                                                274,
                                                414
                                            ],
                                            "type": "text",
                                            "content": "4 #include <linux/moduleparam.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                417,
                                244,
                                428
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        415,
                                        245,
                                        431
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                415,
                                                245,
                                                431
                                            ],
                                            "type": "text",
                                            "content": "5 MODULE_LICENSE(\"GPL\");",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                432,
                                270,
                                443
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        431,
                                        271,
                                        444
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                431,
                                                271,
                                                444
                                            ],
                                            "type": "text",
                                            "content": "6 static char *who; //参数申明",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                448,
                                205,
                                459
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        446,
                                        207,
                                        461
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                446,
                                                207,
                                                461
                                            ],
                                            "type": "text",
                                            "content": "7 static int times;",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                463,
                                334,
                                476
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        120,
                                        462,
                                        336,
                                        477
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                120,
                                                462,
                                                336,
                                                477
                                            ],
                                            "type": "text",
                                            "content": "8 module_param(who,char,0644); //参数说明",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                479,
                                268,
                                491
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        478,
                                        269,
                                        493
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                478,
                                                269,
                                                493
                                            ],
                                            "type": "text",
                                            "content": "9 module_param(times,int,0644);",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                494,
                                282,
                                507
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        492,
                                        284,
                                        509
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                494,
                                                137,
                                                507
                                            ],
                                            "type": "text",
                                            "content": "10",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                148,
                                                492,
                                                284,
                                                509
                                            ],
                                            "type": "text",
                                            "content": "static int __init hello_init(void)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                510,
                                157,
                                521
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        509,
                                        161,
                                        524
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                509,
                                                139,
                                                523
                                            ],
                                            "type": "text",
                                            "content": "11",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                509,
                                                161,
                                                524
                                            ],
                                            "type": "text",
                                            "content": "{",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                526,
                                193,
                                536
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        523,
                                        196,
                                        540
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                524,
                                                136,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "12",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                170,
                                                523,
                                                196,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "int i;",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                541,
                                270,
                                553
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        539,
                                        271,
                                        555
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                540,
                                                136,
                                                554
                                            ],
                                            "type": "text",
                                            "content": "13",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                171,
                                                539,
                                                271,
                                                555
                                            ],
                                            "type": "text",
                                            "content": "for(i = 1;i <= times;i++)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                556,
                                291,
                                569
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        555,
                                        292,
                                        571
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                555,
                                                136,
                                                569
                                            ],
                                            "type": "text",
                                            "content": "14",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                171,
                                                555,
                                                292,
                                                571
                                            ],
                                            "type": "text",
                                            "content": "printk(\"%d %s!\\n\",i,who);",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                573,
                                211,
                                583
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        571,
                                        213,
                                        586
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                571,
                                                136,
                                                586
                                            ],
                                            "type": "text",
                                            "content": "15",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                171,
                                                571,
                                                213,
                                                586
                                            ],
                                            "type": "text",
                                            "content": "return 0;",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                587,
                                157,
                                599
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        587,
                                        160,
                                        602
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                587,
                                                140,
                                                601
                                            ],
                                            "type": "text",
                                            "content": "16",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                587,
                                                160,
                                                602
                                            ],
                                            "type": "text",
                                            "content": "}",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                603,
                                293,
                                615
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        602,
                                        294,
                                        618
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                602,
                                                138,
                                                616
                                            ],
                                            "type": "text",
                                            "content": "17",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                149,
                                                602,
                                                294,
                                                618
                                            ],
                                            "type": "text",
                                            "content": "static void __exit hello_exit(void)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                619,
                                157,
                                630
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        618,
                                        161,
                                        634
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                618,
                                                140,
                                                633
                                            ],
                                            "type": "text",
                                            "content": "18",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                618,
                                                161,
                                                634
                                            ],
                                            "type": "text",
                                            "content": "{",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                634,
                                303,
                                647
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        633,
                                        305,
                                        649
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                634,
                                                136,
                                                648
                                            ],
                                            "type": "text",
                                            "content": "19",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                171,
                                                633,
                                                305,
                                                649
                                            ],
                                            "type": "text",
                                            "content": "printk(\"Goodbye,%s!\\n\",who);",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                650,
                                157,
                                661
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 33,
                            "lines": [
                                {
                                    "bbox": [
                                        120,
                                        648,
                                        161,
                                        665
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                120,
                                                648,
                                                161,
                                                665
                                            ],
                                            "type": "text",
                                            "content": "20 }",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                666,
                                254,
                                678
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 34,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        665,
                                        255,
                                        681
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                665,
                                                138,
                                                679
                                            ],
                                            "type": "text",
                                            "content": "21",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                143,
                                                665,
                                                255,
                                                681
                                            ],
                                            "type": "text",
                                            "content": "module_init(hello_init);",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                122,
                                682,
                                257,
                                693
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 35,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        680,
                                        258,
                                        697
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                681,
                                                137,
                                                694
                                            ],
                                            "type": "text",
                                            "content": "22",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                148,
                                                680,
                                                258,
                                                697
                                            ],
                                            "type": "text",
                                            "content": "module_exit(hello_exit);",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        115,
                        731,
                        202,
                        748
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                731,
                                204,
                                750
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        731,
                                        204,
                                        750
                                    ],
                                    "type": "text",
                                    "content": "2.4 实验指南",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 31
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        79,
                        295,
                        94
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                79,
                                295,
                                95
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        79,
                                        295,
                                        95
                                    ],
                                    "type": "text",
                                    "content": "2.4.1 linux 内核链表结构及操作",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        104,
                        505,
                        149
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                104,
                                505,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        104,
                                        505,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "链表是linux内核中最简单、最常用的一种数据结构。Linux内核对链表的实现方式与众",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                121,
                                505,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        121,
                                        505,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "不同，它给出了一种抽象链表定义，实际使用中可将其嵌入到其他数据结构中，从而演化出",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                136,
                                200,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        136,
                                        200,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "所需要的复杂数据结构。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        158,
                        186,
                        171
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                158,
                                187,
                                172
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        158,
                                        187,
                                        172
                                    ],
                                    "type": "text",
                                    "content": "1. 链表的定义：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        182,
                        257,
                        242
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                182,
                                257,
                                242
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        182,
                                        257,
                                        242
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                182,
                                                257,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "Linux中链表的定义为：  \nstruct list_head{structlist_head \\*next,\\*prev;1"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        96,
                        243,
                        493,
                        273
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                245,
                                492,
                                256
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        245,
                                        492,
                                        256
                                    ],
                                    "type": "text",
                                    "content": "这个不含数据域的链表，可以嵌入到任何结构中，形成结构复杂的链表，之后就以",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                98,
                                260,
                                478,
                                273
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        98,
                                        260,
                                        478,
                                        273
                                    ],
                                    "type": "text",
                                    "content": "struct list_head为基本对象，进行链表的插入、删除、合并、遍历等各种操作。如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        275,
                        217,
                        335
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                275,
                                217,
                                335
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        275,
                                        217,
                                        335
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                275,
                                                217,
                                                335
                                            ],
                                            "type": "text",
                                            "content": "struct numlist {\n    int num;\n    struct list_head list;\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        107,
                        345,
                        182,
                        359
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                346,
                                181,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        346,
                                        181,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "2. 链表的操作",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        369,
                        286,
                        382
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                367,
                                287,
                                385
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        367,
                                        287,
                                        385
                                    ],
                                    "type": "text",
                                    "content": "（1）list_for_each()宏和 list_entry()宏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        384,
                        499,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                385,
                                500,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        385,
                                        500,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "Linux 内核为抽象链表定义了若干操作，如申明及初始化链表、插入节点、删除节点、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                100,
                                401,
                                499,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        100,
                                        401,
                                        499,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "合并链表、遍历链表等。本实验只涉及读取内核已有链表，所以这里只介绍链表遍历操作，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                99,
                                416,
                                424,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        99,
                                        416,
                                        424,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "感兴趣的同学可以查看/usr/src/linux4.4.19/include/linux/list.h 文件学习。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        117,
                        431,
                        253,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                432,
                                253,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        432,
                                        253,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "list.h中定义了遍历链表的宏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        117,
                        447,
                        367,
                        538
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                117,
                                447,
                                367,
                                538
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        447,
                                        367,
                                        538
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                447,
                                                367,
                                                538
                                            ],
                                            "type": "text",
                                            "content": "/* list_for_each - iterate over a list\n* @pos: the &struct list_head to use as a loop cursor.\n* @head: the head for your list.\n*/\n#define list_for_each(pos, head) \\\nfor (pos = (head) -> next; pos != (head); pos = pos->next)"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        117,
                        539,
                        445,
                        554
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                539,
                                446,
                                554
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        539,
                                        446,
                                        554
                                    ],
                                    "type": "text",
                                    "content": "这个宏仅仅是找到一个个节点在链表中的偏移位置pos，如图2-1 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        123,
                        559,
                        262,
                        650
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                559,
                                262,
                                650
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        559,
                                        262,
                                        650
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                559,
                                                262,
                                                650
                                            ],
                                            "type": "image",
                                            "image_path": "16e0b5d1d8b750f96f2f0ca9fca4f70df1d53cdfcec3a346d21b668739c668be.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                143,
                                661,
                                251,
                                673
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        145,
                                        661,
                                        250,
                                        674
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                145,
                                                661,
                                                250,
                                                674
                                            ],
                                            "type": "text",
                                            "content": "图2-1 list_for_each()宏",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 13
                },
                {
                    "type": "image",
                    "bbox": [
                        310,
                        560,
                        431,
                        650
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                310,
                                560,
                                431,
                                650
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        310,
                                        560,
                                        431,
                                        650
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                310,
                                                560,
                                                431,
                                                650
                                            ],
                                            "type": "image",
                                            "image_path": "92220b9c147f7c8f052989864f727a61513e9b59b96a8a33fc4e65df31d5a3ae.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 15,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                327,
                                661,
                                422,
                                673
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        329,
                                        660,
                                        423,
                                        675
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                329,
                                                660,
                                                423,
                                                675
                                            ],
                                            "type": "text",
                                            "content": "图2-2 list_entry()宏",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 15
                },
                {
                    "bbox": [
                        96,
                        681,
                        505,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                681,
                                505,
                                693
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        681,
                                        505,
                                        693
                                    ],
                                    "type": "text",
                                    "content": "问题是，如何通过 pos 获得节点的起始地址，以便引用节点中的其他域？在 list.h 中",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                99,
                                696,
                                196,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        99,
                                        696,
                                        196,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "定义了 list_entry()宏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        117,
                        712,
                        296,
                        725
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                710,
                                296,
                                727
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        710,
                                        296,
                                        727
                                    ],
                                    "type": "text",
                                    "content": "/* list_entry - get the struct for this entry",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        728,
                        352,
                        756
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                728,
                                299,
                                740
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        725,
                                        300,
                                        744
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                725,
                                                300,
                                                744
                                            ],
                                            "type": "text",
                                            "content": "* @ptr: the &struct list_head pointer.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                123,
                                743,
                                352,
                                756
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        741,
                                        355,
                                        759
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                741,
                                                355,
                                                759
                                            ],
                                            "type": "text",
                                            "content": "* @type: the type of the struct this is embedded in.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 32
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        116,
                        73,
                        381,
                        86
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                73,
                                381,
                                87
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        73,
                                        381,
                                        87
                                    ],
                                    "type": "text",
                                    "content": "* @member: the name of the list_head within the struct.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        89,
                        136,
                        100
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                89,
                                138,
                                104
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        89,
                                        138,
                                        104
                                    ],
                                    "type": "text",
                                    "content": "*/",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        118,
                        105,
                        286,
                        133
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                104,
                                286,
                                117
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        104,
                                        286,
                                        117
                                    ],
                                    "type": "text",
                                    "content": "#define list_entry(ptr, type, member) \\",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                130,
                                120,
                                271,
                                134
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        120,
                                        271,
                                        134
                                    ],
                                    "type": "text",
                                    "content": "container_of(ptr, type, member)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        117,
                        135,
                        446,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                133,
                                448,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        133,
                                        448,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "其中宏 container_of()定义在/usr/src/linux4.4.19/include/linux/kernel.h 中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        118,
                        151,
                        364,
                        195
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                118,
                                151,
                                364,
                                195
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        118,
                                        151,
                                        364,
                                        195
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                118,
                                                151,
                                                364,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "define container_of(ptr, type, member) {{const typeof((type*)0)->member)\\*mptr = (ptr);"
                                        },
                                        {
                                            "bbox": [
                                                118,
                                                151,
                                                364,
                                                195
                                            ],
                                            "type": "inline_equation",
                                            "content": "(type\\*)(char"
                                        },
                                        {
                                            "bbox": [
                                                118,
                                                151,
                                                364,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "_mptr - offsetof(type,member));}}"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "algorithm"
                },
                {
                    "bbox": [
                        96,
                        197,
                        505,
                        242
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                198,
                                505,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        198,
                                        505,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "该宏的功能是计算返回包含 ptr 指向的成员所在的 type 类型数据结构的指针，如图",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                99,
                                213,
                                504,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        99,
                                        213,
                                        504,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "2-2 所示。其实现思路是：计算 type 结构体成员 member 在结构体中的偏移量，然后用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                98,
                                229,
                                367,
                                242
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        98,
                                        229,
                                        367,
                                        242
                                    ],
                                    "type": "text",
                                    "content": "ptr 的值减去这个偏移量，就得出 type 数据结构的首地址。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        118,
                        244,
                        240,
                        257
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                245,
                                240,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        245,
                                        240,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "例如前面定义的链表结构：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        117,
                        260,
                        238,
                        319
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                117,
                                260,
                                238,
                                319
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        260,
                                        238,
                                        319
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                260,
                                                238,
                                                319
                                            ],
                                            "type": "text",
                                            "content": "struct numlist {\n    int num;\n    struct list_head list;\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        118,
                        322,
                        282,
                        334
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                322,
                                283,
                                335
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        322,
                                        283,
                                        335
                                    ],
                                    "type": "text",
                                    "content": "可通过如下方式遍历链表的各节点：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        117,
                        338,
                        356,
                        444
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                117,
                                338,
                                356,
                                444
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        338,
                                        356,
                                        444
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                338,
                                                356,
                                                444
                                            ],
                                            "type": "text",
                                            "content": "struct numlist numhead //链表头节点\nstruct list_head *pos;\nstruct numlist *p;\nlist_for_each(pos, &numhead.list) {\n    p=list_entry(pos, struct numlist, list);\n    //下面可以对p指向的numlist节点进行相关操作\n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        114,
                        447,
                        240,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                445,
                                240,
                                461
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        445,
                                        240,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "（2）list_for_each_entry()宏",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                114,
                                461,
                                139,
                                475
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        461,
                                        139,
                                        475
                                    ],
                                    "type": "text",
                                    "content": "/**",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        478,
                        396,
                        552
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                478,
                                389,
                                491
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        476,
                                        390,
                                        494
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                476,
                                                232,
                                                494
                                            ],
                                            "type": "text",
                                            "content": "* list_for_each_entry -",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                265,
                                                476,
                                                390,
                                                493
                                            ],
                                            "type": "text",
                                            "content": "iterate over list of given type",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                124,
                                494,
                                346,
                                507
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        491,
                                        347,
                                        511
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                491,
                                                164,
                                                511
                                            ],
                                            "type": "text",
                                            "content": "* @pos:",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                201,
                                                493,
                                                347,
                                                508
                                            ],
                                            "type": "text",
                                            "content": "the type * to use as a loop cursor.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                124,
                                509,
                                295,
                                522
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        507,
                                        296,
                                        524
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                507,
                                                170,
                                                524
                                            ],
                                            "type": "text",
                                            "content": "* @head:",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                201,
                                                509,
                                                296,
                                                523
                                            ],
                                            "type": "text",
                                            "content": "the head for your list.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                124,
                                525,
                                396,
                                538
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        523,
                                        398,
                                        539
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                523,
                                                185,
                                                539
                                            ],
                                            "type": "text",
                                            "content": "* @member:",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                206,
                                                525,
                                                398,
                                                539
                                            ],
                                            "type": "text",
                                            "content": "the name of the list_struct within the struct.",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                124,
                                541,
                                136,
                                552
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        124,
                                        540,
                                        138,
                                        555
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                124,
                                                540,
                                                138,
                                                555
                                            ],
                                            "type": "text",
                                            "content": "*/",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "code",
                    "bbox": [
                        118,
                        556,
                        473,
                        616
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                118,
                                556,
                                473,
                                616
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        118,
                                        556,
                                        473,
                                        616
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                118,
                                                556,
                                                473,
                                                616
                                            ],
                                            "type": "text",
                                            "content": "define list_for_each_entry(pos, head, member)  \nfor (pos = list_entry((head) -> next, sizeof(*pos), member);  \n    prefetch(pos -> member.next), &pos -> member != (head);  \n    pos = list_entry(pos -> member.next, sizeof(*pos), member))"
                                        }
                                    ]
                                }
                            ],
                            "index": 18,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 18,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        86,
                        618,
                        505,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                618,
                                506,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        618,
                                        506,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "该宏实际上是一个 for 循环，利用传入的 pos 作为循环变量，从表头 head 开始，逐",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                633,
                                506,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        633,
                                        506,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "项向后（next 方向）移动 pos，直至又回head。prefetch() 可以不考虑，用于预取以提高遍",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                648,
                                129,
                                663
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        648,
                                        129,
                                        663
                                    ],
                                    "type": "text",
                                    "content": "历速度。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        672,
                        348,
                        686
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                671,
                                349,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        671,
                                        349,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "2.4.2 进程的 task_struct 结构及家族关系",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        696,
                        505,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                695,
                                506,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        695,
                                        506,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "Linux 进程描述符 task_struct 结构定义在/usr/src/linux4.4.19/include/linux/sched.h 中，包",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                712,
                                458,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        712,
                                        458,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "含众多的成员项，部分与本实验相关的成员项有：（相关含义自行查阅资料学习）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        120,
                        728,
                        264,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                726,
                                264,
                                742
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        726,
                                        227,
                                        742
                                    ],
                                    "type": "text",
                                    "content": "#define TASK_RUNNING",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        257,
                                        729,
                                        264,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "0",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        743,
                        264,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                122,
                                744,
                                265,
                                757
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        122,
                                        744,
                                        265,
                                        757
                                    ],
                                    "type": "text",
                                    "content": "#define TASK_INTERRUPTIBLE 1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 33
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        116,
                        72,
                        456,
                        491
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                116,
                                72,
                                456,
                                491
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        72,
                                        456,
                                        491
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                72,
                                                456,
                                                491
                                            ],
                                            "type": "text",
                                            "content": "define TASK_UNINTERRUPTIBLE 2\n#define _TASK_STOPPED 4\n#define _TASK tracerED 8\n/* in tsk->exit_state */\n#define EXITDead 16\n#define EXIT_ZOMBIE 32\n/* in tsk->state again */\n#define TASK_DEAD 64\n#define TASK_WAKEKILL 128\n#define TASK_WAKING 256\nstruct task_struct {\n    volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */\n    void *stack;\n    int prio, static_prio, normal_prio;\n    unsigned int policy;\n    struct list_head tasks; /*线程组长链表，是节点*/\n    struct mm_struct *mm, *active_mm;\n    pid_t pid;\n    pid_t tgid;\n    struct task_struct __rcu *real_parent; /* real parent process */\n    struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */\n    struct list_head children; /* list of my children */\n    struct list_head sibling; /* linkage in my parent's children list */\n    cptime_t utime, stime, utimescaled, stimescaled;\n    char comm[TASKCOMM_LEN]; /* executable name excluding path */\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        493,
                        505,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                493,
                                505,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        493,
                                        505,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "Linux 的进程和轻量级进程/线程均有相应的 task_struct 结构和 PID 号，而 POSIX 要求同",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                508,
                                506,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        508,
                                        506,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "一组线程有统一的 PID，为此 linux 引入了 tgid（thread group identifer），tgid 实际上是线程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                525,
                                505,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        525,
                                        505,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "组第一个线程的pid值，该线程称为线程组长。对于普通进程，其 pid与 tgid是相同的。此",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                540,
                                505,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        540,
                                        505,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "外，linux系统的进程包含一种特殊的类型——内核线程（kernel thread），完成内核的一些特",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                555,
                                506,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        555,
                                        506,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "定任务，并始终在核心态运行，没有用户态地址空间，其 task_struct 结构的 mm 成员项为",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                572,
                                182,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        572,
                                        182,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "NULL，如交换进程。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        587,
                        505,
                        630
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                587,
                                505,
                                600
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        587,
                                        505,
                                        600
                                    ],
                                    "type": "text",
                                    "content": "实验内容（1）可以利用内核的线程组长链表实现，每个线程组长通过 task_struct 结",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                98,
                                602,
                                506,
                                618
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        98,
                                        602,
                                        506,
                                        618
                                    ],
                                    "type": "text",
                                    "content": "构的 tasks 成员加入该链表。Linux 内核提供了宏 for_each_process()访问该链表中的每个进",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                97,
                                617,
                                117,
                                633
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        97,
                                        617,
                                        117,
                                        633
                                    ],
                                    "type": "text",
                                    "content": "程：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        634,
                        359,
                        663
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                634,
                                359,
                                663
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        634,
                                        359,
                                        663
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                634,
                                                359,
                                                663
                                            ],
                                            "type": "text",
                                            "content": "define for_each_process(p) \\  \nfor (p = &init_task; (p = next_task(p)) != &init_task; )"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        117,
                        665,
                        379,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                664,
                                380,
                                680
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        664,
                                        380,
                                        680
                                    ],
                                    "type": "text",
                                    "content": "宏 for_each_process 定义在/include/linux/sched.h 文件中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        96,
                        680,
                        506,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                681,
                                506,
                                693
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        681,
                                        506,
                                        693
                                    ],
                                    "type": "text",
                                    "content": "实验内容（2）需要了解 linux 进程家族的组织情况。所以的进程都是 PID 为 1 的 init",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                99,
                                697,
                                506,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        99,
                                        697,
                                        506,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "进程的后代，内核在系统启动的最后阶段创建init进程，并由其完成后续启动工作。系统",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                99,
                                712,
                                506,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        99,
                                        712,
                                        506,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "中的每个进程必有一个父进程，相应的，每个进程也可以拥有零个或多个子进程。父进程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                104,
                                726,
                                507,
                                742
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        104,
                                        726,
                                        507,
                                        742
                                    ],
                                    "type": "text",
                                    "content": "（task_struct 中的 parent 成员）相同的所有进程称为兄弟进程，由 task_struct 中的 sibling",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                99,
                                743,
                                395,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        99,
                                        743,
                                        395,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "成员链接成父进程的 children链表，它们间的关系如图2-3所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 34
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        127,
                        71,
                        442,
                        196
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                127,
                                71,
                                442,
                                196
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        127,
                                        71,
                                        442,
                                        196
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                127,
                                                71,
                                                442,
                                                196
                                            ],
                                            "type": "image",
                                            "image_path": "c01a80ba569bbf26b8b3f732e9be35aaab91f0d1ae7fddc0b837200d4da3422f.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                239,
                                208,
                                324,
                                220
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        242,
                                        209,
                                        324,
                                        220
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                242,
                                                209,
                                                324,
                                                220
                                            ],
                                            "type": "text",
                                            "content": "图2-3 进程家族关系",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        96,
                        228,
                        505,
                        274
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                227,
                                505,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        227,
                                        505,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "对子进程链表和兄弟进程链表的访问，都可以通过宏 list_for_each()和 list_entry()以及",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                98,
                                244,
                                505,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        98,
                                        244,
                                        505,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "list_for_each_entry()来实现。对于指定的 pid，可以通过函数 pid_task()和 find_vpid()（或者",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                98,
                                260,
                                499,
                                273
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        98,
                                        260,
                                        499,
                                        273
                                    ],
                                    "type": "text",
                                    "content": "find_get_pid()）配合使用找到其相应的 task_atruct 结构，位于 linux/kernel/pid.c 文件中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        116,
                        291,
                        418,
                        631
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                116,
                                291,
                                418,
                                631
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        291,
                                        418,
                                        631
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                291,
                                                418,
                                                631
                                            ],
                                            "type": "text",
                                            "content": "struct task_struct *result = NULL;\nif (pid) {\n    struct hlist_node *first;\n    first = rcu_dereference_check(pid->tasks[type].first, rcu_read_lock_held() || lockdep_tasklist_lock_is_held());\n    if (first)\n        result = hlist_entry(first, struct task_struct, pid[(type).node);\n} return result;\n}\nstruct pid *find_vpid(int nr) {\n    return find.pid_ns(nr, current->nsproxy->pid_ns);\n}\nstruct pid *find_get.pid(pid_t nr) {\n    struct pid *pid;\n    pid = get.pid找到了pid(nr));\n    rcu_read_unlock();\n    return pid;\n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        166,
                        667,
                        437,
                        687
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                166,
                                665,
                                438,
                                690
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        166,
                                        665,
                                        228,
                                        690
                                    ],
                                    "type": "text",
                                    "content": "实验三",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        236,
                                        666,
                                        438,
                                        690
                                    ],
                                    "type": "text",
                                    "content": "linux 设备驱动程序开发",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        714,
                        280,
                        731
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                714,
                                281,
                                732
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        714,
                                        281,
                                        732
                                    ],
                                    "type": "text",
                                    "content": "3.1 设计目的和内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 35
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        108,
                        80,
                        170,
                        93
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                80,
                                170,
                                94
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        80,
                                        170,
                                        94
                                    ],
                                    "type": "text",
                                    "content": "1．设计目的",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        104,
                        505,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                104,
                                503,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        104,
                                        503,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "Linux驱动程序占了内核代码的一半以上，开发设计驱动程序是 linux内核编程的一项很",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                119,
                                502,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        119,
                                        502,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "重要的工作。通过本次实验，学习者应了解 linux 的设备管理机制及驱动程序的组织结构；",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                136,
                                503,
                                147
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        136,
                                        503,
                                        147
                                    ],
                                    "type": "text",
                                    "content": "掌握linux设备驱动程序的编写流程及加载方法，为从事具体的硬件设备驱动程序开发打下",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                150,
                                117,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        150,
                                        117,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "基础。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        174,
                        170,
                        187
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                173,
                                171,
                                188
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        173,
                                        171,
                                        188
                                    ],
                                    "type": "text",
                                    "content": "2．内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        197,
                        505,
                        288
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                197,
                                505,
                                241
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        104,
                                        198,
                                        505,
                                        210
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                104,
                                                198,
                                                505,
                                                210
                                            ],
                                            "type": "text",
                                            "content": "（1） 编写一个字符设备驱动程序，要求实现对该字符设备的打开、读、写、I/O 控制和",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        213,
                                        505,
                                        225
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                213,
                                                505,
                                                225
                                            ],
                                            "type": "text",
                                            "content": "关闭5 个基本操作。为了避免牵涉到汇编语言，这个字符设备并非一个真实的字符设备，而",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        229,
                                        359,
                                        241
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                229,
                                                359,
                                                241
                                            ],
                                            "type": "text",
                                            "content": "是用一段内存空间来模拟的。以模块方式加载该驱动程序。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                101,
                                244,
                                404,
                                257
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        103,
                                        243,
                                        405,
                                        258
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                103,
                                                243,
                                                405,
                                                258
                                            ],
                                            "type": "text",
                                            "content": "（2） 编写一个应用程序，测试（1）中实现的驱动程序的正确性。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                102,
                                260,
                                358,
                                272
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        104,
                                        260,
                                        358,
                                        273
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                104,
                                                260,
                                                358,
                                                273
                                            ],
                                            "type": "text",
                                            "content": "（3） 有兴趣的同学还可以编写一个块设备的驱动程序。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                102,
                                275,
                                467,
                                288
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        276,
                                        468,
                                        288
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                276,
                                                468,
                                                288
                                            ],
                                            "type": "text",
                                            "content": "（4）请根据自身情况，进一步阅读分析程序中用到的相关内核函数的源码实现。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        314,
                        227,
                        327
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                314,
                                226,
                                327
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        314,
                                        226,
                                        327
                                    ],
                                    "type": "text",
                                    "content": "3. 学时安排（共 6学时）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        345,
                        174,
                        358
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                344,
                                175,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        344,
                                        175,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "4． 开发平台",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        369,
                        309,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                368,
                                311,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        368,
                                        311,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "Linux 环境，gcc，gdb，vim 或 gedit 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        103,
                        404,
                        267,
                        421
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                102,
                                403,
                                267,
                                423
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        102,
                                        403,
                                        267,
                                        423
                                    ],
                                    "type": "text",
                                    "content": "3.2 linux 设备管理概述",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        450,
                        239,
                        465
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                450,
                                238,
                                465
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        450,
                                        238,
                                        465
                                    ],
                                    "type": "text",
                                    "content": "3.2.1 设备文件的概念",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        475,
                        504,
                        518
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                476,
                                503,
                                487
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        476,
                                        503,
                                        487
                                    ],
                                    "type": "text",
                                    "content": "Linux沿用了Unix的设备管理思想，将所有设备看成是一类特殊文件，即为每个设备建",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                490,
                                499,
                                503
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        490,
                                        499,
                                        503
                                    ],
                                    "type": "text",
                                    "content": "立一个设备文件，一般保存在/dev目录下，如/dev/hda1标识第一个硬盘的第一个逻辑分区。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                506,
                                236,
                                518
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        506,
                                        236,
                                        518
                                    ],
                                    "type": "text",
                                    "content": "Linux将系统中的设备分成三类：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        521,
                        504,
                        597
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 18,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                521,
                                504,
                                550
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        520,
                                        504,
                                        535
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                520,
                                                125,
                                                535
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.79
                                        },
                                        {
                                            "bbox": [
                                                132,
                                                522,
                                                504,
                                                534
                                            ],
                                            "type": "text",
                                            "content": "块设备：一次 I/O 操作是固定大小的数据块，可随机存取，其设备文件的属性字",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        127,
                                        537,
                                        234,
                                        550
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                127,
                                                537,
                                                234,
                                                550
                                            ],
                                            "type": "text",
                                            "content": "段中以“b”进行标识；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                552,
                                504,
                                581
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        551,
                                        504,
                                        566
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                551,
                                                125,
                                                566
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                551,
                                                504,
                                                566
                                            ],
                                            "type": "text",
                                            "content": "字符设备：只能按字节访问的设备，一次 I/O操作存取数据量不固定，只能顺序存",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        128,
                                        568,
                                        348,
                                        581
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                128,
                                                568,
                                                348,
                                                581
                                            ],
                                            "type": "text",
                                            "content": "取，其设备文件的属性字段中以“c”进行标识；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                583,
                                376,
                                597
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        582,
                                        376,
                                        597
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                582,
                                                125,
                                                597
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                583,
                                                376,
                                                597
                                            ],
                                            "type": "text",
                                            "content": "网络设备：网卡是特殊处理的，没有对应的设备文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        607,
                        226,
                        621
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                606,
                                226,
                                622
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        606,
                                        226,
                                        622
                                    ],
                                    "type": "text",
                                    "content": "3.2.2 设备号的概念",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        638,
                        190,
                        651
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                640,
                                191,
                                651
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        640,
                                        191,
                                        651
                                    ],
                                    "type": "text",
                                    "content": "1．什么是设备号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        661,
                        504,
                        690
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                663,
                                503,
                                674
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        663,
                                        503,
                                        674
                                    ],
                                    "type": "text",
                                    "content": "与普通文件一样，每个设备文件都有文件名和一个唯一的索引节点，在索引节点中记",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                677,
                                389,
                                690
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        677,
                                        389,
                                        690
                                    ],
                                    "type": "text",
                                    "content": "录了与特定设备建立连接所需的信息，其中最主要的三个信息是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        693,
                        458,
                        736
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                693,
                                296,
                                705
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        692,
                                        298,
                                        707
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                692,
                                                125,
                                                707
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                692,
                                                298,
                                                707
                                            ],
                                            "type": "text",
                                            "content": "类型：表明是字符设备还是块设备；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                708,
                                396,
                                721
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        708,
                                        396,
                                        723
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                708,
                                                125,
                                                722
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                708,
                                                396,
                                                723
                                            ],
                                            "type": "text",
                                            "content": "主设备号：主设备号相同的设备，由同一个驱动程序控制；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                724,
                                458,
                                736
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        724,
                                        460,
                                        738
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                724,
                                                125,
                                                738
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                126,
                                                724,
                                                460,
                                                738
                                            ],
                                            "type": "text",
                                            "content": "次设备号：说明该设备是同类设备中的第几个，即表示具体的某个设备。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        740,
                        295,
                        752
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                739,
                                295,
                                752
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        739,
                                        295,
                                        752
                                    ],
                                    "type": "text",
                                    "content": "如查看/dev目录，可看到如下一些信息：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 36
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        108,
                        71,
                        437,
                        117
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                71,
                                437,
                                117
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        71,
                                        437,
                                        117
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                71,
                                                437,
                                                117
                                            ],
                                            "type": "image",
                                            "image_path": "d24110f75720da97ed981ac4b0fa7b47e58905bf9cb7bcedd48d8bda80a93f2a.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        86,
                        119,
                        498,
                        147
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                119,
                                499,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        119,
                                        499,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "可见，sda1、sda2、sda5 是同一类块设备，它们的主设备号都是8，次设备号分别是1、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                135,
                                123,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        135,
                                        123,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "2 和 5。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        150,
                        505,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                151,
                                506,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        151,
                                        506,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "由主设备号和次设备号组成了设备的唯一编号：设备号，其类型为 dev_t，是一个 32",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                166,
                                426,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        166,
                                        426,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "位的无符号整数，定义在/usr/src/linux-4.4.19/include/linux/types.h 文件中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        182,
                        246,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                180,
                                246,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        180,
                                        246,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "typedef __u32 __kernel_dev_t;",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        198,
                        264,
                        211
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                195,
                                267,
                                214
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        195,
                                        215,
                                        214
                                    ],
                                    "type": "text",
                                    "content": "typedef __kernel_dev_t",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        233,
                                        196,
                                        267,
                                        213
                                    ],
                                    "type": "text",
                                    "content": "dev_t;",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        221,
                        241,
                        233
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                221,
                                241,
                                234
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        221,
                                        241,
                                        234
                                    ],
                                    "type": "text",
                                    "content": "2. 与设备号相关的操作函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        244,
                        355,
                        257
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                243,
                                356,
                                259
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        243,
                                        356,
                                        259
                                    ],
                                    "type": "text",
                                    "content": "（1） 定义在/usr/include/linux/kdev_t.h 中的三个宏：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        259,
                        504,
                        319
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 11,
                    "blocks": [
                        {
                            "bbox": [
                                129,
                                259,
                                504,
                                273
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        131,
                                        258,
                                        506,
                                        276
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                259,
                                                146,
                                                273
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.69
                                        },
                                        {
                                            "bbox": [
                                                146,
                                                258,
                                                307,
                                                276
                                            ],
                                            "type": "text",
                                            "content": "#define MAJOR(dev) ((dev)>>8)",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                324,
                                                259,
                                                506,
                                                275
                                            ],
                                            "type": "text",
                                            "content": "//从 dev（dev_t 类型）中获得主设备号",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                130,
                                275,
                                504,
                                289
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        131,
                                        275,
                                        506,
                                        290
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                275,
                                                146,
                                                289
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.73
                                        },
                                        {
                                            "bbox": [
                                                146,
                                                275,
                                                506,
                                                290
                                            ],
                                            "type": "text",
                                            "content": "#define MINOR(dev) ((dev) & 0xff) //从 dev（dev_t 类型）中获得次设备号",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                130,
                                290,
                                504,
                                319
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        131,
                                        290,
                                        506,
                                        305
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                290,
                                                146,
                                                305
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.74
                                        },
                                        {
                                            "bbox": [
                                                146,
                                                290,
                                                506,
                                                305
                                            ],
                                            "type": "text",
                                            "content": "#define MKDEV(ma,mi) ((ma)<<8 | (mi)) //将主、次设备号组合成 dev_t 类型",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        352,
                                        306,
                                        398,
                                        321
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                352,
                                                306,
                                                398,
                                                321
                                            ],
                                            "type": "text",
                                            "content": "的设备号",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        111,
                        322,
                        277,
                        334
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                322,
                                277,
                                337
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        322,
                                        277,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "（2） 为字符设备静态分配设备号：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        337,
                        503,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                338,
                                497,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        338,
                                        497,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "如果驱动程序开发者清楚了解系统中尚未被使用的设备号，则可直接指定主设备号，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                353,
                                504,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        353,
                                        504,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "然后再申请若干个连续的次设备号。这种方法可能会造成系统中设备号冲突，而使驱动程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                370,
                                452,
                                382
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        370,
                                        452,
                                        382
                                    ],
                                    "type": "text",
                                    "content": "序无法注册。函数原型定义在/usr/src/linux-4.4.19/include/linux/fs.h 文件中，为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        386,
                        416,
                        397
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                385,
                                417,
                                399
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        385,
                                        417,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "int register_chrdev_region(dev_t first, unsigned int count, char *name);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        400,
                        483,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                401,
                                483,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        401,
                                        483,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "函数功能：为一个指定主设备号的字符驱动程序申请一个或一组连续的次设备号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        416,
                        157,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                414,
                                159,
                                430
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        414,
                                        159,
                                        430
                                    ],
                                    "type": "text",
                                    "content": "输入参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        431,
                        399,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                430,
                                401,
                                446
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        430,
                                        401,
                                        446
                                    ],
                                    "type": "text",
                                    "content": "first ：dev_t 类型的起始设备号（可通过 MKDEV(major,0)获得）；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        447,
                        265,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                448,
                                265,
                                459
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        448,
                                        265,
                                        459
                                    ],
                                    "type": "text",
                                    "content": "count：需要申请的次设备号数量；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        463,
                        354,
                        476
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                461,
                                355,
                                477
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        461,
                                        355,
                                        477
                                    ],
                                    "type": "text",
                                    "content": "name：设备名，会出现在 /proc/devices 和 sysfs 中；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        478,
                        351,
                        490
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                478,
                                350,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        478,
                                        350,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "返回值：分配成功返回0，失败返回一个负的错误码",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        493,
                        277,
                        506
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                493,
                                277,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        493,
                                        138,
                                        507
                                    ],
                                    "type": "text",
                                    "content": "（3）",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        140,
                                        494,
                                        277,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "为字符设备动态分配设备号：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        509,
                        496,
                        537
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                509,
                                498,
                                522
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        509,
                                        498,
                                        522
                                    ],
                                    "type": "text",
                                    "content": "如果没有提前指定主设备号，则采用动态申请方式，它不会出现设备号冲突的问题，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                526,
                                436,
                                537
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        526,
                                        436,
                                        537
                                    ],
                                    "type": "text",
                                    "content": "但是无法在安装驱动前创建设备文件（因为安装前还没有分配到主设备号）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        540,
                        389,
                        553
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                539,
                                390,
                                555
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        539,
                                        390,
                                        555
                                    ],
                                    "type": "text",
                                    "content": "函数原型定义在/usr/src/linux-4.4.19/include/linux/fs.h 文件中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        556,
                        473,
                        569
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                555,
                                475,
                                571
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        555,
                                        475,
                                        571
                                    ],
                                    "type": "text",
                                    "content": "int alloc_chrdev_region(dev_t *dev,unsigned firstminor,unsigned count,char *name)；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        571,
                        399,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                571,
                                399,
                                584
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        571,
                                        399,
                                        584
                                    ],
                                    "type": "text",
                                    "content": "函数功能：动态分配一个主设备号及一个或一组连续次设备号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        587,
                        157,
                        599
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                586,
                                159,
                                602
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        586,
                                        159,
                                        602
                                    ],
                                    "type": "text",
                                    "content": "输入参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        602,
                        304,
                        615
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                602,
                                305,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        602,
                                        305,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "firstminor：起始次设备号，一般从 0 开始；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        618,
                        265,
                        630
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                619,
                                265,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        619,
                                        265,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "count：需要分配的次设备号数量；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        634,
                        354,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                634,
                                355,
                                649
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        634,
                                        355,
                                        649
                                    ],
                                    "type": "text",
                                    "content": "name：设备名，会出现在 /proc/devices 和 sysfs 中；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        650,
                        333,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                650,
                                334,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        650,
                                        334,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "输出参数：系统自动分配的 dev_t类型的设备号；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        665,
                        354,
                        677
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                666,
                                355,
                                678
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        666,
                                        355,
                                        678
                                    ],
                                    "type": "text",
                                    "content": "返回值：分配成功返回0，失败返回一个负的错误码。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        681,
                        202,
                        693
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                680,
                                204,
                                694
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        680,
                                        204,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "（4） 释放设备号：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        696,
                        503,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                698,
                                503,
                                708
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        698,
                                        503,
                                        708
                                    ],
                                    "type": "text",
                                    "content": "采用上面两种方式申请到的设备号，在设备不使用时，比如在调用cdev_del()函数从系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                713,
                                503,
                                725
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        713,
                                        503,
                                        725
                                    ],
                                    "type": "text",
                                    "content": "统中注销字符设备之后，应该及时释放掉。释放设备号使用的函数原型定义在",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                728,
                                295,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        728,
                                        295,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "/usr/src/linux-4.4.19/include/linux/fs.h 文件中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        743,
                        389,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                743,
                                390,
                                759
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        743,
                                        390,
                                        759
                                    ],
                                    "type": "text",
                                    "content": "void unregister_chrdev_region(dev_t from, unsigned count);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 37
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        107,
                        72,
                        277,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                72,
                                279,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        72,
                                        279,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "其中参数含义跟上面（2）中的一样。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        89,
                        244,
                        100
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                88,
                                245,
                                102
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        88,
                                        245,
                                        102
                                    ],
                                    "type": "text",
                                    "content": "（5） 查看设备号使用情况：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        103,
                        505,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                105,
                                503,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        105,
                                        503,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "当静态分配设备号时，需要查看系统中已经使用掉的设备号，从而决定使用哪个新设",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                119,
                                494,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        119,
                                        494,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "备号。可使用命令“cat /proc/devices”查看，显示的字符设备的最后一行信息如下所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        136,
                        198,
                        147
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                134,
                                199,
                                149
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        134,
                                        199,
                                        149
                                    ],
                                    "type": "text",
                                    "content": "Character devices:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        152,
                        184,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                148,
                                186,
                                168
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        150,
                                        140,
                                        165
                                    ],
                                    "type": "text",
                                    "content": "254",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        159,
                                        148,
                                        186,
                                        168
                                    ],
                                    "type": "text",
                                    "content": "mdp",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        166,
                        312,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                166,
                                313,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        166,
                                        313,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "则新添加设备驱动时可以选择主设备号255。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        189,
                        298,
                        203
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                189,
                                298,
                                204
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        189,
                                        298,
                                        204
                                    ],
                                    "type": "text",
                                    "content": "3.2.3 字符设备管理相关数据结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        221,
                        210,
                        232
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                221,
                                211,
                                235
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        221,
                                        211,
                                        235
                                    ],
                                    "type": "text",
                                    "content": "1. struct cdev 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        96,
                        243,
                        496,
                        396
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                96,
                                243,
                                496,
                                396
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        96,
                                        243,
                                        496,
                                        396
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                96,
                                                243,
                                                496,
                                                396
                                            ],
                                            "type": "text",
                                            "content": "Linux内核中使用structcdev来描述一个字符设备，定义在/usr/src/linux-4.4.19/  \ninclude/linux/cdev.h文件中：struct cdev{struct kobject kobj; /*内嵌的内核对象，包括引用计数、名称、父指针等*/struct module \\*owner; /*所属内核模块，一般设置为THISMODULE*/const struct file_operations \\*ops; /*设备操作集合\\*/struct list_head list; /*设备的inode链表头\\*/dev_t dev; /*设备号\\*/unsigned int count; /*分配的设备号数目\\*/}；"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        400,
                        505,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                401,
                                505,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        401,
                                        505,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "cdev 结构是内核对字符设备的标准描述，在实际的设备驱动开发中，通常使用自定",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                416,
                                506,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        416,
                                        506,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "义的结构体来描述一个特定的字符设备：内嵌 cdev 结构，同时包含其他描述该具体设备特",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                431,
                                346,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        431,
                                        346,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "性的字段。比如本实验中，用一段内存来模拟字符设备：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        117,
                        448,
                        243,
                        522
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                117,
                                448,
                                243,
                                522
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        448,
                                        243,
                                        522
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                448,
                                                243,
                                                522
                                            ],
                                            "type": "text",
                                            "content": "struct mymem_dev\n{\n    Struct cdev cdev;\n    Unsigned char mem[512];\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        108,
                        533,
                        282,
                        545
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                533,
                                283,
                                547
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        533,
                                        283,
                                        547
                                    ],
                                    "type": "text",
                                    "content": "2. struct char_device_struct 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        555,
                        505,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                555,
                                506,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        555,
                                        506,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "内核为主设备号相同的一组设备设置一个 char_device_struct 结构，描述这个主设备号",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                572,
                                232,
                                583
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        572,
                                        232,
                                        583
                                    ],
                                    "type": "text",
                                    "content": "下已经被分配的次设备号区间：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        119,
                        587,
                        489,
                        725
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                119,
                                587,
                                489,
                                725
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        119,
                                        587,
                                        489,
                                        725
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                119,
                                                587,
                                                489,
                                                725
                                            ],
                                            "type": "text",
                                            "content": "static struct char_device_struct{ struct char_device_struct \\*next; /*指向散列链表中的下一个元素的指针*/ unsigned int major; /\\*主设备号\\*/ unsigned int baseminor; /\\*起始次设备号\\*/ int minorct; /\\*次设备号区间大小\\*/ char name[64]; /\\*设备名\\*/ struct file_operations \\*fops; /\\*未使用\\*/ struct cdev \\*cdev; /\\*指向字符设备描述符的指针\\*/   \n\\*chrdevs[CHRDEV Major HASH SIZE];"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        107,
                        735,
                        227,
                        748
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                735,
                                227,
                                750
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        735,
                                        227,
                                        750
                                    ],
                                    "type": "text",
                                    "content": "3. file_operations 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 38
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        505,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                73,
                                505,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        73,
                                        505,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "file_operations 结构体是字符设备中最重要的数据结构之一。其中的成员是一组函数指",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                88,
                                505,
                                103
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        88,
                                        505,
                                        103
                                    ],
                                    "type": "text",
                                    "content": "针，用于实现相应的系统调用，如 open()、read()、write()、close()、seek()、ioctl()等系统调",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                104,
                                400,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        104,
                                        400,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "用最终就是这组函数实现的，是字符设备驱动程序设计的主体内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        119,
                        381,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                119,
                                382,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        119,
                                        382,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "file_operations 结构体中对字符设备比较重要的成员主要有：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        136,
                        506,
                        288
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                136,
                                506,
                                288
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        136,
                                        506,
                                        288
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                136,
                                                506,
                                                288
                                            ],
                                            "type": "text",
                                            "content": "struct file_operations{ struct module \\*owner; /*拥有该结构的模块，一般为THIS_MODULE*/ ssize_t (*read) (struct file \\*, char __user \\*, size_t, loff_t \\*); /*从设备中读取数据*/ ssize_t (\\*write) (struct file \\*, const char __user \\*, size_t, loff_t \\*);/*向设备中写数据*/ int (\\*ioctl) (struct inode \\*, struct file \\*, unsigned int, unsigned long); /*执行设备的I/O 控制命令\\*/ int (\\*open) (struct inode \\*, struct file \\*); /*打开设备文件\\*/ int (\\*release) (struct inode \\*, struct file \\*); /*关闭设备文件\\*/"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        107,
                        314,
                        167,
                        326
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                314,
                                168,
                                327
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        314,
                                        168,
                                        327
                                    ],
                                    "type": "text",
                                    "content": "4. file 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        337,
                        505,
                        365
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                338,
                                506,
                                350
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        338,
                                        506,
                                        350
                                    ],
                                    "type": "text",
                                    "content": "file 结构代表一个打开的文件，内核每执行一次 open操作就会建立一个file 结构，因此",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                352,
                                356,
                                367
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        352,
                                        356,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "一个文件可以对应多个 file 结构。其中几个重要的成员有：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        370,
                        445,
                        476
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                370,
                                445,
                                476
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        370,
                                        445,
                                        476
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                370,
                                                445,
                                                476
                                            ],
                                            "type": "text",
                                            "content": "struct file{\nmode_t fmode; /*文件模式，如FMODE_READ，FMODE_WRITE*/\nloff_t f_pos; /*当前读写指针*/\nstruct file_operations *f_op; /*文件操作函数表指针*/\nvoid *private_data; /*非常重要，用于存放转换后的设备描述结构指针*/\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        107,
                        486,
                        182,
                        497
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                485,
                                184,
                                499
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        485,
                                        184,
                                        499
                                    ],
                                    "type": "text",
                                    "content": "5. inode 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        508,
                        456,
                        523
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                509,
                                457,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        509,
                                        457,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "磁盘上每个文件都有一个 inode，对于设备文件来说，有两个很重要的成员：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        526,
                        342,
                        599
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                526,
                                342,
                                599
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        526,
                                        342,
                                        599
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                526,
                                                342,
                                                599
                                            ],
                                            "type": "text",
                                            "content": "struct inode {\n    dev_t i_rdev; /*设备号*/\n    struct cdev *i_cdev; /*该设备的 cdev 结构*/\n        ......\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        107,
                        602,
                        324,
                        614
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                602,
                                326,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        602,
                                        326,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "根据其设备号可以得到其主设备号和次设备号。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        654,
                        348,
                        670
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                653,
                                349,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        653,
                                        349,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "3.3 linux 字符设备驱动程序的设计",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        700,
                        307,
                        714
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                700,
                                307,
                                714
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        700,
                                        307,
                                        714
                                    ],
                                    "type": "text",
                                    "content": "3.3.1 linux 字符设备驱动程序框架",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        724,
                        311,
                        737
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                724,
                                312,
                                737
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        724,
                                        312,
                                        737
                                    ],
                                    "type": "text",
                                    "content": "Linux字符设备驱动程序框架如图 3-1所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 39
        },
        {
            "para_blocks": [
                {
                    "type": "image",
                    "bbox": [
                        109,
                        71,
                        469,
                        304
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                109,
                                71,
                                469,
                                304
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        71,
                                        469,
                                        304
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                71,
                                                469,
                                                304
                                            ],
                                            "type": "image",
                                            "image_path": "094cf3a8258652b6f4357299f1d4d3141e1b739b8b0535754fb786d20832020a.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "image_body"
                        },
                        {
                            "bbox": [
                                207,
                                306,
                                359,
                                319
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        209,
                                        307,
                                        358,
                                        319
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                209,
                                                307,
                                                358,
                                                319
                                            ],
                                            "type": "text",
                                            "content": "图3-1 字符设备驱动程序框架图",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "image_caption"
                        }
                    ],
                    "index": 1
                },
                {
                    "bbox": [
                        113,
                        329,
                        392,
                        343
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                328,
                                392,
                                344
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        328,
                                        392,
                                        344
                                    ],
                                    "type": "text",
                                    "content": "3.3.2 linux 字符设备驱动程序中需要的一组头文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        353,
                        398,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                354,
                                398,
                                367
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        354,
                                        398,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "在编写 linux 字符设备驱动程序时，可能要用到的头文件包括：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        369,
                        476,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                368,
                                475,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        368,
                                        475,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "#include <linux/fs.h> //定义文件表结构（file 结构,buffer_head,m_inode 等）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        384,
                        505,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                382,
                                506,
                                399
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        382,
                                        506,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "#include <linux/types.h> //对一些特殊的系统数据类型的定义，例如 dev_t, off_t,",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                124,
                                400,
                                506,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        400,
                                        506,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "pid_t.其实这些类型大部分都是 unsigned int 型通过一连串的 typedef 变过来的，只是",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                124,
                                415,
                                196,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        415,
                                        196,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "为了方便阅读。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        431,
                        420,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                431,
                                420,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        431,
                                        420,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "#include <linux/cdev.h> //包含了 cdev 结构及相关函数的定义。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        447,
                        455,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                446,
                                455,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        446,
                                        455,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "#include <asm/uaccess.h> //包含 copy_to_user(),copy_from_user()的定义",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        462,
                        335,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                463,
                                336,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        463,
                                        336,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "#include <linux/module> //模块编程相关函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        478,
                        330,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                478,
                                330,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        478,
                                        330,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "#Include <linux/init.h> //模块编程相关函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        122,
                        494,
                        226,
                        506
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                493,
                                227,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        493,
                                        227,
                                        507
                                    ],
                                    "type": "text",
                                    "content": "#include <linux/kernel>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        509,
                        483,
                        523
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                508,
                                484,
                                524
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        508,
                                        484,
                                        524
                                    ],
                                    "type": "text",
                                    "content": "#include <linux/slab.h> //包含内核的内存分配相关函数，如 kmalloc()/kfree()等",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        532,
                        295,
                        544
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                532,
                                295,
                                546
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        532,
                                        295,
                                        546
                                    ],
                                    "type": "text",
                                    "content": "3.3.3 字符设备驱动程序的初始化",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        564,
                        183,
                        576
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                563,
                                184,
                                577
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        563,
                                        184,
                                        577
                                    ],
                                    "type": "text",
                                    "content": "1. 分配设备号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        587,
                        503,
                        615
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                588,
                                503,
                                599
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        588,
                                        503,
                                        599
                                    ],
                                    "type": "text",
                                    "content": "如3.2.2 节所述，为一个新字符设备分配设备号可以有静态和动态两种方式，如果提前",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                602,
                                241,
                                615
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        602,
                                        241,
                                        615
                                    ],
                                    "type": "text",
                                    "content": "指定主设备号，则使用静态方式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        618,
                        416,
                        632
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                618,
                                417,
                                634
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        618,
                                        417,
                                        634
                                    ],
                                    "type": "text",
                                    "content": "int register_chrdev_region(dev_t first, unsigned int count, char *name);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        634,
                        199,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                634,
                                199,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        634,
                                        199,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "否则使用动态分配方式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        106,
                        650,
                        473,
                        663
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                650,
                                474,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        650,
                                        474,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "int alloc_chrdev_region(dev_t *dev,unsigned firstminor,unsigned count,char *name)；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        673,
                        244,
                        685
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                672,
                                244,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        672,
                                        244,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "2. 定义 cdev 结构并初始化",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        696,
                        505,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                697,
                                505,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        697,
                                        505,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "linux内核必须为每个字符设备都建立一个 cdev结构，定义时采用cdev 结构体指针或变",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                712,
                                346,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        712,
                                        346,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "量均可，只不过两种定义方式的初始化操作会有所不同：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        728,
                        270,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                726,
                                270,
                                741
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        726,
                                        270,
                                        741
                                    ],
                                    "type": "text",
                                    "content": "（1） 定义 cdev 结构体及初始化：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        143,
                        744,
                        236,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                143,
                                742,
                                238,
                                758
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        143,
                                        742,
                                        238,
                                        758
                                    ],
                                    "type": "text",
                                    "content": "struct cdev my_cdev;",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 40
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        143,
                        73,
                        291,
                        101
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                73,
                                291,
                                101
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        73,
                                        291,
                                        101
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                73,
                                                291,
                                                101
                                            ],
                                            "type": "text",
                                            "content": "cdev_init(&my_cdev, &fops);  \nmy_cdev owner = THISMODULE;"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        104,
                        281,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                103,
                                282,
                                119
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        103,
                                        282,
                                        119
                                    ],
                                    "type": "text",
                                    "content": "（2） 定义 cdev 结构指针及初始化：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        143,
                        120,
                        303,
                        163
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                120,
                                303,
                                163
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        120,
                                        303,
                                        163
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                120,
                                                303,
                                                163
                                            ],
                                            "type": "text",
                                            "content": "struct cdev *my_cdev = cdev_alloc();\nmy_cdev->ops = &fops;\nmy_cdev->owner = THISMODULE;"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        166,
                        498,
                        194
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                166,
                                500,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        166,
                                        500,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "其实，cdev_init()和cdev_alloc()的功能是差不多的，只是前者多了一个ops的赋值操作，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                182,
                                273,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        182,
                                        273,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "具体区别参看下面两个函数的实现代码：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        122,
                        196,
                        414,
                        459
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                122,
                                196,
                                414,
                                459
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        196,
                                        414,
                                        459
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                196,
                                                414,
                                                459
                                            ],
                                            "type": "text",
                                            "content": "struct cdev *cdev_alloc(void)  \n{  \n    struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);  \n    if (p) {  \n        INIT_LIST_HEAD(&p->list);  \n        kobject_init(&p->kobj, &ktype_cdev_dynamic);  \n    }  \n    return p;  \n}  \nvoid cdev_init(struct cdev *cdev, const struct file_operations *fops)  \n{  \n    memset(cdev, 0, sizeof *cdev);  \n    INIT_LIST_HEAD(&cdev->list);  \n    kobject_init(&cdev->kobj, &ktype_cdev_default);  \n    cdev->ops = fops;"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        123,
                        462,
                        447,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                462,
                                449,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        462,
                                        449,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "两个函数的原型定义在/usr/src/linux-4.4.19/include/linux/cdev.h 文件中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        486,
                        202,
                        498
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                486,
                                203,
                                500
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        486,
                                        203,
                                        500
                                    ],
                                    "type": "text",
                                    "content": "3. 注册 cdev 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        509,
                        504,
                        538
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                510,
                                503,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        510,
                                        503,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "cdev 初始化完成后，应将其注册到系统中，一般在模块加载时完成该操作。设备注册",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                525,
                                467,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        525,
                                        467,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "函数是 cdev_add()，其原型定义在/usr/src/linux-4.4.19/include/linux/cdev.h 文件中：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        540,
                        487,
                        631
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                540,
                                487,
                                631
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        540,
                                        487,
                                        631
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                540,
                                                487,
                                                631
                                            ],
                                            "type": "text",
                                            "content": "int cdev_add(struct cdev *p, dev_t dev, unsigned count)  \n{  \n    p->dev = dev;  \n    p->count = count;  \n    return kobj_map(cdev_map, dev, count, NULL, exact_MATCH, exact_lock, p);  \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 9,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 9,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        108,
                        634,
                        420,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                634,
                                420,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        634,
                                        420,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "其中的输入参数分别是 cdev 结构指针、起始设备号、次设备号数量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        649,
                        503,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                649,
                                500,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        649,
                                        500,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "linux 内核中所有字符设备都记录在一个 kobj_map 结构的 cdev_map 散列表里。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                666,
                                503,
                                678
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        666,
                                        503,
                                        678
                                    ],
                                    "type": "text",
                                    "content": "cdev_add() 函 数 中 的 kobj_map() 函 数 就 是 用 来 把 设 备 号 及 cdev 结 构 一 起 保 存 到",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                681,
                                499,
                                694
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        681,
                                        499,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "cdev_map 散列表里。当以后要打开这个字符设备文件时，通过调用 kobj_lookup() 函数，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                697,
                                403,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        697,
                                        403,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "根据设备号就可以找到 cdev 结构变量，从而取出其中的 ops 字段。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        712,
                        503,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                712,
                                503,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        712,
                                        503,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "执行 cdev_add()操作后，意味着一个字符设备对象已经加入了系统，以后用户程序可",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                728,
                                284,
                                739
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        728,
                                        284,
                                        739
                                    ],
                                    "type": "text",
                                    "content": "以通过文件系统接口找到对应的驱动程序。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        750,
                        331,
                        764
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                751,
                                331,
                                764
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        751,
                                        331,
                                        764
                                    ],
                                    "type": "text",
                                    "content": "3.3.4 实现字符设备驱动程序的操作函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 41
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        108,
                        80,
                        327,
                        94
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                79,
                                327,
                                95
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        79,
                                        327,
                                        95
                                    ],
                                    "type": "text",
                                    "content": "1. 实现 file_operations 结构中要用到的函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        104,
                        503,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                104,
                                503,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        104,
                                        503,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "这些函数具体实现设备的相关操作，如打开设备、读设备等，部分函数的大致结构可",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                120,
                                168,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        120,
                                        168,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "参看下面的描述：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        135,
                        238,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                134,
                                239,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        134,
                                        239,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "（1） 打开设备函数 open：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        143,
                        151,
                        405,
                        242
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                151,
                                405,
                                242
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        151,
                                        405,
                                        242
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                151,
                                                405,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "static int char_dev_open(struct inode *inode, struct file *filp)  \n{ // 这里可以进行一些初始化  \n    printf(\"char_dev_device_open.\\n\");  \n    return 0;  \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        244,
                        201,
                        257
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                243,
                                201,
                                259
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        243,
                                        201,
                                        259
                                    ],
                                    "type": "text",
                                    "content": "（2） 读设备函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        143,
                        260,
                        490,
                        351
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                260,
                                490,
                                351
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        260,
                                        490,
                                        351
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                260,
                                                490,
                                                351
                                            ],
                                            "type": "text",
                                            "content": "ssize_t char_dev_read(struct file *file, char __user *buff, size_t count,loff_t *offp) {\n    ...\n    copy_to_user();\n    ...\n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        354,
                        201,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                352,
                                200,
                                368
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        352,
                                        138,
                                        368
                                    ],
                                    "type": "text",
                                    "content": "（3）",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        142,
                                        354,
                                        200,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "写设备函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        143,
                        370,
                        503,
                        476
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                370,
                                503,
                                476
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        370,
                                        503,
                                        476
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                370,
                                                503,
                                                476
                                            ],
                                            "type": "text",
                                            "content": "ssize_t char_dev_write(struct file *file, const char __user *buff, size_t count,loff_t *offp)  \n{  \n    ...  \n    copy_from_user();  \n    ...  \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        477,
                        208,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                477,
                                208,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        477,
                                        208,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "（4） I/O控制函数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        143,
                        494,
                        474,
                        709
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                494,
                                474,
                                709
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        494,
                                        474,
                                        709
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                494,
                                                474,
                                                709
                                            ],
                                            "type": "text",
                                            "content": "static int char_dev_ioctl(struct inode *inode,struct file *filp,unsigned int cmd, unsigned long arg)   \n{ ... switch(cmd) { case xxx_cmd1: break; case xxx_cmd2: break; ... }"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        712,
                        402,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                712,
                                402,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        712,
                                        402,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "（5） 关闭设备函数 release，对应用户空间的 close 系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        143,
                        728,
                        413,
                        756
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                728,
                                413,
                                756
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        728,
                                        413,
                                        756
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                728,
                                                413,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "static int char_dev_release(struct inode *node, struct file *file) {"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "c"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 42
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        143,
                        72,
                        312,
                        132
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                143,
                                72,
                                312,
                                132
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        143,
                                        72,
                                        312,
                                        132
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                143,
                                                72,
                                                312,
                                                132
                                            ],
                                            "type": "text",
                                            "content": "//这里可以进行一些资源的释放printk(\"char_devdevice release.\\n\");return0;"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "javascript"
                },
                {
                    "bbox": [
                        110,
                        142,
                        251,
                        156
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                142,
                                253,
                                158
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        142,
                                        253,
                                        158
                                    ],
                                    "type": "text",
                                    "content": "2. 添加 file_operations 成员",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        165,
                        503,
                        194
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                167,
                                503,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        167,
                                        503,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "file_operations结构体中包含很多函数指针，是驱动程序与内核的接口，下面列出最常",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                182,
                                158,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        182,
                                        158,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "用的几种操作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        198,
                        330,
                        335
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                198,
                                330,
                                335
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        198,
                                        330,
                                        335
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                198,
                                                330,
                                                335
                                            ],
                                            "type": "text",
                                            "content": "static struct file_operations char_dev_fops =  \n{  \n    .owner = THISMODULE,  \n    .open = char_dev_open, //打开设备  \n    .release = char_dev_release, //关闭设备  \n    .read = char_dev_read, //实现设备读功能  \n    .write = char_dev_write, //实现设备写功能  \n    .ioct1 = char_dev_ioct1, //实现设备控制功能  \n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        115,
                        345,
                        198,
                        358
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                345,
                                199,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        345,
                                        199,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "3.3.5 注销设备",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        368,
                        505,
                        397
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                370,
                                505,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        370,
                                        505,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "当不使用某个设备时，应及时从系统注销，以节省系统资源。注销设备主要包括两个操",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                385,
                                431,
                                397
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        385,
                                        431,
                                        397
                                    ],
                                    "type": "text",
                                    "content": "作：撤销cdev结构和释放设备号，此项工作通常放在模块卸载过程中完成。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        407,
                        201,
                        420
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                407,
                                203,
                                422
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        407,
                                        203,
                                        422
                                    ],
                                    "type": "text",
                                    "content": "1. 撤销 cdev 结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        430,
                        500,
                        523
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                430,
                                500,
                                523
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        430,
                                        500,
                                        523
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                430,
                                                500,
                                                523
                                            ],
                                            "type": "text",
                                            "content": "Linux内核使用cdev_del()函数向系统删除一个cdev，完成字符设备的注销：  \nvoid cdev_del(struct cdev *p)  \n{  \n    cdev_unmap(p->dev, p->count); //调用 kobj_unmap()释放 cdev_map散列表中的对象  \n    kobj_put(&p->kobj); //释放 cdev结构本身  \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        110,
                        548,
                        182,
                        560
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                548,
                                183,
                                561
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        548,
                                        183,
                                        561
                                    ],
                                    "type": "text",
                                    "content": "2. 释放设备号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        571,
                        504,
                        599
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                571,
                                506,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        571,
                                        506,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "调用cdev_del()函数从系统注销字符设备之后，应调用unregister_chrdev_region()释放原",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                587,
                                241,
                                600
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        587,
                                        241,
                                        600
                                    ],
                                    "type": "text",
                                    "content": "先申请的设备号，其函数原型为：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        109,
                        603,
                        380,
                        616
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                109,
                                603,
                                380,
                                616
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        603,
                                        380,
                                        616
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                603,
                                                380,
                                                616
                                            ],
                                            "type": "text",
                                            "content": "void unregister_chrdev_region(dev_t first, unsigned int count);"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        116,
                        638,
                        390,
                        655
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                637,
                                391,
                                656
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        637,
                                        391,
                                        656
                                    ],
                                    "type": "text",
                                    "content": "3.4 linux 字符设备驱动程序的编译及加载",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        677,
                        504,
                        705
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                677,
                                506,
                                690
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        677,
                                        506,
                                        690
                                    ],
                                    "type": "text",
                                    "content": "当以模块方式实现一个字符设备的驱动程序后，可从按以下步骤对驱动程序进行编译和",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                691,
                                117,
                                707
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        691,
                                        117,
                                        707
                                    ],
                                    "type": "text",
                                    "content": "加载：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        716,
                        171,
                        729
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                717,
                                172,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        717,
                                        172,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "1. 编译模块",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        740,
                        420,
                        752
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                740,
                                421,
                                754
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        740,
                                        421,
                                        754
                                    ],
                                    "type": "text",
                                    "content": "在驱动程序源码文件所在目录中建立Makefile文件，参考内容如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        109,
                        756,
                        189,
                        768
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                109,
                                756,
                                189,
                                768
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        756,
                                        189,
                                        768
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                756,
                                                189,
                                                768
                                            ],
                                            "type": "text",
                                            "content": "obj-m :=c_driver.o"
                                        }
                                    ]
                                }
                            ],
                            "index": 16,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 16,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 43
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        108,
                        73,
                        332,
                        163
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                73,
                                332,
                                163
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        73,
                                        332,
                                        163
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                73,
                                                332,
                                                163
                                            ],
                                            "type": "text",
                                            "content": "KDIR :=/usr/src/linux-headers-4.4.0-36-generic  \nPWD :=$(shell pwd)  \ndefault:  \n    make -C $(KDIR) M=$(PWD) modules  \nclean:  \n    make -C $(KDIR) M=$(PWD) clean"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "makefile"
                },
                {
                    "bbox": [
                        108,
                        166,
                        312,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                166,
                                312,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        166,
                                        312,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "然后使用make命令编译模块，得到.ko文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        190,
                        340,
                        202
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                190,
                                340,
                                204
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        190,
                                        340,
                                        204
                                    ],
                                    "type": "text",
                                    "content": "2. 使用 insmod 命令加载模块（需要 root 权限）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        212,
                        352,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                212,
                                353,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        212,
                                        353,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "加载后可使用“cat /proc/devices”查看所加载的设备",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        236,
                        262,
                        249
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                236,
                                261,
                                250
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        236,
                                        261,
                                        250
                                    ],
                                    "type": "text",
                                    "content": "3. 建立设备节点（即设备文件）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        259,
                        499,
                        287
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                259,
                                499,
                                274
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        259,
                                        499,
                                        274
                                    ],
                                    "type": "text",
                                    "content": "根据设备号在文件系统中建立对应的设备节点（即设备文件），使用命令 mknod，如：",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                136,
                                276,
                                265,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        276,
                                        265,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "#mknod /dev/mycdev c 145 0",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        290,
                        362,
                        304
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                290,
                                362,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        290,
                                        362,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "从而建立了/dev/mycdev 文件与（145,0）号设备的连接",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        314,
                        277,
                        327
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                315,
                                277,
                                327
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        315,
                                        277,
                                        327
                                    ],
                                    "type": "text",
                                    "content": "4. 可根据需要修改设备文件的权限",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        120,
                        338,
                        272,
                        350
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                336,
                                273,
                                353
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        336,
                                        273,
                                        353
                                    ],
                                    "type": "text",
                                    "content": "如：#chmod 777 /dev/mycdev",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        124,
                        353,
                        504,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                126,
                                353,
                                506,
                                367
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        126,
                                        353,
                                        506,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "至此，一个新设备建立完毕，以后应用程序就可以使用文件操作函数如“open”等",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                137,
                                370,
                                254,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        137,
                                        370,
                                        254,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "操作/dev/mycdev 设备了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        178,
                        417,
                        376,
                        439
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                177,
                                415,
                                377,
                                442
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        177,
                                        415,
                                        238,
                                        442
                                    ],
                                    "type": "text",
                                    "content": "实验四",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        249,
                                        417,
                                        377,
                                        440
                                    ],
                                    "type": "text",
                                    "content": "linux 进程管理",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        465,
                        273,
                        481
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                465,
                                274,
                                483
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        465,
                                        274,
                                        483
                                    ],
                                    "type": "text",
                                    "content": "4.1 设计目的和内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        512,
                        168,
                        524
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                512,
                                168,
                                525
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        512,
                                        168,
                                        525
                                    ],
                                    "type": "text",
                                    "content": "1. 设计目的",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        535,
                        505,
                        641
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 19,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                535,
                                241,
                                548
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        535,
                                        241,
                                        549
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                535,
                                                241,
                                                549
                                            ],
                                            "type": "text",
                                            "content": "（1）熟悉linux的命令接口。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                551,
                                503,
                                578
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        552,
                                        503,
                                        563
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                552,
                                                503,
                                                563
                                            ],
                                            "type": "text",
                                            "content": "（2）通过对linux 进程控制的相关系统调用的编程应用，进一步加深对进程概念的理解，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        568,
                                        379,
                                        579
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                568,
                                                379,
                                                579
                                            ],
                                            "type": "text",
                                            "content": "明确进程和程序的联系和区别，理解进程并发执行的具体含义。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                582,
                                505,
                                610
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        583,
                                        505,
                                        594
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                583,
                                                505,
                                                594
                                            ],
                                            "type": "text",
                                            "content": "（3）通过 Linux 管道通信机制、消息队列通信机制、共享内存通信机制的使用，加深",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        599,
                                        253,
                                        610
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                599,
                                                253,
                                                610
                                            ],
                                            "type": "text",
                                            "content": "对不同类型的进程通信方式的理解。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                112,
                                613,
                                449,
                                625
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        613,
                                        451,
                                        626
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                613,
                                                451,
                                                626
                                            ],
                                            "type": "text",
                                            "content": "（4）通过对linux的Posix 信号量的应用，加深对信号量同步机制的理解。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                112,
                                629,
                                436,
                                641
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        629,
                                        437,
                                        642
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                629,
                                                437,
                                                642
                                            ],
                                            "type": "text",
                                            "content": "（5）请根据自身情况，进一步阅读分析相关系统调用的内核源码实现。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        652,
                        168,
                        665
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                652,
                                168,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        652,
                                        168,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "2. 设计内容",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        677,
                        505,
                        704
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                674,
                                506,
                                692
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        674,
                                        506,
                                        692
                                    ],
                                    "type": "text",
                                    "content": "（1）熟悉 linux 常用命令：pwd，useradd，passwd, who, ps, pstree, kill, top, ls, cd, mkdir,",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                692,
                                250,
                                706
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        692,
                                        250,
                                        706
                                    ],
                                    "type": "text",
                                    "content": "rmdir, cp, rm, mv, cat, more, grep 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        707,
                        243,
                        719
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                706,
                                245,
                                721
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        706,
                                        245,
                                        721
                                    ],
                                    "type": "text",
                                    "content": "（2） 实现一个模拟的 shell：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        723,
                        505,
                        766
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                723,
                                505,
                                735
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        723,
                                        505,
                                        735
                                    ],
                                    "type": "text",
                                    "content": "编写三个不同的程序 cmd1.c，cmd2.c，cmd3.c，每个程序的功能自定，分别编译成可执",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                739,
                                505,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        739,
                                        505,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "行文件 cmd1，cmd2，cmd3。然后再编写一个程序，模拟 shell 程序的功能，能根据用户输",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                754,
                                499,
                                766
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        754,
                                        499,
                                        766
                                    ],
                                    "type": "text",
                                    "content": "入的字符串（表示相应的命令名），去为相应的命令创建子进程并让它去执行相应的程序，",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 44
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        506,
                        101
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                73,
                                506,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        73,
                                        506,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "而父进程则等待子进程结束，然后再等待接收下一条命令。如果接收到的命令为exit，则父",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                89,
                                483,
                                101
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        89,
                                        483,
                                        101
                                    ],
                                    "type": "text",
                                    "content": "进程结束；如果接收到的命令是无效命令，则显示“Command not found”，继续等待。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        104,
                        252,
                        116
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                103,
                                253,
                                118
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        103,
                                        253,
                                        118
                                    ],
                                    "type": "text",
                                    "content": "（3） 实现一个管道通信程序：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        119,
                        507,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                121,
                                505,
                                131
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        121,
                                        505,
                                        131
                                    ],
                                    "type": "text",
                                    "content": "由父进程创建一个管道，然后再创建 3个子进程，并由这三个子进程利用管道与父进程",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                136,
                                505,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        136,
                                        505,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "之间进行通信：子进程发送信息，父进程等三个子进程全部发完消息后再接收信息。通信的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                152,
                                504,
                                163
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        152,
                                        504,
                                        163
                                    ],
                                    "type": "text",
                                    "content": "具体内容可根据自己的需要随意设计，要求能试验阻塞型读写过程中的各种情况，测试管道",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                167,
                                505,
                                178
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        167,
                                        505,
                                        178
                                    ],
                                    "type": "text",
                                    "content": "的默认大小，并且要求利用 Posix信号量机制实现进程间对管道的互斥访问。运行程序，观",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                183,
                                389,
                                194
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        183,
                                        389,
                                        194
                                    ],
                                    "type": "text",
                                    "content": "察各种情况下，进程实际读写的字节数以及进程阻塞唤醒的情况。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        197,
                        389,
                        210
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                197,
                                390,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        197,
                                        390,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "（4）利用 linux 的消息队列通信机制实现两个线程间的通信：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        212,
                        507,
                        335
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                213,
                                504,
                                226
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        213,
                                        504,
                                        226
                                    ],
                                    "type": "text",
                                    "content": "编写程序创建两个线程：sender 线程和 receive 线程，其中 sender 线程运行函数 sender()，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                229,
                                504,
                                240
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        229,
                                        504,
                                        240
                                    ],
                                    "type": "text",
                                    "content": "它创建一个消息队列，然后，循环等待用户通过终端输入一串字符，将这串字符通过消息队",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                245,
                                500,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        245,
                                        500,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "列发送给receiver 线程，直到用户输入“exit”为止；最后，它向 receiver 线程发送消息“end”，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                259,
                                506,
                                274
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        259,
                                        506,
                                        274
                                    ],
                                    "type": "text",
                                    "content": "并且等待 receiver 的应答，等到应答消息后，将接收到的应答信息显示在终端屏幕上，删除",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                276,
                                505,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        276,
                                        505,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "相关消息队列，结束程序的运行。Receiver 线程运行 receive()，它通过消息队列接收来自",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                291,
                                505,
                                304
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        291,
                                        505,
                                        304
                                    ],
                                    "type": "text",
                                    "content": "sender的消息，将消息显示在终端屏幕上，直至收到内容为“end”的消息为止，此时，它",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                307,
                                505,
                                320
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        307,
                                        505,
                                        320
                                    ],
                                    "type": "text",
                                    "content": "向 sender 发送一个应答消息“over”，结束程序的运行。使用无名信号量实现两个线程之间",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                322,
                                159,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        322,
                                        159,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "的同步与互斥。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        338,
                        389,
                        350
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                338,
                                390,
                                351
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        338,
                                        390,
                                        351
                                    ],
                                    "type": "text",
                                    "content": "（5）利用 linux的共享内存通信机制实现两个进程间的通信：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        353,
                        506,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                354,
                                505,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        354,
                                        505,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "编写程序sender，它创建一个共享内存，然后等待用户通过终端输入一串字符，并将这",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                370,
                                505,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        370,
                                        505,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "串字符通过共享内存发送给 receiver；最后，它等待 receiver 的应答，收到应答消息后，将",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                386,
                                500,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        386,
                                        500,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "接收到的应答信息显示在终端屏幕上，删除共享内存，结束程序的运行。编写receiver 程序，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                401,
                                505,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        401,
                                        505,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "它通过共享内存接收来自 sender 的消息，将消息显示在终端屏幕上，然后再通过该共享内",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                417,
                                505,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        417,
                                        505,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "存向sender发送一个应答消息“over”，结束程序的运行。使用有名信号量或 System V 信号",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                432,
                                306,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        432,
                                        306,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "量实现两个进程对共享内存的互斥及同步使用。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        454,
                        226,
                        467
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                455,
                                226,
                                467
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        455,
                                        226,
                                        467
                                    ],
                                    "type": "text",
                                    "content": "3. 学时安排（共 6学时）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        486,
                        169,
                        498
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                486,
                                170,
                                499
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        486,
                                        170,
                                        499
                                    ],
                                    "type": "text",
                                    "content": "4．开发平台",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        509,
                        309,
                        523
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                507,
                                311,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        507,
                                        311,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "Linux 环境，gcc，gdb，vim 或 gedit 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        533,
                        146,
                        544
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                531,
                                148,
                                547
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        531,
                                        148,
                                        547
                                    ],
                                    "type": "text",
                                    "content": "5. 思考",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        555,
                        505,
                        755
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 23,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                555,
                                458,
                                568
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        556,
                                        458,
                                        569
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                556,
                                                458,
                                                569
                                            ],
                                            "type": "text",
                                            "content": "（1）OS向用户提供的命令接口、图形接口和程序接口分别适用于哪些场合？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                571,
                                505,
                                599
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        571,
                                        506,
                                        584
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                571,
                                                506,
                                                584
                                            ],
                                            "type": "text",
                                            "content": "（2）系统调用和用户自己编制的子函数有什么区别？通常操作系统提供的 API与系统调",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        588,
                                        191,
                                        599
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                588,
                                                191,
                                                599
                                            ],
                                            "type": "text",
                                            "content": "用有什么联系和区别？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                602,
                                306,
                                614
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        602,
                                        307,
                                        615
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                602,
                                                307,
                                                615
                                            ],
                                            "type": "text",
                                            "content": "（3）进程和程序有何联系，又有哪些区别？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                618,
                                358,
                                630
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        618,
                                        359,
                                        632
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                618,
                                                359,
                                                632
                                            ],
                                            "type": "text",
                                            "content": "（4）一个进程从出生到终止，其状态会经历哪些变化？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                634,
                                285,
                                645
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        634,
                                        286,
                                        647
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                634,
                                                286,
                                                647
                                            ],
                                            "type": "text",
                                            "content": "（5）用户可如何取得进程的控制信息？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                650,
                                402,
                                661
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        649,
                                        403,
                                        663
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                649,
                                                403,
                                                663
                                            ],
                                            "type": "text",
                                            "content": "（6）当首次将CPU调度给子进程时，它将从哪里开始执行指令？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                665,
                                504,
                                692
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        666,
                                        505,
                                        678
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                666,
                                                505,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "（7）虽然父子进程可以完全并发执行，但在 Linux中，创建子进程成功之后，通常让子",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        682,
                                        284,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                682,
                                                284,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "进程优先获得CPU，这种做法有什么好处？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                696,
                                264,
                                708
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        697,
                                        264,
                                        708
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                697,
                                                264,
                                                708
                                            ],
                                            "type": "text",
                                            "content": "（8）僵尸进程通常是如何形成的？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                712,
                                500,
                                724
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        712,
                                        501,
                                        724
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                712,
                                                501,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "（9）对一个应用，如果用多个进程的并发执行来实现，与单个进程来实现有什么不同？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                727,
                                311,
                                740
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        728,
                                        312,
                                        741
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                728,
                                                312,
                                                741
                                            ],
                                            "type": "text",
                                            "content": "（10）有名管道和无名管道之间有什么不同？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                743,
                                311,
                                755
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        743,
                                        312,
                                        756
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                743,
                                                312,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "（11）管道的读写与文件的读写有什么异同？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 45
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        107,
                        72,
                        483,
                        101
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 3,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                72,
                                483,
                                85
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        73,
                                        484,
                                        85
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                73,
                                                484,
                                                85
                                            ],
                                            "type": "text",
                                            "content": "（12）Linux消息队列通信机制中与教材中的消息缓冲队列通信机制存在哪些异同？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                88,
                                376,
                                101
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        88,
                                        378,
                                        103
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                88,
                                                378,
                                                103
                                            ],
                                            "type": "text",
                                            "content": "（13）linux 中 posix 信号量与 System V 信号量有什么区别？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        114,
                        139,
                        254,
                        156
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                138,
                                256,
                                157
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        138,
                                        256,
                                        157
                                    ],
                                    "type": "text",
                                    "content": "4.2 Linux 基本使用：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        185,
                        198,
                        199
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                185,
                                199,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        185,
                                        199,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "4.2.1 常用命令",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        88,
                        211,
                        496,
                        238
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                209,
                                499,
                                224
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        209,
                                        499,
                                        224
                                    ],
                                    "type": "text",
                                    "content": "pwd, passwd, who, ps, pstree, kill, top, ls, cd, mkdir, rmdir, cp, rm, mv, cat, more, grep 等。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                225,
                                200,
                                238
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        225,
                                        200,
                                        238
                                    ],
                                    "type": "text",
                                    "content": "自行查阅相关资料学习。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        248,
                        268,
                        262
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                247,
                                270,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        247,
                                        270,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "4.2.2 Linux 的在线帮助 man",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        272,
                        502,
                        300
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                273,
                                503,
                                285
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        273,
                                        503,
                                        285
                                    ],
                                    "type": "text",
                                    "content": "Linux提供了丰富的帮助手册，当你需要查看某个命令的参数时不必到处上网查找，只",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                288,
                                294,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        288,
                                        294,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "要 man（man 为 manual 的简写）一下即可。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        311,
                        171,
                        323
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                311,
                                172,
                                325
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        311,
                                        172,
                                        325
                                    ],
                                    "type": "text",
                                    "content": "1. 简单范例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        334,
                        498,
                        363
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                333,
                                499,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        333,
                                        499,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "例如，如果你不清楚 pwd 命令的用法，你可以在命令提示符下直接输入命令：man pwd，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                349,
                                265,
                                362
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        349,
                                        265,
                                        362
                                    ],
                                    "type": "text",
                                    "content": "马上就会有pwd的详细资料提供给你：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        365,
                        158,
                        378
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                364,
                                160,
                                380
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        364,
                                        160,
                                        380
                                    ],
                                    "type": "text",
                                    "content": "PWD（1）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        239,
                        366,
                        323,
                        378
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                239,
                                365,
                                324,
                                379
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        239,
                                        365,
                                        324,
                                        379
                                    ],
                                    "type": "text",
                                    "content": "User commands",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        395,
                        366,
                        433,
                        379
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                393,
                                364,
                                436,
                                382
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        393,
                                        364,
                                        436,
                                        382
                                    ],
                                    "type": "text",
                                    "content": "Date(1)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        381,
                        143,
                        392
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                381,
                                143,
                                395
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        381,
                                        143,
                                        395
                                    ],
                                    "type": "text",
                                    "content": "NAME",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        397,
                        348,
                        410
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                396,
                                348,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        396,
                                        348,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "pwd - print name of current/working directory",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        412,
                        165,
                        424
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                412,
                                166,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        412,
                                        166,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "SYNOPSIS",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        428,
                        173,
                        440
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                428,
                                174,
                                442
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        428,
                                        174,
                                        442
                                    ],
                                    "type": "text",
                                    "content": "pwd [OPTION]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        444,
                        183,
                        455
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                444,
                                184,
                                459
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        444,
                                        184,
                                        459
                                    ],
                                    "type": "text",
                                    "content": "DESCRIPTION",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        460,
                        505,
                        503
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                459,
                                506,
                                473
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        459,
                                        506,
                                        473
                                    ],
                                    "type": "text",
                                    "content": "NOTE: your shell may have its own version of pwd which will supercede the version",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                474,
                                506,
                                488
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        474,
                                        506,
                                        488
                                    ],
                                    "type": "text",
                                    "content": "described here. Please refer to your shell's documentation for details about the",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                491,
                                193,
                                503
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        491,
                                        193,
                                        503
                                    ],
                                    "type": "text",
                                    "content": "options it supports.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        507,
                        407,
                        518
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                505,
                                409,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        505,
                                        409,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "Print the full filename of the current working directory.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        523,
                        130,
                        533
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                520,
                                132,
                                536
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        520,
                                        132,
                                        536
                                    ],
                                    "type": "text",
                                    "content": "--help",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        538,
                        246,
                        550
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                537,
                                248,
                                551
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        537,
                                        248,
                                        551
                                    ],
                                    "type": "text",
                                    "content": "display this help and exit",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        105,
                        555,
                        141,
                        564
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                106,
                                555,
                                142,
                                565
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        106,
                                        555,
                                        142,
                                        565
                                    ],
                                    "type": "text",
                                    "content": "--version",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        569,
                        295,
                        580
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                568,
                                296,
                                581
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        568,
                                        296,
                                        581
                                    ],
                                    "type": "text",
                                    "content": "output version information and exit",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        584,
                        156,
                        595
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                584,
                                157,
                                598
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        584,
                                        157,
                                        598
                                    ],
                                    "type": "text",
                                    "content": "AUTHOR",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        600,
                        234,
                        612
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                597,
                                236,
                                615
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        597,
                                        236,
                                        615
                                    ],
                                    "type": "text",
                                    "content": "Written by Jim Meyering.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        615,
                        207,
                        627
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                615,
                                207,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        615,
                                        207,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "REPORTING BUGS",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        631,
                        313,
                        643
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                629,
                                314,
                                645
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        629,
                                        314,
                                        645
                                    ],
                                    "type": "text",
                                    "content": "Report bugs to <bug-coreutils@gnu.org>.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        646,
                        174,
                        657
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                646,
                                174,
                                661
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        646,
                                        174,
                                        661
                                    ],
                                    "type": "text",
                                    "content": "COPYRIGHT",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        662,
                        355,
                        675
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                661,
                                358,
                                677
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        661,
                                        161,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "Copyright",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        161,
                                        663,
                                        170,
                                        672
                                    ],
                                    "type": "inline_equation",
                                    "content": "©",
                                    "score": 0.52
                                },
                                {
                                    "bbox": [
                                        170,
                                        661,
                                        358,
                                        677
                                    ],
                                    "type": "text",
                                    "content": "2004 Free Software Foundation, Inc.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        677,
                        504,
                        705
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                677,
                                506,
                                692
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        677,
                                        506,
                                        692
                                    ],
                                    "type": "text",
                                    "content": "This is free software; see the source for copying conditions. There is NO warranty;",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                693,
                                429,
                                706
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        693,
                                        429,
                                        706
                                    ],
                                    "type": "text",
                                    "content": "not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        709,
                        164,
                        720
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                708,
                                166,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        708,
                                        166,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "SEE ALSO",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        724,
                        505,
                        752
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                724,
                                506,
                                738
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        724,
                                        506,
                                        738
                                    ],
                                    "type": "text",
                                    "content": "The full documentation for pwd is maintained as a Texinfo manual. If the info",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                740,
                                432,
                                753
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        740,
                                        432,
                                        753
                                    ],
                                    "type": "text",
                                    "content": "and pwd programs are properly installed at your site, the command",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        756,
                        206,
                        767
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                755,
                                207,
                                770
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        755,
                                        207,
                                        770
                                    ],
                                    "type": "text",
                                    "content": "info coreutils pwd",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 46
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        108,
                        74,
                        349,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                72,
                                351,
                                87
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        72,
                                        351,
                                        87
                                    ],
                                    "type": "text",
                                    "content": "should give you access to the complete manual.",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        111,
                        205,
                        125
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                111,
                                205,
                                127
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        111,
                                        205,
                                        127
                                    ],
                                    "type": "text",
                                    "content": "2. man page 说明",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        135,
                        282,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                135,
                                283,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        135,
                                        283,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "前面的范例中，第一行名字后的数字：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        151,
                        250,
                        272
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                151,
                                188,
                                163
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        150,
                                        188,
                                        164
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                150,
                                                188,
                                                164
                                            ],
                                            "type": "text",
                                            "content": "\"1\"表示用户命令",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                166,
                                188,
                                178
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        165,
                                        188,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                165,
                                                188,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "\"2\"表示系统调用",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                182,
                                209,
                                194
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        182,
                                        210,
                                        195
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                182,
                                                210,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "\"3\"表示C语言库函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                197,
                                219,
                                209
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        197,
                                        220,
                                        211
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                197,
                                                220,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "\"4\"表示设备或特殊文件",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                213,
                                219,
                                225
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        213,
                                        219,
                                        226
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                213,
                                                219,
                                                226
                                            ],
                                            "type": "text",
                                            "content": "\"5\"表示文件格式和规则",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                229,
                                198,
                                241
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        229,
                                        198,
                                        242
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                229,
                                                198,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "\"6\"表示游戏及其他",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                244,
                                230,
                                256
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        244,
                                        230,
                                        257
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                244,
                                                230,
                                                257
                                            ],
                                            "type": "text",
                                            "content": "\"7\"表示宏、包及其他杂项",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                260,
                                250,
                                272
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        260,
                                        251,
                                        273
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                260,
                                                251,
                                                273
                                            ],
                                            "type": "text",
                                            "content": "\"8\"表示系统管理员相关的命令",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        290,
                        503,
                        333
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                291,
                                499,
                                303
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        291,
                                        499,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "可见，man不仅可以查询命令，还可以查询系统调用、C语言库函数、配置文件的格式、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                307,
                                505,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        307,
                                        505,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "系统管理员可用的管理命令等。值得注意的是man是按照手册的章节号的顺序进行搜索的，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                322,
                                118,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        322,
                                        118,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "比如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        339,
                        160,
                        350
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                337,
                                162,
                                353
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        337,
                                        162,
                                        353
                                    ],
                                    "type": "text",
                                    "content": "man sleep",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        354,
                        484,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                351,
                                487,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        351,
                                        487,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "只会显示 sleep 命令的手册，如果想查看库函数 sleep，就要输入使用 man 3 sleep。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        370,
                        403,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                366,
                                405,
                                386
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        366,
                                        405,
                                        386
                                    ],
                                    "type": "text",
                                    "content": "若想知道 sleep 系统调用需要哪些头文件，则要输入 man 2 sleep",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        400,
                        264,
                        413
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                399,
                                265,
                                415
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        399,
                                        265,
                                        415
                                    ],
                                    "type": "text",
                                    "content": "通常，man page 大致分几个部分：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        416,
                        321,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                417,
                                321,
                                429
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        417,
                                        140,
                                        429
                                    ],
                                    "type": "text",
                                    "content": "NAME",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        195,
                                        417,
                                        321,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "简短的命令、数据名称说明",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        432,
                        283,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                431,
                                283,
                                446
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        431,
                                        154,
                                        446
                                    ],
                                    "type": "text",
                                    "content": "SYNOPSIS",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        188,
                                        431,
                                        283,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "简短的命令语法简介",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        447,
                        367,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                447,
                                368,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        447,
                                        368,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "DESCRIPTION 较为完整的说明，这部分最好仔细看看、",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        462,
                        411,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                462,
                                412,
                                477
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        463,
                                        152,
                                        477
                                    ],
                                    "type": "text",
                                    "content": "OPTIONS",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        185,
                                        462,
                                        412,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "针对 SYNOPSIS部分中，列举说明所有可用的参数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        478,
                        501,
                        506
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                479,
                                501,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        479,
                                        167,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "COMMANDS",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        186,
                                        479,
                                        501,
                                        490
                                    ],
                                    "type": "text",
                                    "content": "当这个程序（软件）在执行的时候，可以在此程序（软件）中发出的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                491,
                                114,
                                509
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        491,
                                        114,
                                        509
                                    ],
                                    "type": "text",
                                    "content": "命令",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        509,
                        426,
                        522
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                509,
                                427,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        509,
                                        135,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "FILES",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        183,
                                        509,
                                        427,
                                        522
                                    ],
                                    "type": "text",
                                    "content": "这个程序或数据所使用、参考或连接的某些参考说明",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        525,
                        370,
                        537
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                524,
                                371,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        525,
                                        152,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "SEE ALSO",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        188,
                                        524,
                                        371,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "与这个命令或数据相关的其他参考说明、",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        540,
                        282,
                        553
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                540,
                                283,
                                554
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        541,
                                        152,
                                        554
                                    ],
                                    "type": "text",
                                    "content": "EXAMPLE",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        188,
                                        540,
                                        283,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "一些可以参考的范例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        556,
                        282,
                        568
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                555,
                                283,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        556,
                                        137,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "BUGS",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        196,
                                        555,
                                        283,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "是否有相关的错误",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        595,
                        286,
                        608
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                593,
                                287,
                                608
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        593,
                                        287,
                                        608
                                    ],
                                    "type": "text",
                                    "content": "3. man page 中可以使用的常用按键",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        618,
                        212,
                        630
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                618,
                                214,
                                632
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        618,
                                        214,
                                        632
                                    ],
                                    "type": "text",
                                    "content": "在man中的按键使用：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        634,
                        246,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                632,
                                248,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        632,
                                        145,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "空格键",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        193,
                                        633,
                                        248,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "向下翻一页",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        650,
                        243,
                        662
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                649,
                                245,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        649,
                                        167,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "[Page Down]",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        190,
                                        649,
                                        245,
                                        664
                                    ],
                                    "type": "text",
                                    "content": "向下翻一页",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        666,
                        241,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                665,
                                242,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        665,
                                        154,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "[Page Up]",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        188,
                                        665,
                                        242,
                                        678
                                    ],
                                    "type": "text",
                                    "content": "向上翻一页",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        682,
                        232,
                        693
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                680,
                                233,
                                697
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        680,
                                        145,
                                        697
                                    ],
                                    "type": "text",
                                    "content": "[Home]",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        188,
                                        680,
                                        233,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "到第一页",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        697,
                        238,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                695,
                                239,
                                713
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        695,
                                        136,
                                        713
                                    ],
                                    "type": "text",
                                    "content": "[End]",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        184,
                                        696,
                                        239,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "到最后一页",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        712,
                        458,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                710,
                                459,
                                728
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        710,
                                        140,
                                        728
                                    ],
                                    "type": "text",
                                    "content": "/word",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        182,
                                        711,
                                        459,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "向下搜索 word 字符串，如果要搜索 date 的话，就输入/date",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        728,
                        285,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                724,
                                286,
                                743
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        724,
                                        141,
                                        743
                                    ],
                                    "type": "text",
                                    "content": "?word",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        184,
                                        727,
                                        286,
                                        741
                                    ],
                                    "type": "text",
                                    "content": "向上搜索word字符串",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        743,
                        502,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                742,
                                504,
                                759
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        742,
                                        128,
                                        759
                                    ],
                                    "type": "text",
                                    "content": "n,N",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        183,
                                        743,
                                        504,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "使用/或?来搜索字符串时，可以用n来继续下一个搜索（不论是/还是?），",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 47
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        171,
                        72,
                        315,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                173,
                                72,
                                316,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        173,
                                        72,
                                        316,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "可以使用N 来进行“反向”搜索。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        88,
                        504,
                        117
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                89,
                                506,
                                101
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        89,
                                        506,
                                        101
                                    ],
                                    "type": "text",
                                    "content": "举例来说，我以/date 搜索 date 字符串，那么可以用 n继续往下查询，用 N 往上查询。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                104,
                                440,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        104,
                                        440,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "若以?date 向上查询date字符串，可以用n继续 “向上”查询，用N反向查询",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        120,
                        262,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                117,
                                262,
                                135
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        121,
                                        118,
                                        135
                                    ],
                                    "type": "text",
                                    "content": "q",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        162,
                                        117,
                                        262,
                                        135
                                    ],
                                    "type": "text",
                                    "content": "结束并退出 man page",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        142,
                        282,
                        155
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                142,
                                282,
                                157
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        142,
                                        282,
                                        157
                                    ],
                                    "type": "text",
                                    "content": "4. 互联网上的在线 Linux man 手册",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        166,
                        444,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                166,
                                444,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        166,
                                        444,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "即使不在 Linux 下，也可以通过某些网站在线查询某个 Linux 的命令，如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        182,
                        269,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                180,
                                268,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        180,
                                        268,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "http://www.linuxmanpages.com/",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        197,
                        465,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                195,
                                466,
                                212
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        195,
                                        466,
                                        212
                                    ],
                                    "type": "text",
                                    "content": "在这里有非常全的 Linux 的 man 信息，你可以分 1－8 来查看相应的 manual 。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        221,
                        247,
                        233
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                220,
                                247,
                                235
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        220,
                                        247,
                                        235
                                    ],
                                    "type": "text",
                                    "content": "4.2.3 vi 和 vim 编辑器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        252,
                        196,
                        264
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                250,
                                196,
                                266
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        250,
                                        196,
                                        266
                                    ],
                                    "type": "text",
                                    "content": "1. vi 和 vim 简介",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        275,
                        506,
                        335
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                275,
                                505,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        275,
                                        505,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "在计算机系统中，编辑文本文件是用户经常要进行的操作。所谓文本文件指的是由",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                292,
                                505,
                                303
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        292,
                                        505,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "ASCII码字符构成的文件。vi 编辑器是 Unix/Linux 系统提供的文本编辑器，用于创建和修",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                307,
                                501,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        307,
                                        501,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "改文本文件。vi 编辑器与其他字处理软件不同，它不包含任何格式方面的信息，如粗体、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                322,
                                180,
                                335
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        322,
                                        180,
                                        335
                                    ],
                                    "type": "text",
                                    "content": "居中或者下划线等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        338,
                        508,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                339,
                                509,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        339,
                                        509,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "vi编辑器是一个全屏幕编辑器，用户可以在整个文档范围内自由移动光标进行编辑操作。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                354,
                                505,
                                365
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        354,
                                        505,
                                        365
                                    ],
                                    "type": "text",
                                    "content": "vi编辑器中有100多个命令可供用户使用，提供了丰富的编辑功能，当然对于学习使用者来",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                370,
                                505,
                                380
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        370,
                                        505,
                                        380
                                    ],
                                    "type": "text",
                                    "content": "说也是个挑战。但是不必灰心，因为只有少数一些命令是必须使用，或者使用频繁的，所以",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                385,
                                411,
                                397
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        385,
                                        411,
                                        397
                                    ],
                                    "type": "text",
                                    "content": "只要熟练掌握这些常用命令就可以完成大部分文本文件的编辑任务了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        400,
                        506,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                401,
                                505,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        401,
                                        505,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "vim 可以当做 vi 的升级版，vi 的命令几乎都可以在 vim 上使用。Vim 会依据文件扩展",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                416,
                                506,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        416,
                                        506,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "名或文件的开头信息来判断文件内容，而自动执行该程序的语法判断，再以颜色来显示程序",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                433,
                                326,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        433,
                                        326,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "代码和一般信息。因此 vim用于程序编辑更加方便。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        446,
                        506,
                        476
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                447,
                                506,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        447,
                                        506,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "在系统提示符（$、#）下，输入：vi <文件名>，vi可以自动载入所要编辑的文件或创",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                463,
                                248,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        463,
                                        248,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "建一个新文件（若该文件不存在）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        486,
                        215,
                        498
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                486,
                                215,
                                500
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        486,
                                        215,
                                        500
                                    ],
                                    "type": "text",
                                    "content": "2. vi 的三种工作模式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        509,
                        389,
                        522
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                509,
                                388,
                                522
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        509,
                                        388,
                                        522
                                    ],
                                    "type": "text",
                                    "content": "vi编辑器有三种工作模式：一般模式、编辑模式和命令模式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        524,
                        505,
                        569
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                525,
                                506,
                                537
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        525,
                                        506,
                                        537
                                    ],
                                    "type": "text",
                                    "content": "（1）一般模式。以 vi 打开一个文件就直接进入一般模式了(这是默认的模式)。在这个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                541,
                                505,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        541,
                                        505,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "模式中， 你可以使用『上下左右』按键来移动光标，你可以使用『删除字符』戒『删除整",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                557,
                                426,
                                568
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        557,
                                        426,
                                        568
                                    ],
                                    "type": "text",
                                    "content": "行』来处理文件内容， 也可以使用『复制、贴贴』来处理你的文件数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        571,
                        473,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                571,
                                474,
                                584
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        571,
                                        474,
                                        584
                                    ],
                                    "type": "text",
                                    "content": "即在一般模式中可以进行删除、复制、粘贴等动作，但却无法编辑文件的内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        587,
                        504,
                        647
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                587,
                                503,
                                600
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        587,
                                        503,
                                        600
                                    ],
                                    "type": "text",
                                    "content": "（2）编辑模式。在一般模式下，按下『i, I, o, O, a, A, r, R』等任何一个字母后就会进入",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                603,
                                504,
                                615
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        603,
                                        504,
                                        615
                                    ],
                                    "type": "text",
                                    "content": "编辑模式。通常，在按下这些字母后，在画面的左下方会出现『 INSERT 或 REPLACE 』的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                618,
                                504,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        618,
                                        504,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "字样，此时才可以进行编辑。而要回到一般模式，则必须按下『 ESC 』按键，即可退出编",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                634,
                                200,
                                646
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        634,
                                        200,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "辑模式，返回一般模式。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        649,
                        483,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                650,
                                483,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        650,
                                        483,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "而读取、保存、大量字符替换、离开 vi、显示行号等操作也是在该模式下完成的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        673,
                        171,
                        685
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                672,
                                172,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        672,
                                        172,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "3. 使用范例",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        696,
                        166,
                        708
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                695,
                                167,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        695,
                                        167,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "范例1：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        712,
                        506,
                        756
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                712,
                                499,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        712,
                                        499,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "（1）在Linux命令行界面下输入命令：vi ccc.c 后便进入vi的一般模式。如图5-1所示，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                729,
                                505,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        729,
                                        505,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "vi的界面分为上下两部分，上半部分显示的是文件的实际内容，而下半部，即最下面的一行",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                744,
                                506,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        744,
                                        506,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "则显示一些状态信息。如果 ccc.c是一个原来不存在的文件，状态行中会显示『“ccc.c” [New",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 48
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        465,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                73,
                                465,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        73,
                                        465,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "File] 』表示它是一个新文件，否则，会显示出被编辑文件的行数、字符数等信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        88,
                        505,
                        130
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                89,
                                505,
                                101
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        89,
                                        505,
                                        101
                                    ],
                                    "type": "text",
                                    "content": "（2）按 “i”进入编辑模式，此时，状态行中会出现『 INSERT』的字样，便可以开始编",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                104,
                                505,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        104,
                                        505,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "辑文字了。此时，你输入的除了“ESC”以外的所有信息都被视为文件的内容，比如你可以输",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                119,
                                107,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        119,
                                        107,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "入：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        136,
                        237,
                        195
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                136,
                                237,
                                195
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        136,
                                        237,
                                        195
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                136,
                                                237,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "include<stdio.h>   \nmain(){ printf(\"Hello,World!\\n\");   \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        112,
                        197,
                        428,
                        226
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 6,
                    "blocks": [
                        {
                            "bbox": [
                                112,
                                197,
                                428,
                                210
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        197,
                                        428,
                                        211
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                197,
                                                428,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "（3）按“ESC”回到一般模式，此时，状态行中的『 INSERT』不见了。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                212,
                                379,
                                226
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        213,
                                        379,
                                        226
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                213,
                                                379,
                                                226
                                            ],
                                            "type": "text",
                                            "content": "（4）在一般模式中输入“：wq”保存文件的内容并离开vi。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        243,
                        161,
                        256
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                243,
                                163,
                                259
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        243,
                                        163,
                                        259
                                    ],
                                    "type": "text",
                                    "content": "范例 2",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        259,
                        375,
                        288
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 10,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                259,
                                348,
                                272
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        259,
                                        348,
                                        275
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                259,
                                                348,
                                                275
                                            ],
                                            "type": "text",
                                            "content": "（1）在 Linux 命令行界面下输入命令： vi file1.txt",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                275,
                                375,
                                288
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        275,
                                        376,
                                        288
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                275,
                                                376,
                                                288
                                            ],
                                            "type": "text",
                                            "content": "（2）按 “i”进入编辑模式，输入下列字符，并保存文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "type": "code",
                    "bbox": [
                        107,
                        291,
                        305,
                        350
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                291,
                                305,
                                350
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        107,
                                        291,
                                        305,
                                        350
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                291,
                                                305,
                                                350
                                            ],
                                            "type": "text",
                                            "content": "You raise me up, so I can stand on mountains;  \nYou raise me up, to walk on stormy seas;  \nI am strong, when I am on your shoulders;  \nYou raise me up: To more than I can be."
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        108,
                        369,
                        161,
                        380
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                368,
                                163,
                                383
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        368,
                                        163,
                                        383
                                    ],
                                    "type": "text",
                                    "content": "范例 3",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        384,
                        362,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                384,
                                363,
                                398
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        384,
                                        363,
                                        398
                                    ],
                                    "type": "text",
                                    "content": "通过vi编辑器编辑一个 systemcall.c文件，其内容如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        401,
                        303,
                        599
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                401,
                                303,
                                599
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        401,
                                        303,
                                        599
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                401,
                                                303,
                                                599
                                            ],
                                            "type": "text",
                                            "content": "include <fcntl.h>   \n#include<stdio.h>   \nint main(){ int fd=0，i; charbuf[10]; fd=open(\"file1.txt\",O_RDONLY); if(fd==-1)printf(\"Cannot open file!\\n\"); while((i=read(fd,buf,sizeof(buf)-1)>0){ buf[i]='\\0'; printf(\"%s\",buf); }   \n}"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 14,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        602,
                        379,
                        631
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                602,
                                246,
                                614
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        602,
                                        246,
                                        616
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                602,
                                                246,
                                                616
                                            ],
                                            "type": "text",
                                            "content": "（3）按“ESC”回到一般模式。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                618,
                                379,
                                631
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        618,
                                        379,
                                        632
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                618,
                                                379,
                                                632
                                            ],
                                            "type": "text",
                                            "content": "（4）在一般模式中输入“：wq”保存文件的内容并离开vi。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        641,
                        235,
                        655
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                642,
                                235,
                                655
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        642,
                                        235,
                                        655
                                    ],
                                    "type": "text",
                                    "content": "4. 一般模式下的常用按键",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        665,
                        180,
                        677
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                665,
                                180,
                                679
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        665,
                                        180,
                                        679
                                    ],
                                    "type": "text",
                                    "content": "（1）光标移动",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        680,
                        479,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                682,
                                479,
                                692
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        682,
                                        479,
                                        692
                                    ],
                                    "type": "text",
                                    "content": "vi可以直接用键盘上的光标键来上下左右移动，但正规的 vi是用小写英文字母 。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                697,
                                342,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        697,
                                        342,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "h、j、k、l，分别控制光标左、下、上、右移一格。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        711,
                        282,
                        724
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                712,
                                283,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        712,
                                        283,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "按 Ctrl+B：屏幕往后移动一页。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        727,
                        282,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                726,
                                283,
                                741
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        726,
                                        283,
                                        741
                                    ],
                                    "type": "text",
                                    "content": "按Ctrl+F：屏幕往前移动一页。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        743,
                        250,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                743,
                                251,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        743,
                                        251,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "按Ctrl+U：屏幕往后移动半页。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 49
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        108,
                        73,
                        251,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                73,
                                252,
                                87
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        73,
                                        252,
                                        87
                                    ],
                                    "type": "text",
                                    "content": "按 Ctrl+D：屏幕往前移动半页。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        88,
                        295,
                        102
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                89,
                                295,
                                102
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        89,
                                        295,
                                        102
                                    ],
                                    "type": "text",
                                    "content": "按 0 (数字零)：移动文章的开头。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        104,
                        266,
                        117
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                103,
                                267,
                                118
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        103,
                                        267,
                                        118
                                    ],
                                    "type": "text",
                                    "content": "按 G：移动到文章的最后。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        119,
                        298,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                119,
                                299,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        119,
                                        299,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "按 w：光标跳到下个单词的开头。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        135,
                        262,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                136,
                                263,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        136,
                                        263,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "按 e：光标跳到下个单词的字尾。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        151,
                        262,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                150,
                                264,
                                164
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        150,
                                        264,
                                        164
                                    ],
                                    "type": "text",
                                    "content": "按 b：光标回到上个单词的开头。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        166,
                        286,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                166,
                                286,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        166,
                                        286,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "按 $：移到光标所在行的行尾。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        182,
                        283,
                        194
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                182,
                                284,
                                195
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        182,
                                        284,
                                        195
                                    ],
                                    "type": "text",
                                    "content": "按 ^：移到该行第一个非空白的字符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        197,
                        276,
                        211
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                198,
                                276,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        198,
                                        276,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "按 0：移到该行的开头位置。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        213,
                        349,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                212,
                                349,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        212,
                                        349,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "按 #：移到该行的第#个位置，例：51、121。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        228,
                        159,
                        241
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                227,
                                160,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        227,
                                        160,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "（2）删除",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        244,
                        364,
                        258
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                243,
                                364,
                                258
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        243,
                                        364,
                                        258
                                    ],
                                    "type": "text",
                                    "content": "x：每按一次删除光标所在位置的后面一个字符。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        260,
                        383,
                        273
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                260,
                                385,
                                275
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        260,
                                        385,
                                        275
                                    ],
                                    "type": "text",
                                    "content": "#x：例如，6x 表删除光标所在位置的后面 6 个字符。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        275,
                        381,
                        288
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                275,
                                382,
                                289
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        275,
                                        382,
                                        289
                                    ],
                                    "type": "text",
                                    "content": "X：大字的 X，每按一次删除光标所在位置的前面一个字符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        290,
                        363,
                        304
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                290,
                                364,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        290,
                                        364,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "#X：例如，20X 表删除光标所在位置的前面 20 个字符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        306,
                        255,
                        320
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                306,
                                255,
                                321
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        306,
                                        255,
                                        321
                                    ],
                                    "type": "text",
                                    "content": "dd：删除光标所在行。[超常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        322,
                        425,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                322,
                                427,
                                337
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        322,
                                        427,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "#dd：例如，6dd 表删除从光标所在的该行往下数 6 行之文字。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        338,
                        181,
                        350
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                337,
                                182,
                                351
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        337,
                                        182,
                                        351
                                    ],
                                    "type": "text",
                                    "content": "(3)复制 与粘贴",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        354,
                        337,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                354,
                                339,
                                366
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        354,
                                        339,
                                        366
                                    ],
                                    "type": "text",
                                    "content": "yw：将光标所在处到字尾的字符复制到缓冲区中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        370,
                        253,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                369,
                                254,
                                383
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        369,
                                        254,
                                        383
                                    ],
                                    "type": "text",
                                    "content": "yy：复制光标所在行。[超常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        384,
                        423,
                        398
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                384,
                                424,
                                399
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        384,
                                        424,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "#yy：如：6yy 表示拷贝从光标所在的该行往下数 6 行之文字。[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        400,
                        295,
                        413
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                400,
                                296,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        400,
                                        296,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "p：将已复制的内容粘贴在光标后的位置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        415,
                        295,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                416,
                                295,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        416,
                                        295,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "P：将已复制的内容粘贴在光标前的位置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        431,
                        143,
                        444
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                430,
                                146,
                                446
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        430,
                                        146,
                                        446
                                    ],
                                    "type": "text",
                                    "content": "(4)替换",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        447,
                        273,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                446,
                                274,
                                461
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        446,
                                        274,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "r： 取代光标所在处的字符：[常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        463,
                        245,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                462,
                                246,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        462,
                                        246,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "R：取代字符直到按 Esc为止。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        478,
                        176,
                        491
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                478,
                                177,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        478,
                                        177,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "(5)撤销和重做",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        493,
                        446,
                        507
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                493,
                                448,
                                508
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        493,
                                        448,
                                        508
                                    ],
                                    "type": "text",
                                    "content": "u：假如您误操作一个指令，可以马上按 u，可撤销前一个操作。[超常用]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        509,
                        268,
                        522
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                510,
                                270,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        510,
                                        270,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "U：撤销当前行上最近的所有操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        525,
                        222,
                        537
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                524,
                                223,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        524,
                                        223,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "ctrl+r：重做上一个操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        540,
                        280,
                        553
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                540,
                                282,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        540,
                                        282,
                                        553
                                    ],
                                    "type": "text",
                                    "content": ".： 点号可以重复执行上一次的指令。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        556,
                        143,
                        569
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                555,
                                146,
                                571
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        555,
                                        146,
                                        571
                                    ],
                                    "type": "text",
                                    "content": "(6)更改",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        571,
                        279,
                        584
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                572,
                                280,
                                584
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        572,
                                        280,
                                        584
                                    ],
                                    "type": "text",
                                    "content": "cw：更改光标所在处的字到字尾$处。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        587,
                        268,
                        600
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                586,
                                269,
                                602
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        586,
                                        269,
                                        602
                                    ],
                                    "type": "text",
                                    "content": "c#w：例如，c3w 代表更改 3 个字。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        602,
                        202,
                        615
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                602,
                                203,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        602,
                                        203,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "(7)切换到编辑模式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        618,
                        399,
                        740
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 44,
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                618,
                                286,
                                631
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        618,
                                        286,
                                        631
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                618,
                                                286,
                                                631
                                            ],
                                            "type": "text",
                                            "content": "i ：进入插入模式，在当前光标前插入",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                634,
                                276,
                                646
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 37,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        634,
                                        277,
                                        647
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                634,
                                                277,
                                                647
                                            ],
                                            "type": "text",
                                            "content": "I ：进入插入模式，在当前行首插入",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                650,
                                283,
                                661
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 38,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        650,
                                        284,
                                        662
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                650,
                                                284,
                                                662
                                            ],
                                            "type": "text",
                                            "content": "a：进入插入模式，在当前光标后插入",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                666,
                                280,
                                677
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 39,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        666,
                                        280,
                                        677
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                666,
                                                280,
                                                677
                                            ],
                                            "type": "text",
                                            "content": "A ：进入插入模式，在当前行尾插入",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                681,
                                305,
                                693
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 40,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        681,
                                        306,
                                        694
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                681,
                                                306,
                                                694
                                            ],
                                            "type": "text",
                                            "content": "o：进入插入模式，在当前行之下新开一行",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                696,
                                306,
                                708
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 41,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        697,
                                        307,
                                        709
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                697,
                                                307,
                                                709
                                            ],
                                            "type": "text",
                                            "content": "O：进入插入模式，在当前行之上新开一行",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                712,
                                261,
                                724
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 42,
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        712,
                                        262,
                                        724
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                712,
                                                262,
                                                724
                                            ],
                                            "type": "text",
                                            "content": "r：进入替换模式，替换当前字符",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                727,
                                399,
                                740
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 43,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        727,
                                        401,
                                        741
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                727,
                                                401,
                                                741
                                            ],
                                            "type": "text",
                                            "content": "R：进入替换模式，替换当前字符及其后的字符，直至按 ESC键",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        751,
                        235,
                        763
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 45,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                751,
                                235,
                                765
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        751,
                                        235,
                                        765
                                    ],
                                    "type": "text",
                                    "content": "5. 命令模式下的常用命令",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 50
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        107,
                        72,
                        490,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                73,
                                490,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        73,
                                        490,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "在一般模式下，按“:”便可切换到命令模式，然后可以使用下述命令模式下的命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        88,
                        441,
                        101
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                88,
                                443,
                                103
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        88,
                                        443,
                                        103
                                    ],
                                    "type": "text",
                                    "content": "q 命令：在没有任何修改操作发生的情况下，该命令可以退出 vi 编辑器。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        104,
                        305,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                104,
                                307,
                                117
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        104,
                                        307,
                                        117
                                    ],
                                    "type": "text",
                                    "content": "q!命令：不保存文件，强制退出 vi编辑器。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        119,
                        199,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                119,
                                201,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        119,
                                        201,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "w命令：保存文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        135,
                        298,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                135,
                                298,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        135,
                                        298,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "wq命令：保存文件，然后退出vi编辑器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        151,
                        357,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                150,
                                358,
                                164
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        150,
                                        358,
                                        164
                                    ],
                                    "type": "text",
                                    "content": "w[文件名] 命令：将编辑后的文件另存到指定文件中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        165,
                        489,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                166,
                                490,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        166,
                                        490,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "r[文件名] 命令：将指定文件的内容读入，并添加到当前文件光标所在的位置后面。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        190,
                        259,
                        202
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                189,
                                260,
                                204
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        189,
                                        260,
                                        204
                                    ],
                                    "type": "text",
                                    "content": "4.2.4 Linux 环境下 C 编程",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        221,
                        186,
                        233
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                220,
                                188,
                                235
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        220,
                                        188,
                                        235
                                    ],
                                    "type": "text",
                                    "content": "1. GCC 编译器",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        244,
                        176,
                        258
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                243,
                                176,
                                260
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        243,
                                        176,
                                        260
                                    ],
                                    "type": "text",
                                    "content": "（1）gcc 概述",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        259,
                        505,
                        288
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                259,
                                506,
                                273
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        259,
                                        506,
                                        273
                                    ],
                                    "type": "text",
                                    "content": "GCC 是 linux 下最常用的编译器，也能运行在 unix、solaris、windows 等下，支持多种语",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                275,
                                327,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        169,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "言的编译，如C、",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        169,
                                        276,
                                        188,
                                        287
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\mathsf { C } } { + } { + }",
                                    "score": 0.86
                                },
                                {
                                    "bbox": [
                                        189,
                                        275,
                                        327,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "、Object C 等语言编写的程序。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        290,
                        508,
                        350
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                291,
                                511,
                                303
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        291,
                                        264,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "gcc对文件的处理需要经过预处理",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        264,
                                        292,
                                        272,
                                        302
                                    ],
                                    "type": "inline_equation",
                                    "content": "- >",
                                    "score": 0.6
                                },
                                {
                                    "bbox": [
                                        273,
                                        291,
                                        294,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "编译-",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        294,
                                        292,
                                        302,
                                        302
                                    ],
                                    "type": "inline_equation",
                                    "content": "- >",
                                    "score": 0.56
                                },
                                {
                                    "bbox": [
                                        302,
                                        291,
                                        321,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "汇编",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        322,
                                        292,
                                        331,
                                        302
                                    ],
                                    "type": "inline_equation",
                                    "content": "^ { - > }",
                                    "score": 0.53
                                },
                                {
                                    "bbox": [
                                        332,
                                        291,
                                        511,
                                        303
                                    ],
                                    "type": "text",
                                    "content": "链接的步骤，从而产生一个可执行文件。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                307,
                                504,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        307,
                                        504,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "预处理阶段主要是在库中寻找头文件，包含到待编译的文件中；编译阶段检查程序的语法；",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                323,
                                504,
                                334
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        323,
                                        504,
                                        334
                                    ],
                                    "type": "text",
                                    "content": "汇编阶段将源代码翻译成机器语言；链接阶段将所有的目标代码连接成一个可执行程序。各",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                338,
                                262,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        338,
                                        262,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "阶段对应不同的文件类型，具体如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        354,
                        223,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                352,
                                223,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        352,
                                        135,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "file.c",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        160,
                                        353,
                                        223,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "c 程序源文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        369,
                        257,
                        381
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                368,
                                257,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        368,
                                        132,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "file.i",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        164,
                                        369,
                                        257,
                                        382
                                    ],
                                    "type": "text",
                                    "content": "c程序预处理后文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        384,
                        383,
                        397
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                384,
                                384,
                                399
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        384,
                                        154,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "file.cxx",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        155,
                                        386,
                                        170,
                                        396
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\mathsf { C } } { \\mathsf { + + } }",
                                    "score": 0.87
                                },
                                {
                                    "bbox": [
                                        171,
                                        384,
                                        384,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "程序源文件，也可以是 file.cc / file.cpp / file.c++",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        400,
                        262,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                400,
                                262,
                                414
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        400,
                                        134,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "file.ii",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        161,
                                        401,
                                        178,
                                        412
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\mathsf { C } } { \\mathsf { + + } }",
                                    "score": 0.88
                                },
                                {
                                    "bbox": [
                                        178,
                                        401,
                                        262,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "程序预处理后文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        416,
                        218,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                414,
                                219,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        414,
                                        135,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "file.h",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        162,
                                        417,
                                        187,
                                        428
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\mathsf { c } } / { \\mathsf { c } } { + } { + }",
                                    "score": 0.87
                                },
                                {
                                    "bbox": [
                                        188,
                                        415,
                                        219,
                                        429
                                    ],
                                    "type": "text",
                                    "content": "头文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        431,
                        225,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                430,
                                226,
                                446
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        430,
                                        133,
                                        446
                                    ],
                                    "type": "text",
                                    "content": "file.s",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        160,
                                        431,
                                        226,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "汇编程序文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        447,
                        227,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                446,
                                227,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        446,
                                        135,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "file.o",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        163,
                                        446,
                                        227,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "目标代码文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        462,
                        204,
                        475
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                461,
                                205,
                                477
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        461,
                                        205,
                                        477
                                    ],
                                    "type": "text",
                                    "content": "（2）GCC 使用格式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        478,
                        218,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                477,
                                220,
                                493
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        477,
                                        220,
                                        493
                                    ],
                                    "type": "text",
                                    "content": "gcc [参数选项] [文件名]",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        493,
                        262,
                        506
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                494,
                                263,
                                506
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        494,
                                        263,
                                        506
                                    ],
                                    "type": "text",
                                    "content": "其中文件名是要编译的文件名称。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        509,
                        277,
                        522
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                508,
                                279,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        508,
                                        279,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "（3）GCC遵循的部分后缀越大规则：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        524,
                        505,
                        552
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                524,
                                506,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        524,
                                        506,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "当调用gcc时，gcc根据待编译文件的扩展名（后缀）自动识别文件的类别，并调用对应",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                110,
                                540,
                                342,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        540,
                                        342,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "的编译器。Gcc遵循的部分后缀约定规则如表所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        106,
                        554,
                        487,
                        733
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                106,
                                554,
                                487,
                                733
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        106,
                                        554,
                                        487,
                                        733
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                106,
                                                554,
                                                487,
                                                733
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>后缀</td><td>约定规则</td></tr><tr><td>.c</td><td>C语言源代码文件</td></tr><tr><td>.a</td><td>由目标文件构成的档案库文件</td></tr><tr><td>.C .cc .cxx</td><td>C++源代码文件</td></tr><tr><td>.h</td><td>程序包含的头文件</td></tr><tr><td>.i</td><td>已经预处理过的C源代码文件</td></tr><tr><td>.ii</td><td>已经预处理过的C++源代码文件</td></tr><tr><td>.m</td><td>Objective-C源代码文件</td></tr><tr><td>.o</td><td>编译后的目标文件</td></tr><tr><td>.s</td><td>汇编语言源代码文件</td></tr><tr><td>.S</td><td>经过预编译的汇编语言源代码文件</td></tr></table>",
                                            "image_path": "4d7da42029b734d47a6d2ae6b049a39e16785ea00b3a621db5bacb8c39747492.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 25,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 25
                },
                {
                    "bbox": [
                        113,
                        749,
                        214,
                        761
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                747,
                                215,
                                763
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        747,
                                        215,
                                        763
                                    ],
                                    "type": "text",
                                    "content": "（4）GCC的参数说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 51
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        107,
                        73,
                        271,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                73,
                                272,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        73,
                                        272,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "GCC 参数很多，最常用的参数如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        128,
                        88,
                        505,
                        195
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 7,
                    "blocks": [
                        {
                            "bbox": [
                                128,
                                88,
                                505,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        129,
                                        89,
                                        506,
                                        102
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                129,
                                                89,
                                                506,
                                                102
                                            ],
                                            "type": "text",
                                            "content": "-c 仅编译或汇编，生成目标代码文件，将.c、.i、.s 等文件生成.o 文件，其余文",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        130,
                                        103,
                                        174,
                                        116
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                103,
                                                174,
                                                116
                                            ],
                                            "type": "text",
                                            "content": "件被忽略",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                128,
                                119,
                                500,
                                132
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        119,
                                        500,
                                        132
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                121,
                                                149,
                                                132
                                            ],
                                            "type": "text",
                                            "content": "-S",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                153,
                                                119,
                                                500,
                                                132
                                            ],
                                            "type": "text",
                                            "content": "仅编译，不进行汇编和链接，将.c、.i等文件生成.s文件，其余文件被忽略",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                135,
                                464,
                                148
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        131,
                                        136,
                                        463,
                                        148
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                137,
                                                142,
                                                148
                                            ],
                                            "type": "text",
                                            "content": "-E",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                159,
                                                136,
                                                463,
                                                148
                                            ],
                                            "type": "text",
                                            "content": "仅预处理，并发送预处理后的.i文件到标准输出，其余文件被忽略",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                151,
                                431,
                                163
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        129,
                                        150,
                                        432,
                                        166
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                129,
                                                150,
                                                159,
                                                166
                                            ],
                                            "type": "text",
                                            "content": "-o file",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                176,
                                                150,
                                                432,
                                                164
                                            ],
                                            "type": "text",
                                            "content": "创建可执行文件并保存在 file 中，而不是默认文件 a.out",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                165,
                                502,
                                195
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        129,
                                        166,
                                        503,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                129,
                                                169,
                                                143,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "-g",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                158,
                                                166,
                                                503,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "产生用于调试和排错的扩展符号表，用于GDB 调试，切记-g和-O通常不能",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        130,
                                        180,
                                        176,
                                        196
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                180,
                                                176,
                                                196
                                            ],
                                            "type": "text",
                                            "content": "一起使用",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        129,
                        197,
                        509,
                        382
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 15,
                    "blocks": [
                        {
                            "bbox": [
                                135,
                                197,
                                270,
                                210
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        136,
                                        197,
                                        270,
                                        211
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                136,
                                                200,
                                                151,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "-w",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                205,
                                                197,
                                                270,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "取消所有警告",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                135,
                                213,
                                293,
                                226
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        136,
                                        212,
                                        293,
                                        227
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                136,
                                                213,
                                                154,
                                                227
                                            ],
                                            "type": "text",
                                            "content": "-W",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                207,
                                                212,
                                                293,
                                                227
                                            ],
                                            "type": "text",
                                            "content": "给出更详细的警告",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                135,
                                228,
                                464,
                                242
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        135,
                                        227,
                                        465,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                135,
                                                227,
                                                180,
                                                246
                                            ],
                                            "type": "text",
                                            "content": "-O [num]",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                201,
                                                227,
                                                465,
                                                243
                                            ],
                                            "type": "text",
                                            "content": "优化，可以指定 0-3 作为优化级别，级别 0 表示没有优化",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                244,
                                504,
                                273
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        137,
                                        244,
                                        506,
                                        258
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                137,
                                                244,
                                                506,
                                                258
                                            ],
                                            "type": "text",
                                            "content": "-x language 默认为-x none，即依靠后缀名确定文件类型，加上-x lan 确定后面所",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        130,
                                        260,
                                        300,
                                        273
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                260,
                                                300,
                                                273
                                            ],
                                            "type": "text",
                                            "content": "有文件类型，直到下一个-x出现为止",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                275,
                                504,
                                304
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        135,
                                        275,
                                        504,
                                        289
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                135,
                                                275,
                                                161,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "-I dir",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                193,
                                                275,
                                                504,
                                                288
                                            ],
                                            "type": "text",
                                            "content": "将 dir 目录加到搜寻头文件的目录中去，并优先于gcc中缺省的搜索",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        131,
                                        291,
                                        330,
                                        304
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                291,
                                                330,
                                                304
                                            ],
                                            "type": "text",
                                            "content": "目录，有多个-I选项时，按照出现顺序搜索",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                306,
                                504,
                                335
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        135,
                                        307,
                                        504,
                                        321
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                135,
                                                307,
                                                163,
                                                321
                                            ],
                                            "type": "text",
                                            "content": "-L dir",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                195,
                                                307,
                                                504,
                                                320
                                            ],
                                            "type": "text",
                                            "content": "将 dir 目录加到搜索-lname 选项指定的函数库文件的目录列表中去，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        130,
                                        322,
                                        445,
                                        335
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                322,
                                                445,
                                                335
                                            ],
                                            "type": "text",
                                            "content": "并优先于gcc缺省的搜索目录，有多个-L 选项时，按照出现顺序搜索",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                338,
                                509,
                                382
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        137,
                                        337,
                                        511,
                                        351
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                137,
                                                338,
                                                170,
                                                351
                                            ],
                                            "type": "text",
                                            "content": "-lname",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                204,
                                                337,
                                                511,
                                                350
                                            ],
                                            "type": "text",
                                            "content": "在链接时使用函数库libname.a，链接程序在-Ldir 指定的目录和/lib、",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        129,
                                        354,
                                        489,
                                        366
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                129,
                                                354,
                                                489,
                                                366
                                            ],
                                            "type": "text",
                                            "content": "/usr/lib目录下寻找该库文件，在没有使用-static选项时，如果发现共享函数库",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        129,
                                        370,
                                        337,
                                        381
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                129,
                                                370,
                                                337,
                                                381
                                            ],
                                            "type": "text",
                                            "content": "libname.so，则使用 libname.so 进行动态链接",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        135,
                        384,
                        431,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                384,
                                432,
                                400
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        384,
                                        161,
                                        400
                                    ],
                                    "type": "text",
                                    "content": "-fPIC",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        199,
                                        384,
                                        432,
                                        397
                                    ],
                                    "type": "text",
                                    "content": "产生位置无关的目标代码，可用于构造共享函数库",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        135,
                        401,
                        302,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                400,
                                301,
                                415
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        400,
                                        167,
                                        415
                                    ],
                                    "type": "text",
                                    "content": "-static",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        195,
                                        400,
                                        301,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "禁止与共享函数库链接",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        135,
                        416,
                        344,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                415,
                                345,
                                430
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        415,
                                        173,
                                        430
                                    ],
                                    "type": "text",
                                    "content": "-shared",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        202,
                                        416,
                                        345,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "尽量与共享函数库链接（默认）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        446,
                        188,
                        459
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                447,
                                189,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        447,
                                        189,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "（5）简单范例1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        117,
                        462,
                        424,
                        490
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 22,
                    "blocks": [
                        {
                            "bbox": [
                                117,
                                462,
                                424,
                                475
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        119,
                                        461,
                                        426,
                                        477
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                119,
                                                461,
                                                426,
                                                477
                                            ],
                                            "type": "text",
                                            "content": "1）按“vi 编辑器”的简单范例 1，先通过 vi 编辑器编辑好文件 ccc.c。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                118,
                                478,
                                379,
                                490
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        120,
                                        478,
                                        379,
                                        491
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                120,
                                                478,
                                                379,
                                                491
                                            ],
                                            "type": "text",
                                            "content": "2）使用Linux命令行界面，在命令提示符后，输入命令：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        120,
                        496,
                        169,
                        505
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                495,
                                170,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        495,
                                        170,
                                        507
                                    ],
                                    "type": "text",
                                    "content": "gcc ccc.c",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        125,
                        509,
                        498,
                        521
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                127,
                                508,
                                500,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        127,
                                        508,
                                        500,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "功能：对源程序 ccc.c进行编译链接，产生对应的可执行文件，文件名缺省为：a.out。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        524,
                        381,
                        537
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                123,
                                525,
                                381,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        123,
                                        525,
                                        381,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "也可以通过选项-o在编译命令中指定可执行文件名，如：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        543,
                        196,
                        553
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                542,
                                196,
                                555
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        542,
                                        196,
                                        555
                                    ],
                                    "type": "text",
                                    "content": "gcc -o ccc ccc.c",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        555,
                        320,
                        568
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                555,
                                320,
                                570
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        555,
                                        320,
                                        570
                                    ],
                                    "type": "text",
                                    "content": "将产生可执行文件 ccc，而不是默认的 a.out。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        571,
                        505,
                        599
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                570,
                                506,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        570,
                                        506,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "3）在命令提示符后，输入命令：./a.out 或 ./ccc 运行当前目录下可执行文件 a.out",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                93,
                                586,
                                138,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        586,
                                        138,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "（或ccc）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        109,
                        602,
                        262,
                        615
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                112,
                                603,
                                263,
                                615
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        112,
                                        603,
                                        263,
                                        615
                                    ],
                                    "type": "text",
                                    "content": "上述范例的运行结果如下图所示。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "image",
                    "bbox": [
                        88,
                        621,
                        517,
                        742
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                88,
                                621,
                                517,
                                742
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        621,
                                        517,
                                        742
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                621,
                                                517,
                                                742
                                            ],
                                            "type": "image",
                                            "image_path": "8ed87e5f78e622d01fd77b4113f203bbd7af2478750a827f77d71e61f9b2c529.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 30,
                            "angle": 0,
                            "type": "image_body"
                        }
                    ],
                    "index": 30
                },
                {
                    "bbox": [
                        88,
                        743,
                        189,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                744,
                                190,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        744,
                                        190,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "证你的理解是否正确。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 52
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        505,
                        116
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                74,
                                505,
                                84
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        74,
                                        505,
                                        84
                                    ],
                                    "type": "text",
                                    "content": "3）思考上述程序中文件打开操作和读文件操作到底是谁具体完成的，并用 man查阅",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                89,
                                502,
                                101
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        89,
                                        502,
                                        101
                                    ],
                                    "type": "text",
                                    "content": "open，read，printf，了解它们的具体功能、函数参数和返回值等信息，并注意它们属于系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                104,
                                338,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        104,
                                        338,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "统调用，还是库函数，以加速对系统调用概念的理解。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        120,
                        189,
                        132
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                119,
                                189,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        119,
                                        189,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "（7）简单范例 3",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        135,
                        189,
                        148
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                135,
                                190,
                                148
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        135,
                                        190,
                                        148
                                    ],
                                    "type": "text",
                                    "content": "编译多个源文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        151,
                        379,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                148,
                                381,
                                167
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        148,
                                        381,
                                        167
                                    ],
                                    "type": "text",
                                    "content": "1） 使用 vi/vim 编辑器编写两个文件：message.c，main.c：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        144,
                        167,
                        217,
                        194
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                144,
                                167,
                                217,
                                194
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        144,
                                        167,
                                        217,
                                        194
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                144,
                                                167,
                                                217,
                                                194
                                            ],
                                            "type": "text",
                                            "content": "vi message.c  \nvi main.c"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        113,
                        197,
                        196,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                197,
                                198,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        197,
                                        198,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "2）使用 gcc 编译：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        113,
                        212,
                        504,
                        242
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                212,
                                504,
                                242
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        113,
                                        212,
                                        504,
                                        242
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                113,
                                                212,
                                                504,
                                                242
                                            ],
                                            "type": "text",
                                            "content": "gcc -c message.c //输出message.o文件，是一个已编译的目标代码文件gcc -c main.c //输出main.o文件"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        113,
                        244,
                        505,
                        258
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                243,
                                506,
                                259
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        245,
                                        263,
                                        259
                                    ],
                                    "type": "text",
                                    "content": "gcc -o all main.o message.o",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        272,
                                        243,
                                        506,
                                        258
                                    ],
                                    "type": "text",
                                    "content": "//执行连接阶段的工作，然后生成可执行文件 all",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        260,
                        210,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                260,
                                211,
                                273
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        260,
                                        211,
                                        273
                                    ],
                                    "type": "text",
                                    "content": "3）执行可执行文件：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        130,
                        276,
                        153,
                        288
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                130,
                                276,
                                153,
                                288
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        276,
                                        153,
                                        288
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                276,
                                                153,
                                                288
                                            ],
                                            "type": "text",
                                            "content": "./all"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        86,
                        290,
                        504,
                        319
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                290,
                                505,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        290,
                                        505,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "注意：：gcc 对如何将多个源文件编译成一个可执行文件有内置的规则，所以前面的多",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                307,
                                241,
                                319
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        307,
                                        241,
                                        319
                                    ],
                                    "type": "text",
                                    "content": "个单独步骤可以简化为一个命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        102,
                        322,
                        253,
                        336
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                102,
                                322,
                                253,
                                336
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        102,
                                        322,
                                        253,
                                        336
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                102,
                                                322,
                                                253,
                                                336
                                            ],
                                            "type": "text",
                                            "content": "gcc -o all message.c main.c"
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "batch"
                },
                {
                    "bbox": [
                        107,
                        346,
                        193,
                        359
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                345,
                                194,
                                360
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        345,
                                        194,
                                        360
                                    ],
                                    "type": "text",
                                    "content": "2. gdb 调试工具",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        369,
                        504,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                369,
                                506,
                                382
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        369,
                                        314,
                                        382
                                    ],
                                    "type": "text",
                                    "content": "gdb 是一个 GNU 调试工具，可以调试 C 和",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        315,
                                        369,
                                        340,
                                        381
                                    ],
                                    "type": "inline_equation",
                                    "content": "{ \\mathsf { C } } { \\mathsf { + + } }",
                                    "score": 0.87
                                },
                                {
                                    "bbox": [
                                        341,
                                        369,
                                        506,
                                        382
                                    ],
                                    "type": "text",
                                    "content": "程序，其主要功能有：1）监视程序",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                384,
                                308,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        384,
                                        308,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "中变量的值；2）设置断点；3）单步执行程序。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        400,
                        504,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                401,
                                505,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        401,
                                        505,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "为了能够使用gdb 调试程序，必须在编译时包含调试信息，即使用gcc编译时需要加",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                416,
                                290,
                                429
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        416,
                                        290,
                                        429
                                    ],
                                    "type": "text",
                                    "content": "上“-g”选修，如 gcc –g –o test test.c。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        431,
                        326,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                431,
                                327,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        431,
                                        327,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "gdb 命令很多，下面列出一些常用的调试命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        447,
                        213,
                        460
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                445,
                                215,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        445,
                                        215,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "（1）gdb 启动及退出：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        462,
                        277,
                        476
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                120,
                                461,
                                278,
                                477
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        120,
                                        461,
                                        278,
                                        477
                                    ],
                                    "type": "text",
                                    "content": "1）启动gdb命令：gdb exefilename",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        477,
                        504,
                        506
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                476,
                                506,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        476,
                                        506,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "其中 exefilename 是可执行文件名，如果没有指定运行程序，也可进入 gdb 后再用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                493,
                                177,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        493,
                                        177,
                                        507
                                    ],
                                    "type": "text",
                                    "content": "file命令装入文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        509,
                        492,
                        522
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                508,
                                494,
                                523
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        508,
                                        494,
                                        523
                                    ],
                                    "type": "text",
                                    "content": "gdb 启动成功后，提示符为：（gdb），随后可以输入gdb 命令对程序进行调试。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        116,
                        525,
                        259,
                        538
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                117,
                                523,
                                260,
                                540
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        117,
                                        523,
                                        260,
                                        540
                                    ],
                                    "type": "text",
                                    "content": "2）退出 gdb 命令：(gdb)quit",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        540,
                        205,
                        553
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                539,
                                205,
                                554
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        539,
                                        205,
                                        554
                                    ],
                                    "type": "text",
                                    "content": "（2）断点管理命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        555,
                        181,
                        568
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                555,
                                182,
                                569
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        555,
                                        182,
                                        569
                                    ],
                                    "type": "text",
                                    "content": "1）设置断点：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        571,
                        504,
                        599
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                127,
                                571,
                                505,
                                584
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        127,
                                        571,
                                        505,
                                        584
                                    ],
                                    "type": "text",
                                    "content": "break命令（可简写为b）可以用来在调试的程序中设置断点，该命令有如下四种",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                103,
                                585,
                                135,
                                602
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        103,
                                        585,
                                        135,
                                        602
                                    ],
                                    "type": "text",
                                    "content": "形式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        602,
                        381,
                        615
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                104,
                                602,
                                382,
                                617
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        104,
                                        602,
                                        382,
                                        617
                                    ],
                                    "type": "text",
                                    "content": "(gdb)break line-number 使程序在执行给定行之前停止。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        618,
                        414,
                        631
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                618,
                                416,
                                633
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        618,
                                        416,
                                        633
                                    ],
                                    "type": "text",
                                    "content": "(gdb)break function-name 使程序在进入指定的函数之前停止。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        634,
                        504,
                        661
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                633,
                                506,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        633,
                                        506,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "(gdb)break line-or-function if condition 如果 condition（条件）是真，程序到达",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                105,
                                649,
                                207,
                                662
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        649,
                                        207,
                                        662
                                    ],
                                    "type": "text",
                                    "content": "指定行或函数时停止。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        665,
                        387,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                664,
                                388,
                                679
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        664,
                                        388,
                                        679
                                    ],
                                    "type": "text",
                                    "content": "(gdb) break routine-name 在指定例程的入口处设置断点",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        681,
                        504,
                        708
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                682,
                                505,
                                692
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        682,
                                        505,
                                        692
                                    ],
                                    "type": "text",
                                    "content": "如果该程序是由很多原文件构成的，你可以在各个原文件中设置断点，而不是在当前的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                697,
                                258,
                                708
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        697,
                                        258,
                                        708
                                    ],
                                    "type": "text",
                                    "content": "原文件中设置断点，其方法如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        713,
                        287,
                        725
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                711,
                                290,
                                728
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        711,
                                        290,
                                        728
                                    ],
                                    "type": "text",
                                    "content": "(gdb) break filename:line-number",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        104,
                        728,
                        299,
                        740
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                105,
                                726,
                                302,
                                744
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        105,
                                        726,
                                        302,
                                        744
                                    ],
                                    "type": "text",
                                    "content": "(gdb) break filename:function-name",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 53
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        72,
                        223,
                        85
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                74,
                                223,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        74,
                                        223,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "2）从断点处继续执行：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        89,
                        198,
                        102
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                88,
                                198,
                                105
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        88,
                                        198,
                                        105
                                    ],
                                    "type": "text",
                                    "content": "(gdb) countinue",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        119,
                        261,
                        132
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                119,
                                261,
                                133
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        119,
                                        261,
                                        133
                                    ],
                                    "type": "text",
                                    "content": "3）显示当前 gdb 的断点信息：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        135,
                        202,
                        149
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                134,
                                203,
                                151
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        134,
                                        203,
                                        151
                                    ],
                                    "type": "text",
                                    "content": "(gdb) info break",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        165,
                        233,
                        179
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                166,
                                233,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        166,
                                        233,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "4）删除指定的某个断点：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        182,
                        251,
                        195
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                181,
                                252,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        181,
                                        252,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "(gdb) delete breakpoint 1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        197,
                        456,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                198,
                                458,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        198,
                                        458,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "该命令将会删除编号为 1 的断点，如果不带编号参数，将删除所有的断点：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        213,
                        241,
                        227
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                211,
                                243,
                                228
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        211,
                                        243,
                                        228
                                    ],
                                    "type": "text",
                                    "content": "(gdb) delete breakpoint",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        243,
                        218,
                        257
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                245,
                                218,
                                257
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        245,
                                        218,
                                        257
                                    ],
                                    "type": "text",
                                    "content": "5）禁止使用某个断点",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        260,
                        255,
                        274
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                259,
                                257,
                                275
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        259,
                                        257,
                                        275
                                    ],
                                    "type": "text",
                                    "content": "(gdb) disable breakpoint 1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        275,
                        210,
                        287
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                275,
                                212,
                                289
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        275,
                                        212,
                                        289
                                    ],
                                    "type": "text",
                                    "content": "该命令将禁止断点 1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        290,
                        218,
                        304
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                290,
                                218,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        290,
                                        218,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "6）允许使用某个断点",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        306,
                        253,
                        321
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                306,
                                255,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        306,
                                        255,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "(gdb) enable breakpoint 1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        322,
                        211,
                        334
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                322,
                                212,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        322,
                                        212,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "该命令将允许断点 1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        337,
                        313,
                        350
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                338,
                                313,
                                351
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        338,
                                        313,
                                        351
                                    ],
                                    "type": "text",
                                    "content": "7）清除原文件中某一代码行上的所有断点",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        354,
                        218,
                        367
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                352,
                                218,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        352,
                                        218,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "(gdb)clean number",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        369,
                        318,
                        381
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                369,
                                319,
                                383
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        369,
                                        319,
                                        383
                                    ],
                                    "type": "text",
                                    "content": "注：number 为原文件的某个代码行的行号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        400,
                        205,
                        412
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                400,
                                205,
                                414
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        400,
                                        205,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "（3）显示信息命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        416,
                        196,
                        428
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                413,
                                198,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        413,
                                        198,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "1）print 命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        431,
                        308,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                122,
                                431,
                                309,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        122,
                                        431,
                                        309,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "利用 print 命令可以检查各个变量的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        447,
                        336,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                445,
                                336,
                                464
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        445,
                                        194,
                                        464
                                    ],
                                    "type": "text",
                                    "content": "(gdb) print p",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        220,
                                        446,
                                        336,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "//(p 为变量名或表达式)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        462,
                        333,
                        476
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                122,
                                461,
                                334,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        122,
                                        461,
                                        334,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "(gdb) print 开始表达式@连续内存空间大小",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        133,
                        477,
                        477,
                        491
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                478,
                                478,
                                491
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        478,
                                        478,
                                        491
                                    ],
                                    "type": "text",
                                    "content": "打印内存中某一连续内存空间的值，主要用于打印数组类型的表达式的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        124,
                        493,
                        294,
                        507
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                493,
                                295,
                                507
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        493,
                                        295,
                                        507
                                    ],
                                    "type": "text",
                                    "content": "(gdb) print 程序中的某一函数调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        509,
                        299,
                        523
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                134,
                                507,
                                301,
                                525
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        134,
                                        507,
                                        301,
                                        525
                                    ],
                                    "type": "text",
                                    "content": "如：(gdb) print find_entry(1,0)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        539,
                        342,
                        553
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                539,
                                344,
                                555
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        539,
                                        344,
                                        555
                                    ],
                                    "type": "text",
                                    "content": "2）whatis 命令：可以显示某个变量的类型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        555,
                        289,
                        569
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                553,
                                290,
                                573
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        553,
                                        214,
                                        573
                                    ],
                                    "type": "text",
                                    "content": "(gdb) whatis p",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        225,
                                        555,
                                        290,
                                        571
                                    ],
                                    "type": "text",
                                    "content": "//(p 为变量)",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        571,
                        195,
                        585
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                571,
                                198,
                                585
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        571,
                                        157,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "type",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        157,
                                        573,
                                        168,
                                        583
                                    ],
                                    "type": "inline_equation",
                                    "content": "=",
                                    "score": 0.78
                                },
                                {
                                    "bbox": [
                                        169,
                                        571,
                                        198,
                                        585
                                    ],
                                    "type": "text",
                                    "content": "int *",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        602,
                        323,
                        616
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                601,
                                323,
                                618
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        601,
                                        323,
                                        618
                                    ],
                                    "type": "text",
                                    "content": "3）display 命令：设置要显示的表达式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        618,
                        464,
                        632
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                618,
                                465,
                                634
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        618,
                                        236,
                                        634
                                    ],
                                    "type": "text",
                                    "content": "(gdb)display 表达式",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        259,
                                        618,
                                        465,
                                        633
                                    ],
                                    "type": "text",
                                    "content": "//当程序运行到断点时，显示该表达式的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        634,
                        362,
                        647
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                633,
                                364,
                                648
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        633,
                                        364,
                                        648
                                    ],
                                    "type": "text",
                                    "content": "(gdb)info display：显示所有要显示表达式的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        649,
                        357,
                        663
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                648,
                                358,
                                664
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        648,
                                        358,
                                        664
                                    ],
                                    "type": "text",
                                    "content": "(gdb)undisplay 表达式：结束已设置的表达式。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        665,
                        317,
                        678
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                665,
                                317,
                                679
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        665,
                                        317,
                                        679
                                    ],
                                    "type": "text",
                                    "content": "4）awatch 命令：设置要监视的表达式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        680,
                        226,
                        694
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                119,
                                679,
                                226,
                                696
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        119,
                                        679,
                                        226,
                                        696
                                    ],
                                    "type": "text",
                                    "content": "(gdb)awatch 表达式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        119,
                        696,
                        399,
                        709
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                697,
                                399,
                                709
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        697,
                                        399,
                                        709
                                    ],
                                    "type": "text",
                                    "content": "当表达式的值变化或被读取时，程序暂停，显示表达式的值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        727,
                        226,
                        740
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 36,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                727,
                                226,
                                741
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        727,
                                        226,
                                        741
                                    ],
                                    "type": "text",
                                    "content": "（4）程序运行控制命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        121,
                        743,
                        211,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 37,
                    "lines": [
                        {
                            "bbox": [
                                121,
                                742,
                                213,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        121,
                                        742,
                                        213,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "1）run：运行程序",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 54
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        120,
                        72,
                        290,
                        132
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 5,
                    "blocks": [
                        {
                            "bbox": [
                                120,
                                72,
                                261,
                                85
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        74,
                                        261,
                                        85
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                74,
                                                261,
                                                85
                                            ],
                                            "type": "text",
                                            "content": "2）kill：结束程序的调试运行",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                120,
                                89,
                                238,
                                101
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        121,
                                        88,
                                        238,
                                        101
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                121,
                                                88,
                                                238,
                                                101
                                            ],
                                            "type": "text",
                                            "content": "3）cont：继续执行程序",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                120,
                                104,
                                290,
                                116
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        104,
                                        291,
                                        118
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                104,
                                                291,
                                                118
                                            ],
                                            "type": "text",
                                            "content": "4）next：单步运行，不进入子程序",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                121,
                                119,
                                279,
                                132
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        119,
                                        280,
                                        134
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                119,
                                                280,
                                                134
                                            ],
                                            "type": "text",
                                            "content": "5）step：单步运行，进入子程序",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        150,
                        184,
                        163
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                150,
                                185,
                                165
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        150,
                                        185,
                                        165
                                    ],
                                    "type": "text",
                                    "content": "（5）文件命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        120,
                        166,
                        254,
                        226
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                120,
                                166,
                                254,
                                194
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        122,
                                        165,
                                        255,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                122,
                                                165,
                                                255,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "1）file命令：加载调试文件",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        135,
                                        181,
                                        190,
                                        195
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                135,
                                                181,
                                                190,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "file 文件名",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                120,
                                197,
                                254,
                                226
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        198,
                                        254,
                                        211
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                198,
                                                254,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "2）list 命令：列出文件内容",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        135,
                                        211,
                                        189,
                                        227
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                135,
                                                211,
                                                189,
                                                227
                                            ],
                                            "type": "text",
                                            "content": "list [参数]",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        228,
                        162,
                        240
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                228,
                                164,
                                242
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        228,
                                        164,
                                        242
                                    ],
                                    "type": "text",
                                    "content": "参数说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        243,
                        387,
                        257
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                244,
                                387,
                                258
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        244,
                                        387,
                                        258
                                    ],
                                    "type": "text",
                                    "content": "参数为空：从上次显示的最后一行或附近开始，显示 10 行",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        259,
                        291,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                260,
                                292,
                                274
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        260,
                                        292,
                                        274
                                    ],
                                    "type": "text",
                                    "content": "<行号>：从当前文件的该行开始显示",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        275,
                        354,
                        334
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                275,
                                354,
                                288
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        275,
                                        354,
                                        289
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                275,
                                                197,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "<文件名> <行号",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                198,
                                                276,
                                                207,
                                                287
                                            ],
                                            "type": "inline_equation",
                                            "content": ">",
                                            "score": 0.7
                                        },
                                        {
                                            "bbox": [
                                                207,
                                                275,
                                                354,
                                                289
                                            ],
                                            "type": "text",
                                            "content": "：从指定文件的指定行开始显示",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                290,
                                249,
                                303
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        291,
                                        249,
                                        303
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                291,
                                                155,
                                                303
                                            ],
                                            "type": "text",
                                            "content": "<函数名",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                155,
                                                292,
                                                164,
                                                302
                                            ],
                                            "type": "inline_equation",
                                            "content": ">",
                                            "score": 0.76
                                        },
                                        {
                                            "bbox": [
                                                165,
                                                291,
                                                249,
                                                303
                                            ],
                                            "type": "text",
                                            "content": "：显示指定的函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                306,
                                323,
                                319
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        306,
                                        323,
                                        320
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                306,
                                                207,
                                                320
                                            ],
                                            "type": "text",
                                            "content": "<文件名> <函数名",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                207,
                                                308,
                                                217,
                                                318
                                            ],
                                            "type": "inline_equation",
                                            "content": ">",
                                            "score": 0.67
                                        },
                                        {
                                            "bbox": [
                                                217,
                                                306,
                                                323,
                                                320
                                            ],
                                            "type": "text",
                                            "content": "：指定文件的指定函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                322,
                                327,
                                334
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        322,
                                        327,
                                        336
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                322,
                                                146,
                                                336
                                            ],
                                            "type": "text",
                                            "content": "<行号",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                147,
                                                322,
                                                172,
                                                334
                                            ],
                                            "type": "inline_equation",
                                            "content": "1 > <",
                                            "score": 0.8
                                        },
                                        {
                                            "bbox": [
                                                172,
                                                322,
                                                193,
                                                336
                                            ],
                                            "type": "text",
                                            "content": "<行号",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                194,
                                                322,
                                                211,
                                                334
                                            ],
                                            "type": "inline_equation",
                                            "content": "^ { 2 > }",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                211,
                                                322,
                                                327,
                                                336
                                            ],
                                            "type": "text",
                                            "content": "：从行号 1 显示到行号 2",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        353,
                        205,
                        366
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                353,
                                205,
                                367
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        353,
                                        205,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "（6）堆栈相关命令：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        369,
                        358,
                        381
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                368,
                                360,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        368,
                                        360,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "1）backtrace 命令：可简写为 bt，显示栈中内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        384,
                        341,
                        396
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                382,
                                342,
                                399
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        382,
                                        165,
                                        399
                                    ],
                                    "type": "text",
                                    "content": "命令：bt:",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        189,
                                        385,
                                        342,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "显示当前函数调用栈的所有信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        400,
                        428,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                400,
                                429,
                                414
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        400,
                                        161,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "命令：bt",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        161,
                                        401,
                                        201,
                                        412
                                    ],
                                    "type": "inline_equation",
                                    "content": "< \\mathsf { n } > : \\mathsf { n }",
                                    "score": 0.68
                                },
                                {
                                    "bbox": [
                                        201,
                                        400,
                                        429,
                                        414
                                    ],
                                    "type": "text",
                                    "content": "是一个正整数，表示只打印栈顶上 n 层的栈信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        191,
                        416,
                        428,
                        428
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                192,
                                416,
                                430,
                                428
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        192,
                                        416,
                                        430,
                                        428
                                    ],
                                    "type": "text",
                                    "content": "n是一个负整数，表示只打印栈底下n 层的栈信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        431,
                        359,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                430,
                                361,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        430,
                                        361,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "2）frame命令：可简写为f，显示当前栈层的信息：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        449,
                        505,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                451,
                                505,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        451,
                                        505,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "显示的内容有：栈的层编号，当前的函数名，函数参数值，函数所在文件及行号，函数",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                468,
                                158,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        468,
                                        158,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "执行到的语句。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        483,
                        246,
                        496
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                481,
                                248,
                                498
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        481,
                                        248,
                                        498
                                    ],
                                    "type": "text",
                                    "content": "info frame（或 info f）：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        502,
                        505,
                        550
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                502,
                                505,
                                513
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        502,
                                        505,
                                        513
                                    ],
                                    "type": "text",
                                    "content": "显示出更为详细的当前栈层的信息，只不过大多数都是运行时的内内地址。比如：函数",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                519,
                                505,
                                532
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        519,
                                        505,
                                        532
                                    ],
                                    "type": "text",
                                    "content": "地址，调用函数的地址，被调用函数的地址，目前的函数是由什么样的程序语言写成的、函",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                538,
                                274,
                                550
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        538,
                                        274,
                                        550
                                    ],
                                    "type": "text",
                                    "content": "数参数地址及值、局部变量的地址等等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        572,
                        277,
                        588
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                571,
                                279,
                                590
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        571,
                                        279,
                                        590
                                    ],
                                    "type": "text",
                                    "content": "4.3 Linux 管道通信机制",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        614,
                        505,
                        663
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                615,
                                505,
                                627
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        615,
                                        505,
                                        627
                                    ],
                                    "type": "text",
                                    "content": "管道是所有UNIX 及linux都提供的一种进程间通信机制，它是进程之间的一个单向数",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                634,
                                505,
                                645
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        634,
                                        505,
                                        645
                                    ],
                                    "type": "text",
                                    "content": "据流，一个进程可向管道写入数据，另一个进程则可以从管道中读取数据，从而达到进程通",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                650,
                                139,
                                664
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        650,
                                        139,
                                        664
                                    ],
                                    "type": "text",
                                    "content": "信的目的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        673,
                        188,
                        686
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                673,
                                188,
                                686
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        673,
                                        188,
                                        686
                                    ],
                                    "type": "text",
                                    "content": "4.3.1 无名管道",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        696,
                        175,
                        709
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                696,
                                174,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        696,
                                        174,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "1. 无名管道概念",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        712,
                        353,
                        725
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                712,
                                354,
                                726
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        712,
                                        354,
                                        726
                                    ],
                                    "type": "text",
                                    "content": "无名管道通过pipe()系统调用创建，它具有如下特点：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        728,
                        505,
                        756
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 34,
                    "blocks": [
                        {
                            "bbox": [
                                92,
                                728,
                                456,
                                740
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        94,
                                        729,
                                        458,
                                        740
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                94,
                                                729,
                                                458,
                                                740
                                            ],
                                            "type": "text",
                                            "content": "（1）它只能用于具有亲缘关系的进程（如父子进程或者兄弟进程）之间的通信。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                92,
                                743,
                                505,
                                756
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 33,
                            "lines": [
                                {
                                    "bbox": [
                                        94,
                                        744,
                                        506,
                                        756
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                94,
                                                744,
                                                506,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "（2）管道是半双工的，具有固定的读端和写端。虽然 pipe()系统调用返回了两个文件描述",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 55
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        112,
                        72,
                        505,
                        101
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                72,
                                505,
                                85
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        72,
                                        505,
                                        85
                                    ],
                                    "type": "text",
                                    "content": "符，但每个进程在使用一个文件描述符之前仍需先将另一个文件描述符关闭。如果需",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                114,
                                89,
                                381,
                                101
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        89,
                                        381,
                                        101
                                    ],
                                    "type": "text",
                                    "content": "要双向的数据流，则必须通过两次 pipe()建立起两个管道。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        91,
                        104,
                        505,
                        132
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                95,
                                105,
                                505,
                                116
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        95,
                                        105,
                                        505,
                                        116
                                    ],
                                    "type": "text",
                                    "content": "（3）管道可以看成是一种特殊的文件，对管道的读写与文件的读写一样使用普通的 read、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                115,
                                121,
                                493,
                                132
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        121,
                                        493,
                                        132
                                    ],
                                    "type": "text",
                                    "content": "write等函数，但它不是普通的文件，也不属于任何文件系统，而只存在于内存中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        135,
                        175,
                        148
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                134,
                                176,
                                150
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        134,
                                        176,
                                        150
                                    ],
                                    "type": "text",
                                    "content": "2. pipe 系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        151,
                        160,
                        163
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                150,
                                159,
                                164
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        150,
                                        159,
                                        164
                                    ],
                                    "type": "text",
                                    "content": "（1）函数原型",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        123,
                        167,
                        222,
                        195
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                123,
                                167,
                                222,
                                195
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        123,
                                        167,
                                        222,
                                        195
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                123,
                                                167,
                                                222,
                                                195
                                            ],
                                            "type": "text",
                                            "content": "include <unistd.h> int pipe(int fileds[2]);"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        92,
                        197,
                        138,
                        210
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                196,
                                139,
                                211
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        196,
                                        139,
                                        211
                                    ],
                                    "type": "text",
                                    "content": "（2）参数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        216,
                        502,
                        247
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                217,
                                502,
                                229
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        217,
                                        502,
                                        229
                                    ],
                                    "type": "text",
                                    "content": "Filedes[2]参数：是一个输出参数，它返回两个文件描述符，其中filedes[0]指向管",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                235,
                                273,
                                247
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        235,
                                        273,
                                        247
                                    ],
                                    "type": "text",
                                    "content": "道的读端，filedes[1]指向管道的写端。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        249,
                        138,
                        261
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                248,
                                139,
                                263
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        248,
                                        139,
                                        263
                                    ],
                                    "type": "text",
                                    "content": "（3）功能",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        268,
                        505,
                        299
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                268,
                                506,
                                281
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        268,
                                        506,
                                        281
                                    ],
                                    "type": "text",
                                    "content": "pipe在内存缓冲区中创建一个管道，并将读写该管道的一对文件描述符保存在filedes",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                285,
                                414,
                                298
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        285,
                                        414,
                                        298
                                    ],
                                    "type": "text",
                                    "content": "所指的数组中，其中filedes[0]用于读管道，filedes[1]用于写管道。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        301,
                        149,
                        313
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                301,
                                149,
                                314
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        301,
                                        149,
                                        314
                                    ],
                                    "type": "text",
                                    "content": "（4）返回值",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        316,
                        327,
                        329
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                316,
                                327,
                                329
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        316,
                                        327,
                                        329
                                    ],
                                    "type": "text",
                                    "content": "成功返回0；失败返回-1，并在error中存入错误码。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        332,
                        160,
                        344
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                331,
                                160,
                                346
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        331,
                                        160,
                                        346
                                    ],
                                    "type": "text",
                                    "content": "（5）错误代码",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        347,
                        258,
                        359
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                348,
                                257,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        348,
                                        257,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "EMFILE：进程使用的文件描述符过多",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        363,
                        246,
                        375
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                126,
                                363,
                                245,
                                376
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        126,
                                        363,
                                        245,
                                        376
                                    ],
                                    "type": "text",
                                    "content": "ENFILE ：系统文件表已满",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        123,
                        379,
                        246,
                        391
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                124,
                                378,
                                248,
                                392
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        124,
                                        378,
                                        248,
                                        392
                                    ],
                                    "type": "text",
                                    "content": "EFAULT ：非法参数 filedes",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        394,
                        217,
                        407
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                86,
                                394,
                                217,
                                407
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        394,
                                        217,
                                        407
                                    ],
                                    "type": "text",
                                    "content": "3. 无名管道的阻塞型读写",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        412,
                        504,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                412,
                                504,
                                426
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        412,
                                        504,
                                        426
                                    ],
                                    "type": "text",
                                    "content": "管道缓冲区有4096B的长度限制，因此，采用阻塞型读写方式时，当管道已经写满时，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                432,
                                500,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        432,
                                        500,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "写进程必须等待，直到读进程取走信息为止。同样，读空的管道时，也可能会引起进程阻塞。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        449,
                        481,
                        462
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                449,
                                481,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        449,
                                        481,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "当管道大小（管道缓冲区中待读的字节数）为 p，而用户进程请求读n个字节时：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        466,
                        168,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                468,
                                168,
                                480
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        468,
                                        168,
                                        480
                                    ],
                                    "type": "text",
                                    "content": "若不存在写进程：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        481,
                        408,
                        526
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 23,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                481,
                                176,
                                494
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        481,
                                        177,
                                        497
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                481,
                                                101,
                                                494
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                104,
                                                482,
                                                122,
                                                495
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\scriptstyle { \\mathsf { p } } = 0",
                                            "score": 0.71
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                481,
                                                177,
                                                497
                                            ],
                                            "type": "text",
                                            "content": "，则返回 0；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                497,
                                397,
                                510
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        497,
                                        398,
                                        512
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                497,
                                                101,
                                                510
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                101,
                                                497,
                                                398,
                                                512
                                            ],
                                            "type": "text",
                                            "content": "0<p<n，则读得 p 个字节，返回 p，管道缓冲区中还剩 0 个字节；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                513,
                                408,
                                526
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        512,
                                        408,
                                        528
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                513,
                                                101,
                                                525
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                104,
                                                513,
                                                127,
                                                526
                                            ],
                                            "type": "inline_equation",
                                            "content": "{ \\mathsf { p } } \\geq { \\mathsf { n } }",
                                            "score": 0.57
                                        },
                                        {
                                            "bbox": [
                                                127,
                                                512,
                                                346,
                                                528
                                            ],
                                            "type": "text",
                                            "content": "，则读得 n 个字节，返回 n，管道缓冲区中还剩",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                346,
                                                513,
                                                370,
                                                526
                                            ],
                                            "type": "inline_equation",
                                            "content": "{ \\mathsf { p } } - { \\mathsf { n } }",
                                            "score": 0.69
                                        },
                                        {
                                            "bbox": [
                                                371,
                                                512,
                                                408,
                                                528
                                            ],
                                            "type": "text",
                                            "content": "个字节；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        528,
                        304,
                        541
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                528,
                                305,
                                541
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        528,
                                        305,
                                        541
                                    ],
                                    "type": "text",
                                    "content": "若存在写进程，且写进程没因写管道而阻塞时：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        544,
                        408,
                        588
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 28,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                544,
                                284,
                                556
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        544,
                                        285,
                                        557
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                544,
                                                101,
                                                556
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                104,
                                                544,
                                                122,
                                                557
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\scriptstyle { \\mathsf { p } } = 0",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                544,
                                                285,
                                                557
                                            ],
                                            "type": "text",
                                            "content": "，读进程阻塞等待数据被写入管道；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                559,
                                397,
                                572
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        559,
                                        398,
                                        574
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                560,
                                                101,
                                                572
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                101,
                                                559,
                                                398,
                                                574
                                            ],
                                            "type": "text",
                                            "content": "0<p<n，则读得 p 个字节，返回 p，管道缓冲区中还剩 0 个字节；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                575,
                                408,
                                588
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        574,
                                        408,
                                        590
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                575,
                                                101,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                104,
                                                575,
                                                127,
                                                588
                                            ],
                                            "type": "inline_equation",
                                            "content": "{ \\mathsf { p } } \\geq { \\mathsf { n } }",
                                            "score": 0.76
                                        },
                                        {
                                            "bbox": [
                                                127,
                                                574,
                                                346,
                                                590
                                            ],
                                            "type": "text",
                                            "content": "，则读得 n 个字节，返回 n，管道缓冲区中还剩",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                346,
                                                576,
                                                370,
                                                588
                                            ],
                                            "type": "inline_equation",
                                            "content": "{ \\mathsf { p } } - { \\mathsf { n } }",
                                            "score": 0.66
                                        },
                                        {
                                            "bbox": [
                                                371,
                                                574,
                                                408,
                                                590
                                            ],
                                            "type": "text",
                                            "content": "个字节；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        591,
                        293,
                        603
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                591,
                                294,
                                603
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        591,
                                        294,
                                        603
                                    ],
                                    "type": "text",
                                    "content": "若存在写进程，且写进程因写管道而阻塞时：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        606,
                        505,
                        650
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 32,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                606,
                                505,
                                634
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        606,
                                        506,
                                        619
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                606,
                                                127,
                                                619
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1} 0 < p < n",
                                            "score": 0.61
                                        },
                                        {
                                            "bbox": [
                                                127,
                                                606,
                                                506,
                                                619
                                            ],
                                            "type": "text",
                                            "content": "，则读管道，当管道缓冲区变空时，阻塞，等待数据被写入。最后，返回实际读得",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        114,
                                        620,
                                        164,
                                        634
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                620,
                                                164,
                                                634
                                            ],
                                            "type": "text",
                                            "content": "的字节数；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                637,
                                404,
                                650
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        637,
                                        405,
                                        652
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                637,
                                                122,
                                                650
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled { 2 } { \\mathsf p } \\geqslant { \\mathsf n }",
                                            "score": 0.88
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                637,
                                                340,
                                                652
                                            ],
                                            "type": "text",
                                            "content": "，则读得 n 个字节，返回 n，管道缓冲区中还剩",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                341,
                                                638,
                                                365,
                                                650
                                            ],
                                            "type": "inline_equation",
                                            "content": "{ \\mathsf { p } } - { \\mathsf { n } }",
                                            "score": 0.68
                                        },
                                        {
                                            "bbox": [
                                                365,
                                                637,
                                                405,
                                                652
                                            ],
                                            "type": "text",
                                            "content": "个字节。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        123,
                        652,
                        436,
                        666
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                126,
                                653,
                                436,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        126,
                                        653,
                                        436,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "当管道缓冲区中有 u个字节未用，而用户进程请求写入n个字节时：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        668,
                        419,
                        681
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                669,
                                420,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        669,
                                        420,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "若不存在读进程，则向写管道的进程将发SIGPIPE信号，并返回－EPIPE。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        684,
                        199,
                        697
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                684,
                                199,
                                697
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        684,
                                        199,
                                        697
                                    ],
                                    "type": "text",
                                    "content": "若存在至少一个读进程：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        699,
                        503,
                        729
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 38,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                699,
                                503,
                                713
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        698,
                                        505,
                                        714
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                699,
                                                101,
                                                712
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                104,
                                                700,
                                                160,
                                                712
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathsf { u } { < } \\mathsf { n } { \\leqslant } 4 0 9 6",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                160,
                                                698,
                                                505,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "则写进程等待，直到有 n-u 个字节被释放为止，写入 n 个字节，返回 n；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                715,
                                360,
                                729
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 37,
                            "lines": [
                                {
                                    "bbox": [
                                        88,
                                        714,
                                        361,
                                        730
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                715,
                                                101,
                                                728
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.77
                                        },
                                        {
                                            "bbox": [
                                                104,
                                                716,
                                                143,
                                                728
                                            ],
                                            "type": "inline_equation",
                                            "content": "n { > } 4 0 9 6",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                167,
                                                714,
                                                361,
                                                730
                                            ],
                                            "type": "text",
                                            "content": "则写入 n 个字节（必要时等待）并返回 n；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        92,
                        731,
                        267,
                        743
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 39,
                    "lines": [
                        {
                            "bbox": [
                                92,
                                729,
                                268,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        92,
                                        730,
                                        119,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "u≥n",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        157,
                                        729,
                                        268,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "写入n个字节，返回n。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        746,
                        154,
                        759
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 40,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                745,
                                154,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        745,
                                        154,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "4. 有名管道",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 56
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        75,
                        507,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                76,
                                504,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        76,
                                        504,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "管道应用的一个重大限制是它没有名字，因此，只能用于具有亲缘关系的进程间通信，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                95,
                                505,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        505,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "在有名管道（named pipe或FIFO）提出后，该限制得到了克服。FIFO不同于管道之处在于",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                113,
                                497,
                                124
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        113,
                                        497,
                                        124
                                    ],
                                    "type": "text",
                                    "content": "它提供一个路径名与之关联，以 FIFO的文件形式存在于文件系统中。这样，即使与 FIFO",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                130,
                                505,
                                143
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        130,
                                        505,
                                        143
                                    ],
                                    "type": "text",
                                    "content": "的创建进程不存在亲缘关系的进程，只要可以访问该路径，就能够彼此通过FIFO相互通信",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                94,
                                148,
                                506,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        148,
                                        506,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "（能够访问该路径的进程以及 FIFO的创建进程之间），因此，通过 FIFO不相关的进程也能",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                166,
                                506,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        166,
                                        506,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "交换数据。值得注意的是，FIFO严格遵循先进先出（first in first out），对管道及 FIFO",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                185,
                                505,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        185,
                                        505,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "的读总是从开始处返回数据，对它们的写则把数据添加到末尾。它们不支持诸如 lseek()等",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                201,
                                158,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        201,
                                        158,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "文件定位操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        216,
                        233,
                        229
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                216,
                                233,
                                230
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        216,
                                        233,
                                        230
                                    ],
                                    "type": "text",
                                    "content": "有名管道通过mkfifo 创建：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        232,
                        322,
                        277
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                232,
                                322,
                                277
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        232,
                                        322,
                                        277
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                232,
                                                322,
                                                277
                                            ],
                                            "type": "text",
                                            "content": "include <sys/types.h>   \n#include <sys/stat.h>   \nint mkfifo(const char \\*pathname,mode_t mode)"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "cpp"
                },
                {
                    "bbox": [
                        86,
                        282,
                        504,
                        366
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                283,
                                505,
                                295
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        283,
                                        505,
                                        295
                                    ],
                                    "type": "text",
                                    "content": "该函数的第一个参数是一个普通的路径名，也就是创建后 FIFO的名字。第二个参数与",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                301,
                                495,
                                312
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        301,
                                        495,
                                        312
                                    ],
                                    "type": "text",
                                    "content": "打开普通文件的open()函数中的mode 参数相同。 有名管道创建成功，mkfifo()返回 0；",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                319,
                                494,
                                330
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        319,
                                        494,
                                        330
                                    ],
                                    "type": "text",
                                    "content": "否则返回-1。如果mkfifo的第一个参数是一个已经存在的路径名时，错误代码中会返回",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                337,
                                499,
                                349
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        337,
                                        499,
                                        349
                                    ],
                                    "type": "text",
                                    "content": "EEXIST错误，所以一般典型的调用代码首先会检查是否返回该错误，如果确实返回该错误，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                354,
                                278,
                                367
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        354,
                                        278,
                                        367
                                    ],
                                    "type": "text",
                                    "content": "那么只要调用打开FIFO的函数就可以了。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        372,
                        504,
                        402
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                371,
                                505,
                                385
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        371,
                                        505,
                                        385
                                    ],
                                    "type": "text",
                                    "content": "与普通文件类似，有名管道在使用之前必须先进行open操作，具体类似于文件的打开",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                389,
                                117,
                                405
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        389,
                                        117,
                                        405
                                    ],
                                    "type": "text",
                                    "content": "方式：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        405,
                        289,
                        465
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                405,
                                289,
                                465
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        405,
                                        289,
                                        465
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                405,
                                                289,
                                                465
                                            ],
                                            "type": "text",
                                            "content": "include <sys/types.h>   \n#include <sys/stat.h>   \n#include <fcntl.h>   \nint open(const char \\*pathname,int flags);"
                                        }
                                    ]
                                }
                            ],
                            "index": 6,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 6,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        470,
                        505,
                        591
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                471,
                                506,
                                483
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        471,
                                        506,
                                        483
                                    ],
                                    "type": "text",
                                    "content": "对有名管道的open操作必须遵循下列规则：（1）如果当前打开操作是为读而打开 FIFO",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                489,
                                502,
                                501
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        489,
                                        502,
                                        501
                                    ],
                                    "type": "text",
                                    "content": "时，若已经有相应进程为写而打开该FIFO，则当前打开操作将成功返回；否则，可能阻塞",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                507,
                                505,
                                519
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        507,
                                        505,
                                        519
                                    ],
                                    "type": "text",
                                    "content": "直到有相应进程为写而打开该 FIFO（当前打开操作设置了阻塞标志）；或者，成功返回（当",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                525,
                                505,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        525,
                                        505,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "前打开操作没有设置阻塞标志）。（2）如果当前打开操作是为写而打开FIFO时，如果已经",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                544,
                                502,
                                555
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        544,
                                        502,
                                        555
                                    ],
                                    "type": "text",
                                    "content": "有相应进程为读而打开该FIFO，则当前打开操作将成功返回；否则，可能阻塞直到有相应",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                560,
                                502,
                                573
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        560,
                                        502,
                                        573
                                    ],
                                    "type": "text",
                                    "content": "进程为读而打开该FIFO（当前打开操作设置了阻塞标志）；或者，返回ENXIO 错误（当前",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                580,
                                231,
                                591
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        580,
                                        231,
                                        591
                                    ],
                                    "type": "text",
                                    "content": "打开操作没有设置阻塞标志）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        596,
                        505,
                        627
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                597,
                                506,
                                610
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        597,
                                        506,
                                        610
                                    ],
                                    "type": "text",
                                    "content": "一旦打开操作成功，便可通过返回的文件描述符，利用 read、write系统调用对管道进",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                615,
                                368,
                                627
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        615,
                                        368,
                                        627
                                    ],
                                    "type": "text",
                                    "content": "行读写操作，读写完成应使用 close系统调用关闭有名管道。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        649,
                        305,
                        665
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                648,
                                307,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        648,
                                        307,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "4.4 Linux 消息队列通信机制",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        691,
                        505,
                        759
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                692,
                                505,
                                704
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        692,
                                        505,
                                        704
                                    ],
                                    "type": "text",
                                    "content": "Linux系统中，若干个进程可以共享一个消息队列，系统允许其中的一个或多个进程向",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                709,
                                505,
                                722
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        709,
                                        505,
                                        722
                                    ],
                                    "type": "text",
                                    "content": "消息队列写入消息，同时也允许一个或多个进程从消息队列中读取消息，从而完成进程之间",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                728,
                                505,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        728,
                                        505,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "的信息交换，这种通信机制被称作消息队列通信机制。消息队列通信机制是客户/服务器模",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                745,
                                504,
                                757
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        745,
                                        504,
                                        757
                                    ],
                                    "type": "text",
                                    "content": "型中常用的进程通信方式：客户向服务器发送请求信息，服务器读取消息并执行相应的请求。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 57
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        241,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                77,
                                242,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        77,
                                        242,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "消息可以是命令，也可以是数据。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        94,
                        166,
                        107
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                94,
                                166,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        94,
                                        166,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "1.数据结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        112,
                        241,
                        125
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                94,
                                110,
                                242,
                                127
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        110,
                                        242,
                                        127
                                    ],
                                    "type": "text",
                                    "content": "（1）消息缓冲区 struct msgbuf",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        130,
                        505,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                131,
                                506,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        131,
                                        506,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "消息缓冲区是用来存放消息内容的结构体，而且这个结构体的第一个成员必须是一个大",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                148,
                                500,
                                160
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        148,
                                        500,
                                        160
                                    ],
                                    "type": "text",
                                    "content": "于0 的长整数，表示对应消息的类型；不过，系统对结构体中其余成员的类型不做任何限制。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                166,
                                323,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        166,
                                        323,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "include/linux/msg.h 中给出的消息缓冲格式如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        184,
                        432,
                        250
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                184,
                                432,
                                250
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        184,
                                        432,
                                        250
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                184,
                                                432,
                                                250
                                            ],
                                            "type": "text",
                                            "content": "struct msgbuf{ /*消息定义的参照格式*/\n    long mtype; /*消息类型（大于0的长整数）\n    char mtext[1]; /*消息正文*/\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 5,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 5,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        86,
                        255,
                        505,
                        305
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                257,
                                505,
                                268
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        257,
                                        505,
                                        268
                                    ],
                                    "type": "text",
                                    "content": "应用程序员可以重新定义消息缓冲区结构体，其中，成员(mtext)不仅能定义为长度为",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                274,
                                505,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        274,
                                        505,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "1 的字符数组，也可以定义成长度大于 1的字符数组，或定义成其他的数据类型，Linux也",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                293,
                                334,
                                304
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        293,
                                        334,
                                        304
                                    ],
                                    "type": "text",
                                    "content": "允许消息正文的长度为 0，即结构体中没有mtext域。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        310,
                        505,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                311,
                                505,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        311,
                                        505,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "虽然，Linux没限定 mtext的类型，但却限定了消息的长度，一个消息的最大长度由宏",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                328,
                                377,
                                340
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        328,
                                        377,
                                        340
                                    ],
                                    "type": "text",
                                    "content": "MSGMAX决定，根据版本的不同，其取值可能为8192或其他值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        346,
                        214,
                        359
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                343,
                                216,
                                362
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        343,
                                        216,
                                        362
                                    ],
                                    "type": "text",
                                    "content": "（2）消息结构 struct msg",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        364,
                        505,
                        395
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                364,
                                506,
                                376
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        364,
                                        506,
                                        376
                                    ],
                                    "type": "text",
                                    "content": "消息队列中的每个消息节点中不仅包含了消息内容，还包含了一些其他信息，消息节点",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                382,
                                418,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        382,
                                        418,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "由消息结构来描述。include/linux/msg.h 中给出的消息结构格式如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        400,
                        474,
                        520
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                400,
                                474,
                                520
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        400,
                                        474,
                                        520
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                400,
                                                474,
                                                520
                                            ],
                                            "type": "text",
                                            "content": "struct msg {\n    struct msg *msg_next; /*消息队列链接指针，指向队列中的下一条消息 */\n    long msg_type; /*消息类型，同 struct msgbuf 中的 mtype*/\n    char *msgSpot; /*消息正文的地址，指向 msgbuf 的消息正文 */\n    time_t msg_stime; /*消息发送的时间 */\n    short msg-ts; /*消息正文的大小 */\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 10,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 10,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        92,
                        526,
                        281,
                        539
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                523,
                                282,
                                541
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        523,
                                        282,
                                        541
                                    ],
                                    "type": "text",
                                    "content": "（3）IPC 对象访问权限 struct ipc_perm",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        544,
                        468,
                        717
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                544,
                                468,
                                717
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        544,
                                        468,
                                        717
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                544,
                                                468,
                                                717
                                            ],
                                            "type": "text",
                                            "content": "struct ipcperm{  \nkey_t key; /* IPC对象键值*/  \nushort uid; /* owner euid and egid */  \nushort gid;  \nushort cuid; /* creator euid and egid */  \nushort cgid;  \nushort mode; /* 访问权限 */  \nushort seq; /* slot usage sequence number，即IPC对象使用频率信息*/};  \n其中："
                                        }
                                    ]
                                }
                            ],
                            "index": 12,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 12,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        86,
                        724,
                        505,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                724,
                                505,
                                736
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        724,
                                        505,
                                        736
                                    ],
                                    "type": "text",
                                    "content": "Key 是IPC对象（例如消息队列，共享存储器等）的键值，每个 IPC对象都关联着一个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                742,
                                505,
                                754
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        742,
                                        505,
                                        754
                                    ],
                                    "type": "text",
                                    "content": "唯一的长整型的键值，不同的进程通过相同的键值可访问到同一个IPC对象。用户进程在创",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 58
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        75,
                        507,
                        198
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                77,
                                504,
                                88
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        77,
                                        504,
                                        88
                                    ],
                                    "type": "text",
                                    "content": "建IPC对象时可以指定 key为某个大于0的整数，此时，需要用户自己保证该 key值不与系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                94,
                                501,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        94,
                                        501,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "统中存在的其他IPC键值相冲突。更常用的方式是通过函数调用 ftok（pathname，proj_jd）",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                113,
                                504,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        113,
                                        504,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "请求系统为用户进程生成一个键值，其中的pathname 是一个实际存在的文件的路径名，而",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                131,
                                502,
                                143
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        131,
                                        502,
                                        143
                                    ],
                                    "type": "text",
                                    "content": "且用户进程具有对该文件的访问权限，proj_jd是一个整数，但 ftok只会用到其低 8位的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                148,
                                500,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        148,
                                        500,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "值（该值不能为0），只要路径名访问到的是同一个文件，而且 proj_jd的低8 位的值相同，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                166,
                                505,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        166,
                                        505,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "则ftok()调用便将产生相同的键值；如果使用不同的文件路径名和 proj_jd，虽然系统不能",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                185,
                                252,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        185,
                                        252,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "保证、但通常生成的键值是不同的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        201,
                        506,
                        234
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                203,
                                505,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        203,
                                        505,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "Mode 中给出了该IPC对象的访问权限，由9 个二进制位表示所有者、同组用户、其他",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                221,
                                304,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        221,
                                        304,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "组用户的访问权限。它可以是下列权限的组合：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        192,
                        237,
                        333,
                        359
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                192,
                                237,
                                333,
                                359
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        192,
                                        237,
                                        333,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                192,
                                                237,
                                                333,
                                                359
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>访问权限</td><td>八进制整数</td></tr><tr><td>拥有者可读</td><td>0400</td></tr><tr><td>拥有者可写</td><td>0200</td></tr><tr><td>同组用户可读</td><td>0040</td></tr><tr><td>同组用户可写</td><td>0020</td></tr><tr><td>其他用户可读</td><td>0004</td></tr><tr><td>其他用户可写</td><td>0002</td></tr></table>",
                                            "image_path": "627d7f2a996a73ea8988306bc1d29e9dd739dabc725aab29c2287e9412d65e10.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 3
                },
                {
                    "bbox": [
                        86,
                        364,
                        501,
                        395
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                364,
                                499,
                                377
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        364,
                                        499,
                                        377
                                    ],
                                    "type": "text",
                                    "content": "由于系统规定任何 IPC结构都不存在可执行权限，因此一个IPC对象的权限最大值为",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                381,
                                168,
                                395
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        381,
                                        168,
                                        395
                                    ],
                                    "type": "text",
                                    "content": "0666（八进制）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        400,
                        273,
                        413
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                397,
                                273,
                                415
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        397,
                                        273,
                                        415
                                    ],
                                    "type": "text",
                                    "content": "（4）消息队列结构体 struct msqid_ds",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        417,
                        506,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                417,
                                506,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        417,
                                        506,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "系统中每个消息队列由一个 struct msqid_ds 类型的变量来描述，struct msqid_ds 的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                435,
                                137,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        435,
                                        137,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "格式如下：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        454,
                        432,
                        700
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                454,
                                432,
                                700
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        454,
                                        432,
                                        700
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                454,
                                                432,
                                                700
                                            ],
                                            "type": "text",
                                            "content": "struct msqid_ds {\n    struct ipcperm msg_perm; /* 消息队列访问权限*/\n    struct msg *msg_first; /* 队列上第一条消息，即链表头*/\n    struct msg *msg_last; /* 队列中的最后一条消息，即链表尾*/\n    time_t msg_stime; /* 发送给队列的最后一条消息的时间 */\n    time_t msg_rtime; /* 从消息队列接收到最后一条消息的时间 */\n    time_t msg_ctime; /* 最后修改队列的时间*/\n}\n... \nushort msg_cbytes; /*队列上所有消息总的字节数 */\nushort msg_qnum; /*当前队列上消息的个数 */\nushort msg_qbytes; /* 队列允许的最大的字节数 */\nushort msg_lspid; /* 发送最后一条消息的进程的 pid */\nushort msg_lrpid; /* 接收最后一条消息的进程的 pid */\n};"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        107,
                        705,
                        504,
                        719
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                705,
                                505,
                                719
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        705,
                                        505,
                                        719
                                    ],
                                    "type": "text",
                                    "content": "Linux还通过宏MSGMNB限定了一个消息队列的最大长度（队列中所有消息总的字节数）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        724,
                        239,
                        737
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                724,
                                238,
                                736
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        724,
                                        238,
                                        736
                                    ],
                                    "type": "text",
                                    "content": "2.消息队列相关的系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        741,
                        428,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                741,
                                429,
                                755
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        741,
                                        429,
                                        755
                                    ],
                                    "type": "text",
                                    "content": "Linux提供了一组消息队列相关的系统调用来方便用户进行消息通信。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 59
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        92,
                        75,
                        193,
                        89
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                75,
                                193,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        75,
                                        193,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "（1）msgget 系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        94,
                        167,
                        106
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                94,
                                168,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        94,
                                        121,
                                        106
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{1}",
                                    "score": 0.83
                                },
                                {
                                    "bbox": [
                                        122,
                                        94,
                                        168,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "函数原型：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        112,
                        289,
                        179
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                112,
                                289,
                                179
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        112,
                                        289,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                112,
                                                289,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "include <sys/types.h>   \n#include <sys/ipc.h>   \n#include <sys/msg.h>   \nint msgget(key_t key, int msgflg);"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 3,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        108,
                        184,
                        146,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                183,
                                150,
                                199
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        184,
                                        121,
                                        196
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{2}",
                                    "score": 0.85
                                },
                                {
                                    "bbox": [
                                        121,
                                        183,
                                        150,
                                        199
                                    ],
                                    "type": "text",
                                    "content": "参数:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        201,
                        505,
                        232
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                201,
                                505,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        201,
                                        129,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "key",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        151,
                                        202,
                                        505,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "key 为 0(IPC_PRIVATE)，则创建一个新的消息队列；否则，key 为一个大于 0",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                221,
                                412,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        221,
                                        412,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "的长整数，它对应于消息队列的键值，通常是通过ftok()函数生成的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        238,
                        506,
                        305
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                238,
                                506,
                                250
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        238,
                                        506,
                                        250
                                    ],
                                    "type": "text",
                                    "content": "msgflg 对消息队列的访问权限和控制命令的组合。其中访问权限见“IPC 对象访问权",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                256,
                                506,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        256,
                                        506,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "限 struct ipc_perm”部分的说明。而控制命令 IPC_CREAT 表示，如果 key 对应的消息队列",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                275,
                                504,
                                286
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        504,
                                        286
                                    ],
                                    "type": "text",
                                    "content": "不存在，则创建它；而 IPC_EXCL必须与IPC_CREATT一起使用，它表示：如果 key对应的消",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                292,
                                327,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        292,
                                        327,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "息队列不存在，则创建一个新的队列，否则返回-1。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        310,
                        506,
                        395
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                310,
                                500,
                                359
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        309,
                                        499,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                310,
                                                121,
                                                322
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                309,
                                                499,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "功能： 如果IPC_CREAT 单独使用，semget()为一个新创建的消息队列返回标识数，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        329,
                                        498,
                                        340
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                329,
                                                498,
                                                340
                                            ],
                                            "type": "text",
                                            "content": "或者返回具有相同键值的已存在消息队列标识数。如果 IPC_EXCL与 IPC_CREAT 一起使用，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        346,
                                        421,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                346,
                                                421,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "要么创建一个新的队列并返回它的标识数，如果队列已存在，则返回-1。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                364,
                                506,
                                395
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        364,
                                        506,
                                        377
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                364,
                                                121,
                                                376
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                364,
                                                506,
                                                377
                                            ],
                                            "type": "text",
                                            "content": "返回值：成功，返回消息队列的标识数；出错，返回-1，同时将错误代码存放在 error",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        383,
                                        425,
                                        394
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                383,
                                                425,
                                                394
                                            ],
                                            "type": "text",
                                            "content": "中。对于新创建的消息队列，其msqid_ds结构成员变量的初值设置如下：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        111,
                        400,
                        320,
                        413
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                400,
                                320,
                                413
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        400,
                                        320,
                                        413
                                    ],
                                    "type": "text",
                                    "content": "msg_qnum、msg_lspid、msg_lrpid 设置为 0；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        418,
                        262,
                        431
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                418,
                                263,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        418,
                                        263,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "msg_stime、msg_rtime 设置为 0；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        436,
                        238,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                436,
                                239,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        436,
                                        239,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "msg_ctime 设置为当前时间；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        454,
                        320,
                        466
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                454,
                                321,
                                469
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        454,
                                        321,
                                        469
                                    ],
                                    "type": "text",
                                    "content": "msg_qbytes 设成系统的限制值，即宏 MSGMNB；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        472,
                        306,
                        485
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                470,
                                307,
                                486
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        470,
                                        307,
                                        486
                                    ],
                                    "type": "text",
                                    "content": "msgflg 的读写权限写入 msg_perm.mode 中；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        490,
                        504,
                        520
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                491,
                                505,
                                503
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        491,
                                        505,
                                        503
                                    ],
                                    "type": "text",
                                    "content": "msg_perm结构的 uid和cuid成员被设置成当前进程的有效用ID，id和 cuid成员被设",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                507,
                                214,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        507,
                                        214,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "置成当前进程的有效组 ID。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        525,
                        458,
                        539
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                525,
                                458,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        525,
                                        121,
                                        538
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{5}",
                                    "score": 0.85
                                },
                                {
                                    "bbox": [
                                        121,
                                        526,
                                        458,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "错误代码：EACCES：指定的消息队列已存在，但调用进程没有权限访问它",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        544,
                        505,
                        573
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                544,
                                506,
                                557
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        544,
                                        506,
                                        557
                                    ],
                                    "type": "text",
                                    "content": "EEXIST：key 指定的消息队列已存在，而 msgflg 中同时指定 IPC_CREAT 和 IPC_EXCL 标",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                560,
                                103,
                                576
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        86,
                                        560,
                                        103,
                                        576
                                    ],
                                    "type": "text",
                                    "content": "志",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        579,
                        460,
                        592
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                579,
                                460,
                                593
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        579,
                                        460,
                                        593
                                    ],
                                    "type": "text",
                                    "content": "ENOENT：key 指定的消息队列不存在同时 msgflg 中没有指定 IPC_CREAT 标志",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        597,
                        301,
                        610
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                597,
                                300,
                                611
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        597,
                                        300,
                                        611
                                    ],
                                    "type": "text",
                                    "content": "ENOMEM：需要建立消息队列，但内存不足",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        615,
                        342,
                        628
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                616,
                                342,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        616,
                                        342,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "ENOSPC：需要建立消息队列，但已达到系统的限制",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        634,
                        193,
                        646
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                633,
                                193,
                                649
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        633,
                                        193,
                                        649
                                    ],
                                    "type": "text",
                                    "content": "（2）msgsnd 系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        651,
                        167,
                        664
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                651,
                                168,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        651,
                                        121,
                                        664
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{1}",
                                    "score": 0.86
                                },
                                {
                                    "bbox": [
                                        122,
                                        651,
                                        168,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "函数原型：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        670,
                        472,
                        737
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                670,
                                472,
                                737
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        670,
                                        472,
                                        737
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                670,
                                                472,
                                                737
                                            ],
                                            "type": "text",
                                            "content": "include <sys/types.h>   \n#include <sys/ipc.h>   \n#include <sys msg.h>   \nint mgsnd(int msqid, struct msgbuf \\*msgp,size_t msgsz,int msgflg);"
                                        }
                                    ]
                                }
                            ],
                            "index": 23,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 23,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        108,
                        741,
                        146,
                        754
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                740,
                                149,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        741,
                                        121,
                                        754
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{2}",
                                    "score": 0.84
                                },
                                {
                                    "bbox": [
                                        122,
                                        740,
                                        149,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "参数:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 60
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        107,
                        76,
                        238,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                76,
                                238,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        76,
                                        238,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "msqid 消息队列的标识数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        94,
                        332,
                        107
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                95,
                                332,
                                109
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        95,
                                        134,
                                        109
                                    ],
                                    "type": "text",
                                    "content": "msgp",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        151,
                                        95,
                                        332,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "存放欲发送消息内容的消息缓冲区指针",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        112,
                        322,
                        126
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                112,
                                321,
                                126
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        115,
                                        139,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "msgsz",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        151,
                                        112,
                                        321,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "消息正文(而非整个消息结构)的长度",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        130,
                        408,
                        142
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                130,
                                408,
                                145
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        130,
                                        149,
                                        145
                                    ],
                                    "type": "text",
                                    "content": "msgflg：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        172,
                                        131,
                                        180,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "0",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        252,
                                        130,
                                        408,
                                        144
                                    ],
                                    "type": "text",
                                    "content": "—消息队列满时，msgsnd 将会阻塞",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        171,
                        148,
                        413,
                        161
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                173,
                                148,
                                413,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        173,
                                        148,
                                        413,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "IPC_NOWAIT ——消息队列满时，msgsnd 立即返回-1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        166,
                        505,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                172,
                                166,
                                505,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        172,
                                        166,
                                        505,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "MSG_NOERROR——消息正文长度超过 msgsz字节时，不报错，而是直接截",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                184,
                                342,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        184,
                                        342,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "去其中多余的部分，并只将前面的 msgsz字节发送出去",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        201,
                        505,
                        269
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 10,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                201,
                                505,
                                232
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        200,
                                        505,
                                        216
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                201,
                                                121,
                                                214
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                200,
                                                157,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "功能：",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                166,
                                                202,
                                                505,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "在标识数为 msqid 的消息队列中添加一个消息，即向标识数为 msqid 的消",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        220,
                                        190,
                                        232
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                220,
                                                190,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "息队列发送一个消息。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                238,
                                471,
                                251
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        238,
                                        471,
                                        251
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                238,
                                                121,
                                                250
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                238,
                                                471,
                                                251
                                            ],
                                            "type": "text",
                                            "content": "返回值： 消息发送成功，返回0；否则返回-1，同时error中存有错误代码",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                255,
                                449,
                                269
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        255,
                                        451,
                                        270
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                256,
                                                121,
                                                268
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                121,
                                                255,
                                                451,
                                                270
                                            ],
                                            "type": "text",
                                            "content": "错误代码：EAGAIN ——参数 msgflg 设为 IPC_NOWAIT，而消息队列已满",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        274,
                        263,
                        286
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                275,
                                264,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        275,
                                        264,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "EACCESS——无权限写入消息队列",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        291,
                        311,
                        305
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                290,
                                311,
                                306
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        290,
                                        311,
                                        306
                                    ],
                                    "type": "text",
                                    "content": "EFAULT ——参数 msgp 指向的地址无法访问",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        310,
                        337,
                        322
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                309,
                                337,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        310,
                                        140,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "EIDRM",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        164,
                                        309,
                                        337,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "标识符为 msqid的消息队列已被删除",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        327,
                        368,
                        340
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                328,
                                368,
                                341
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        328,
                                        140,
                                        341
                                    ],
                                    "type": "text",
                                    "content": "EINTR",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        148,
                                        334,
                                        160,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "——",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        166,
                                        328,
                                        368,
                                        341
                                    ],
                                    "type": "text",
                                    "content": "队列已满而处于阻塞的情况下，被信号唤醒",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        345,
                        505,
                        375
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                345,
                                505,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        345,
                                        505,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "EINVAL ——无效的参数msqid、或消息类型 type小于等于 0、或 msgsz为负数或超过",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                364,
                                178,
                                376
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        364,
                                        178,
                                        376
                                    ],
                                    "type": "text",
                                    "content": "系统限制值 MSGMAX",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        381,
                        374,
                        395
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                381,
                                373,
                                395
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        381,
                                        373,
                                        395
                                    ],
                                    "type": "text",
                                    "content": "ENOMEM ——系统无足够内存空间存放 msgbuf消息的副本",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        400,
                        193,
                        412
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                398,
                                194,
                                415
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        398,
                                        194,
                                        415
                                    ],
                                    "type": "text",
                                    "content": "（3）msgrcv 系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        417,
                        167,
                        430
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                417,
                                168,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        417,
                                        121,
                                        430
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{1}",
                                    "score": 0.84
                                },
                                {
                                    "bbox": [
                                        122,
                                        417,
                                        168,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "函数原型：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        86,
                        437,
                        505,
                        521
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                437,
                                505,
                                521
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        437,
                                        505,
                                        521
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                437,
                                                505,
                                                521
                                            ],
                                            "type": "text",
                                            "content": "include <sys/types.h> #include <sys/ipc.h> #include <sys msg.h> ssize_t msgcv(int msqid, struct msgbuf *msgp, size_t msgsz, long msgtyp, int msgflg);"
                                        }
                                    ]
                                }
                            ],
                            "index": 19,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 19,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        108,
                        526,
                        146,
                        538
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                524,
                                149,
                                540
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        525,
                                        121,
                                        538
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{2}",
                                    "score": 0.86
                                },
                                {
                                    "bbox": [
                                        121,
                                        524,
                                        149,
                                        540
                                    ],
                                    "type": "text",
                                    "content": "参数:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        544,
                        237,
                        556
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                544,
                                238,
                                557
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        544,
                                        238,
                                        557
                                    ],
                                    "type": "text",
                                    "content": "msqid 消息队列的标识数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        561,
                        331,
                        574
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                562,
                                332,
                                576
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        563,
                                        134,
                                        576
                                    ],
                                    "type": "text",
                                    "content": "msgp",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        152,
                                        562,
                                        332,
                                        575
                                    ],
                                    "type": "text",
                                    "content": "存放欲接收消息内容的消息缓冲区指针",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        580,
                        321,
                        592
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                580,
                                321,
                                593
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        581,
                                        139,
                                        593
                                    ],
                                    "type": "text",
                                    "content": "msgsz",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        151,
                                        580,
                                        321,
                                        592
                                    ],
                                    "type": "text",
                                    "content": "消息正文(而非整个消息结构)的长度",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        597,
                        374,
                        610
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                597,
                                374,
                                611
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        597,
                                        160,
                                        611
                                    ],
                                    "type": "text",
                                    "content": "msg-typ 0",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        234,
                                        597,
                                        374,
                                        610
                                    ],
                                    "type": "text",
                                    "content": "接收消息队列中的第一个消息",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        150,
                        616,
                        389,
                        628
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                615,
                                390,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        616,
                                        164,
                                        628
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrm { > 0 }",
                                    "score": 0.6
                                },
                                {
                                    "bbox": [
                                        233,
                                        615,
                                        390,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "接收第一个类型为 msgtyp的消息",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        150,
                        634,
                        462,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                633,
                                464,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        634,
                                        166,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "<0",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        233,
                                        633,
                                        464,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "接收第一个类型小于等于 msgtyp的绝对值的消息",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        652,
                        408,
                        664
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                650,
                                408,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        650,
                                        160,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "msgflg 0",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        233,
                                        651,
                                        408,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "没有可以接收的消息时，msgrcv 阻塞",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        150,
                        669,
                        399,
                        682
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                152,
                                670,
                                400,
                                683
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        152,
                                        670,
                                        400,
                                        683
                                    ],
                                    "type": "text",
                                    "content": "IPC_NOWAIT ——没有可以接收的消息时，立即返回-1",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        687,
                        394,
                        700
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                150,
                                687,
                                395,
                                702
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        150,
                                        687,
                                        395,
                                        702
                                    ],
                                    "type": "text",
                                    "content": "MSG_EXCEPT ——返回第一个类型不为 msgtyp 的消息",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        705,
                        505,
                        735
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                706,
                                506,
                                719
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        706,
                                        506,
                                        719
                                    ],
                                    "type": "text",
                                    "content": "MSG_NOERROR——消息正文长度超过 msgsz字节时，将直接截去其中多余的部",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                87,
                                721,
                                102,
                                739
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        87,
                                        721,
                                        102,
                                        739
                                    ],
                                    "type": "text",
                                    "content": "分",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        740,
                        505,
                        754
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                740,
                                505,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        741,
                                        121,
                                        754
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{3}",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        121,
                                        740,
                                        148,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "功能：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        173,
                                        741,
                                        505,
                                        754
                                    ],
                                    "type": "text",
                                    "content": "如果传递给参数 msgflg的值为 IPC_NOWAIT，并且没有可取的消息，那么",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 61
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        505,
                        125
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                77,
                                505,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        77,
                                        505,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "给调用进程返回ENOMSG错误码，否则，调用进程阻塞，直到一条满足要求的消息到达消息",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                95,
                                505,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        95,
                                        505,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "队列。如果进程正在等待消息，而相应的消息队列被删除，则返回 EIDRM。如果当进程正在",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                113,
                                308,
                                124
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        113,
                                        308,
                                        124
                                    ],
                                    "type": "text",
                                    "content": "等待消息时，捕获到了一个信号，则返回 EINTR",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        130,
                        505,
                        179
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 4,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                130,
                                505,
                                161
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        130,
                                        506,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                130,
                                                121,
                                                142
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                130,
                                                506,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "返回值： 接收成功，返回实际接收到的消息正文的字节数；否则返回-1，同时error",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        148,
                                        164,
                                        161
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                148,
                                                164,
                                                161
                                            ],
                                            "type": "text",
                                            "content": "中存有错误代码",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                166,
                                470,
                                179
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        166,
                                        471,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                166,
                                                121,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                121,
                                                166,
                                                471,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "错误代码：E2BIG ——消息长度超过 msgsz，且 MSG_NOERROR 标志没被使用",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        184,
                        263,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                185,
                                264,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        185,
                                        264,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "EACCESS——无权限读取消息队列",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        202,
                        311,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                201,
                                311,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        201,
                                        311,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "EFAULT ——参数 msgp 指向的地址无法访问",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        220,
                        336,
                        232
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                220,
                                337,
                                234
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        221,
                                        140,
                                        233
                                    ],
                                    "type": "text",
                                    "content": "EIDRM",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        165,
                                        220,
                                        337,
                                        234
                                    ],
                                    "type": "text",
                                    "content": "标识符为 msqid 的消息队列已被删除",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        238,
                        317,
                        251
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                238,
                                315,
                                251
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        238,
                                        139,
                                        251
                                    ],
                                    "type": "text",
                                    "content": "EINTR",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        168,
                                        238,
                                        315,
                                        250
                                    ],
                                    "type": "text",
                                    "content": "等待消息的情况下，被信号唤醒",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        256,
                        334,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                255,
                                334,
                                270
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        255,
                                        334,
                                        270
                                    ],
                                    "type": "text",
                                    "content": "EINVAL ——无效的参数 msqid、或 msgsz 为负数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        274,
                        439,
                        286
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                274,
                                440,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        274,
                                        440,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "ENOMSG ——参数 msgflg 设为 IPC_NOWAIT，但无满足要求的消息可接收",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        92,
                        292,
                        193,
                        304
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                93,
                                291,
                                193,
                                306
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        291,
                                        193,
                                        306
                                    ],
                                    "type": "text",
                                    "content": "（4）msgctl 系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        310,
                        167,
                        322
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                310,
                                168,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        310,
                                        121,
                                        322
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{1}",
                                    "score": 0.86
                                },
                                {
                                    "bbox": [
                                        122,
                                        310,
                                        168,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "函数原型：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        328,
                        227,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                327,
                                226,
                                342
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        327,
                                        226,
                                        342
                                    ],
                                    "type": "text",
                                    "content": "#include <sys/types.h>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        346,
                        216,
                        359
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                346,
                                217,
                                360
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        346,
                                        217,
                                        360
                                    ],
                                    "type": "text",
                                    "content": "#include <sys/ipc.h>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        364,
                        216,
                        377
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                364,
                                215,
                                377
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        364,
                                        215,
                                        377
                                    ],
                                    "type": "text",
                                    "content": "#include <sys/msg.h>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        382,
                        388,
                        395
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                381,
                                389,
                                396
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        381,
                                        389,
                                        396
                                    ],
                                    "type": "text",
                                    "content": "int msgctl(int msqid, int cmd, struct msqid_ds *buf);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        400,
                        146,
                        412
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                398,
                                149,
                                415
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        399,
                                        121,
                                        412
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{2}",
                                    "score": 0.84
                                },
                                {
                                    "bbox": [
                                        122,
                                        398,
                                        149,
                                        415
                                    ],
                                    "type": "text",
                                    "content": "参数:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        417,
                        237,
                        430
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                418,
                                238,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        418,
                                        238,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "msqid 消息队列的标识数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        435,
                        421,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                435,
                                421,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        435,
                                        421,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "cmd IPC_STAT ——将对应消息队列结构体的值复制到一份到buf所",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        454,
                        332,
                        466
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                454,
                                332,
                                466
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        454,
                                        332,
                                        466
                                    ],
                                    "type": "text",
                                    "content": "指的结构体中，调用者必须有读消息队列的权限",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        471,
                        373,
                        485
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                470,
                                374,
                                486
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        470,
                                        374,
                                        486
                                    ],
                                    "type": "text",
                                    "content": "IPC_SET —— 将 buf 所指结构体中的部分信息:",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        87,
                        490,
                        502,
                        520
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                491,
                                502,
                                502
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        491,
                                        502,
                                        502
                                    ],
                                    "type": "text",
                                    "content": "msg_perm.uid,msg_perm.gid,mst_perm.mode,msg_qbytes 写到消息队列结构体中，并",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                508,
                                421,
                                521
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        508,
                                        421,
                                        521
                                    ],
                                    "type": "text",
                                    "content": "且更新消息队列结构体 msg_ctime成员的值。调用者必须有相应的权限。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        525,
                        504,
                        555
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                525,
                                505,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        525,
                                        192,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "IPC_RMD",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        231,
                                        527,
                                        505,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "删除消息队列，并唤醒该消息队列上等待读或等待写的进程。",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                543,
                                211,
                                557
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        543,
                                        211,
                                        557
                                    ],
                                    "type": "text",
                                    "content": "调用者必须有相应的权限。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        561,
                        468,
                        610
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 27,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                561,
                                416,
                                574
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        560,
                                        416,
                                        576
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                561,
                                                121,
                                                574
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                121,
                                                560,
                                                148,
                                                576
                                            ],
                                            "type": "text",
                                            "content": "功能：",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                173,
                                                562,
                                                416,
                                                575
                                            ],
                                            "type": "text",
                                            "content": "获取或设置消息队列的属性信息，或者删除消息队列",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                579,
                                434,
                                592
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        579,
                                        434,
                                        593
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                580,
                                                121,
                                                592
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                121,
                                                579,
                                                434,
                                                593
                                            ],
                                            "type": "text",
                                            "content": "返回值： 成功，返回0；否则返回-1，同时 error中存有错误代码",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                597,
                                468,
                                610
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        597,
                                        468,
                                        612
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                597,
                                                121,
                                                610
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                121,
                                                597,
                                                468,
                                                612
                                            ],
                                            "type": "text",
                                            "content": "错误代码：EACCESS—— cmd 为 IPC_STAT，但调用进程无读消息队列的权限",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        615,
                        465,
                        629
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                615,
                                466,
                                629
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        615,
                                        466,
                                        629
                                    ],
                                    "type": "text",
                                    "content": "EFAULT —— 参数 cmd 为 IPC_STAT 或 IPC_SET ，但 buf 指向的地址无法访问",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        634,
                        337,
                        646
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                633,
                                337,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        634,
                                        141,
                                        646
                                    ],
                                    "type": "text",
                                    "content": "EIDRM",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        166,
                                        633,
                                        337,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "标识符为 msqid的消息队列已被删除",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        651,
                        316,
                        664
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                652,
                                315,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        652,
                                        139,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "EINTR",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        168,
                                        652,
                                        315,
                                        664
                                    ],
                                    "type": "text",
                                    "content": "等待消息的情况下，被信号唤醒",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        670,
                        293,
                        682
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                670,
                                293,
                                683
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        670,
                                        149,
                                        683
                                    ],
                                    "type": "text",
                                    "content": "EINVAL —",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        166,
                                        670,
                                        293,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "cmd 或 msqid 为无效的参数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        687,
                        444,
                        700
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                687,
                                445,
                                702
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        687,
                                        445,
                                        702
                                    ],
                                    "type": "text",
                                    "content": "EPERM —— 参数 cmd 为 IPC_RMD 或 IPC_SET ，但调用进程无足够的权限",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        722,
                        277,
                        739
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 33,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                721,
                                279,
                                740
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        721,
                                        279,
                                        740
                                    ],
                                    "type": "text",
                                    "content": "4.5 linux 共享内存通信",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 62
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        507,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                76,
                                505,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        76,
                                        505,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "共享内存是Linux 支持的三种进程间通信机制（IPC）中的一种。它实际上是一段特殊",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                95,
                                505,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        505,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "的内存区域。这一段内存区域可以被两个或者两个以上的进程映射到自身的地址空间中。一",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                113,
                                505,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        113,
                                        505,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "个进程写入共享内存中的信息，可以被其它使用这些共享内存的进程，通过一个简单点的内",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                130,
                                505,
                                143
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        130,
                                        505,
                                        143
                                    ],
                                    "type": "text",
                                    "content": "存读操作（memory read operation）读出，从而实现了进程间的通信。共享一个或多个进",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                148,
                                506,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        148,
                                        506,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "程通过同时出现在它们的虚拟地址空间的内存进程通信。这块虚拟内存的页面在每一个共享",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                167,
                                483,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        167,
                                        483,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "进程的页表中都有页表项目引用。但是不需要在所有进程的虚拟内存都有相同的地址。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        180,
                        227,
                        193
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                180,
                                227,
                                194
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        180,
                                        227,
                                        194
                                    ],
                                    "type": "text",
                                    "content": "1. 共享内存的系统调用",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        200,
                        508,
                        267
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                200,
                                505,
                                212
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        200,
                                        505,
                                        212
                                    ],
                                    "type": "text",
                                    "content": "任何Linux进程创建时，都有很大的虚拟地址空间，这块虚拟地址空间只有一部分放着",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                218,
                                499,
                                229
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        218,
                                        499,
                                        229
                                    ],
                                    "type": "text",
                                    "content": "代码、数据、堆和堆栈，剩余的那些部分在初始化时是空闲的。一块共享内存一旦被连接",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                94,
                                236,
                                505,
                                248
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        94,
                                        236,
                                        505,
                                        248
                                    ],
                                    "type": "text",
                                    "content": "（attach），即会被映射入空闲的虚拟地址空间。随后，进程即可像对待普通的内存区域那",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                254,
                                389,
                                265
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        254,
                                        389,
                                        265
                                    ],
                                    "type": "text",
                                    "content": "样读、写共享内存。共享内存一共有四个系统调用，它们分别是：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        270,
                        471,
                        341
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                111,
                                270,
                                275,
                                282
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        132,
                                        270,
                                        276,
                                        283
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                132,
                                                270,
                                                276,
                                                283
                                            ],
                                            "type": "text",
                                            "content": "shmget（）创建一块共享内存。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                111,
                                289,
                                456,
                                301
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        132,
                                        290,
                                        456,
                                        302
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                132,
                                                290,
                                                456,
                                                302
                                            ],
                                            "type": "text",
                                            "content": "shmat（）将一块已存在共享内存映射（map）到一个进程的地址空间。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                111,
                                309,
                                461,
                                322
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        131,
                                        309,
                                        462,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                309,
                                                462,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "shmdt（）取消一个进程的地址空间中一块共享内存块的映射（unmap）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                111,
                                328,
                                471,
                                341
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        132,
                                        329,
                                        472,
                                        341
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                132,
                                                329,
                                                472,
                                                341
                                            ],
                                            "type": "text",
                                            "content": "shmctl（）是管理共享内存的函数，用于执行对共享内存的各种控制命令。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        110,
                        348,
                        281,
                        361
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                346,
                                282,
                                364
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        346,
                                        282,
                                        364
                                    ],
                                    "type": "text",
                                    "content": "（1） shmget ()：分配一块共享内存",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        367,
                        181,
                        380
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                367,
                                182,
                                381
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        367,
                                        182,
                                        381
                                    ],
                                    "type": "text",
                                    "content": "函数声明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        130,
                        387,
                        296,
                        439
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                130,
                                387,
                                296,
                                439
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        387,
                                        296,
                                        439
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                387,
                                                296,
                                                439
                                            ],
                                            "type": "text",
                                            "content": "include<sys/ipc.h>   \n#include<sys/shm.h>   \nint shmget(key_t,int size,int shmflg);"
                                        }
                                    ]
                                }
                            ],
                            "index": 11,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 11,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        111,
                        445,
                        180,
                        458
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                444,
                                182,
                                460
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        444,
                                        182,
                                        460
                                    ],
                                    "type": "text",
                                    "content": "输入参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        465,
                        361,
                        478
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                465,
                                342,
                                478
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        465,
                                        342,
                                        478
                                    ],
                                    "type": "text",
                                    "content": "key:标识共享内存的键值，在调用前应赋初值",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        484,
                        361,
                        497
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                485,
                                361,
                                497
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        485,
                                        361,
                                        497
                                    ],
                                    "type": "text",
                                    "content": "Size:所需的共享内存的最小尺寸（以字节为单位）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        503,
                        293,
                        517
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                503,
                                293,
                                517
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        503,
                                        293,
                                        517
                                    ],
                                    "type": "text",
                                    "content": "shmflg:将分配的共享内存属性标志",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        523,
                        170,
                        535
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                523,
                                171,
                                538
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        523,
                                        171,
                                        538
                                    ],
                                    "type": "text",
                                    "content": "返回值：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        542,
                        480,
                        555
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                543,
                                481,
                                556
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        543,
                                        481,
                                        556
                                    ],
                                    "type": "text",
                                    "content": "若成功，则返回共享内存的标识符；否则返回-1，错误原因存在于errno中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        562,
                        419,
                        575
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                131,
                                560,
                                421,
                                577
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        131,
                                        560,
                                        421,
                                        577
                                    ],
                                    "type": "text",
                                    "content": "errno=EINVAL：参数 size 小于 SHMMIN 或者大于 SHMMAX。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        581,
                        377,
                        594
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                582,
                                377,
                                595
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        582,
                                        377,
                                        595
                                    ],
                                    "type": "text",
                                    "content": "EEXIST：欲建立 key所指的共享内存，但已经存在。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        601,
                        340,
                        613
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                602,
                                341,
                                614
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        602,
                                        341,
                                        614
                                    ],
                                    "type": "text",
                                    "content": "EIDRM：参数 key所指的共享内存已经删除。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        621,
                        448,
                        634
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                620,
                                449,
                                635
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        620,
                                        449,
                                        635
                                    ],
                                    "type": "text",
                                    "content": "ENOSPC：已经超过系统允许建立的共享内存的最大值（SHMALL）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        640,
                        498,
                        654
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                640,
                                499,
                                655
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        640,
                                        499,
                                        655
                                    ],
                                    "type": "text",
                                    "content": "ENOENT：参数 key 所指的共享内存不存在，参数 shmflg 也未设 IPC_CREAT 位。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        660,
                        238,
                        672
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                660,
                                239,
                                673
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        660,
                                        239,
                                        673
                                    ],
                                    "type": "text",
                                    "content": "EACCESS：没有权限。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        679,
                        259,
                        692
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                679,
                                260,
                                692
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        679,
                                        260,
                                        692
                                    ],
                                    "type": "text",
                                    "content": "ENOMEM：核心内存不足。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        698,
                        159,
                        711
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                698,
                                162,
                                713
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        703,
                                        119,
                                        707
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        132,
                                        698,
                                        162,
                                        713
                                    ],
                                    "type": "text",
                                    "content": "说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        719,
                        506,
                        751
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                719,
                                506,
                                733
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        719,
                                        506,
                                        733
                                    ],
                                    "type": "text",
                                    "content": "参数key的取值可以是一块已经存在的共享内存的键值、0、或IPC_PRIVATE。如果key",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                737,
                                504,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        737,
                                        504,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "的取值为IPC_PRIVATE，则函数shmget()将创建一块新的共享内存；如果 key 的取值为 0，",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 63
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        507,
                        126
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                77,
                                505,
                                88
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        77,
                                        505,
                                        88
                                    ],
                                    "type": "text",
                                    "content": "而参数shmflg中设置了IPC_CREATE这标志，则同样将创建一块新的共享内存。在 IPC的通",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                95,
                                506,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        506,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "信模式下，不管是使用消息队列或者是共享内存，甚至是信号量，每个 IPC的对象都有唯一",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                111,
                                246,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        111,
                                        246,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "的名字，它被称做“键”（key）。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        130,
                        458,
                        144
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                130,
                                458,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        130,
                                        458,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "参数size是要建立的共享内存的长度。所有的内存分配都是以页为单位的。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        148,
                        506,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                148,
                                505,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        148,
                                        505,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "参数shmflg主要和一些标志有关。其中有效的标志包括 IPC_CREAT和 IPC_EXCL，它们",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                166,
                                297,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        166,
                                        297,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "的功能与 open(2)的 O_CREAT 和 O_EXCL 相当。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        184,
                        506,
                        232
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                184,
                                505,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        184,
                                        505,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "在Linux内核中，每一个新创建的共享内存都由一个 shmid_ds的数据结构表示。如果",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                201,
                                506,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        201,
                                        506,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "函数 shmget( )成功创建了一块共享内存，则返回一个可以用于引用该共享内存的 shmid_ds",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                221,
                                179,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        221,
                                        179,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "数据结构的标识符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        238,
                        506,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                238,
                                506,
                                251
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        238,
                                        506,
                                        251
                                    ],
                                    "type": "text",
                                    "content": "每一个IPC对象，系统共用一个 struct ipc_perm的数据结构来存放权限信息，以确定",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                253,
                                275,
                                270
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        253,
                                        275,
                                        270
                                    ],
                                    "type": "text",
                                    "content": "一个 ipc 操作是否可以访问该 IPC 对象。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        272,
                        323,
                        285
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                270,
                                324,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        270,
                                        324,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "（2） shmat()：连接（attach）一块共享内存",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        292,
                        181,
                        304
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                292,
                                182,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        292,
                                        182,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "函数声明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        130,
                        312,
                        381,
                        364
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                130,
                                312,
                                381,
                                364
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        130,
                                        312,
                                        381,
                                        364
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                130,
                                                312,
                                                381,
                                                364
                                            ],
                                            "type": "text",
                                            "content": "include<sys/ipc.h>   \n#include<sys/shm.h>   \nvoid \\*shmat(int shmid, const void \\*shmaddr,int shmgflg);"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        111,
                        370,
                        180,
                        382
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                370,
                                182,
                                384
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        370,
                                        182,
                                        384
                                    ],
                                    "type": "text",
                                    "content": "输入参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        389,
                        340,
                        402
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                389,
                                341,
                                402
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        389,
                                        341,
                                        402
                                    ],
                                    "type": "text",
                                    "content": "shmid:欲连接（attach）的共享内存的标识符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        409,
                        292,
                        421
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                409,
                                294,
                                422
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        409,
                                        294,
                                        422
                                    ],
                                    "type": "text",
                                    "content": "shmaddr: 欲连接（attach）的地址。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        428,
                        223,
                        441
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                428,
                                225,
                                442
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        428,
                                        225,
                                        442
                                    ],
                                    "type": "text",
                                    "content": "shmflg:一个标识符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        448,
                        170,
                        460
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                448,
                                171,
                                461
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        448,
                                        171,
                                        461
                                    ],
                                    "type": "text",
                                    "content": "返回值：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        467,
                        446,
                        481
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                466,
                                447,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        466,
                                        447,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "若成功则返回已连接好的地址，否则返回-1，错误原因存在于errno。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        486,
                        504,
                        519
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                486,
                                506,
                                502
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        486,
                                        506,
                                        502
                                    ],
                                    "type": "text",
                                    "content": "errno=EINVAL：参数 shmid 无效；参数 shmaddr 并非页对齐（page aligned），而参",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                133,
                                506,
                                346,
                                520
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        506,
                                        346,
                                        520
                                    ],
                                    "type": "text",
                                    "content": "数 shmflg 中并未设置 SHM_RND 这个标志位。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        525,
                        362,
                        539
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                526,
                                364,
                                539
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        526,
                                        364,
                                        539
                                    ],
                                    "type": "text",
                                    "content": "ENOMEN：分配标识符或页表时，系统内存不足。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        544,
                        416,
                        558
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                545,
                                417,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        545,
                                        417,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "EACCESS：调用进程没有权限以指定的方式连接该共享内存。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        565,
                        159,
                        576
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                565,
                                161,
                                578
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        565,
                                        161,
                                        578
                                    ],
                                    "type": "text",
                                    "content": "说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        586,
                        505,
                        617
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                587,
                                505,
                                597
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        587,
                                        505,
                                        597
                                    ],
                                    "type": "text",
                                    "content": "函数shmat（）将以参数 shmid为标识符的共享内存连接（attach）到调用进程的数据",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                604,
                                242,
                                616
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        604,
                                        242,
                                        616
                                    ],
                                    "type": "text",
                                    "content": "段，连接的地址由shmaddr 指定。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        621,
                        472,
                        634
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                621,
                                474,
                                635
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        621,
                                        474,
                                        635
                                    ],
                                    "type": "text",
                                    "content": "参数 shmflg 除了可以设置 SHM_RND 标志位外，还可以设置 SHM_RDONLY 标志位。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        638,
                        357,
                        651
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                636,
                                358,
                                654
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        636,
                                        358,
                                        654
                                    ],
                                    "type": "text",
                                    "content": "（3） shmdt()：断开（detach）一块共享内存的连接",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        657,
                        181,
                        670
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                657,
                                182,
                                671
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        657,
                                        182,
                                        671
                                    ],
                                    "type": "text",
                                    "content": "函数声明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        131,
                        677,
                        282,
                        729
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                131,
                                677,
                                282,
                                729
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        131,
                                        677,
                                        282,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                131,
                                                677,
                                                282,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "include<sys/ipc.h> #include<sys/shm.h> int shmdt(const void \\*shmaddr);"
                                        }
                                    ]
                                }
                            ],
                            "index": 23,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 23,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        111,
                        735,
                        180,
                        748
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                735,
                                182,
                                749
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        735,
                                        182,
                                        749
                                    ],
                                    "type": "text",
                                    "content": "输入参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        755,
                        392,
                        768
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                755,
                                393,
                                768
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        755,
                                        393,
                                        768
                                    ],
                                    "type": "text",
                                    "content": "shmaddr：欲断开连接（detach）的共享内存的虚拟地址。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 64
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        111,
                        74,
                        170,
                        87
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                74,
                                171,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        74,
                                        171,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "返回值：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        95,
                        441,
                        108
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                95,
                                442,
                                110
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        95,
                                        442,
                                        110
                                    ],
                                    "type": "text",
                                    "content": "若成功则返回已连接好的地址，否则返回-1，错误原因存在于 errno 中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        114,
                        452,
                        126
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                113,
                                453,
                                127
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        113,
                                        453,
                                        127
                                    ],
                                    "type": "text",
                                    "content": "errno=EINVAL：参数 shmaddr 无效或参数 shmaddr 地址并非共享内存地址。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        132,
                        137,
                        144
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                131,
                                138,
                                146
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        131,
                                        138,
                                        146
                                    ],
                                    "type": "text",
                                    "content": "说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        149,
                        505,
                        198
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                150,
                                504,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        150,
                                        504,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "函数shmdt 从调用进程的数据段，断开地址在shmaddr的共享内存。要分离的共",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                168,
                                506,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        168,
                                        506,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "享内存必须是当前连接到调用进程地址空间的共享内存质疑，也就是说shmaddr 必须等于连",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                186,
                                284,
                                197
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        186,
                                        284,
                                        197
                                    ],
                                    "type": "text",
                                    "content": "接某个共享内存时调用 shmat时的返回值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        202,
                        318,
                        215
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                200,
                                319,
                                217
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        200,
                                        319,
                                        217
                                    ],
                                    "type": "text",
                                    "content": "（4） shmctl()：对一块共享内存的控制操作",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        220,
                        181,
                        232
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                220,
                                182,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        220,
                                        182,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "函数声明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        238,
                        221,
                        250
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                236,
                                220,
                                252
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        236,
                                        220,
                                        252
                                    ],
                                    "type": "text",
                                    "content": "#include<sys/ipc.h>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        257,
                        225,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                257,
                                225,
                                271
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        257,
                                        225,
                                        271
                                    ],
                                    "type": "text",
                                    "content": "#include<sys/shm.h>",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        277,
                        362,
                        289
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                276,
                                363,
                                290
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        276,
                                        363,
                                        290
                                    ],
                                    "type": "text",
                                    "content": "int shmctl (int shmid, int cmd, struct shmid_ds *buff);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        294,
                        180,
                        306
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                293,
                                182,
                                307
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        293,
                                        182,
                                        307
                                    ],
                                    "type": "text",
                                    "content": "输入参数：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        309,
                        312,
                        322
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                310,
                                313,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        310,
                                        313,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "shmid：为欲处理的共享内存的标识符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        325,
                        241,
                        337
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                325,
                                242,
                                337
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        325,
                                        242,
                                        337
                                    ],
                                    "type": "text",
                                    "content": "cmd：为欲进行的操作。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        341,
                        185,
                        353
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                339,
                                187,
                                354
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        339,
                                        187,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "buf：缓存。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        356,
                        170,
                        368
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                356,
                                171,
                                370
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        356,
                                        171,
                                        370
                                    ],
                                    "type": "text",
                                    "content": "返回值：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        130,
                        371,
                        469,
                        384
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                371,
                                470,
                                386
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        371,
                                        470,
                                        386
                                    ],
                                    "type": "text",
                                    "content": "若成功则返回共享内存的标识符，否则返回-1，错误原因存在于 errno 中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        131,
                        387,
                        440,
                        400
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                132,
                                386,
                                442,
                                401
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        132,
                                        386,
                                        155,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "errno",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        155,
                                        390,
                                        164,
                                        399
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\llcorner",
                                    "score": 0.8
                                },
                                {
                                    "bbox": [
                                        165,
                                        386,
                                        442,
                                        401
                                    ],
                                    "type": "text",
                                    "content": "EINVAL：参数 shmid 是个无效的标识符或 cmd 为无效命令。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        163,
                        402,
                        459,
                        431
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                165,
                                402,
                                460,
                                416
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        165,
                                        402,
                                        460,
                                        416
                                    ],
                                    "type": "text",
                                    "content": "EFAULT：参数 cmd 为 IPC_SET 或 IPC_STAT，但是参数 buf 却",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                165,
                                418,
                                246,
                                431
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        165,
                                        418,
                                        246,
                                        431
                                    ],
                                    "type": "text",
                                    "content": "指向无效的地址。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        163,
                        433,
                        383,
                        446
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                165,
                                433,
                                383,
                                447
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        165,
                                        433,
                                        383,
                                        447
                                    ],
                                    "type": "text",
                                    "content": "EIDRM：参数shmid所指的共享内存已经删除。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        163,
                        449,
                        460,
                        493
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                165,
                                450,
                                459,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        165,
                                        450,
                                        459,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "EPERM：参数 cmd 为 IPC_SET 或 IPC_RMID，但是调用进程并",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                165,
                                465,
                                461,
                                477
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        165,
                                        465,
                                        461,
                                        477
                                    ],
                                    "type": "text",
                                    "content": "不是创建者，所有者或超级用户，并且调用进程没有授予这些组",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                165,
                                481,
                                225,
                                494
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        165,
                                        481,
                                        225,
                                        494
                                    ],
                                    "type": "text",
                                    "content": "或域的权限。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        163,
                        496,
                        477,
                        509
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                164,
                                496,
                                479,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        164,
                                        496,
                                        479,
                                        510
                                    ],
                                    "type": "text",
                                    "content": "EACCESS：参数cmd 为 IPC_STAT，但是没有权限读写该共享内存。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        111,
                        512,
                        156,
                        524
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                511,
                                158,
                                527
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        516,
                                        120,
                                        519
                                    ],
                                    "type": "text",
                                    "content": "",
                                    "score": 0.0
                                },
                                {
                                    "bbox": [
                                        132,
                                        511,
                                        158,
                                        527
                                    ],
                                    "type": "text",
                                    "content": "说明",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        530,
                        505,
                        579
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                531,
                                505,
                                543
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        531,
                                        505,
                                        543
                                    ],
                                    "type": "text",
                                    "content": "该系统调用允许用户得到一块共享内存的相关信息，设置一块共享内存的所有者，组以",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                549,
                                506,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        549,
                                        506,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "及读写权限，或者销毁一块共享内存。以shmid为标识符的共享内存的相关信息将被放在一",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                566,
                                248,
                                579
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        566,
                                        248,
                                        579
                                    ],
                                    "type": "text",
                                    "content": "个shmid_ds的数据结构体中返回。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        182,
                        617,
                        420,
                        638
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                183,
                                615,
                                420,
                                640
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        183,
                                        615,
                                        242,
                                        640
                                    ],
                                    "type": "text",
                                    "content": "实验五",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        254,
                                        616,
                                        420,
                                        640
                                    ],
                                    "type": "text",
                                    "content": "简单文件系统的实现",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        664,
                        273,
                        681
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                664,
                                274,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        664,
                                        274,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "5.1 设计目的和内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        711,
                        169,
                        724
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                712,
                                170,
                                724
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        712,
                                        170,
                                        724
                                    ],
                                    "type": "text",
                                    "content": "1. 设计目的",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        737,
                        505,
                        751
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                739,
                                505,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        739,
                                        505,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "通过具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现，加深",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 65
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        336,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                76,
                                337,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        76,
                                        337,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "对文件系统内部数据结构、功能以及实现过程的理解。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        98,
                        170,
                        111
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                98,
                                170,
                                112
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        98,
                                        170,
                                        112
                                    ],
                                    "type": "text",
                                    "content": "2．内容要求",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        121,
                        507,
                        275
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                121,
                                507,
                                166
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        123,
                                        505,
                                        134
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                123,
                                                505,
                                                134
                                            ],
                                            "type": "text",
                                            "content": "(1)在内存中开辟一个虚拟磁盘空间作为文件存储分区，在其上实现一个简单的基于多",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        138,
                                        505,
                                        149
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                138,
                                                505,
                                                149
                                            ],
                                            "type": "text",
                                            "content": "级目录的单用户单任务系统中的文件系统。在退出该文件系统的使用时，应将该虚拟文件系",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        154,
                                        495,
                                        165
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                154,
                                                495,
                                                165
                                            ],
                                            "type": "text",
                                            "content": "统以一个文件的方式保存到磁盘上，以便下次可以再将它恢复到内存的虚拟磁盘空间中。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                109,
                                169,
                                386,
                                181
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        169,
                                        387,
                                        181
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                169,
                                                387,
                                                181
                                            ],
                                            "type": "text",
                                            "content": "(2)文件存储空间的分配可采用显式链接分配或其他的办法。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                184,
                                506,
                                213
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        185,
                                        505,
                                        196
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                185,
                                                505,
                                                196
                                            ],
                                            "type": "text",
                                            "content": "(3)空闲磁盘空间的管理可选择位示图或其他的办法。如果采用位示图来管理文件存储",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        200,
                                        399,
                                        212
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                200,
                                                399,
                                                212
                                            ],
                                            "type": "text",
                                            "content": "空间，并采用显式链接分配方式，那么可以将位示图合并到 FAT中。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                215,
                                506,
                                259
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        216,
                                        505,
                                        227
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                216,
                                                505,
                                                227
                                            ],
                                            "type": "text",
                                            "content": "(4)文件目录结构采用多级目录结构。为了简单起见，可以不使用索引结点，其中的每",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        231,
                                        505,
                                        243
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                231,
                                                505,
                                                243
                                            ],
                                            "type": "text",
                                            "content": "个目录项应包含文件名、物理地址、长度等信息，还可以通过目录项实现对文件的读和写的",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        246,
                                        119,
                                        261
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                246,
                                                119,
                                                261
                                            ],
                                            "type": "text",
                                            "content": "保护。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                109,
                                262,
                                239,
                                275
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        112,
                                        263,
                                        238,
                                        275
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                112,
                                                263,
                                                238,
                                                275
                                            ],
                                            "type": "text",
                                            "content": "(5)要求提供以下操作命令：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        278,
                        506,
                        306
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                129,
                                279,
                                505,
                                290
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        129,
                                        279,
                                        505,
                                        290
                                    ],
                                    "type": "text",
                                    "content": " my_format：对文件存储器进行格式化，即按照文件系统的结构对虚拟磁盘空",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                110,
                                295,
                                462,
                                306
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        295,
                                        462,
                                        306
                                    ],
                                    "type": "text",
                                    "content": "间进行布局，并在其上创建根目录以及用于管理文件存储空间等的数据结构。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        309,
                        301,
                        478
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                129,
                                309,
                                280,
                                322
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        310,
                                        281,
                                        322
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                310,
                                                281,
                                                322
                                            ],
                                            "type": "text",
                                            "content": "my_mkdir：用于创建子目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                325,
                                281,
                                338
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        325,
                                        282,
                                        337
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                325,
                                                282,
                                                337
                                            ],
                                            "type": "text",
                                            "content": "my_rmdir：用于删除子目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                340,
                                296,
                                353
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        341,
                                        298,
                                        353
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                341,
                                                298,
                                                353
                                            ],
                                            "type": "text",
                                            "content": "my_ls：用于显示目录中的内容。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                356,
                                275,
                                368
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        356,
                                        276,
                                        368
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                356,
                                                276,
                                                368
                                            ],
                                            "type": "text",
                                            "content": "my_cd：用于更改当前目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                371,
                                275,
                                385
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        372,
                                        276,
                                        384
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                372,
                                                276,
                                                384
                                            ],
                                            "type": "text",
                                            "content": "my_create：用于创建文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                387,
                                264,
                                399
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        387,
                                        265,
                                        400
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                387,
                                                265,
                                                400
                                            ],
                                            "type": "text",
                                            "content": "my_open：用于打开文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                402,
                                270,
                                415
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        402,
                                        271,
                                        415
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                402,
                                                271,
                                                415
                                            ],
                                            "type": "text",
                                            "content": "my_close：用于关闭文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                418,
                                259,
                                431
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        418,
                                        261,
                                        431
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                418,
                                                261,
                                                431
                                            ],
                                            "type": "text",
                                            "content": "my_write：用于写文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                433,
                                255,
                                446
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        434,
                                        255,
                                        446
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                434,
                                                255,
                                                446
                                            ],
                                            "type": "text",
                                            "content": "my_read：用于读文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                449,
                                255,
                                462
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        449,
                                        255,
                                        462
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                449,
                                                255,
                                                462
                                            ],
                                            "type": "text",
                                            "content": "my_rm：用于删除文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                129,
                                465,
                                301,
                                478
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        146,
                                        465,
                                        302,
                                        478
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                146,
                                                465,
                                                302,
                                                478
                                            ],
                                            "type": "text",
                                            "content": "my_exitsys：用于退出文件系统。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        488,
                        220,
                        501
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                487,
                                220,
                                502
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        487,
                                        220,
                                        502
                                    ],
                                    "type": "text",
                                    "content": "3．学时安排（12 学时）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        519,
                        174,
                        532
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                518,
                                176,
                                533
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        518,
                                        176,
                                        533
                                    ],
                                    "type": "text",
                                    "content": "4． 开发平台",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        543,
                        289,
                        556
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                541,
                                290,
                                558
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        541,
                                        290,
                                        558
                                    ],
                                    "type": "text",
                                    "content": "Linux 环境，gcc，gdb，vim 或 gedit 等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        565,
                        149,
                        578
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                565,
                                149,
                                580
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        565,
                                        149,
                                        580
                                    ],
                                    "type": "text",
                                    "content": "5．思考",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        589,
                        506,
                        665
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 29,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                589,
                                505,
                                617
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        590,
                                        505,
                                        602
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                590,
                                                505,
                                                602
                                            ],
                                            "type": "text",
                                            "content": "(1)我们的数据结构中的文件物理地址信息是使用 C 语言的指针类型、还是整型，为什",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        603,
                                        110,
                                        620
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                603,
                                                110,
                                                620
                                            ],
                                            "type": "text",
                                            "content": "么？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                620,
                                387,
                                634
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        112,
                                        620,
                                        387,
                                        634
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                112,
                                                620,
                                                387,
                                                634
                                            ],
                                            "type": "text",
                                            "content": "(2)如果引入磁盘索引结点，上述实现过程需要作哪些修改？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                636,
                                506,
                                665
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        637,
                                        505,
                                        648
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                637,
                                                505,
                                                648
                                            ],
                                            "type": "text",
                                            "content": "(3)如果设计的是一个单用户多任务文件系统，则系统需要进行哪些扩充（尤其要考虑",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        653,
                                        442,
                                        664
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                653,
                                                442,
                                                664
                                            ],
                                            "type": "text",
                                            "content": "读写指针问题）？如果设计的是一个多用户文件系统，则又要进行哪些扩充？",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        681,
                        175,
                        694
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                682,
                                176,
                                694
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        682,
                                        176,
                                        694
                                    ],
                                    "type": "text",
                                    "content": "5.2 预备知识",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        718,
                        247,
                        731
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                718,
                                246,
                                733
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        718,
                                        246,
                                        733
                                    ],
                                    "type": "text",
                                    "content": "5.2.1 FAT 文件系统介绍",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        750,
                        149,
                        762
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                749,
                                149,
                                764
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        749,
                                        149,
                                        764
                                    ],
                                    "type": "text",
                                    "content": "1．概述",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 66
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        507,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                76,
                                504,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        76,
                                        504,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "FAT文件系统是微软公司在其早期的操作系统MS-DOS及Windows9x中采用的文件系统，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                95,
                                505,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        505,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "它被设计用来管理小容量的磁盘空间。FAT文件系统是以他的文件组织方式——文件分配表",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                93,
                                113,
                                505,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        93,
                                        113,
                                        505,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "（file allocation table，FAT）命名的，文件分配表的每个表项中存放某文件的下一个盘",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                132,
                                499,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        132,
                                        499,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "块号，而该文件的起始盘块号则保存在它的文件控制块 FCB中。在文件分配表中，一般用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                148,
                                505,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        148,
                                        505,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "FFFF来标识文件的结束；用 0000来标识某个逻辑块未被分配，即是空闲块。为了提高文件",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                166,
                                506,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        166,
                                        506,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "系统的可靠性，在逻辑磁盘上通常设置两张文件分配表，它们互为备份。此外，文件分配表",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                185,
                                504,
                                196
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        185,
                                        504,
                                        196
                                    ],
                                    "type": "text",
                                    "content": "必须存放在逻辑磁盘上的固定位置，而根目录区通常位于 FAT2之后，以便操作系统在启动",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                203,
                                326,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        203,
                                        326,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "时能够定位所需的文件，其磁盘布局如图3-1所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        110,
                        216,
                        431,
                        246
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                216,
                                431,
                                246
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        216,
                                        431,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                216,
                                                431,
                                                246
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>引导块</td><td>FAT1</td><td>FAT2</td><td>根目录区</td><td>数据区</td></tr></table>",
                                            "image_path": "fa8c75bfbf6febaed460ddd9ce00151034952a82b7364ccd37d3153c0c5f8433.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 2
                },
                {
                    "bbox": [
                        176,
                        251,
                        317,
                        264
                    ],
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                178,
                                252,
                                316,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        178,
                                        252,
                                        316,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "图 5-1 FAT文件系统磁盘布局",
                                    "score": 1.0
                                }
                            ]
                        }
                    ],
                    "type": "text"
                },
                {
                    "bbox": [
                        87,
                        269,
                        506,
                        319
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                269,
                                505,
                                282
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        269,
                                        505,
                                        282
                                    ],
                                    "type": "text",
                                    "content": "上述磁盘布局中，引导块中主要存放了用于描述分区的各种信息，包括逻辑块的大小、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                288,
                                505,
                                300
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        288,
                                        505,
                                        300
                                    ],
                                    "type": "text",
                                    "content": "文件分配表的大小及位置、根目录的大小及位置等。除此之外，用于加载操作系统内核的引",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                306,
                                211,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        306,
                                        211,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "导程序也存储在引导块中。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        322,
                        508,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                324,
                                505,
                                335
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        324,
                                        505,
                                        335
                                    ],
                                    "type": "text",
                                    "content": "FAT 文件系统家族又分为FAT12、FAT16、FAT32三种类型，这里的数字表示文件分配表",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                342,
                                498,
                                354
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        342,
                                        498,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "中每个表项（即簇号）所占的位数，即FAT12中每个表项占 1.5个字节（12位），FAT16",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                359,
                                502,
                                372
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        359,
                                        502,
                                        372
                                    ],
                                    "type": "text",
                                    "content": "中每个表项占2个字节（16位），FAT32中每个表项占 4个字节（32 位）。由于 FAT文件",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                377,
                                499,
                                389
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        377,
                                        446,
                                        389
                                    ],
                                    "type": "text",
                                    "content": "系统是以簇为单位为文件分配磁盘空间的（一个簇是一组连续的扇区，通常包含",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        447,
                                        377,
                                        457,
                                        389
                                    ],
                                    "type": "inline_equation",
                                    "content": "2 ^ { \\mathfrak { n } }",
                                    "score": 0.66
                                },
                                {
                                    "bbox": [
                                        458,
                                        377,
                                        499,
                                        389
                                    ],
                                    "type": "text",
                                    "content": "个扇区），",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                396,
                                505,
                                407
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        396,
                                        505,
                                        407
                                    ],
                                    "type": "text",
                                    "content": "因此，FAT32比FAT12 和FAT16支持更多的簇数、更小的簇大小和更大的磁盘容量，从而大",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                414,
                                505,
                                426
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        414,
                                        505,
                                        426
                                    ],
                                    "type": "text",
                                    "content": "大提高磁盘空间的利用率。通常，FAT12适用于小容量磁盘，如软盘；FAT16是 MS-DOS的文",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                433,
                                418,
                                444
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        433,
                                        418,
                                        444
                                    ],
                                    "type": "text",
                                    "content": "件系统；FAT32是 Windows9x 中的主要文件系统，开始支持大容量磁盘。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        453,
                        199,
                        466
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                454,
                                199,
                                466
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        454,
                                        199,
                                        466
                                    ],
                                    "type": "text",
                                    "content": "2．文件控制块FCB",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        480,
                        505,
                        546
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                481,
                                500,
                                492
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        481,
                                        500,
                                        492
                                    ],
                                    "type": "text",
                                    "content": "为了正确、方便地操作文件，必须设置相应的数据结构用于存放文件的描述和控制信",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                498,
                                505,
                                510
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        498,
                                        505,
                                        510
                                    ],
                                    "type": "text",
                                    "content": "息，常用的数据结构有文件控制块（简称FCB）和索引节点（简称 i节点）。在 FAT文件系",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                517,
                                505,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        517,
                                        505,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "统中使用文件控制块。文件与文件控制块一一对应，而文件控制块的有序集合就称为文件目",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                535,
                                295,
                                546
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        535,
                                        295,
                                        546
                                    ],
                                    "type": "text",
                                    "content": "录，即一个文件控制块就是一个文件目录项。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        549,
                        509,
                        577
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                550,
                                509,
                                560
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        550,
                                        509,
                                        560
                                    ],
                                    "type": "text",
                                    "content": "虽然不同文件系统的文件控制块的内容和格式不完全相同，但通常都包括以下三类信息：",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                565,
                                263,
                                577
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        565,
                                        263,
                                        577
                                    ],
                                    "type": "text",
                                    "content": "基本信息、存取控制信息和使用信息。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        580,
                        506,
                        655
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                580,
                                506,
                                608
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        581,
                                        505,
                                        592
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                581,
                                                505,
                                                592
                                            ],
                                            "type": "text",
                                            "content": "（1）基本信息。包括文件名、用户名、文件类型、文件的物理地址、文件长度、文件",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        596,
                                        211,
                                        608
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                596,
                                                211,
                                                608
                                            ],
                                            "type": "text",
                                            "content": "的逻辑结构和物理结构等。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                112,
                                611,
                                467,
                                624
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        611,
                                        468,
                                        624
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                611,
                                                468,
                                                624
                                            ],
                                            "type": "text",
                                            "content": "（2）存取控制信息。一般分别给出文件主、伙伴用户、一般用户的存取权限。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                626,
                                506,
                                655
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        628,
                                        505,
                                        639
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                628,
                                                505,
                                                639
                                            ],
                                            "type": "text",
                                            "content": "（3）使用信息。包括文件的建立日期及时间、上次存取文件的日期及时间、当前的使",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        643,
                                        138,
                                        655
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                643,
                                                138,
                                                655
                                            ],
                                            "type": "text",
                                            "content": "用信息等。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        657,
                        506,
                        686
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                659,
                                505,
                                670
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        659,
                                        505,
                                        670
                                    ],
                                    "type": "text",
                                    "content": "以MS-DOS（使用 FAT16文件系统）为例，它的每个文件控制块包括32个字节，其字节",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                674,
                                199,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        674,
                                        199,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "分配情况如图3-2所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        112,
                        689,
                        401,
                        734
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                112,
                                689,
                                401,
                                734
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        112,
                                        689,
                                        401,
                                        734
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                112,
                                                689,
                                                401,
                                                734
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td colspan=\"8\">字节 8B 3B 1B 10B 2B 2B 2B 4B</td></tr><tr><td>文件名</td><td>扩展名</td><td>属性</td><td>保留</td><td>时间</td><td>日期</td><td>首块号</td><td>大小</td></tr></table>",
                                            "image_path": "6af0a7aec88b437dc381f3b39b135df7126b563e642ffa373b2993c72cae56bc.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 14,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 14
                },
                {
                    "bbox": [
                        165,
                        735,
                        301,
                        748
                    ],
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                168,
                                736,
                                299,
                                748
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        168,
                                        736,
                                        299,
                                        748
                                    ],
                                    "type": "text",
                                    "content": "图 5-2 MS-DOS 的文件控制块",
                                    "score": 1.0
                                }
                            ]
                        }
                    ],
                    "type": "text"
                },
                {
                    "bbox": [
                        108,
                        751,
                        506,
                        765
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                751,
                                505,
                                764
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        751,
                                        505,
                                        764
                                    ],
                                    "type": "text",
                                    "content": "其中属性字段占一个字节，它的每一位用来表示该文件是否具有某种属性，如果某一位",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 67
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        72,
                        417,
                        85
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                89,
                                73,
                                417,
                                86
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        73,
                                        417,
                                        86
                                    ],
                                    "type": "text",
                                    "content": "的值为 1，则表示该文件具有该属性。各位所表示的属性如表 3-1 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        105,
                        101,
                        478,
                        137
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                224,
                                89,
                                334,
                                100
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        226,
                                        89,
                                        334,
                                        101
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                226,
                                                89,
                                                334,
                                                101
                                            ],
                                            "type": "text",
                                            "content": "表5-1 文件属性对照表",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "table_caption"
                        },
                        {
                            "bbox": [
                                105,
                                101,
                                478,
                                137
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        105,
                                        101,
                                        478,
                                        137
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                105,
                                                101,
                                                478,
                                                137
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td>位</td><td>7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td>0</td></tr><tr><td>属性</td><td>保留</td><td>保留</td><td>存档</td><td>子目录</td><td>卷标</td><td>系统文件</td><td>隐藏</td><td>只读</td></tr></table>",
                                            "image_path": "7984fb35be11dd335935b4ebdd2f35eb4e11f76ebc6d13e2b6b3e25ca7e6eb5d.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 3,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 3
                },
                {
                    "bbox": [
                        108,
                        159,
                        169,
                        173
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                159,
                                170,
                                173
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        159,
                                        170,
                                        173
                                    ],
                                    "type": "text",
                                    "content": "3．根目录区",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        186,
                        504,
                        272
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                187,
                                499,
                                199
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        187,
                                        499,
                                        199
                                    ],
                                    "type": "text",
                                    "content": "FAT12、FAT16的根目录区是固定区域、固定大小的，位于第二个 FAT之后，如图 3-1",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                205,
                                504,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        205,
                                        504,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "所示，且占据若干连续扇区，其中 FAT12占14个扇区，一共 224个根目录项；而 FAT16占",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                223,
                                505,
                                235
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        223,
                                        505,
                                        235
                                    ],
                                    "type": "text",
                                    "content": "32个扇区，最多保存512个目录项，作为系统区的一部分。FAT32的根目录是作为文件处理",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                241,
                                505,
                                253
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        241,
                                        505,
                                        253
                                    ],
                                    "type": "text",
                                    "content": "的，采用与子目录文件相同的管理方式，其位置不是固定的，不过一般情况也是位于第二个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                259,
                                492,
                                271
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        259,
                                        492,
                                        271
                                    ],
                                    "type": "text",
                                    "content": "FAT之后的，其大小可视需要增加，因此根目录下的文件数目不再受最多512 个的限制。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        280,
                        274,
                        294
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                280,
                                275,
                                296
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        280,
                                        275,
                                        296
                                    ],
                                    "type": "text",
                                    "content": "5.2.2 几个 C 语言库函数介绍",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        307,
                        505,
                        374
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                308,
                                505,
                                320
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        308,
                                        505,
                                        320
                                    ],
                                    "type": "text",
                                    "content": "由于我们的文件系统是建立在内存的虚拟磁盘上的，在退出文件系统的时候必须以一个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                326,
                                505,
                                338
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        326,
                                        505,
                                        338
                                    ],
                                    "type": "text",
                                    "content": "文件的形式保存到磁盘上；而在启动文件系统的时候必须从磁盘上将该文件读入到内存的虚",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                344,
                                499,
                                356
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        344,
                                        499,
                                        356
                                    ],
                                    "type": "text",
                                    "content": "拟磁盘中。下面介绍几个可能会用到的C库函数，在使用这些库函数之前必须包含头文件",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                91,
                                360,
                                151,
                                375
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        91,
                                        360,
                                        151,
                                        375
                                    ],
                                    "type": "text",
                                    "content": "“stdio.h”。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        384,
                        229,
                        397
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                382,
                                229,
                                400
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        382,
                                        229,
                                        400
                                    ],
                                    "type": "text",
                                    "content": "1．打开文件函数 fopen()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        411,
                        429,
                        460
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                411,
                                429,
                                424
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        410,
                                        430,
                                        425
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                410,
                                                430,
                                                425
                                            ],
                                            "type": "text",
                                            "content": "（1）格式：FILE *fopen(const char *filename,const char *mode)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                428,
                                321,
                                442
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        428,
                                        321,
                                        442
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                428,
                                                321,
                                                442
                                            ],
                                            "type": "text",
                                            "content": "（2）功能：按照指定打开方式打开指定文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                447,
                                204,
                                460
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        448,
                                        205,
                                        460
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                448,
                                                205,
                                                460
                                            ],
                                            "type": "text",
                                            "content": "（3）输入参数说明：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        465,
                        373,
                        478
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                465,
                                374,
                                479
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        465,
                                        374,
                                        479
                                    ],
                                    "type": "text",
                                    "content": "filename：待打开的文件名，如果不存在就创建该文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        483,
                        278,
                        495
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                113,
                                483,
                                279,
                                497
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        113,
                                        483,
                                        144,
                                        497
                                    ],
                                    "type": "text",
                                    "content": "mode：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        155,
                                        483,
                                        279,
                                        495
                                    ],
                                    "type": "text",
                                    "content": "文件打开方式，常用的有：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        497,
                        504,
                        650
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                497,
                                344,
                                510
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        133,
                                        495,
                                        346,
                                        512
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                133,
                                                497,
                                                150,
                                                509
                                            ],
                                            "type": "inline_equation",
                                            "content": "\" \\mathrm { r } ^ { \\prime \\prime }",
                                            "score": 0.75
                                        },
                                        {
                                            "bbox": [
                                                151,
                                                495,
                                                346,
                                                512
                                            ],
                                            "type": "text",
                                            "content": "：为读而打开文本文件（不存在则出错）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                513,
                                502,
                                540
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        512,
                                        503,
                                        527
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                516,
                                                124,
                                                523
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                513,
                                                150,
                                                525
                                            ],
                                            "type": "inline_equation",
                                            "content": "\" \\mathrm { w } ^ { \\prime \\prime }",
                                            "score": 0.77
                                        },
                                        {
                                            "bbox": [
                                                150,
                                                512,
                                                503,
                                                527
                                            ],
                                            "type": "text",
                                            "content": "：为写而打开文本文件（若不存在则创建该文件；反之，则从文件起始位置写,",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        528,
                                        180,
                                        542
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                528,
                                                180,
                                                542
                                            ],
                                            "type": "text",
                                            "content": "原内容将被覆盖）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                544,
                                502,
                                571
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        117,
                                        543,
                                        503,
                                        558
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                117,
                                                546,
                                                124,
                                                555
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                544,
                                                150,
                                                556
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm { ^ { \\prime \\prime } a ^ { \\prime \\prime } }",
                                            "score": 0.74
                                        },
                                        {
                                            "bbox": [
                                                151,
                                                543,
                                                503,
                                                558
                                            ],
                                            "type": "text",
                                            "content": "：为在文件末尾添加数据而打开文本文件。（若不存在则创建该文件；反之,",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        560,
                                        190,
                                        572
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                560,
                                                190,
                                                572
                                            ],
                                            "type": "text",
                                            "content": "在原文件末尾追加）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                575,
                                504,
                                602
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        574,
                                        506,
                                        589
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                578,
                                                125,
                                                586
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                575,
                                                155,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\" { \\mathrm { r } } + \"",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                156,
                                                574,
                                                506,
                                                589
                                            ],
                                            "type": "text",
                                            "content": "：为读和写而打开文本文件。（读时，从头开始；在写数据时,新数据只覆盖",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        591,
                                        213,
                                        603
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                591,
                                                213,
                                                603
                                            ],
                                            "type": "text",
                                            "content": "所占的空间，其后不变) 。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                606,
                                503,
                                634
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        605,
                                        505,
                                        620
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                609,
                                                124,
                                                617
                                            ],
                                            "type": "text",
                                            "content": "",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                133,
                                                606,
                                                155,
                                                618
                                            ],
                                            "type": "inline_equation",
                                            "content": "\" _ { \\mathbb { W } ^ { + } } \\prime \\prime",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                156,
                                                605,
                                                505,
                                                620
                                            ],
                                            "type": "text",
                                            "content": "：首先建立一个新文件，进行写操作，随后可以从头开始读。(若文件存在，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        622,
                                        190,
                                        634
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                622,
                                                190,
                                                634
                                            ],
                                            "type": "text",
                                            "content": "原内容将全部消失) 。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                637,
                                480,
                                650
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        133,
                                        638,
                                        482,
                                        650
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                133,
                                                638,
                                                155,
                                                650
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm { ^ { \\prime \\prime } a } + \\mathrm { ^ { \\prime \\prime } }",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                156,
                                                638,
                                                482,
                                                650
                                            ],
                                            "type": "text",
                                            "content": "：功能与\"a\"相同；只是在文件末尾添加新的数据后，可以从头开始读。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        656,
                        502,
                        687
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                656,
                                502,
                                670
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        656,
                                        502,
                                        670
                                    ],
                                    "type": "text",
                                    "content": "另外，上述模式字符串中都可以加一个“b”字符，如 rb、wb、ab、rb+、wb+、ab+等",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                674,
                                460,
                                687
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        674,
                                        460,
                                        687
                                    ],
                                    "type": "text",
                                    "content": "组合，字符“b”表示 fopen() 函数打开的文件为二进制文件，而非纯文字文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        692,
                        293,
                        705
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                692,
                                295,
                                705
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        692,
                                        295,
                                        705
                                    ],
                                    "type": "text",
                                    "content": "（4）输出：一个指向 FILE类型的指针。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        714,
                        234,
                        728
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                714,
                                235,
                                729
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        714,
                                        235,
                                        729
                                    ],
                                    "type": "text",
                                    "content": "2．关闭文件函数 fclose()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        741,
                        304,
                        755
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                741,
                                306,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        741,
                                        306,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "（1）格式：int fclose(FILE * stream);",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 68
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        505,
                        107
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                76,
                                505,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        76,
                                        505,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "（2）功能：用来关闭先前fopen()打开的一个文件。此动作会让缓冲区内的数据写入文",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                95,
                                263,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        263,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "件中，并释放系统所提供的文件资源。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        111,
                        205,
                        125
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                113,
                                205,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        113,
                                        205,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "（3）输入参数说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        130,
                        440,
                        143
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                130,
                                443,
                                144
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        130,
                                        443,
                                        144
                                    ],
                                    "type": "text",
                                    "content": "stream：指向要关闭文件的指针，它是先前执行fopen()函数的返回值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        148,
                        498,
                        161
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                148,
                                500,
                                162
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        148,
                                        500,
                                        162
                                    ],
                                    "type": "text",
                                    "content": "（4）输出：若关闭文件成功则返回0；有错误发生时则返回EOF并把错误代码存到errno。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        170,
                        218,
                        184
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                169,
                                218,
                                185
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        169,
                                        218,
                                        185
                                    ],
                                    "type": "text",
                                    "content": "3．读文件函数 fread()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        197,
                        503,
                        245
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                197,
                                503,
                                211
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        195,
                                        504,
                                        211
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                195,
                                                504,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "（1）格式：size_t fread( void *buffer, size_t size, size_t count, FILE *stream )；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                114,
                                215,
                                268,
                                227
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        216,
                                        268,
                                        227
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                216,
                                                268,
                                                227
                                            ],
                                            "type": "text",
                                            "content": "（2）功能：读二进制文件到内存。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                114,
                                232,
                                205,
                                245
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        233,
                                        205,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                233,
                                                205,
                                                246
                                            ],
                                            "type": "text",
                                            "content": "（3）输入参数说明：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        251,
                        330,
                        264
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                252,
                                331,
                                264
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        252,
                                        331,
                                        264
                                    ],
                                    "type": "text",
                                    "content": "buffer：用于存放输入数据的缓冲区的首地址；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        269,
                        420,
                        282
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                269,
                                421,
                                284
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        269,
                                        421,
                                        284
                                    ],
                                    "type": "text",
                                    "content": "stream：使用fopen()打开的文件的指针，用于指示要读取的文件；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        287,
                        257,
                        300
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                287,
                                258,
                                301
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        287,
                                        143,
                                        301
                                    ],
                                    "type": "text",
                                    "content": "size：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        158,
                                        287,
                                        258,
                                        300
                                    ],
                                    "type": "text",
                                    "content": "每个数据块的字节数；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        306,
                        267,
                        317
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                306,
                                268,
                                318
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        306,
                                        268,
                                        318
                                    ],
                                    "type": "text",
                                    "content": "count： 要读入的数据块的个数；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        323,
                        289,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                323,
                                290,
                                336
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        323,
                                        290,
                                        336
                                    ],
                                    "type": "text",
                                    "content": "size*count：表示要求读取的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        341,
                        289,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                342,
                                290,
                                354
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        342,
                                        290,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "（4）输出：实际读取的数据块的个数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        363,
                        223,
                        376
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                363,
                                224,
                                377
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        363,
                                        224,
                                        377
                                    ],
                                    "type": "text",
                                    "content": "4．写文件函数 fwrite()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        390,
                        489,
                        456
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 20,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                390,
                                489,
                                421
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        390,
                                        490,
                                        404
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                390,
                                                490,
                                                404
                                            ],
                                            "type": "text",
                                            "content": "（1）格式：size_t fwite(const void *buffer,size_t size,size_t count,FILE",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        86,
                                        407,
                                        138,
                                        421
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                407,
                                                138,
                                                421
                                            ],
                                            "type": "text",
                                            "content": "*stream)；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                426,
                                288,
                                439
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        426,
                                        289,
                                        439
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                426,
                                                289,
                                                439
                                            ],
                                            "type": "text",
                                            "content": "（2）功能：将数据写到二进制文件中。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                444,
                                204,
                                456
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        444,
                                        205,
                                        456
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                444,
                                                205,
                                                456
                                            ],
                                            "type": "text",
                                            "content": "（3）输入参数说明：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        461,
                        330,
                        475
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                462,
                                331,
                                476
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        462,
                                        331,
                                        476
                                    ],
                                    "type": "text",
                                    "content": "buffer：用于存放输出数据的缓冲区的首地址；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        480,
                        420,
                        493
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                479,
                                421,
                                494
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        479,
                                        421,
                                        494
                                    ],
                                    "type": "text",
                                    "content": "stream：使用fopen()打开的文件的指针，用于指示要写出的文件；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        498,
                        257,
                        510
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                497,
                                258,
                                512
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        498,
                                        143,
                                        512
                                    ],
                                    "type": "text",
                                    "content": "size：",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        157,
                                        497,
                                        258,
                                        511
                                    ],
                                    "type": "text",
                                    "content": "每个数据块的字节数；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        516,
                        267,
                        528
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 24,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                517,
                                268,
                                528
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        517,
                                        268,
                                        528
                                    ],
                                    "type": "text",
                                    "content": "count： 要写出的数据块的个数；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        534,
                        289,
                        546
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 25,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                534,
                                290,
                                547
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        534,
                                        290,
                                        547
                                    ],
                                    "type": "text",
                                    "content": "size*count：表示要求写出的字符数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        552,
                        288,
                        565
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                552,
                                289,
                                565
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        552,
                                        289,
                                        565
                                    ],
                                    "type": "text",
                                    "content": "（4）输出：实际写出的数据块的个数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        574,
                        250,
                        587
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                574,
                                249,
                                587
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        574,
                                        249,
                                        587
                                    ],
                                    "type": "text",
                                    "content": "5．判断文件结束函数 feof ()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        114,
                        601,
                        321,
                        631
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 30,
                    "blocks": [
                        {
                            "bbox": [
                                114,
                                601,
                                289,
                                613
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        599,
                                        289,
                                        616
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                599,
                                                289,
                                                616
                                            ],
                                            "type": "text",
                                            "content": "（1）格式：int feof(FILE * stream)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                114,
                                618,
                                321,
                                631
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        619,
                                        321,
                                        632
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                619,
                                                321,
                                                632
                                            ],
                                            "type": "text",
                                            "content": "（2）功能：用来判断是否已读取到文件末尾。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        114,
                        637,
                        205,
                        650
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                637,
                                205,
                                650
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        637,
                                        205,
                                        650
                                    ],
                                    "type": "text",
                                    "content": "（3）输入参数说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        655,
                        423,
                        685
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 34,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                655,
                                423,
                                667
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        655,
                                        424,
                                        669
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                655,
                                                424,
                                                669
                                            ],
                                            "type": "text",
                                            "content": "stream：使用fopen()打开的文件的指针，用于指示要判断的文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                673,
                                401,
                                685
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 33,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        673,
                                        402,
                                        686
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                673,
                                                402,
                                                686
                                            ],
                                            "type": "text",
                                            "content": "（4）输出：如果已读到文件尾则返回非零值，其他情况返回 0。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        695,
                        229,
                        708
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 35,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                694,
                                229,
                                710
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        694,
                                        229,
                                        710
                                    ],
                                    "type": "text",
                                    "content": "6．定位文件函数 fseek()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        723,
                        434,
                        753
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 38,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                723,
                                434,
                                735
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        722,
                                        436,
                                        736
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                722,
                                                436,
                                                736
                                            ],
                                            "type": "text",
                                            "content": "（1）格式：int fseek( FILE *stream, long offset, int origin )；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                740,
                                336,
                                753
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 37,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        740,
                                        337,
                                        753
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                740,
                                                337,
                                                753
                                            ],
                                            "type": "text",
                                            "content": "（2）功能： 移动文件读写指针在文件中的位置。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 69
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        76,
                        204,
                        88
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                76,
                                205,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        76,
                                        205,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "（3）输入参数说明：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        94,
                        461,
                        106
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                94,
                                463,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        94,
                                        463,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "stream：使用fopen()打开的文件的指针，用于指示要定位读写指针的文件；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        112,
                        267,
                        124
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                112,
                                268,
                                126
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        112,
                                        268,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "offset：位移量，以字节为单位；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        130,
                        267,
                        142
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                131,
                                268,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        131,
                                        268,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "origin：初始位置，有三个常量：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        148,
                        293,
                        160
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                152,
                                148,
                                294,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        152,
                                        148,
                                        294,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "SEEK_CUR：读写指针当前位置；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        166,
                        251,
                        178
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                166,
                                252,
                                180
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        166,
                                        252,
                                        180
                                    ],
                                    "type": "text",
                                    "content": "SEEK_SET：文件开头；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        149,
                        185,
                        251,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                151,
                                184,
                                253,
                                197
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        151,
                                        184,
                                        253,
                                        197
                                    ],
                                    "type": "text",
                                    "content": "SEEK_END：文件末尾。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        212,
                        427,
                        226
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                211,
                                429,
                                227
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        211,
                                        429,
                                        227
                                    ],
                                    "type": "text",
                                    "content": "当 origin 值为 SEEK_CUR 或 SEEK_END 时，参数 offset 可以为负值。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        242,
                        235,
                        254
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                243,
                                235,
                                255
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        243,
                                        235,
                                        255
                                    ],
                                    "type": "text",
                                    "content": "5.3 实例系统的设计与实现",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        275,
                        505,
                        323
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                275,
                                505,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        275,
                                        505,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "本实例系统是仿照FAT16文件系统来设计实现的，但根目录没有采用FAT16的固定位置、",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                293,
                                505,
                                306
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        293,
                                        505,
                                        306
                                    ],
                                    "type": "text",
                                    "content": "固定大小的根目录区，而是以根目录文件的形式来实现的，这也是目前主流文件系统对根目",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                311,
                                158,
                                324
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        311,
                                        158,
                                        324
                                    ],
                                    "type": "text",
                                    "content": "录的处理方式。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        333,
                        224,
                        346
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                333,
                                225,
                                347
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        333,
                                        225,
                                        347
                                    ],
                                    "type": "text",
                                    "content": "5.3.1 数据结构设计",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        364,
                        211,
                        377
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                364,
                                211,
                                378
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        364,
                                        211,
                                        378
                                    ],
                                    "type": "text",
                                    "content": "1．需要包含的头文件",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        391,
                        237,
                        457
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                391,
                                232,
                                403
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        391,
                                        232,
                                        404
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                391,
                                                232,
                                                404
                                            ],
                                            "type": "text",
                                            "content": "（1）#include <stdio.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                409,
                                237,
                                421
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        408,
                                        238,
                                        423
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                408,
                                                238,
                                                423
                                            ],
                                            "type": "text",
                                            "content": "（2）#include <malloc.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                428,
                                236,
                                439
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        426,
                                        238,
                                        441
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                426,
                                                238,
                                                441
                                            ],
                                            "type": "text",
                                            "content": "（3）#include <string.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                445,
                                227,
                                457
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        444,
                                        227,
                                        459
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                444,
                                                227,
                                                459
                                            ],
                                            "type": "text",
                                            "content": "（4）#include <time.h>",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        467,
                        180,
                        480
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                468,
                                180,
                                481
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        468,
                                        180,
                                        481
                                    ],
                                    "type": "text",
                                    "content": "2．定义的常量",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        494,
                        402,
                        597
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                494,
                                348,
                                507
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        494,
                                        348,
                                        508
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                494,
                                                265,
                                                508
                                            ],
                                            "type": "text",
                                            "content": "（1）#define BLOCKSIZE 1024",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                292,
                                                494,
                                                348,
                                                507
                                            ],
                                            "type": "text",
                                            "content": "磁盘块大小",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                512,
                                389,
                                524
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        511,
                                        389,
                                        527
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                511,
                                                207,
                                                527
                                            ],
                                            "type": "text",
                                            "content": "（2）#define SIZE",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                251,
                                                513,
                                                389,
                                                526
                                            ],
                                            "type": "text",
                                            "content": "1024000 虚拟磁盘空间大小",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                530,
                                402,
                                542
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        528,
                                        403,
                                        544
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                528,
                                                202,
                                                544
                                            ],
                                            "type": "text",
                                            "content": "（3）#define END",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                245,
                                                529,
                                                276,
                                                544
                                            ],
                                            "type": "text",
                                            "content": "65535",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                298,
                                                530,
                                                403,
                                                543
                                            ],
                                            "type": "text",
                                            "content": "FAT中的文件结束标志",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                548,
                                392,
                                560
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        548,
                                        392,
                                        562
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                549,
                                                207,
                                                562
                                            ],
                                            "type": "text",
                                            "content": "（4）#define FREE",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                246,
                                                549,
                                                254,
                                                560
                                            ],
                                            "type": "text",
                                            "content": "0",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                298,
                                                548,
                                                392,
                                                561
                                            ],
                                            "type": "text",
                                            "content": "FAT中盘块空闲标志",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                565,
                                384,
                                578
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        566,
                                        384,
                                        580
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                566,
                                                384,
                                                580
                                            ],
                                            "type": "text",
                                            "content": "（5）#define ROOTBLOCKNUM 2 根目录区所占盘块总数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                584,
                                394,
                                597
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        584,
                                        395,
                                        597
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                585,
                                                243,
                                                597
                                            ],
                                            "type": "text",
                                            "content": "（6）#define MAXOPENFILE",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                260,
                                                584,
                                                395,
                                                597
                                            ],
                                            "type": "text",
                                            "content": "10 最多同时打开文件个数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        607,
                        169,
                        619
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                607,
                                170,
                                620
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        607,
                                        170,
                                        620
                                    ],
                                    "type": "text",
                                    "content": "3．数据结构",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        633,
                        209,
                        645
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                634,
                                208,
                                647
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        634,
                                        208,
                                        647
                                    ],
                                    "type": "text",
                                    "content": "（1）文件控制块 FCB",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        651,
                        504,
                        664
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                652,
                                505,
                                665
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        652,
                                        505,
                                        665
                                    ],
                                    "type": "text",
                                    "content": "用于记录文件的描述和控制信息，每个文件设置一个 FCB，它也是文件的目录项的内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        669,
                        305,
                        682
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                669,
                                306,
                                682
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        669,
                                        306,
                                        682
                                    ],
                                    "type": "text",
                                    "content": "typedef struct FCB //仿照 FAT16 设置的",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        110,
                        688,
                        490,
                        755
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                110,
                                688,
                                490,
                                755
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        110,
                                        688,
                                        490,
                                        755
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                110,
                                                688,
                                                490,
                                                755
                                            ],
                                            "type": "text",
                                            "content": "char filename[8]；//文件名  \nchar exname[3]；//文件扩展名  \nunsigned char attribute; //文件属性字段：为简单起见，我们只为文件设置"
                                        }
                                    ]
                                }
                            ],
                            "index": 30,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 30,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 70
        },
        {
            "para_blocks": [
                {
                    "type": "code",
                    "bbox": [
                        108,
                        75,
                        502,
                        216
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                75,
                                502,
                                216
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        75,
                                        502,
                                        216
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                75,
                                                502,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "//了两种属性：值为0时表示目录文件，值为1时表示数据文件  \nunsigned short time;//文件创建时间  \nunsigned short data;//文件创建日期  \nunsigned short first;//文件起始盘块号  \nunsigned long length;//文件长度（字节数）  \nchar free; //表示目录项是否为空，若值为0，表示空，值为1，表示已分配  \n}fcb;"
                                        }
                                    ]
                                }
                            ],
                            "index": 1,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 1,
                    "sub_type": "code",
                    "guess_lang": "txt"
                },
                {
                    "bbox": [
                        113,
                        238,
                        210,
                        251
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                238,
                                209,
                                251
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        238,
                                        209,
                                        251
                                    ],
                                    "type": "text",
                                    "content": "（2）文件分配表 FAT",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        255,
                        507,
                        359
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                257,
                                504,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        257,
                                        504,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "在本实例中，文件分配表有两个作用：一是记录磁盘上每个文件所占据的磁盘块的块号；",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                275,
                                506,
                                286
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        506,
                                        286
                                    ],
                                    "type": "text",
                                    "content": "二是记录磁盘上哪些块已经分配出去了，哪些块是空闲的，即起到了位示图的作用。若FAT",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                293,
                                504,
                                304
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        293,
                                        504,
                                        304
                                    ],
                                    "type": "text",
                                    "content": "中某个表项的值为FREE，则表示该表项所对应的磁盘块是空闲的；若某个表项的值为 END，",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                310,
                                505,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        310,
                                        505,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "则表示所对应的磁盘块是某文件的最后一个磁盘块；若某个表项的值是其他值，则该值表示",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                328,
                                505,
                                341
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        328,
                                        505,
                                        341
                                    ],
                                    "type": "text",
                                    "content": "某文件的下一个磁盘块的块号。为了提高系统的可靠性，本实例中设置了两张 FAT表，它们",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                347,
                                263,
                                359
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        347,
                                        263,
                                        359
                                    ],
                                    "type": "text",
                                    "content": "互为备份，每个FAT占据两个磁盘块。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        364,
                        226,
                        431
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                364,
                                226,
                                431
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        364,
                                        226,
                                        431
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                364,
                                                226,
                                                431
                                            ],
                                            "type": "text",
                                            "content": "typedef struct FAT  \n{ unsigned short id; }fat;"
                                        }
                                    ]
                                }
                            ],
                            "index": 4,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 4,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        113,
                        454,
                        256,
                        466
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                454,
                                256,
                                467
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        454,
                                        256,
                                        467
                                    ],
                                    "type": "text",
                                    "content": "（3）用户打开文件表 USEROPEN",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        470,
                        507,
                        593
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                472,
                                506,
                                485
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        472,
                                        506,
                                        485
                                    ],
                                    "type": "text",
                                    "content": "当打开一个文件时，必须将文件的目录项中的所有内容全部复制到内存中，同时还要记",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                490,
                                506,
                                502
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        490,
                                        506,
                                        502
                                    ],
                                    "type": "text",
                                    "content": "录有关文件操作的动态信息，如读写指针的值等。在本实例中实现的是一个用于单用户单任",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                508,
                                505,
                                520
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        508,
                                        505,
                                        520
                                    ],
                                    "type": "text",
                                    "content": "务系统的文件系统，为简单起见，我们把用户文件描述符表和内存 FCB表合在一起，称为用",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                526,
                                505,
                                537
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        526,
                                        505,
                                        537
                                    ],
                                    "type": "text",
                                    "content": "户打开文件表，表项数目为 10，即一个用户最多可同时打开 10 个文件。然后用一个数组来",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                544,
                                505,
                                556
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        544,
                                        505,
                                        556
                                    ],
                                    "type": "text",
                                    "content": "描述，则数组下标即某个打开文件的描述符。另外，我们在用户打开文件表中还设置了一个",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                562,
                                505,
                                575
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        562,
                                        505,
                                        575
                                    ],
                                    "type": "text",
                                    "content": "字段“char dir[80]”，用来记录每个打开文件所在的目录名，以方便用户打开不同目录下",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                581,
                                221,
                                592
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        581,
                                        221,
                                        592
                                    ],
                                    "type": "text",
                                    "content": "具有相同文件名的不同文件。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        86,
                        597,
                        505,
                        700
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                597,
                                505,
                                700
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        86,
                                        597,
                                        505,
                                        700
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                597,
                                                505,
                                                700
                                            ],
                                            "type": "text",
                                            "content": "typedef struct USEROPEN  \n{ char filename[8]; //文件名 char exname[3];//文件扩展名 unsigned char attribute;//文件属性：值为0时表示目录文件，值为1时表示数据文件"
                                        }
                                    ]
                                }
                            ],
                            "index": 7,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 7,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "type": "code",
                    "bbox": [
                        128,
                        705,
                        326,
                        756
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                128,
                                705,
                                326,
                                756
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        128,
                                        705,
                                        326,
                                        756
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                128,
                                                705,
                                                326,
                                                756
                                            ],
                                            "type": "text",
                                            "content": "unsigned short time; //文件创建时间  \nunsigned short data; //文件创建日期  \nunsigned short first; //文件起始盘块号"
                                        }
                                    ]
                                }
                            ],
                            "index": 8,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 8,
                    "sub_type": "code",
                    "guess_lang": "txt"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 71
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        503,
                        106
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                76,
                                505,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        76,
                                        505,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "unsigned long length;//文件长度（对数据文件是字节数，对目录文件可以是目",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                93,
                                138,
                                108
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        93,
                                        138,
                                        108
                                    ],
                                    "type": "text",
                                    "content": "录项个数）",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        111,
                        489,
                        143
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                112,
                                489,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        112,
                                        489,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "char free；//表示目录项是否为空，若值为0，表示空，值为1，表示已分配",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                131,
                                130,
                                296,
                                143
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        131,
                                        130,
                                        296,
                                        143
                                    ],
                                    "type": "text",
                                    "content": "//前面内容是文件的 FCB中的内容。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        148,
                        504,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                131,
                                148,
                                505,
                                160
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        131,
                                        148,
                                        505,
                                        160
                                    ],
                                    "type": "text",
                                    "content": "// 下面设置的dirno和diroff记录了相应打开文件的目录项在父目录文件中的位",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                131,
                                167,
                                468,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        131,
                                        167,
                                        468,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "置，//这样如果该文件的fcb 被修改了，则要写回父目录文件时比较方便",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        184,
                        426,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                184,
                                427,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        184,
                                        427,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "int dirno; //相应打开文件的目录项在父目录文件中的盘块号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        201,
                        504,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                202,
                                506,
                                216
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        202,
                                        506,
                                        216
                                    ],
                                    "type": "text",
                                    "content": "int diroff;// 相应打开文件的目录项在父目录文件的dirno盘块中的目录项序号",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        220,
                        504,
                        251
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                221,
                                504,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        221,
                                        504,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "char dir[MAXOPENFILE][80]; //相应打开文件所在的目录名，这样方便快速检查",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                90,
                                239,
                                205,
                                248
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        90,
                                        239,
                                        205,
                                        248
                                    ],
                                    "type": "text",
                                    "content": "出指定文件是否已经打开",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        129,
                        256,
                        317,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                257,
                                316,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        257,
                                        316,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "int count; //读写指针在文件中的位置",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        127,
                        274,
                        500,
                        287
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                274,
                                501,
                                288
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        274,
                                        501,
                                        288
                                    ],
                                    "type": "text",
                                    "content": "char fcbstate; //是否修改了文件的 FCB 的内容，如果修改了置为 1，否则为 0",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        291,
                        504,
                        322
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                131,
                                292,
                                506,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        131,
                                        292,
                                        506,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "char topenfile; //表示该用户打开表项是否为空，若值为0，表示为空，否则表",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                310,
                                195,
                                323
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        310,
                                        195,
                                        323
                                    ],
                                    "type": "text",
                                    "content": "示已被某打开文件占据",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        328,
                        163,
                        341
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                327,
                                165,
                                343
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        327,
                                        165,
                                        343
                                    ],
                                    "type": "text",
                                    "content": "}useropen;",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        364,
                        204,
                        376
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                363,
                                204,
                                378
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        363,
                                        204,
                                        378
                                    ],
                                    "type": "text",
                                    "content": "（4）引导块 BLOCK0",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        381,
                        505,
                        449
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                382,
                                505,
                                394
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        382,
                                        505,
                                        394
                                    ],
                                    "type": "text",
                                    "content": "在引导块中主要存放逻辑磁盘的相关描述信息，比如磁盘块大小、磁盘块数量、文件分",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                401,
                                505,
                                412
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        401,
                                        505,
                                        412
                                    ],
                                    "type": "text",
                                    "content": "配表、根目录区、数据区在磁盘上的起始位置等。如果是引导盘，还要存放操作系统的引导",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                418,
                                505,
                                430
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        418,
                                        505,
                                        430
                                    ],
                                    "type": "text",
                                    "content": "信息。本实例是在内存的虚拟磁盘中创建一个文件系统，因此所包含的内容比较少，只有磁",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                436,
                                400,
                                449
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        436,
                                        400,
                                        449
                                    ],
                                    "type": "text",
                                    "content": "盘块大小、磁盘块数量、数据区开始位置、根目录文件开始位置等。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "code",
                    "bbox": [
                        108,
                        454,
                        462,
                        575
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                108,
                                454,
                                462,
                                575
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        108,
                                        454,
                                        462,
                                        575
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                454,
                                                462,
                                                575
                                            ],
                                            "type": "text",
                                            "content": "typedef struct BLOCK0 //引导块内容  \n{ //存储一些描述信息，如磁盘块大小、磁盘块数量、最多打开文件数等、char information[200]; unsigned short root; //根目录文件的起始盘块号 unsigned char *startblock; //虚拟磁盘上数据区开始位置}block0;"
                                        }
                                    ]
                                }
                            ],
                            "index": 13,
                            "angle": 0,
                            "type": "code_body"
                        }
                    ],
                    "index": 13,
                    "sub_type": "code",
                    "guess_lang": "c"
                },
                {
                    "bbox": [
                        128,
                        602,
                        211,
                        614
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                602,
                                211,
                                615
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        602,
                                        211,
                                        615
                                    ],
                                    "type": "text",
                                    "content": "4．全局变量定义",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        629,
                        504,
                        731
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 20,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                629,
                                384,
                                641
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        629,
                                        384,
                                        643
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                629,
                                                384,
                                                643
                                            ],
                                            "type": "text",
                                            "content": "（1）unsigned char *myvhard： 指向虚拟磁盘的起始地址",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                647,
                                436,
                                659
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        647,
                                        437,
                                        661
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                647,
                                                322,
                                                661
                                            ],
                                            "type": "text",
                                            "content": "（2）useropen openfilelist[MAXOPENFILE]：",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                339,
                                                647,
                                                437,
                                                660
                                            ],
                                            "type": "text",
                                            "content": "用户打开文件表数组",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                665,
                                504,
                                695
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        664,
                                        505,
                                        678
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                664,
                                                505,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "（3）useropen *ptrcurdir： 指向用户打开文件表中的当前目录所在打开文件表项的",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        681,
                                        117,
                                        697
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                681,
                                                117,
                                                697
                                            ],
                                            "type": "text",
                                            "content": "位置；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                701,
                                468,
                                713
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        701,
                                        469,
                                        714
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                701,
                                                242,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "（4）char currentdir[80]：",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                273,
                                                701,
                                                469,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "记录当前目录的目录名（包括目录的路径）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                719,
                                421,
                                731
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        718,
                                        421,
                                        734
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                718,
                                                253,
                                                734
                                            ],
                                            "type": "text",
                                            "content": "（5）unsigned char* startp：",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                273,
                                                719,
                                                421,
                                                731
                                            ],
                                            "type": "text",
                                            "content": "记录虚拟磁盘上数据区开始位置",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        740,
                        211,
                        754
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                740,
                                212,
                                755
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        740,
                                        212,
                                        755
                                    ],
                                    "type": "text",
                                    "content": "5．虚拟磁盘空间布局",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        369,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                369,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        369,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 72
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        506,
                        161
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                77,
                                505,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        77,
                                        505,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "由于真正的磁盘操作需要涉及到设备的驱动程序，所以本实例是在内存中申请一块空间",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                95,
                                503,
                                106
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        503,
                                        106
                                    ],
                                    "type": "text",
                                    "content": "作为虚拟磁盘使用，我们的文件系统就建立在这个虚拟磁盘上。虚拟磁盘一共划分成 1000",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                113,
                                504,
                                125
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        113,
                                        504,
                                        125
                                    ],
                                    "type": "text",
                                    "content": "个磁盘块，每个块1024个字节，其布局格式是模仿FAT文件系统设计的，其中引导块占一",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                130,
                                504,
                                142
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        130,
                                        504,
                                        142
                                    ],
                                    "type": "text",
                                    "content": "个盘块，两张FAT各占 2个盘块，剩下的空间全部是数据区，在对虚拟磁盘进行格式化的时",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                148,
                                471,
                                161
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        148,
                                        471,
                                        161
                                    ],
                                    "type": "text",
                                    "content": "候，将把数据区第1块（即虚拟磁盘的第 6 块）分配给根目录文件，如图3-3 所示：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "table",
                    "bbox": [
                        111,
                        163,
                        459,
                        206
                    ],
                    "blocks": [
                        {
                            "bbox": [
                                111,
                                163,
                                459,
                                206
                            ],
                            "lines": [
                                {
                                    "bbox": [
                                        111,
                                        163,
                                        459,
                                        206
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                111,
                                                163,
                                                459,
                                                206
                                            ],
                                            "type": "table",
                                            "html": "<table><tr><td colspan=\"4\">块数 1块 2块 2块 995块</td></tr><tr><td>引导块</td><td>FAT1</td><td>FAT2</td><td>数据区</td></tr></table>",
                                            "image_path": "dc336a5d1be7e2ccee3277b29a4afd7999c449358f141fe8629e52752ef9f5d4.jpg"
                                        }
                                    ]
                                }
                            ],
                            "index": 2,
                            "angle": 0,
                            "type": "table_body"
                        }
                    ],
                    "index": 2
                },
                {
                    "bbox": [
                        191,
                        213,
                        314,
                        226
                    ],
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                195,
                                213,
                                313,
                                225
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        195,
                                        213,
                                        313,
                                        225
                                    ],
                                    "type": "text",
                                    "content": "图5-3 虚拟磁盘空间布局",
                                    "score": 1.0
                                }
                            ]
                        }
                    ],
                    "type": "text"
                },
                {
                    "bbox": [
                        87,
                        231,
                        506,
                        262
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 4,
                    "lines": [
                        {
                            "bbox": [
                                111,
                                232,
                                505,
                                243
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        111,
                                        232,
                                        505,
                                        243
                                    ],
                                    "type": "text",
                                    "content": "当然，也可以仿照 FAT16文件系统，设置根目录区，其位置紧跟第2张 FAT 后面，大小",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                248,
                                379,
                                262
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        248,
                                        379,
                                        262
                                    ],
                                    "type": "text",
                                    "content": "也是固定的，这个思路相对要简单一点，请同学们自己去实现。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        270,
                        285,
                        285
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 5,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                270,
                                286,
                                285
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        270,
                                        286,
                                        285
                                    ],
                                    "type": "text",
                                    "content": "5.3.2 实例主要命令及函数设计",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        302,
                        213,
                        316
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                301,
                                213,
                                317
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        301,
                                        213,
                                        317
                                    ],
                                    "type": "text",
                                    "content": "1．系统主函数 main()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        329,
                        267,
                        449
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 14,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                329,
                                202,
                                341
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        328,
                                        201,
                                        343
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                328,
                                                201,
                                                343
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                347,
                                222,
                                359
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        347,
                                        222,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                347,
                                                222,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                364,
                                267,
                                377
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        363,
                                        268,
                                        380
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                363,
                                                268,
                                                380
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void main()",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                383,
                                221,
                                395
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        383,
                                        221,
                                        396
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                383,
                                                221,
                                                396
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：系统主函数",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                401,
                                180,
                                413
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        401,
                                        180,
                                        415
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                401,
                                                180,
                                                415
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                418,
                                180,
                                431
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        418,
                                        180,
                                        433
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                418,
                                                180,
                                                433
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                437,
                                225,
                                449
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        437,
                                        226,
                                        449
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                437,
                                                226,
                                                449
                                            ],
                                            "type": "text",
                                            "content": "（7）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        454,
                        456,
                        576
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 22,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                454,
                                288,
                                467
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        454,
                                        288,
                                        468
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                454,
                                                122,
                                                467
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                455,
                                                288,
                                                468
                                            ],
                                            "type": "text",
                                            "content": "对前面定义的全局变量进行初始化；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                473,
                                270,
                                485
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        472,
                                        271,
                                        486
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                472,
                                                122,
                                                485
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                472,
                                                271,
                                                486
                                            ],
                                            "type": "text",
                                            "content": "调用 startsys()进入文件系统；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                491,
                                340,
                                503
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        491,
                                        340,
                                        503
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                491,
                                                122,
                                                503
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                491,
                                                340,
                                                503
                                            ],
                                            "type": "text",
                                            "content": "列出文件系统提供的各项功能及命令调用格式；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                508,
                                309,
                                521
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        508,
                                        309,
                                        523
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                508,
                                                122,
                                                521
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                509,
                                                309,
                                                523
                                            ],
                                            "type": "text",
                                            "content": "显示命令行提示符，等待用户输入命令；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                527,
                                299,
                                539
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        526,
                                        299,
                                        540
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                526,
                                                122,
                                                539
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                527,
                                                299,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "将用户输入的命令保存到一个 buf中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                544,
                                456,
                                557
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        544,
                                        457,
                                        558
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                544,
                                                122,
                                                557
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                545,
                                                457,
                                                558
                                            ],
                                            "type": "text",
                                            "content": "对buf中的内容进行命令解析，并调用相应的函数执行用户键入的命令；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                562,
                                382,
                                576
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        562,
                                        384,
                                        577
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                563,
                                                122,
                                                575
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                562,
                                                367,
                                                577
                                            ],
                                            "type": "text",
                                            "content": "如果命令不是“my_exitsys”，则命令执行完毕后转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                367,
                                                563,
                                                379,
                                                575
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                379,
                                                562,
                                                384,
                                                577
                                            ],
                                            "type": "text",
                                            "content": "。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        585,
                        265,
                        598
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                582,
                                267,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        582,
                                        267,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "2. 进入文件系统函数 startsys()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        612,
                        498,
                        732
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 31,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                612,
                                201,
                                624
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        612,
                                        201,
                                        625
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                612,
                                                201,
                                                625
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                629,
                                221,
                                642
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        629,
                                        222,
                                        644
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                629,
                                                222,
                                                644
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                648,
                                288,
                                660
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        646,
                                        289,
                                        663
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                646,
                                                289,
                                                663
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void startsys()",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                666,
                                498,
                                678
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        666,
                                        500,
                                        678
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                666,
                                                500,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：由main()函数调用，进入并初始化我们所建立的文件系统，以供用户使用。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                684,
                                180,
                                696
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        683,
                                        180,
                                        698
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                683,
                                                180,
                                                698
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                702,
                                183,
                                714
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        701,
                                        185,
                                        716
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                701,
                                                185,
                                                716
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：无。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                719,
                                224,
                                732
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        719,
                                        226,
                                        733
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                719,
                                                226,
                                                733
                                            ],
                                            "type": "text",
                                            "content": "（7）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        738,
                        214,
                        750
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 32,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                737,
                                215,
                                751
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        737,
                                        122,
                                        751
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{1}",
                                    "score": 0.83
                                },
                                {
                                    "bbox": [
                                        123,
                                        739,
                                        215,
                                        751
                                    ],
                                    "type": "text",
                                    "content": "申请虚拟磁盘空间；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 73
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        75,
                        506,
                        323
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 9,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                75,
                                506,
                                107
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        76,
                                        505,
                                        89
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                76,
                                                122,
                                                89
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                76,
                                                431,
                                                89
                                            ],
                                            "type": "text",
                                            "content": "使用c语言的库函数fopen()打开myfsys文件：若文件存在，则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                431,
                                                76,
                                                443,
                                                89
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                443,
                                                76,
                                                505,
                                                89
                                            ],
                                            "type": "text",
                                            "content": "；若文件不存",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        93,
                                        185,
                                        108
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                93,
                                                173,
                                                108
                                            ],
                                            "type": "text",
                                            "content": "在，则创建之，转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                173,
                                                94,
                                                185,
                                                106
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.85
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                111,
                                506,
                                161
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        111,
                                        504,
                                        125
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                111,
                                                122,
                                                125
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                112,
                                                504,
                                                125
                                            ],
                                            "type": "text",
                                            "content": "使用c语言的库函数fread()读入 myfsys 文件内容到用户空间中的一个缓冲区中，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        130,
                                        506,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                131,
                                                473,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "并判断其开始的8个字节内容是否为“10101010”（文件系统魔数），如果是，则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                473,
                                                130,
                                                485,
                                                142
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                485,
                                                131,
                                                506,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "；否",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        148,
                                        127,
                                        162
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                148,
                                                110,
                                                162
                                            ],
                                            "type": "text",
                                            "content": "则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                110,
                                                148,
                                                121,
                                                160
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                148,
                                                127,
                                                162
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                165,
                                412,
                                179
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        165,
                                        411,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                166,
                                                122,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                165,
                                                398,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "将上述缓冲区中的内容复制到内存中的虚拟磁盘空间中；转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                398,
                                                166,
                                                411,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.83
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                184,
                                498,
                                216
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        184,
                                        498,
                                        197
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                184,
                                                122,
                                                196
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                184,
                                                498,
                                                197
                                            ],
                                            "type": "text",
                                            "content": "在屏幕上显示“myfsys文件系统不存在，现在开始创建文件系统”信息，并调用",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        87,
                                        202,
                                        395,
                                        215
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                87,
                                                202,
                                                157,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "my_format()对",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                157,
                                                202,
                                                169,
                                                215
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                169,
                                                202,
                                                377,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "中申请到的虚拟磁盘空间进行格式化操作。转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                377,
                                                202,
                                                389,
                                                214
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                389,
                                                202,
                                                395,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                220,
                                354,
                                233
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        220,
                                        353,
                                        234
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                220,
                                                122,
                                                232
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                220,
                                                340,
                                                234
                                            ],
                                            "type": "text",
                                            "content": "将虚拟磁盘中的内容保存到 myfsys 文件中；转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                340,
                                                220,
                                                353,
                                                232
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.84
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                238,
                                350,
                                252
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        237,
                                        349,
                                        253
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                238,
                                                122,
                                                250
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                237,
                                                349,
                                                253
                                            ],
                                            "type": "text",
                                            "content": "使用 c 语言的库函数 fclose()关闭 myfsys 文件；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                255,
                                506,
                                305
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        255,
                                        504,
                                        269
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                255,
                                                122,
                                                269
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{8}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                257,
                                                504,
                                                268
                                            ],
                                            "type": "text",
                                            "content": "初始化用户打开文件表，将表项 0分配给根目录文件使用，并填写根目录文件的相",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        274,
                                        502,
                                        287
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                274,
                                                502,
                                                287
                                            ],
                                            "type": "text",
                                            "content": "关信息，由于根目录没有上级目录，所以表项中的dirno和diroff分别置为5（根目录所",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        293,
                                        397,
                                        304
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                293,
                                                397,
                                                304
                                            ],
                                            "type": "text",
                                            "content": "在起始块号）和0；并将ptrcurdir指针指向该用户打开文件表项。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                310,
                                247,
                                323
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        310,
                                        247,
                                        322
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                310,
                                                122,
                                                322
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{9}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                310,
                                                247,
                                                322
                                            ],
                                            "type": "text",
                                            "content": "将当前目录设置为根目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        332,
                        261,
                        346
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                330,
                                261,
                                348
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        330,
                                        261,
                                        348
                                    ],
                                    "type": "text",
                                    "content": "3．磁盘格式化函数 my_format()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        112,
                        359,
                        499,
                        461
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                359,
                                238,
                                371
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        358,
                                        238,
                                        374
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                358,
                                                238,
                                                374
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_format",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                377,
                                258,
                                390
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        375,
                                        259,
                                        391
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                375,
                                                259,
                                                391
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_format",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                395,
                                294,
                                407
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        393,
                                        295,
                                        410
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                393,
                                                295,
                                                410
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void my_format()",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                112,
                                412,
                                499,
                                426
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        413,
                                        499,
                                        426
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                413,
                                                499,
                                                426
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：对虚拟磁盘进行格式化，布局虚拟磁盘，建立根目录文件（或根目录区）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                431,
                                180,
                                444
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        431,
                                        180,
                                        445
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                431,
                                                180,
                                                445
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                449,
                                184,
                                461
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        449,
                                        185,
                                        463
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                449,
                                                185,
                                                463
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：无。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        467,
                        226,
                        480
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                467,
                                226,
                                480
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        467,
                                        226,
                                        480
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        485,
                        506,
                        642
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 22,
                    "blocks": [
                        {
                            "bbox": [
                                87,
                                485,
                                500,
                                534
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        485,
                                        474,
                                        497
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                485,
                                                122,
                                                497
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                486,
                                                474,
                                                497
                                            ],
                                            "type": "text",
                                            "content": "将虚拟磁盘第一个块作为引导块，开始的 8个字节是文件系统的魔数，记为",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        93,
                                        503,
                                        500,
                                        515
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                93,
                                                503,
                                                500,
                                                515
                                            ],
                                            "type": "text",
                                            "content": "“10101010”；在之后写入文件系统的描述信息，如 FAT表大小及位置、根目录大小及位置、",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        521,
                                        303,
                                        533
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                521,
                                                303,
                                                533
                                            ],
                                            "type": "text",
                                            "content": "盘块大小、盘块数量、数据区开始位置等信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                539,
                                506,
                                587
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        539,
                                        505,
                                        551
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                539,
                                                122,
                                                551
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                539,
                                                505,
                                                551
                                            ],
                                            "type": "text",
                                            "content": "在引导块后建立两张完全一样的 FAT表，用于记录文件所占据的磁盘块及管理虚拟",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        558,
                                        505,
                                        569
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                558,
                                                505,
                                                569
                                            ],
                                            "type": "text",
                                            "content": "磁盘块的分配，每个FAT占据两个磁盘块；对于每个 FAT中，前面5 个块设置为已分配，后",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        575,
                                        201,
                                        587
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                575,
                                                201,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "面995个块设置为空闲；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                592,
                                506,
                                642
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        592,
                                        505,
                                        605
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                592,
                                                122,
                                                605
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                594,
                                                505,
                                                605
                                            ],
                                            "type": "text",
                                            "content": "在第二张FAT 后创建根目录文件 root，将数据区的第 1 块（即虚拟磁盘的第 6 块）",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        609,
                                        506,
                                        624
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                609,
                                                506,
                                                624
                                            ],
                                            "type": "text",
                                            "content": "分配给根目录文件，在该磁盘上创建两个特殊的目录项：“.”和“..”，其内容除了文件",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        629,
                                        243,
                                        641
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                629,
                                                243,
                                                641
                                            ],
                                            "type": "text",
                                            "content": "名不同之外，其他字段完全相同。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        650,
                        250,
                        665
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                650,
                                250,
                                666
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        650,
                                        250,
                                        666
                                    ],
                                    "type": "text",
                                    "content": "4．更改当前目录函数 my_cd()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        678,
                        373,
                        762
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 29,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                678,
                                218,
                                692
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        677,
                                        217,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                677,
                                                217,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_cd",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                696,
                                279,
                                709
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        694,
                                        280,
                                        711
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                694,
                                                280,
                                                711
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_cd dirname",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                714,
                                341,
                                727
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        712,
                                        341,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                712,
                                                341,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void my_cd(char *dirname)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                732,
                                373,
                                745
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        731,
                                        374,
                                        746
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                731,
                                                374,
                                                746
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：改变当前目录到指定的名为dirname 的目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                750,
                                162,
                                762
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        749,
                                        164,
                                        765
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                749,
                                                164,
                                                765
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 74
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        133,
                        76,
                        293,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                76,
                                295,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        76,
                                        295,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "dirname：新的当前目录的目录名；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        94,
                        180,
                        106
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                94,
                                180,
                                108
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        94,
                                        180,
                                        108
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：无",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        111,
                        226,
                        125
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 3,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                111,
                                226,
                                126
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        111,
                                        226,
                                        126
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        130,
                        504,
                        286
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 10,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                130,
                                504,
                                160
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        130,
                                        505,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                130,
                                                122,
                                                142
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                131,
                                                505,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "调用my_open()打开指定目录名的父目录文件，并调用do_read()读入该父目录文件",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        148,
                                        158,
                                        161
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                148,
                                                158,
                                                161
                                            ],
                                            "type": "text",
                                            "content": "内容到内存中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                165,
                                504,
                                196
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        166,
                                        504,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                166,
                                                122,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                167,
                                                408,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "在父目录文件中检查新的当前目录名是否存在，如果存在则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                409,
                                                166,
                                                421,
                                                178
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                421,
                                                167,
                                                504,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "，否则返回，并显",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        185,
                                        146,
                                        197
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                185,
                                                146,
                                                197
                                            ],
                                            "type": "text",
                                            "content": "示出错信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                201,
                                333,
                                215
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        200,
                                        334,
                                        216
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                201,
                                                122,
                                                214
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                200,
                                                222,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "调用 my_close()关闭",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                223,
                                                202,
                                                235,
                                                215
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                235,
                                                200,
                                                334,
                                                216
                                            ],
                                            "type": "text",
                                            "content": "中打开的父目录文件；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                220,
                                302,
                                232
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        220,
                                        302,
                                        233
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                220,
                                                122,
                                                232
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                221,
                                                302,
                                                233
                                            ],
                                            "type": "text",
                                            "content": "调用my_close()关闭原当前目录文件；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                238,
                                504,
                                268
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        238,
                                        505,
                                        251
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                238,
                                                122,
                                                250
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.88
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                238,
                                                505,
                                                251
                                            ],
                                            "type": "text",
                                            "content": "如果新的当前目录文件没有打开，则打开该目录文件；并将 ptrcurdir 指向该打开",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        255,
                                        138,
                                        270
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                255,
                                                138,
                                                270
                                            ],
                                            "type": "text",
                                            "content": "文件表项；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                274,
                                236,
                                286
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        274,
                                        236,
                                        286
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                274,
                                                122,
                                                286
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                275,
                                                236,
                                                286
                                            ],
                                            "type": "text",
                                            "content": "设置当前目录为该目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        296,
                        255,
                        310
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                294,
                                255,
                                312
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        294,
                                        255,
                                        312
                                    ],
                                    "type": "text",
                                    "content": "5．创建子目录函数 my_mkdir()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        323,
                        362,
                        407
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                323,
                                232,
                                336
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        322,
                                        233,
                                        338
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                322,
                                                233,
                                                338
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_mkdir",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                341,
                                301,
                                354
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        340,
                                        301,
                                        355
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                340,
                                                301,
                                                355
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_ mkdir dirname",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                359,
                                356,
                                372
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        359,
                                        357,
                                        374
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                359,
                                                357,
                                                374
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void my_mkdir(char *dirname)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                377,
                                362,
                                390
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        376,
                                        363,
                                        391
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                376,
                                                363,
                                                391
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：在当前目录下创建名为 dirname 的子目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                395,
                                162,
                                407
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        394,
                                        164,
                                        410
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                394,
                                                164,
                                                410
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        134,
                        413,
                        273,
                        425
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                413,
                                273,
                                426
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        413,
                                        273,
                                        426
                                    ],
                                    "type": "text",
                                    "content": "dirname：新建目录的目录名。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        431,
                        184,
                        444
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                431,
                                185,
                                445
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        431,
                                        185,
                                        445
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：无。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        449,
                        225,
                        461
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                449,
                                226,
                                462
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        449,
                                        226,
                                        462
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        466,
                        504,
                        714
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 27,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                466,
                                502,
                                497
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        466,
                                        502,
                                        481
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                466,
                                                122,
                                                479
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                467,
                                                502,
                                                481
                                            ],
                                            "type": "text",
                                            "content": "调用 do_read()读入当前目录文件内容到内存，检查当前目录下新建目录文件是否",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        486,
                                        273,
                                        497
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                486,
                                                273,
                                                497
                                            ],
                                            "type": "text",
                                            "content": "重名，若重名则返回，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                502,
                                504,
                                534
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        502,
                                        505,
                                        516
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                502,
                                                122,
                                                516
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                503,
                                                505,
                                                516
                                            ],
                                            "type": "text",
                                            "content": "为新建子目录文件分配一个空闲打开文件表项，如果没有空闲表项则返回-1，并显",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        522,
                                        147,
                                        534
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                522,
                                                147,
                                                534
                                            ],
                                            "type": "text",
                                            "content": "示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                539,
                                504,
                                570
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        539,
                                        504,
                                        551
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                539,
                                                122,
                                                551
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                540,
                                                482,
                                                551
                                            ],
                                            "type": "text",
                                            "content": "检查FAT是否有空闲的盘块，如有则为新建目录文件分配一个盘块，否则释放",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                483,
                                                539,
                                                494,
                                                551
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                495,
                                                540,
                                                504,
                                                551
                                            ],
                                            "type": "text",
                                            "content": "中",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        557,
                                        305,
                                        570
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                557,
                                                305,
                                                570
                                            ],
                                            "type": "text",
                                            "content": "分配的打开文件表项，返回，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                575,
                                504,
                                623
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        575,
                                        499,
                                        587
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                575,
                                                122,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.79
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                576,
                                                499,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "在当前目录中为新建目录文件寻找一个空闲的目录项或为其追加一个新的目录项;",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        592,
                                        505,
                                        605
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                592,
                                                505,
                                                605
                                            ],
                                            "type": "text",
                                            "content": "需修改当前目录文件的长度信息，并将当前目录文件的用户打开文件表项中的 fcbstate置",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        86,
                                        610,
                                        115,
                                        625
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                610,
                                                115,
                                                625
                                            ],
                                            "type": "text",
                                            "content": "为 1；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                629,
                                495,
                                660
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        629,
                                        494,
                                        641
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                629,
                                                122,
                                                641
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                629,
                                                494,
                                                641
                                            ],
                                            "type": "text",
                                            "content": "准备好新建目录文件的 FCB的内容，文件的属性为目录文件，以覆盖写方式调用",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        647,
                                        284,
                                        660
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                647,
                                                284,
                                                660
                                            ],
                                            "type": "text",
                                            "content": "do_write()将其填写到对应的空目录项中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                664,
                                504,
                                714
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        664,
                                        504,
                                        677
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                665,
                                                122,
                                                677
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                664,
                                                504,
                                                677
                                            ],
                                            "type": "text",
                                            "content": "在新建目录文件所分配到的磁盘块中建立两个特殊的目录项“.”和“..”目录项，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        682,
                                        502,
                                        696
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                682,
                                                502,
                                                696
                                            ],
                                            "type": "text",
                                            "content": "方法是：首先在用户空间中准备好内容，然后以截断写或者覆盖写方式调用do_write()将",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        701,
                                        231,
                                        714
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                701,
                                                120,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "其写到",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                120,
                                                701,
                                                132,
                                                714
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                132,
                                                701,
                                                231,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "中分配到的磁盘块中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        719,
                        153,
                        731
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                718,
                                154,
                                733
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        719,
                                        122,
                                        731
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{7}",
                                    "score": 0.82
                                },
                                {
                                    "bbox": [
                                        122,
                                        718,
                                        154,
                                        733
                                    ],
                                    "type": "text",
                                    "content": "返回。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        107,
                        740,
                        239,
                        754
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                739,
                                240,
                                756
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        739,
                                        240,
                                        756
                                    ],
                                    "type": "text",
                                    "content": "6．删除子目录函数 rmdir()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 75
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        76,
                        362,
                        160
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 6,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                76,
                                239,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        74,
                                        238,
                                        91
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                74,
                                                238,
                                                91
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_ rmdir",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                95,
                                301,
                                107
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        93,
                                        301,
                                        109
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                93,
                                                301,
                                                109
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_ rmdir dirname",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                112,
                                357,
                                125
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        112,
                                        357,
                                        126
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                112,
                                                357,
                                                126
                                            ],
                                            "type": "text",
                                            "content": "（1）函数设计格式：void my_rmdir(char *dirname)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                130,
                                362,
                                142
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        131,
                                        363,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                131,
                                                363,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "（2）功能：在当前目录下删除名为 dirname 的子目录。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                148,
                                163,
                                160
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        148,
                                        163,
                                        163
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                148,
                                                163,
                                                163
                                            ],
                                            "type": "text",
                                            "content": "（3）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        133,
                        166,
                        283,
                        179
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                166,
                                285,
                                179
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        166,
                                        285,
                                        179
                                    ],
                                    "type": "text",
                                    "content": "dirname：欲删除目录的目录名。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        184,
                        184,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                184,
                                185,
                                198
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        184,
                                        185,
                                        198
                                    ],
                                    "type": "text",
                                    "content": "（4）输出：无。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        202,
                        226,
                        214
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                202,
                                226,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        202,
                                        226,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "（5）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        220,
                        504,
                        395
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 17,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                220,
                                502,
                                250
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        220,
                                        502,
                                        233
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                220,
                                                122,
                                                232
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                221,
                                                502,
                                                233
                                            ],
                                            "type": "text",
                                            "content": "调用do_read()读入当前目录文件内容到内存，检查当前目录下欲删除目录文件是",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        238,
                                        294,
                                        251
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                238,
                                                294,
                                                251
                                            ],
                                            "type": "text",
                                            "content": "否存在，若不存在则返回，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                255,
                                504,
                                286
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        255,
                                        505,
                                        269
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                255,
                                                122,
                                                269
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                255,
                                                505,
                                                269
                                            ],
                                            "type": "text",
                                            "content": "检查欲删除目录文件是否为空（除了“.”和“..”外没有其他子目录和文件），可",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        440,
                                        286
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                275,
                                                440,
                                                286
                                            ],
                                            "type": "text",
                                            "content": "根据其目录项中记录的文件长度来判断，若不为空则返回，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                291,
                                439,
                                306
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        291,
                                        439,
                                        306
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                291,
                                                122,
                                                304
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                291,
                                                439,
                                                306
                                            ],
                                            "type": "text",
                                            "content": "检查该目录文件是否已经打开，若已打开则调用 my_close()关闭掉；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                310,
                                328,
                                322
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        310,
                                        329,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                310,
                                                122,
                                                322
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                310,
                                                329,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "回收该目录文件所占据的磁盘块，修改FAT；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                327,
                                504,
                                359
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        327,
                                        505,
                                        341
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                327,
                                                122,
                                                340
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                327,
                                                505,
                                                341
                                            ],
                                            "type": "text",
                                            "content": "从当前目录文件中清空该目录文件的目录项，且 free字段置为0：以覆盖写方式调",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        346,
                                        192,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                346,
                                                192,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "用 do_write()来实现；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                364,
                                503,
                                376
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        364,
                                        504,
                                        376
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                364,
                                                122,
                                                376
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                364,
                                                504,
                                                376
                                            ],
                                            "type": "text",
                                            "content": "修改当前目录文件的用户打开表项中的长度信息，并将表项中的 fcbstate 置为 1；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                381,
                                153,
                                395
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        380,
                                        154,
                                        396
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                381,
                                                122,
                                                394
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                380,
                                                154,
                                                396
                                            ],
                                            "type": "text",
                                            "content": "返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        404,
                        229,
                        417
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 18,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                403,
                                229,
                                419
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        403,
                                        229,
                                        419
                                    ],
                                    "type": "text",
                                    "content": "7．显示目录函数 my_ls()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        431,
                        373,
                        551
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 26,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                431,
                                217,
                                444
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        429,
                                        217,
                                        446
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                429,
                                                217,
                                                446
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_ls",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                449,
                                238,
                                462
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        447,
                                        238,
                                        464
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                447,
                                                238,
                                                464
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_ls",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                467,
                                293,
                                480
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        467,
                                        294,
                                        481
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                467,
                                                294,
                                                481
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void my_ls(void)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                485,
                                373,
                                497
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        485,
                                        374,
                                        498
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                485,
                                                374,
                                                498
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：显示当前目录的内容（子目录和文件信息）。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                503,
                                180,
                                515
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        502,
                                        180,
                                        517
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                502,
                                                180,
                                                517
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                521,
                                180,
                                533
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        520,
                                        180,
                                        535
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                520,
                                                180,
                                                535
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                539,
                                225,
                                551
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        539,
                                        226,
                                        552
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                539,
                                                226,
                                                552
                                            ],
                                            "type": "text",
                                            "content": "（7）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        556,
                        382,
                        605
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 30,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                556,
                                339,
                                571
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        556,
                                        339,
                                        571
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                556,
                                                122,
                                                570
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                556,
                                                339,
                                                571
                                            ],
                                            "type": "text",
                                            "content": "调用 do_read()读出当前目录文件内容到内存；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                575,
                                382,
                                588
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        575,
                                        382,
                                        587
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                575,
                                                122,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                576,
                                                382,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "将读出的目录文件的信息按照一定的格式显示到屏幕上；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                592,
                                153,
                                605
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        592,
                                        154,
                                        607
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                592,
                                                122,
                                                605
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                592,
                                                154,
                                                607
                                            ],
                                            "type": "text",
                                            "content": "返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        615,
                        250,
                        629
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 31,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                613,
                                251,
                                631
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        613,
                                        251,
                                        631
                                    ],
                                    "type": "text",
                                    "content": "8．创建文件函数 my_create()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        642,
                        367,
                        726
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 37,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                642,
                                238,
                                655
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        640,
                                        238,
                                        657
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                640,
                                                238,
                                                657
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_create",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                660,
                                305,
                                672
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 33,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        659,
                                        307,
                                        674
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                659,
                                                307,
                                                674
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_create filename",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                678,
                                367,
                                691
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 34,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        677,
                                        368,
                                        692
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                677,
                                                368,
                                                692
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：int my_create (char *filename)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                696,
                                304,
                                708
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 35,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        696,
                                        305,
                                        710
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                696,
                                                305,
                                                710
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：创建名为 filename 的新文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                714,
                                162,
                                726
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 36,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        713,
                                        164,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                713,
                                                164,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        133,
                        732,
                        352,
                        745
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 38,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                732,
                                353,
                                745
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        732,
                                        353,
                                        745
                                    ],
                                    "type": "text",
                                    "content": "filename：新建文件的文件名，可能包含路径。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        750,
                        504,
                        762
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 39,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                751,
                                505,
                                763
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        751,
                                        505,
                                        763
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：若创建成功，返回该文件的文件描述符（文件打开表中的数组下标）；否",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 76
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        138,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                88,
                                76,
                                138,
                                89
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        76,
                                        138,
                                        89
                                    ],
                                    "type": "text",
                                    "content": "则返回-1。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        94,
                        226,
                        107
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                94,
                                226,
                                107
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        94,
                                        226,
                                        107
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        111,
                        505,
                        412
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                111,
                                505,
                                142
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        111,
                                        505,
                                        126
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                111,
                                                122,
                                                125
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                112,
                                                505,
                                                126
                                            ],
                                            "type": "text",
                                            "content": "为新文件分配一个空闲打开文件表项，如果没有空闲表项则返回-1，并显示错误信",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        129,
                                        107,
                                        145
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                129,
                                                107,
                                                145
                                            ],
                                            "type": "text",
                                            "content": "息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                148,
                                503,
                                179
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        148,
                                        502,
                                        161
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                148,
                                                122,
                                                161
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                148,
                                                502,
                                                161
                                            ],
                                            "type": "text",
                                            "content": "若新文件的父目录文件还没有打开，则调用 my_open()打开；若打开失败，则释放",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        166,
                                        410,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                166,
                                                101,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                101,
                                                166,
                                                410,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "中为新建文件分配的空闲文件打开表项，返回-1，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                184,
                                502,
                                232
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        184,
                                        502,
                                        196
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                184,
                                                122,
                                                196
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                184,
                                                502,
                                                196
                                            ],
                                            "type": "text",
                                            "content": "调用do_read()读出该父目录文件内容到内存，检查该目录下新文件是否重名，若",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        202,
                                        502,
                                        215
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                203,
                                                141,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "重名则释放",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                141,
                                                202,
                                                153,
                                                215
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                154,
                                                203,
                                                374,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "中分配的打开文件表项，并调用my_close()关闭",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                375,
                                                202,
                                                387,
                                                214
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                387,
                                                203,
                                                502,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "中打开的目录文件；然后",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        220,
                                        210,
                                        232
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                220,
                                                210,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "返回-1，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                238,
                                504,
                                269
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        238,
                                        504,
                                        250
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                238,
                                                122,
                                                250
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                239,
                                                451,
                                                250
                                            ],
                                            "type": "text",
                                            "content": "检查FAT是否有空闲的盘块，如有则为新文件分配一个盘块，否则释放",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                451,
                                                238,
                                                463,
                                                250
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                463,
                                                239,
                                                504,
                                                250
                                            ],
                                            "type": "text",
                                            "content": "中分配的",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        256,
                                        496,
                                        269
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                257,
                                                269,
                                                269
                                            ],
                                            "type": "text",
                                            "content": "打开文件表项，并调用 my_close()关闭",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                270,
                                                256,
                                                282,
                                                269
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                282,
                                                257,
                                                496,
                                                269
                                            ],
                                            "type": "text",
                                            "content": "中打开的目录文件；返回-1，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                274,
                                500,
                                305
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        274,
                                        499,
                                        286
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                274,
                                                122,
                                                286
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                275,
                                                499,
                                                286
                                            ],
                                            "type": "text",
                                            "content": "在父目录中为新文件寻找一个空闲的目录项或为其追加一个新的目录项;需修改该",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        90,
                                        293,
                                        464,
                                        305
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                90,
                                                293,
                                                464,
                                                305
                                            ],
                                            "type": "text",
                                            "content": "目录文件的长度信息，并将该目录文件的用户打开文件表项中的fcbstate置为 1；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                310,
                                502,
                                341
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        310,
                                        501,
                                        322
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                310,
                                                122,
                                                322
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                311,
                                                501,
                                                322
                                            ],
                                            "type": "text",
                                            "content": "准备好新文件的FCB的内容，文件的属性为数据文件，长度为0，以覆盖写方式调",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        327,
                                        327,
                                        340
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                327,
                                                207,
                                                340
                                            ],
                                            "type": "text",
                                            "content": "用 do_write()将其填写到",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                207,
                                                327,
                                                218,
                                                340
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                219,
                                                327,
                                                327,
                                                340
                                            ],
                                            "type": "text",
                                            "content": "中分配到的空目录项中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                345,
                                504,
                                376
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        345,
                                        504,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                345,
                                                122,
                                                359
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                345,
                                                188,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "为新文件填写",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                188,
                                                346,
                                                200,
                                                358
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                201,
                                                345,
                                                504,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "中分配到的空闲打开文件表项，fcbstate字段值为0，读写指针值",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        86,
                                        363,
                                        115,
                                        379
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                363,
                                                115,
                                                379
                                            ],
                                            "type": "text",
                                            "content": "为 0；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                381,
                                333,
                                395
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        381,
                                        334,
                                        396
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                381,
                                                122,
                                                394
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{8}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                381,
                                                222,
                                                396
                                            ],
                                            "type": "text",
                                            "content": "调用 my_close()关闭",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                223,
                                                381,
                                                235,
                                                394
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                235,
                                                381,
                                                334,
                                                396
                                            ],
                                            "type": "text",
                                            "content": "中打开的父目录文件；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                399,
                                373,
                                412
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        399,
                                        374,
                                        413
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                400,
                                                122,
                                                412
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{9}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                399,
                                                374,
                                                413
                                            ],
                                            "type": "text",
                                            "content": "将新文件的打开文件表项序号作为其文件描述符返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        422,
                        229,
                        435
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                107,
                                419,
                                229,
                                438
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        107,
                                        419,
                                        229,
                                        438
                                    ],
                                    "type": "text",
                                    "content": "9．删除文件函数 my_rm()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        449,
                        346,
                        533
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 19,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                449,
                                217,
                                462
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        448,
                                        217,
                                        464
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                448,
                                                217,
                                                464
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_rm",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                467,
                                285,
                                480
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        465,
                                        286,
                                        481
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                465,
                                                286,
                                                481
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_rm filename",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                485,
                                346,
                                498
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        483,
                                        346,
                                        500
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                483,
                                                346,
                                                500
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void my_rm(char *filename)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                503,
                                293,
                                515
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        502,
                                        295,
                                        517
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                502,
                                                295,
                                                517
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：删除名为 filename 的文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                521,
                                162,
                                533
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        519,
                                        164,
                                        535
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                519,
                                                164,
                                                535
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        133,
                        539,
                        373,
                        551
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 20,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                539,
                                374,
                                553
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        539,
                                        374,
                                        553
                                    ],
                                    "type": "text",
                                    "content": "filename：欲删除文件的文件名，可能还包含路径。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        557,
                        184,
                        569
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 21,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                556,
                                185,
                                571
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        556,
                                        185,
                                        571
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：无。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        575,
                        226,
                        587
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                575,
                                226,
                                588
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        575,
                                        226,
                                        588
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        592,
                        504,
                        767
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 29,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                592,
                                502,
                                624
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        592,
                                        502,
                                        606
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                592,
                                                122,
                                                605
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                593,
                                                502,
                                                606
                                            ],
                                            "type": "text",
                                            "content": "若欲删除文件的父目录文件还没有打开，则调用my_open()打开；若打开失败，则",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        611,
                                        200,
                                        624
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                611,
                                                200,
                                                624
                                            ],
                                            "type": "text",
                                            "content": "返回，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                629,
                                503,
                                660
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        629,
                                        504,
                                        641
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                629,
                                                122,
                                                641
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                629,
                                                504,
                                                641
                                            ],
                                            "type": "text",
                                            "content": "调用do_read()读出该父目录文件内容到内存，检查该目录下欲删除文件是否存在，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        648,
                                        252,
                                        660
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                648,
                                                252,
                                                660
                                            ],
                                            "type": "text",
                                            "content": "若不存在则返回，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                665,
                                341,
                                678
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        665,
                                        342,
                                        678
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                665,
                                                122,
                                                677
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                665,
                                                342,
                                                678
                                            ],
                                            "type": "text",
                                            "content": "检查该文件是否已经打开，若已打开则关闭掉；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                682,
                                307,
                                696
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        682,
                                        307,
                                        696
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                682,
                                                122,
                                                695
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                682,
                                                307,
                                                696
                                            ],
                                            "type": "text",
                                            "content": "回收该文件所占据的磁盘块，修改FAT；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                700,
                                504,
                                732
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        700,
                                        505,
                                        714
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                700,
                                                122,
                                                714
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                701,
                                                505,
                                                714
                                            ],
                                            "type": "text",
                                            "content": "从文件的父目录文件中清空该文件的目录项，且 free字段置为0：以覆盖写方式调",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        719,
                                        202,
                                        731
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                719,
                                                202,
                                                731
                                            ],
                                            "type": "text",
                                            "content": "用 do_write()来实现；；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                736,
                                497,
                                767
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        736,
                                        498,
                                        750
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                736,
                                                122,
                                                749
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                737,
                                                498,
                                                750
                                            ],
                                            "type": "text",
                                            "content": "修改该父目录文件的用户打开文件表项中的长度信息，并将该表项中的 fcbstate",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        752,
                                        124,
                                        771
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                752,
                                                124,
                                                771
                                            ],
                                            "type": "text",
                                            "content": "置为 1；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 77
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        110,
                        76,
                        151,
                        89
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 1,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                74,
                                155,
                                91
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        76,
                                        122,
                                        89
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{7}",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        123,
                                        74,
                                        155,
                                        91
                                    ],
                                    "type": "text",
                                    "content": "返回。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        110,
                        98,
                        243,
                        112
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 2,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                96,
                                245,
                                115
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        96,
                                        245,
                                        115
                                    ],
                                    "type": "text",
                                    "content": "10．打开文件函数 my_open()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        125,
                        351,
                        208
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                125,
                                227,
                                137
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        124,
                                        228,
                                        140
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                124,
                                                228,
                                                140
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_open",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                143,
                                295,
                                155
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        142,
                                        296,
                                        158
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                142,
                                                296,
                                                158
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_open filename",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                161,
                                351,
                                173
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        160,
                                        352,
                                        175
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                160,
                                                352,
                                                175
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：int my_open(char *filename)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                179,
                                346,
                                190
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        179,
                                        347,
                                        192
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                179,
                                                347,
                                                192
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：打开当前目录下名为 filename的文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                197,
                                162,
                                208
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        195,
                                        164,
                                        211
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                195,
                                                164,
                                                211
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        134,
                        215,
                        284,
                        227
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                215,
                                284,
                                228
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        215,
                                        284,
                                        228
                                    ],
                                    "type": "text",
                                    "content": "filename：欲打开文件的文件名",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        232,
                        504,
                        281
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                232,
                                504,
                                263
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        232,
                                        505,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                232,
                                                505,
                                                246
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：若打开成功，返回该文件的描述符（在用户打开文件表中表项序号）；否",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        251,
                                        138,
                                        264
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                251,
                                                138,
                                                264
                                            ],
                                            "type": "text",
                                            "content": "则返回-1。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                269,
                                224,
                                281
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        269,
                                        226,
                                        282
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                269,
                                                226,
                                                282
                                            ],
                                            "type": "text",
                                            "content": "（7）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        287,
                        504,
                        424
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 18,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                287,
                                424,
                                299
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        287,
                                        426,
                                        301
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                287,
                                                122,
                                                300
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                287,
                                                426,
                                                301
                                            ],
                                            "type": "text",
                                            "content": "检查该文件是否已经打开，若已打开则返回-1，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                305,
                                503,
                                335
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        305,
                                        505,
                                        318
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                305,
                                                122,
                                                317
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                306,
                                                505,
                                                318
                                            ],
                                            "type": "text",
                                            "content": "调用do_read()读出父目录文件的内容到内存，检查该目录下欲打开文件是否存在，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        324,
                                        262,
                                        335
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                324,
                                                262,
                                                335
                                            ],
                                            "type": "text",
                                            "content": "若不存在则返回-1，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                341,
                                504,
                                371
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        341,
                                        505,
                                        354
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                341,
                                                122,
                                                354
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                342,
                                                505,
                                                354
                                            ],
                                            "type": "text",
                                            "content": "检查用户打开文件表中是否有空表项，若有则为欲打开文件分配一个空表项，若没",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        359,
                                        232,
                                        372
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                359,
                                                232,
                                                372
                                            ],
                                            "type": "text",
                                            "content": "有则返回-1，并显示错误信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                376,
                                411,
                                389
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        376,
                                        412,
                                        391
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                376,
                                                122,
                                                389
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                377,
                                                412,
                                                391
                                            ],
                                            "type": "text",
                                            "content": "为该文件填写空白用户打开文件表表项内容，读写指针置为 0；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                395,
                                504,
                                424
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        395,
                                        506,
                                        407
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                395,
                                                122,
                                                407
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                395,
                                                506,
                                                407
                                            ],
                                            "type": "text",
                                            "content": "将该文件所分配到的空白用户打开文件表表项序号（数组下标）作为文件描述符 fd",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        108,
                                        412,
                                        139,
                                        428
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                108,
                                                412,
                                                139,
                                                428
                                            ],
                                            "type": "text",
                                            "content": "返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        110,
                        435,
                        249,
                        449
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 19,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                433,
                                251,
                                451
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        433,
                                        251,
                                        451
                                    ],
                                    "type": "text",
                                    "content": "11．关闭文件函数 my_close()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        462,
                        417,
                        545
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                462,
                                232,
                                475
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        460,
                                        233,
                                        477
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                460,
                                                233,
                                                477
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_close",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                480,
                                268,
                                492
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        479,
                                        270,
                                        494
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                479,
                                                270,
                                                494
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_close fd",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                498,
                                320,
                                510
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        497,
                                        320,
                                        512
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                497,
                                                320,
                                                512
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：void my_close(int fd)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                516,
                                417,
                                528
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        516,
                                        418,
                                        530
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                516,
                                                418,
                                                530
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：关闭前面由 my_open()打开的文件描述符为 fd 的文件。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                534,
                                162,
                                545
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        533,
                                        164,
                                        548
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                533,
                                                164,
                                                548
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        134,
                        552,
                        214,
                        564
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                552,
                                216,
                                565
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        552,
                                        216,
                                        565
                                    ],
                                    "type": "text",
                                    "content": "fd：文件描述符。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        570,
                        183,
                        581
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 27,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                570,
                                185,
                                583
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        570,
                                        185,
                                        583
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：无。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        587,
                        225,
                        600
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 28,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                587,
                                226,
                                601
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        587,
                                        226,
                                        601
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        605,
                        504,
                        744
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 33,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                605,
                                502,
                                636
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 29,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        605,
                                        502,
                                        619
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                605,
                                                122,
                                                618
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                606,
                                                502,
                                                619
                                            ],
                                            "type": "text",
                                            "content": "检查fd的有效性（fd不能超出用户打开文件表所在数组的最大下标），如果无效",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        624,
                                        138,
                                        638
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                624,
                                                138,
                                                638
                                            ],
                                            "type": "text",
                                            "content": "则返回-1；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                642,
                                504,
                                690
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        642,
                                        505,
                                        655
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                642,
                                                122,
                                                655
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                643,
                                                505,
                                                654
                                            ],
                                            "type": "text",
                                            "content": "检查用户打开文件表表项中的 fcbstate字段的值，如果为1则需要将该文件的 FCB",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        661,
                                        505,
                                        672
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                661,
                                                505,
                                                672
                                            ],
                                            "type": "text",
                                            "content": "的内容保存到虚拟磁盘上该文件的目录项中，方法是：打开该文件的父目录文件，以覆盖写",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        678,
                                        423,
                                        691
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                678,
                                                423,
                                                691
                                            ],
                                            "type": "text",
                                            "content": "方式调用do_write()将欲关闭文件的 FCB写入父目录文件的相应盘块中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                696,
                                503,
                                725
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        696,
                                        505,
                                        710
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                696,
                                                122,
                                                708
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                696,
                                                505,
                                                710
                                            ],
                                            "type": "text",
                                            "content": "回收该文件占据的用户打开文件表表项（进行清空操作），并将 topenfile 字段置",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        86,
                                        711,
                                        116,
                                        730
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                711,
                                                116,
                                                730
                                            ],
                                            "type": "text",
                                            "content": "为 0；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                732,
                                151,
                                744
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        731,
                                        154,
                                        746
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                731,
                                                122,
                                                744
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.74
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                731,
                                                154,
                                                746
                                            ],
                                            "type": "text",
                                            "content": "返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        110,
                        754,
                        239,
                        767
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                751,
                                240,
                                770
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        751,
                                        240,
                                        770
                                    ],
                                    "type": "text",
                                    "content": "12．写文件函数 my_write()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 78
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        505,
                        232
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 5,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                76,
                                233,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        74,
                                        233,
                                        91
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                74,
                                                233,
                                                91
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_write",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                95,
                                271,
                                107
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        92,
                                        270,
                                        109
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                92,
                                                270,
                                                109
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_write fd",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                112,
                                315,
                                126
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        111,
                                        315,
                                        126
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                111,
                                                315,
                                                126
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：int my_write(int fd)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                130,
                                505,
                                232
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        131,
                                        505,
                                        142
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                131,
                                                505,
                                                142
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：将用户通过键盘输入的内容写到 fd 所指定的文件中。磁盘文件的读写操作",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        148,
                                        505,
                                        160
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                148,
                                                505,
                                                160
                                            ],
                                            "type": "text",
                                            "content": "都必须以完整的数据块为单位进行，在写操作时，先将数据写在缓冲区中，缓冲区的大小与",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        166,
                                        505,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                166,
                                                505,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "磁盘块的大小相同，然后再将缓冲区中的数据一次性写到磁盘块中；读出时先将一个磁盘块",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        185,
                                        499,
                                        197
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                185,
                                                499,
                                                197
                                            ],
                                            "type": "text",
                                            "content": "中的内容读到缓冲区中，然后再传送到用户区。本实例为了简便起见，没有设置缓冲区管理，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        203,
                                        492,
                                        215
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                203,
                                                492,
                                                215
                                            ],
                                            "type": "text",
                                            "content": "只是在读写文件时由用户使用 malloc()申请一块空间作为缓冲区，读写操作结束后使用",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        221,
                                        158,
                                        232
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                221,
                                                158,
                                                232
                                            ],
                                            "type": "text",
                                            "content": "free()释放掉。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        238,
                        506,
                        322
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                110,
                                238,
                                505,
                                250
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        110,
                                        238,
                                        505,
                                        250
                                    ],
                                    "type": "text",
                                    "content": "写操作常有三种方式：截断写、覆盖写和追加写。截断写是放弃原来文件的内容，重新",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                257,
                                505,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        257,
                                        505,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "写文件；覆盖写是修改文件在当前读写指针所指的位置开始的部分内容；追加写是在原文件",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                275,
                                505,
                                286
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        275,
                                        505,
                                        286
                                    ],
                                    "type": "text",
                                    "content": "的最后添加新的内容。在本实例中，输入写文件命令后，系统会出现提示让用户选择其中的",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                89,
                                292,
                                489,
                                305
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        89,
                                        292,
                                        489,
                                        305
                                    ],
                                    "type": "text",
                                    "content": "一种写方式，并将随后键盘输入的内容按照所选的方式写到文件中，键盘输入内容通过",
                                    "score": 1.0
                                }
                            ]
                        },
                        {
                            "bbox": [
                                88,
                                310,
                                251,
                                322
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        88,
                                        310,
                                        117,
                                        322
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\mathrm { C T R } { + } Z",
                                    "score": 0.7
                                },
                                {
                                    "bbox": [
                                        117,
                                        311,
                                        251,
                                        322
                                    ],
                                    "type": "text",
                                    "content": "键（或其他设定的键）结束。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        327,
                        162,
                        340
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                327,
                                164,
                                343
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        327,
                                        164,
                                        343
                                    ],
                                    "type": "text",
                                    "content": "（5）输入：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        346,
                        340,
                        359
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                134,
                                344,
                                342,
                                361
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        134,
                                        344,
                                        342,
                                        361
                                    ],
                                    "type": "text",
                                    "content": "fd： open()函数的返回值，文件的描述符；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        364,
                        257,
                        395
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 11,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                364,
                                257,
                                376
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        364,
                                        258,
                                        377
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                364,
                                                258,
                                                377
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：实际写入的字节数。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                382,
                                226,
                                395
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        382,
                                        226,
                                        394
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                382,
                                                226,
                                                394
                                            ],
                                            "type": "text",
                                            "content": "（7）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        86,
                        400,
                        505,
                        719
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                400,
                                502,
                                431
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 12,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        399,
                                        502,
                                        412
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                399,
                                                122,
                                                412
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                401,
                                                502,
                                                412
                                            ],
                                            "type": "text",
                                            "content": "检查fd的有效性（fd不能超出用户打开文件表所在数组的最大下标），如果无效",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        417,
                                        221,
                                        431
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                417,
                                                221,
                                                431
                                            ],
                                            "type": "text",
                                            "content": "则返回-1，并显示出错信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                436,
                                442,
                                449
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        435,
                                        442,
                                        449
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                435,
                                                122,
                                                449
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                435,
                                                442,
                                                449
                                            ],
                                            "type": "text",
                                            "content": "提示并等待用户输入写方式：（1：截断写；2：覆盖写；3：追加写）",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                454,
                                505,
                                521
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        454,
                                        505,
                                        466
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                454,
                                                122,
                                                466
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                454,
                                                505,
                                                466
                                            ],
                                            "type": "text",
                                            "content": "如果用户要求的写方式是截断写，则释放文件除第一块外的其他磁盘空间内容（查",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        472,
                                        505,
                                        484
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                472,
                                                505,
                                                484
                                            ],
                                            "type": "text",
                                            "content": "找并修改FAT表），将内存用户打开文件表项中文件长度修改为 0，将读写指针置为 0 并转",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        489,
                                        505,
                                        502
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                489,
                                                101,
                                                502
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                101,
                                                491,
                                                505,
                                                502
                                            ],
                                            "type": "text",
                                            "content": "；如果用户要求的写方式是追加写，则修改文件的当前读写指针位置到文件的末尾，并转",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        507,
                                        273,
                                        520
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                507,
                                                100,
                                                520
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                101,
                                                508,
                                                257,
                                                520
                                            ],
                                            "type": "text",
                                            "content": "；如果写方式是覆盖写，则直接转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                257,
                                                507,
                                                268,
                                                520
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.88
                                        },
                                        {
                                            "bbox": [
                                                269,
                                                508,
                                                273,
                                                520
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                525,
                                505,
                                556
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        525,
                                        505,
                                        539
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                525,
                                                122,
                                                538
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                526,
                                                264,
                                                539
                                            ],
                                            "type": "text",
                                            "content": "提示用户：整个输入内容通过",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                264,
                                                526,
                                                293,
                                                538
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm { C T R } { + } Z",
                                            "score": 0.77
                                        },
                                        {
                                            "bbox": [
                                                293,
                                                526,
                                                505,
                                                539
                                            ],
                                            "type": "text",
                                            "content": "键（或其他设定的键）结束；用户可分多次输",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        544,
                                        231,
                                        557
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                544,
                                                231,
                                                557
                                            ],
                                            "type": "text",
                                            "content": "入写入内容，每次用回车结束；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                561,
                                504,
                                592
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        560,
                                        505,
                                        575
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                561,
                                                122,
                                                574
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                560,
                                                505,
                                                575
                                            ],
                                            "type": "text",
                                            "content": "等待用户从键盘输入文件内容，并将用户的本次输入内容保存到一临时变量 text[]",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        580,
                                        431,
                                        592
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                580,
                                                290,
                                                592
                                            ],
                                            "type": "text",
                                            "content": "中，要求每次输入以回车结束，全部结束用",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                290,
                                                580,
                                                319,
                                                592
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm { C T R } { + } Z",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                319,
                                                580,
                                                431,
                                                592
                                            ],
                                            "type": "text",
                                            "content": "键（或其他设定的键）；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                597,
                                386,
                                611
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        597,
                                        386,
                                        611
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                597,
                                                122,
                                                610
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                597,
                                                386,
                                                611
                                            ],
                                            "type": "text",
                                            "content": "调用do_write()函数将通过键盘键入的内容写到文件中。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                615,
                                505,
                                646
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        615,
                                        505,
                                        628
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                615,
                                                122,
                                                628
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                617,
                                                505,
                                                628
                                            ],
                                            "type": "text",
                                            "content": "如果do_write()函数的返回值为非负值，则将实际写入字节数增加do_write()函数",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        634,
                                        262,
                                        645
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                634,
                                                246,
                                                645
                                            ],
                                            "type": "text",
                                            "content": "返回值，否则显示出错信息，并转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                246,
                                                634,
                                                258,
                                                645
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{9}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                258,
                                                634,
                                                262,
                                                645
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                651,
                                504,
                                682
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        651,
                                        505,
                                        665
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                651,
                                                122,
                                                664
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{8}",
                                            "score": 0.83
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                652,
                                                318,
                                                665
                                            ],
                                            "type": "text",
                                            "content": "如果text[]中最后一个字符不是结束字符",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                319,
                                                652,
                                                348,
                                                664
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm { C T R } { + } Z",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                348,
                                                652,
                                                377,
                                                665
                                            ],
                                            "type": "text",
                                            "content": "，则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                377,
                                                651,
                                                389,
                                                664
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                389,
                                                652,
                                                505,
                                                665
                                            ],
                                            "type": "text",
                                            "content": "继续进行写操作；否则转",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        667,
                                        106,
                                        684
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                669,
                                                101,
                                                682
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{9}",
                                            "score": 0.79
                                        },
                                        {
                                            "bbox": [
                                                101,
                                                667,
                                                106,
                                                684
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                687,
                                504,
                                719
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        687,
                                        505,
                                        701
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                687,
                                                122,
                                                700
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{9}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                687,
                                                505,
                                                701
                                            ],
                                            "type": "text",
                                            "content": "如果当前读写指针位置大于用户打开文件表项中的文件长度，则修改打开文件表项",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        705,
                                        275,
                                        719
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                705,
                                                275,
                                                719
                                            ],
                                            "type": "text",
                                            "content": "中的文件长度信息，并将fcbstate置1；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        120,
                        724,
                        249,
                        736
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                122,
                                723,
                                250,
                                736
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        122,
                                        723,
                                        135,
                                        736
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{10}",
                                    "score": 0.77
                                },
                                {
                                    "bbox": [
                                        136,
                                        724,
                                        250,
                                        736
                                    ],
                                    "type": "text",
                                    "content": "返回实际写入的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        108,
                        745,
                        260,
                        760
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 23,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                745,
                                261,
                                761
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        745,
                                        261,
                                        761
                                    ],
                                    "type": "text",
                                    "content": "13．实际写文件函数 do_write()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 79
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        504,
                        178
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 6,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                76,
                                202,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        76,
                                        201,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                76,
                                                201,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                94,
                                222,
                                106
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        94,
                                        222,
                                        107
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                94,
                                                222,
                                                107
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                112,
                                493,
                                125
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        111,
                                        493,
                                        126
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                111,
                                                493,
                                                126
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：int my_write(int fd，char *text，int len，char wstyle)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                130,
                                504,
                                160
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        131,
                                        505,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                131,
                                                505,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：被写文件函数my_write()调用，用来将键盘输入的内容写到相应的文件中",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        146,
                                        108,
                                        163
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                146,
                                                108,
                                                163
                                            ],
                                            "type": "text",
                                            "content": "去。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                166,
                                162,
                                178
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        164,
                                        164,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                164,
                                                164,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        133,
                        184,
                        341,
                        196
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 7,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                182,
                                343,
                                200
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        182,
                                        343,
                                        200
                                    ],
                                    "type": "text",
                                    "content": "fd： open()函数的返回值，文件的描述符；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        202,
                        288,
                        215
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 8,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                202,
                                289,
                                215
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        202,
                                        289,
                                        215
                                    ],
                                    "type": "text",
                                    "content": "text：指向要写入的内容的指针；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        220,
                        258,
                        232
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                220,
                                259,
                                232
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        220,
                                        259,
                                        232
                                    ],
                                    "type": "text",
                                    "content": "len：本次要求写入字节数",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        238,
                        211,
                        250
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 10,
                    "lines": [
                        {
                            "bbox": [
                                134,
                                238,
                                212,
                                252
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        134,
                                        238,
                                        212,
                                        252
                                    ],
                                    "type": "text",
                                    "content": "wstyle：写方式",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        256,
                        257,
                        269
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 11,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                256,
                                258,
                                269
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        256,
                                        258,
                                        269
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：实际写入的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        274,
                        226,
                        286
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 12,
                    "lines": [
                        {
                            "bbox": [
                                115,
                                274,
                                226,
                                287
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        115,
                                        274,
                                        226,
                                        287
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        292,
                        504,
                        556
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 21,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                292,
                                498,
                                322
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 13,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        291,
                                        499,
                                        305
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                291,
                                                122,
                                                305
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                292,
                                                499,
                                                305
                                            ],
                                            "type": "text",
                                            "content": "用malloc()申请1024B的内存空间作为读写磁盘的缓冲区buf，申请失败则返回-1，",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        310,
                                        168,
                                        323
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                310,
                                                168,
                                                323
                                            ],
                                            "type": "text",
                                            "content": "并显示出错信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                327,
                                504,
                                394
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 14,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        327,
                                        501,
                                        340
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                327,
                                                122,
                                                340
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                328,
                                                501,
                                                340
                                            ],
                                            "type": "text",
                                            "content": "将读写指针转化为逻辑块块号和块内偏移 off，并利用打开文件表表项中的首块号",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        347,
                                        505,
                                        359
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                347,
                                                505,
                                                359
                                            ],
                                            "type": "text",
                                            "content": "及FAT表的相关内容将逻辑块块号转换成对应的磁盘块块号 blkno；如果找不到对应的磁盘",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        364,
                                        500,
                                        377
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                364,
                                                500,
                                                377
                                            ],
                                            "type": "text",
                                            "content": "块，则需要检索FAT为该逻辑块分配一新的磁盘块，并将对应的磁盘块块号blkno登记到",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        381,
                                        323,
                                        394
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                381,
                                                323,
                                                394
                                            ],
                                            "type": "text",
                                            "content": "FAT中，若分配失败，则返回-1，并显示出错信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                400,
                                502,
                                431
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 15,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        399,
                                        501,
                                        412
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                399,
                                                122,
                                                412
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                401,
                                                501,
                                                412
                                            ],
                                            "type": "text",
                                            "content": "如果是覆盖写，或者如果当前读写指针所对应的块内偏移 off不等于 0，则将块号",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        417,
                                        499,
                                        430
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                417,
                                                499,
                                                430
                                            ],
                                            "type": "text",
                                            "content": "为blkno的虚拟磁盘块全部1024B的内容读到缓冲区buf中；否则便用ASCII码0清空buf；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                435,
                                504,
                                467
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 16,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        435,
                                        505,
                                        449
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                435,
                                                122,
                                                449
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.8
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                436,
                                                505,
                                                449
                                            ],
                                            "type": "text",
                                            "content": "将text中未写入的内容暂存到缓冲区 buff 的第 off字节开始的位置，直到缓冲区",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        454,
                                        436,
                                        467
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                454,
                                                205,
                                                467
                                            ],
                                            "type": "text",
                                            "content": "满，或者接收到结束字符",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                206,
                                                454,
                                                235,
                                                466
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\mathrm { C T R } { + } Z",
                                            "score": 0.79
                                        },
                                        {
                                            "bbox": [
                                                235,
                                                454,
                                                436,
                                                467
                                            ],
                                            "type": "text",
                                            "content": "为止；将本次写入字节数记录到tmplen中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                471,
                                404,
                                485
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 17,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        471,
                                        405,
                                        486
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                471,
                                                122,
                                                484
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                471,
                                                405,
                                                486
                                            ],
                                            "type": "text",
                                            "content": "将 buf 中 1024B 的内容写入到块号为 blkno 的虚拟磁盘块中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                490,
                                480,
                                520
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        489,
                                        481,
                                        502
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                490,
                                                121,
                                                502
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                121,
                                                489,
                                                481,
                                                502
                                            ],
                                            "type": "text",
                                            "content": "将当前读写指针修改为原来的值加上 tmplen；并将本次实际写入的字节数增加",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        507,
                                        128,
                                        523
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                507,
                                                128,
                                                523
                                            ],
                                            "type": "text",
                                            "content": "tmplen；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                525,
                                364,
                                539
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        525,
                                        365,
                                        540
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                525,
                                                122,
                                                538
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                525,
                                                254,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "如果 tmplen 小于 len，则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                254,
                                                525,
                                                265,
                                                538
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                266,
                                                525,
                                                348,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "继续写入；否则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                349,
                                                525,
                                                360,
                                                538
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{8}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                361,
                                                525,
                                                365,
                                                540
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                544,
                                257,
                                556
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        543,
                                        257,
                                        556
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                543,
                                                122,
                                                556
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{8}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                544,
                                                257,
                                                556
                                            ],
                                            "type": "text",
                                            "content": "返回本次实际写入的字节数。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        565,
                        234,
                        580
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 22,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                565,
                                235,
                                582
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        565,
                                        235,
                                        582
                                    ],
                                    "type": "text",
                                    "content": "14．读文件函数 my_read()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        593,
                        477,
                        677
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 28,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                593,
                                227,
                                605
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        592,
                                        229,
                                        608
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                592,
                                                229,
                                                608
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_read",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                611,
                                285,
                                624
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        610,
                                        286,
                                        625
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                610,
                                                286,
                                                625
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_read fd len",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                629,
                                356,
                                641
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 25,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        627,
                                        357,
                                        644
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                627,
                                                357,
                                                644
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：int myread (int fd, int len)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                646,
                                477,
                                659
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 26,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        647,
                                        478,
                                        660
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                647,
                                                478,
                                                660
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：读出指定文件中从读写指针开始的长度为 len的内容到用户空间中。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                665,
                                162,
                                677
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        663,
                                        164,
                                        679
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                663,
                                                164,
                                                679
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        133,
                        682,
                        340,
                        695
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 29,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                681,
                                343,
                                699
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        681,
                                        343,
                                        699
                                    ],
                                    "type": "text",
                                    "content": "fd： open()函数的返回值，文件的描述符；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        701,
                        294,
                        713
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 30,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                700,
                                295,
                                715
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        700,
                                        295,
                                        715
                                    ],
                                    "type": "text",
                                    "content": "len: 要从文件中读出的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        719,
                        257,
                        749
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 33,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                719,
                                257,
                                731
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        116,
                                        719,
                                        257,
                                        731
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                116,
                                                719,
                                                257,
                                                731
                                            ],
                                            "type": "text",
                                            "content": "（6）输出：实际读出的字节数。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                736,
                                226,
                                749
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        736,
                                        226,
                                        750
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                736,
                                                226,
                                                750
                                            ],
                                            "type": "text",
                                            "content": "（7）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        755,
                        464,
                        768
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 34,
                    "lines": [
                        {
                            "bbox": [
                                109,
                                754,
                                465,
                                768
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        109,
                                        754,
                                        122,
                                        767
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{1}",
                                    "score": 0.83
                                },
                                {
                                    "bbox": [
                                        123,
                                        755,
                                        465,
                                        768
                                    ],
                                    "type": "text",
                                    "content": "定义一个字符型数组text[len]，用来接收用户从文件中读出的文件内容；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 80
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        86,
                        76,
                        503,
                        179
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 5,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                76,
                                502,
                                107
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        76,
                                        502,
                                        89
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                76,
                                                122,
                                                89
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.81
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                76,
                                                502,
                                                89
                                            ],
                                            "type": "text",
                                            "content": "检查fd的有效性（fd不能超出用户打开文件表所在数组的最大下标），如果无效",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        95,
                                        220,
                                        106
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                95,
                                                220,
                                                106
                                            ],
                                            "type": "text",
                                            "content": "则返回-1，并显示出错信息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                111,
                                414,
                                125
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        111,
                                        415,
                                        126
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                111,
                                                122,
                                                125
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                111,
                                                415,
                                                126
                                            ],
                                            "type": "text",
                                            "content": "调用 do_read()将指定文件中的 len 字节内容读出到 text[]中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                130,
                                503,
                                160
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 3,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        130,
                                        505,
                                        143
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                130,
                                                122,
                                                142
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                131,
                                                505,
                                                143
                                            ],
                                            "type": "text",
                                            "content": "如果do_read()的返回值为负，则显示出错信息；否则将text[]中的内容显示到屏",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        107,
                                        147,
                                        139,
                                        163
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                107,
                                                147,
                                                139,
                                                163
                                            ],
                                            "type": "text",
                                            "content": "幕上；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                166,
                                151,
                                179
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        165,
                                        154,
                                        180
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                166,
                                                122,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                165,
                                                154,
                                                180
                                            ],
                                            "type": "text",
                                            "content": "返回。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        188,
                        255,
                        202
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 6,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                185,
                                255,
                                204
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        185,
                                        255,
                                        204
                                    ],
                                    "type": "text",
                                    "content": "15．实际读文件函数 do_read()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        215,
                        502,
                        317
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 12,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                215,
                                201,
                                227
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        215,
                                        201,
                                        229
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                215,
                                                201,
                                                229
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                232,
                                221,
                                245
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 8,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        232,
                                        222,
                                        246
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                232,
                                                222,
                                                246
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                251,
                                419,
                                264
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 9,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        249,
                                        420,
                                        265
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                249,
                                                420,
                                                265
                                            ],
                                            "type": "text",
                                            "content": "（3）函数设计格式：int do_read (int fd, int len,char *text)",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                269,
                                502,
                                300
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 10,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        269,
                                        502,
                                        282
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                269,
                                                502,
                                                282
                                            ],
                                            "type": "text",
                                            "content": "（4）功能：被my_read()调用，读出指定文件中从读写指针开始的长度为 len 的内容",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        286,
                                        196,
                                        301
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                286,
                                                196,
                                                301
                                            ],
                                            "type": "text",
                                            "content": "到用户空间的 text 中。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                305,
                                162,
                                317
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 11,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        304,
                                        164,
                                        320
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                304,
                                                164,
                                                320
                                            ],
                                            "type": "text",
                                            "content": "（5）输入：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        133,
                        323,
                        340,
                        336
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 13,
                    "lines": [
                        {
                            "bbox": [
                                133,
                                321,
                                343,
                                339
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        133,
                                        321,
                                        343,
                                        339
                                    ],
                                    "type": "text",
                                    "content": "fd： open()函数的返回值，文件的描述符；",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        341,
                        304,
                        354
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 14,
                    "lines": [
                        {
                            "bbox": [
                                135,
                                341,
                                305,
                                355
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        135,
                                        341,
                                        164,
                                        355
                                    ],
                                    "type": "text",
                                    "content": "len:",
                                    "score": 1.0
                                },
                                {
                                    "bbox": [
                                        171,
                                        342,
                                        305,
                                        354
                                    ],
                                    "type": "text",
                                    "content": "要求从文件中读出的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        134,
                        359,
                        315,
                        371
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 15,
                    "lines": [
                        {
                            "bbox": [
                                136,
                                359,
                                315,
                                372
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        136,
                                        359,
                                        315,
                                        372
                                    ],
                                    "type": "text",
                                    "content": "text：指向存放读出数据的用户区地址",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        377,
                        257,
                        390
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 16,
                    "lines": [
                        {
                            "bbox": [
                                116,
                                378,
                                257,
                                390
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        116,
                                        378,
                                        257,
                                        390
                                    ],
                                    "type": "text",
                                    "content": "（6）输出：实际读出的字节数。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        395,
                        225,
                        407
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 17,
                    "lines": [
                        {
                            "bbox": [
                                114,
                                395,
                                226,
                                408
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        114,
                                        395,
                                        226,
                                        408
                                    ],
                                    "type": "text",
                                    "content": "（7）函数需完成的工作：",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        86,
                        412,
                        504,
                        641
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 25,
                    "blocks": [
                        {
                            "bbox": [
                                86,
                                412,
                                504,
                                444
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 18,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        412,
                                        505,
                                        426
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                412,
                                                122,
                                                425
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                413,
                                                505,
                                                426
                                            ],
                                            "type": "text",
                                            "content": "使用malloc()申请 1024B空间作为缓冲区 buf，申请失败则返回-1，并显示出错信",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        430,
                                        107,
                                        446
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                430,
                                                107,
                                                446
                                            ],
                                            "type": "text",
                                            "content": "息；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                449,
                                504,
                                497
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 19,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        449,
                                        502,
                                        461
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                449,
                                                122,
                                                461
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.82
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                449,
                                                502,
                                                461
                                            ],
                                            "type": "text",
                                            "content": "将读写指针转化为逻辑块块号及块内偏移量 off，利用打开文件表表项中的首块号",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        467,
                                        506,
                                        480
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                467,
                                                506,
                                                480
                                            ],
                                            "type": "text",
                                            "content": "查找FAT表，找到该逻辑块所在的磁盘块块号；将该磁盘块块号转化为虚拟磁盘上的内存位",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        86,
                                        483,
                                        110,
                                        501
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                86,
                                                483,
                                                110,
                                                501
                                            ],
                                            "type": "text",
                                            "content": "置；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                502,
                                401,
                                516
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 20,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        502,
                                        401,
                                        517
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                502,
                                                122,
                                                516
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                502,
                                                401,
                                                517
                                            ],
                                            "type": "text",
                                            "content": "将该内存位置开始的 1024B（一个磁盘块）内容读入 buf 中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                521,
                                502,
                                570
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 21,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        520,
                                        502,
                                        534
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                520,
                                                122,
                                                534
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                521,
                                                502,
                                                534
                                            ],
                                            "type": "text",
                                            "content": "比较buf中从偏移量off开始的剩余字节数是否大于等于应读写的字节数len，如",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        540,
                                        501,
                                        550
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                540,
                                                501,
                                                550
                                            ],
                                            "type": "text",
                                            "content": "果是，则将从off开始的buf中的len长度的内容读入到 text[]中；否则，将从 off开始",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        89,
                                        557,
                                        265,
                                        570
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                89,
                                                557,
                                                265,
                                                570
                                            ],
                                            "type": "text",
                                            "content": "的buf中的剩余内容读入到 text[]中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                86,
                                575,
                                504,
                                605
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 22,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        575,
                                        504,
                                        587
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                575,
                                                122,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{5}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                576,
                                                198,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "将读写指针增加",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                199,
                                                575,
                                                211,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                211,
                                                576,
                                                408,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "中已读字节数，将应读写的字节数 len减去",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                409,
                                                575,
                                                421,
                                                587
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                421,
                                                576,
                                                504,
                                                587
                                            ],
                                            "type": "text",
                                            "content": "中已读字节数，若",
                                            "score": 1.0
                                        }
                                    ]
                                },
                                {
                                    "bbox": [
                                        88,
                                        592,
                                        236,
                                        606
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                88,
                                                592,
                                                167,
                                                606
                                            ],
                                            "type": "text",
                                            "content": "len大于0，则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                167,
                                                592,
                                                179,
                                                605
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                180,
                                                592,
                                                220,
                                                606
                                            ],
                                            "type": "text",
                                            "content": "；否则转",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                220,
                                                592,
                                                232,
                                                605
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.88
                                        },
                                        {
                                            "bbox": [
                                                232,
                                                592,
                                                236,
                                                606
                                            ],
                                            "type": "text",
                                            "content": "；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                611,
                                277,
                                624
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 23,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        610,
                                        279,
                                        624
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                610,
                                                122,
                                                624
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{6}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                611,
                                                201,
                                                624
                                            ],
                                            "type": "text",
                                            "content": "使用 free()释放",
                                            "score": 1.0
                                        },
                                        {
                                            "bbox": [
                                                202,
                                                611,
                                                213,
                                                624
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.88
                                        },
                                        {
                                            "bbox": [
                                                214,
                                                611,
                                                279,
                                                624
                                            ],
                                            "type": "text",
                                            "content": "中申请的 buf。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                629,
                                236,
                                641
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 24,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        629,
                                        237,
                                        641
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                629,
                                                122,
                                                641
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{7}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                629,
                                                237,
                                                641
                                            ],
                                            "type": "text",
                                            "content": "返回实际读出的字节数。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        108,
                        650,
                        281,
                        665
                    ],
                    "type": "title",
                    "angle": 0,
                    "index": 26,
                    "lines": [
                        {
                            "bbox": [
                                108,
                                648,
                                282,
                                667
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        108,
                                        648,
                                        282,
                                        667
                                    ],
                                    "type": "text",
                                    "content": "16. 退出文件系统函数 my_exitsys()",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                },
                {
                    "bbox": [
                        113,
                        678,
                        268,
                        709
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 29,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                678,
                                242,
                                691
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 27,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        677,
                                        244,
                                        693
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                677,
                                                244,
                                                693
                                            ],
                                            "type": "text",
                                            "content": "（1）对应命令：my_exitsys",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                696,
                                268,
                                709
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 28,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        693,
                                        270,
                                        712
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                693,
                                                270,
                                                712
                                            ],
                                            "type": "text",
                                            "content": "（2）命令调用格式：my_ exitsys",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        113,
                        714,
                        298,
                        762
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 33,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                714,
                                298,
                                727
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 30,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        712,
                                        300,
                                        729
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                712,
                                                300,
                                                729
                                            ],
                                            "type": "text",
                                            "content": "（1）函数设计格式：void my_exitsys()",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                732,
                                236,
                                745
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 31,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        732,
                                        237,
                                        745
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                732,
                                                237,
                                                745
                                            ],
                                            "type": "text",
                                            "content": "（2）功能：退出文件系统。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                750,
                                179,
                                762
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 32,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        749,
                                        180,
                                        764
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                749,
                                                180,
                                                764
                                            ],
                                            "type": "text",
                                            "content": "（3）输入：无",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        53
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 81
        },
        {
            "para_blocks": [
                {
                    "bbox": [
                        113,
                        76,
                        226,
                        106
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 3,
                    "blocks": [
                        {
                            "bbox": [
                                113,
                                76,
                                184,
                                89
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 1,
                            "lines": [
                                {
                                    "bbox": [
                                        114,
                                        76,
                                        185,
                                        90
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                114,
                                                76,
                                                185,
                                                90
                                            ],
                                            "type": "text",
                                            "content": "（4）输出：无。",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                113,
                                94,
                                226,
                                106
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 2,
                            "lines": [
                                {
                                    "bbox": [
                                        115,
                                        94,
                                        226,
                                        107
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                115,
                                                94,
                                                226,
                                                107
                                            ],
                                            "type": "text",
                                            "content": "（5）函数需完成的工作：",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        107,
                        111,
                        408,
                        179
                    ],
                    "type": "list",
                    "angle": 0,
                    "index": 8,
                    "blocks": [
                        {
                            "bbox": [
                                107,
                                111,
                                355,
                                125
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 4,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        111,
                                        355,
                                        126
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                111,
                                                122,
                                                125
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{1}",
                                            "score": 0.84
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                111,
                                                355,
                                                126
                                            ],
                                            "type": "text",
                                            "content": "使用 C 库函数 fopen()打开磁盘上的 myfsys 文件；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                130,
                                408,
                                143
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 5,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        129,
                                        409,
                                        144
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                130,
                                                122,
                                                142
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{2}",
                                            "score": 0.87
                                        },
                                        {
                                            "bbox": [
                                                123,
                                                129,
                                                409,
                                                144
                                            ],
                                            "type": "text",
                                            "content": "将虚拟磁盘空间中的所有内容保存到磁盘上的 myfsys 文件中；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                107,
                                148,
                                349,
                                161
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 6,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        148,
                                        350,
                                        163
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                148,
                                                122,
                                                161
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{3}",
                                            "score": 0.86
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                148,
                                                350,
                                                163
                                            ],
                                            "type": "text",
                                            "content": "使用 c 语言的库函数 fclose()关闭 myfsys 文件；",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "bbox": [
                                108,
                                166,
                                306,
                                179
                            ],
                            "type": "text",
                            "angle": 0,
                            "index": 7,
                            "lines": [
                                {
                                    "bbox": [
                                        109,
                                        166,
                                        306,
                                        179
                                    ],
                                    "spans": [
                                        {
                                            "bbox": [
                                                109,
                                                166,
                                                122,
                                                179
                                            ],
                                            "type": "inline_equation",
                                            "content": "\\textcircled{4}",
                                            "score": 0.85
                                        },
                                        {
                                            "bbox": [
                                                122,
                                                166,
                                                306,
                                                179
                                            ],
                                            "type": "text",
                                            "content": "撤销用户打开文件表，释放其内存空间",
                                            "score": 1.0
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "sub_type": "text"
                },
                {
                    "bbox": [
                        128,
                        180,
                        244,
                        193
                    ],
                    "type": "text",
                    "angle": 0,
                    "index": 9,
                    "lines": [
                        {
                            "bbox": [
                                130,
                                180,
                                244,
                                193
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        130,
                                        180,
                                        143,
                                        193
                                    ],
                                    "type": "inline_equation",
                                    "content": "\\textcircled{4}",
                                    "score": 0.83
                                },
                                {
                                    "bbox": [
                                        147,
                                        181,
                                        244,
                                        193
                                    ],
                                    "type": "text",
                                    "content": "释放虚拟磁盘空间。",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "discarded_blocks": [
                {
                    "bbox": [
                        223,
                        42,
                        370,
                        52
                    ],
                    "type": "header",
                    "angle": 0,
                    "index": 0,
                    "lines": [
                        {
                            "bbox": [
                                224,
                                42,
                                370,
                                53
                            ],
                            "spans": [
                                {
                                    "bbox": [
                                        224,
                                        42,
                                        370,
                                        53
                                    ],
                                    "type": "text",
                                    "content": "版权归杭州电子科技大学计算机学院",
                                    "score": 1.0
                                }
                            ]
                        }
                    ]
                }
            ],
            "page_size": [
                595,
                841
            ],
            "page_idx": 82
        }
    ],
    "_backend": "hybrid",
    "_ocr_enable": false,
    "_vlm_ocr_enable": false,
    "_version_name": "2.7.6"
}