Browse Source

update the theme

Xℹ Ruoyao 4 years ago
parent
commit
02d275ac6d

+ 2 - 2
content/post/cache-unfriendly.md

@@ -14,10 +14,10 @@ modern computers which leads to the behavior.
 authors = ["xry111"]
 +++
 
-{{% alert note %}}
+{{% callout note %}}
 Migrated from old blog, with minor changes.  If you can't read Chinese
 but are interested in this topic, mail me.
-{{% /alert %}}
+{{% /callout %}}
 
 # 缓存不友好的程序及相关评测问题
 

+ 6 - 6
content/post/exam-ub.md

@@ -9,10 +9,10 @@ Even a stupid problem can lead to some thoughts.
 authors = ["xry111"]
 +++
 
-{{% alert note %}}
+{{% callout note %}}
 本文中对 C 语言标准章节的引用以 [N1570][N1570] 为准。
 [N1570]:/assets/std/c1x-n1570.pdf
-{{% /alert %}}
+{{% /callout %}}
 
 # 某笔试题中的未定义行为
 
@@ -196,14 +196,14 @@ CPU 可能会直接预取 `array` 减 1 后指向的那个地址,
 就算是在普通的笔记本上,编译器看到这句话也可以做任何事,
 包括在你的屏幕上输出 `I am angry!`.
 
-{{% alert note %}}
+{{% callout note %}}
 再强调一次,这不是说 `array-1` 的结果没有意义,
 而是说表达式 `array -= 1` **本身** 没有意义,
 这导致 **任何** 执行它的程序流程 **都** 没有意义。
 理论上它可能表现为 `system("mkfs.ext4 /dev/sda1")`,
 `raise(SIGBUS)`,
 甚至 `__builtin_unreachable()`。
-{{% /alert %}}
+{{% /callout %}}
 
 所以说唯一可行的办法是多分配一个整数的内存空间:
 
@@ -226,11 +226,11 @@ array = calloc(u_size, sizeof(int));
 这里连乘法溢出的判断都交给 `calloc` 进行了,
 但是传递参数时仍要检查是否会发生截断。
 
-{{% alert note %}}
+{{% callout note %}}
 据报道,某些老旧的 C 运行库没有在 `calloc` 中判断乘法溢出。
 (这类运行库曾经引起一系列安全问题。)
 如果你希望程序能在这些违反标准的环境下工作,需要自行判断乘法溢出。
-{{% /alert %}}
+{{% /callout %}}
 
 然而,无论是 `malloc` 还是 `calloc` 分配失败的时候都会返回 `NULL`
 (7.22.3.2p3, 7.22.3.4p3),如果解引用空指针,又会产生未定义行为,

+ 2 - 2
content/post/lfs-multiarch-note.md

@@ -502,14 +502,14 @@ Then we can use `meson --native-file x86` for 32-bit.  `exec_wrapper = ""`
 tells Meson we can run the generated executables natively.  Without it
 some BLFS packages refuse to build.
 
-{{% alert note %}}
+{{% callout note %}}
 I'd used `/usr/share/meson/cross` and `--cross-file`, just like a
 *pseudo-cross* building with autoconf `configure` script.  But it turned out
 some packages refuse to build certain parts (for example `gir` files) when
 they are cross compiled.  And, `meson` now uses *host* pkg-config to locate
 `g-ir-scanner` and `g-ir-compiler`.  So we have to stop pretending cross
 building for 32-bit.
-{{% /alert %}}
+{{% /callout %}}
 
 [14]:http://www.linuxfromscratch.org/lfs/view/8.3-rc2/chapter06/gmp.html
 [15]:http://www.linuxfromscratch.org/lfs/view/8.3-rc2/chapter06/pkg-config.html

+ 2 - 2
content/post/script-kid.md

@@ -27,9 +27,9 @@ my system journal.  Now I can't stand you anymore.
 
 ## Words to the young script kid
 
-{{% alert note %}}
+{{% callout note %}}
 Since the kid is from Liaoning, I'll provide Chinese version for him.
-{{% /alert %}}
+{{% /callout %}}
 
 I feel that you script kids still need to learn a lot.  You know well
 about brute force attacking, but you're still too young.  Do you understand?

+ 2 - 2
content/post/steve-summit-article-ub.md

@@ -13,10 +13,10 @@ authors = ['scs']
 
 原作者 Steve Summit, [原文链接](http://www.eskimo.com/~scs/readings/undef.950321.html)
 
-{{% alert note %}}
+{{% callout note %}}
 本文最早于 1995 年 3 月 21 日,在一条关于未定义行为的帖子中进行讨论时发布。
 我 *(原作者 Steve,下同)* 对文本进行了一些微小改动,以发布在网站上。
-{{% /alert %}}
+{{% /callout %}}
 
 ```
 Newsgroups: comp.lang.c

+ 1 - 1
themes/academic

@@ -1 +1 @@
-Subproject commit c43b1b94ef8b9b18cd1604fa675b209270e68f2a
+Subproject commit e52a6b5250cac353e82e4996f3f7b563d398feaf