cupsEnumDests(0, 1000, NULL, 0, 0, (cups_dest_cb_t)cups_name_cb, &data);
if (!data.dest)
+ {
+ _cupsSetError(IPP_STATUS_ERROR_NOT_FOUND, _("The printer or class does not exist."), 1);
return (NULL);
+ }
dest = data.dest;
}
*nameptr++ = '_';
}
+ /*
+ * Remove an underscore if it is the last character and isn't the only
+ * character in the name...
+ */
+
+ if (nameptr > (name + 1) && nameptr[-1] == '_')
+ nameptr --;
+
*nameptr = '\0';
}