mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
dump_util: move into namespace ue2
This commit is contained in:
parent
7d23a7e2d3
commit
1f3a000bfa
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Intel Corporation
|
* Copyright (c) 2016-2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
namespace ue2 {
|
||||||
|
|
||||||
FILE *fopen_or_throw(const char *path, const char *mode) {
|
FILE *fopen_or_throw(const char *path, const char *mode) {
|
||||||
FILE *f = fopen(path, mode);
|
FILE *f = fopen(path, mode);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@ -40,3 +42,5 @@ FILE *fopen_or_throw(const char *path, const char *mode) {
|
|||||||
}
|
}
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace ue2
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, Intel Corporation
|
* Copyright (c) 2016-2017, Intel Corporation
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -31,9 +31,13 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
namespace ue2 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as fopen(), but on error throws an exception rather than returning NULL.
|
* Same as fopen(), but on error throws an exception rather than returning NULL.
|
||||||
*/
|
*/
|
||||||
FILE *fopen_or_throw(const char *path, const char *mode);
|
FILE *fopen_or_throw(const char *path, const char *mode);
|
||||||
|
|
||||||
|
} // namespace ue2
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user