mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-12-02 05:29:20 -06:00
some added missing function
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1500 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
7409fccbd9
commit
7f05ce838a
@ -131,7 +131,7 @@ xaccSessionGetFilePath (Session *sess)
|
|||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
|
|
||||||
AccountGroup *
|
AccountGroup *
|
||||||
xaccSessionBegin (Session *sess, char * sid)
|
xaccSessionBegin (Session *sess, const char * sid)
|
||||||
{
|
{
|
||||||
AccountGroup *retval;
|
AccountGroup *retval;
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ xaccSessionBegin (Session *sess, char * sid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AccountGroup *
|
AccountGroup *
|
||||||
xaccSessionBeginFile (Session *sess, char * filefrag)
|
xaccSessionBeginFile (Session *sess, const char * filefrag)
|
||||||
{
|
{
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
char pathbuf[PATH_MAX];
|
char pathbuf[PATH_MAX];
|
||||||
@ -331,6 +331,17 @@ xaccSessionDestroy (Session *sess)
|
|||||||
free (sess);
|
free (sess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================== */
|
||||||
|
/* hack alert -- implement this function.
|
||||||
|
* if $HOME/.gnucash/data directory doesn't exist, then create it
|
||||||
|
* this helps us slide by install errors made by naive users.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
MakeHomeDir (void)
|
||||||
|
{}
|
||||||
|
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
|
|
||||||
/* hack alert -- we should be yanking this out of
|
/* hack alert -- we should be yanking this out of
|
||||||
@ -408,6 +419,9 @@ xaccResolveFilePath (const char * filefrag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* make sure that the gnucash home dir exists. */
|
||||||
|
MakeHomeDir();
|
||||||
|
|
||||||
/* OK, we didn't find the file */
|
/* OK, we didn't find the file */
|
||||||
/* Lets try creating a new file in $HOME/.gnucash/data */
|
/* Lets try creating a new file in $HOME/.gnucash/data */
|
||||||
path = getenv ("HOME");
|
path = getenv ("HOME");
|
||||||
|
@ -149,8 +149,8 @@ void xaccSessionDestroy (Session *);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
AccountGroup * xaccSessionBegin (Session *, char * sessionid);
|
AccountGroup * xaccSessionBegin (Session *, const char * sessionid);
|
||||||
AccountGroup * xaccSessionBeginFile (Session *, char * filename);
|
AccountGroup * xaccSessionBeginFile (Session *, const char * filename);
|
||||||
int xaccSessionGetError (Session *);
|
int xaccSessionGetError (Session *);
|
||||||
AccountGroup * xaccSessionGetGroup (Session *);
|
AccountGroup * xaccSessionGetGroup (Session *);
|
||||||
void xaccSessionSetGroup (Session *, AccountGroup *topgroup);
|
void xaccSessionSetGroup (Session *, AccountGroup *topgroup);
|
||||||
|
Loading…
Reference in New Issue
Block a user