diff options
author | fluxgen <fluxgen> | 2001-12-13 21:56:45 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2001-12-13 21:56:45 (GMT) |
commit | b82730cde7df5b00364006faedb8dbcb8b5252ec (patch) | |
tree | 02d67ecb3cf006d484a5a92eea67e1e2c9d8eafe /src | |
parent | 4765321b3a5f97d753ee054a05d9307f30ab3839 (diff) | |
download | fluxbox-b82730cde7df5b00364006faedb8dbcb8b5252ec.zip fluxbox-b82730cde7df5b00364006faedb8dbcb8b5252ec.tar.bz2 |
Fixed bstrdup to Misc::strdup
Diffstat (limited to 'src')
-rw-r--r-- | src/fluxbox.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 1d61e73..53ed03d 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -161,9 +161,9 @@ char *Fluxbox::expandFilename(char *filename) { | |||
161 | strcat(retval, getenv("HOME")); | 161 | strcat(retval, getenv("HOME")); |
162 | strcat(retval, &filename[1]); | 162 | strcat(retval, &filename[1]); |
163 | } else | 163 | } else |
164 | return bstrdup(filename); //return unmodified value | 164 | return Misc::strdup(filename); //return unmodified value |
165 | 165 | ||
166 | return bstrdup(retval); //return modified value | 166 | return Misc::strdup(retval); //return modified value |
167 | } | 167 | } |
168 | 168 | ||
169 | //static singleton var | 169 | //static singleton var |
@@ -1710,7 +1710,7 @@ char *Fluxbox::getRcFilename() { | |||
1710 | snprintf(dbfile, dbfile_size, "%s/.%s/%s", homedir, RC_PATH, RC_INIT_FILE); | 1710 | snprintf(dbfile, dbfile_size, "%s/.%s/%s", homedir, RC_PATH, RC_INIT_FILE); |
1711 | 1711 | ||
1712 | } else | 1712 | } else |
1713 | dbfile = bstrdup(rc_file); | 1713 | dbfile = Misc::strdup(rc_file); |
1714 | 1714 | ||
1715 | return dbfile; | 1715 | return dbfile; |
1716 | } | 1716 | } |
@@ -1744,7 +1744,7 @@ void Fluxbox::load_rc(void) { | |||
1744 | 1744 | ||
1745 | resource.menu_file = expandFilename(value.addr); // expand ~ to $HOME | 1745 | resource.menu_file = expandFilename(value.addr); // expand ~ to $HOME |
1746 | } else | 1746 | } else |
1747 | resource.menu_file = bstrdup(DEFAULTMENU); | 1747 | resource.menu_file = Misc::strdup(DEFAULTMENU); |
1748 | 1748 | ||
1749 | if (resource.titlebar_file) { | 1749 | if (resource.titlebar_file) { |
1750 | delete resource.titlebar_file; | 1750 | delete resource.titlebar_file; |
@@ -1756,7 +1756,7 @@ void Fluxbox::load_rc(void) { | |||
1756 | &value_type, &value)) { | 1756 | &value_type, &value)) { |
1757 | resource.titlebar_file = expandFilename(value.addr); //expand ~ to home | 1757 | resource.titlebar_file = expandFilename(value.addr); //expand ~ to home |
1758 | } else | 1758 | } else |
1759 | resource.titlebar_file = bstrdup(DEFAULTTITLEBAR); | 1759 | resource.titlebar_file = Misc::strdup(DEFAULTTITLEBAR); |
1760 | 1760 | ||
1761 | //if already allocated memory for keys_file destroy it | 1761 | //if already allocated memory for keys_file destroy it |
1762 | if (resource.keys_file) { | 1762 | if (resource.keys_file) { |
@@ -1769,7 +1769,7 @@ void Fluxbox::load_rc(void) { | |||
1769 | &value_type, &value)) { | 1769 | &value_type, &value)) { |
1770 | resource.keys_file = expandFilename(value.addr); //expand ~ to home | 1770 | resource.keys_file = expandFilename(value.addr); //expand ~ to home |
1771 | } else | 1771 | } else |
1772 | resource.keys_file = bstrdup(DEFAULTKEYSFILE); | 1772 | resource.keys_file = Misc::strdup(DEFAULTKEYSFILE); |
1773 | 1773 | ||
1774 | 1774 | ||
1775 | if (XrmGetResource(database, "session.iconbar", "Session.Iconbar", | 1775 | if (XrmGetResource(database, "session.iconbar", "Session.Iconbar", |
@@ -1836,7 +1836,7 @@ void Fluxbox::load_rc(void) { | |||
1836 | &value_type, &value)) | 1836 | &value_type, &value)) |
1837 | resource.style_file = expandFilename(value.addr); | 1837 | resource.style_file = expandFilename(value.addr); |
1838 | else | 1838 | else |
1839 | resource.style_file = bstrdup(DEFAULTSTYLE); | 1839 | resource.style_file = Misc::strdup(DEFAULTSTYLE); |
1840 | 1840 | ||
1841 | if (resource.root_cmd) { | 1841 | if (resource.root_cmd) { |
1842 | delete [] resource.root_cmd; | 1842 | delete [] resource.root_cmd; |
@@ -2084,7 +2084,7 @@ void Fluxbox::load_rc(BScreen *screen) { | |||
2084 | sprintf(class_lookup, "Session.Screen%d.WorkspaceNames", screen_number); | 2084 | sprintf(class_lookup, "Session.Screen%d.WorkspaceNames", screen_number); |
2085 | if (XrmGetResource(database, name_lookup, class_lookup, &value_type, | 2085 | if (XrmGetResource(database, name_lookup, class_lookup, &value_type, |
2086 | &value)) { | 2086 | &value)) { |
2087 | char *search = bstrdup(value.addr); | 2087 | char *search = Misc::strdup(value.addr); |
2088 | 2088 | ||
2089 | int i; | 2089 | int i; |
2090 | for (i = 0; i < screen->getNumberOfWorkspaces(); i++) { | 2090 | for (i = 0; i < screen->getNumberOfWorkspaces(); i++) { |
@@ -2479,7 +2479,7 @@ void Fluxbox::saveStyleFilename(const char *filename) { | |||
2479 | if (resource.style_file) | 2479 | if (resource.style_file) |
2480 | delete [] resource.style_file; | 2480 | delete [] resource.style_file; |
2481 | 2481 | ||
2482 | resource.style_file = bstrdup(filename); | 2482 | resource.style_file = Misc::strdup(filename); |
2483 | } | 2483 | } |
2484 | 2484 | ||
2485 | 2485 | ||
@@ -2496,7 +2496,7 @@ void Fluxbox::saveMenuFilename(const char *filename) { | |||
2496 | if (! stat(filename, &buf)) { | 2496 | if (! stat(filename, &buf)) { |
2497 | MenuTimestamp *ts = new MenuTimestamp; | 2497 | MenuTimestamp *ts = new MenuTimestamp; |
2498 | 2498 | ||
2499 | ts->filename = bstrdup(filename); | 2499 | ts->filename = Misc::strdup(filename); |
2500 | ts->timestamp = buf.st_ctime; | 2500 | ts->timestamp = buf.st_ctime; |
2501 | 2501 | ||
2502 | menuTimestamps->insert(ts); | 2502 | menuTimestamps->insert(ts); |