summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-05-27 06:02:52 +0000
committerpeter <peter@FreeBSD.org>1996-05-27 06:02:52 +0000
commit8fb4cf1a7e63a13453d680429416ef7bfbb96712 (patch)
tree47f02bd696c51d0640aedee2b7826775d3487622 /sys/dev
parent9ec60f586a5d0dd87cbb47a24f13f7d24b3046d6 (diff)
downloadFreeBSD-src-8fb4cf1a7e63a13453d680429416ef7bfbb96712.zip
FreeBSD-src-8fb4cf1a7e63a13453d680429416ef7bfbb96712.tar.gz
Fix the warnings about "cant inline call to xxx" by reordering two
functions. It seems gcc wants to have seen the definitions of the function before it will insert it inline in a caller.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/syscons/syscons.c95
1 files changed, 49 insertions, 46 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index c80e073..847ef7f 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.c,v 1.148 1996/05/11 23:16:23 joerg Exp $
+ * $Id: syscons.c,v 1.149 1996/05/12 12:36:59 joerg Exp $
*/
#include "sc.h"
@@ -292,6 +292,54 @@ scresume(void *dummy)
}
#endif
+/*
+ * These functions need to be before calls to them so they can be inlined.
+ */
+static inline void
+draw_cursor(scr_stat *scp, int show)
+{
+ if (show && !(scp->status & CURSOR_SHOWN)) {
+ u_short cursor_image = *(Crtat + (scp->cursor_pos - scp->scr_buf));
+
+ scp->cursor_saveunder = cursor_image;
+ if (configuration & CHAR_CURSOR) {
+ set_destructive_cursor(scp, FALSE);
+ cursor_image = (cursor_image & 0xff00) | DEAD_CHAR;
+ }
+ else {
+ if ((cursor_image & 0x7000) == 0x7000) {
+ cursor_image &= 0x8fff;
+ if(!(cursor_image & 0x0700))
+ cursor_image |= 0x0700;
+ } else {
+ cursor_image |= 0x7000;
+ if ((cursor_image & 0x0700) == 0x0700)
+ cursor_image &= 0xf0ff;
+ }
+ }
+ *(Crtat + (scp->cursor_pos - scp->scr_buf)) = cursor_image;
+ mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
+ scp->status |= CURSOR_SHOWN;
+ }
+ if (!show && (scp->status & CURSOR_SHOWN)) {
+ *(Crtat + (scp->cursor_pos - scp->scr_buf)) = scp->cursor_saveunder;
+ mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
+ scp->status &= ~CURSOR_SHOWN;
+ }
+}
+
+static inline void
+move_crsr(scr_stat *scp, int x, int y)
+{
+ if (x < 0 || y < 0 || x >= scp->xsize || y >= scp->ysize)
+ return;
+ scp->xpos = x;
+ scp->ypos = y;
+ mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
+ scp->cursor_pos = scp->scr_buf + scp->ypos * scp->xsize + scp->xpos;
+ mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
+}
+
static int
scattach(struct isa_device *dev)
{
@@ -1392,18 +1440,6 @@ exchange_scr(void)
new_scp->status &= ~CURSOR_SHOWN;
}
-static inline void
-move_crsr(scr_stat *scp, int x, int y)
-{
- if (x < 0 || y < 0 || x >= scp->xsize || y >= scp->ysize)
- return;
- scp->xpos = x;
- scp->ypos = y;
- mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
- scp->cursor_pos = scp->scr_buf + scp->ypos * scp->xsize + scp->xpos;
- mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
-}
-
static void
scan_esc(scr_stat *scp, u_char c)
{
@@ -1898,39 +1934,6 @@ scan_esc(scr_stat *scp, u_char c)
scp->term.esc = 0;
}
-static inline void
-draw_cursor(scr_stat *scp, int show)
-{
- if (show && !(scp->status & CURSOR_SHOWN)) {
- u_short cursor_image = *(Crtat + (scp->cursor_pos - scp->scr_buf));
-
- scp->cursor_saveunder = cursor_image;
- if (configuration & CHAR_CURSOR) {
- set_destructive_cursor(scp, FALSE);
- cursor_image = (cursor_image & 0xff00) | DEAD_CHAR;
- }
- else {
- if ((cursor_image & 0x7000) == 0x7000) {
- cursor_image &= 0x8fff;
- if(!(cursor_image & 0x0700))
- cursor_image |= 0x0700;
- } else {
- cursor_image |= 0x7000;
- if ((cursor_image & 0x0700) == 0x0700)
- cursor_image &= 0xf0ff;
- }
- }
- *(Crtat + (scp->cursor_pos - scp->scr_buf)) = cursor_image;
- mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
- scp->status |= CURSOR_SHOWN;
- }
- if (!show && (scp->status & CURSOR_SHOWN)) {
- *(Crtat + (scp->cursor_pos - scp->scr_buf)) = scp->cursor_saveunder;
- mark_for_update(scp, scp->cursor_pos - scp->scr_buf);
- scp->status &= ~CURSOR_SHOWN;
- }
-}
-
static void
ansi_put(scr_stat *scp, u_char *buf, int len)
{
OpenPOWER on IntegriCloud