⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.h

📁 对linuix 文件系统的模拟,包含了若干文件命令
💻 H
字号:
#ifndef GLOBAL_H_INCLUDED
#define GLOBAL_H_INCLUDED

#include <iostream>
#include <cstring>

#include "define.h"
#include "usr.h"
#include "command.h"
#include "dir.h"

namespace gilyou
{

int read_name(char name[]);
int read_passwd(char passwd[] , char echo_char = '*');
int read_command(char command[]);
int judge_command(char command[],char cmd[],char args[]);

bool string_equal(char dst[],char src[]);
uchar auth_check(uint uid,uint mask);
int login(char name[],char passwd[],user_t &usr);
uint replace(char char_array[],char char_for_replace,char char_to_be_replaced);

////////////////////////

template <class T>
inline void print(T message , unsigned char option = INDENT)
{
    if((option & INDENT) ==  INDENT)
        std::cout<<" ";
    std::cout<<message;
    if((option & NEW_LINE) ==  NEW_LINE)
        std::cout<<std::endl;
}

////////////////////////

int run();
void welcome();
std::string string_cat(int count,char strings[]...);
void delay(int msec);
void init_system();
void init_root();
void init_current_directory(uint i_number);
uchar mkfile(char f_name[],bool alarm = false);
uint get_inode();
void set_inode(uint i_number,uint inode = ALREADY_USED);
int replace_last(char carry[],char for_place,char to_be_placed);
void init_disks(disk_t disks[]);
}


#endif // GLOBAL_H_INCLUDED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -