39 lines
760 B
C++
39 lines
760 B
C++
#include "IMFHeaderField.h"
|
|
#include "Exception.h"
|
|
#include "Log.h"
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
namespace coreutils {
|
|
|
|
IMFHeaderField::IMFHeaderField(char &ch, int fd) {
|
|
int rc = 0;
|
|
|
|
std::cout << "050" << std::endl;
|
|
|
|
if((ch >= 'A') && (ch <= 'Z'))
|
|
key.write(ch);
|
|
|
|
while(ch != ':') {
|
|
rc = ::read(fd, &ch, 1);
|
|
if(ch != ':')
|
|
key.write(ch);
|
|
}
|
|
|
|
std::cout << "051: " << key << std::endl;
|
|
|
|
rc = ::read(fd, &ch, 1);
|
|
while(ch == ' ')
|
|
rc = ::read(fd, &ch, 1);
|
|
|
|
while(ch != '\r') {
|
|
rc = ::read(fd, &ch, 1);
|
|
if(ch != '\r')
|
|
value.write(ch);
|
|
}
|
|
std::cout << "052: " << value << std::endl;
|
|
rc = ::read(fd, &ch, 1);
|
|
std::cout << "053" << std::endl;
|
|
}
|
|
|
|
} |