+void
+set_cur_mail_length_var(int len, struct list* hash)
+{
+ char* buf;
+ struct variable* pv;
+
+ pv = get_var_struct(INT_VAR_MAIL_LEN, VAR_INTERN, hash);
+
+ if (! pv) /* user is not interested */
+ return;
+
+ buf = xmalloc(INT_TO_STRING_LEN);
+ sscanf(buf,"%d", &len);
+ set_var(pv->varcode, buf);
+ free_string(buf);
+}
+
+static void
+set_exit_code_var(int code, struct list* hash)
+{
+ char* buf;
+ struct variable* pv;
+
+ pv = get_var_struct(INT_VAR_LAST_EXIT, VAR_INTERN, hash);
+
+ if (! pv) /* user is not interested */
+ return;
+
+ buf = xmalloc(INT_TO_STRING_LEN);
+ sscanf(buf,"%d", &code);
+ set_var(pv->varcode, buf);
+ free_string(buf);
+}
+
+static void
+set_last_pipe_var(char* buf, struct list* hash)
+{
+ struct variable* pv;
+
+ pv = get_var_struct(INT_VAR_LAST_EXIT, VAR_INTERN, hash);
+
+ if (! pv) /* user is not interested */
+ return;
+ set_var(pv->varcode, buf);
+}
+