X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fodt.c;h=99f5e60d6ec7cb8fdb45265f424b16a37f18d133;hb=16c70c9f2e041d4ff21f57c29be37e60be40c089;hp=66e986be71270d5beb5d1f4240915c5148d5d373;hpb=d0dc0a22cc177d6bef52c0b744332e71c0f8fef9;p=pspp-builds.git diff --git a/src/output/odt.c b/src/output/odt.c index 66e986be..99f5e60d 100644 --- a/src/output/odt.c +++ b/src/output/odt.c @@ -21,6 +21,9 @@ #include #include #include +#ifdef HAVE_PWD_H +#include +#endif #include #include #include @@ -268,6 +271,22 @@ write_meta_data (struct odt_driver *odt) xmlTextWriterEndElement (w); } +#ifdef HAVE_PWD_H + { + struct passwd *pw = getpwuid (getuid ()); + if (pw != NULL) + { + xmlTextWriterStartElement (w, _xml ("meta:initial-creator")); + xmlTextWriterWriteString (w, _xml (strtok (pw->pw_gecos, ","))); + xmlTextWriterEndElement (w); + + xmlTextWriterStartElement (w, _xml ("dc:creator")); + xmlTextWriterWriteString (w, _xml (strtok (pw->pw_gecos, ","))); + xmlTextWriterEndElement (w); + } + } +#endif + xmlTextWriterEndElement (w); xmlTextWriterEndElement (w); xmlTextWriterEndDocument (w);