Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
camelCase: Converted code in main.cpp and common directories
[xestiacalendar/.git]
/
source
/
common
/
uuid.cpp
diff --git
a/source/common/uuid.cpp
b/source/common/uuid.cpp
index
2831e88
..
1a6ee5a
100644
(file)
--- a/
source/common/uuid.cpp
+++ b/
source/common/uuid.cpp
@@
-1,8
+1,8
@@
-// uuid.cpp - UUID
subroutine
s.
+// uuid.cpp - UUID
function
s.
//
//
-// (c) 2012-201
5
Xestia Software Development.
+// (c) 2012-201
7
Xestia Software Development.
//
//
-// This file is part of Xestia Calendar.
+// This file is part of Xestia Calendar.
Based on Xestia Address Book.
//
// Xestia Calendar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by the
//
// Xestia Calendar is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by the
@@
-37,23
+37,29
@@
string GenerateUUID()
#include <stdio.h>
#include <stdio.h>
- FILE *uuid
_
hdl = popen("uuidgen", "r");
+ FILE *uuidhdl = popen("uuidgen", "r");
- if (uuid
_
hdl == NULL) {
+ if (uuidhdl == NULL) {
return "";
}
return "";
}
- char str
d
ata[64];
- std::string uuid
o
ut;
+ char str
D
ata[64];
+ std::string uuid
O
ut;
- while (fgets(str
data, sizeof(strdata), uuid_
hdl) != NULL){
- uuid
out.append(strd
ata);
+ while (fgets(str
Data, sizeof(strData), uuid
hdl) != NULL){
+ uuid
Out.append(strD
ata);
}
}
- pclose(uuid
_
hdl);
+ pclose(uuidhdl);
#endif
#endif
- return uuidout;
+ if (uuidOut.back() == '\n'){
+
+ uuidOut.erase(uuidOut.end()-1);
+
+ }
+
+ return uuidOut;
}
\ No newline at end of file
}
\ No newline at end of file
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy