SF.net SVN: geany:[5186] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Fri Aug 20 16:04:46 UTC 2010
Revision: 5186
http://geany.svn.sourceforge.net/geany/?rev=5186&view=rev
Author: ntrel
Date: 2010-08-20 16:04:45 +0000 (Fri, 20 Aug 2010)
Log Message:
-----------
Remove buildcmd_* accessor functions.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-08-20 15:56:39 UTC (rev 5185)
+++ trunk/ChangeLog 2010-08-20 16:04:45 UTC (rev 5186)
@@ -7,6 +7,8 @@
* src/build.c, src/build.h:
Replace GeanyBuildCommand::entries array with separate fields.
Similar to r5077 in the bs2 branch, but with less loop unrolling.
+ * src/build.c:
+ Remove buildcmd_* accessor functions.
2010-08-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2010-08-20 15:56:39 UTC (rev 5185)
+++ trunk/src/build.c 2010-08-20 16:04:45 UTC (rev 5186)
@@ -189,24 +189,6 @@
}
-static gchar *buildcmd_label(GeanyBuildCommand *bc)
-{
- return id_to_str(bc, GEANY_BC_LABEL);
-}
-
-
-static gchar *buildcmd_cmd(GeanyBuildCommand *bc)
-{
- return id_to_str(bc, GEANY_BC_COMMAND);
-}
-
-
-static gchar *buildcmd_working_dir(GeanyBuildCommand *bc)
-{
- return id_to_str(bc, GEANY_BC_WORKING_DIR);
-}
-
-
static const gchar *config_keys[] = {
[GEANY_BC_LABEL] = "LB",
[GEANY_BC_COMMAND] = "CM",
@@ -813,8 +795,8 @@
have_project = project != NULL;
cmd = get_build_cmd(doc, GEANY_GBG_EXEC, cmdindex, NULL);
- cmd_string = build_replace_placeholder(doc, buildcmd_cmd(cmd));
- cmd_working_dir = buildcmd_working_dir(cmd);
+ cmd_string = build_replace_placeholder(doc, cmd->command);
+ cmd_working_dir = cmd->working_dir;
if (! NZV(cmd_working_dir))
cmd_working_dir = "%d";
working_dir = build_replace_placeholder(doc, cmd_working_dir); /* in utf-8 */
@@ -1231,7 +1213,7 @@
if (buildcmd == NULL)
return;
- cmdstr = buildcmd_cmd(buildcmd);
+ cmdstr = buildcmd->command;
if (cmd_cat != NULL)
{
@@ -1243,7 +1225,7 @@
else
full_command = cmdstr;
- dir = build_replace_placeholder(doc, buildcmd_working_dir(buildcmd));
+ dir = build_replace_placeholder(doc, buildcmd->working_dir);
subs_command = build_replace_placeholder(doc, full_command);
build_info.grp = grp;
build_info.cmd = cmd;
@@ -1307,7 +1289,7 @@
return;
}
bc = get_build_cmd(doc, grp, cmd, NULL);
- if (bc != NULL && strcmp(buildcmd_cmd(bc), "builtin") == 0)
+ if (bc != NULL && strcmp(bc->command, "builtin") == 0)
{
gchar *uri;
if (doc == NULL)
@@ -1442,14 +1424,14 @@
for (j = bs->build_cmd; j < build_groups_count[grp]; ++j)
{
GeanyBuildCommand *bc = get_build_cmd(NULL, grp, j, NULL);
- const gchar *lbl = (bc == NULL) ? "" : buildcmd_label(bc);
+ const gchar *lbl = (bc == NULL) ? "" : bc->label;
create_build_menu_item(menu, keygroup, accel_group, bs, lbl, grp, j);
}
}
else
{
GeanyBuildCommand *bc = get_build_cmd(NULL, bs->build_grp, bs->build_cmd, NULL);
- const gchar *lbl = (bc == NULL) ? "" : buildcmd_label(bc);
+ const gchar *lbl = (bc == NULL) ? "" : bc->label;
create_build_menu_item(menu, keygroup, accel_group, bs, lbl, bs->build_grp, bs->build_cmd);
}
}
@@ -1538,7 +1520,7 @@
const gchar *label;
bc = get_build_cmd(doc, grp, cmd, NULL);
if (bc)
- label = buildcmd_label(bc);
+ label = bc->label;
else
label = NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list