added: mount points

(reading /etc/fstab from db not working yet)
       core/mount.h
       core/mountparser.h
       core/mountparser.cpp
       core/mounts.h
       core/mounts.cpp
       content/thread.cpp
       content/createthread.cpp
       templates/thread.cpp       



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@495 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2009-04-19 22:13:21 +00:00
parent 7a4a8e0fe2
commit a1ea298a43
30 changed files with 879 additions and 195 deletions

49
core/mountparser.h Executable file
View File

@@ -0,0 +1,49 @@
/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2009, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecoremountparser
#define headerfilecoremountparser
#include <map>
#include <string>
#include "log.h"
#include "mount.h"
#include "error.h"
#include "item.h"
class MountParser
{
public:
Error Parse(const std::string & input, std::map<long, Mount> & output);
private:
bool IsWhite(int c);
void SkipWhite();
void SkipLine();
void ReadWord(std::string & res);
void ReadMountType();
void ReadMountPoint();
void ReadRow(std::map<long, Mount> & output);
const char * pinput;
std::string temp;
Mount::Type mount_type;
Item * pdir;
Error err;
};
#endif